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 two TSS configurations:

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

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.4.0.tar.gz (87.9 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.4.0-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.4.0-cp311-abi3-manylinux_2_28_aarch64.whl (4.7 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.11+macOS 11.0+ ARM64

dynamic_wallet_sdk-0.4.0-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.4.0.tar.gz.

File metadata

  • Download URL: dynamic_wallet_sdk-0.4.0.tar.gz
  • Upload date:
  • Size: 87.9 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.4.0.tar.gz
Algorithm Hash digest
SHA256 24e049991a8939cea55ab1fdb4084649eb90c26f6286ebcda42f7c7b3371a522
MD5 e873fe6934a6aa08d20a89148ed8e2ee
BLAKE2b-256 6a5611751532cb3b43fe10565f2722e10ee9569f96b2185030da133baacc37a9

See more details on using hashes here.

Provenance

The following attestation bundles were made for dynamic_wallet_sdk-0.4.0.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.4.0-cp311-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for dynamic_wallet_sdk-0.4.0-cp311-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c6dc5a9e2aa86a635f55986f6acfbf9df9856bb3b3123c44b77127b41bd0e58a
MD5 20498192b16cc4208ee73d8d69e51ec2
BLAKE2b-256 292c570e767e143b275ea195d349562707abc33eedc57849e88ec663853184e0

See more details on using hashes here.

Provenance

The following attestation bundles were made for dynamic_wallet_sdk-0.4.0-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.4.0-cp311-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for dynamic_wallet_sdk-0.4.0-cp311-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 a4de262a19265d73655aca95fe74e4cf02649fc70aea2159be73b9bab3ecc1e8
MD5 ac47df143f301d3af642c590af542db9
BLAKE2b-256 06529b477d8ea0236158eba47cb78a3281352779ef7aa9d945bd735a82ef6402

See more details on using hashes here.

Provenance

The following attestation bundles were made for dynamic_wallet_sdk-0.4.0-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.4.0-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dynamic_wallet_sdk-0.4.0-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 36bb7db09ff350a14b00f0ab87c3912a9e047e3e6370d4dca7d5d94510f106a8
MD5 f3e228b2a16863636a87d37af4db8091
BLAKE2b-256 8743824a3b777861eecbedd68bca91dc2a3e6deb60cdbd926d9d42c18f83f093

See more details on using hashes here.

Provenance

The following attestation bundles were made for dynamic_wallet_sdk-0.4.0-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.4.0-cp311-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for dynamic_wallet_sdk-0.4.0-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 e5c8ecc6ba015126e99aba199bf9d217dd4a6b8a13c00601d5ca24ccf4e687fc
MD5 69444d22594abccc17b2cf15555f51c4
BLAKE2b-256 b1a66795ffde5041d8f69f8f68bd353b09ed9a78d461ec7a86efde409b539fc3

See more details on using hashes here.

Provenance

The following attestation bundles were made for dynamic_wallet_sdk-0.4.0-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