Making a dWallet Public
🚧 Under Construction 🚧
This SDK is still in an experimental phase. We advise you use the SDK with localnet.
Make a dWallet's secret shares public, allowing anyone to sign with it. This transforms a zero-trust dWallet into a public, publicly accessible one.
Trust Model Change
Zero-Trust dWallet: User's secret share is encrypted - only they can decrypt and use it Public dWallet: Secret shares are public on-chain - anyone can access them, requiring trust in the IKA network
Prerequisites
- An active dWallet (created through the normal DKG process)
- Access to the dWallet's decrypted secret share
- IKA and SUI tokens for transaction fees
Step 1: Create a dWallet(if you have one, skip this step)​
First, create a normal dWallet through the standard DKG process (see Creating a dWallet):
const activedWallet = await ikaClient.getdWalletInParticularState(dwalletID, 'Active');
const encryptedUserSecretKeyShare = await ikaClient.getEncryptedUserSecretKeyShare(
encryptedUserSecretKeyShareId,
);
Step 2: Decrypt the Secret Share​
Decrypt your encrypted secret share to get the raw secret data:
const { secretShare } = await userShareEncryptionKeys.decryptUserShare(
activedWallet,
encryptedUserSecretKeyShare,
await ikaClient.getProtocolPublicParameters(activedWallet),
);
Step 3: Make Secret Shares Public​
Make the secret shares publicly accessible on-chain:
import { IkaTransaction } from '@ika.xyz/sdk';
const tx = new Transaction();
const ikaTx = new IkaTransaction({
ikaClient,
transaction: tx,
});
ikaTx.makeDWalletUserSecretKeySharesPublic({
dWallet: activedWallet,
secretShare: secretShare,
ikaCoin: userIkaCoin,
suiCoin: tx.splitCoins(tx.gas, [1000000]),
});
await signAndExecuteTransaction(tx);
Security Considerations​
Important Security Notes
- Irreversible: Once shares are made public, they cannot be made private again
- Trust Required: Public dWallets require trust in the IKA network infrastructure
- Network Risk: If the network is compromised, public dWallets are at risk
- Use Carefully: Only make shares public when shared access is specifically needed
Complete Example​
For complete working examples of the public dWallet process, see the official example:
These examples demonstrate the complete flow from creating a dWallet and making it public.