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.0.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.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.2.0-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.0-cp311-abi3-macosx_11_0_arm64.whl (4.8 MB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

dynamic_wallet_sdk-0.2.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.2.0.tar.gz.

File metadata

  • Download URL: dynamic_wallet_sdk-0.2.0.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.0.tar.gz
Algorithm Hash digest
SHA256 81b45e386bf375d8bb6b17ee21a20529f0de40caa67b7c367369806bb8a6f46e
MD5 4668dee5bec2c364c7ce8bd0a2bedcbf
BLAKE2b-256 e540600652ae6067a490897415d149ed2a5eee45ea598601dd0b35ac08566a4f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dynamic_wallet_sdk-0.2.0-cp311-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2c01233dbe76ec08173d83ef545271f8616c1c4b9e641ea6cd32597d820e1999
MD5 2f27a96bf010e301063acb8c1018e887
BLAKE2b-256 5f81c46da6f62fdd7f0a5f3e3113190721837facf0c450ae0cbd0ac3b6dd1913

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dynamic_wallet_sdk-0.2.0-cp311-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 69b62b2a8dbf639c46f671b732eb11be82f433f97436a6949ac194b70a28dbf0
MD5 b4aceed2fb3ad6f2ec2c180350bdd6a9
BLAKE2b-256 8897e8f117424f918c29ea5c4cac622a29ed2f1b0475569e1a3376ecd01f1c18

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dynamic_wallet_sdk-0.2.0-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f80a4120b7183997d2aca7fc0b69e5afc29c6a9b8dde1f599021a520cc9d7e11
MD5 fd4ba3ff68a33c030b97e306de89bece
BLAKE2b-256 226b9cd7f242abeaab2fd689e87d1542169c2c226fc291cb96a5e44a0e809ba4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dynamic_wallet_sdk-0.2.0-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 4b823b7b115c943b745948e6740d6eedca35fcaa6739d7fa873fdeacf1c89252
MD5 e8d10a903c3ab9f2fa58eb4dcae3a45b
BLAKE2b-256 814a8b10ca1b842e941dc57254c5208cfdbc6efc565e7d17ec882498087bf902

See more details on using hashes here.

Provenance

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