@kairoguard/sdk
v0.0.16
Published
Kairo SDK for multi-chain policy-based transaction signing with dWallet support (EVM, Bitcoin, Solana, Sui)
Maintainers
Readme
@kairoguard/sdk
Kairo SDK for multi-chain policy-based transaction signing with dWallet support.
Features
- Multi-chain intent computation: EVM, Bitcoin, Solana
- Policy-based gating: Mint and validate PolicyReceipts on Sui
- dWallet management: Create and manage dWallets with policy bindings
- Governance: Propose, approve, and execute policy updates
- Audit: Verify custody events and audit bundles
- CLI: Command-line tools for key management and auditing
Install
npm install @kairoguard/sdkQuick Start
Initialize the client
import { KairoClient } from "@kairoguard/sdk";
const client = new KairoClient({
backendUrl: "https://kairo-policy-engine-mmux6.ondigitalocean.app",
apiKey: "your-api-key",
});Create a dWallet
const wallet = await client.createWallet({
chain: "evm",
policyStableId: "my-policy",
});Compute transaction intent (EVM example)
import { computeEvmIntentFromUnsignedTxBytes } from "@kairoguard/sdk";
const { intentHash } = computeEvmIntentFromUnsignedTxBytes({
chainId: 84532, // Base Sepolia
unsignedTxBytesHex: "0x...",
});Compute transaction intent (Solana example)
import { computeSolanaIntentHash } from "@kairoguard/sdk";
const intentHash = computeSolanaIntentHash({
from: senderAddress,
instructions: parsedInstructions,
});Build Sui receipt transaction
import { buildMintEvmReceiptTx } from "@kairoguard/sdk";
const tx = buildMintEvmReceiptTx({
packageId: "0x...",
policyObjectId: "0x...",
evmChainId: 84532,
intentHash,
toEvm: recipientAddress,
});Policy governance
// Propose a policy update
const proposal = await client.proposePolicyUpdate({
governanceId: "0x...",
newPolicyObjectId: "0x...",
description: "Update spend limits",
});
// Approve the proposal
await client.approvePolicyUpdate({
governanceId: "0x...",
proposalId: proposal.proposalId,
});
// Execute after threshold reached
await client.executePolicyUpdate({
governanceId: "0x...",
proposalId: proposal.proposalId,
});CLI Usage
# Audit a bundle
npx @kairoguard/sdk kairo-audit audit <bundle-path>
# List keys
npx @kairoguard/sdk kairo list-keysDocumentation
For detailed documentation and examples, visit www.kairoguard.com/docs.
