-
Install by yarn,
yarn add subbridge.js
-
Or use prebuilt target
dist/subbridge.min.js
in browser, -
Or build from source code,
yarn build
-
Issue crosschain transaction with Transaction
-
Query crosschain transaction history with Indexer
const { ParaIndexer } = require('subbridge.js'); const { Keyring } = require('@polkadot/api'); const account = keyring.addFromUri('//Alice'); const paraIndexer = new ParaIndexer(account.publicKey); // Query all sending history issued from Khala network const history = await paraIndexer.sendingHistory(); // You should then get the history list from our indexing service
Head to APIs see all the API list currently supported.