@locuschain/lib 0.1.31 → 0.1.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accounts/account.d.mts +58 -0
- package/dist/accounts/index.amd.js +306 -0
- package/dist/accounts/index.cjs.cjs +311 -0
- package/dist/accounts/index.d.cts +5 -0
- package/dist/accounts/index.d.mts +5 -0
- package/dist/accounts/index.esm.js +304 -0
- package/dist/accounts/keys/index.d.mts +2 -0
- package/dist/accounts/keys/localKeySource.d.mts +23 -0
- package/dist/accounts/keys/toKeySource.d.mts +14 -0
- package/dist/accounts/keysToAccount.d.mts +19 -0
- package/dist/accounts/mnemonicToAccount.d.mts +25 -0
- package/dist/accounts/signing/txKeyPolicy.d.mts +21 -0
- package/dist/accounts/types.d.mts +100 -0
- package/dist/actions/wallet/_deriveTxAdditions.d.mts +18 -0
- package/dist/actions/wallet/_prepareTransaction.d.mts +15 -0
- package/dist/actions/wallet/_sendPreparedTransaction.d.mts +9 -0
- package/dist/actions/wallet/_signLocusTransaction.d.mts +14 -0
- package/dist/actions/wallet/index.d.mts +5 -0
- package/dist/actions/wallet/types.d.mts +38 -0
- package/dist/autogen/actions/debug/index.d.mts +2 -0
- package/dist/autogen/actions/debug/public/allHeights.d.mts +3 -0
- package/dist/autogen/actions/debug/public/balanceGrantList.d.mts +2 -0
- package/dist/autogen/actions/debug/public/balanceList.d.mts +2 -0
- package/dist/autogen/actions/debug/public/createAccount.d.mts +3 -0
- package/dist/autogen/actions/debug/public/createNode.d.mts +4 -0
- package/dist/autogen/actions/debug/public/dumpAllAccounts.d.mts +3 -0
- package/dist/autogen/actions/debug/public/echo.d.mts +2 -0
- package/dist/autogen/actions/debug/public/gameChainCmd.d.mts +4 -0
- package/dist/autogen/actions/debug/public/getAccountsBalances.d.mts +4 -0
- package/dist/autogen/actions/debug/public/getAccountsHeights.d.mts +4 -0
- package/dist/autogen/actions/debug/public/getContractLog.d.mts +4 -0
- package/dist/autogen/actions/debug/public/getGuestsInfo.d.mts +3 -0
- package/dist/autogen/actions/debug/public/getHomeShard.d.mts +4 -0
- package/dist/autogen/actions/debug/public/getImportAccount.d.mts +4 -0
- package/dist/autogen/actions/debug/public/getImportAccountLog.d.mts +4 -0
- package/dist/autogen/actions/debug/public/getKeys.d.mts +4 -0
- package/dist/autogen/actions/debug/public/getNodeBlocks.d.mts +3 -0
- package/dist/autogen/actions/debug/public/getPeerPool.d.mts +2 -0
- package/dist/autogen/actions/debug/public/getPeersInfo.d.mts +3 -0
- package/dist/autogen/actions/debug/public/importAccount.d.mts +4 -0
- package/dist/autogen/actions/debug/public/index.d.mts +29 -0
- package/dist/autogen/actions/debug/public/initReliableNodes.d.mts +4 -0
- package/dist/autogen/actions/debug/public/noArgsRets.d.mts +2 -0
- package/dist/autogen/actions/debug/public/nodeCmd.d.mts +3 -0
- package/dist/autogen/actions/debug/public/removeHoldTxs.d.mts +4 -0
- package/dist/autogen/actions/debug/public/requestVme.d.mts +4 -0
- package/dist/autogen/actions/debug/public/sendRawTransaction.d.mts +4 -0
- package/dist/autogen/actions/debug/public/setImportAccountTx.d.mts +4 -0
- package/dist/autogen/actions/debug/public/setReliableNode.d.mts +4 -0
- package/dist/autogen/actions/debug/public/viewContract.d.mts +4 -0
- package/dist/autogen/actions/debug/wallet/callContract.d.mts +4 -0
- package/dist/autogen/actions/debug/wallet/createContract.d.mts +4 -0
- package/dist/autogen/actions/debug/wallet/createSynthAccount.d.mts +4 -0
- package/dist/autogen/actions/debug/wallet/index.d.mts +4 -0
- package/dist/autogen/actions/debug/wallet/postDataToSynthAccount.d.mts +4 -0
- package/dist/autogen/actions/index.d.mts +3 -0
- package/dist/autogen/actions/public/accountHeightsToDownload.d.mts +4 -0
- package/dist/autogen/actions/public/accountHeightsToUpload.d.mts +4 -0
- package/dist/autogen/actions/public/calculateSpentByExpress.d.mts +4 -0
- package/dist/autogen/actions/public/clientMessage.d.mts +3 -0
- package/dist/autogen/actions/public/downloadAccountTxs.d.mts +4 -0
- package/dist/autogen/actions/public/echo.d.mts +2 -0
- package/dist/autogen/actions/public/findDuplicateSubscriber.d.mts +4 -0
- package/dist/autogen/actions/public/generateLatestStoredDataProof.d.mts +4 -0
- package/dist/autogen/actions/public/getAccountAssetList.d.mts +4 -0
- package/dist/autogen/actions/public/getAccountAssetObject.d.mts +4 -0
- package/dist/autogen/actions/public/getAccountDetail.d.mts +4 -0
- package/dist/autogen/actions/public/getAccountHistory.d.mts +4 -0
- package/dist/autogen/actions/public/getAccountTokenList.d.mts +4 -0
- package/dist/autogen/actions/public/getConciseNodeStatus.d.mts +3 -0
- package/dist/autogen/actions/public/getGenesisAccount.d.mts +3 -0
- package/dist/autogen/actions/public/getIdentityProof.d.mts +4 -0
- package/dist/autogen/actions/public/getInactiveTxList.d.mts +4 -0
- package/dist/autogen/actions/public/getMontInfoList.d.mts +4 -0
- package/dist/autogen/actions/public/getNodeStatus.d.mts +3 -0
- package/dist/autogen/actions/public/getOwnerBalance.d.mts +3 -0
- package/dist/autogen/actions/public/getRoundState.d.mts +4 -0
- package/dist/autogen/actions/public/getRoundStatesList.d.mts +4 -0
- package/dist/autogen/actions/public/getShardOfAccount.d.mts +4 -0
- package/dist/autogen/actions/public/getSyncState.d.mts +3 -0
- package/dist/autogen/actions/public/getTx.d.mts +4 -0
- package/dist/autogen/actions/public/getWorldRoundState.d.mts +4 -0
- package/dist/autogen/actions/public/getWorldRoundStatesList.d.mts +4 -0
- package/dist/autogen/actions/public/hasSystemToken.d.mts +4 -0
- package/dist/autogen/actions/public/index.d.mts +38 -0
- package/dist/autogen/actions/public/makeTxProof.d.mts +4 -0
- package/dist/autogen/actions/public/queryAddress.d.mts +4 -0
- package/dist/autogen/actions/public/readTxListWitness.d.mts +4 -0
- package/dist/autogen/actions/public/setHost.d.mts +3 -0
- package/dist/autogen/actions/public/subscribeAddress.d.mts +4 -0
- package/dist/autogen/actions/public/uploadAccountTxs.d.mts +3 -0
- package/dist/autogen/actions/public/verifyAndSignChallenge.d.mts +4 -0
- package/dist/autogen/actions/public/verifyIdentityProof.d.mts +4 -0
- package/dist/autogen/actions/public/verifyLatestStoredDataProof.d.mts +3 -0
- package/dist/autogen/actions/public/verifyTxListWitness.d.mts +3 -0
- package/dist/autogen/actions/wallet/acceptScript.d.mts +4 -0
- package/dist/autogen/actions/wallet/becomeGuest.d.mts +4 -0
- package/dist/autogen/actions/wallet/becomeHost.d.mts +4 -0
- package/dist/autogen/actions/wallet/changeKey.d.mts +4 -0
- package/dist/autogen/actions/wallet/changeVkey.d.mts +4 -0
- package/dist/autogen/actions/wallet/closeAccount.d.mts +4 -0
- package/dist/autogen/actions/wallet/createAssetObject.d.mts +4 -0
- package/dist/autogen/actions/wallet/createToken.d.mts +4 -0
- package/dist/autogen/actions/wallet/createVme.d.mts +4 -0
- package/dist/autogen/actions/wallet/index.d.mts +19 -0
- package/dist/autogen/actions/wallet/lockStake.d.mts +4 -0
- package/dist/autogen/actions/wallet/openAccount.d.mts +4 -0
- package/dist/autogen/actions/wallet/postData.d.mts +4 -0
- package/dist/autogen/actions/wallet/provideScript.d.mts +4 -0
- package/dist/autogen/actions/wallet/requestDataTrade.d.mts +4 -0
- package/dist/autogen/actions/wallet/transferAssetObject.d.mts +4 -0
- package/dist/autogen/actions/wallet/transferCoin.d.mts +4 -0
- package/dist/autogen/actions/wallet/transferCoinExpress.d.mts +4 -0
- package/dist/autogen/actions/wallet/transferToken.d.mts +4 -0
- package/dist/autogen/actions/wallet/unlockStake.d.mts +4 -0
- package/dist/autogen/debugPublicActions.d.mts +47 -0
- package/dist/autogen/debugWalletActions.d.mts +11 -0
- package/dist/autogen/index.amd.js +151 -0
- package/dist/autogen/index.cjs.cjs +157 -0
- package/dist/autogen/index.d.cts +8 -0
- package/dist/autogen/index.d.mts +8 -0
- package/dist/autogen/index.esm.js +49 -0
- package/dist/autogen/locus-tx.d.mts +5 -0
- package/dist/autogen/publicActions.d.mts +66 -0
- package/dist/autogen/rpc-api-spec.d.mts +208 -0
- package/dist/autogen/types/common/addr-tx-proof.d.mts +5 -0
- package/dist/autogen/types/common/asset-object-transfer.d.mts +8 -0
- package/dist/autogen/types/common/asset-object.d.mts +10 -0
- package/dist/autogen/types/common/asset-proof-objects.d.mts +5 -0
- package/dist/autogen/types/common/asset-transfer-info.d.mts +9 -0
- package/dist/autogen/types/common/base-meta.d.mts +1 -0
- package/dist/autogen/types/common/contract-exec-status.d.mts +16 -0
- package/dist/autogen/types/common/contract-transfer-info.d.mts +7 -0
- package/dist/autogen/types/common/get-peers-info.d.mts +9 -0
- package/dist/autogen/types/common/index-value-pair.d.mts +4 -0
- package/dist/autogen/types/common/index.d.mts +54 -0
- package/dist/autogen/types/common/input-params-data-transfer.d.mts +8 -0
- package/dist/autogen/types/common/key-bind-info.d.mts +4 -0
- package/dist/autogen/types/common/mont-info.d.mts +4 -0
- package/dist/autogen/types/common/object-amount-transfer.d.mts +5 -0
- package/dist/autogen/types/common/object-amount.d.mts +4 -0
- package/dist/autogen/types/common/output-download-account-txs.d.mts +4 -0
- package/dist/autogen/types/common/param-str.d.mts +3 -0
- package/dist/autogen/types/common/param-tx-data.d.mts +5 -0
- package/dist/autogen/types/common/params-token-value-pair.d.mts +4 -0
- package/dist/autogen/types/common/public-height-chunk.d.mts +4 -0
- package/dist/autogen/types/common/ref-tx-info.d.mts +5 -0
- package/dist/autogen/types/common/ref-vtx.d.mts +6 -0
- package/dist/autogen/types/common/ret-type-base.d.mts +1 -0
- package/dist/autogen/types/common/round-state-abstract.d.mts +11 -0
- package/dist/autogen/types/common/round-state-detail.d.mts +16 -0
- package/dist/autogen/types/common/rpc-account-height.d.mts +5 -0
- package/dist/autogen/types/common/rpc-accounts-balances-result.d.mts +4 -0
- package/dist/autogen/types/common/rpc-asset-list-values.d.mts +7 -0
- package/dist/autogen/types/common/rpc-data-trade-result.d.mts +5 -0
- package/dist/autogen/types/common/rpc-token-balance-pair.d.mts +4 -0
- package/dist/autogen/types/common/token-value-ab.d.mts +5 -0
- package/dist/autogen/types/common/token-value-pair.d.mts +4 -0
- package/dist/autogen/types/common/transaction-sender-index.d.mts +7 -0
- package/dist/autogen/types/common/transfer-info.d.mts +7 -0
- package/dist/autogen/types/common/tx-base.d.mts +13 -0
- package/dist/autogen/types/common/tx-hash-elements.d.mts +6 -0
- package/dist/autogen/types/common/tx-key-height-hash.d.mts +4 -0
- package/dist/autogen/types/common/tx-key-nround.d.mts +5 -0
- package/dist/autogen/types/common/tx-key.d.mts +4 -0
- package/dist/autogen/types/common/tx-meta.d.mts +2 -0
- package/dist/autogen/types/common/tx-no-signature.d.mts +1 -0
- package/dist/autogen/types/common/tx-recv-set-meta.d.mts +2 -0
- package/dist/autogen/types/common/tx-sign-key.d.mts +1 -0
- package/dist/autogen/types/common/tx-signature.d.mts +3 -0
- package/dist/autogen/types/common/tx-vsignature.d.mts +3 -0
- package/dist/autogen/types/common/vm-engine-block.d.mts +11 -0
- package/dist/autogen/types/common/vm-reward.d.mts +4 -0
- package/dist/autogen/types/common/vm-tx-state.d.mts +27 -0
- package/dist/autogen/types/common/vme-block-meta.d.mts +2 -0
- package/dist/autogen/types/common/vme-info.d.mts +3 -0
- package/dist/autogen/types/common/vme-lock-stake.d.mts +4 -0
- package/dist/autogen/types/common/vote-info-rpc.d.mts +5 -0
- package/dist/autogen/types/common/vtx-meta.d.mts +2 -0
- package/dist/autogen/types/common/wrs-validators-info.d.mts +5 -0
- package/dist/autogen/types/consts/address-class.d.mts +11 -0
- package/dist/autogen/types/consts/consts.d.mts +2 -0
- package/dist/autogen/types/consts/currency-unit.d.mts +15 -0
- package/dist/autogen/types/consts/index.d.mts +3 -0
- package/dist/autogen/types/consts/tx-type.d.mts +61 -0
- package/dist/autogen/types/consts/tx-types.d.mts +415 -0
- package/dist/autogen/types/rpc/heights-result.d.mts +4 -0
- package/dist/autogen/types/rpc/index.d.mts +106 -0
- package/dist/autogen/types/rpc/params-accept-script.d.mts +8 -0
- package/dist/autogen/types/rpc/params-account-and-index.d.mts +4 -0
- package/dist/autogen/types/rpc/params-account-heights.d.mts +5 -0
- package/dist/autogen/types/rpc/params-account-history.d.mts +5 -0
- package/dist/autogen/types/rpc/params-account.d.mts +3 -0
- package/dist/autogen/types/rpc/params-accounts.d.mts +3 -0
- package/dist/autogen/types/rpc/params-become-guest.d.mts +5 -0
- package/dist/autogen/types/rpc/params-become-host.d.mts +5 -0
- package/dist/autogen/types/rpc/params-calculate-spent-by-express.d.mts +5 -0
- package/dist/autogen/types/rpc/params-call-contract.d.mts +13 -0
- package/dist/autogen/types/rpc/params-change-key.d.mts +8 -0
- package/dist/autogen/types/rpc/params-change-vkey.d.mts +5 -0
- package/dist/autogen/types/rpc/params-close-account.d.mts +7 -0
- package/dist/autogen/types/rpc/params-contract-log.d.mts +6 -0
- package/dist/autogen/types/rpc/params-create-asset-object.d.mts +10 -0
- package/dist/autogen/types/rpc/params-create-contract.d.mts +14 -0
- package/dist/autogen/types/rpc/params-create-node.d.mts +4 -0
- package/dist/autogen/types/rpc/params-create-synth-account.d.mts +8 -0
- package/dist/autogen/types/rpc/params-create-token.d.mts +7 -0
- package/dist/autogen/types/rpc/params-create-vme.d.mts +8 -0
- package/dist/autogen/types/rpc/params-download-account-txs.d.mts +6 -0
- package/dist/autogen/types/rpc/params-find-duplicate-subscriber.d.mts +3 -0
- package/dist/autogen/types/rpc/params-game-chain-cmd.d.mts +5 -0
- package/dist/autogen/types/rpc/params-generate-latest-stored-data-proof.d.mts +4 -0
- package/dist/autogen/types/rpc/params-get-asset-list.d.mts +4 -0
- package/dist/autogen/types/rpc/params-get-asset-objects.d.mts +4 -0
- package/dist/autogen/types/rpc/params-get-home-shard.d.mts +3 -0
- package/dist/autogen/types/rpc/params-get-identity-proof.d.mts +4 -0
- package/dist/autogen/types/rpc/params-get-import-account.d.mts +3 -0
- package/dist/autogen/types/rpc/params-import-account.d.mts +7 -0
- package/dist/autogen/types/rpc/params-init-reliable-nodes.d.mts +5 -0
- package/dist/autogen/types/rpc/params-latest-stored-data-proof.d.mts +4 -0
- package/dist/autogen/types/rpc/params-lock-stake.d.mts +7 -0
- package/dist/autogen/types/rpc/params-open-account.d.mts +11 -0
- package/dist/autogen/types/rpc/params-post-data-to-synth-account.d.mts +11 -0
- package/dist/autogen/types/rpc/params-provide-script.d.mts +14 -0
- package/dist/autogen/types/rpc/params-query-address.d.mts +3 -0
- package/dist/autogen/types/rpc/params-read-tx-list.d.mts +5 -0
- package/dist/autogen/types/rpc/params-remove-hold-txs.d.mts +5 -0
- package/dist/autogen/types/rpc/params-request-data-trade.d.mts +10 -0
- package/dist/autogen/types/rpc/params-request-vme.d.mts +4 -0
- package/dist/autogen/types/rpc/params-round-list.d.mts +4 -0
- package/dist/autogen/types/rpc/params-round.d.mts +3 -0
- package/dist/autogen/types/rpc/params-rs.d.mts +4 -0
- package/dist/autogen/types/rpc/params-send-raw-transaction.d.mts +4 -0
- package/dist/autogen/types/rpc/params-set-host.d.mts +4 -0
- package/dist/autogen/types/rpc/params-set-import-account-tx.d.mts +5 -0
- package/dist/autogen/types/rpc/params-set-reliable-node.d.mts +4 -0
- package/dist/autogen/types/rpc/params-subscribe-address.d.mts +4 -0
- package/dist/autogen/types/rpc/params-transfer-asset-object.d.mts +9 -0
- package/dist/autogen/types/rpc/params-transfer-coin-express.d.mts +7 -0
- package/dist/autogen/types/rpc/params-transfer-coin.d.mts +8 -0
- package/dist/autogen/types/rpc/params-transfer-tokens.d.mts +14 -0
- package/dist/autogen/types/rpc/params-tx-list-witness.d.mts +6 -0
- package/dist/autogen/types/rpc/params-tx-list.d.mts +5 -0
- package/dist/autogen/types/rpc/params-unlock-stake.d.mts +7 -0
- package/dist/autogen/types/rpc/params-upload-account-txs.d.mts +5 -0
- package/dist/autogen/types/rpc/params-verify-and-sign-challenge.d.mts +8 -0
- package/dist/autogen/types/rpc/params-verify-identity-proof.d.mts +6 -0
- package/dist/autogen/types/rpc/result-dump-accounts.d.mts +4 -0
- package/dist/autogen/types/rpc/rpc-bool-result.d.mts +3 -0
- package/dist/autogen/types/rpc/rpc-calculate-spent-by-express-result.d.mts +3 -0
- package/dist/autogen/types/rpc/rpc-create-account-result.d.mts +7 -0
- package/dist/autogen/types/rpc/rpc-create-node-result.d.mts +5 -0
- package/dist/autogen/types/rpc/rpc-create-tx-result.d.mts +7 -0
- package/dist/autogen/types/rpc/rpc-find-duplicate-subscriber-result.d.mts +3 -0
- package/dist/autogen/types/rpc/rpc-game-chain-cmd-result.d.mts +3 -0
- package/dist/autogen/types/rpc/rpc-generate-latest-stored-data-proof-result.d.mts +4 -0
- package/dist/autogen/types/rpc/rpc-get-account-asset-list-result.d.mts +4 -0
- package/dist/autogen/types/rpc/rpc-get-account-asset-object-result.d.mts +5 -0
- package/dist/autogen/types/rpc/rpc-get-account-detail-result.d.mts +10 -0
- package/dist/autogen/types/rpc/rpc-get-account-history-result.d.mts +3 -0
- package/dist/autogen/types/rpc/rpc-get-account-token-list-result.d.mts +6 -0
- package/dist/autogen/types/rpc/rpc-get-accounts-balances-result.d.mts +3 -0
- package/dist/autogen/types/rpc/rpc-get-accounts-heights-result.d.mts +3 -0
- package/dist/autogen/types/rpc/rpc-get-concise-node-status-result.d.mts +18 -0
- package/dist/autogen/types/rpc/rpc-get-contract-log-result.d.mts +3 -0
- package/dist/autogen/types/rpc/rpc-get-genesis-account-result.d.mts +3 -0
- package/dist/autogen/types/rpc/rpc-get-guests-info-result.d.mts +3 -0
- package/dist/autogen/types/rpc/rpc-get-home-shard-result.d.mts +3 -0
- package/dist/autogen/types/rpc/rpc-get-identity-proof-result.d.mts +6 -0
- package/dist/autogen/types/rpc/rpc-get-import-account-result.d.mts +10 -0
- package/dist/autogen/types/rpc/rpc-get-inactive-tx-list-result.d.mts +14 -0
- package/dist/autogen/types/rpc/rpc-get-keys-result.d.mts +7 -0
- package/dist/autogen/types/rpc/rpc-get-mont-info-list-result.d.mts +5 -0
- package/dist/autogen/types/rpc/rpc-get-node-blocks-result.d.mts +3 -0
- package/dist/autogen/types/rpc/rpc-get-node-status-result.d.mts +28 -0
- package/dist/autogen/types/rpc/rpc-get-shard-of-account-result.d.mts +4 -0
- package/dist/autogen/types/rpc/rpc-get-sync-state-result.d.mts +3 -0
- package/dist/autogen/types/rpc/rpc-get-tx-result.d.mts +3 -0
- package/dist/autogen/types/rpc/rpc-get-world-round-state-result.d.mts +13 -0
- package/dist/autogen/types/rpc/rpc-get-world-round-states-list-result.d.mts +3 -0
- package/dist/autogen/types/rpc/rpc-has-system-token-result.d.mts +4 -0
- package/dist/autogen/types/rpc/rpc-import-account-result.d.mts +3 -0
- package/dist/autogen/types/rpc/rpc-node-cmd-result.d.mts +5 -0
- package/dist/autogen/types/rpc/rpc-query-address-result.d.mts +3 -0
- package/dist/autogen/types/rpc/rpc-read-tx-list-witness-result.d.mts +6 -0
- package/dist/autogen/types/rpc/rpc-request-vme-result.d.mts +3 -0
- package/dist/autogen/types/rpc/rpc-send-raw-transaction-result.d.mts +1 -0
- package/dist/autogen/types/rpc/rpc-set-import-account-tx-result.d.mts +5 -0
- package/dist/autogen/types/rpc/rpc-subscribe-address-result.d.mts +1 -0
- package/dist/autogen/types/rpc/rpc-verify-and-sign-challenge-result.d.mts +8 -0
- package/dist/autogen/types/rpc/rpc-verify-identity-proof-result.d.mts +4 -0
- package/dist/autogen/types/rpc/rpc-view-contract-result.d.mts +3 -0
- package/dist/autogen/types/rpc/upload-heights-result.d.mts +6 -0
- package/dist/autogen/types/tx/index.d.mts +50 -0
- package/dist/autogen/types/tx/tx-accept-script-after-time-lock.d.mts +12 -0
- package/dist/autogen/types/tx/tx-accept-script.d.mts +15 -0
- package/dist/autogen/types/tx/tx-activate-all-assets.d.mts +15 -0
- package/dist/autogen/types/tx/tx-activate-asset-object.d.mts +9 -0
- package/dist/autogen/types/tx/tx-activate-call-contract.d.mts +15 -0
- package/dist/autogen/types/tx/tx-activate-coin.d.mts +9 -0
- package/dist/autogen/types/tx/tx-activate-contract-result.d.mts +18 -0
- package/dist/autogen/types/tx/tx-activate-contract-reward.d.mts +8 -0
- package/dist/autogen/types/tx/tx-activate-contract-transfer.d.mts +15 -0
- package/dist/autogen/types/tx/tx-activate-data-synth-account.d.mts +12 -0
- package/dist/autogen/types/tx/tx-activate-foundation-reserve.d.mts +7 -0
- package/dist/autogen/types/tx/tx-activate-incentive.d.mts +11 -0
- package/dist/autogen/types/tx/tx-activate-lock-stake-for-vme.d.mts +9 -0
- package/dist/autogen/types/tx/tx-activate-open-contract.d.mts +15 -0
- package/dist/autogen/types/tx/tx-activate-open-synth-account.d.mts +9 -0
- package/dist/autogen/types/tx/tx-activate-open-vm-engine.d.mts +11 -0
- package/dist/autogen/types/tx/tx-activate-token.d.mts +12 -0
- package/dist/autogen/types/tx/tx-become-guest.d.mts +10 -0
- package/dist/autogen/types/tx/tx-become-host.d.mts +7 -0
- package/dist/autogen/types/tx/tx-burn-asset-object.d.mts +8 -0
- package/dist/autogen/types/tx/tx-burn-token.d.mts +10 -0
- package/dist/autogen/types/tx/tx-call-contract.d.mts +16 -0
- package/dist/autogen/types/tx/tx-change-foundation-account.d.mts +6 -0
- package/dist/autogen/types/tx/tx-change-keypair.d.mts +10 -0
- package/dist/autogen/types/tx/tx-change-vkey.d.mts +6 -0
- package/dist/autogen/types/tx/tx-close-account.d.mts +12 -0
- package/dist/autogen/types/tx/tx-contract-blank-reward.d.mts +5 -0
- package/dist/autogen/types/tx/tx-contract-transfer-reward.d.mts +8 -0
- package/dist/autogen/types/tx/tx-create-asset-object.d.mts +10 -0
- package/dist/autogen/types/tx/tx-create-contract.d.mts +17 -0
- package/dist/autogen/types/tx/tx-create-synth-account.d.mts +7 -0
- package/dist/autogen/types/tx/tx-create-token.d.mts +10 -0
- package/dist/autogen/types/tx/tx-create-vm-engine.d.mts +8 -0
- package/dist/autogen/types/tx/tx-dummy.d.mts +3 -0
- package/dist/autogen/types/tx/tx-finalize.d.mts +6 -0
- package/dist/autogen/types/tx/tx-freeze-account.d.mts +5 -0
- package/dist/autogen/types/tx/tx-genesis-account.d.mts +11 -0
- package/dist/autogen/types/tx/tx-lead-vtx.d.mts +9 -0
- package/dist/autogen/types/tx/tx-lock-stake-for-vme.d.mts +7 -0
- package/dist/autogen/types/tx/tx-open-account.d.mts +18 -0
- package/dist/autogen/types/tx/tx-post-data-synth-account.d.mts +9 -0
- package/dist/autogen/types/tx/tx-post-data.d.mts +11 -0
- package/dist/autogen/types/tx/tx-provide-script.d.mts +16 -0
- package/dist/autogen/types/tx/tx-revoke.d.mts +16 -0
- package/dist/autogen/types/tx/tx-transfer-asset-object.d.mts +8 -0
- package/dist/autogen/types/tx/tx-transfer-coin-express.d.mts +8 -0
- package/dist/autogen/types/tx/tx-transfer-coin.d.mts +7 -0
- package/dist/autogen/types/tx/tx-transfer-token.d.mts +11 -0
- package/dist/autogen/types/tx/tx-unlock-stake.d.mts +7 -0
- package/dist/autogen/types/tx/tx-vm-engine-block.d.mts +6 -0
- package/dist/autogen/types/wasm/grant-consume-result.d.mts +4 -0
- package/dist/autogen/types/wasm/index.d.mts +26 -0
- package/dist/autogen/types/wasm/library-versions.d.mts +6 -0
- package/dist/autogen/types/wasm/param-calculate-tx-link-hash.d.mts +3 -0
- package/dist/autogen/types/wasm/param-code-core-script.d.mts +3 -0
- package/dist/autogen/types/wasm/param-convert-currency.d.mts +5 -0
- package/dist/autogen/types/wasm/param-create-account-and-keystore.d.mts +6 -0
- package/dist/autogen/types/wasm/param-create-master-keystore.d.mts +6 -0
- package/dist/autogen/types/wasm/param-create-normal-key.d.mts +4 -0
- package/dist/autogen/types/wasm/param-create-normal-keystore.d.mts +8 -0
- package/dist/autogen/types/wasm/param-derive-keys-from-mnemonic-and-path.d.mts +4 -0
- package/dist/autogen/types/wasm/param-derive-keys-from-mnemonic.d.mts +6 -0
- package/dist/autogen/types/wasm/param-encode-tx-currency.d.mts +3 -0
- package/dist/autogen/types/wasm/param-encode-tx-number.d.mts +4 -0
- package/dist/autogen/types/wasm/param-generate-mnemonic-by-seed.d.mts +3 -0
- package/dist/autogen/types/wasm/param-generate-mnemonic.d.mts +3 -0
- package/dist/autogen/types/wasm/param-get-home-shard.d.mts +4 -0
- package/dist/autogen/types/wasm/param-hash.d.mts +4 -0
- package/dist/autogen/types/wasm/param-load-keystore.d.mts +4 -0
- package/dist/autogen/types/wasm/param-make-currency.d.mts +4 -0
- package/dist/autogen/types/wasm/param-sign-by-master-key.d.mts +4 -0
- package/dist/autogen/types/wasm/param-sign-key-bind.d.mts +5 -0
- package/dist/autogen/types/wasm/param-sign.d.mts +4 -0
- package/dist/autogen/types/wasm/param-test-core-script.d.mts +7 -0
- package/dist/autogen/types/wasm/param-txs.d.mts +3 -0
- package/dist/autogen/types/wasm/param-verify-merkle-proof.d.mts +5 -0
- package/dist/autogen/types/wasm/param-verify.d.mts +5 -0
- package/dist/autogen/walletActions.d.mts +41 -0
- package/dist/autogen/wasm/crypto_aimer.d.mts +2 -0
- package/dist/autogen/wasm/crypto_haetae.d.mts +2 -0
- package/dist/autogen/wasm/crypto_smaugt.d.mts +2 -0
- package/dist/autogen/wasm/lclib.wasm +0 -0
- package/dist/autogen/wasm.d.mts +72 -0
- package/dist/chunks/account-BAsiKnSL.cjs +77 -0
- package/dist/chunks/account-BSrvZ7S8.js +77 -0
- package/dist/chunks/account-FZT9LH_s.js +71 -0
- package/dist/chunks/address-class-CHAZYhdZ.js +14 -0
- package/dist/chunks/address-class-Cjy48Uqk.cjs +16 -0
- package/dist/chunks/address-class-Dp7aNQb2.js +18 -0
- package/dist/chunks/base-BQXfRsuw.js +23 -0
- package/dist/chunks/base-B_kRRfsf.js +27 -0
- package/dist/chunks/base-Cy5SSYLF.cjs +25 -0
- package/dist/chunks/debugWalletActions-6qjkZVq9.cjs +995 -0
- package/dist/chunks/debugWalletActions-BDz-h2tl.js +993 -0
- package/dist/chunks/debugWalletActions-D5-Ds7Hl.js +900 -0
- package/dist/chunks/keystore-BFVSylSw.js +139 -0
- package/dist/chunks/keystore-BbK5pVrh.cjs +145 -0
- package/dist/chunks/keystore-BexHKV9z.js +143 -0
- package/dist/chunks/lclib-BfTIyj-E.js +3838 -0
- package/dist/chunks/lclib-C2eG5HzD.js +3818 -0
- package/dist/chunks/lclib-DuoOR0-Q.cjs +3822 -0
- package/dist/chunks/rpc-BlPk44QH.js +22 -0
- package/dist/chunks/rpc-C4n7t9y0.js +25 -0
- package/dist/chunks/rpc-DwWIkUva.cjs +25 -0
- package/dist/chunks/transport-BBAz1kmP.js +30 -0
- package/dist/chunks/transport-VThNtzck.cjs +30 -0
- package/dist/chunks/transport-ktAPuqsc.js +26 -0
- package/dist/chunks/tslib.es6-Cfi3-HmA.cjs +35 -0
- package/dist/chunks/tslib.es6-D29rxPkW.js +37 -0
- package/dist/chunks/tslib.es6-WQS2tr1v.js +33 -0
- package/dist/chunks/tx-type-BPkhMGad.js +64 -0
- package/dist/chunks/tx-type-CS4wIUJ8.js +68 -0
- package/dist/chunks/tx-type-DI_nKG8B.cjs +66 -0
- package/dist/chunks/wasm-3Ghi_Hxd.js +213 -0
- package/dist/chunks/wasm-BtPcXTR4.js +166 -0
- package/dist/chunks/wasm-DTyHBxcY.cjs +213 -0
- package/dist/clients/createClient.d.mts +8 -0
- package/dist/clients/createLocusPublicClient.d.mts +100 -0
- package/dist/clients/createLocusWalletClient.d.mts +56 -0
- package/dist/clients/createPublicClient.d.mts +6 -0
- package/dist/clients/createWalletClient.d.mts +8 -0
- package/dist/clients/index.amd.js +97 -0
- package/dist/clients/index.cjs.cjs +104 -0
- package/dist/clients/index.d.cts +6 -0
- package/dist/clients/index.d.mts +6 -0
- package/dist/clients/index.esm.js +98 -0
- package/dist/clients/types.d.mts +19 -0
- package/dist/constant/index.amd.js +458 -0
- package/dist/constant/index.cjs.cjs +459 -0
- package/dist/constant/index.d.cts +513 -0
- package/dist/constant/index.d.mts +513 -0
- package/dist/constant/index.esm.js +451 -0
- package/dist/contracts/abis/erc20.d.mts +174 -0
- package/dist/contracts/abis/index.d.mts +1 -0
- package/dist/contracts/getContract.d.mts +33 -0
- package/dist/contracts/index.amd.js +19640 -0
- package/dist/contracts/index.cjs.cjs +19642 -0
- package/dist/contracts/index.d.cts +2 -0
- package/dist/contracts/index.d.mts +2 -0
- package/dist/contracts/index.esm.js +19639 -0
- package/dist/errors/account.d.mts +45 -0
- package/dist/errors/base.d.mts +13 -0
- package/dist/errors/index.amd.js +17 -0
- package/dist/errors/index.cjs.cjs +20 -0
- package/dist/errors/index.d.cts +4 -0
- package/dist/errors/index.d.mts +4 -0
- package/dist/errors/index.esm.js +4 -0
- package/dist/errors/rpc.d.mts +21 -0
- package/dist/errors/transport.d.mts +21 -0
- package/dist/index.amd.js +43 -0
- package/dist/index.cjs.cjs +58 -0
- package/dist/index.d.mts +8 -0
- package/dist/index.esm.js +16 -0
- package/dist/transports/http.d.mts +9 -0
- package/dist/transports/index.amd.js +98 -0
- package/dist/transports/index.cjs.cjs +101 -0
- package/dist/transports/index.d.cts +2 -0
- package/dist/transports/index.d.mts +2 -0
- package/dist/transports/index.esm.js +99 -0
- package/dist/transports/types.d.mts +36 -0
- package/dist/types/index.d.cts +11 -0
- package/dist/types/index.d.mts +11 -0
- package/dist/types/primitives.d.mts +5 -0
- package/dist/utils/index.amd.js +323 -0
- package/dist/utils/index.cjs.cjs +330 -0
- package/dist/utils/index.d.cts +41 -0
- package/dist/utils/index.d.mts +41 -0
- package/dist/utils/index.esm.js +271 -0
- package/dist/utils/keystore.d.mts +87 -0
- package/dist/utils/lclib.d.mts +2 -0
- package/dist/utils/locus-wasm-bridge.d.mts +1 -0
- package/dist/utils/tx-validator.d.mts +26 -0
- package/dist/utils/types.d.mts +15 -0
- package/dist/utils/wasm-fetch.d.mts +6 -0
- package/package.json +1 -1
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
define(['exports', './lclib-BfTIyj-E'], (function (exports, lclib) { 'use strict';
|
|
2
|
+
|
|
3
|
+
// Automatically generated file. DO NOT EDIT.
|
|
4
|
+
const callWasm = (cmd, params) => {
|
|
5
|
+
// @ts-ignore
|
|
6
|
+
let callLclib = globalThis["CallLclib"];
|
|
7
|
+
// @ts-ignore
|
|
8
|
+
if (lclib.namespace && globalThis[lclib.namespace]) {
|
|
9
|
+
// @ts-ignore
|
|
10
|
+
callLclib = globalThis[lclib.namespace]["CallLclib"];
|
|
11
|
+
}
|
|
12
|
+
// @ts-ignore
|
|
13
|
+
if (typeof callLclib !== "function")
|
|
14
|
+
throw new Error("Wasm module is not loaded. Please call loadWasm or loadWasmSync first.");
|
|
15
|
+
// @ts-ignore
|
|
16
|
+
const resultString = callLclib(cmd, JSON.stringify(params));
|
|
17
|
+
const result = JSON.parse(resultString);
|
|
18
|
+
if (result.error && result.error.code != 0) {
|
|
19
|
+
const error = Object.assign(Object.assign({}, result.error), { message: result.error.message });
|
|
20
|
+
delete error.message;
|
|
21
|
+
throw error;
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
return result.result;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
const calculateTxLinkHash = (params) => {
|
|
28
|
+
return callWasm('calculateTxLinkHash', [params]);
|
|
29
|
+
};
|
|
30
|
+
const compileCoreScript = (params) => {
|
|
31
|
+
return callWasm('compileCoreScript', [params]);
|
|
32
|
+
};
|
|
33
|
+
const convertAddressToData = (addrEncoded) => {
|
|
34
|
+
return callWasm('convertAddressToData', [addrEncoded]);
|
|
35
|
+
};
|
|
36
|
+
const convertAddressToHex = (addrEncoded) => {
|
|
37
|
+
return callWasm('convertAddressToHex', [addrEncoded]);
|
|
38
|
+
};
|
|
39
|
+
const convertBase32ToData = (encoded) => {
|
|
40
|
+
return callWasm('convertBase32ToData', [encoded]);
|
|
41
|
+
};
|
|
42
|
+
const convertBase32ToHex = (encoded) => {
|
|
43
|
+
return callWasm('convertBase32ToHex', [encoded]);
|
|
44
|
+
};
|
|
45
|
+
const convertCurrency = (params) => {
|
|
46
|
+
return callWasm('convertCurrency', [params]);
|
|
47
|
+
};
|
|
48
|
+
const convertDataTo = (value, retType) => {
|
|
49
|
+
return callWasm('convertDataTo', [value, retType]);
|
|
50
|
+
};
|
|
51
|
+
const convertDataToAddress = (str) => {
|
|
52
|
+
return callWasm('convertDataToAddress', [str]);
|
|
53
|
+
};
|
|
54
|
+
const convertDataToBase32 = (str) => {
|
|
55
|
+
return callWasm('convertDataToBase32', [str]);
|
|
56
|
+
};
|
|
57
|
+
const convertDataToHex = (str) => {
|
|
58
|
+
return callWasm('convertDataToHex', [str]);
|
|
59
|
+
};
|
|
60
|
+
const convertDataToString = (str) => {
|
|
61
|
+
return callWasm('convertDataToString', [str]);
|
|
62
|
+
};
|
|
63
|
+
const convertHexToAddress = (hexString) => {
|
|
64
|
+
return callWasm('convertHexToAddress', [hexString]);
|
|
65
|
+
};
|
|
66
|
+
const convertHexToBase32 = (hexString) => {
|
|
67
|
+
return callWasm('convertHexToBase32', [hexString]);
|
|
68
|
+
};
|
|
69
|
+
const convertHexToData = (encoded) => {
|
|
70
|
+
return callWasm('convertHexToData', [encoded]);
|
|
71
|
+
};
|
|
72
|
+
const convertStringToData = (raw) => {
|
|
73
|
+
return callWasm('convertStringToData', [raw]);
|
|
74
|
+
};
|
|
75
|
+
const convertToData = (value, valueType) => {
|
|
76
|
+
return callWasm('convertToData', [value, valueType]);
|
|
77
|
+
};
|
|
78
|
+
const createAccountAndKeystore = (params) => {
|
|
79
|
+
return callWasm('createAccountAndKeystore', [params]);
|
|
80
|
+
};
|
|
81
|
+
const createMasterKeystore = (params) => {
|
|
82
|
+
return callWasm('createMasterKeystore', [params]);
|
|
83
|
+
};
|
|
84
|
+
const createNormalKey = (params) => {
|
|
85
|
+
return callWasm('createNormalKey', [params]);
|
|
86
|
+
};
|
|
87
|
+
const createNormalKeystore = (params) => {
|
|
88
|
+
return callWasm('createNormalKeystore', [params]);
|
|
89
|
+
};
|
|
90
|
+
const decodeTxs = (params) => {
|
|
91
|
+
return callWasm('decodeTxs', [params]);
|
|
92
|
+
};
|
|
93
|
+
const deriveKeysFromMnemonic = (params) => {
|
|
94
|
+
return callWasm('deriveKeysFromMnemonic', [params]);
|
|
95
|
+
};
|
|
96
|
+
const deriveKeysFromMnemonicAndPath = (params) => {
|
|
97
|
+
return callWasm('deriveKeysFromMnemonicAndPath', [params]);
|
|
98
|
+
};
|
|
99
|
+
const disCompileCoreScript = (params) => {
|
|
100
|
+
return callWasm('disCompileCoreScript', [params]);
|
|
101
|
+
};
|
|
102
|
+
const encodeTxCurrency = (params) => {
|
|
103
|
+
return callWasm('encodeTxCurrency', [params]);
|
|
104
|
+
};
|
|
105
|
+
const encodeTxNumber = (params) => {
|
|
106
|
+
return callWasm('encodeTxNumber', [params]);
|
|
107
|
+
};
|
|
108
|
+
const generateMnemonic = (params) => {
|
|
109
|
+
return callWasm('generateMnemonic', [params]);
|
|
110
|
+
};
|
|
111
|
+
const generateMnemonicBySeed = (params) => {
|
|
112
|
+
return callWasm('generateMnemonicBySeed', [params]);
|
|
113
|
+
};
|
|
114
|
+
const getDefFromCoreScript = (params) => {
|
|
115
|
+
return callWasm('getDefFromCoreScript', [params]);
|
|
116
|
+
};
|
|
117
|
+
const getHomeShard = (params) => {
|
|
118
|
+
return callWasm('getHomeShard', [params]);
|
|
119
|
+
};
|
|
120
|
+
const getLibraryVersions = () => {
|
|
121
|
+
return callWasm('getLibraryVersions', []);
|
|
122
|
+
};
|
|
123
|
+
const gzipAndEncode = (str) => {
|
|
124
|
+
return callWasm('gzipAndEncode', [str]);
|
|
125
|
+
};
|
|
126
|
+
const hash = (params) => {
|
|
127
|
+
return callWasm('hash', [params]);
|
|
128
|
+
};
|
|
129
|
+
const isGrantConsumingTx = (txTypeStr) => {
|
|
130
|
+
return callWasm('isGrantConsumingTx', [txTypeStr]);
|
|
131
|
+
};
|
|
132
|
+
const loadMasterKeystore = (params) => {
|
|
133
|
+
return callWasm('loadMasterKeystore', [params]);
|
|
134
|
+
};
|
|
135
|
+
const loadNormalKeystore = (params) => {
|
|
136
|
+
return callWasm('loadNormalKeystore', [params]);
|
|
137
|
+
};
|
|
138
|
+
const makeCurrency = (params) => {
|
|
139
|
+
return callWasm('makeCurrency', [params]);
|
|
140
|
+
};
|
|
141
|
+
const sign = (param) => {
|
|
142
|
+
return callWasm('sign', [param]);
|
|
143
|
+
};
|
|
144
|
+
const signByMasterKey = (params) => {
|
|
145
|
+
return callWasm('signByMasterKey', [params]);
|
|
146
|
+
};
|
|
147
|
+
const signKeyBind = (params) => {
|
|
148
|
+
return callWasm('signKeyBind', [params]);
|
|
149
|
+
};
|
|
150
|
+
const testCoreScript = (params) => {
|
|
151
|
+
return callWasm('testCoreScript', [params]);
|
|
152
|
+
};
|
|
153
|
+
const verify = (params) => {
|
|
154
|
+
return callWasm('verify', [params]);
|
|
155
|
+
};
|
|
156
|
+
const verifyByMasterKey = (params) => {
|
|
157
|
+
return callWasm('verifyByMasterKey', [params]);
|
|
158
|
+
};
|
|
159
|
+
const verifyMerkleProof = (params) => {
|
|
160
|
+
return callWasm('verifyMerkleProof', [params]);
|
|
161
|
+
};
|
|
162
|
+
const verifyTx = (jsonTx) => {
|
|
163
|
+
return callWasm('verifyTx', [jsonTx]);
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
exports.calculateTxLinkHash = calculateTxLinkHash;
|
|
167
|
+
exports.compileCoreScript = compileCoreScript;
|
|
168
|
+
exports.convertAddressToData = convertAddressToData;
|
|
169
|
+
exports.convertAddressToHex = convertAddressToHex;
|
|
170
|
+
exports.convertBase32ToData = convertBase32ToData;
|
|
171
|
+
exports.convertBase32ToHex = convertBase32ToHex;
|
|
172
|
+
exports.convertCurrency = convertCurrency;
|
|
173
|
+
exports.convertDataTo = convertDataTo;
|
|
174
|
+
exports.convertDataToAddress = convertDataToAddress;
|
|
175
|
+
exports.convertDataToBase32 = convertDataToBase32;
|
|
176
|
+
exports.convertDataToHex = convertDataToHex;
|
|
177
|
+
exports.convertDataToString = convertDataToString;
|
|
178
|
+
exports.convertHexToAddress = convertHexToAddress;
|
|
179
|
+
exports.convertHexToBase32 = convertHexToBase32;
|
|
180
|
+
exports.convertHexToData = convertHexToData;
|
|
181
|
+
exports.convertStringToData = convertStringToData;
|
|
182
|
+
exports.convertToData = convertToData;
|
|
183
|
+
exports.createAccountAndKeystore = createAccountAndKeystore;
|
|
184
|
+
exports.createMasterKeystore = createMasterKeystore;
|
|
185
|
+
exports.createNormalKey = createNormalKey;
|
|
186
|
+
exports.createNormalKeystore = createNormalKeystore;
|
|
187
|
+
exports.decodeTxs = decodeTxs;
|
|
188
|
+
exports.deriveKeysFromMnemonic = deriveKeysFromMnemonic;
|
|
189
|
+
exports.deriveKeysFromMnemonicAndPath = deriveKeysFromMnemonicAndPath;
|
|
190
|
+
exports.disCompileCoreScript = disCompileCoreScript;
|
|
191
|
+
exports.encodeTxCurrency = encodeTxCurrency;
|
|
192
|
+
exports.encodeTxNumber = encodeTxNumber;
|
|
193
|
+
exports.generateMnemonic = generateMnemonic;
|
|
194
|
+
exports.generateMnemonicBySeed = generateMnemonicBySeed;
|
|
195
|
+
exports.getDefFromCoreScript = getDefFromCoreScript;
|
|
196
|
+
exports.getHomeShard = getHomeShard;
|
|
197
|
+
exports.getLibraryVersions = getLibraryVersions;
|
|
198
|
+
exports.gzipAndEncode = gzipAndEncode;
|
|
199
|
+
exports.hash = hash;
|
|
200
|
+
exports.isGrantConsumingTx = isGrantConsumingTx;
|
|
201
|
+
exports.loadMasterKeystore = loadMasterKeystore;
|
|
202
|
+
exports.loadNormalKeystore = loadNormalKeystore;
|
|
203
|
+
exports.makeCurrency = makeCurrency;
|
|
204
|
+
exports.sign = sign;
|
|
205
|
+
exports.signByMasterKey = signByMasterKey;
|
|
206
|
+
exports.signKeyBind = signKeyBind;
|
|
207
|
+
exports.testCoreScript = testCoreScript;
|
|
208
|
+
exports.verify = verify;
|
|
209
|
+
exports.verifyByMasterKey = verifyByMasterKey;
|
|
210
|
+
exports.verifyMerkleProof = verifyMerkleProof;
|
|
211
|
+
exports.verifyTx = verifyTx;
|
|
212
|
+
|
|
213
|
+
}));
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { n as namespace } from './lclib-C2eG5HzD.js';
|
|
2
|
+
|
|
3
|
+
// Automatically generated file. DO NOT EDIT.
|
|
4
|
+
const callWasm = (cmd, params) => {
|
|
5
|
+
// @ts-ignore
|
|
6
|
+
let callLclib = globalThis["CallLclib"];
|
|
7
|
+
// @ts-ignore
|
|
8
|
+
if (namespace && globalThis[namespace]) {
|
|
9
|
+
// @ts-ignore
|
|
10
|
+
callLclib = globalThis[namespace]["CallLclib"];
|
|
11
|
+
}
|
|
12
|
+
// @ts-ignore
|
|
13
|
+
if (typeof callLclib !== "function")
|
|
14
|
+
throw new Error("Wasm module is not loaded. Please call loadWasm or loadWasmSync first.");
|
|
15
|
+
// @ts-ignore
|
|
16
|
+
const resultString = callLclib(cmd, JSON.stringify(params));
|
|
17
|
+
const result = JSON.parse(resultString);
|
|
18
|
+
if (result.error && result.error.code != 0) {
|
|
19
|
+
const error = Object.assign(Object.assign({}, result.error), { message: result.error.message });
|
|
20
|
+
delete error.message;
|
|
21
|
+
throw error;
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
return result.result;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
const calculateTxLinkHash = (params) => {
|
|
28
|
+
return callWasm('calculateTxLinkHash', [params]);
|
|
29
|
+
};
|
|
30
|
+
const compileCoreScript = (params) => {
|
|
31
|
+
return callWasm('compileCoreScript', [params]);
|
|
32
|
+
};
|
|
33
|
+
const convertAddressToData = (addrEncoded) => {
|
|
34
|
+
return callWasm('convertAddressToData', [addrEncoded]);
|
|
35
|
+
};
|
|
36
|
+
const convertAddressToHex = (addrEncoded) => {
|
|
37
|
+
return callWasm('convertAddressToHex', [addrEncoded]);
|
|
38
|
+
};
|
|
39
|
+
const convertBase32ToData = (encoded) => {
|
|
40
|
+
return callWasm('convertBase32ToData', [encoded]);
|
|
41
|
+
};
|
|
42
|
+
const convertBase32ToHex = (encoded) => {
|
|
43
|
+
return callWasm('convertBase32ToHex', [encoded]);
|
|
44
|
+
};
|
|
45
|
+
const convertCurrency = (params) => {
|
|
46
|
+
return callWasm('convertCurrency', [params]);
|
|
47
|
+
};
|
|
48
|
+
const convertDataTo = (value, retType) => {
|
|
49
|
+
return callWasm('convertDataTo', [value, retType]);
|
|
50
|
+
};
|
|
51
|
+
const convertDataToAddress = (str) => {
|
|
52
|
+
return callWasm('convertDataToAddress', [str]);
|
|
53
|
+
};
|
|
54
|
+
const convertDataToBase32 = (str) => {
|
|
55
|
+
return callWasm('convertDataToBase32', [str]);
|
|
56
|
+
};
|
|
57
|
+
const convertDataToHex = (str) => {
|
|
58
|
+
return callWasm('convertDataToHex', [str]);
|
|
59
|
+
};
|
|
60
|
+
const convertDataToString = (str) => {
|
|
61
|
+
return callWasm('convertDataToString', [str]);
|
|
62
|
+
};
|
|
63
|
+
const convertHexToAddress = (hexString) => {
|
|
64
|
+
return callWasm('convertHexToAddress', [hexString]);
|
|
65
|
+
};
|
|
66
|
+
const convertHexToBase32 = (hexString) => {
|
|
67
|
+
return callWasm('convertHexToBase32', [hexString]);
|
|
68
|
+
};
|
|
69
|
+
const convertHexToData = (encoded) => {
|
|
70
|
+
return callWasm('convertHexToData', [encoded]);
|
|
71
|
+
};
|
|
72
|
+
const convertStringToData = (raw) => {
|
|
73
|
+
return callWasm('convertStringToData', [raw]);
|
|
74
|
+
};
|
|
75
|
+
const convertToData = (value, valueType) => {
|
|
76
|
+
return callWasm('convertToData', [value, valueType]);
|
|
77
|
+
};
|
|
78
|
+
const createAccountAndKeystore = (params) => {
|
|
79
|
+
return callWasm('createAccountAndKeystore', [params]);
|
|
80
|
+
};
|
|
81
|
+
const createMasterKeystore = (params) => {
|
|
82
|
+
return callWasm('createMasterKeystore', [params]);
|
|
83
|
+
};
|
|
84
|
+
const createNormalKey = (params) => {
|
|
85
|
+
return callWasm('createNormalKey', [params]);
|
|
86
|
+
};
|
|
87
|
+
const createNormalKeystore = (params) => {
|
|
88
|
+
return callWasm('createNormalKeystore', [params]);
|
|
89
|
+
};
|
|
90
|
+
const decodeTxs = (params) => {
|
|
91
|
+
return callWasm('decodeTxs', [params]);
|
|
92
|
+
};
|
|
93
|
+
const deriveKeysFromMnemonic = (params) => {
|
|
94
|
+
return callWasm('deriveKeysFromMnemonic', [params]);
|
|
95
|
+
};
|
|
96
|
+
const deriveKeysFromMnemonicAndPath = (params) => {
|
|
97
|
+
return callWasm('deriveKeysFromMnemonicAndPath', [params]);
|
|
98
|
+
};
|
|
99
|
+
const disCompileCoreScript = (params) => {
|
|
100
|
+
return callWasm('disCompileCoreScript', [params]);
|
|
101
|
+
};
|
|
102
|
+
const encodeTxCurrency = (params) => {
|
|
103
|
+
return callWasm('encodeTxCurrency', [params]);
|
|
104
|
+
};
|
|
105
|
+
const encodeTxNumber = (params) => {
|
|
106
|
+
return callWasm('encodeTxNumber', [params]);
|
|
107
|
+
};
|
|
108
|
+
const generateMnemonic = (params) => {
|
|
109
|
+
return callWasm('generateMnemonic', [params]);
|
|
110
|
+
};
|
|
111
|
+
const generateMnemonicBySeed = (params) => {
|
|
112
|
+
return callWasm('generateMnemonicBySeed', [params]);
|
|
113
|
+
};
|
|
114
|
+
const getDefFromCoreScript = (params) => {
|
|
115
|
+
return callWasm('getDefFromCoreScript', [params]);
|
|
116
|
+
};
|
|
117
|
+
const getHomeShard = (params) => {
|
|
118
|
+
return callWasm('getHomeShard', [params]);
|
|
119
|
+
};
|
|
120
|
+
const getLibraryVersions = () => {
|
|
121
|
+
return callWasm('getLibraryVersions', []);
|
|
122
|
+
};
|
|
123
|
+
const gzipAndEncode = (str) => {
|
|
124
|
+
return callWasm('gzipAndEncode', [str]);
|
|
125
|
+
};
|
|
126
|
+
const hash = (params) => {
|
|
127
|
+
return callWasm('hash', [params]);
|
|
128
|
+
};
|
|
129
|
+
const isGrantConsumingTx = (txTypeStr) => {
|
|
130
|
+
return callWasm('isGrantConsumingTx', [txTypeStr]);
|
|
131
|
+
};
|
|
132
|
+
const loadMasterKeystore = (params) => {
|
|
133
|
+
return callWasm('loadMasterKeystore', [params]);
|
|
134
|
+
};
|
|
135
|
+
const loadNormalKeystore = (params) => {
|
|
136
|
+
return callWasm('loadNormalKeystore', [params]);
|
|
137
|
+
};
|
|
138
|
+
const makeCurrency = (params) => {
|
|
139
|
+
return callWasm('makeCurrency', [params]);
|
|
140
|
+
};
|
|
141
|
+
const sign = (param) => {
|
|
142
|
+
return callWasm('sign', [param]);
|
|
143
|
+
};
|
|
144
|
+
const signByMasterKey = (params) => {
|
|
145
|
+
return callWasm('signByMasterKey', [params]);
|
|
146
|
+
};
|
|
147
|
+
const signKeyBind = (params) => {
|
|
148
|
+
return callWasm('signKeyBind', [params]);
|
|
149
|
+
};
|
|
150
|
+
const testCoreScript = (params) => {
|
|
151
|
+
return callWasm('testCoreScript', [params]);
|
|
152
|
+
};
|
|
153
|
+
const verify = (params) => {
|
|
154
|
+
return callWasm('verify', [params]);
|
|
155
|
+
};
|
|
156
|
+
const verifyByMasterKey = (params) => {
|
|
157
|
+
return callWasm('verifyByMasterKey', [params]);
|
|
158
|
+
};
|
|
159
|
+
const verifyMerkleProof = (params) => {
|
|
160
|
+
return callWasm('verifyMerkleProof', [params]);
|
|
161
|
+
};
|
|
162
|
+
const verifyTx = (jsonTx) => {
|
|
163
|
+
return callWasm('verifyTx', [jsonTx]);
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
export { disCompileCoreScript as A, encodeTxCurrency as B, encodeTxNumber as C, generateMnemonic as D, generateMnemonicBySeed as E, getDefFromCoreScript as F, getHomeShard as G, getLibraryVersions as H, gzipAndEncode as I, hash as J, isGrantConsumingTx as K, makeCurrency as L, sign as M, signByMasterKey as N, signKeyBind as O, testCoreScript as P, verify as Q, verifyByMasterKey as R, verifyMerkleProof as S, verifyTx as T, loadNormalKeystore as a, calculateTxLinkHash as b, createAccountAndKeystore as c, compileCoreScript as d, convertAddressToData as e, convertAddressToHex as f, convertBase32ToData as g, convertBase32ToHex as h, convertCurrency as i, convertDataTo as j, convertDataToAddress as k, loadMasterKeystore as l, convertDataToBase32 as m, convertDataToHex as n, convertDataToString as o, convertHexToAddress as p, convertHexToBase32 as q, convertHexToData as r, convertStringToData as s, convertToData as t, createMasterKeystore as u, createNormalKey as v, createNormalKeystore as w, decodeTxs as x, deriveKeysFromMnemonic as y, deriveKeysFromMnemonicAndPath as z };
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var lclib = require('./lclib-DuoOR0-Q.cjs');
|
|
4
|
+
|
|
5
|
+
// Automatically generated file. DO NOT EDIT.
|
|
6
|
+
const callWasm = (cmd, params) => {
|
|
7
|
+
// @ts-ignore
|
|
8
|
+
let callLclib = globalThis["CallLclib"];
|
|
9
|
+
// @ts-ignore
|
|
10
|
+
if (lclib.namespace && globalThis[lclib.namespace]) {
|
|
11
|
+
// @ts-ignore
|
|
12
|
+
callLclib = globalThis[lclib.namespace]["CallLclib"];
|
|
13
|
+
}
|
|
14
|
+
// @ts-ignore
|
|
15
|
+
if (typeof callLclib !== "function")
|
|
16
|
+
throw new Error("Wasm module is not loaded. Please call loadWasm or loadWasmSync first.");
|
|
17
|
+
// @ts-ignore
|
|
18
|
+
const resultString = callLclib(cmd, JSON.stringify(params));
|
|
19
|
+
const result = JSON.parse(resultString);
|
|
20
|
+
if (result.error && result.error.code != 0) {
|
|
21
|
+
const error = Object.assign(Object.assign({}, result.error), { message: result.error.message });
|
|
22
|
+
delete error.message;
|
|
23
|
+
throw error;
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
return result.result;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
const calculateTxLinkHash = (params) => {
|
|
30
|
+
return callWasm('calculateTxLinkHash', [params]);
|
|
31
|
+
};
|
|
32
|
+
const compileCoreScript = (params) => {
|
|
33
|
+
return callWasm('compileCoreScript', [params]);
|
|
34
|
+
};
|
|
35
|
+
const convertAddressToData = (addrEncoded) => {
|
|
36
|
+
return callWasm('convertAddressToData', [addrEncoded]);
|
|
37
|
+
};
|
|
38
|
+
const convertAddressToHex = (addrEncoded) => {
|
|
39
|
+
return callWasm('convertAddressToHex', [addrEncoded]);
|
|
40
|
+
};
|
|
41
|
+
const convertBase32ToData = (encoded) => {
|
|
42
|
+
return callWasm('convertBase32ToData', [encoded]);
|
|
43
|
+
};
|
|
44
|
+
const convertBase32ToHex = (encoded) => {
|
|
45
|
+
return callWasm('convertBase32ToHex', [encoded]);
|
|
46
|
+
};
|
|
47
|
+
const convertCurrency = (params) => {
|
|
48
|
+
return callWasm('convertCurrency', [params]);
|
|
49
|
+
};
|
|
50
|
+
const convertDataTo = (value, retType) => {
|
|
51
|
+
return callWasm('convertDataTo', [value, retType]);
|
|
52
|
+
};
|
|
53
|
+
const convertDataToAddress = (str) => {
|
|
54
|
+
return callWasm('convertDataToAddress', [str]);
|
|
55
|
+
};
|
|
56
|
+
const convertDataToBase32 = (str) => {
|
|
57
|
+
return callWasm('convertDataToBase32', [str]);
|
|
58
|
+
};
|
|
59
|
+
const convertDataToHex = (str) => {
|
|
60
|
+
return callWasm('convertDataToHex', [str]);
|
|
61
|
+
};
|
|
62
|
+
const convertDataToString = (str) => {
|
|
63
|
+
return callWasm('convertDataToString', [str]);
|
|
64
|
+
};
|
|
65
|
+
const convertHexToAddress = (hexString) => {
|
|
66
|
+
return callWasm('convertHexToAddress', [hexString]);
|
|
67
|
+
};
|
|
68
|
+
const convertHexToBase32 = (hexString) => {
|
|
69
|
+
return callWasm('convertHexToBase32', [hexString]);
|
|
70
|
+
};
|
|
71
|
+
const convertHexToData = (encoded) => {
|
|
72
|
+
return callWasm('convertHexToData', [encoded]);
|
|
73
|
+
};
|
|
74
|
+
const convertStringToData = (raw) => {
|
|
75
|
+
return callWasm('convertStringToData', [raw]);
|
|
76
|
+
};
|
|
77
|
+
const convertToData = (value, valueType) => {
|
|
78
|
+
return callWasm('convertToData', [value, valueType]);
|
|
79
|
+
};
|
|
80
|
+
const createAccountAndKeystore = (params) => {
|
|
81
|
+
return callWasm('createAccountAndKeystore', [params]);
|
|
82
|
+
};
|
|
83
|
+
const createMasterKeystore = (params) => {
|
|
84
|
+
return callWasm('createMasterKeystore', [params]);
|
|
85
|
+
};
|
|
86
|
+
const createNormalKey = (params) => {
|
|
87
|
+
return callWasm('createNormalKey', [params]);
|
|
88
|
+
};
|
|
89
|
+
const createNormalKeystore = (params) => {
|
|
90
|
+
return callWasm('createNormalKeystore', [params]);
|
|
91
|
+
};
|
|
92
|
+
const decodeTxs = (params) => {
|
|
93
|
+
return callWasm('decodeTxs', [params]);
|
|
94
|
+
};
|
|
95
|
+
const deriveKeysFromMnemonic = (params) => {
|
|
96
|
+
return callWasm('deriveKeysFromMnemonic', [params]);
|
|
97
|
+
};
|
|
98
|
+
const deriveKeysFromMnemonicAndPath = (params) => {
|
|
99
|
+
return callWasm('deriveKeysFromMnemonicAndPath', [params]);
|
|
100
|
+
};
|
|
101
|
+
const disCompileCoreScript = (params) => {
|
|
102
|
+
return callWasm('disCompileCoreScript', [params]);
|
|
103
|
+
};
|
|
104
|
+
const encodeTxCurrency = (params) => {
|
|
105
|
+
return callWasm('encodeTxCurrency', [params]);
|
|
106
|
+
};
|
|
107
|
+
const encodeTxNumber = (params) => {
|
|
108
|
+
return callWasm('encodeTxNumber', [params]);
|
|
109
|
+
};
|
|
110
|
+
const generateMnemonic = (params) => {
|
|
111
|
+
return callWasm('generateMnemonic', [params]);
|
|
112
|
+
};
|
|
113
|
+
const generateMnemonicBySeed = (params) => {
|
|
114
|
+
return callWasm('generateMnemonicBySeed', [params]);
|
|
115
|
+
};
|
|
116
|
+
const getDefFromCoreScript = (params) => {
|
|
117
|
+
return callWasm('getDefFromCoreScript', [params]);
|
|
118
|
+
};
|
|
119
|
+
const getHomeShard = (params) => {
|
|
120
|
+
return callWasm('getHomeShard', [params]);
|
|
121
|
+
};
|
|
122
|
+
const getLibraryVersions = () => {
|
|
123
|
+
return callWasm('getLibraryVersions', []);
|
|
124
|
+
};
|
|
125
|
+
const gzipAndEncode = (str) => {
|
|
126
|
+
return callWasm('gzipAndEncode', [str]);
|
|
127
|
+
};
|
|
128
|
+
const hash = (params) => {
|
|
129
|
+
return callWasm('hash', [params]);
|
|
130
|
+
};
|
|
131
|
+
const isGrantConsumingTx = (txTypeStr) => {
|
|
132
|
+
return callWasm('isGrantConsumingTx', [txTypeStr]);
|
|
133
|
+
};
|
|
134
|
+
const loadMasterKeystore = (params) => {
|
|
135
|
+
return callWasm('loadMasterKeystore', [params]);
|
|
136
|
+
};
|
|
137
|
+
const loadNormalKeystore = (params) => {
|
|
138
|
+
return callWasm('loadNormalKeystore', [params]);
|
|
139
|
+
};
|
|
140
|
+
const makeCurrency = (params) => {
|
|
141
|
+
return callWasm('makeCurrency', [params]);
|
|
142
|
+
};
|
|
143
|
+
const sign = (param) => {
|
|
144
|
+
return callWasm('sign', [param]);
|
|
145
|
+
};
|
|
146
|
+
const signByMasterKey = (params) => {
|
|
147
|
+
return callWasm('signByMasterKey', [params]);
|
|
148
|
+
};
|
|
149
|
+
const signKeyBind = (params) => {
|
|
150
|
+
return callWasm('signKeyBind', [params]);
|
|
151
|
+
};
|
|
152
|
+
const testCoreScript = (params) => {
|
|
153
|
+
return callWasm('testCoreScript', [params]);
|
|
154
|
+
};
|
|
155
|
+
const verify = (params) => {
|
|
156
|
+
return callWasm('verify', [params]);
|
|
157
|
+
};
|
|
158
|
+
const verifyByMasterKey = (params) => {
|
|
159
|
+
return callWasm('verifyByMasterKey', [params]);
|
|
160
|
+
};
|
|
161
|
+
const verifyMerkleProof = (params) => {
|
|
162
|
+
return callWasm('verifyMerkleProof', [params]);
|
|
163
|
+
};
|
|
164
|
+
const verifyTx = (jsonTx) => {
|
|
165
|
+
return callWasm('verifyTx', [jsonTx]);
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
exports.calculateTxLinkHash = calculateTxLinkHash;
|
|
169
|
+
exports.compileCoreScript = compileCoreScript;
|
|
170
|
+
exports.convertAddressToData = convertAddressToData;
|
|
171
|
+
exports.convertAddressToHex = convertAddressToHex;
|
|
172
|
+
exports.convertBase32ToData = convertBase32ToData;
|
|
173
|
+
exports.convertBase32ToHex = convertBase32ToHex;
|
|
174
|
+
exports.convertCurrency = convertCurrency;
|
|
175
|
+
exports.convertDataTo = convertDataTo;
|
|
176
|
+
exports.convertDataToAddress = convertDataToAddress;
|
|
177
|
+
exports.convertDataToBase32 = convertDataToBase32;
|
|
178
|
+
exports.convertDataToHex = convertDataToHex;
|
|
179
|
+
exports.convertDataToString = convertDataToString;
|
|
180
|
+
exports.convertHexToAddress = convertHexToAddress;
|
|
181
|
+
exports.convertHexToBase32 = convertHexToBase32;
|
|
182
|
+
exports.convertHexToData = convertHexToData;
|
|
183
|
+
exports.convertStringToData = convertStringToData;
|
|
184
|
+
exports.convertToData = convertToData;
|
|
185
|
+
exports.createAccountAndKeystore = createAccountAndKeystore;
|
|
186
|
+
exports.createMasterKeystore = createMasterKeystore;
|
|
187
|
+
exports.createNormalKey = createNormalKey;
|
|
188
|
+
exports.createNormalKeystore = createNormalKeystore;
|
|
189
|
+
exports.decodeTxs = decodeTxs;
|
|
190
|
+
exports.deriveKeysFromMnemonic = deriveKeysFromMnemonic;
|
|
191
|
+
exports.deriveKeysFromMnemonicAndPath = deriveKeysFromMnemonicAndPath;
|
|
192
|
+
exports.disCompileCoreScript = disCompileCoreScript;
|
|
193
|
+
exports.encodeTxCurrency = encodeTxCurrency;
|
|
194
|
+
exports.encodeTxNumber = encodeTxNumber;
|
|
195
|
+
exports.generateMnemonic = generateMnemonic;
|
|
196
|
+
exports.generateMnemonicBySeed = generateMnemonicBySeed;
|
|
197
|
+
exports.getDefFromCoreScript = getDefFromCoreScript;
|
|
198
|
+
exports.getHomeShard = getHomeShard;
|
|
199
|
+
exports.getLibraryVersions = getLibraryVersions;
|
|
200
|
+
exports.gzipAndEncode = gzipAndEncode;
|
|
201
|
+
exports.hash = hash;
|
|
202
|
+
exports.isGrantConsumingTx = isGrantConsumingTx;
|
|
203
|
+
exports.loadMasterKeystore = loadMasterKeystore;
|
|
204
|
+
exports.loadNormalKeystore = loadNormalKeystore;
|
|
205
|
+
exports.makeCurrency = makeCurrency;
|
|
206
|
+
exports.sign = sign;
|
|
207
|
+
exports.signByMasterKey = signByMasterKey;
|
|
208
|
+
exports.signKeyBind = signKeyBind;
|
|
209
|
+
exports.testCoreScript = testCoreScript;
|
|
210
|
+
exports.verify = verify;
|
|
211
|
+
exports.verifyByMasterKey = verifyByMasterKey;
|
|
212
|
+
exports.verifyMerkleProof = verifyMerkleProof;
|
|
213
|
+
exports.verifyTx = verifyTx;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { DualKeyAccount } from '../accounts/types.mjs';
|
|
2
|
+
import type { Transport } from '../transports/types.mjs';
|
|
3
|
+
import type { Client } from './types.mjs';
|
|
4
|
+
export type CreateClientArgs<TAccount extends DualKeyAccount | undefined> = {
|
|
5
|
+
transport: Transport;
|
|
6
|
+
account?: TAccount;
|
|
7
|
+
};
|
|
8
|
+
export declare function createClient<TAccount extends DualKeyAccount | undefined = undefined>(args: CreateClientArgs<TAccount>): Client<TAccount>;
|