Skip to content

sodot-rs/sodot-vertex-to-vertex-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Sodot Vertex-to-Vertex Example

This is a minimal example project that demonstrates how to use two Vertex servers to generate a keypair between them. This process ensures that each Vertex has a unique secret share. Once the keypair is generated, both servers can utilize MPC to sign messages securely. Vertex servers can be deployed across different cloud accounts/providers, with support for AWS, Azure and GCP.

Example Flow

This example goes through a simple keygen and then sign flow in order to show how keys can be created in a distributed manner across different Vertex servers. In index.js there is a main function. The main function details the high-level flow that uses the Sodot-hosted demo Vertex servers to:

  1. Generate a keypair across the 2 different Vertex servers (in practice these can be hosted by 2 different entities).
  2. Use BIP-32 non-hardened derivation to derive a public key for signing. Which it then converts to an EVM address.
  3. Sign an Ethereum signed message. The signature can then be verified on Etherscan.

To view the full details regarding the Vertex REST API used by this project, see the docs here.

Running

To run this example project, follow these steps:

  1. Clone the repository: git clone https://github.com/sodot-rs/sodot-vertex-to-vertex-example.git
  2. Install the required dependencies: npm install
  3. Create a .env file with at least 2 API keys for either demo or production Vertex servers.
  4. (Optional) Configure the VERTICES variable at the top of index.js in case you are running your own Vertex servers.
  5. Run the example: node index.js

About

A minimal Vertex-to-Vertex example.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published