Request Types
Pre-Alpha Disclaimer: This is an early pre-alpha release for exploring the SDK and starting development only. There is no real MPC signing — all signatures are generated by a single mock signer, not a distributed network. Do not submit any real transactions for signing or rely on any security guarantees. The dWallet keys, trust model, and signing protocol are not final; do not rely on any key material until mainnet. All interfaces, APIs, and data formats are subject to change without notice. The Solana program and all on-chain data will be wiped periodically and everything will be deleted when we transition to Ika Alpha 1. This software is provided “as is” without warranty of any kind; use is entirely at your own risk and dWallet Labs assumes no liability for any damages arising from its use.
DWalletRequest Enum
All operations are encoded as variants of the DWalletRequest enum, BCS-serialized inside SignedRequestData.request.
#![allow(unused)]
fn main() {
pub enum DWalletRequest {
DKG { ... }, // Supported in mock
DKGWithPublicShare { ... }, // Supported in mock
Sign { ... }, // Supported in mock
ImportedKeySign { ... }, // Supported in mock (same as Sign)
Presign { ... }, // Supported in mock
PresignForDWallet { ... }, // Supported in mock
ImportedKeyVerification { ... }, // Not yet implemented
ReEncryptShare { ... }, // Not yet implemented
MakeSharePublic { ... }, // Not yet implemented
FutureSign { ... }, // Not yet implemented
SignWithPartialUserSig { ... }, // Not yet implemented
ImportedKeySignWithPartialUserSig { ... }, // Not yet implemented
}
}
Mock Support
| Request | Mock Status | Notes |
|---|---|---|
DKG | Supported | Secp256k1 and Curve25519 (Ed25519). Auto-commits dWallet on-chain and transfers authority to intended_chain_sender. |
DKGWithPublicShare | Supported | Same as DKG in mock. |
Sign | Supported | Signs with Ed25519 or Secp256k1 key (based on DKG curve). signature_algorithm and hash_scheme are accepted but ignored by mock. |
ImportedKeySign | Supported | Same as Sign in mock. |
Presign | Supported | Returns random presign data. |
PresignForDWallet | Supported | Same as Presign in mock. |
ImportedKeyVerification | Not implemented | Returns error. |
ReEncryptShare | Not implemented | Returns error. |
MakeSharePublic | Not implemented | Returns error. |
FutureSign | Not implemented | Returns error. |
SignWithPartialUserSig | Not implemented | Returns error. |
ImportedKeySignWithPartialUserSig | Not implemented | Returns error. |
Supported Curves
| Curve | DKG | Sign | Notes |
|---|---|---|---|
Secp256k1 | Yes | Yes | Bitcoin, Ethereum |
Secp256r1 | No | No | Coming soon |
Curve25519 | Yes | Yes | Solana, Sui (Ed25519) |
Ristretto | No | No | Coming soon |
DKG
Create a new dWallet via Distributed Key Generation.
#![allow(unused)]
fn main() {
DWalletRequest::DKG {
dwallet_network_encryption_public_key: Vec<u8>,
curve: DWalletCurve,
centralized_public_key_share_and_proof: Vec<u8>,
encrypted_centralized_secret_share_and_proof: Vec<u8>,
encryption_key: Vec<u8>,
user_public_output: Vec<u8>,
signer_public_key: Vec<u8>,
}
}
| Field | Description |
|---|---|
dwallet_network_encryption_public_key | Network encryption key (from on-chain NEK account) |
curve | Target curve (Secp256k1, Secp256r1, Curve25519, Ristretto) |
centralized_public_key_share_and_proof | User’s public key share + ZK proof |
encrypted_centralized_secret_share_and_proof | Encrypted user secret share |
encryption_key | Encryption key for the secret share |
user_public_output | User’s DKG public output |
signer_public_key | User’s signer key |
Response: TransactionResponseData::Attestation with the DKG output and NOA attestation.
DKGWithPublicShare
Alternative DKG variant where the user provides a public share instead of an encrypted secret.
#![allow(unused)]
fn main() {
DWalletRequest::DKGWithPublicShare {
dwallet_network_encryption_public_key: Vec<u8>,
curve: DWalletCurve,
centralized_public_key_share_and_proof: Vec<u8>,
public_user_secret_key_share: Vec<u8>,
signer_public_key: Vec<u8>,
}
}
Sign
Sign a message using an existing dWallet.
#![allow(unused)]
fn main() {
DWalletRequest::Sign {
message: Vec<u8>,
curve: DWalletCurve,
signature_algorithm: DWalletSignatureAlgorithm,
hash_scheme: DWalletHashScheme,
presign_id: Vec<u8>,
message_centralized_signature: Vec<u8>,
approval_proof: ApprovalProof,
}
}
| Field | Description |
|---|---|
message | Raw message bytes to sign |
curve | dWallet curve |
signature_algorithm | DWalletSignatureAlgorithm enum (see below) |
hash_scheme | DWalletHashScheme enum (see below) |
presign_id | ID of a previously allocated presign |
message_centralized_signature | User’s partial signature |
approval_proof | On-chain proof of message approval |
Response: TransactionResponseData::Signature with the completed signature.
ApprovalProof
The approval proof ties the gRPC signing request to an on-chain MessageApproval:
#![allow(unused)]
fn main() {
pub enum ApprovalProof {
Solana {
transaction_signature: Vec<u8>, // Solana tx signature
slot: u64, // Slot of the transaction
},
Sui {
effects_certificate: Vec<u8>, // Sui effects certificate
},
}
}
Presign
Allocate a global presign (usable with any dWallet).
#![allow(unused)]
fn main() {
DWalletRequest::Presign {
curve: DWalletCurve,
signature_algorithm: DWalletSignatureAlgorithm,
}
}
Response: TransactionResponseData::Presign with presign ID and data.
PresignForDWallet
Allocate a presign bound to a specific dWallet.
#![allow(unused)]
fn main() {
DWalletRequest::PresignForDWallet {
dwallet_id: Vec<u8>,
curve: DWalletCurve,
signature_algorithm: DWalletSignatureAlgorithm,
}
}
Cryptographic Parameter Enums
DWalletCurve
| Variant | Description |
|---|---|
Secp256k1 | Bitcoin, Ethereum |
Secp256r1 | WebAuthn, secure enclaves |
Curve25519 | Solana, Sui, Ed25519 |
Ristretto | Substrate, Polkadot |
DWalletSignatureAlgorithm
| Variant | Index | Use For |
|---|---|---|
ECDSASecp256k1 | 0 | Secp256k1 (Ethereum, Bitcoin) |
ECDSASecp256r1 | 1 | Secp256r1 (WebAuthn) |
Taproot | 2 | Secp256k1 (Bitcoin Taproot) |
EdDSA | 3 | Curve25519 (Solana, Sui) |
SchnorrkelSubstrate | 4 | Ristretto (Substrate, Polkadot) |
DWalletHashScheme
| Variant | Index | Use For |
|---|---|---|
Keccak256 | 0 | Ethereum, general purpose |
SHA256 | 1 | Bitcoin, general purpose |
DoubleSHA256 | 2 | Bitcoin transaction signing |
SHA512 | 3 | Ed25519 signing |
Merlin | 4 | Schnorrkel/Substrate |
ChainId
| Variant | Description |
|---|---|
Solana | Solana blockchain |
Sui | Sui blockchain |
SignatureScheme
| Variant | Value | Key Size |
|---|---|---|
Ed25519 | 0 | 32 bytes |
Secp256k1 | 1 | 33 bytes |
Secp256r1 | 2 | 33 bytes |