tsunagi v1.1.2
This is the home of tsunagi—the flagship package of the Tsunagi ecosystem. Here we expose bindings and wallet integrations for leveraging the 0x protocol from a browser.
Supported Wallets
Usage
Installation
Via Yarn (recommended):
yarn add tsunagior via NPM:
npm install tsunagiGetting started
Spinning up
- Import and instantiate a wallet of your choice:
import { MetamaskWallet } from 'tsunagi';
const metamaskWallet = new MetamaskWallet({
rpcEndpoints: ['https://...']
});- Start the connection to your wallet instance:
await metamaskWallet.start();- Get accounts:
const accounts = await metamaskWallet.getAccounts();
const myAccount = accounts[0]; // An instance of EthereumAccount -- this is where things get fun!Spinning down
await metamaskWallet.stop();Using accounts
See EthereumAccount for information about available methods.
5 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago