Bako Safe SDK
Reference
Changelog

Changelog

Recent changes and updates to the Bako Safe SDK.

Latest Updates

SDK Improvements

  • BakoProvider: Unified authentication entry point
  • API Token Support: CLI and server-side authentication
  • Multi-wallet Support: Fuel, EVM, WebAuthn, and SVM signatures

Predicate Versions

v3 - EVM Support

ID: 0x967aaa71b3db34acd8104ed1d7ff3900e67cff3d153a0ffa86d85957f579aa6a
Wallet Origins: fuel, webauthn, evm
Toolchain: Fuels 0.101.1, Forc 0.68.1

Features:

  • EVM signature verification
  • MetaMask and other EVM wallet support
  • Cross-chain signer compatibility

v2 - Updated Multi-sig

ID: 0x6ca3bcd759b944b128e9007e2fa75bf700f28c39ce7b34fc241e2c57bf02bdff
Wallet Origins: fuel, webauthn
Toolchain: Fuels 0.99.0, Forc 0.66.6

Features:

  • Improved signature handling
  • Updated toolchain compatibility

v1 - Initial Multi-sig

ID: 0x0ec304f98efc18964de98c63be50d2360572a155b16bcb0f3718c685c70a00aa
Wallet Origins: fuel, webauthn
Toolchain: Fuels 0.96.1, Forc 0.65.2

Features:

  • Multi-signature vault support
  • WebAuthn/Passkey authentication

Breaking Changes

Authentication API

Before (deprecated):

// Old API - no longer works
const auth = await Auth.create(address, provider, type);
const signed = await auth.signerByPk(privateKey);

After (current):

// Current API
const provider = await BakoProvider.create(url, { apiToken });
// or
const provider = await BakoProvider.setup({ address });
await provider.authenticate(signature);

Vault Creation

Before:

// Old API
const vault = new Vault({
  configurable: { ... },
  BakoSafeAuth: auth
});

After:

// Current API
const vault = Vault.createBakoVault(
  provider,
  { SIGNATURES_COUNT: 2, SIGNERS: [...] },
  version
);

Transaction Methods

Before:

// Old API
const transfer = await vault.BakoSafeIncludeTransaction(params);

After:

// Current API
const { tx, hashTxId } = await vault.transaction(params);

Migration Guide

From v1.x to Current

  1. Replace Auth class with BakoProvider
// Old
const auth = await Auth.create(address, provider, TypeUser.FUEL);
 
// New
const provider = await BakoProvider.setup({ address });
  1. Update vault creation
// Old
const vault = new Vault({ configurable, BakoSafeAuth });
 
// New
const vault = Vault.createBakoVault(provider, configurable);
  1. Update transaction methods
// Old
vault.BakoSafeIncludeTransaction(params);
 
// New
vault.transaction(params);
  1. Use API tokens for CLI
// New feature
const provider = await BakoProvider.create(url, {
  apiToken: process.env.BAKO_API_TOKEN
});

Compatibility

SDK VersionFuel SDKNetwork
Latest0.101.xMainnet, Testnet

Resources