This guide demonstrates how to integrate Sodot’s secure Multi-Party Computation (MPC) technology with the Adamik API, based on our live demo application. By following this implementation, you can leverage a single MPC infrastructure to sign transactions across all Adamik-supported blockchains.
The sodot-multichain demo showcases how Sodot MPC technology can be combined with Adamik API to:
The complete source code for this implementation is available in our GitHub repository.
The integration consists of three main components:
The core of the integration is the SodotSigner
class, which implements the BaseSigner
interface:
Here’s a simplified implementation based on our demo application:
The demo application follows this workflow:
SodotSigner
instance for the selected blockchaingetPubkey()
to generate or retrieve the MPC keySodotSigner
to sign the encoded transactionHere’s how this workflow is implemented in the demo application:
The demo application uses a set of utility functions to interact with the Adamik API. These functions are located in the src/adamik
directory:
encodePubkeyToAddress.ts
: Converts a public key to a blockchain addressencodeTransaction.ts
: Prepares a transaction for signingbroadcastTransaction.ts
: Broadcasts a signed transaction to the networkThese functions handle the API calls, error handling, and logging, making it easy to integrate with the Sodot MPC signer.
This demo application uses the Sodot Demo API for demonstration purposes only. For production deployments, it is critical to:
You can test this integration by:
The integration of Sodot MPC with Adamik API provides a powerful solution for secure multi-chain applications. By following the implementation in our demo application, you can leverage this integration to build your own secure blockchain applications.
For more details, explore the full source code in our GitHub repository, particularly the src/signers/Sodot.ts
file for the MPC implementation and the src/adamik
directory for the API integration.
This guide demonstrates how to integrate Sodot’s secure Multi-Party Computation (MPC) technology with the Adamik API, based on our live demo application. By following this implementation, you can leverage a single MPC infrastructure to sign transactions across all Adamik-supported blockchains.
The sodot-multichain demo showcases how Sodot MPC technology can be combined with Adamik API to:
The complete source code for this implementation is available in our GitHub repository.
The integration consists of three main components:
The core of the integration is the SodotSigner
class, which implements the BaseSigner
interface:
Here’s a simplified implementation based on our demo application:
The demo application follows this workflow:
SodotSigner
instance for the selected blockchaingetPubkey()
to generate or retrieve the MPC keySodotSigner
to sign the encoded transactionHere’s how this workflow is implemented in the demo application:
The demo application uses a set of utility functions to interact with the Adamik API. These functions are located in the src/adamik
directory:
encodePubkeyToAddress.ts
: Converts a public key to a blockchain addressencodeTransaction.ts
: Prepares a transaction for signingbroadcastTransaction.ts
: Broadcasts a signed transaction to the networkThese functions handle the API calls, error handling, and logging, making it easy to integrate with the Sodot MPC signer.
This demo application uses the Sodot Demo API for demonstration purposes only. For production deployments, it is critical to:
You can test this integration by:
The integration of Sodot MPC with Adamik API provides a powerful solution for secure multi-chain applications. By following the implementation in our demo application, you can leverage this integration to build your own secure blockchain applications.
For more details, explore the full source code in our GitHub repository, particularly the src/signers/Sodot.ts
file for the MPC implementation and the src/adamik
directory for the API integration.