Skip to main content

Dynamic MPC Wallet SDK for Python — create and manage multi-party computation wallets for EVM and Solana

Project description

Dynamic Wallet SDK for Python

A Python SDK for Dynamic's MPC (Multi-Party Computation) wallet infrastructure. Create, sign with, and manage non-custodial wallets from Python — no browser required.

Installation

pip install dynamic-wallet-sdk

Pre-built wheels are provided for Linux (x86_64, ARM64) and macOS (x86_64, Apple Silicon). No Rust toolchain required.

Requirements

Quick Start

EVM Wallet

import asyncio
from dynamic_wallet_sdk.evm.client import DynamicEvmWalletClient

async def main():
    async with DynamicEvmWalletClient("your-environment-id") as client:
        await client.authenticate_api_token("your-api-token")

        # Create wallet (MPC keygen)
        address = await client.create_wallet_account(password="backup-password")
        print(f"Created EVM wallet: {address}")

        # Sign a message (EIP-191)
        signature = await client.sign_message(message="Hello, Dynamic!", address=address)
        print(f"Signature: {signature}")

        # Sign EIP-712 typed data
        typed_data = {
            "types": {...},
            "primaryType": "...",
            "domain": {...},
            "message": {...},
        }
        sig = await client.sign_typed_data(address, typed_data)

asyncio.run(main())

Solana (SVM) Wallet

import asyncio
from dynamic_wallet_sdk.svm.client import DynamicSvmWalletClient

async def main():
    async with DynamicSvmWalletClient("your-environment-id") as client:
        await client.authenticate_api_token("your-api-token")

        address = await client.create_wallet_account(password="backup-password")
        print(f"Created Solana wallet: {address}")

        signature = await client.sign_message(message="Hello from Solana!", address=address)
        print(f"Signature (base58): {signature}")

asyncio.run(main())

Delegated Signing

For server-side signing where key shares are held by your server:

from dynamic_wallet_sdk.delegated.client import (
    create_delegated_evm_client,
    delegated_sign_message,
)
from dynamic_wallet_sdk.delegated.decrypt import decrypt_delegated_webhook_data

# 1. Decrypt the webhook payload you received from Dynamic
decrypted = decrypt_delegated_webhook_data(
    private_key_pem=rsa_private_key,
    encrypted_delegated_key_share=webhook["encryptedDelegatedShare"],
    encrypted_wallet_api_key=webhook["encryptedWalletApiKey"],
)

# 2. Create a client and sign
client = await create_delegated_evm_client("env-id", "api-key")
sig = await delegated_sign_message(
    client,
    wallet_id="wallet-id",
    wallet_api_key=decrypted.decrypted_wallet_api_key,
    key_share=decrypted.decrypted_delegated_share["secretShare"],
    message="0x...",
    chain_name="EVM",
    is_formatted=True,
)

Key Concepts

Key Backup and Recovery

Pass a password to create_wallet_account() to encrypt and back up key shares with Dynamic at keygen time. Recover them later with:

shares = await client.recover_key_shares(address, password="backup-password")

Key shares are encrypted with AES-256-GCM using a PBKDF2-derived key (SHA-256, 1M iterations).

Threshold Signature Schemes

The SDK supports three TSS configurations:

Scheme Parties Threshold Client Shares Server Shares
TWO_OF_TWO 2 2 1 1
TWO_OF_THREE 3 2 2 1
THREE_OF_FIVE 5 3 3 2

Chain Support

