Response 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.
TransactionResponseData
The SubmitTransaction RPC returns a TransactionResponse containing BCS-serialized TransactionResponseData:
#![allow(unused)]
fn main() {
pub enum TransactionResponseData {
Signature { signature: Vec<u8> },
Attestation {
attestation_data: Vec<u8>,
network_signature: Vec<u8>,
network_pubkey: Vec<u8>,
epoch: u64,
},
Presign {
presign_id: Vec<u8>,
presign_data: Vec<u8>,
epoch: u64,
},
Error { message: String },
}
}
Response Variants
Signature
Returned for Sign and ImportedKeySign requests.
#![allow(unused)]
fn main() {
TransactionResponseData::Signature {
signature: Vec<u8>, // The completed signature bytes
}
}
| Field | Type | Description |
|---|---|---|
signature | Vec<u8> | The completed digital signature |
The signature is always 64 bytes:
- ECDSASecp256k1 / ECDSASecp256r1: 64 bytes (r || s)
- Taproot: 64 bytes (Schnorr signature)
- EdDSA: 64 bytes (Ed25519 signature)
- SchnorrkelSubstrate: 64 bytes
Attestation
Returned for DKG and DKGWithPublicShare requests.
#![allow(unused)]
fn main() {
TransactionResponseData::Attestation {
attestation_data: Vec<u8>, // DKG output data
network_signature: Vec<u8>, // NOA signature over the attestation
network_pubkey: Vec<u8>, // NOA public key
epoch: u64, // Epoch of the attestation
}
}
| Field | Type | Description |
|---|---|---|
attestation_data | Vec<u8> | The DKG output (public key, proofs, etc.) |
network_signature | Vec<u8> | NOA’s signature attesting to the output |
network_pubkey | Vec<u8> | NOA’s public key for verification |
epoch | u64 | Ika epoch when the attestation was produced |
The attestation_data + network_signature are passed to the CommitDWallet on-chain instruction to create the dWallet account.
Presign
Returned for Presign and PresignForDWallet requests.
#![allow(unused)]
fn main() {
TransactionResponseData::Presign {
presign_id: Vec<u8>, // Unique presign identifier
presign_data: Vec<u8>, // Precomputed signing data
epoch: u64, // Epoch of the presign
}
}
| Field | Type | Description |
|---|---|---|
presign_id | Vec<u8> | Unique identifier for this presign |
presign_data | Vec<u8> | Precomputed data used during signing |
epoch | u64 | Ika epoch when the presign was created |
Store the presign_id – you will pass it to Sign requests later.
Error
Returned when the operation fails.
#![allow(unused)]
fn main() {
TransactionResponseData::Error {
message: String, // Human-readable error description
}
}
Always check for the Error variant before processing the response.
Deserialization Example
#![allow(unused)]
fn main() {
use ika_dwallet_types::TransactionResponseData;
let response = client.submit_transaction(request).await?;
let result: TransactionResponseData = bcs::from_bytes(&response.into_inner().response_data)?;
match result {
TransactionResponseData::Signature { signature } => {
println!("Got signature: {} bytes", signature.len());
}
TransactionResponseData::Attestation { attestation_data, network_signature, .. } => {
println!("DKG complete, attestation: {} bytes", attestation_data.len());
// Submit CommitDWallet on-chain with attestation_data + network_signature
}
TransactionResponseData::Presign { presign_id, .. } => {
println!("Presign allocated: {}", hex::encode(&presign_id));
}
TransactionResponseData::Error { message } => {
eprintln!("Error: {message}");
}
}
}
PresignInfo (Query Response)
Returned by GetPresigns and GetPresignsForDWallet:
#![allow(unused)]
fn main() {
// Proto message
message PresignInfo {
bytes presign_id = 1;
bytes dwallet_id = 2;
uint32 curve = 3;
uint32 signature_scheme = 4;
uint64 epoch = 5;
}
}
| Field | Type | Description |
|---|---|---|
presign_id | bytes | Unique presign identifier |
dwallet_id | bytes | Associated dWallet (empty for global presigns) |
curve | u32 | Curve identifier |
signature_scheme | u32 | Signature scheme identifier |
epoch | u64 | Epoch when allocated |