@totochain/client 0.0.0-stage → 0.2.0
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/README.md +307 -2
- package/_cjs/accounts/index.d.cts +7 -0
- package/_cjs/accounts/index.js +29 -0
- package/_cjs/accounts/keyring.d.cts +28 -0
- package/_cjs/accounts/keyring.js +102 -0
- package/_cjs/accounts/substrateSigner.d.cts +5 -0
- package/_cjs/accounts/substrateSigner.js +49 -0
- package/_cjs/accounts/types.d.cts +6 -0
- package/_cjs/accounts/types.js +2 -0
- package/_cjs/accounts/wellKnown.d.cts +24 -0
- package/_cjs/accounts/wellKnown.js +322 -0
- package/_cjs/actions/activityTracker/calculateActivityReputationAtBlock.d.cts +9 -0
- package/_cjs/actions/activityTracker/calculateActivityReputationAtBlock.js +8 -0
- package/_cjs/actions/activityTracker/decodeReputationPage.d.cts +4 -0
- package/_cjs/actions/activityTracker/decodeReputationPage.js +13 -0
- package/_cjs/actions/activityTracker/getActivityReputation.d.cts +8 -0
- package/_cjs/actions/activityTracker/getActivityReputation.js +8 -0
- package/_cjs/actions/activityTracker/getActivityReputationInfo.d.cts +9 -0
- package/_cjs/actions/activityTracker/getActivityReputationInfo.js +14 -0
- package/_cjs/actions/activityTracker/getActivityTrackerConfig.d.cts +8 -0
- package/_cjs/actions/activityTracker/getActivityTrackerConfig.js +13 -0
- package/_cjs/actions/activityTracker/getAllActivityReputations.d.cts +8 -0
- package/_cjs/actions/activityTracker/getAllActivityReputations.js +9 -0
- package/_cjs/actions/activityTracker/getAllRawActivityReputations.d.cts +8 -0
- package/_cjs/actions/activityTracker/getAllRawActivityReputations.js +9 -0
- package/_cjs/actions/activityTracker/getMaxActivityReputation.d.cts +7 -0
- package/_cjs/actions/activityTracker/getMaxActivityReputation.js +8 -0
- package/_cjs/actions/activityTracker/getRawActivityReputation.d.cts +8 -0
- package/_cjs/actions/activityTracker/getRawActivityReputation.js +8 -0
- package/_cjs/actions/activityTracker/index.d.cts +18 -0
- package/_cjs/actions/activityTracker/index.js +19 -0
- package/_cjs/actions/activityTracker/types.d.cts +20 -0
- package/_cjs/actions/activityTracker/types.js +2 -0
- package/_cjs/actions/attestation/attest.d.cts +21 -0
- package/_cjs/actions/attestation/attest.js +14 -0
- package/_cjs/actions/attestation/index.d.cts +3 -0
- package/_cjs/actions/attestation/index.js +7 -0
- package/_cjs/actions/did/createDid.d.cts +10 -0
- package/_cjs/actions/did/createDid.js +10 -0
- package/_cjs/actions/did/index.d.cts +3 -0
- package/_cjs/actions/did/index.js +6 -0
- package/_cjs/actions/handshake/getCompletedHandshakes.d.cts +8 -0
- package/_cjs/actions/handshake/getCompletedHandshakes.js +8 -0
- package/_cjs/actions/handshake/getHandshakeCount.d.cts +8 -0
- package/_cjs/actions/handshake/getHandshakeCount.js +8 -0
- package/_cjs/actions/handshake/getHandshakeStatus.d.cts +10 -0
- package/_cjs/actions/handshake/getHandshakeStatus.js +8 -0
- package/_cjs/actions/handshake/handshakeExists.d.cts +9 -0
- package/_cjs/actions/handshake/handshakeExists.js +8 -0
- package/_cjs/actions/handshake/hasHandshakeCompleted.d.cts +9 -0
- package/_cjs/actions/handshake/hasHandshakeCompleted.js +8 -0
- package/_cjs/actions/handshake/index.d.cts +12 -0
- package/_cjs/actions/handshake/index.js +13 -0
- package/_cjs/actions/handshake/types.d.cts +2 -0
- package/_cjs/actions/handshake/types.js +2 -0
- package/_cjs/actions/index.d.cts +14 -0
- package/_cjs/actions/index.js +35 -0
- package/_cjs/actions/potential/getActiveReferralShare.d.cts +8 -0
- package/_cjs/actions/potential/getActiveReferralShare.js +8 -0
- package/_cjs/actions/potential/getCycleNumber.d.cts +7 -0
- package/_cjs/actions/potential/getCycleNumber.js +8 -0
- package/_cjs/actions/potential/getCyclePotentialMinted.d.cts +7 -0
- package/_cjs/actions/potential/getCyclePotentialMinted.js +8 -0
- package/_cjs/actions/potential/getCycleSupply.d.cts +7 -0
- package/_cjs/actions/potential/getCycleSupply.js +8 -0
- package/_cjs/actions/potential/getDefaultActiveReferralShare.d.cts +7 -0
- package/_cjs/actions/potential/getDefaultActiveReferralShare.js +8 -0
- package/_cjs/actions/potential/getMaxSupply.d.cts +7 -0
- package/_cjs/actions/potential/getMaxSupply.js +8 -0
- package/_cjs/actions/potential/getMonthNumber.d.cts +7 -0
- package/_cjs/actions/potential/getMonthNumber.js +8 -0
- package/_cjs/actions/potential/getMonthPotentialMinted.d.cts +7 -0
- package/_cjs/actions/potential/getMonthPotentialMinted.js +8 -0
- package/_cjs/actions/potential/getMonthSupply.d.cts +7 -0
- package/_cjs/actions/potential/getMonthSupply.js +8 -0
- package/_cjs/actions/potential/getPotential.d.cts +8 -0
- package/_cjs/actions/potential/getPotential.js +8 -0
- package/_cjs/actions/potential/getTotalPotentialMinted.d.cts +7 -0
- package/_cjs/actions/potential/getTotalPotentialMinted.js +8 -0
- package/_cjs/actions/potential/index.d.cts +23 -0
- package/_cjs/actions/potential/index.js +25 -0
- package/_cjs/actions/puzzlePieces/getCollectionsCount.d.cts +7 -0
- package/_cjs/actions/puzzlePieces/getCollectionsCount.js +8 -0
- package/_cjs/actions/puzzlePieces/getItemsCount.d.cts +8 -0
- package/_cjs/actions/puzzlePieces/getItemsCount.js +8 -0
- package/_cjs/actions/puzzlePieces/getOwner.d.cts +9 -0
- package/_cjs/actions/puzzlePieces/getOwner.js +8 -0
- package/_cjs/actions/puzzlePieces/getPendingWildcards.d.cts +8 -0
- package/_cjs/actions/puzzlePieces/getPendingWildcards.js +9 -0
- package/_cjs/actions/puzzlePieces/getTotalPuzzlePiecesMinted.d.cts +7 -0
- package/_cjs/actions/puzzlePieces/getTotalPuzzlePiecesMinted.js +8 -0
- package/_cjs/actions/puzzlePieces/getWildcardCollectionId.d.cts +7 -0
- package/_cjs/actions/puzzlePieces/getWildcardCollectionId.js +8 -0
- package/_cjs/actions/puzzlePieces/getWildcardDistributionMap.d.cts +8 -0
- package/_cjs/actions/puzzlePieces/getWildcardDistributionMap.js +9 -0
- package/_cjs/actions/puzzlePieces/getWildcardThreshold.d.cts +7 -0
- package/_cjs/actions/puzzlePieces/getWildcardThreshold.js +8 -0
- package/_cjs/actions/puzzlePieces/index.d.cts +18 -0
- package/_cjs/actions/puzzlePieces/index.js +19 -0
- package/_cjs/actions/puzzlePieces/types.d.cts +5 -0
- package/_cjs/actions/puzzlePieces/types.js +2 -0
- package/_cjs/actions/referral/decodePage.d.cts +4 -0
- package/_cjs/actions/referral/decodePage.js +13 -0
- package/_cjs/actions/referral/getActiveReferrals.d.cts +9 -0
- package/_cjs/actions/referral/getActiveReferrals.js +14 -0
- package/_cjs/actions/referral/getActiveReferralsCount.d.cts +8 -0
- package/_cjs/actions/referral/getActiveReferralsCount.js +8 -0
- package/_cjs/actions/referral/getBlockProducers.d.cts +7 -0
- package/_cjs/actions/referral/getBlockProducers.js +8 -0
- package/_cjs/actions/referral/getBlockProducersPage.d.cts +8 -0
- package/_cjs/actions/referral/getBlockProducersPage.js +9 -0
- package/_cjs/actions/referral/getPendingReferrals.d.cts +8 -0
- package/_cjs/actions/referral/getPendingReferrals.js +8 -0
- package/_cjs/actions/referral/getPendingReferralsPage.d.cts +9 -0
- package/_cjs/actions/referral/getPendingReferralsPage.js +9 -0
- package/_cjs/actions/referral/getReferrer.d.cts +8 -0
- package/_cjs/actions/referral/getReferrer.js +8 -0
- package/_cjs/actions/referral/index.d.cts +16 -0
- package/_cjs/actions/referral/index.js +17 -0
- package/_cjs/actions/referral/types.d.cts +6 -0
- package/_cjs/actions/referral/types.js +2 -0
- package/_cjs/actions/reputationVoting/getTally.d.cts +9 -0
- package/_cjs/actions/reputationVoting/getTally.js +14 -0
- package/_cjs/actions/reputationVoting/getVotesForAccount.d.cts +9 -0
- package/_cjs/actions/reputationVoting/getVotesForAccount.js +16 -0
- package/_cjs/actions/reputationVoting/getVotingReputation.d.cts +8 -0
- package/_cjs/actions/reputationVoting/getVotingReputation.js +8 -0
- package/_cjs/actions/reputationVoting/index.d.cts +10 -0
- package/_cjs/actions/reputationVoting/index.js +11 -0
- package/_cjs/actions/reputationVoting/isPassing.d.cts +8 -0
- package/_cjs/actions/reputationVoting/isPassing.js +8 -0
- package/_cjs/actions/reputationVoting/types.d.cts +17 -0
- package/_cjs/actions/reputationVoting/types.js +2 -0
- package/_cjs/actions/rewardPool/getRewardPoolAccount.d.cts +7 -0
- package/_cjs/actions/rewardPool/getRewardPoolAccount.js +8 -0
- package/_cjs/actions/rewardPool/getRewardPoolBalance.d.cts +7 -0
- package/_cjs/actions/rewardPool/getRewardPoolBalance.js +8 -0
- package/_cjs/actions/rewardPool/index.d.cts +5 -0
- package/_cjs/actions/rewardPool/index.js +7 -0
- package/_cjs/actions/submitAndWait.d.cts +65 -0
- package/_cjs/actions/submitAndWait.js +141 -0
- package/_cjs/actions/techCommitteeManager/getSelectedTechCommittee.d.cts +7 -0
- package/_cjs/actions/techCommitteeManager/getSelectedTechCommittee.js +8 -0
- package/_cjs/actions/techCommitteeManager/getTechCommitteeCandidates.d.cts +7 -0
- package/_cjs/actions/techCommitteeManager/getTechCommitteeCandidates.js +8 -0
- package/_cjs/actions/techCommitteeManager/index.d.cts +5 -0
- package/_cjs/actions/techCommitteeManager/index.js +7 -0
- package/_cjs/actions/validatorManager/decodePairs.d.cts +8 -0
- package/_cjs/actions/validatorManager/decodePairs.js +7 -0
- package/_cjs/actions/validatorManager/getActiveValidators.d.cts +7 -0
- package/_cjs/actions/validatorManager/getActiveValidators.js +8 -0
- package/_cjs/actions/validatorManager/getOffenceValidators.d.cts +8 -0
- package/_cjs/actions/validatorManager/getOffenceValidators.js +9 -0
- package/_cjs/actions/validatorManager/getOfflineValidators.d.cts +8 -0
- package/_cjs/actions/validatorManager/getOfflineValidators.js +9 -0
- package/_cjs/actions/validatorManager/getReputationForAccount.d.cts +8 -0
- package/_cjs/actions/validatorManager/getReputationForAccount.js +8 -0
- package/_cjs/actions/validatorManager/getReputationPenaltyFor.d.cts +8 -0
- package/_cjs/actions/validatorManager/getReputationPenaltyFor.js +8 -0
- package/_cjs/actions/validatorManager/getReputations.d.cts +9 -0
- package/_cjs/actions/validatorManager/getReputations.js +9 -0
- package/_cjs/actions/validatorManager/getSelectedValidators.d.cts +7 -0
- package/_cjs/actions/validatorManager/getSelectedValidators.js +8 -0
- package/_cjs/actions/validatorManager/getValidatorCandidates.d.cts +7 -0
- package/_cjs/actions/validatorManager/getValidatorCandidates.js +8 -0
- package/_cjs/actions/validatorManager/index.d.cts +18 -0
- package/_cjs/actions/validatorManager/index.js +19 -0
- package/_cjs/actions/validatorManager/types.d.cts +10 -0
- package/_cjs/actions/validatorManager/types.js +2 -0
- package/_cjs/chains/defineChain.d.cts +18 -0
- package/_cjs/chains/defineChain.js +6 -0
- package/_cjs/chains/definitions.d.cts +65 -0
- package/_cjs/chains/definitions.js +52 -0
- package/_cjs/chains/index.d.cts +4 -0
- package/_cjs/chains/index.js +10 -0
- package/_cjs/client/compatibility.d.cts +16 -0
- package/_cjs/client/compatibility.js +60 -0
- package/_cjs/client/createClient.d.cts +12 -0
- package/_cjs/client/createClient.js +36 -0
- package/_cjs/client/types.d.cts +7 -0
- package/_cjs/client/types.js +2 -0
- package/_cjs/crypto/ctypeHash.d.cts +16 -0
- package/_cjs/crypto/ctypeHash.js +24 -0
- package/_cjs/crypto/index.d.cts +3 -0
- package/_cjs/crypto/index.js +6 -0
- package/_cjs/ctypes/definitions.d.cts +21 -0
- package/_cjs/ctypes/definitions.js +210 -0
- package/_cjs/ctypes/index.d.cts +4 -0
- package/_cjs/ctypes/index.js +21 -0
- package/_cjs/did/didUri.d.cts +11 -0
- package/_cjs/did/didUri.js +14 -0
- package/_cjs/index.d.cts +25 -0
- package/_cjs/index.js +67 -0
- package/_cjs/package.json +1 -0
- package/_cjs/plugins/activityTracker.d.cts +34 -0
- package/_cjs/plugins/activityTracker.js +18 -0
- package/_cjs/plugins/handshake.d.cts +32 -0
- package/_cjs/plugins/handshake.js +15 -0
- package/_cjs/plugins/index.d.cts +19 -0
- package/_cjs/plugins/index.js +21 -0
- package/_cjs/plugins/potential.d.cts +29 -0
- package/_cjs/plugins/potential.js +21 -0
- package/_cjs/plugins/puzzlePieces.d.cts +28 -0
- package/_cjs/plugins/puzzlePieces.js +18 -0
- package/_cjs/plugins/referral.d.cts +17 -0
- package/_cjs/plugins/referral.js +17 -0
- package/_cjs/plugins/reputationVoting.d.cts +25 -0
- package/_cjs/plugins/reputationVoting.js +14 -0
- package/_cjs/plugins/rewardPool.d.cts +14 -0
- package/_cjs/plugins/rewardPool.js +12 -0
- package/_cjs/plugins/techCommitteeManager.d.cts +14 -0
- package/_cjs/plugins/techCommitteeManager.js +12 -0
- package/_cjs/plugins/validatorManager.d.cts +30 -0
- package/_cjs/plugins/validatorManager.js +18 -0
- package/_cjs/rpc/bundle.d.cts +4 -0
- package/_cjs/rpc/bundle.js +24 -0
- package/_cjs/rpc/call.d.cts +4 -0
- package/_cjs/rpc/call.js +28 -0
- package/_cjs/rpc/definitions.d.cts +3 -0
- package/_cjs/rpc/definitions.js +382 -0
- package/_cjs/rpc/index.d.cts +4 -0
- package/_cjs/rpc/index.js +10 -0
- package/_cjs/rpc/types.d.cts +3 -0
- package/_cjs/rpc/types.js +44 -0
- package/_cjs/types/index.d.cts +17 -0
- package/_cjs/types/index.js +5 -0
- package/_esm/accounts/index.js +3 -0
- package/_esm/accounts/keyring.js +83 -0
- package/_esm/accounts/substrateSigner.js +46 -0
- package/_esm/accounts/types.js +1 -0
- package/_esm/accounts/wellKnown.js +317 -0
- package/_esm/actions/activityTracker/calculateActivityReputationAtBlock.js +5 -0
- package/_esm/actions/activityTracker/decodeReputationPage.js +10 -0
- package/_esm/actions/activityTracker/getActivityReputation.js +5 -0
- package/_esm/actions/activityTracker/getActivityReputationInfo.js +11 -0
- package/_esm/actions/activityTracker/getActivityTrackerConfig.js +10 -0
- package/_esm/actions/activityTracker/getAllActivityReputations.js +6 -0
- package/_esm/actions/activityTracker/getAllRawActivityReputations.js +6 -0
- package/_esm/actions/activityTracker/getMaxActivityReputation.js +5 -0
- package/_esm/actions/activityTracker/getRawActivityReputation.js +5 -0
- package/_esm/actions/activityTracker/index.js +8 -0
- package/_esm/actions/activityTracker/types.js +1 -0
- package/_esm/actions/attestation/attest.js +9 -0
- package/_esm/actions/attestation/index.js +1 -0
- package/_esm/actions/did/createDid.js +6 -0
- package/_esm/actions/did/index.js +1 -0
- package/_esm/actions/handshake/getCompletedHandshakes.js +5 -0
- package/_esm/actions/handshake/getHandshakeCount.js +5 -0
- package/_esm/actions/handshake/getHandshakeStatus.js +5 -0
- package/_esm/actions/handshake/handshakeExists.js +5 -0
- package/_esm/actions/handshake/hasHandshakeCompleted.js +5 -0
- package/_esm/actions/handshake/index.js +5 -0
- package/_esm/actions/handshake/types.js +1 -0
- package/_esm/actions/index.js +12 -0
- package/_esm/actions/potential/getActiveReferralShare.js +5 -0
- package/_esm/actions/potential/getCycleNumber.js +5 -0
- package/_esm/actions/potential/getCyclePotentialMinted.js +5 -0
- package/_esm/actions/potential/getCycleSupply.js +5 -0
- package/_esm/actions/potential/getDefaultActiveReferralShare.js +5 -0
- package/_esm/actions/potential/getMaxSupply.js +5 -0
- package/_esm/actions/potential/getMonthNumber.js +5 -0
- package/_esm/actions/potential/getMonthPotentialMinted.js +5 -0
- package/_esm/actions/potential/getMonthSupply.js +5 -0
- package/_esm/actions/potential/getPotential.js +5 -0
- package/_esm/actions/potential/getTotalPotentialMinted.js +5 -0
- package/_esm/actions/potential/index.js +11 -0
- package/_esm/actions/puzzlePieces/getCollectionsCount.js +5 -0
- package/_esm/actions/puzzlePieces/getItemsCount.js +5 -0
- package/_esm/actions/puzzlePieces/getOwner.js +5 -0
- package/_esm/actions/puzzlePieces/getPendingWildcards.js +6 -0
- package/_esm/actions/puzzlePieces/getTotalPuzzlePiecesMinted.js +5 -0
- package/_esm/actions/puzzlePieces/getWildcardCollectionId.js +5 -0
- package/_esm/actions/puzzlePieces/getWildcardDistributionMap.js +6 -0
- package/_esm/actions/puzzlePieces/getWildcardThreshold.js +5 -0
- package/_esm/actions/puzzlePieces/index.js +8 -0
- package/_esm/actions/puzzlePieces/types.js +1 -0
- package/_esm/actions/referral/decodePage.js +10 -0
- package/_esm/actions/referral/getActiveReferrals.js +11 -0
- package/_esm/actions/referral/getActiveReferralsCount.js +5 -0
- package/_esm/actions/referral/getBlockProducers.js +5 -0
- package/_esm/actions/referral/getBlockProducersPage.js +6 -0
- package/_esm/actions/referral/getPendingReferrals.js +5 -0
- package/_esm/actions/referral/getPendingReferralsPage.js +6 -0
- package/_esm/actions/referral/getReferrer.js +5 -0
- package/_esm/actions/referral/index.js +7 -0
- package/_esm/actions/referral/types.js +1 -0
- package/_esm/actions/reputationVoting/getTally.js +11 -0
- package/_esm/actions/reputationVoting/getVotesForAccount.js +13 -0
- package/_esm/actions/reputationVoting/getVotingReputation.js +5 -0
- package/_esm/actions/reputationVoting/index.js +4 -0
- package/_esm/actions/reputationVoting/isPassing.js +5 -0
- package/_esm/actions/reputationVoting/types.js +1 -0
- package/_esm/actions/rewardPool/getRewardPoolAccount.js +5 -0
- package/_esm/actions/rewardPool/getRewardPoolBalance.js +5 -0
- package/_esm/actions/rewardPool/index.js +2 -0
- package/_esm/actions/submitAndWait.js +132 -0
- package/_esm/actions/techCommitteeManager/getSelectedTechCommittee.js +5 -0
- package/_esm/actions/techCommitteeManager/getTechCommitteeCandidates.js +5 -0
- package/_esm/actions/techCommitteeManager/index.js +2 -0
- package/_esm/actions/validatorManager/decodePairs.js +4 -0
- package/_esm/actions/validatorManager/getActiveValidators.js +5 -0
- package/_esm/actions/validatorManager/getOffenceValidators.js +6 -0
- package/_esm/actions/validatorManager/getOfflineValidators.js +6 -0
- package/_esm/actions/validatorManager/getReputationForAccount.js +5 -0
- package/_esm/actions/validatorManager/getReputationPenaltyFor.js +5 -0
- package/_esm/actions/validatorManager/getReputations.js +6 -0
- package/_esm/actions/validatorManager/getSelectedValidators.js +5 -0
- package/_esm/actions/validatorManager/getValidatorCandidates.js +5 -0
- package/_esm/actions/validatorManager/index.js +8 -0
- package/_esm/actions/validatorManager/types.js +1 -0
- package/_esm/chains/defineChain.js +3 -0
- package/_esm/chains/definitions.js +49 -0
- package/_esm/chains/index.js +2 -0
- package/_esm/client/compatibility.js +55 -0
- package/_esm/client/createClient.js +32 -0
- package/_esm/client/types.js +1 -0
- package/_esm/crypto/ctypeHash.js +20 -0
- package/_esm/crypto/index.js +1 -0
- package/_esm/ctypes/definitions.js +207 -0
- package/_esm/ctypes/index.js +2 -0
- package/_esm/did/didUri.js +11 -0
- package/_esm/index.js +14 -0
- package/_esm/package.json +1 -0
- package/_esm/plugins/activityTracker.js +15 -0
- package/_esm/plugins/handshake.js +12 -0
- package/_esm/plugins/index.js +9 -0
- package/_esm/plugins/potential.js +18 -0
- package/_esm/plugins/puzzlePieces.js +15 -0
- package/_esm/plugins/referral.js +14 -0
- package/_esm/plugins/reputationVoting.js +11 -0
- package/_esm/plugins/rewardPool.js +9 -0
- package/_esm/plugins/techCommitteeManager.js +9 -0
- package/_esm/plugins/validatorManager.js +15 -0
- package/_esm/rpc/bundle.js +21 -0
- package/_esm/rpc/call.js +25 -0
- package/_esm/rpc/definitions.js +379 -0
- package/_esm/rpc/index.js +3 -0
- package/_esm/rpc/types.js +41 -0
- package/_esm/types/index.js +2 -0
- package/_types/accounts/index.d.ts +7 -0
- package/_types/accounts/index.d.ts.map +1 -0
- package/_types/accounts/keyring.d.ts +28 -0
- package/_types/accounts/keyring.d.ts.map +1 -0
- package/_types/accounts/substrateSigner.d.ts +5 -0
- package/_types/accounts/substrateSigner.d.ts.map +1 -0
- package/_types/accounts/types.d.ts +6 -0
- package/_types/accounts/types.d.ts.map +1 -0
- package/_types/accounts/wellKnown.d.ts +24 -0
- package/_types/accounts/wellKnown.d.ts.map +1 -0
- package/_types/actions/activityTracker/calculateActivityReputationAtBlock.d.ts +9 -0
- package/_types/actions/activityTracker/calculateActivityReputationAtBlock.d.ts.map +1 -0
- package/_types/actions/activityTracker/decodeReputationPage.d.ts +4 -0
- package/_types/actions/activityTracker/decodeReputationPage.d.ts.map +1 -0
- package/_types/actions/activityTracker/getActivityReputation.d.ts +8 -0
- package/_types/actions/activityTracker/getActivityReputation.d.ts.map +1 -0
- package/_types/actions/activityTracker/getActivityReputationInfo.d.ts +9 -0
- package/_types/actions/activityTracker/getActivityReputationInfo.d.ts.map +1 -0
- package/_types/actions/activityTracker/getActivityTrackerConfig.d.ts +8 -0
- package/_types/actions/activityTracker/getActivityTrackerConfig.d.ts.map +1 -0
- package/_types/actions/activityTracker/getAllActivityReputations.d.ts +8 -0
- package/_types/actions/activityTracker/getAllActivityReputations.d.ts.map +1 -0
- package/_types/actions/activityTracker/getAllRawActivityReputations.d.ts +8 -0
- package/_types/actions/activityTracker/getAllRawActivityReputations.d.ts.map +1 -0
- package/_types/actions/activityTracker/getMaxActivityReputation.d.ts +7 -0
- package/_types/actions/activityTracker/getMaxActivityReputation.d.ts.map +1 -0
- package/_types/actions/activityTracker/getRawActivityReputation.d.ts +8 -0
- package/_types/actions/activityTracker/getRawActivityReputation.d.ts.map +1 -0
- package/_types/actions/activityTracker/index.d.ts +18 -0
- package/_types/actions/activityTracker/index.d.ts.map +1 -0
- package/_types/actions/activityTracker/types.d.ts +20 -0
- package/_types/actions/activityTracker/types.d.ts.map +1 -0
- package/_types/actions/attestation/attest.d.ts +21 -0
- package/_types/actions/attestation/attest.d.ts.map +1 -0
- package/_types/actions/attestation/index.d.ts +3 -0
- package/_types/actions/attestation/index.d.ts.map +1 -0
- package/_types/actions/did/createDid.d.ts +10 -0
- package/_types/actions/did/createDid.d.ts.map +1 -0
- package/_types/actions/did/index.d.ts +3 -0
- package/_types/actions/did/index.d.ts.map +1 -0
- package/_types/actions/handshake/getCompletedHandshakes.d.ts +8 -0
- package/_types/actions/handshake/getCompletedHandshakes.d.ts.map +1 -0
- package/_types/actions/handshake/getHandshakeCount.d.ts +8 -0
- package/_types/actions/handshake/getHandshakeCount.d.ts.map +1 -0
- package/_types/actions/handshake/getHandshakeStatus.d.ts +10 -0
- package/_types/actions/handshake/getHandshakeStatus.d.ts.map +1 -0
- package/_types/actions/handshake/handshakeExists.d.ts +9 -0
- package/_types/actions/handshake/handshakeExists.d.ts.map +1 -0
- package/_types/actions/handshake/hasHandshakeCompleted.d.ts +9 -0
- package/_types/actions/handshake/hasHandshakeCompleted.d.ts.map +1 -0
- package/_types/actions/handshake/index.d.ts +12 -0
- package/_types/actions/handshake/index.d.ts.map +1 -0
- package/_types/actions/handshake/types.d.ts +2 -0
- package/_types/actions/handshake/types.d.ts.map +1 -0
- package/_types/actions/index.d.ts +14 -0
- package/_types/actions/index.d.ts.map +1 -0
- package/_types/actions/potential/getActiveReferralShare.d.ts +8 -0
- package/_types/actions/potential/getActiveReferralShare.d.ts.map +1 -0
- package/_types/actions/potential/getCycleNumber.d.ts +7 -0
- package/_types/actions/potential/getCycleNumber.d.ts.map +1 -0
- package/_types/actions/potential/getCyclePotentialMinted.d.ts +7 -0
- package/_types/actions/potential/getCyclePotentialMinted.d.ts.map +1 -0
- package/_types/actions/potential/getCycleSupply.d.ts +7 -0
- package/_types/actions/potential/getCycleSupply.d.ts.map +1 -0
- package/_types/actions/potential/getDefaultActiveReferralShare.d.ts +7 -0
- package/_types/actions/potential/getDefaultActiveReferralShare.d.ts.map +1 -0
- package/_types/actions/potential/getMaxSupply.d.ts +7 -0
- package/_types/actions/potential/getMaxSupply.d.ts.map +1 -0
- package/_types/actions/potential/getMonthNumber.d.ts +7 -0
- package/_types/actions/potential/getMonthNumber.d.ts.map +1 -0
- package/_types/actions/potential/getMonthPotentialMinted.d.ts +7 -0
- package/_types/actions/potential/getMonthPotentialMinted.d.ts.map +1 -0
- package/_types/actions/potential/getMonthSupply.d.ts +7 -0
- package/_types/actions/potential/getMonthSupply.d.ts.map +1 -0
- package/_types/actions/potential/getPotential.d.ts +8 -0
- package/_types/actions/potential/getPotential.d.ts.map +1 -0
- package/_types/actions/potential/getTotalPotentialMinted.d.ts +7 -0
- package/_types/actions/potential/getTotalPotentialMinted.d.ts.map +1 -0
- package/_types/actions/potential/index.d.ts +23 -0
- package/_types/actions/potential/index.d.ts.map +1 -0
- package/_types/actions/puzzlePieces/getCollectionsCount.d.ts +7 -0
- package/_types/actions/puzzlePieces/getCollectionsCount.d.ts.map +1 -0
- package/_types/actions/puzzlePieces/getItemsCount.d.ts +8 -0
- package/_types/actions/puzzlePieces/getItemsCount.d.ts.map +1 -0
- package/_types/actions/puzzlePieces/getOwner.d.ts +9 -0
- package/_types/actions/puzzlePieces/getOwner.d.ts.map +1 -0
- package/_types/actions/puzzlePieces/getPendingWildcards.d.ts +8 -0
- package/_types/actions/puzzlePieces/getPendingWildcards.d.ts.map +1 -0
- package/_types/actions/puzzlePieces/getTotalPuzzlePiecesMinted.d.ts +7 -0
- package/_types/actions/puzzlePieces/getTotalPuzzlePiecesMinted.d.ts.map +1 -0
- package/_types/actions/puzzlePieces/getWildcardCollectionId.d.ts +7 -0
- package/_types/actions/puzzlePieces/getWildcardCollectionId.d.ts.map +1 -0
- package/_types/actions/puzzlePieces/getWildcardDistributionMap.d.ts +8 -0
- package/_types/actions/puzzlePieces/getWildcardDistributionMap.d.ts.map +1 -0
- package/_types/actions/puzzlePieces/getWildcardThreshold.d.ts +7 -0
- package/_types/actions/puzzlePieces/getWildcardThreshold.d.ts.map +1 -0
- package/_types/actions/puzzlePieces/index.d.ts +18 -0
- package/_types/actions/puzzlePieces/index.d.ts.map +1 -0
- package/_types/actions/puzzlePieces/types.d.ts +5 -0
- package/_types/actions/puzzlePieces/types.d.ts.map +1 -0
- package/_types/actions/referral/decodePage.d.ts +4 -0
- package/_types/actions/referral/decodePage.d.ts.map +1 -0
- package/_types/actions/referral/getActiveReferrals.d.ts +9 -0
- package/_types/actions/referral/getActiveReferrals.d.ts.map +1 -0
- package/_types/actions/referral/getActiveReferralsCount.d.ts +8 -0
- package/_types/actions/referral/getActiveReferralsCount.d.ts.map +1 -0
- package/_types/actions/referral/getBlockProducers.d.ts +7 -0
- package/_types/actions/referral/getBlockProducers.d.ts.map +1 -0
- package/_types/actions/referral/getBlockProducersPage.d.ts +8 -0
- package/_types/actions/referral/getBlockProducersPage.d.ts.map +1 -0
- package/_types/actions/referral/getPendingReferrals.d.ts +8 -0
- package/_types/actions/referral/getPendingReferrals.d.ts.map +1 -0
- package/_types/actions/referral/getPendingReferralsPage.d.ts +9 -0
- package/_types/actions/referral/getPendingReferralsPage.d.ts.map +1 -0
- package/_types/actions/referral/getReferrer.d.ts +8 -0
- package/_types/actions/referral/getReferrer.d.ts.map +1 -0
- package/_types/actions/referral/index.d.ts +16 -0
- package/_types/actions/referral/index.d.ts.map +1 -0
- package/_types/actions/referral/types.d.ts +6 -0
- package/_types/actions/referral/types.d.ts.map +1 -0
- package/_types/actions/reputationVoting/getTally.d.ts +9 -0
- package/_types/actions/reputationVoting/getTally.d.ts.map +1 -0
- package/_types/actions/reputationVoting/getVotesForAccount.d.ts +9 -0
- package/_types/actions/reputationVoting/getVotesForAccount.d.ts.map +1 -0
- package/_types/actions/reputationVoting/getVotingReputation.d.ts +8 -0
- package/_types/actions/reputationVoting/getVotingReputation.d.ts.map +1 -0
- package/_types/actions/reputationVoting/index.d.ts +10 -0
- package/_types/actions/reputationVoting/index.d.ts.map +1 -0
- package/_types/actions/reputationVoting/isPassing.d.ts +8 -0
- package/_types/actions/reputationVoting/isPassing.d.ts.map +1 -0
- package/_types/actions/reputationVoting/types.d.ts +17 -0
- package/_types/actions/reputationVoting/types.d.ts.map +1 -0
- package/_types/actions/rewardPool/getRewardPoolAccount.d.ts +7 -0
- package/_types/actions/rewardPool/getRewardPoolAccount.d.ts.map +1 -0
- package/_types/actions/rewardPool/getRewardPoolBalance.d.ts +7 -0
- package/_types/actions/rewardPool/getRewardPoolBalance.d.ts.map +1 -0
- package/_types/actions/rewardPool/index.d.ts +5 -0
- package/_types/actions/rewardPool/index.d.ts.map +1 -0
- package/_types/actions/submitAndWait.d.ts +65 -0
- package/_types/actions/submitAndWait.d.ts.map +1 -0
- package/_types/actions/techCommitteeManager/getSelectedTechCommittee.d.ts +7 -0
- package/_types/actions/techCommitteeManager/getSelectedTechCommittee.d.ts.map +1 -0
- package/_types/actions/techCommitteeManager/getTechCommitteeCandidates.d.ts +7 -0
- package/_types/actions/techCommitteeManager/getTechCommitteeCandidates.d.ts.map +1 -0
- package/_types/actions/techCommitteeManager/index.d.ts +5 -0
- package/_types/actions/techCommitteeManager/index.d.ts.map +1 -0
- package/_types/actions/validatorManager/decodePairs.d.ts +8 -0
- package/_types/actions/validatorManager/decodePairs.d.ts.map +1 -0
- package/_types/actions/validatorManager/getActiveValidators.d.ts +7 -0
- package/_types/actions/validatorManager/getActiveValidators.d.ts.map +1 -0
- package/_types/actions/validatorManager/getOffenceValidators.d.ts +8 -0
- package/_types/actions/validatorManager/getOffenceValidators.d.ts.map +1 -0
- package/_types/actions/validatorManager/getOfflineValidators.d.ts +8 -0
- package/_types/actions/validatorManager/getOfflineValidators.d.ts.map +1 -0
- package/_types/actions/validatorManager/getReputationForAccount.d.ts +8 -0
- package/_types/actions/validatorManager/getReputationForAccount.d.ts.map +1 -0
- package/_types/actions/validatorManager/getReputationPenaltyFor.d.ts +8 -0
- package/_types/actions/validatorManager/getReputationPenaltyFor.d.ts.map +1 -0
- package/_types/actions/validatorManager/getReputations.d.ts +9 -0
- package/_types/actions/validatorManager/getReputations.d.ts.map +1 -0
- package/_types/actions/validatorManager/getSelectedValidators.d.ts +7 -0
- package/_types/actions/validatorManager/getSelectedValidators.d.ts.map +1 -0
- package/_types/actions/validatorManager/getValidatorCandidates.d.ts +7 -0
- package/_types/actions/validatorManager/getValidatorCandidates.d.ts.map +1 -0
- package/_types/actions/validatorManager/index.d.ts +18 -0
- package/_types/actions/validatorManager/index.d.ts.map +1 -0
- package/_types/actions/validatorManager/types.d.ts +10 -0
- package/_types/actions/validatorManager/types.d.ts.map +1 -0
- package/_types/chains/defineChain.d.ts +18 -0
- package/_types/chains/defineChain.d.ts.map +1 -0
- package/_types/chains/definitions.d.ts +65 -0
- package/_types/chains/definitions.d.ts.map +1 -0
- package/_types/chains/index.d.ts +4 -0
- package/_types/chains/index.d.ts.map +1 -0
- package/_types/client/compatibility.d.ts +16 -0
- package/_types/client/compatibility.d.ts.map +1 -0
- package/_types/client/createClient.d.ts +12 -0
- package/_types/client/createClient.d.ts.map +1 -0
- package/_types/client/types.d.ts +7 -0
- package/_types/client/types.d.ts.map +1 -0
- package/_types/crypto/ctypeHash.d.ts +16 -0
- package/_types/crypto/ctypeHash.d.ts.map +1 -0
- package/_types/crypto/index.d.ts +3 -0
- package/_types/crypto/index.d.ts.map +1 -0
- package/_types/ctypes/definitions.d.ts +21 -0
- package/_types/ctypes/definitions.d.ts.map +1 -0
- package/_types/ctypes/index.d.ts +4 -0
- package/_types/ctypes/index.d.ts.map +1 -0
- package/_types/did/didUri.d.ts +11 -0
- package/_types/did/didUri.d.ts.map +1 -0
- package/_types/index.d.ts +25 -0
- package/_types/index.d.ts.map +1 -0
- package/_types/plugins/activityTracker.d.ts +34 -0
- package/_types/plugins/activityTracker.d.ts.map +1 -0
- package/_types/plugins/handshake.d.ts +32 -0
- package/_types/plugins/handshake.d.ts.map +1 -0
- package/_types/plugins/index.d.ts +19 -0
- package/_types/plugins/index.d.ts.map +1 -0
- package/_types/plugins/potential.d.ts +29 -0
- package/_types/plugins/potential.d.ts.map +1 -0
- package/_types/plugins/puzzlePieces.d.ts +28 -0
- package/_types/plugins/puzzlePieces.d.ts.map +1 -0
- package/_types/plugins/referral.d.ts +17 -0
- package/_types/plugins/referral.d.ts.map +1 -0
- package/_types/plugins/reputationVoting.d.ts +25 -0
- package/_types/plugins/reputationVoting.d.ts.map +1 -0
- package/_types/plugins/rewardPool.d.ts +14 -0
- package/_types/plugins/rewardPool.d.ts.map +1 -0
- package/_types/plugins/techCommitteeManager.d.ts +14 -0
- package/_types/plugins/techCommitteeManager.d.ts.map +1 -0
- package/_types/plugins/validatorManager.d.ts +30 -0
- package/_types/plugins/validatorManager.d.ts.map +1 -0
- package/_types/rpc/bundle.d.ts +4 -0
- package/_types/rpc/bundle.d.ts.map +1 -0
- package/_types/rpc/call.d.ts +4 -0
- package/_types/rpc/call.d.ts.map +1 -0
- package/_types/rpc/definitions.d.ts +3 -0
- package/_types/rpc/definitions.d.ts.map +1 -0
- package/_types/rpc/index.d.ts +4 -0
- package/_types/rpc/index.d.ts.map +1 -0
- package/_types/rpc/types.d.ts +3 -0
- package/_types/rpc/types.d.ts.map +1 -0
- package/_types/types/index.d.ts +17 -0
- package/_types/types/index.d.ts.map +1 -0
- package/package.json +173 -4
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RPC_DEFINITIONS = void 0;
|
|
4
|
+
exports.RPC_DEFINITIONS = {
|
|
5
|
+
activityTracker: {
|
|
6
|
+
getActivityReputation: {
|
|
7
|
+
description: 'Decayed activity reputation for an account',
|
|
8
|
+
params: [
|
|
9
|
+
{ name: 'account', type: 'AccountId' },
|
|
10
|
+
{ name: 'at', type: 'BlockHash', isOptional: true },
|
|
11
|
+
],
|
|
12
|
+
type: 'u32',
|
|
13
|
+
},
|
|
14
|
+
getRawActivityReputation: {
|
|
15
|
+
description: 'Activity reputation before decay',
|
|
16
|
+
params: [
|
|
17
|
+
{ name: 'account', type: 'AccountId' },
|
|
18
|
+
{ name: 'at', type: 'BlockHash', isOptional: true },
|
|
19
|
+
],
|
|
20
|
+
type: 'u32',
|
|
21
|
+
},
|
|
22
|
+
getActivityReputationInfo: {
|
|
23
|
+
description: 'Activity reputation with its decay inputs',
|
|
24
|
+
params: [
|
|
25
|
+
{ name: 'account', type: 'AccountId' },
|
|
26
|
+
{ name: 'at', type: 'BlockHash', isOptional: true },
|
|
27
|
+
],
|
|
28
|
+
type: 'ActivityReputationInfo',
|
|
29
|
+
},
|
|
30
|
+
getAllActivityReputations: {
|
|
31
|
+
description: 'Decayed reputation for every tracked account',
|
|
32
|
+
params: [{ name: 'at', type: 'BlockHash', isOptional: true }],
|
|
33
|
+
type: 'ActivityReputationPage',
|
|
34
|
+
},
|
|
35
|
+
getAllRawActivityReputations: {
|
|
36
|
+
description: 'Undecayed reputation for every tracked account',
|
|
37
|
+
params: [{ name: 'at', type: 'BlockHash', isOptional: true }],
|
|
38
|
+
type: 'ActivityReputationPage',
|
|
39
|
+
},
|
|
40
|
+
calculateActivityReputationAtBlock: {
|
|
41
|
+
description: 'Reputation an account would have at a given block',
|
|
42
|
+
params: [
|
|
43
|
+
{ name: 'account', type: 'AccountId' },
|
|
44
|
+
{ name: 'blockNumber', type: 'u32' },
|
|
45
|
+
{ name: 'at', type: 'BlockHash', isOptional: true },
|
|
46
|
+
],
|
|
47
|
+
type: 'u32',
|
|
48
|
+
},
|
|
49
|
+
getMaxActivityReputation: {
|
|
50
|
+
description: 'Highest activity reputation an account can reach',
|
|
51
|
+
params: [{ name: 'at', type: 'BlockHash', isOptional: true }],
|
|
52
|
+
type: 'u32',
|
|
53
|
+
},
|
|
54
|
+
getActivityTrackerConfig: {
|
|
55
|
+
description: '(maxReputation, weightFactor, decayFactor)',
|
|
56
|
+
params: [{ name: 'at', type: 'BlockHash', isOptional: true }],
|
|
57
|
+
type: '(u32, u64, u32)',
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
handshake: {
|
|
61
|
+
hasHandshakeCompleted: {
|
|
62
|
+
description: 'Whether two accounts completed a handshake',
|
|
63
|
+
params: [
|
|
64
|
+
{ name: 'sender', type: 'AccountId' },
|
|
65
|
+
{ name: 'recipient', type: 'AccountId' },
|
|
66
|
+
{ name: 'at', type: 'BlockHash', isOptional: true },
|
|
67
|
+
],
|
|
68
|
+
type: 'bool',
|
|
69
|
+
},
|
|
70
|
+
getHandshakeCount: {
|
|
71
|
+
description: 'Completed handshakes for an account',
|
|
72
|
+
params: [
|
|
73
|
+
{ name: 'account', type: 'AccountId' },
|
|
74
|
+
{ name: 'at', type: 'BlockHash', isOptional: true },
|
|
75
|
+
],
|
|
76
|
+
type: 'u32',
|
|
77
|
+
},
|
|
78
|
+
getCompletedHandshakes: {
|
|
79
|
+
description: 'Accounts that completed a handshake with this one',
|
|
80
|
+
params: [
|
|
81
|
+
{ name: 'account', type: 'AccountId' },
|
|
82
|
+
{ name: 'at', type: 'BlockHash', isOptional: true },
|
|
83
|
+
],
|
|
84
|
+
type: 'Vec<AccountId>',
|
|
85
|
+
},
|
|
86
|
+
getHandshakeStatus: {
|
|
87
|
+
description: 'Handshake state between two accounts',
|
|
88
|
+
params: [
|
|
89
|
+
{ name: 'account1', type: 'AccountId' },
|
|
90
|
+
{ name: 'account2', type: 'AccountId' },
|
|
91
|
+
{ name: 'at', type: 'BlockHash', isOptional: true },
|
|
92
|
+
],
|
|
93
|
+
type: 'Text',
|
|
94
|
+
},
|
|
95
|
+
handshakeExists: {
|
|
96
|
+
description: 'Whether a handshake record exists at all',
|
|
97
|
+
params: [
|
|
98
|
+
{ name: 'account1', type: 'AccountId' },
|
|
99
|
+
{ name: 'account2', type: 'AccountId' },
|
|
100
|
+
{ name: 'at', type: 'BlockHash', isOptional: true },
|
|
101
|
+
],
|
|
102
|
+
type: 'bool',
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
potential: {
|
|
106
|
+
getPotential: {
|
|
107
|
+
description: 'Potential balance of an account',
|
|
108
|
+
params: [
|
|
109
|
+
{ name: 'account', type: 'AccountId' },
|
|
110
|
+
{ name: 'at', type: 'BlockHash', isOptional: true },
|
|
111
|
+
],
|
|
112
|
+
type: 'u128',
|
|
113
|
+
},
|
|
114
|
+
getMaxSupply: {
|
|
115
|
+
description: 'Maximum POTENTIAL that can ever be minted',
|
|
116
|
+
params: [{ name: 'at', type: 'BlockHash', isOptional: true }],
|
|
117
|
+
type: 'u128',
|
|
118
|
+
},
|
|
119
|
+
getTotalPotentialMinted: {
|
|
120
|
+
description: 'POTENTIAL minted so far, across every cycle',
|
|
121
|
+
params: [{ name: 'at', type: 'BlockHash', isOptional: true }],
|
|
122
|
+
type: 'u128',
|
|
123
|
+
},
|
|
124
|
+
getMonthSupply: {
|
|
125
|
+
description: 'POTENTIAL mintable in the current month',
|
|
126
|
+
params: [{ name: 'at', type: 'BlockHash', isOptional: true }],
|
|
127
|
+
type: 'u128',
|
|
128
|
+
},
|
|
129
|
+
getMonthPotentialMinted: {
|
|
130
|
+
description: 'POTENTIAL minted in the current month',
|
|
131
|
+
params: [{ name: 'at', type: 'BlockHash', isOptional: true }],
|
|
132
|
+
type: 'u128',
|
|
133
|
+
},
|
|
134
|
+
getCycleSupply: {
|
|
135
|
+
description: 'POTENTIAL mintable in the current cycle',
|
|
136
|
+
params: [{ name: 'at', type: 'BlockHash', isOptional: true }],
|
|
137
|
+
type: 'u128',
|
|
138
|
+
},
|
|
139
|
+
getCyclePotentialMinted: {
|
|
140
|
+
description: 'POTENTIAL minted in the current cycle',
|
|
141
|
+
params: [{ name: 'at', type: 'BlockHash', isOptional: true }],
|
|
142
|
+
type: 'u128',
|
|
143
|
+
},
|
|
144
|
+
getMonthNumber: {
|
|
145
|
+
description: 'The current month, counted from genesis',
|
|
146
|
+
params: [{ name: 'at', type: 'BlockHash', isOptional: true }],
|
|
147
|
+
type: 'u32',
|
|
148
|
+
},
|
|
149
|
+
getCycleNumber: {
|
|
150
|
+
description: 'The current cycle, counted from genesis',
|
|
151
|
+
params: [{ name: 'at', type: 'BlockHash', isOptional: true }],
|
|
152
|
+
type: 'u32',
|
|
153
|
+
},
|
|
154
|
+
defaultActiveReferralShare: {
|
|
155
|
+
description: 'Active-referral share applied when an account has no override',
|
|
156
|
+
params: [{ name: 'at', type: 'BlockHash', isOptional: true }],
|
|
157
|
+
type: 'u32',
|
|
158
|
+
},
|
|
159
|
+
activeReferralShare: {
|
|
160
|
+
description: 'Active-referral share for a specific account',
|
|
161
|
+
params: [
|
|
162
|
+
{ name: 'account', type: 'AccountId' },
|
|
163
|
+
{ name: 'at', type: 'BlockHash', isOptional: true },
|
|
164
|
+
],
|
|
165
|
+
type: 'u32',
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
puzzlePieces: {
|
|
169
|
+
wildcardThreshold: {
|
|
170
|
+
description: 'Mints required before a wildcard is distributed',
|
|
171
|
+
params: [{ name: 'at', type: 'BlockHash', isOptional: true }],
|
|
172
|
+
type: 'Option<u32>',
|
|
173
|
+
},
|
|
174
|
+
wildcardCollectionId: {
|
|
175
|
+
description: 'Collection wildcards are minted into',
|
|
176
|
+
params: [{ name: 'at', type: 'BlockHash', isOptional: true }],
|
|
177
|
+
type: 'Option<u32>',
|
|
178
|
+
},
|
|
179
|
+
wildcardDistributionMap: {
|
|
180
|
+
description: 'Scheduled wildcard distributions, by block',
|
|
181
|
+
params: [{ name: 'at', type: 'BlockHash', isOptional: true }],
|
|
182
|
+
type: 'Vec<(u32, u32)>',
|
|
183
|
+
},
|
|
184
|
+
pendingWildcards: {
|
|
185
|
+
description: 'Wildcards owed but not yet minted into the distribution map',
|
|
186
|
+
params: [{ name: 'at', type: 'BlockHash', isOptional: true }],
|
|
187
|
+
type: 'u32',
|
|
188
|
+
},
|
|
189
|
+
totalPuzzlePiecesMinted: {
|
|
190
|
+
description: 'Total puzzle pieces minted',
|
|
191
|
+
params: [{ name: 'at', type: 'BlockHash', isOptional: true }],
|
|
192
|
+
type: 'Option<u32>',
|
|
193
|
+
},
|
|
194
|
+
collectionsCount: {
|
|
195
|
+
description: 'Number of collections',
|
|
196
|
+
params: [{ name: 'at', type: 'BlockHash', isOptional: true }],
|
|
197
|
+
type: 'u32',
|
|
198
|
+
},
|
|
199
|
+
itemsCount: {
|
|
200
|
+
description: 'Number of items in a collection',
|
|
201
|
+
params: [
|
|
202
|
+
{ name: 'collectionId', type: 'u32' },
|
|
203
|
+
{ name: 'at', type: 'BlockHash', isOptional: true },
|
|
204
|
+
],
|
|
205
|
+
type: 'u32',
|
|
206
|
+
},
|
|
207
|
+
owner: {
|
|
208
|
+
description: 'Owner of one item, if it exists',
|
|
209
|
+
params: [
|
|
210
|
+
{ name: 'collectionId', type: 'u32' },
|
|
211
|
+
{ name: 'itemId', type: 'u32' },
|
|
212
|
+
{ name: 'at', type: 'BlockHash', isOptional: true },
|
|
213
|
+
],
|
|
214
|
+
type: 'Option<AccountId>',
|
|
215
|
+
},
|
|
216
|
+
},
|
|
217
|
+
referral: {
|
|
218
|
+
activeReferralsCount: {
|
|
219
|
+
description: 'Number of accounts in the referral subtree rooted at this account',
|
|
220
|
+
params: [
|
|
221
|
+
{ name: 'account', type: 'AccountId' },
|
|
222
|
+
{ name: 'at', type: 'BlockHash', isOptional: true },
|
|
223
|
+
],
|
|
224
|
+
type: 'u32',
|
|
225
|
+
},
|
|
226
|
+
referrer: {
|
|
227
|
+
description: 'The referrer of an account, if it has one',
|
|
228
|
+
params: [
|
|
229
|
+
{ name: 'account', type: 'AccountId' },
|
|
230
|
+
{ name: 'at', type: 'BlockHash', isOptional: true },
|
|
231
|
+
],
|
|
232
|
+
type: 'Option<AccountId>',
|
|
233
|
+
},
|
|
234
|
+
activeReferrals: {
|
|
235
|
+
description: 'Parent and direct children of an account',
|
|
236
|
+
params: [
|
|
237
|
+
{ name: 'account', type: 'AccountId' },
|
|
238
|
+
{ name: 'at', type: 'BlockHash', isOptional: true },
|
|
239
|
+
],
|
|
240
|
+
type: 'Option<TreeNode>',
|
|
241
|
+
},
|
|
242
|
+
blockProducers: {
|
|
243
|
+
description: 'Accounts currently counted as block producers',
|
|
244
|
+
params: [{ name: 'at', type: 'BlockHash', isOptional: true }],
|
|
245
|
+
type: 'Vec<AccountId>',
|
|
246
|
+
},
|
|
247
|
+
blockProducersPage: {
|
|
248
|
+
description: 'One page of block producers',
|
|
249
|
+
params: [
|
|
250
|
+
{ name: 'pagination', type: 'Pagination', isOptional: true },
|
|
251
|
+
{ name: 'at', type: 'BlockHash', isOptional: true },
|
|
252
|
+
],
|
|
253
|
+
type: 'PaginatedResponse',
|
|
254
|
+
},
|
|
255
|
+
pendingReferrals: {
|
|
256
|
+
description: 'Referrals awaiting confirmation for a referrer',
|
|
257
|
+
params: [
|
|
258
|
+
{ name: 'referrer', type: 'AccountId' },
|
|
259
|
+
{ name: 'at', type: 'BlockHash', isOptional: true },
|
|
260
|
+
],
|
|
261
|
+
type: 'Vec<AccountId>',
|
|
262
|
+
},
|
|
263
|
+
pendingReferralsPage: {
|
|
264
|
+
description: 'One page of pending referrals',
|
|
265
|
+
params: [
|
|
266
|
+
{ name: 'referrer', type: 'AccountId' },
|
|
267
|
+
{ name: 'pagination', type: 'Pagination', isOptional: true },
|
|
268
|
+
{ name: 'at', type: 'BlockHash', isOptional: true },
|
|
269
|
+
],
|
|
270
|
+
type: 'PaginatedResponse',
|
|
271
|
+
},
|
|
272
|
+
},
|
|
273
|
+
reputationVoting: {
|
|
274
|
+
getTally: {
|
|
275
|
+
description: 'Vote tally for a poll',
|
|
276
|
+
params: [
|
|
277
|
+
{ name: 'pollIndex', type: 'u32' },
|
|
278
|
+
{ name: 'at', type: 'BlockHash', isOptional: true },
|
|
279
|
+
],
|
|
280
|
+
type: 'ReputationTally',
|
|
281
|
+
},
|
|
282
|
+
isPassing: {
|
|
283
|
+
description: 'Whether a poll is currently passing',
|
|
284
|
+
params: [
|
|
285
|
+
{ name: 'pollIndex', type: 'u32' },
|
|
286
|
+
{ name: 'at', type: 'BlockHash', isOptional: true },
|
|
287
|
+
],
|
|
288
|
+
type: 'bool',
|
|
289
|
+
},
|
|
290
|
+
getVotesForAccount: {
|
|
291
|
+
description: 'Every vote an account has cast',
|
|
292
|
+
params: [
|
|
293
|
+
{ name: 'account', type: 'AccountId' },
|
|
294
|
+
{ name: 'at', type: 'BlockHash', isOptional: true },
|
|
295
|
+
],
|
|
296
|
+
type: 'Vec<(u32, VoteRecord)>',
|
|
297
|
+
},
|
|
298
|
+
getVotingReputation: {
|
|
299
|
+
description: 'Reputation an account votes with; may be negative',
|
|
300
|
+
params: [
|
|
301
|
+
{ name: 'account', type: 'AccountId' },
|
|
302
|
+
{ name: 'at', type: 'BlockHash', isOptional: true },
|
|
303
|
+
],
|
|
304
|
+
type: 'i32',
|
|
305
|
+
},
|
|
306
|
+
},
|
|
307
|
+
rewardPool: {
|
|
308
|
+
accountId: {
|
|
309
|
+
description: 'Account the reward pool holds its funds in',
|
|
310
|
+
params: [{ name: 'at', type: 'BlockHash', isOptional: true }],
|
|
311
|
+
type: 'AccountId',
|
|
312
|
+
},
|
|
313
|
+
balance: {
|
|
314
|
+
description: 'Free balance of the reward pool account',
|
|
315
|
+
params: [{ name: 'at', type: 'BlockHash', isOptional: true }],
|
|
316
|
+
type: 'u128',
|
|
317
|
+
},
|
|
318
|
+
},
|
|
319
|
+
techCommitteeManager: {
|
|
320
|
+
candidates: {
|
|
321
|
+
description: 'Accounts standing for the technical committee',
|
|
322
|
+
params: [{ name: 'at', type: 'BlockHash', isOptional: true }],
|
|
323
|
+
type: 'Vec<AccountId>',
|
|
324
|
+
},
|
|
325
|
+
selectedCandidates: {
|
|
326
|
+
description: 'Accounts currently on the technical committee',
|
|
327
|
+
params: [{ name: 'at', type: 'BlockHash', isOptional: true }],
|
|
328
|
+
type: 'Vec<AccountId>',
|
|
329
|
+
},
|
|
330
|
+
},
|
|
331
|
+
validatorManager: {
|
|
332
|
+
validatorCandidates: {
|
|
333
|
+
description: 'Accounts registered as validator candidates',
|
|
334
|
+
params: [{ name: 'at', type: 'BlockHash', isOptional: true }],
|
|
335
|
+
type: 'Vec<AccountId>',
|
|
336
|
+
},
|
|
337
|
+
selectedValidators: {
|
|
338
|
+
description: 'Candidates selected for the next session',
|
|
339
|
+
params: [{ name: 'at', type: 'BlockHash', isOptional: true }],
|
|
340
|
+
type: 'Vec<AccountId>',
|
|
341
|
+
},
|
|
342
|
+
activeValidators: {
|
|
343
|
+
description: 'Validators producing blocks in the current session',
|
|
344
|
+
params: [{ name: 'at', type: 'BlockHash', isOptional: true }],
|
|
345
|
+
type: 'Vec<AccountId>',
|
|
346
|
+
},
|
|
347
|
+
offlineValidators: {
|
|
348
|
+
description: 'Validators marked offline, with the session it happened in',
|
|
349
|
+
params: [{ name: 'at', type: 'BlockHash', isOptional: true }],
|
|
350
|
+
type: 'Vec<(AccountId, u32)>',
|
|
351
|
+
},
|
|
352
|
+
offenceValidators: {
|
|
353
|
+
description: 'Validators that committed an offence, with the session',
|
|
354
|
+
params: [{ name: 'at', type: 'BlockHash', isOptional: true }],
|
|
355
|
+
type: 'Vec<(AccountId, u32)>',
|
|
356
|
+
},
|
|
357
|
+
getReputationForAccount: {
|
|
358
|
+
description: 'Total reputation for one account',
|
|
359
|
+
params: [
|
|
360
|
+
{ name: 'account', type: 'AccountId' },
|
|
361
|
+
{ name: 'at', type: 'BlockHash', isOptional: true },
|
|
362
|
+
],
|
|
363
|
+
type: 'u32',
|
|
364
|
+
},
|
|
365
|
+
getReputations: {
|
|
366
|
+
description: 'Reputation for several accounts in one call',
|
|
367
|
+
params: [
|
|
368
|
+
{ name: 'accounts', type: 'Vec<AccountId>' },
|
|
369
|
+
{ name: 'at', type: 'BlockHash', isOptional: true },
|
|
370
|
+
],
|
|
371
|
+
type: 'Vec<(AccountId, u32)>',
|
|
372
|
+
},
|
|
373
|
+
reputationPenaltyFor: {
|
|
374
|
+
description: 'Pending reputation penalty for an account',
|
|
375
|
+
params: [
|
|
376
|
+
{ name: 'account', type: 'AccountId' },
|
|
377
|
+
{ name: 'at', type: 'BlockHash', isOptional: true },
|
|
378
|
+
],
|
|
379
|
+
type: 'u32',
|
|
380
|
+
},
|
|
381
|
+
},
|
|
382
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.typesBundle = exports.TOTOCHAIN_DEFINITIONS = exports.CHAIN_TYPES = exports.RPC_DEFINITIONS = void 0;
|
|
4
|
+
var definitions_js_1 = require("./definitions.js");
|
|
5
|
+
Object.defineProperty(exports, "RPC_DEFINITIONS", { enumerable: true, get: function () { return definitions_js_1.RPC_DEFINITIONS; } });
|
|
6
|
+
var types_js_1 = require("./types.js");
|
|
7
|
+
Object.defineProperty(exports, "CHAIN_TYPES", { enumerable: true, get: function () { return types_js_1.CHAIN_TYPES; } });
|
|
8
|
+
var bundle_js_1 = require("./bundle.js");
|
|
9
|
+
Object.defineProperty(exports, "TOTOCHAIN_DEFINITIONS", { enumerable: true, get: function () { return bundle_js_1.TOTOCHAIN_DEFINITIONS; } });
|
|
10
|
+
Object.defineProperty(exports, "typesBundle", { enumerable: true, get: function () { return bundle_js_1.typesBundle; } });
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CHAIN_TYPES = void 0;
|
|
4
|
+
exports.CHAIN_TYPES = {
|
|
5
|
+
TreeNode: {
|
|
6
|
+
parent: 'Option<AccountId>',
|
|
7
|
+
children: 'Vec<AccountId>',
|
|
8
|
+
},
|
|
9
|
+
Pagination: {
|
|
10
|
+
page: 'Option<u32>',
|
|
11
|
+
pageSize: 'Option<u32>',
|
|
12
|
+
},
|
|
13
|
+
PaginatedResponse: {
|
|
14
|
+
items: 'Vec<AccountId>',
|
|
15
|
+
total: 'Option<u32>',
|
|
16
|
+
page: 'u32',
|
|
17
|
+
pageSize: 'u32',
|
|
18
|
+
hasMore: 'bool',
|
|
19
|
+
},
|
|
20
|
+
VoteDirection: {
|
|
21
|
+
_enum: ['Aye', 'Nay'],
|
|
22
|
+
},
|
|
23
|
+
VoteRecord: {
|
|
24
|
+
direction: 'VoteDirection',
|
|
25
|
+
reputation: 'u32',
|
|
26
|
+
votedAt: 'u32',
|
|
27
|
+
},
|
|
28
|
+
ReputationTally: {
|
|
29
|
+
ayes: 'u128',
|
|
30
|
+
nays: 'u128',
|
|
31
|
+
turnout: 'u32',
|
|
32
|
+
electorate: 'u128',
|
|
33
|
+
},
|
|
34
|
+
ActivityReputationInfo: {
|
|
35
|
+
currentReputation: 'u32',
|
|
36
|
+
rawReputation: 'u32',
|
|
37
|
+
lastActivityBlock: 'u32',
|
|
38
|
+
blocksSinceActivity: 'u32',
|
|
39
|
+
},
|
|
40
|
+
ActivityReputationPage: {
|
|
41
|
+
entries: 'Vec<(AccountId, u32)>',
|
|
42
|
+
truncated: 'bool',
|
|
43
|
+
},
|
|
44
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type Address = `0x${string}`;
|
|
2
|
+
export type BlockHash = `0x${string}`;
|
|
3
|
+
export type Hash = `0x${string}`;
|
|
4
|
+
export interface Pagination {
|
|
5
|
+
page?: number;
|
|
6
|
+
pageSize?: number;
|
|
7
|
+
}
|
|
8
|
+
export interface PaginatedResponse<T> {
|
|
9
|
+
items: T[];
|
|
10
|
+
total: number | null;
|
|
11
|
+
page: number;
|
|
12
|
+
pageSize: number;
|
|
13
|
+
hasMore: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare const DEFAULT_PAGE_SIZE = 100;
|
|
16
|
+
export declare const MAX_PAGE_SIZE = 1000;
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { ETHEREUM_PATH, account, addressOf, createKeyring, deriveAddress, derivationOf, fromMnemonic, fromPrivateKey, fromSubstrateMnemonic, generateAccount, generateMnemonic, isChecksummed, isValidAddress, pairFor, privateKeyFromMnemonic, stash, toChecksummed, } from './keyring.js';
|
|
2
|
+
export { toSubstrateSigner } from './substrateSigner.js';
|
|
3
|
+
export { DEV_ACCOUNTS, DEV_PHRASE, VALIDATOR_ACCOUNTS, WELL_KNOWN_ACCOUNTS, wellKnownAccount, } from './wellKnown.js';
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { Keyring } from '@polkadot/keyring';
|
|
2
|
+
import { ethereumEncode, isEthereumChecksum, hdEthereum, mnemonicGenerate, mnemonicToLegacySeed, mnemonicToMiniSecret, mnemonicValidate, secp256k1PairFromSeed, } from '@polkadot/util-crypto';
|
|
3
|
+
import { u8aToHex } from '@polkadot/util';
|
|
4
|
+
import { wellKnownAccount } from './wellKnown.js';
|
|
5
|
+
export const ETHEREUM_PATH = "m/44'/60'/0'/0";
|
|
6
|
+
export function createKeyring() {
|
|
7
|
+
return new Keyring({ type: 'ethereum' });
|
|
8
|
+
}
|
|
9
|
+
export function addressOf(pair) {
|
|
10
|
+
return pair.address;
|
|
11
|
+
}
|
|
12
|
+
export function isValidAddress(value) {
|
|
13
|
+
return /^0x[0-9a-fA-F]{40}$/.test(value);
|
|
14
|
+
}
|
|
15
|
+
export function isChecksummed(address) {
|
|
16
|
+
return isValidAddress(address) && isEthereumChecksum(address);
|
|
17
|
+
}
|
|
18
|
+
export function toChecksummed(address) {
|
|
19
|
+
return ethereumEncode(address);
|
|
20
|
+
}
|
|
21
|
+
const PRIVATE_KEY = /^0x[0-9a-fA-F]{64}$/;
|
|
22
|
+
export function fromPrivateKey(privateKey) {
|
|
23
|
+
if (!PRIVATE_KEY.test(privateKey)) {
|
|
24
|
+
throw new Error('expected a 32-byte 0x-prefixed private key');
|
|
25
|
+
}
|
|
26
|
+
return createKeyring().addFromUri(privateKey);
|
|
27
|
+
}
|
|
28
|
+
export function fromMnemonic(mnemonic, index = 0) {
|
|
29
|
+
if (!mnemonicValidate(mnemonic)) {
|
|
30
|
+
throw new Error('expected a valid BIP-39 mnemonic');
|
|
31
|
+
}
|
|
32
|
+
return createKeyring().addFromUri(`${mnemonic}/${ETHEREUM_PATH}/${index}`);
|
|
33
|
+
}
|
|
34
|
+
export function fromSubstrateMnemonic(mnemonic) {
|
|
35
|
+
if (!mnemonicValidate(mnemonic)) {
|
|
36
|
+
throw new Error('expected a valid BIP-39 mnemonic');
|
|
37
|
+
}
|
|
38
|
+
return fromPrivateKey(u8aToHex(mnemonicToMiniSecret(mnemonic)));
|
|
39
|
+
}
|
|
40
|
+
export function generateMnemonic(words = 12) {
|
|
41
|
+
return mnemonicGenerate(words);
|
|
42
|
+
}
|
|
43
|
+
export function generateAccount(index = 0) {
|
|
44
|
+
const mnemonic = generateMnemonic();
|
|
45
|
+
const pair = fromMnemonic(mnemonic, index);
|
|
46
|
+
return {
|
|
47
|
+
mnemonic,
|
|
48
|
+
privateKey: privateKeyFromMnemonic(mnemonic, index),
|
|
49
|
+
address: pair.address,
|
|
50
|
+
pair,
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
export function privateKeyFromMnemonic(mnemonic, index = 0) {
|
|
54
|
+
if (!mnemonicValidate(mnemonic)) {
|
|
55
|
+
throw new Error('expected a valid BIP-39 mnemonic');
|
|
56
|
+
}
|
|
57
|
+
const seed = mnemonicToLegacySeed(mnemonic, '', false, 64);
|
|
58
|
+
return u8aToHex(hdEthereum(seed, `${ETHEREUM_PATH}/${index}`).secretKey);
|
|
59
|
+
}
|
|
60
|
+
export function deriveAddress(privateKey) {
|
|
61
|
+
if (!PRIVATE_KEY.test(privateKey)) {
|
|
62
|
+
throw new Error('expected a 32-byte 0x-prefixed private key');
|
|
63
|
+
}
|
|
64
|
+
const seed = Uint8Array.from((privateKey.slice(2).match(/.{2}/g) ?? []).map((b) => parseInt(b, 16)));
|
|
65
|
+
return ethereumEncode(secp256k1PairFromSeed(seed).publicKey);
|
|
66
|
+
}
|
|
67
|
+
export function account(name) {
|
|
68
|
+
const record = wellKnownAccount(name);
|
|
69
|
+
return pairFor(record);
|
|
70
|
+
}
|
|
71
|
+
export function stash(name) {
|
|
72
|
+
const record = wellKnownAccount(name);
|
|
73
|
+
if (!record.stash) {
|
|
74
|
+
throw new Error(`${record.name} has no stash account`);
|
|
75
|
+
}
|
|
76
|
+
return fromPrivateKey(record.stash.privateKey);
|
|
77
|
+
}
|
|
78
|
+
export function pairFor(record) {
|
|
79
|
+
return fromPrivateKey(record.privateKey);
|
|
80
|
+
}
|
|
81
|
+
export function derivationOf(name) {
|
|
82
|
+
return wellKnownAccount(name).derivation;
|
|
83
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { blake2AsU8a, keccakAsU8a } from '@polkadot/util-crypto';
|
|
2
|
+
import { hexToU8a, stringToU8a, u8aConcat, u8aToHex } from '@polkadot/util';
|
|
3
|
+
const RAW_MESSAGE_DOMAIN = /*#__PURE__*/ stringToU8a('\x19Totochain Signed Message:\n');
|
|
4
|
+
export function toSubstrateSigner(api, signer) {
|
|
5
|
+
const normalise = (signature) => {
|
|
6
|
+
if (signature.length !== 65) {
|
|
7
|
+
throw new Error(`signDigest must return 65 bytes (r || s || v); received ${signature.length}`);
|
|
8
|
+
}
|
|
9
|
+
const out = new Uint8Array(signature);
|
|
10
|
+
const v = out[64];
|
|
11
|
+
if (v === 0 || v === 1) {
|
|
12
|
+
out[64] = v + 27;
|
|
13
|
+
}
|
|
14
|
+
else if (v === 27 || v === 28) {
|
|
15
|
+
out[64] = v;
|
|
16
|
+
}
|
|
17
|
+
else if (v === 35 || v === 36) {
|
|
18
|
+
out[64] = v - 8;
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
throw new Error(`unsupported recovery id ${v}; expected 0, 1, 27, 28, 35 or 36`);
|
|
22
|
+
}
|
|
23
|
+
return out;
|
|
24
|
+
};
|
|
25
|
+
return {
|
|
26
|
+
async signPayload(payload) {
|
|
27
|
+
const extrinsic = api.registry.createType('ExtrinsicPayload', payload, {
|
|
28
|
+
version: payload.version,
|
|
29
|
+
});
|
|
30
|
+
// A payload longer than 256 bytes is signed as its blake2_256 hash, which is what the
|
|
31
|
+
// chain checks the signature against.
|
|
32
|
+
const encoded = extrinsic.toU8a({ method: true });
|
|
33
|
+
const digest = keccakAsU8a(encoded.length > 256 ? blake2AsU8a(encoded) : encoded);
|
|
34
|
+
return { id: 0, signature: u8aToHex(normalise(await signer.signDigest(digest))) };
|
|
35
|
+
},
|
|
36
|
+
async signRaw(raw) {
|
|
37
|
+
if (raw.type !== 'bytes') {
|
|
38
|
+
throw new Error(`signRaw accepts only type 'bytes'; received '${String(raw.type)}'. ` +
|
|
39
|
+
'Transaction payloads must go through signPayload.');
|
|
40
|
+
}
|
|
41
|
+
const data = hexToU8a(raw.data);
|
|
42
|
+
const digest = keccakAsU8a(u8aConcat(RAW_MESSAGE_DOMAIN, stringToU8a(`${data.length}\n`), data));
|
|
43
|
+
return { id: 0, signature: u8aToHex(normalise(await signer.signDigest(digest))) };
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|