Chain Algorithm Client Class
EVM ECDSA DynamicEvmWalletClient
SVM (Solana) Ed25519 DynamicSvmWalletClient

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dynamic_wallet_sdk-0.2.1.tar.gz (81.6 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

dynamic_wallet_sdk-0.2.1-cp311-abi3-manylinux_2_28_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.28+ x86-64

dynamic_wallet_sdk-0.2.1-cp311-abi3-manylinux_2_28_aarch64.whl (4.6 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.28+ ARM64

dynamic_wallet_sdk-0.2.1-cp311-abi3-macosx_11_0_arm64.whl (4.9 MB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

dynamic_wallet_sdk-0.2.1-cp311-abi3-macosx_10_12_x86_64.whl (5.0 MB view details)

Uploaded CPython 3.11+macOS 10.12+ x86-64

File details

Details for the file dynamic_wallet_sdk-0.2.1.tar.gz.

File metadata

  • Download URL: dynamic_wallet_sdk-0.2.1.tar.gz
  • Upload date:
  • Size: 81.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dynamic_wallet_sdk-0.2.1.tar.gz
Algorithm Hash digest
SHA256 f9226f316f91ca4b2df258d4121704d94842890ffb642f8da13bb96edee6b0e8
MD5 1d088d0489e66a377e33d344e8618f0d
BLAKE2b-256 12e429c009f488014f17fca92039d7734bb053bfc28e17fff32e0f969dc38b7f

See more details on using hashes here.

Provenance

The following attestation bundles were made for dynamic_wallet_sdk-0.2.1.tar.gz:

Publisher: python-publish.yml on dynamic-labs/dynamic-waas-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dynamic_wallet_sdk-0.2.1-cp311-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for dynamic_wallet_sdk-0.2.1-cp311-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e60b05d34dab6c960ac5746716a81b17edfad57b9d73c1b5b1557b1ebcbf763a
MD5 b2d0e838e67d08fef2a99b76bb73d2f4
BLAKE2b-256 f3370a6a9306586fc445a3ecbadeed1b811226e92cc766a3277d7f03e290c28b

See more details on using hashes here.

Provenance

The following attestation bundles were made for dynamic_wallet_sdk-0.2.1-cp311-abi3-manylinux_2_28_x86_64.whl:

Publisher: python-publish.yml on dynamic-labs/dynamic-waas-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dynamic_wallet_sdk-0.2.1-cp311-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for dynamic_wallet_sdk-0.2.1-cp311-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 db82d20443b60a4161091d67f373972dd92eac76c83c8dcdfc3ead65c87e1e3d
MD5 bf33ba742bad91094bedfd96cdac9a8c
BLAKE2b-256 df920373f4ef982a7421988a56353c55f6fccc9c64bc52261a72ed6a51630434

See more details on using hashes here.

Provenance

The following attestation bundles were made for dynamic_wallet_sdk-0.2.1-cp311-abi3-manylinux_2_28_aarch64.whl:

Publisher: python-publish.yml on dynamic-labs/dynamic-waas-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dynamic_wallet_sdk-0.2.1-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dynamic_wallet_sdk-0.2.1-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 96452503c493fc92479172fa3977964d5df81933081f5b5895066ea686457bed
MD5 52a80b63d33ccc7d533de020fd9f81e7
BLAKE2b-256 34d951770e8757e78170500b6b96aa7d2e5fa5e16467d6505283ee33bc0bf645

See more details on using hashes here.

Provenance

The following attestation bundles were made for dynamic_wallet_sdk-0.2.1-cp311-abi3-macosx_11_0_arm64.whl:

Publisher: python-publish.yml on dynamic-labs/dynamic-waas-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dynamic_wallet_sdk-0.2.1-cp311-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for dynamic_wallet_sdk-0.2.1-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 85a6a01f2ef86564e8d6f9a8e6ef947919b8af9b18cb9a8d6415e20b837f6179
MD5 c990886fbcb9f0ea47a52e63d5f61bd6
BLAKE2b-256 4aa7ca4bc8acbe364ee7404ab76a490fbc6ab857cdb1a5fe66aac3e798adfbcb

See more details on using hashes here.

Provenance

The following attestation bundles were made for dynamic_wallet_sdk-0.2.1-cp311-abi3-macosx_10_12_x86_64.whl:

Publisher: python-publish.yml on dynamic-labs/dynamic-waas-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page