Skip to content

Bako-Labs/bako-safe

Repository files navigation

Bako Safe SDK

The Bako Safe SDK manages all the logic of the Bako Safe multisig wallet, including:

  • Blockchain Network Integration: Simplifying interactions with blockchain networks and managing network providers.
  • Authentication and Security: Implementing secure authentication methods and security protocols.
  • Vault Creation and Management: Setting up and configuring secure vaults for crypto assets.
  • Signer Registration and Management: Adding and removing signers, and managing their signatures for transaction authorization.
  • Transaction Management: Initiating, signing, approving, and executing transactions.
  • Utility and Helper Functions: Providing error handling and SDK customization options.

Within the packages folder, you will find the following subdirectories:

  • sway: Contains the predicates and libraries (e.g., webauthn).
  • sdk: Our TypeScript SDK that interacts with Bako.

For for information, check out the Documentation page.

Requirements

Tests

  1. Install Fuel Toolchain
  2. Install dependencies with pnpm: pnpm install
  3. On packages/sway add your .env file as in .env.example
  4. Build packages: pnpm -w build
  5. cd packages/tests
  6. Run the tests: pnpm test
  7. Or run only test file pnpm test:file ${filename}

Run debug mode:

  1. Install Fuel Toolchain
  2. Install dependencies with pnpm: pnpm install
  3. cd packages/tests
  4. Copy predicate to script debbug file pnpm debbug:setup
  5. Add changes and build from script pnpm debbug:build
  6. Run your changed script pnpm debbug:script