-
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 {Indexer} = require('subbridge.js') const {Keyring} = require('@polkadot/api') const account = keyring.addFromUri('//Alice') const paraIndexer = new Indexer.ParaIndexer( // Account public key '0x7804e66ec9eea3d8daf6273ffbe0a8af25a8879cf43f14d0ebbb30941f578242', // Name of parachain network 'thala' ) // 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 example folder see more usage. Run examples by executing
yarn build
andnode example/<script name>
.
Head to APIs see all the API list currently supported.