@locuschain/lib 0.2.2 → 0.2.3
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.cts +58 -0
- package/dist/accounts/index.d.cts +5 -5
- package/dist/accounts/keys/index.d.cts +2 -0
- package/dist/accounts/keys/localKeySource.d.cts +23 -0
- package/dist/accounts/keys/toKeySource.d.cts +14 -0
- package/dist/accounts/keysToAccount.d.cts +19 -0
- package/dist/accounts/mnemonicToAccount.d.cts +25 -0
- package/dist/accounts/signing/txKeyPolicy.d.cts +21 -0
- package/dist/accounts/types.d.cts +100 -0
- package/dist/actions/wallet/_deriveTxAdditions.d.cts +18 -0
- package/dist/actions/wallet/_prepareTransaction.d.cts +15 -0
- package/dist/actions/wallet/_sendPreparedTransaction.d.cts +9 -0
- package/dist/actions/wallet/_signLocusTransaction.d.cts +14 -0
- package/dist/actions/wallet/index.d.cts +5 -0
- package/dist/actions/wallet/types.d.cts +38 -0
- package/dist/autogen/actions/debug/index.d.cts +2 -0
- package/dist/autogen/actions/debug/public/allHeights.d.cts +3 -0
- package/dist/autogen/actions/debug/public/balanceGrantList.d.cts +2 -0
- package/dist/autogen/actions/debug/public/balanceList.d.cts +2 -0
- package/dist/autogen/actions/debug/public/createAccount.d.cts +3 -0
- package/dist/autogen/actions/debug/public/createNode.d.cts +4 -0
- package/dist/autogen/actions/debug/public/dumpAllAccounts.d.cts +3 -0
- package/dist/autogen/actions/debug/public/echo.d.cts +2 -0
- package/dist/autogen/actions/debug/public/gameChainCmd.d.cts +4 -0
- package/dist/autogen/actions/debug/public/getAccountsBalances.d.cts +4 -0
- package/dist/autogen/actions/debug/public/getAccountsHeights.d.cts +4 -0
- package/dist/autogen/actions/debug/public/getContractLog.d.cts +4 -0
- package/dist/autogen/actions/debug/public/getGuestsInfo.d.cts +3 -0
- package/dist/autogen/actions/debug/public/getHomeShard.d.cts +4 -0
- package/dist/autogen/actions/debug/public/getImportAccount.d.cts +4 -0
- package/dist/autogen/actions/debug/public/getImportAccountLog.d.cts +4 -0
- package/dist/autogen/actions/debug/public/getKeys.d.cts +4 -0
- package/dist/autogen/actions/debug/public/getNodeBlocks.d.cts +3 -0
- package/dist/autogen/actions/debug/public/getPeerPool.d.cts +2 -0
- package/dist/autogen/actions/debug/public/getPeersInfo.d.cts +3 -0
- package/dist/autogen/actions/debug/public/importAccount.d.cts +4 -0
- package/dist/autogen/actions/debug/public/index.d.cts +29 -0
- package/dist/autogen/actions/debug/public/initReliableNodes.d.cts +4 -0
- package/dist/autogen/actions/debug/public/noArgsRets.d.cts +2 -0
- package/dist/autogen/actions/debug/public/nodeCmd.d.cts +3 -0
- package/dist/autogen/actions/debug/public/removeHoldTxs.d.cts +4 -0
- package/dist/autogen/actions/debug/public/requestVme.d.cts +4 -0
- package/dist/autogen/actions/debug/public/sendRawTransaction.d.cts +4 -0
- package/dist/autogen/actions/debug/public/setImportAccountTx.d.cts +4 -0
- package/dist/autogen/actions/debug/public/setReliableNode.d.cts +4 -0
- package/dist/autogen/actions/debug/public/viewContract.d.cts +4 -0
- package/dist/autogen/actions/debug/wallet/callContract.d.cts +4 -0
- package/dist/autogen/actions/debug/wallet/createContract.d.cts +4 -0
- package/dist/autogen/actions/debug/wallet/createSynthAccount.d.cts +4 -0
- package/dist/autogen/actions/debug/wallet/index.d.cts +4 -0
- package/dist/autogen/actions/debug/wallet/postDataToSynthAccount.d.cts +4 -0
- package/dist/autogen/actions/index.d.cts +3 -0
- package/dist/autogen/actions/public/accountHeightsToDownload.d.cts +4 -0
- package/dist/autogen/actions/public/accountHeightsToUpload.d.cts +4 -0
- package/dist/autogen/actions/public/calculateSpentByExpress.d.cts +4 -0
- package/dist/autogen/actions/public/clientMessage.d.cts +3 -0
- package/dist/autogen/actions/public/downloadAccountTxs.d.cts +4 -0
- package/dist/autogen/actions/public/echo.d.cts +2 -0
- package/dist/autogen/actions/public/findDuplicateSubscriber.d.cts +4 -0
- package/dist/autogen/actions/public/generateLatestStoredDataProof.d.cts +4 -0
- package/dist/autogen/actions/public/getAccountAssetList.d.cts +4 -0
- package/dist/autogen/actions/public/getAccountAssetObject.d.cts +4 -0
- package/dist/autogen/actions/public/getAccountDetail.d.cts +4 -0
- package/dist/autogen/actions/public/getAccountHistory.d.cts +4 -0
- package/dist/autogen/actions/public/getAccountTokenList.d.cts +4 -0
- package/dist/autogen/actions/public/getConciseNodeStatus.d.cts +3 -0
- package/dist/autogen/actions/public/getGenesisAccount.d.cts +3 -0
- package/dist/autogen/actions/public/getIdentityProof.d.cts +4 -0
- package/dist/autogen/actions/public/getInactiveTxList.d.cts +4 -0
- package/dist/autogen/actions/public/getMontInfoList.d.cts +4 -0
- package/dist/autogen/actions/public/getNodeStatus.d.cts +3 -0
- package/dist/autogen/actions/public/getOwnerBalance.d.cts +3 -0
- package/dist/autogen/actions/public/getRoundState.d.cts +4 -0
- package/dist/autogen/actions/public/getRoundStatesList.d.cts +4 -0
- package/dist/autogen/actions/public/getShardOfAccount.d.cts +4 -0
- package/dist/autogen/actions/public/getSyncState.d.cts +3 -0
- package/dist/autogen/actions/public/getTx.d.cts +4 -0
- package/dist/autogen/actions/public/getWorldRoundState.d.cts +4 -0
- package/dist/autogen/actions/public/getWorldRoundStatesList.d.cts +4 -0
- package/dist/autogen/actions/public/hasSystemToken.d.cts +4 -0
- package/dist/autogen/actions/public/index.d.cts +38 -0
- package/dist/autogen/actions/public/makeTxProof.d.cts +4 -0
- package/dist/autogen/actions/public/queryAddress.d.cts +4 -0
- package/dist/autogen/actions/public/readTxListWitness.d.cts +4 -0
- package/dist/autogen/actions/public/setHost.d.cts +3 -0
- package/dist/autogen/actions/public/subscribeAddress.d.cts +4 -0
- package/dist/autogen/actions/public/uploadAccountTxs.d.cts +3 -0
- package/dist/autogen/actions/public/verifyAndSignChallenge.d.cts +4 -0
- package/dist/autogen/actions/public/verifyIdentityProof.d.cts +4 -0
- package/dist/autogen/actions/public/verifyLatestStoredDataProof.d.cts +3 -0
- package/dist/autogen/actions/public/verifyTxListWitness.d.cts +3 -0
- package/dist/autogen/actions/wallet/acceptScript.d.cts +4 -0
- package/dist/autogen/actions/wallet/becomeGuest.d.cts +4 -0
- package/dist/autogen/actions/wallet/becomeHost.d.cts +4 -0
- package/dist/autogen/actions/wallet/changeKey.d.cts +4 -0
- package/dist/autogen/actions/wallet/changeVkey.d.cts +4 -0
- package/dist/autogen/actions/wallet/closeAccount.d.cts +4 -0
- package/dist/autogen/actions/wallet/createAssetObject.d.cts +4 -0
- package/dist/autogen/actions/wallet/createToken.d.cts +4 -0
- package/dist/autogen/actions/wallet/createVme.d.cts +4 -0
- package/dist/autogen/actions/wallet/freezeAccount.d.cts +4 -0
- package/dist/autogen/actions/wallet/index.d.cts +20 -0
- package/dist/autogen/actions/wallet/lockStake.d.cts +4 -0
- package/dist/autogen/actions/wallet/openAccount.d.cts +4 -0
- package/dist/autogen/actions/wallet/postData.d.cts +4 -0
- package/dist/autogen/actions/wallet/provideScript.d.cts +4 -0
- package/dist/autogen/actions/wallet/requestDataTrade.d.cts +4 -0
- package/dist/autogen/actions/wallet/transferAssetObject.d.cts +4 -0
- package/dist/autogen/actions/wallet/transferCoin.d.cts +4 -0
- package/dist/autogen/actions/wallet/transferCoinExpress.d.cts +4 -0
- package/dist/autogen/actions/wallet/transferToken.d.cts +4 -0
- package/dist/autogen/actions/wallet/unlockStake.d.cts +4 -0
- package/dist/autogen/debugPublicActions.d.cts +47 -0
- package/dist/autogen/debugWalletActions.d.cts +11 -0
- package/dist/autogen/index.d.cts +8 -8
- package/dist/autogen/locus-tx.d.cts +5 -0
- package/dist/autogen/publicActions.d.cts +66 -0
- package/dist/autogen/rpc-api-spec.d.cts +210 -0
- package/dist/autogen/types/common/addr-tx-proof.d.cts +5 -0
- package/dist/autogen/types/common/asset-object-transfer.d.cts +8 -0
- package/dist/autogen/types/common/asset-object.d.cts +10 -0
- package/dist/autogen/types/common/asset-proof-objects.d.cts +5 -0
- package/dist/autogen/types/common/asset-transfer-info.d.cts +9 -0
- package/dist/autogen/types/common/base-meta.d.cts +1 -0
- package/dist/autogen/types/common/contract-exec-status.d.cts +16 -0
- package/dist/autogen/types/common/contract-transfer-info.d.cts +7 -0
- package/dist/autogen/types/common/get-peers-info.d.cts +9 -0
- package/dist/autogen/types/common/index-value-pair.d.cts +4 -0
- package/dist/autogen/types/common/index.d.cts +54 -0
- package/dist/autogen/types/common/input-params-data-transfer.d.cts +8 -0
- package/dist/autogen/types/common/key-bind-info.d.cts +4 -0
- package/dist/autogen/types/common/mont-info.d.cts +4 -0
- package/dist/autogen/types/common/object-amount-transfer.d.cts +5 -0
- package/dist/autogen/types/common/object-amount.d.cts +4 -0
- package/dist/autogen/types/common/output-download-account-txs.d.cts +4 -0
- package/dist/autogen/types/common/param-str.d.cts +3 -0
- package/dist/autogen/types/common/param-tx-data.d.cts +5 -0
- package/dist/autogen/types/common/params-token-value-pair.d.cts +4 -0
- package/dist/autogen/types/common/public-height-chunk.d.cts +4 -0
- package/dist/autogen/types/common/ref-tx-info.d.cts +5 -0
- package/dist/autogen/types/common/ref-vtx.d.cts +6 -0
- package/dist/autogen/types/common/ret-type-base.d.cts +1 -0
- package/dist/autogen/types/common/round-state-abstract.d.cts +11 -0
- package/dist/autogen/types/common/round-state-detail.d.cts +16 -0
- package/dist/autogen/types/common/rpc-account-height.d.cts +5 -0
- package/dist/autogen/types/common/rpc-accounts-balances-result.d.cts +4 -0
- package/dist/autogen/types/common/rpc-asset-list-values.d.cts +7 -0
- package/dist/autogen/types/common/rpc-data-trade-result.d.cts +5 -0
- package/dist/autogen/types/common/rpc-token-balance-pair.d.cts +4 -0
- package/dist/autogen/types/common/token-value-ab.d.cts +5 -0
- package/dist/autogen/types/common/token-value-pair.d.cts +4 -0
- package/dist/autogen/types/common/transaction-sender-index.d.cts +7 -0
- package/dist/autogen/types/common/transfer-info.d.cts +7 -0
- package/dist/autogen/types/common/tx-base.d.cts +13 -0
- package/dist/autogen/types/common/tx-hash-elements.d.cts +6 -0
- package/dist/autogen/types/common/tx-key-height-hash.d.cts +4 -0
- package/dist/autogen/types/common/tx-key-nround.d.cts +5 -0
- package/dist/autogen/types/common/tx-key.d.cts +4 -0
- package/dist/autogen/types/common/tx-meta.d.cts +2 -0
- package/dist/autogen/types/common/tx-no-signature.d.cts +1 -0
- package/dist/autogen/types/common/tx-recv-set-meta.d.cts +2 -0
- package/dist/autogen/types/common/tx-sign-key.d.cts +1 -0
- package/dist/autogen/types/common/tx-signature.d.cts +3 -0
- package/dist/autogen/types/common/tx-vsignature.d.cts +3 -0
- package/dist/autogen/types/common/vm-engine-block.d.cts +11 -0
- package/dist/autogen/types/common/vm-reward.d.cts +4 -0
- package/dist/autogen/types/common/vm-tx-state.d.cts +27 -0
- package/dist/autogen/types/common/vme-block-meta.d.cts +2 -0
- package/dist/autogen/types/common/vme-info.d.cts +3 -0
- package/dist/autogen/types/common/vme-lock-stake.d.cts +4 -0
- package/dist/autogen/types/common/vote-info-rpc.d.cts +5 -0
- package/dist/autogen/types/common/vtx-meta.d.cts +2 -0
- package/dist/autogen/types/common/wrs-validators-info.d.cts +5 -0
- package/dist/autogen/types/consts/address-class.d.cts +11 -0
- package/dist/autogen/types/consts/consts.d.cts +2 -0
- package/dist/autogen/types/consts/currency-unit.d.cts +15 -0
- package/dist/autogen/types/consts/index.d.cts +3 -0
- package/dist/autogen/types/consts/tx-type.d.cts +61 -0
- package/dist/autogen/types/consts/tx-types.d.cts +415 -0
- package/dist/autogen/types/rpc/heights-result.d.cts +4 -0
- package/dist/autogen/types/rpc/index.d.cts +107 -0
- package/dist/autogen/types/rpc/params-accept-script.d.cts +8 -0
- package/dist/autogen/types/rpc/params-account-and-index.d.cts +4 -0
- package/dist/autogen/types/rpc/params-account-heights.d.cts +5 -0
- package/dist/autogen/types/rpc/params-account-history.d.cts +5 -0
- package/dist/autogen/types/rpc/params-account.d.cts +3 -0
- package/dist/autogen/types/rpc/params-accounts.d.cts +3 -0
- package/dist/autogen/types/rpc/params-become-guest.d.cts +5 -0
- package/dist/autogen/types/rpc/params-become-host.d.cts +5 -0
- package/dist/autogen/types/rpc/params-calculate-spent-by-express.d.cts +5 -0
- package/dist/autogen/types/rpc/params-call-contract.d.cts +13 -0
- package/dist/autogen/types/rpc/params-change-key.d.cts +8 -0
- package/dist/autogen/types/rpc/params-change-vkey.d.cts +5 -0
- package/dist/autogen/types/rpc/params-close-account.d.cts +7 -0
- package/dist/autogen/types/rpc/params-contract-log.d.cts +6 -0
- package/dist/autogen/types/rpc/params-create-asset-object.d.cts +10 -0
- package/dist/autogen/types/rpc/params-create-contract.d.cts +14 -0
- package/dist/autogen/types/rpc/params-create-node.d.cts +4 -0
- package/dist/autogen/types/rpc/params-create-synth-account.d.cts +8 -0
- package/dist/autogen/types/rpc/params-create-token.d.cts +7 -0
- package/dist/autogen/types/rpc/params-create-vme.d.cts +8 -0
- package/dist/autogen/types/rpc/params-download-account-txs.d.cts +6 -0
- package/dist/autogen/types/rpc/params-find-duplicate-subscriber.d.cts +3 -0
- package/dist/autogen/types/rpc/params-freeze-account.d.cts +5 -0
- package/dist/autogen/types/rpc/params-game-chain-cmd.d.cts +5 -0
- package/dist/autogen/types/rpc/params-generate-latest-stored-data-proof.d.cts +4 -0
- package/dist/autogen/types/rpc/params-get-asset-list.d.cts +4 -0
- package/dist/autogen/types/rpc/params-get-asset-objects.d.cts +4 -0
- package/dist/autogen/types/rpc/params-get-home-shard.d.cts +3 -0
- package/dist/autogen/types/rpc/params-get-identity-proof.d.cts +4 -0
- package/dist/autogen/types/rpc/params-get-import-account.d.cts +3 -0
- package/dist/autogen/types/rpc/params-import-account.d.cts +7 -0
- package/dist/autogen/types/rpc/params-init-reliable-nodes.d.cts +5 -0
- package/dist/autogen/types/rpc/params-latest-stored-data-proof.d.cts +4 -0
- package/dist/autogen/types/rpc/params-lock-stake.d.cts +7 -0
- package/dist/autogen/types/rpc/params-open-account.d.cts +11 -0
- package/dist/autogen/types/rpc/params-post-data-to-synth-account.d.cts +11 -0
- package/dist/autogen/types/rpc/params-provide-script.d.cts +14 -0
- package/dist/autogen/types/rpc/params-query-address.d.cts +3 -0
- package/dist/autogen/types/rpc/params-read-tx-list.d.cts +5 -0
- package/dist/autogen/types/rpc/params-remove-hold-txs.d.cts +5 -0
- package/dist/autogen/types/rpc/params-request-data-trade.d.cts +10 -0
- package/dist/autogen/types/rpc/params-request-vme.d.cts +4 -0
- package/dist/autogen/types/rpc/params-round-list.d.cts +4 -0
- package/dist/autogen/types/rpc/params-round.d.cts +3 -0
- package/dist/autogen/types/rpc/params-rs.d.cts +4 -0
- package/dist/autogen/types/rpc/params-send-raw-transaction.d.cts +4 -0
- package/dist/autogen/types/rpc/params-set-host.d.cts +4 -0
- package/dist/autogen/types/rpc/params-set-import-account-tx.d.cts +5 -0
- package/dist/autogen/types/rpc/params-set-reliable-node.d.cts +4 -0
- package/dist/autogen/types/rpc/params-subscribe-address.d.cts +4 -0
- package/dist/autogen/types/rpc/params-transfer-asset-object.d.cts +9 -0
- package/dist/autogen/types/rpc/params-transfer-coin-express.d.cts +7 -0
- package/dist/autogen/types/rpc/params-transfer-coin.d.cts +8 -0
- package/dist/autogen/types/rpc/params-transfer-tokens.d.cts +14 -0
- package/dist/autogen/types/rpc/params-tx-list-witness.d.cts +6 -0
- package/dist/autogen/types/rpc/params-tx-list.d.cts +5 -0
- package/dist/autogen/types/rpc/params-unlock-stake.d.cts +7 -0
- package/dist/autogen/types/rpc/params-upload-account-txs.d.cts +5 -0
- package/dist/autogen/types/rpc/params-verify-and-sign-challenge.d.cts +8 -0
- package/dist/autogen/types/rpc/params-verify-identity-proof.d.cts +6 -0
- package/dist/autogen/types/rpc/result-dump-accounts.d.cts +4 -0
- package/dist/autogen/types/rpc/rpc-bool-result.d.cts +3 -0
- package/dist/autogen/types/rpc/rpc-calculate-spent-by-express-result.d.cts +3 -0
- package/dist/autogen/types/rpc/rpc-create-account-result.d.cts +7 -0
- package/dist/autogen/types/rpc/rpc-create-node-result.d.cts +5 -0
- package/dist/autogen/types/rpc/rpc-create-tx-result.d.cts +7 -0
- package/dist/autogen/types/rpc/rpc-find-duplicate-subscriber-result.d.cts +3 -0
- package/dist/autogen/types/rpc/rpc-game-chain-cmd-result.d.cts +3 -0
- package/dist/autogen/types/rpc/rpc-generate-latest-stored-data-proof-result.d.cts +4 -0
- package/dist/autogen/types/rpc/rpc-get-account-asset-list-result.d.cts +4 -0
- package/dist/autogen/types/rpc/rpc-get-account-asset-object-result.d.cts +5 -0
- package/dist/autogen/types/rpc/rpc-get-account-detail-result.d.cts +11 -0
- package/dist/autogen/types/rpc/rpc-get-account-history-result.d.cts +3 -0
- package/dist/autogen/types/rpc/rpc-get-account-token-list-result.d.cts +6 -0
- package/dist/autogen/types/rpc/rpc-get-accounts-balances-result.d.cts +3 -0
- package/dist/autogen/types/rpc/rpc-get-accounts-heights-result.d.cts +3 -0
- package/dist/autogen/types/rpc/rpc-get-concise-node-status-result.d.cts +18 -0
- package/dist/autogen/types/rpc/rpc-get-contract-log-result.d.cts +3 -0
- package/dist/autogen/types/rpc/rpc-get-genesis-account-result.d.cts +3 -0
- package/dist/autogen/types/rpc/rpc-get-guests-info-result.d.cts +3 -0
- package/dist/autogen/types/rpc/rpc-get-home-shard-result.d.cts +3 -0
- package/dist/autogen/types/rpc/rpc-get-identity-proof-result.d.cts +6 -0
- package/dist/autogen/types/rpc/rpc-get-import-account-result.d.cts +10 -0
- package/dist/autogen/types/rpc/rpc-get-inactive-tx-list-result.d.cts +14 -0
- package/dist/autogen/types/rpc/rpc-get-keys-result.d.cts +7 -0
- package/dist/autogen/types/rpc/rpc-get-mont-info-list-result.d.cts +5 -0
- package/dist/autogen/types/rpc/rpc-get-node-blocks-result.d.cts +3 -0
- package/dist/autogen/types/rpc/rpc-get-node-status-result.d.cts +28 -0
- package/dist/autogen/types/rpc/rpc-get-shard-of-account-result.d.cts +4 -0
- package/dist/autogen/types/rpc/rpc-get-sync-state-result.d.cts +3 -0
- package/dist/autogen/types/rpc/rpc-get-tx-result.d.cts +3 -0
- package/dist/autogen/types/rpc/rpc-get-world-round-state-result.d.cts +13 -0
- package/dist/autogen/types/rpc/rpc-get-world-round-states-list-result.d.cts +3 -0
- package/dist/autogen/types/rpc/rpc-has-system-token-result.d.cts +4 -0
- package/dist/autogen/types/rpc/rpc-import-account-result.d.cts +3 -0
- package/dist/autogen/types/rpc/rpc-node-cmd-result.d.cts +5 -0
- package/dist/autogen/types/rpc/rpc-query-address-result.d.cts +3 -0
- package/dist/autogen/types/rpc/rpc-read-tx-list-witness-result.d.cts +6 -0
- package/dist/autogen/types/rpc/rpc-request-vme-result.d.cts +3 -0
- package/dist/autogen/types/rpc/rpc-send-raw-transaction-result.d.cts +1 -0
- package/dist/autogen/types/rpc/rpc-set-import-account-tx-result.d.cts +5 -0
- package/dist/autogen/types/rpc/rpc-subscribe-address-result.d.cts +1 -0
- package/dist/autogen/types/rpc/rpc-verify-and-sign-challenge-result.d.cts +8 -0
- package/dist/autogen/types/rpc/rpc-verify-identity-proof-result.d.cts +4 -0
- package/dist/autogen/types/rpc/rpc-view-contract-result.d.cts +3 -0
- package/dist/autogen/types/rpc/upload-heights-result.d.cts +6 -0
- package/dist/autogen/types/tx/index.d.cts +50 -0
- package/dist/autogen/types/tx/tx-accept-script-after-time-lock.d.cts +12 -0
- package/dist/autogen/types/tx/tx-accept-script.d.cts +15 -0
- package/dist/autogen/types/tx/tx-activate-all-assets.d.cts +15 -0
- package/dist/autogen/types/tx/tx-activate-asset-object.d.cts +9 -0
- package/dist/autogen/types/tx/tx-activate-call-contract.d.cts +15 -0
- package/dist/autogen/types/tx/tx-activate-coin.d.cts +9 -0
- package/dist/autogen/types/tx/tx-activate-contract-result.d.cts +18 -0
- package/dist/autogen/types/tx/tx-activate-contract-reward.d.cts +8 -0
- package/dist/autogen/types/tx/tx-activate-contract-transfer.d.cts +15 -0
- package/dist/autogen/types/tx/tx-activate-data-synth-account.d.cts +12 -0
- package/dist/autogen/types/tx/tx-activate-foundation-reserve.d.cts +7 -0
- package/dist/autogen/types/tx/tx-activate-incentive.d.cts +11 -0
- package/dist/autogen/types/tx/tx-activate-lock-stake-for-vme.d.cts +9 -0
- package/dist/autogen/types/tx/tx-activate-open-contract.d.cts +15 -0
- package/dist/autogen/types/tx/tx-activate-open-synth-account.d.cts +9 -0
- package/dist/autogen/types/tx/tx-activate-open-vm-engine.d.cts +11 -0
- package/dist/autogen/types/tx/tx-activate-token.d.cts +12 -0
- package/dist/autogen/types/tx/tx-become-guest.d.cts +10 -0
- package/dist/autogen/types/tx/tx-become-host.d.cts +7 -0
- package/dist/autogen/types/tx/tx-burn-asset-object.d.cts +8 -0
- package/dist/autogen/types/tx/tx-burn-token.d.cts +10 -0
- package/dist/autogen/types/tx/tx-call-contract.d.cts +16 -0
- package/dist/autogen/types/tx/tx-change-foundation-account.d.cts +6 -0
- package/dist/autogen/types/tx/tx-change-keypair.d.cts +10 -0
- package/dist/autogen/types/tx/tx-change-vkey.d.cts +6 -0
- package/dist/autogen/types/tx/tx-close-account.d.cts +12 -0
- package/dist/autogen/types/tx/tx-contract-blank-reward.d.cts +5 -0
- package/dist/autogen/types/tx/tx-contract-transfer-reward.d.cts +8 -0
- package/dist/autogen/types/tx/tx-create-asset-object.d.cts +10 -0
- package/dist/autogen/types/tx/tx-create-contract.d.cts +17 -0
- package/dist/autogen/types/tx/tx-create-synth-account.d.cts +7 -0
- package/dist/autogen/types/tx/tx-create-token.d.cts +10 -0
- package/dist/autogen/types/tx/tx-create-vm-engine.d.cts +8 -0
- package/dist/autogen/types/tx/tx-dummy.d.cts +3 -0
- package/dist/autogen/types/tx/tx-finalize.d.cts +6 -0
- package/dist/autogen/types/tx/tx-freeze-account.d.cts +5 -0
- package/dist/autogen/types/tx/tx-genesis-account.d.cts +11 -0
- package/dist/autogen/types/tx/tx-lead-vtx.d.cts +9 -0
- package/dist/autogen/types/tx/tx-lock-stake-for-vme.d.cts +7 -0
- package/dist/autogen/types/tx/tx-open-account.d.cts +18 -0
- package/dist/autogen/types/tx/tx-post-data-synth-account.d.cts +9 -0
- package/dist/autogen/types/tx/tx-post-data.d.cts +11 -0
- package/dist/autogen/types/tx/tx-provide-script.d.cts +16 -0
- package/dist/autogen/types/tx/tx-revoke.d.cts +16 -0
- package/dist/autogen/types/tx/tx-transfer-asset-object.d.cts +8 -0
- package/dist/autogen/types/tx/tx-transfer-coin-express.d.cts +8 -0
- package/dist/autogen/types/tx/tx-transfer-coin.d.cts +7 -0
- package/dist/autogen/types/tx/tx-transfer-token.d.cts +11 -0
- package/dist/autogen/types/tx/tx-unlock-stake.d.cts +7 -0
- package/dist/autogen/types/tx/tx-vm-engine-block.d.cts +6 -0
- package/dist/autogen/types/wasm/grant-consume-result.d.cts +4 -0
- package/dist/autogen/types/wasm/index.d.cts +26 -0
- package/dist/autogen/types/wasm/library-versions.d.cts +6 -0
- package/dist/autogen/types/wasm/param-calculate-tx-link-hash.d.cts +3 -0
- package/dist/autogen/types/wasm/param-code-core-script.d.cts +3 -0
- package/dist/autogen/types/wasm/param-convert-currency.d.cts +5 -0
- package/dist/autogen/types/wasm/param-create-account-and-keystore.d.cts +6 -0
- package/dist/autogen/types/wasm/param-create-master-keystore.d.cts +6 -0
- package/dist/autogen/types/wasm/param-create-normal-key.d.cts +4 -0
- package/dist/autogen/types/wasm/param-create-normal-keystore.d.cts +8 -0
- package/dist/autogen/types/wasm/param-derive-keys-from-mnemonic-and-path.d.cts +4 -0
- package/dist/autogen/types/wasm/param-derive-keys-from-mnemonic.d.cts +6 -0
- package/dist/autogen/types/wasm/param-encode-tx-currency.d.cts +3 -0
- package/dist/autogen/types/wasm/param-encode-tx-number.d.cts +4 -0
- package/dist/autogen/types/wasm/param-generate-mnemonic-by-seed.d.cts +3 -0
- package/dist/autogen/types/wasm/param-generate-mnemonic.d.cts +3 -0
- package/dist/autogen/types/wasm/param-get-home-shard.d.cts +4 -0
- package/dist/autogen/types/wasm/param-hash.d.cts +4 -0
- package/dist/autogen/types/wasm/param-load-keystore.d.cts +4 -0
- package/dist/autogen/types/wasm/param-make-currency.d.cts +4 -0
- package/dist/autogen/types/wasm/param-sign-by-master-key.d.cts +4 -0
- package/dist/autogen/types/wasm/param-sign-key-bind.d.cts +5 -0
- package/dist/autogen/types/wasm/param-sign.d.cts +4 -0
- package/dist/autogen/types/wasm/param-test-core-script.d.cts +7 -0
- package/dist/autogen/types/wasm/param-txs.d.cts +3 -0
- package/dist/autogen/types/wasm/param-verify-merkle-proof.d.cts +5 -0
- package/dist/autogen/types/wasm/param-verify.d.cts +5 -0
- package/dist/autogen/walletActions.d.cts +43 -0
- package/dist/autogen/wasm/crypto_aimer.d.cts +2 -0
- package/dist/autogen/wasm/crypto_haetae.d.cts +2 -0
- package/dist/autogen/wasm/crypto_smaugt.d.cts +2 -0
- package/dist/autogen/wasm/lclib.wasm +0 -0
- package/dist/autogen/wasm.d.cts +72 -0
- package/dist/clients/createClient.d.cts +8 -0
- package/dist/clients/createLocusPublicClient.d.cts +100 -0
- package/dist/clients/createLocusWalletClient.d.cts +57 -0
- package/dist/clients/createPublicClient.d.cts +6 -0
- package/dist/clients/createWalletClient.d.cts +8 -0
- package/dist/clients/index.d.cts +6 -6
- package/dist/clients/types.d.cts +21 -0
- package/dist/clients/types.d.mts +2 -0
- package/dist/constant/index.d.cts +2 -2
- package/dist/contracts/abis/erc20.d.cts +174 -0
- package/dist/contracts/abis/index.d.cts +1 -0
- package/dist/contracts/getContract.d.cts +33 -0
- package/dist/contracts/index.d.cts +2 -2
- package/dist/errors/account.d.cts +45 -0
- package/dist/errors/base.d.cts +13 -0
- package/dist/errors/index.d.cts +4 -4
- package/dist/errors/rpc.d.cts +21 -0
- package/dist/errors/transport.d.cts +21 -0
- package/dist/index.d.cts +8 -0
- package/dist/transports/http.d.cts +9 -0
- package/dist/transports/index.d.cts +2 -2
- package/dist/transports/types.d.cts +38 -0
- package/dist/transports/types.d.mts +2 -0
- package/dist/types/index.d.cts +5 -5
- package/dist/types/primitives.d.cts +5 -0
- package/dist/utils/abi.d.cts +88 -0
- package/dist/utils/index.d.cts +5 -5
- package/dist/utils/keystore.d.cts +87 -0
- package/dist/utils/lclib.d.cts +2 -0
- package/dist/utils/locus-wasm-bridge.d.cts +1 -0
- package/dist/utils/tx-validator.d.cts +28 -0
- package/dist/utils/types.d.cts +15 -0
- package/dist/utils/wasm-fetch.d.cts +6 -0
- package/package.json +2 -2
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { GrantConsumeResult } from './types/wasm/grant-consume-result.cjs';
|
|
2
|
+
import { LibraryVersions } from './types/wasm/library-versions.cjs';
|
|
3
|
+
import { ParamCalculateTxLinkHash } from './types/wasm/param-calculate-tx-link-hash.cjs';
|
|
4
|
+
import { ParamCodeCoreScript } from './types/wasm/param-code-core-script.cjs';
|
|
5
|
+
import { ParamConvertCurrency } from './types/wasm/param-convert-currency.cjs';
|
|
6
|
+
import { ParamCreateAccountAndKeystore } from './types/wasm/param-create-account-and-keystore.cjs';
|
|
7
|
+
import { ParamCreateMasterKeystore } from './types/wasm/param-create-master-keystore.cjs';
|
|
8
|
+
import { ParamCreateNormalKey } from './types/wasm/param-create-normal-key.cjs';
|
|
9
|
+
import { ParamCreateNormalKeystore } from './types/wasm/param-create-normal-keystore.cjs';
|
|
10
|
+
import { ParamDeriveKeysFromMnemonicAndPath } from './types/wasm/param-derive-keys-from-mnemonic-and-path.cjs';
|
|
11
|
+
import { ParamDeriveKeysFromMnemonic } from './types/wasm/param-derive-keys-from-mnemonic.cjs';
|
|
12
|
+
import { ParamEncodeTxCurrency } from './types/wasm/param-encode-tx-currency.cjs';
|
|
13
|
+
import { ParamEncodeTxNumber } from './types/wasm/param-encode-tx-number.cjs';
|
|
14
|
+
import { ParamGenerateMnemonicBySeed } from './types/wasm/param-generate-mnemonic-by-seed.cjs';
|
|
15
|
+
import { ParamGenerateMnemonic } from './types/wasm/param-generate-mnemonic.cjs';
|
|
16
|
+
import { ParamGetHomeShard } from './types/wasm/param-get-home-shard.cjs';
|
|
17
|
+
import { ParamHash } from './types/wasm/param-hash.cjs';
|
|
18
|
+
import { ParamLoadKeystore } from './types/wasm/param-load-keystore.cjs';
|
|
19
|
+
import { ParamMakeCurrency } from './types/wasm/param-make-currency.cjs';
|
|
20
|
+
import { ParamSignByMasterKey } from './types/wasm/param-sign-by-master-key.cjs';
|
|
21
|
+
import { ParamSignKeyBind } from './types/wasm/param-sign-key-bind.cjs';
|
|
22
|
+
import { ParamSign } from './types/wasm/param-sign.cjs';
|
|
23
|
+
import { ParamTestCoreScript } from './types/wasm/param-test-core-script.cjs';
|
|
24
|
+
import { ParamTxs } from './types/wasm/param-txs.cjs';
|
|
25
|
+
import { ParamVerifyMerkleProof } from './types/wasm/param-verify-merkle-proof.cjs';
|
|
26
|
+
import { ParamVerify } from './types/wasm/param-verify.cjs';
|
|
27
|
+
export declare const calculateTxLinkHash: (params: ParamCalculateTxLinkHash) => string;
|
|
28
|
+
export declare const compileCoreScript: (params: ParamCodeCoreScript) => string;
|
|
29
|
+
export declare const convertAddressToData: (addrEncoded: string) => string;
|
|
30
|
+
export declare const convertAddressToHex: (addrEncoded: string) => string;
|
|
31
|
+
export declare const convertBase32ToData: (encoded: string) => string;
|
|
32
|
+
export declare const convertBase32ToHex: (encoded: string) => string;
|
|
33
|
+
export declare const convertCurrency: (params: ParamConvertCurrency) => string;
|
|
34
|
+
export declare const convertDataTo: (value: string, retType: number) => string;
|
|
35
|
+
export declare const convertDataToAddress: (str: string) => string;
|
|
36
|
+
export declare const convertDataToBase32: (str: string) => string;
|
|
37
|
+
export declare const convertDataToHex: (str: string) => string;
|
|
38
|
+
export declare const convertDataToString: (str: string) => string;
|
|
39
|
+
export declare const convertHexToAddress: (hexString: string) => string;
|
|
40
|
+
export declare const convertHexToBase32: (hexString: string) => string;
|
|
41
|
+
export declare const convertHexToData: (encoded: string) => string;
|
|
42
|
+
export declare const convertStringToData: (raw: string) => string;
|
|
43
|
+
export declare const convertToData: (value: string, valueType: number) => string;
|
|
44
|
+
export declare const createAccountAndKeystore: (params: ParamCreateAccountAndKeystore) => string;
|
|
45
|
+
export declare const createMasterKeystore: (params: ParamCreateMasterKeystore) => string;
|
|
46
|
+
export declare const createNormalKey: (params: ParamCreateNormalKey) => string;
|
|
47
|
+
export declare const createNormalKeystore: (params: ParamCreateNormalKeystore) => string;
|
|
48
|
+
export declare const decodeTxs: (params: ParamTxs) => string;
|
|
49
|
+
export declare const deriveKeysFromMnemonic: (params: ParamDeriveKeysFromMnemonic) => string;
|
|
50
|
+
export declare const deriveKeysFromMnemonicAndPath: (params: ParamDeriveKeysFromMnemonicAndPath) => string;
|
|
51
|
+
export declare const disCompileCoreScript: (params: ParamCodeCoreScript) => string;
|
|
52
|
+
export declare const encodeTxCurrency: (params: ParamEncodeTxCurrency) => string;
|
|
53
|
+
export declare const encodeTxNumber: (params: ParamEncodeTxNumber) => string;
|
|
54
|
+
export declare const generateMnemonic: (params: ParamGenerateMnemonic) => string;
|
|
55
|
+
export declare const generateMnemonicBySeed: (params: ParamGenerateMnemonicBySeed) => string;
|
|
56
|
+
export declare const getDefFromCoreScript: (params: ParamCodeCoreScript) => string;
|
|
57
|
+
export declare const getHomeShard: (params: ParamGetHomeShard) => number;
|
|
58
|
+
export declare const getLibraryVersions: () => LibraryVersions;
|
|
59
|
+
export declare const gzipAndEncode: (str: string) => string;
|
|
60
|
+
export declare const hash: (params: ParamHash) => string;
|
|
61
|
+
export declare const isGrantConsumingTx: (txTypeStr: string) => GrantConsumeResult;
|
|
62
|
+
export declare const loadMasterKeystore: (params: ParamLoadKeystore) => string;
|
|
63
|
+
export declare const loadNormalKeystore: (params: ParamLoadKeystore) => string;
|
|
64
|
+
export declare const makeCurrency: (params: ParamMakeCurrency) => string;
|
|
65
|
+
export declare const sign: (param: ParamSign) => string;
|
|
66
|
+
export declare const signByMasterKey: (params: ParamSignByMasterKey) => string;
|
|
67
|
+
export declare const signKeyBind: (params: ParamSignKeyBind) => string;
|
|
68
|
+
export declare const testCoreScript: (params: ParamTestCoreScript) => string;
|
|
69
|
+
export declare const verify: (params: ParamVerify) => string;
|
|
70
|
+
export declare const verifyByMasterKey: (params: ParamVerify) => string;
|
|
71
|
+
export declare const verifyMerkleProof: (params: ParamVerifyMerkleProof) => boolean;
|
|
72
|
+
export declare const verifyTx: (jsonTx: string) => string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { DualKeyAccount } from '../accounts/types.cjs';
|
|
2
|
+
import type { Transport } from '../transports/types.cjs';
|
|
3
|
+
import type { Client } from './types.cjs';
|
|
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>;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import type { TransportConfig } from '../transports/types.cjs';
|
|
2
|
+
export type CreateLocusPublicClientArgs = {
|
|
3
|
+
/** JSON-RPC 엔드포인트 URL. */
|
|
4
|
+
rpcUrl: string;
|
|
5
|
+
/**
|
|
6
|
+
* 선택적 HTTP 트랜스포트 설정. 로드밸런서 힌트 (예: Locus `locuslb` 헤더)
|
|
7
|
+
* 같은 용도로 `headers` 를 넘길 수 있다. `http()` 의 모든 옵션을 그대로 받는다.
|
|
8
|
+
*/
|
|
9
|
+
transport?: TransportConfig;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Locus 읽기 전용 클라이언트의 one-call 생성자.
|
|
13
|
+
*
|
|
14
|
+
* bare {@link createPublicClient} 를 HTTP 트랜스포트와 함께 감싸고, 두 표준
|
|
15
|
+
* read 액션 셋 (`publicActions` + `debugPublicActions`) 을 단일 `.extend()`
|
|
16
|
+
* 호출로 합쳐 부착한다. 반환된 클라이언트는 두 셋 모두 정적 타입이 잡힌
|
|
17
|
+
* 상태로 노출된다.
|
|
18
|
+
*
|
|
19
|
+
* 생성 이후엔 모든 read RPC (`locus_getNodeStatus`, `locus_getAccountDetail`,
|
|
20
|
+
* `calculateSpentByExpress`, `debug_viewContract`, ...) 가 타입이 잡힌
|
|
21
|
+
* 메서드로 호출 가능:
|
|
22
|
+
*
|
|
23
|
+
* ```ts
|
|
24
|
+
* const client = createLocusPublicClient({ rpcUrl });
|
|
25
|
+
* const status = await client.getNodeStatus();
|
|
26
|
+
* const balance = await client.getAccountDetail({ account });
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* write TX 용 클라이언트는 {@link createLocusWalletClient} 참고.
|
|
30
|
+
*/
|
|
31
|
+
export declare function createLocusPublicClient(args: CreateLocusPublicClientArgs): import("./types.cjs").Client<undefined> & {
|
|
32
|
+
readonly allHeights: () => Promise<import("../index.cjs").RpcAccountHeight[]>;
|
|
33
|
+
readonly balanceGrantList: () => Promise<string[]>;
|
|
34
|
+
readonly balanceList: () => Promise<string[]>;
|
|
35
|
+
readonly createAccount: () => Promise<import("../index.cjs").RpcCreateAccountResult>;
|
|
36
|
+
readonly createNode: (param: import("../index.cjs").ParamsCreateNode) => Promise<import("../index.cjs").RpcCreateNodeResult>;
|
|
37
|
+
readonly dumpAllAccounts: () => Promise<import("../index.cjs").ResultDumpAccounts>;
|
|
38
|
+
readonly echo: (str: string) => Promise<string>;
|
|
39
|
+
readonly gameChainCmd: (param: import("../index.cjs").ParamsGameChainCmd) => Promise<import("../index.cjs").RpcGameChainCmdResult>;
|
|
40
|
+
readonly getAccountsBalances: (param: import("../index.cjs").ParamsAccounts) => Promise<import("../index.cjs").RpcGetAccountsBalancesResult>;
|
|
41
|
+
readonly getAccountsHeights: (param: import("../index.cjs").ParamsAccounts) => Promise<import("../index.cjs").RpcGetAccountsHeightsResult>;
|
|
42
|
+
readonly getContractLog: (param: import("../index.cjs").ParamsContractLog) => Promise<import("../index.cjs").RpcGetContractLogResult>;
|
|
43
|
+
readonly getGuestsInfo: () => Promise<import("../index.cjs").RpcGetGuestsInfoResult>;
|
|
44
|
+
readonly getHomeShard: (param: import("../index.cjs").ParamsGetHomeShard) => Promise<import("../index.cjs").RpcGetHomeShardResult>;
|
|
45
|
+
readonly getImportAccount: (params: import("../index.cjs").ParamsGetImportAccount) => Promise<import("../index.cjs").RpcGetImportAccountResult>;
|
|
46
|
+
readonly getImportAccountLog: (params: import("../index.cjs").ParamsGetImportAccount) => Promise<import("../index.cjs").RpcImportAccountResult>;
|
|
47
|
+
readonly getKeys: (params: import("../index.cjs").ParamsAccount) => Promise<import("../index.cjs").RpcGetKeysResult>;
|
|
48
|
+
readonly getNodeBlocks: () => Promise<import("../index.cjs").RpcGetNodeBlocksResult>;
|
|
49
|
+
readonly getPeerPool: () => Promise<string[]>;
|
|
50
|
+
readonly getPeersInfo: () => Promise<import("../index.cjs").GetPeersInfo>;
|
|
51
|
+
readonly importAccount: (params: import("../index.cjs").ParamsImportAccount) => Promise<import("../index.cjs").RpcImportAccountResult>;
|
|
52
|
+
readonly initReliableNodes: (param: import("../index.cjs").ParamsInitReliableNodes) => Promise<import("../index.cjs").RpcBoolResult>;
|
|
53
|
+
readonly noArgsRets: () => Promise<any>;
|
|
54
|
+
readonly nodeCmd: (cmd: string) => Promise<import("../index.cjs").RpcNodeCmdResult>;
|
|
55
|
+
readonly removeHoldTxs: (param: import("../index.cjs").ParamsRemoveHoldTxs) => Promise<import("../index.cjs").RetTypeBase>;
|
|
56
|
+
readonly requestVme: (params: import("../index.cjs").ParamsRequestVme) => Promise<import("../index.cjs").RpcRequestVmeResult>;
|
|
57
|
+
readonly sendRawTransaction: (params: import("../index.cjs").ParamsSendRawTransaction) => Promise<import("../index.cjs").RpcSendRawTransactionResult>;
|
|
58
|
+
readonly setImportAccountTx: (params: import("../index.cjs").ParamsSetImportAccountTx) => Promise<import("../index.cjs").RpcSetImportAccountTxResult>;
|
|
59
|
+
readonly setReliableNode: (param: import("../index.cjs").ParamsSetReliableNode) => Promise<import("../index.cjs").RpcBoolResult>;
|
|
60
|
+
readonly viewContract: (param: import("../index.cjs").ParamsCallContract) => Promise<import("../index.cjs").RpcViewContractResult>;
|
|
61
|
+
readonly accountHeightsToDownload: (param: import("../index.cjs").ParamsAccountHeights) => Promise<import("../index.cjs").HeightsResult>;
|
|
62
|
+
readonly accountHeightsToUpload: (param: import("../index.cjs").ParamsAccountHeights) => Promise<import("../index.cjs").UploadHeightsResult>;
|
|
63
|
+
readonly calculateSpentByExpress: (param: import("../index.cjs").ParamsCalculateSpentByExpress) => Promise<import("../index.cjs").RpcCalculateSpentByExpressResult>;
|
|
64
|
+
readonly clientMessage: (param: import("../index.cjs").ParamStr) => Promise<any>;
|
|
65
|
+
readonly downloadAccountTxs: (param: import("../index.cjs").ParamsDownloadAccountTxs) => Promise<import("../index.cjs").OutputDownloadAccountTxs>;
|
|
66
|
+
readonly findDuplicateSubscriber: (params: import("../index.cjs").ParamsFindDuplicateSubscriber) => Promise<import("../index.cjs").RpcFindDuplicateSubscriberResult>;
|
|
67
|
+
readonly generateLatestStoredDataProof: (params: import("../index.cjs").ParamsGenerateLatestStoredDataProof) => Promise<import("../index.cjs").RpcGenerateLatestStoredDataProofResult>;
|
|
68
|
+
readonly getAccountAssetList: (params: import("../index.cjs").ParamsGetAssetList) => Promise<import("../index.cjs").RpcGetAccountAssetListResult>;
|
|
69
|
+
readonly getAccountAssetObject: (params: import("../index.cjs").ParamsGetAssetObjects) => Promise<import("../index.cjs").RpcGetAccountAssetObjectResult>;
|
|
70
|
+
readonly getAccountDetail: (param: import("../index.cjs").ParamsAccount) => Promise<import("../index.cjs").RpcGetAccountDetailResult>;
|
|
71
|
+
readonly getAccountHistory: (param: import("../index.cjs").ParamsAccountHistory) => Promise<import("../index.cjs").RpcGetAccountHistoryResult>;
|
|
72
|
+
readonly getAccountTokenList: (params: import("../index.cjs").ParamsAccount) => Promise<import("../index.cjs").RpcGetAccountTokenListResult>;
|
|
73
|
+
readonly getConciseNodeStatus: () => Promise<import("../index.cjs").RpcGetConciseNodeStatusResult>;
|
|
74
|
+
readonly getGenesisAccount: () => Promise<import("../index.cjs").RpcGetGenesisAccountResult>;
|
|
75
|
+
readonly getIdentityProof: (param: import("../index.cjs").ParamsGetIdentityProof) => Promise<import("../index.cjs").RpcGetIdentityProofResult>;
|
|
76
|
+
readonly getInactiveTxList: (param: import("../index.cjs").ParamsAccount) => Promise<import("../index.cjs").RpcGetInactiveTxListResult>;
|
|
77
|
+
readonly getMontInfoList: (param: import("../index.cjs").ParamsAccount) => Promise<import("../index.cjs").RpcGetMontInfoListResult>;
|
|
78
|
+
readonly getNodeStatus: () => Promise<import("../index.cjs").RpcGetNodeStatusResult>;
|
|
79
|
+
readonly getOwnerBalance: () => Promise<import("../index.cjs").RpcAccountsBalancesResult[]>;
|
|
80
|
+
readonly getRoundState: (param: import("../index.cjs").ParamsRound) => Promise<import("../index.cjs").RoundStateDetail>;
|
|
81
|
+
readonly getRoundStatesList: (param: import("../index.cjs").ParamsRS) => Promise<import("../index.cjs").RoundStateAbstract[]>;
|
|
82
|
+
readonly getShardOfAccount: (params: import("../index.cjs").ParamsAccount) => Promise<import("../index.cjs").RpcGetShardOfAccountResult>;
|
|
83
|
+
readonly getSyncState: () => Promise<import("../index.cjs").RpcGetSyncStateResult>;
|
|
84
|
+
readonly getTx: (param: import("../index.cjs").ParamsAccountAndIndex) => Promise<import("../index.cjs").RpcGetTxResult>;
|
|
85
|
+
readonly getWorldRoundState: (param: import("../index.cjs").ParamsRound) => Promise<import("../index.cjs").RpcGetWorldRoundStateResult>;
|
|
86
|
+
readonly getWorldRoundStatesList: (param: import("../index.cjs").ParamsRoundList) => Promise<import("../index.cjs").RpcGetWorldRoundStatesListResult>;
|
|
87
|
+
readonly hasSystemToken: (params: import("../index.cjs").ParamsAccount) => Promise<import("../index.cjs").RpcHasSystemTokenResult>;
|
|
88
|
+
readonly makeTxProof: (params: import("../index.cjs").ParamsTxList) => Promise<import("../index.cjs").RpcReadTxListWitnessResult>;
|
|
89
|
+
readonly queryAddress: (params: import("../index.cjs").ParamsQueryAddress) => Promise<import("../index.cjs").RpcQueryAddressResult>;
|
|
90
|
+
readonly readTxListWitness: (params: import("../index.cjs").ParamsReadTxList) => Promise<import("../index.cjs").RpcReadTxListWitnessResult>;
|
|
91
|
+
readonly setHost: (param: import("../index.cjs").ParamsSetHost) => Promise<boolean>;
|
|
92
|
+
readonly subscribeAddress: (params: import("../index.cjs").ParamsSubscribeAddress) => Promise<import("../index.cjs").RpcSubscribeAddressResult>;
|
|
93
|
+
readonly uploadAccountTxs: (param: import("../index.cjs").ParamsUploadAccountTxs) => Promise<number[]>;
|
|
94
|
+
readonly verifyAndSignChallenge: (param: import("../index.cjs").ParamsVerifyAndSignChallenge) => Promise<import("../index.cjs").RpcVerifyAndSignChallengeResult>;
|
|
95
|
+
readonly verifyIdentityProof: (param: import("../index.cjs").ParamsVerifyIdentityProof) => Promise<import("../index.cjs").RpcVerifyIdentityProofResult>;
|
|
96
|
+
readonly verifyLatestStoredDataProof: (params: import("../index.cjs").ParamsLatestStoredDataProof) => Promise<boolean>;
|
|
97
|
+
readonly verifyTxListWitness: (params: import("../index.cjs").ParamsTxListWitness) => Promise<boolean>;
|
|
98
|
+
};
|
|
99
|
+
/** 추론된 반환 타입 — 이 클라이언트를 담는 필드/변수의 타입 선언에 사용. */
|
|
100
|
+
export type LocusPublicClient = ReturnType<typeof createLocusPublicClient>;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { DualKeyAccount } from '../accounts/types.cjs';
|
|
2
|
+
import type { TransportConfig } from '../transports/types.cjs';
|
|
3
|
+
export type CreateLocusWalletClientArgs = {
|
|
4
|
+
/** JSON-RPC 엔드포인트 URL. */
|
|
5
|
+
rpcUrl: string;
|
|
6
|
+
/** 트랜잭션 서명에 쓰는 account. `keysToAccount` / `toAccount` 로 만든다. */
|
|
7
|
+
account: DualKeyAccount;
|
|
8
|
+
/**
|
|
9
|
+
* 선택적 HTTP 트랜스포트 설정. 로드밸런서 힌트 (예: Locus `locuslb` 헤더)
|
|
10
|
+
* 같은 용도로 `headers` 를 넘길 수 있다. `http()` 의 모든 옵션을 그대로 받는다.
|
|
11
|
+
*/
|
|
12
|
+
transport?: TransportConfig;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Locus write 클라이언트의 one-call 생성자.
|
|
16
|
+
*
|
|
17
|
+
* bare {@link createWalletClient} 를 HTTP 트랜스포트와 함께 감싸고, 두 표준
|
|
18
|
+
* write 액션 셋 (`walletActions` + `debugWalletActions`) 을 단일 `.extend()`
|
|
19
|
+
* 호출로 합쳐 부착한다. 반환된 클라이언트는 두 셋 모두 정적 타입이 잡힌
|
|
20
|
+
* 상태로 노출된다.
|
|
21
|
+
*
|
|
22
|
+
* 생성 이후엔 모든 write RPC (`transferCoin`, `openAccount`, `changeKey`,
|
|
23
|
+
* `closeAccount`, `callContract`, `debug_createContract`, ...) 가 타입이
|
|
24
|
+
* 잡힌 메서드로 호출 가능. 각 호출은 내부적으로 prepare → sign → submit
|
|
25
|
+
* 파이프라인을 한 번에 돌리며, master/normal 키 라우팅은 `txKeyPolicy` 와
|
|
26
|
+
* 바인드된 `account` 의 `KeySource` 슬롯이 결정한다.
|
|
27
|
+
*
|
|
28
|
+
* 읽기 전용 RPC 는 {@link createLocusPublicClient} 참고.
|
|
29
|
+
*/
|
|
30
|
+
export declare function createLocusWalletClient(args: CreateLocusWalletClientArgs): import("./types.cjs").Client<DualKeyAccount> & {
|
|
31
|
+
readonly callContract: (param: import("../index.cjs").ParamsCallContract) => Promise<import("../index.cjs").RpcCreateTxResult>;
|
|
32
|
+
readonly createContract: (param: import("../index.cjs").ParamsCreateContract) => Promise<import("../index.cjs").RpcCreateTxResult>;
|
|
33
|
+
readonly createSynthAccount: (param: import("../index.cjs").ParamsCreateSynthAccount) => Promise<import("../index.cjs").RpcCreateTxResult>;
|
|
34
|
+
readonly postDataToSynthAccount: (param: import("../index.cjs").ParamsPostDataToSynthAccount) => Promise<import("../index.cjs").RpcCreateTxResult>;
|
|
35
|
+
readonly acceptScript: (params: import("../index.cjs").ParamsAcceptScript) => Promise<import("../index.cjs").RpcCreateTxResult>;
|
|
36
|
+
readonly becomeGuest: (param: import("../index.cjs").ParamsBecomeGuest) => Promise<import("../index.cjs").RpcCreateTxResult>;
|
|
37
|
+
readonly becomeHost: (param: import("../index.cjs").ParamsBecomeHost) => Promise<import("../index.cjs").RpcCreateTxResult>;
|
|
38
|
+
readonly changeKey: (params: import("../index.cjs").ParamsChangeKey) => Promise<import("../index.cjs").RpcCreateTxResult>;
|
|
39
|
+
readonly changeVkey: (params: import("../index.cjs").ParamsChangeVKey) => Promise<import("../index.cjs").RpcCreateTxResult>;
|
|
40
|
+
readonly closeAccount: (param: import("../index.cjs").ParamsCloseAccount) => Promise<import("../index.cjs").RpcCreateTxResult>;
|
|
41
|
+
readonly createAssetObject: (param: import("../index.cjs").ParamsCreateAssetObject) => Promise<import("../index.cjs").RpcCreateTxResult>;
|
|
42
|
+
readonly createToken: (param: import("../index.cjs").ParamsCreateToken) => Promise<import("../index.cjs").RpcCreateTxResult>;
|
|
43
|
+
readonly createVme: (param: import("../index.cjs").ParamsCreateVme) => Promise<import("../index.cjs").RpcCreateTxResult>;
|
|
44
|
+
readonly freezeAccount: (params: import("../index.cjs").ParamsFreezeAccount) => Promise<import("../index.cjs").RpcCreateTxResult>;
|
|
45
|
+
readonly lockStake: (params: import("../index.cjs").ParamsLockStake) => Promise<import("../index.cjs").RpcCreateTxResult>;
|
|
46
|
+
readonly openAccount: (param: import("../index.cjs").ParamsOpenAccount) => Promise<import("../index.cjs").RpcCreateTxResult>;
|
|
47
|
+
readonly postData: (params: import("../index.cjs").InputParamsDataTransfer) => Promise<import("../index.cjs").RpcCreateTxResult>;
|
|
48
|
+
readonly provideScript: (params: import("../index.cjs").ParamsProvideScript) => Promise<import("../index.cjs").RpcCreateTxResult>;
|
|
49
|
+
readonly requestDataTrade: (params: import("../index.cjs").ParamsRequestDataTrade) => Promise<import("../index.cjs").RpcDataTradeResult>;
|
|
50
|
+
readonly transferAssetObject: (params: import("../index.cjs").ParamsTransferAssetObject) => Promise<import("../index.cjs").RpcCreateTxResult>;
|
|
51
|
+
readonly transferCoin: (param: import("../index.cjs").ParamsTransferCoin) => Promise<import("../index.cjs").RpcCreateTxResult>;
|
|
52
|
+
readonly transferCoinExpress: (param: import("../index.cjs").ParamsTransferCoinExpress) => Promise<import("../index.cjs").RpcCreateTxResult>;
|
|
53
|
+
readonly transferToken: (params: import("../index.cjs").ParamsTransferTokens) => Promise<import("../index.cjs").RpcCreateTxResult>;
|
|
54
|
+
readonly unlockStake: (params: import("../index.cjs").ParamsUnlockStake) => Promise<import("../index.cjs").RpcCreateTxResult>;
|
|
55
|
+
};
|
|
56
|
+
/** 추론된 반환 타입 — 이 클라이언트를 담는 필드/변수의 타입 선언에 사용. */
|
|
57
|
+
export type LocusWalletClient = ReturnType<typeof createLocusWalletClient>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { DualKeyAccount } from '../accounts/types.cjs';
|
|
2
|
+
import type { Transport } from '../transports/types.cjs';
|
|
3
|
+
import type { WalletClient } from './types.cjs';
|
|
4
|
+
export type CreateWalletClientArgs = {
|
|
5
|
+
transport: Transport;
|
|
6
|
+
account: DualKeyAccount;
|
|
7
|
+
};
|
|
8
|
+
export declare function createWalletClient(args: CreateWalletClientArgs): WalletClient;
|
package/dist/clients/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './types.
|
|
2
|
-
export * from './createClient.
|
|
3
|
-
export * from './createPublicClient.
|
|
4
|
-
export * from './createWalletClient.
|
|
5
|
-
export * from './createLocusPublicClient.
|
|
6
|
-
export * from './createLocusWalletClient.
|
|
1
|
+
export * from './types.cjs';
|
|
2
|
+
export * from './createClient.cjs';
|
|
3
|
+
export * from './createPublicClient.cjs';
|
|
4
|
+
export * from './createWalletClient.cjs';
|
|
5
|
+
export * from './createLocusPublicClient.cjs';
|
|
6
|
+
export * from './createLocusWalletClient.cjs';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { DualKeyAccount } from '../accounts/types.cjs';
|
|
2
|
+
import type { TransportInstance } from '../transports/types.cjs';
|
|
3
|
+
type HeadersInit = Record<string, string>;
|
|
4
|
+
export type ClientRequestArgs = {
|
|
5
|
+
method: string;
|
|
6
|
+
params: readonly unknown[];
|
|
7
|
+
};
|
|
8
|
+
export type ClientRequestOptions = {
|
|
9
|
+
signal?: AbortSignal;
|
|
10
|
+
headers?: HeadersInit;
|
|
11
|
+
};
|
|
12
|
+
export type ClientRequestFn = <T = any>(args: ClientRequestArgs, opts?: ClientRequestOptions) => Promise<T>;
|
|
13
|
+
export type Client<TAccount extends DualKeyAccount | undefined = DualKeyAccount | undefined> = {
|
|
14
|
+
transport: TransportInstance;
|
|
15
|
+
account: TAccount;
|
|
16
|
+
request: ClientRequestFn;
|
|
17
|
+
extend: <const Ext extends object>(fn: (client: Client<TAccount>) => Ext) => Client<TAccount> & Ext;
|
|
18
|
+
};
|
|
19
|
+
export type PublicClient = Client<undefined>;
|
|
20
|
+
export type WalletClient = Client<DualKeyAccount>;
|
|
21
|
+
export {};
|
package/dist/clients/types.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { DualKeyAccount } from '../accounts/types.mjs';
|
|
2
2
|
import type { TransportInstance } from '../transports/types.mjs';
|
|
3
|
+
type HeadersInit = Record<string, string>;
|
|
3
4
|
export type ClientRequestArgs = {
|
|
4
5
|
method: string;
|
|
5
6
|
params: readonly unknown[];
|
|
@@ -17,3 +18,4 @@ export type Client<TAccount extends DualKeyAccount | undefined = DualKeyAccount
|
|
|
17
18
|
};
|
|
18
19
|
export type PublicClient = Client<undefined>;
|
|
19
20
|
export type WalletClient = Client<DualKeyAccount>;
|
|
21
|
+
export {};
|
|
@@ -509,5 +509,5 @@ export declare const FeeType: Readonly<{
|
|
|
509
509
|
readonly GRANT_ONLY: 1;
|
|
510
510
|
}>;
|
|
511
511
|
export type FeeType = (typeof FeeType)[keyof typeof FeeType];
|
|
512
|
-
export * from '../autogen/types/consts/consts.
|
|
513
|
-
export * from '../autogen/types/consts/tx-types.
|
|
512
|
+
export * from '../autogen/types/consts/consts.cjs';
|
|
513
|
+
export * from '../autogen/types/consts/tx-types.cjs';
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* getContract({ abi: erc20Abi, ... }) 에서 쓰는 최소 ERC-20 ABI.
|
|
3
|
+
* 기존 on-chain 컨트랙트와 그대로 매칭되도록 legacy support/erc20-helper/
|
|
4
|
+
* erc20.mts 의 정의를 변경 없이 그대로 옮겨왔다.
|
|
5
|
+
*/
|
|
6
|
+
export declare const erc20Abi: readonly [{
|
|
7
|
+
readonly constant: true;
|
|
8
|
+
readonly inputs: readonly [];
|
|
9
|
+
readonly name: "name";
|
|
10
|
+
readonly outputs: readonly [{
|
|
11
|
+
readonly name: "";
|
|
12
|
+
readonly type: "string";
|
|
13
|
+
}];
|
|
14
|
+
readonly payable: false;
|
|
15
|
+
readonly stateMutability: "view";
|
|
16
|
+
readonly type: "function";
|
|
17
|
+
}, {
|
|
18
|
+
readonly constant: false;
|
|
19
|
+
readonly inputs: readonly [{
|
|
20
|
+
readonly name: "_spender";
|
|
21
|
+
readonly type: "address";
|
|
22
|
+
}, {
|
|
23
|
+
readonly name: "_value";
|
|
24
|
+
readonly type: "uint256";
|
|
25
|
+
}];
|
|
26
|
+
readonly name: "approve";
|
|
27
|
+
readonly outputs: readonly [{
|
|
28
|
+
readonly name: "";
|
|
29
|
+
readonly type: "bool";
|
|
30
|
+
}];
|
|
31
|
+
readonly payable: false;
|
|
32
|
+
readonly stateMutability: "nonpayable";
|
|
33
|
+
readonly type: "function";
|
|
34
|
+
}, {
|
|
35
|
+
readonly constant: true;
|
|
36
|
+
readonly inputs: readonly [];
|
|
37
|
+
readonly name: "totalSupply";
|
|
38
|
+
readonly outputs: readonly [{
|
|
39
|
+
readonly name: "";
|
|
40
|
+
readonly type: "uint256";
|
|
41
|
+
}];
|
|
42
|
+
readonly payable: false;
|
|
43
|
+
readonly stateMutability: "view";
|
|
44
|
+
readonly type: "function";
|
|
45
|
+
}, {
|
|
46
|
+
readonly constant: false;
|
|
47
|
+
readonly inputs: readonly [{
|
|
48
|
+
readonly name: "_from";
|
|
49
|
+
readonly type: "address";
|
|
50
|
+
}, {
|
|
51
|
+
readonly name: "_to";
|
|
52
|
+
readonly type: "address";
|
|
53
|
+
}, {
|
|
54
|
+
readonly name: "_value";
|
|
55
|
+
readonly type: "uint256";
|
|
56
|
+
}];
|
|
57
|
+
readonly name: "transferFrom";
|
|
58
|
+
readonly outputs: readonly [{
|
|
59
|
+
readonly name: "";
|
|
60
|
+
readonly type: "bool";
|
|
61
|
+
}];
|
|
62
|
+
readonly payable: false;
|
|
63
|
+
readonly stateMutability: "nonpayable";
|
|
64
|
+
readonly type: "function";
|
|
65
|
+
}, {
|
|
66
|
+
readonly constant: true;
|
|
67
|
+
readonly inputs: readonly [];
|
|
68
|
+
readonly name: "decimals";
|
|
69
|
+
readonly outputs: readonly [{
|
|
70
|
+
readonly name: "";
|
|
71
|
+
readonly type: "uint8";
|
|
72
|
+
}];
|
|
73
|
+
readonly payable: false;
|
|
74
|
+
readonly stateMutability: "view";
|
|
75
|
+
readonly type: "function";
|
|
76
|
+
}, {
|
|
77
|
+
readonly constant: true;
|
|
78
|
+
readonly inputs: readonly [{
|
|
79
|
+
readonly name: "_owner";
|
|
80
|
+
readonly type: "address";
|
|
81
|
+
}];
|
|
82
|
+
readonly name: "balanceOf";
|
|
83
|
+
readonly outputs: readonly [{
|
|
84
|
+
readonly name: "balance";
|
|
85
|
+
readonly type: "uint256";
|
|
86
|
+
}];
|
|
87
|
+
readonly payable: false;
|
|
88
|
+
readonly stateMutability: "view";
|
|
89
|
+
readonly type: "function";
|
|
90
|
+
}, {
|
|
91
|
+
readonly constant: true;
|
|
92
|
+
readonly inputs: readonly [];
|
|
93
|
+
readonly name: "symbol";
|
|
94
|
+
readonly outputs: readonly [{
|
|
95
|
+
readonly name: "";
|
|
96
|
+
readonly type: "string";
|
|
97
|
+
}];
|
|
98
|
+
readonly payable: false;
|
|
99
|
+
readonly stateMutability: "view";
|
|
100
|
+
readonly type: "function";
|
|
101
|
+
}, {
|
|
102
|
+
readonly constant: false;
|
|
103
|
+
readonly inputs: readonly [{
|
|
104
|
+
readonly name: "_to";
|
|
105
|
+
readonly type: "address";
|
|
106
|
+
}, {
|
|
107
|
+
readonly name: "_value";
|
|
108
|
+
readonly type: "uint256";
|
|
109
|
+
}];
|
|
110
|
+
readonly name: "transfer";
|
|
111
|
+
readonly outputs: readonly [{
|
|
112
|
+
readonly name: "";
|
|
113
|
+
readonly type: "bool";
|
|
114
|
+
}];
|
|
115
|
+
readonly payable: false;
|
|
116
|
+
readonly stateMutability: "nonpayable";
|
|
117
|
+
readonly type: "function";
|
|
118
|
+
}, {
|
|
119
|
+
readonly constant: true;
|
|
120
|
+
readonly inputs: readonly [{
|
|
121
|
+
readonly name: "_owner";
|
|
122
|
+
readonly type: "address";
|
|
123
|
+
}, {
|
|
124
|
+
readonly name: "_spender";
|
|
125
|
+
readonly type: "address";
|
|
126
|
+
}];
|
|
127
|
+
readonly name: "allowance";
|
|
128
|
+
readonly outputs: readonly [{
|
|
129
|
+
readonly name: "";
|
|
130
|
+
readonly type: "uint256";
|
|
131
|
+
}];
|
|
132
|
+
readonly payable: false;
|
|
133
|
+
readonly stateMutability: "view";
|
|
134
|
+
readonly type: "function";
|
|
135
|
+
}, {
|
|
136
|
+
readonly payable: true;
|
|
137
|
+
readonly stateMutability: "payable";
|
|
138
|
+
readonly type: "fallback";
|
|
139
|
+
}, {
|
|
140
|
+
readonly anonymous: false;
|
|
141
|
+
readonly inputs: readonly [{
|
|
142
|
+
readonly indexed: true;
|
|
143
|
+
readonly name: "owner";
|
|
144
|
+
readonly type: "address";
|
|
145
|
+
}, {
|
|
146
|
+
readonly indexed: true;
|
|
147
|
+
readonly name: "spender";
|
|
148
|
+
readonly type: "address";
|
|
149
|
+
}, {
|
|
150
|
+
readonly indexed: false;
|
|
151
|
+
readonly name: "value";
|
|
152
|
+
readonly type: "uint256";
|
|
153
|
+
}];
|
|
154
|
+
readonly name: "Approval";
|
|
155
|
+
readonly type: "event";
|
|
156
|
+
}, {
|
|
157
|
+
readonly anonymous: false;
|
|
158
|
+
readonly inputs: readonly [{
|
|
159
|
+
readonly indexed: true;
|
|
160
|
+
readonly name: "from";
|
|
161
|
+
readonly type: "address";
|
|
162
|
+
}, {
|
|
163
|
+
readonly indexed: true;
|
|
164
|
+
readonly name: "to";
|
|
165
|
+
readonly type: "address";
|
|
166
|
+
}, {
|
|
167
|
+
readonly indexed: false;
|
|
168
|
+
readonly name: "value";
|
|
169
|
+
readonly type: "uint256";
|
|
170
|
+
}];
|
|
171
|
+
readonly name: "Transfer";
|
|
172
|
+
readonly type: "event";
|
|
173
|
+
}];
|
|
174
|
+
export type Erc20Abi = typeof erc20Abi;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './erc20.cjs';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { Client } from '../clients/types.cjs';
|
|
2
|
+
import type { Address } from '../types/primitives.cjs';
|
|
3
|
+
export type InterfaceAbi = ReadonlyArray<Record<string, unknown>> | string | readonly string[];
|
|
4
|
+
export type ReadCallOptions = {
|
|
5
|
+
/** view 호출의 주체 account. 기본값은 client.account?.address (있으면) 또는 컨트랙트 주소. */
|
|
6
|
+
caller?: Address;
|
|
7
|
+
amount?: string;
|
|
8
|
+
fuelLimit?: string;
|
|
9
|
+
};
|
|
10
|
+
export type GetContractArgs = {
|
|
11
|
+
address: Address;
|
|
12
|
+
abi: InterfaceAbi;
|
|
13
|
+
client: Client;
|
|
14
|
+
};
|
|
15
|
+
export type ContractReadFn = (args?: readonly unknown[], opts?: ReadCallOptions) => Promise<unknown>;
|
|
16
|
+
export type ContractInstance = {
|
|
17
|
+
address: Address;
|
|
18
|
+
abi: InterfaceAbi;
|
|
19
|
+
read: Record<string, ContractReadFn>;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Locus 의 debug_viewContract RPC 위에 viem 스타일 컨트랙트 핸들을 만든다.
|
|
23
|
+
* `read.<fn>` 은 ethers(v5) 의 Interface 로 호출을 인코딩하고, 결과 바이트를
|
|
24
|
+
* convertHexToData 로 Locus `func` 필드에 담아 보낸 뒤, 응답 hex 를
|
|
25
|
+
* Interface.decodeFunctionResult 로 다시 디코딩한다.
|
|
26
|
+
*
|
|
27
|
+
* write 메서드는 이번 단계에서는 의도적으로 빠져 있다. 상태를 바꾸는 호출
|
|
28
|
+
* 은 생성된 wallet action 을 직접 사용한다:
|
|
29
|
+
*
|
|
30
|
+
* import { callContract } from '@locuschain/lib/autogen';
|
|
31
|
+
* await wallet.extend(debugWalletActions).callContract({ ... });
|
|
32
|
+
*/
|
|
33
|
+
export declare function getContract(args: GetContractArgs): ContractInstance;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './getContract.
|
|
2
|
-
export * from './abis/index.
|
|
1
|
+
export * from './getContract.cjs';
|
|
2
|
+
export * from './abis/index.cjs';
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { BaseError, type BaseErrorOptions } from './base.cjs';
|
|
2
|
+
export declare class AccountRequiredError extends BaseError {
|
|
3
|
+
name: string;
|
|
4
|
+
constructor(method: string);
|
|
5
|
+
}
|
|
6
|
+
export declare class InvalidTxResultError extends BaseError {
|
|
7
|
+
name: string;
|
|
8
|
+
method?: string;
|
|
9
|
+
constructor(shortMessage: string, options?: BaseErrorOptions & {
|
|
10
|
+
method?: string;
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
export declare class SignFailedError extends BaseError {
|
|
14
|
+
name: string;
|
|
15
|
+
constructor(shortMessage: string, options?: BaseErrorOptions);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* WASM 의 키 derivation 경로가 동일한 master / normal public key 를 반환한
|
|
19
|
+
* 경우에 던진다. 과거에는 JS 브릿지가 deterministic seed 를 WASM 으로
|
|
20
|
+
* 전달하지 못하던 버그 (bug-002, 커밋 e00a35e 에서 해결) 가 원인이었고,
|
|
21
|
+
* 그 결과 AIMER / HAETAE 조합에서 두 슬롯의 키가 같은 값으로 derive 되곤
|
|
22
|
+
* 했다. 브릿지 fix 이후 이 가드는 회귀 안전망 역할만 한다 — 생성 시점에
|
|
23
|
+
* 조용히 실패하면 호출자는 master==normal account 를 들고 있다가 노드의
|
|
24
|
+
* `openAccount` 단계에서 거부 당하므로, JS 경계에서 미리 surface 한다.
|
|
25
|
+
*/
|
|
26
|
+
export declare class DegenerateKeyError extends BaseError {
|
|
27
|
+
name: string;
|
|
28
|
+
algoMaster?: string;
|
|
29
|
+
algoNormal?: string;
|
|
30
|
+
constructor(options: {
|
|
31
|
+
source: string;
|
|
32
|
+
algoMaster?: string;
|
|
33
|
+
algoNormal?: string;
|
|
34
|
+
cause?: unknown;
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* TX 가 `master.signKeyBind` 를 필요로 하는데 (OPEN_ACCOUNT, CHANGE_KEYPAIR)
|
|
39
|
+
* master KeySource 가 이를 제공하지 않은 경우에 던진다.
|
|
40
|
+
*/
|
|
41
|
+
export declare class SignKeyBindUnsupportedError extends BaseError {
|
|
42
|
+
name: string;
|
|
43
|
+
keySourceType: string;
|
|
44
|
+
constructor(keySourceType: string);
|
|
45
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type BaseErrorOptions = {
|
|
2
|
+
cause?: unknown;
|
|
3
|
+
details?: string;
|
|
4
|
+
metaMessages?: string[];
|
|
5
|
+
};
|
|
6
|
+
export declare class BaseError extends Error {
|
|
7
|
+
name: string;
|
|
8
|
+
shortMessage: string;
|
|
9
|
+
metaMessages: string[];
|
|
10
|
+
details?: string;
|
|
11
|
+
cause?: unknown;
|
|
12
|
+
constructor(shortMessage: string, options?: BaseErrorOptions);
|
|
13
|
+
}
|
package/dist/errors/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './base.
|
|
2
|
-
export * from './rpc.
|
|
3
|
-
export * from './transport.
|
|
4
|
-
export * from './account.
|
|
1
|
+
export * from './base.cjs';
|
|
2
|
+
export * from './rpc.cjs';
|
|
3
|
+
export * from './transport.cjs';
|
|
4
|
+
export * from './account.cjs';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BaseError, type BaseErrorOptions } from './base.cjs';
|
|
2
|
+
export type RpcErrorOptions = BaseErrorOptions & {
|
|
3
|
+
method?: string;
|
|
4
|
+
params?: readonly unknown[];
|
|
5
|
+
};
|
|
6
|
+
/** 요청을 전송하기 전에 로컬에서 검증을 통과하지 못한 경우. */
|
|
7
|
+
export declare class RpcRequestError extends BaseError {
|
|
8
|
+
name: string;
|
|
9
|
+
method?: string;
|
|
10
|
+
params?: readonly unknown[];
|
|
11
|
+
constructor(shortMessage: string, options?: RpcErrorOptions);
|
|
12
|
+
}
|
|
13
|
+
/** 노드가 JSON-RPC error envelope 를 반환한 경우. */
|
|
14
|
+
export declare class RpcResponseError extends BaseError {
|
|
15
|
+
name: string;
|
|
16
|
+
code: number | string;
|
|
17
|
+
method?: string;
|
|
18
|
+
constructor(shortMessage: string, options: RpcErrorOptions & {
|
|
19
|
+
code: number | string;
|
|
20
|
+
});
|
|
21
|
+
}
|