UNPKG

dotbit-sdk-allin

Version:

A complete .bit SDK and utilities in TypeScript

62 lines 1.94 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CrossChainAPI = void 0; const Networking_1 = require("../tools/Networking"); class CrossChainAPI { constructor(baseUri) { this.baseUri = baseUri; this.net = new Networking_1.Networking(baseUri); } lockAccount(params) { return this.net.post('lock/account', { type: 'blockchain', account: params.account, key_info: params.key_info, }); } crossChainAccountStatus(params) { return this.net.post('lock/mint/status', { type: 'blockchain', account: params.account, key_info: params.key_info, }); } mintNftSignInfo(params) { return this.net.post('mint/sign/info', { type: 'blockchain', account: params.account, key_info: params.key_info, }); } returnTrxHashToService(params) { return this.net.post('pending/hash', { type: 'blockchain', account: params.account, key_info: params.key_info, hash: params.txHash, direction: params.direction }); } accountsInCrossChaining(params) { return this.net.post('direction/list', { type: 'blockchain', key_info: params.key_info, page: params.page, size: params.size }); } ethNfts(params) { return this.net.post('did/nft/list', { type: 'blockchain', key_info: params.key_info, keyword: params.keyword, page: params.page, size: params.size }); } sendTransaction(params) { return this.net.post('transaction/send', params); } } exports.CrossChainAPI = CrossChainAPI; //# sourceMappingURL=CrossChainAPI.js.map