SODALABS

Add confidentiality in a few lines.

No cryptography expertise required. The Bubble SDK gives you encrypted balances, confidential transfers, and selective disclosure with the tooling you already know.

Quickstart

Three steps to confidential.

  1. 01

    Install the SDK

    One package, familiar tooling. Works with the wallets, providers, and frameworks you already use.

  2. 02

    Encrypt values client-side

    Amounts and balances are encrypted with AES-256 before they ever leave the client. The network only sees ciphertext.

  3. 03

    Transact confidentially with optional ACL grants

    Send confidential transfers that settle on-chain, and add access-list grants when a counterparty or auditor needs scoped visibility.

1 · Integrate your contract

Solidity: connect a smart contract to the Bubble infrastructure.

import "@sodalabs/bubble-core-contracts/MpcCore.sol";import "@openzeppelin/token/ERC20/IERC20.sol"; contract SimpleShield {    IERC20 public underlying;    mapping(address => gtUint256) private privateBalance;     function shield(uint256 amount) external returns (bool) {        require(underlying.transferFrom(msg.sender,            address(this), amount), "transfer failed");         gtUint256 oldBal = privateBalance[msg.sender];        gtUint256 newBal = MpcCore.add(oldBal,            MpcCore.setPublic256(amount));        privateBalance[msg.sender] = newBal;         MpcCore.permitThis(newBal);        MpcCore.permit(newBal, msg.sender);        return true;    }}
1

Balances are stored as gtUint256, a ciphertext type. There is no plaintext on the chain to leak.

2 · Interact from your app

TypeScript: talk to your contract from the client-side SDK.

import { prepareIT } from 'soda-sdk'; // Encrypt client-side. The network only ever sees ciphertextconst { ctInt, signature } = prepareIT(  1_000_000n,  userAesKey,  senderAddress,  contractAddress,  functionSelector,  signingKey,); // Settles on-chain; disclosure only via the on-chain access list (ACL)await token.transfer(recipient, ctInt, signature);
1

The same client SDK the live wallet runs on: npm install soda-sdk. It works with the signer and keys you already have.

Ship something confidential.

Get SDK access, testnet credentials, and a walkthrough with our engineers.