@polymeshassociation/polymesh-sdk 14.0.0-beta.11
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/AccountManagement.d.ts +89 -0
- package/AccountManagement.d.ts.map +1 -0
- package/AccountManagement.js +116 -0
- package/AccountManagement.js.map +1 -0
- package/Assets.d.ts +68 -0
- package/Assets.d.ts.map +1 -0
- package/Assets.js +114 -0
- package/Assets.js.map +1 -0
- package/CHANGELOG.md +6 -0
- package/Claims.d.ts +123 -0
- package/Claims.d.ts.map +1 -0
- package/Claims.js +247 -0
- package/Claims.js.map +1 -0
- package/Identities.d.ts +45 -0
- package/Identities.d.ts.map +1 -0
- package/Identities.js +34 -0
- package/Identities.js.map +1 -0
- package/Network.d.ts +104 -0
- package/Network.d.ts.map +1 -0
- package/Network.js +203 -0
- package/Network.js.map +1 -0
- package/Polymesh.d.ts +111 -0
- package/Polymesh.d.ts.map +1 -0
- package/Polymesh.js +219 -0
- package/Polymesh.js.map +1 -0
- package/Settlements.d.ts +44 -0
- package/Settlements.d.ts.map +1 -0
- package/Settlements.js +93 -0
- package/Settlements.js.map +1 -0
- package/api/entities/Account.d.ts +102 -0
- package/api/entities/Account.d.ts.map +1 -0
- package/api/entities/Account.js +375 -0
- package/api/entities/Account.js.map +1 -0
- package/api/entities/Asset/AssetHolders.d.ts +14 -0
- package/api/entities/Asset/AssetHolders.d.ts.map +1 -0
- package/api/entities/Asset/AssetHolders.js +45 -0
- package/api/entities/Asset/AssetHolders.js.map +1 -0
- package/api/entities/Asset/Checkpoints/Schedules.d.ts +50 -0
- package/api/entities/Asset/Checkpoints/Schedules.d.ts.map +1 -0
- package/api/entities/Asset/Checkpoints/Schedules.js +103 -0
- package/api/entities/Asset/Checkpoints/Schedules.js.map +1 -0
- package/api/entities/Asset/Checkpoints/index.d.ts +33 -0
- package/api/entities/Asset/Checkpoints/index.d.ts.map +1 -0
- package/api/entities/Asset/Checkpoints/index.js +90 -0
- package/api/entities/Asset/Checkpoints/index.js.map +1 -0
- package/api/entities/Asset/Checkpoints/types.d.ts +20 -0
- package/api/entities/Asset/Checkpoints/types.d.ts.map +1 -0
- package/api/entities/Asset/Checkpoints/types.js +9 -0
- package/api/entities/Asset/Checkpoints/types.js.map +1 -0
- package/api/entities/Asset/Compliance/Requirements.d.ts +68 -0
- package/api/entities/Asset/Compliance/Requirements.d.ts.map +1 -0
- package/api/entities/Asset/Compliance/Requirements.js +114 -0
- package/api/entities/Asset/Compliance/Requirements.js.map +1 -0
- package/api/entities/Asset/Compliance/TrustedClaimIssuers.d.ts +33 -0
- package/api/entities/Asset/Compliance/TrustedClaimIssuers.d.ts.map +1 -0
- package/api/entities/Asset/Compliance/TrustedClaimIssuers.js +70 -0
- package/api/entities/Asset/Compliance/TrustedClaimIssuers.js.map +1 -0
- package/api/entities/Asset/Compliance/index.d.ts +15 -0
- package/api/entities/Asset/Compliance/index.d.ts.map +1 -0
- package/api/entities/Asset/Compliance/index.js +21 -0
- package/api/entities/Asset/Compliance/index.js.map +1 -0
- package/api/entities/Asset/CorporateActions/Distributions.d.ts +32 -0
- package/api/entities/Asset/CorporateActions/Distributions.d.ts.map +1 -0
- package/api/entities/Asset/CorporateActions/Distributions.js +74 -0
- package/api/entities/Asset/CorporateActions/Distributions.js.map +1 -0
- package/api/entities/Asset/CorporateActions/index.d.ts +58 -0
- package/api/entities/Asset/CorporateActions/index.d.ts.map +1 -0
- package/api/entities/Asset/CorporateActions/index.js +85 -0
- package/api/entities/Asset/CorporateActions/index.js.map +1 -0
- package/api/entities/Asset/CorporateActions/types.d.ts +8 -0
- package/api/entities/Asset/CorporateActions/types.d.ts.map +1 -0
- package/api/entities/Asset/CorporateActions/types.js +3 -0
- package/api/entities/Asset/CorporateActions/types.js.map +1 -0
- package/api/entities/Asset/Documents.d.ts +24 -0
- package/api/entities/Asset/Documents.d.ts.map +1 -0
- package/api/entities/Asset/Documents.js +49 -0
- package/api/entities/Asset/Documents.js.map +1 -0
- package/api/entities/Asset/Issuance.d.ts +21 -0
- package/api/entities/Asset/Issuance.d.ts.map +1 -0
- package/api/entities/Asset/Issuance.js +20 -0
- package/api/entities/Asset/Issuance.js.map +1 -0
- package/api/entities/Asset/Offerings.d.ts +37 -0
- package/api/entities/Asset/Offerings.d.ts.map +1 -0
- package/api/entities/Asset/Offerings.js +79 -0
- package/api/entities/Asset/Offerings.js.map +1 -0
- package/api/entities/Asset/Permissions.d.ts +50 -0
- package/api/entities/Asset/Permissions.d.ts.map +1 -0
- package/api/entities/Asset/Permissions.js +83 -0
- package/api/entities/Asset/Permissions.js.map +1 -0
- package/api/entities/Asset/Settlements.d.ts +48 -0
- package/api/entities/Asset/Settlements.d.ts.map +1 -0
- package/api/entities/Asset/Settlements.js +108 -0
- package/api/entities/Asset/Settlements.js.map +1 -0
- package/api/entities/Asset/TransferRestrictions/Count.d.ts +36 -0
- package/api/entities/Asset/TransferRestrictions/Count.d.ts.map +1 -0
- package/api/entities/Asset/TransferRestrictions/Count.js +16 -0
- package/api/entities/Asset/TransferRestrictions/Count.js.map +1 -0
- package/api/entities/Asset/TransferRestrictions/Percentage.d.ts +36 -0
- package/api/entities/Asset/TransferRestrictions/Percentage.d.ts.map +1 -0
- package/api/entities/Asset/TransferRestrictions/Percentage.js +16 -0
- package/api/entities/Asset/TransferRestrictions/Percentage.js.map +1 -0
- package/api/entities/Asset/TransferRestrictions/TransferRestrictionBase.d.ts +44 -0
- package/api/entities/Asset/TransferRestrictions/TransferRestrictionBase.d.ts.map +1 -0
- package/api/entities/Asset/TransferRestrictions/TransferRestrictionBase.js +99 -0
- package/api/entities/Asset/TransferRestrictions/TransferRestrictionBase.js.map +1 -0
- package/api/entities/Asset/TransferRestrictions/index.d.ts +15 -0
- package/api/entities/Asset/TransferRestrictions/index.d.ts.map +1 -0
- package/api/entities/Asset/TransferRestrictions/index.js +21 -0
- package/api/entities/Asset/TransferRestrictions/index.js.map +1 -0
- package/api/entities/Asset/index.d.ts +166 -0
- package/api/entities/Asset/index.d.ts.map +1 -0
- package/api/entities/Asset/index.js +306 -0
- package/api/entities/Asset/index.js.map +1 -0
- package/api/entities/Asset/types.d.ts +55 -0
- package/api/entities/Asset/types.d.ts.map +1 -0
- package/api/entities/Asset/types.js +19 -0
- package/api/entities/Asset/types.js.map +1 -0
- package/api/entities/AuthorizationRequest.d.ts +95 -0
- package/api/entities/AuthorizationRequest.d.ts.map +1 -0
- package/api/entities/AuthorizationRequest.js +128 -0
- package/api/entities/AuthorizationRequest.js.map +1 -0
- package/api/entities/Checkpoint.d.ts +71 -0
- package/api/entities/Checkpoint.d.ts.map +1 -0
- package/api/entities/Checkpoint.js +180 -0
- package/api/entities/Checkpoint.js.map +1 -0
- package/api/entities/CheckpointSchedule/index.d.ts +83 -0
- package/api/entities/CheckpointSchedule/index.d.ts.map +1 -0
- package/api/entities/CheckpointSchedule/index.js +137 -0
- package/api/entities/CheckpointSchedule/index.js.map +1 -0
- package/api/entities/CheckpointSchedule/types.d.ts +8 -0
- package/api/entities/CheckpointSchedule/types.d.ts.map +1 -0
- package/api/entities/CheckpointSchedule/types.js +3 -0
- package/api/entities/CheckpointSchedule/types.js.map +1 -0
- package/api/entities/CorporateAction.d.ts +40 -0
- package/api/entities/CorporateAction.d.ts.map +1 -0
- package/api/entities/CorporateAction.js +25 -0
- package/api/entities/CorporateAction.js.map +1 -0
- package/api/entities/CorporateActionBase/index.d.ts +106 -0
- package/api/entities/CorporateActionBase/index.d.ts.map +1 -0
- package/api/entities/CorporateActionBase/index.js +134 -0
- package/api/entities/CorporateActionBase/index.js.map +1 -0
- package/api/entities/CorporateActionBase/types.d.ts +30 -0
- package/api/entities/CorporateActionBase/types.d.ts.map +1 -0
- package/api/entities/CorporateActionBase/types.js +17 -0
- package/api/entities/CorporateActionBase/types.js.map +1 -0
- package/api/entities/CustomPermissionGroup.d.ts +43 -0
- package/api/entities/CustomPermissionGroup.d.ts.map +1 -0
- package/api/entities/CustomPermissionGroup.js +81 -0
- package/api/entities/CustomPermissionGroup.js.map +1 -0
- package/api/entities/DefaultPortfolio.d.ts +18 -0
- package/api/entities/DefaultPortfolio.d.ts.map +1 -0
- package/api/entities/DefaultPortfolio.js +35 -0
- package/api/entities/DefaultPortfolio.js.map +1 -0
- package/api/entities/DefaultTrustedClaimIssuer.d.ts +36 -0
- package/api/entities/DefaultTrustedClaimIssuer.d.ts.map +1 -0
- package/api/entities/DefaultTrustedClaimIssuer.js +88 -0
- package/api/entities/DefaultTrustedClaimIssuer.js.map +1 -0
- package/api/entities/DividendDistribution/index.d.ts +158 -0
- package/api/entities/DividendDistribution/index.d.ts.map +1 -0
- package/api/entities/DividendDistribution/index.js +346 -0
- package/api/entities/DividendDistribution/index.js.map +1 -0
- package/api/entities/DividendDistribution/types.d.ts +24 -0
- package/api/entities/DividendDistribution/types.d.ts.map +1 -0
- package/api/entities/DividendDistribution/types.js +3 -0
- package/api/entities/DividendDistribution/types.js.map +1 -0
- package/api/entities/Entity.d.ts +43 -0
- package/api/entities/Entity.d.ts.map +1 -0
- package/api/entities/Entity.js +58 -0
- package/api/entities/Entity.js.map +1 -0
- package/api/entities/Identity/AssetPermissions.d.ts +76 -0
- package/api/entities/Identity/AssetPermissions.d.ts.map +1 -0
- package/api/entities/Identity/AssetPermissions.js +284 -0
- package/api/entities/Identity/AssetPermissions.js.map +1 -0
- package/api/entities/Identity/IdentityAuthorizations.d.ts +23 -0
- package/api/entities/Identity/IdentityAuthorizations.d.ts.map +1 -0
- package/api/entities/Identity/IdentityAuthorizations.js +79 -0
- package/api/entities/Identity/IdentityAuthorizations.js.map +1 -0
- package/api/entities/Identity/Portfolios.d.ts +43 -0
- package/api/entities/Identity/Portfolios.d.ts.map +1 -0
- package/api/entities/Identity/Portfolios.js +107 -0
- package/api/entities/Identity/Portfolios.js.map +1 -0
- package/api/entities/Identity/index.d.ts +152 -0
- package/api/entities/Identity/index.d.ts.map +1 -0
- package/api/entities/Identity/index.js +430 -0
- package/api/entities/Identity/index.js.map +1 -0
- package/api/entities/Instruction/index.d.ts +91 -0
- package/api/entities/Instruction/index.d.ts.map +1 -0
- package/api/entities/Instruction/index.js +261 -0
- package/api/entities/Instruction/index.js.map +1 -0
- package/api/entities/Instruction/types.d.ts +52 -0
- package/api/entities/Instruction/types.d.ts.map +1 -0
- package/api/entities/Instruction/types.js +21 -0
- package/api/entities/Instruction/types.js.map +1 -0
- package/api/entities/KnownPermissionGroup.d.ts +38 -0
- package/api/entities/KnownPermissionGroup.d.ts.map +1 -0
- package/api/entities/KnownPermissionGroup.js +100 -0
- package/api/entities/KnownPermissionGroup.js.map +1 -0
- package/api/entities/Namespace.d.ts +15 -0
- package/api/entities/Namespace.d.ts.map +1 -0
- package/api/entities/Namespace.js +19 -0
- package/api/entities/Namespace.js.map +1 -0
- package/api/entities/NumberedPortfolio.d.ts +48 -0
- package/api/entities/NumberedPortfolio.d.ts.map +1 -0
- package/api/entities/NumberedPortfolio.js +95 -0
- package/api/entities/NumberedPortfolio.js.map +1 -0
- package/api/entities/Offering/index.d.ts +93 -0
- package/api/entities/Offering/index.d.ts.map +1 -0
- package/api/entities/Offering/index.js +135 -0
- package/api/entities/Offering/index.js.map +1 -0
- package/api/entities/Offering/types.d.ts +83 -0
- package/api/entities/Offering/types.d.ts.map +1 -0
- package/api/entities/Offering/types.js +55 -0
- package/api/entities/Offering/types.js.map +1 -0
- package/api/entities/PermissionGroup.d.ts +26 -0
- package/api/entities/PermissionGroup.d.ts.map +1 -0
- package/api/entities/PermissionGroup.js +19 -0
- package/api/entities/PermissionGroup.js.map +1 -0
- package/api/entities/Portfolio/index.d.ts +112 -0
- package/api/entities/Portfolio/index.d.ts.map +1 -0
- package/api/entities/Portfolio/index.js +246 -0
- package/api/entities/Portfolio/index.js.map +1 -0
- package/api/entities/Portfolio/types.d.ts +21 -0
- package/api/entities/Portfolio/types.d.ts.map +1 -0
- package/api/entities/Portfolio/types.js +3 -0
- package/api/entities/Portfolio/types.js.map +1 -0
- package/api/entities/Subsidy/index.d.ts +80 -0
- package/api/entities/Subsidy/index.d.ts.map +1 -0
- package/api/entities/Subsidy/index.js +97 -0
- package/api/entities/Subsidy/index.js.map +1 -0
- package/api/entities/Subsidy/types.d.ts +21 -0
- package/api/entities/Subsidy/types.d.ts.map +1 -0
- package/api/entities/Subsidy/types.js +3 -0
- package/api/entities/Subsidy/types.js.map +1 -0
- package/api/entities/TickerReservation/index.d.ts +72 -0
- package/api/entities/TickerReservation/index.d.ts.map +1 -0
- package/api/entities/TickerReservation/index.js +118 -0
- package/api/entities/TickerReservation/index.js.map +1 -0
- package/api/entities/TickerReservation/types.d.ts +27 -0
- package/api/entities/TickerReservation/types.d.ts.map +1 -0
- package/api/entities/TickerReservation/types.js +19 -0
- package/api/entities/TickerReservation/types.js.map +1 -0
- package/api/entities/Venue/index.d.ts +77 -0
- package/api/entities/Venue/index.d.ts.map +1 -0
- package/api/entities/Venue/index.js +139 -0
- package/api/entities/Venue/index.js.map +1 -0
- package/api/entities/Venue/types.d.ts +22 -0
- package/api/entities/Venue/types.d.ts.map +1 -0
- package/api/entities/Venue/types.js +20 -0
- package/api/entities/Venue/types.js.map +1 -0
- package/api/entities/common/namespaces/Authorizations.d.ts +37 -0
- package/api/entities/common/namespaces/Authorizations.d.ts.map +1 -0
- package/api/entities/common/namespaces/Authorizations.js +91 -0
- package/api/entities/common/namespaces/Authorizations.js.map +1 -0
- package/api/entities/types.d.ts +30 -0
- package/api/entities/types.d.ts.map +1 -0
- package/api/entities/types.js +27 -0
- package/api/entities/types.js.map +1 -0
- package/api/procedures/addAssetRequirement.d.ts +30 -0
- package/api/procedures/addAssetRequirement.d.ts.map +1 -0
- package/api/procedures/addAssetRequirement.js +70 -0
- package/api/procedures/addAssetRequirement.js.map +1 -0
- package/api/procedures/addInstruction.d.ts +70 -0
- package/api/procedures/addInstruction.d.ts.map +1 -0
- package/api/procedures/addInstruction.js +266 -0
- package/api/procedures/addInstruction.js.map +1 -0
- package/api/procedures/addInvestorUniquenessClaim.d.ts +23 -0
- package/api/procedures/addInvestorUniquenessClaim.d.ts.map +1 -0
- package/api/procedures/addInvestorUniquenessClaim.js +80 -0
- package/api/procedures/addInvestorUniquenessClaim.js.map +1 -0
- package/api/procedures/addTransferRestriction.d.ts +29 -0
- package/api/procedures/addTransferRestriction.d.ts.map +1 -0
- package/api/procedures/addTransferRestriction.js +102 -0
- package/api/procedures/addTransferRestriction.js.map +1 -0
- package/api/procedures/claimClassicTicker.d.ts +22 -0
- package/api/procedures/claimClassicTicker.d.ts.map +1 -0
- package/api/procedures/claimClassicTicker.js +112 -0
- package/api/procedures/claimClassicTicker.js.map +1 -0
- package/api/procedures/claimDividends.d.ts +16 -0
- package/api/procedures/claimDividends.d.ts.map +1 -0
- package/api/procedures/claimDividends.js +58 -0
- package/api/procedures/claimDividends.js.map +1 -0
- package/api/procedures/closeOffering.d.ts +23 -0
- package/api/procedures/closeOffering.d.ts.map +1 -0
- package/api/procedures/closeOffering.js +59 -0
- package/api/procedures/closeOffering.js.map +1 -0
- package/api/procedures/configureDividendDistribution.d.ts +69 -0
- package/api/procedures/configureDividendDistribution.d.ts.map +1 -0
- package/api/procedures/configureDividendDistribution.js +158 -0
- package/api/procedures/configureDividendDistribution.js.map +1 -0
- package/api/procedures/consumeAddMultiSigSignerAuthorization.d.ts +22 -0
- package/api/procedures/consumeAddMultiSigSignerAuthorization.d.ts.map +1 -0
- package/api/procedures/consumeAddMultiSigSignerAuthorization.js +102 -0
- package/api/procedures/consumeAddMultiSigSignerAuthorization.js.map +1 -0
- package/api/procedures/consumeAuthorizationRequests.d.ts +24 -0
- package/api/procedures/consumeAuthorizationRequests.d.ts.map +1 -0
- package/api/procedures/consumeAuthorizationRequests.js +124 -0
- package/api/procedures/consumeAuthorizationRequests.js.map +1 -0
- package/api/procedures/consumeJoinOrRotateAuthorization.d.ts +35 -0
- package/api/procedures/consumeJoinOrRotateAuthorization.d.ts.map +1 -0
- package/api/procedures/consumeJoinOrRotateAuthorization.js +136 -0
- package/api/procedures/consumeJoinOrRotateAuthorization.js.map +1 -0
- package/api/procedures/controllerTransfer.d.ts +40 -0
- package/api/procedures/controllerTransfer.d.ts.map +1 -0
- package/api/procedures/controllerTransfer.js +90 -0
- package/api/procedures/controllerTransfer.js.map +1 -0
- package/api/procedures/createAsset.d.ts +82 -0
- package/api/procedures/createAsset.d.ts.map +1 -0
- package/api/procedures/createAsset.js +178 -0
- package/api/procedures/createAsset.js.map +1 -0
- package/api/procedures/createCheckpoint.d.ts +26 -0
- package/api/procedures/createCheckpoint.d.ts.map +1 -0
- package/api/procedures/createCheckpoint.js +61 -0
- package/api/procedures/createCheckpoint.js.map +1 -0
- package/api/procedures/createCheckpointSchedule.d.ts +43 -0
- package/api/procedures/createCheckpointSchedule.d.ts.map +1 -0
- package/api/procedures/createCheckpointSchedule.js +70 -0
- package/api/procedures/createCheckpointSchedule.js.map +1 -0
- package/api/procedures/createGroup.d.ts +44 -0
- package/api/procedures/createGroup.d.ts.map +1 -0
- package/api/procedures/createGroup.js +90 -0
- package/api/procedures/createGroup.js.map +1 -0
- package/api/procedures/createPortfolio.d.ts +21 -0
- package/api/procedures/createPortfolio.d.ts.map +1 -0
- package/api/procedures/createPortfolio.js +64 -0
- package/api/procedures/createPortfolio.js.map +1 -0
- package/api/procedures/createVenue.d.ts +20 -0
- package/api/procedures/createVenue.d.ts.map +1 -0
- package/api/procedures/createVenue.js +56 -0
- package/api/procedures/createVenue.js.map +1 -0
- package/api/procedures/deletePortfolio.d.ts +20 -0
- package/api/procedures/deletePortfolio.d.ts.map +1 -0
- package/api/procedures/deletePortfolio.js +69 -0
- package/api/procedures/deletePortfolio.js.map +1 -0
- package/api/procedures/initiateCorporateAction.d.ts +60 -0
- package/api/procedures/initiateCorporateAction.d.ts.map +1 -0
- package/api/procedures/initiateCorporateAction.js +107 -0
- package/api/procedures/initiateCorporateAction.js.map +1 -0
- package/api/procedures/investInOffering.d.ts +66 -0
- package/api/procedures/investInOffering.d.ts.map +1 -0
- package/api/procedures/investInOffering.js +147 -0
- package/api/procedures/investInOffering.js.map +1 -0
- package/api/procedures/inviteAccount.d.ts +16 -0
- package/api/procedures/inviteAccount.d.ts.map +1 -0
- package/api/procedures/inviteAccount.js +92 -0
- package/api/procedures/inviteAccount.js.map +1 -0
- package/api/procedures/inviteExternalAgent.d.ts +46 -0
- package/api/procedures/inviteExternalAgent.d.ts.map +1 -0
- package/api/procedures/inviteExternalAgent.js +97 -0
- package/api/procedures/inviteExternalAgent.js.map +1 -0
- package/api/procedures/issueTokens.d.ts +27 -0
- package/api/procedures/issueTokens.d.ts.map +1 -0
- package/api/procedures/issueTokens.js +75 -0
- package/api/procedures/issueTokens.js.map +1 -0
- package/api/procedures/launchOffering.d.ts +81 -0
- package/api/procedures/launchOffering.d.ts.map +1 -0
- package/api/procedures/launchOffering.js +139 -0
- package/api/procedures/launchOffering.js.map +1 -0
- package/api/procedures/leaveIdentity.d.ts +10 -0
- package/api/procedures/leaveIdentity.d.ts.map +1 -0
- package/api/procedures/leaveIdentity.js +53 -0
- package/api/procedures/leaveIdentity.js.map +1 -0
- package/api/procedures/linkCaDocs.d.ts +30 -0
- package/api/procedures/linkCaDocs.d.ts.map +1 -0
- package/api/procedures/linkCaDocs.js +69 -0
- package/api/procedures/linkCaDocs.js.map +1 -0
- package/api/procedures/modifyAllowance.d.ts +42 -0
- package/api/procedures/modifyAllowance.d.ts.map +1 -0
- package/api/procedures/modifyAllowance.js +87 -0
- package/api/procedures/modifyAllowance.js.map +1 -0
- package/api/procedures/modifyAsset.d.ts +46 -0
- package/api/procedures/modifyAsset.d.ts.map +1 -0
- package/api/procedures/modifyAsset.js +130 -0
- package/api/procedures/modifyAsset.js.map +1 -0
- package/api/procedures/modifyAssetTrustedClaimIssuers.d.ts +35 -0
- package/api/procedures/modifyAssetTrustedClaimIssuers.d.ts.map +1 -0
- package/api/procedures/modifyAssetTrustedClaimIssuers.js +139 -0
- package/api/procedures/modifyAssetTrustedClaimIssuers.js.map +1 -0
- package/api/procedures/modifyCaCheckpoint.d.ts +25 -0
- package/api/procedures/modifyCaCheckpoint.d.ts.map +1 -0
- package/api/procedures/modifyCaCheckpoint.js +58 -0
- package/api/procedures/modifyCaCheckpoint.js.map +1 -0
- package/api/procedures/modifyCaDefaultConfig.d.ts +36 -0
- package/api/procedures/modifyCaDefaultConfig.d.ts.map +1 -0
- package/api/procedures/modifyCaDefaultConfig.js +119 -0
- package/api/procedures/modifyCaDefaultConfig.js.map +1 -0
- package/api/procedures/modifyClaims.d.ts +39 -0
- package/api/procedures/modifyClaims.d.ts.map +1 -0
- package/api/procedures/modifyClaims.js +205 -0
- package/api/procedures/modifyClaims.js.map +1 -0
- package/api/procedures/modifyComplianceRequirement.d.ts +35 -0
- package/api/procedures/modifyComplianceRequirement.d.ts.map +1 -0
- package/api/procedures/modifyComplianceRequirement.js +75 -0
- package/api/procedures/modifyComplianceRequirement.js.map +1 -0
- package/api/procedures/modifyCorporateActionsAgent.d.ts +31 -0
- package/api/procedures/modifyCorporateActionsAgent.d.ts.map +1 -0
- package/api/procedures/modifyCorporateActionsAgent.js +83 -0
- package/api/procedures/modifyCorporateActionsAgent.js.map +1 -0
- package/api/procedures/modifyDistributionCheckpoint.d.ts +25 -0
- package/api/procedures/modifyDistributionCheckpoint.d.ts.map +1 -0
- package/api/procedures/modifyDistributionCheckpoint.js +60 -0
- package/api/procedures/modifyDistributionCheckpoint.js.map +1 -0
- package/api/procedures/modifyInstructionAffirmation.d.ts +33 -0
- package/api/procedures/modifyInstructionAffirmation.d.ts.map +1 -0
- package/api/procedures/modifyInstructionAffirmation.js +158 -0
- package/api/procedures/modifyInstructionAffirmation.js.map +1 -0
- package/api/procedures/modifyOfferingTimes.d.ts +39 -0
- package/api/procedures/modifyOfferingTimes.d.ts.map +1 -0
- package/api/procedures/modifyOfferingTimes.js +103 -0
- package/api/procedures/modifyOfferingTimes.js.map +1 -0
- package/api/procedures/modifyPrimaryIssuanceAgent.d.ts +33 -0
- package/api/procedures/modifyPrimaryIssuanceAgent.d.ts.map +1 -0
- package/api/procedures/modifyPrimaryIssuanceAgent.js +87 -0
- package/api/procedures/modifyPrimaryIssuanceAgent.js.map +1 -0
- package/api/procedures/modifySignerPermissions.d.ts +35 -0
- package/api/procedures/modifySignerPermissions.d.ts.map +1 -0
- package/api/procedures/modifySignerPermissions.js +82 -0
- package/api/procedures/modifySignerPermissions.js.map +1 -0
- package/api/procedures/modifyVenue.d.ts +32 -0
- package/api/procedures/modifyVenue.d.ts.map +1 -0
- package/api/procedures/modifyVenue.js +81 -0
- package/api/procedures/modifyVenue.js.map +1 -0
- package/api/procedures/moveFunds.d.ts +33 -0
- package/api/procedures/moveFunds.d.ts.map +1 -0
- package/api/procedures/moveFunds.js +124 -0
- package/api/procedures/moveFunds.js.map +1 -0
- package/api/procedures/payDividends.d.ts +24 -0
- package/api/procedures/payDividends.d.ts.map +1 -0
- package/api/procedures/payDividends.js +90 -0
- package/api/procedures/payDividends.js.map +1 -0
- package/api/procedures/quitCustody.d.ts +28 -0
- package/api/procedures/quitCustody.d.ts.map +1 -0
- package/api/procedures/quitCustody.js +71 -0
- package/api/procedures/quitCustody.js.map +1 -0
- package/api/procedures/quitSubsidy.d.ts +20 -0
- package/api/procedures/quitSubsidy.d.ts.map +1 -0
- package/api/procedures/quitSubsidy.js +64 -0
- package/api/procedures/quitSubsidy.js.map +1 -0
- package/api/procedures/reclaimDividendDistributionFunds.d.ts +21 -0
- package/api/procedures/reclaimDividendDistributionFunds.d.ts.map +1 -0
- package/api/procedures/reclaimDividendDistributionFunds.js +69 -0
- package/api/procedures/reclaimDividendDistributionFunds.js.map +1 -0
- package/api/procedures/redeemTokens.d.ts +25 -0
- package/api/procedures/redeemTokens.d.ts.map +1 -0
- package/api/procedures/redeemTokens.js +70 -0
- package/api/procedures/redeemTokens.js.map +1 -0
- package/api/procedures/registerIdentity.d.ts +23 -0
- package/api/procedures/registerIdentity.d.ts.map +1 -0
- package/api/procedures/registerIdentity.js +70 -0
- package/api/procedures/registerIdentity.js.map +1 -0
- package/api/procedures/removeAssetRequirement.d.ts +26 -0
- package/api/procedures/removeAssetRequirement.d.ts.map +1 -0
- package/api/procedures/removeAssetRequirement.js +62 -0
- package/api/procedures/removeAssetRequirement.js.map +1 -0
- package/api/procedures/removeCheckpointSchedule.d.ts +28 -0
- package/api/procedures/removeCheckpointSchedule.d.ts.map +1 -0
- package/api/procedures/removeCheckpointSchedule.js +75 -0
- package/api/procedures/removeCheckpointSchedule.js.map +1 -0
- package/api/procedures/removeCorporateAction.d.ts +25 -0
- package/api/procedures/removeCorporateAction.d.ts.map +1 -0
- package/api/procedures/removeCorporateAction.js +98 -0
- package/api/procedures/removeCorporateAction.js.map +1 -0
- package/api/procedures/removeCorporateActionsAgent.d.ts +23 -0
- package/api/procedures/removeCorporateActionsAgent.d.ts.map +1 -0
- package/api/procedures/removeCorporateActionsAgent.js +60 -0
- package/api/procedures/removeCorporateActionsAgent.js.map +1 -0
- package/api/procedures/removeExternalAgent.d.ts +34 -0
- package/api/procedures/removeExternalAgent.d.ts.map +1 -0
- package/api/procedures/removeExternalAgent.js +83 -0
- package/api/procedures/removeExternalAgent.js.map +1 -0
- package/api/procedures/removePrimaryIssuanceAgent.d.ts +21 -0
- package/api/procedures/removePrimaryIssuanceAgent.d.ts.map +1 -0
- package/api/procedures/removePrimaryIssuanceAgent.js +58 -0
- package/api/procedures/removePrimaryIssuanceAgent.js.map +1 -0
- package/api/procedures/removeSecondaryAccounts.d.ts +14 -0
- package/api/procedures/removeSecondaryAccounts.d.ts.map +1 -0
- package/api/procedures/removeSecondaryAccounts.js +61 -0
- package/api/procedures/removeSecondaryAccounts.js.map +1 -0
- package/api/procedures/renamePortfolio.d.ts +26 -0
- package/api/procedures/renamePortfolio.d.ts.map +1 -0
- package/api/procedures/renamePortfolio.js +69 -0
- package/api/procedures/renamePortfolio.js.map +1 -0
- package/api/procedures/rescheduleInstruction.d.ts +17 -0
- package/api/procedures/rescheduleInstruction.d.ts.map +1 -0
- package/api/procedures/rescheduleInstruction.js +52 -0
- package/api/procedures/rescheduleInstruction.js.map +1 -0
- package/api/procedures/reserveTicker.d.ts +29 -0
- package/api/procedures/reserveTicker.d.ts.map +1 -0
- package/api/procedures/reserveTicker.js +94 -0
- package/api/procedures/reserveTicker.js.map +1 -0
- package/api/procedures/setAssetDocuments.d.ts +37 -0
- package/api/procedures/setAssetDocuments.d.ts.map +1 -0
- package/api/procedures/setAssetDocuments.js +103 -0
- package/api/procedures/setAssetDocuments.js.map +1 -0
- package/api/procedures/setAssetRequirements.d.ts +29 -0
- package/api/procedures/setAssetRequirements.d.ts.map +1 -0
- package/api/procedures/setAssetRequirements.js +81 -0
- package/api/procedures/setAssetRequirements.js.map +1 -0
- package/api/procedures/setCustodian.d.ts +27 -0
- package/api/procedures/setCustodian.d.ts.map +1 -0
- package/api/procedures/setCustodian.js +86 -0
- package/api/procedures/setCustodian.js.map +1 -0
- package/api/procedures/setGroupPermissions.d.ts +29 -0
- package/api/procedures/setGroupPermissions.d.ts.map +1 -0
- package/api/procedures/setGroupPermissions.js +61 -0
- package/api/procedures/setGroupPermissions.js.map +1 -0
- package/api/procedures/setPermissionGroup.d.ts +57 -0
- package/api/procedures/setPermissionGroup.d.ts.map +1 -0
- package/api/procedures/setPermissionGroup.js +108 -0
- package/api/procedures/setPermissionGroup.js.map +1 -0
- package/api/procedures/setTransferRestrictions.d.ts +50 -0
- package/api/procedures/setTransferRestrictions.d.ts.map +1 -0
- package/api/procedures/setTransferRestrictions.js +204 -0
- package/api/procedures/setTransferRestrictions.js.map +1 -0
- package/api/procedures/subsidizeAccount.d.ts +21 -0
- package/api/procedures/subsidizeAccount.d.ts.map +1 -0
- package/api/procedures/subsidizeAccount.js +77 -0
- package/api/procedures/subsidizeAccount.js.map +1 -0
- package/api/procedures/toggleFreezeOffering.d.ts +21 -0
- package/api/procedures/toggleFreezeOffering.d.ts.map +1 -0
- package/api/procedures/toggleFreezeOffering.js +85 -0
- package/api/procedures/toggleFreezeOffering.js.map +1 -0
- package/api/procedures/toggleFreezeSecondaryAccounts.d.ts +18 -0
- package/api/procedures/toggleFreezeSecondaryAccounts.d.ts.map +1 -0
- package/api/procedures/toggleFreezeSecondaryAccounts.js +65 -0
- package/api/procedures/toggleFreezeSecondaryAccounts.js.map +1 -0
- package/api/procedures/toggleFreezeTransfers.d.ts +24 -0
- package/api/procedures/toggleFreezeTransfers.d.ts.map +1 -0
- package/api/procedures/toggleFreezeTransfers.js +72 -0
- package/api/procedures/toggleFreezeTransfers.js.map +1 -0
- package/api/procedures/togglePauseRequirements.d.ts +24 -0
- package/api/procedures/togglePauseRequirements.d.ts.map +1 -0
- package/api/procedures/togglePauseRequirements.js +63 -0
- package/api/procedures/togglePauseRequirements.js.map +1 -0
- package/api/procedures/transferAssetOwnership.d.ts +28 -0
- package/api/procedures/transferAssetOwnership.d.ts.map +1 -0
- package/api/procedures/transferAssetOwnership.js +61 -0
- package/api/procedures/transferAssetOwnership.js.map +1 -0
- package/api/procedures/transferPolyx.d.ts +30 -0
- package/api/procedures/transferPolyx.d.ts.map +1 -0
- package/api/procedures/transferPolyx.js +101 -0
- package/api/procedures/transferPolyx.js.map +1 -0
- package/api/procedures/transferTickerOwnership.d.ts +28 -0
- package/api/procedures/transferTickerOwnership.d.ts.map +1 -0
- package/api/procedures/transferTickerOwnership.js +70 -0
- package/api/procedures/transferTickerOwnership.js.map +1 -0
- package/api/procedures/utils.d.ts +103 -0
- package/api/procedures/utils.d.ts.map +1 -0
- package/api/procedures/utils.js +537 -0
- package/api/procedures/utils.js.map +1 -0
- package/api/procedures/waivePermissions.d.ts +34 -0
- package/api/procedures/waivePermissions.d.ts.map +1 -0
- package/api/procedures/waivePermissions.js +70 -0
- package/api/procedures/waivePermissions.js.map +1 -0
- package/base/Context.d.ts +287 -0
- package/base/Context.d.ts.map +1 -0
- package/base/Context.js +838 -0
- package/base/Context.js.map +1 -0
- package/base/PolymeshError.d.ts +17 -0
- package/base/PolymeshError.d.ts.map +1 -0
- package/base/PolymeshError.js +24 -0
- package/base/PolymeshError.js.map +1 -0
- package/base/PolymeshTransaction.d.ts +54 -0
- package/base/PolymeshTransaction.d.ts.map +1 -0
- package/base/PolymeshTransaction.js +84 -0
- package/base/PolymeshTransaction.js.map +1 -0
- package/base/PolymeshTransactionBase.d.ts +163 -0
- package/base/PolymeshTransactionBase.d.ts.map +1 -0
- package/base/PolymeshTransactionBase.js +322 -0
- package/base/PolymeshTransactionBase.js.map +1 -0
- package/base/PolymeshTransactionBatch.d.ts +51 -0
- package/base/PolymeshTransactionBatch.d.ts.map +1 -0
- package/base/PolymeshTransactionBatch.js +107 -0
- package/base/PolymeshTransactionBatch.js.map +1 -0
- package/base/PostTransactionValue.d.ts +45 -0
- package/base/PostTransactionValue.d.ts.map +1 -0
- package/base/PostTransactionValue.js +108 -0
- package/base/PostTransactionValue.js.map +1 -0
- package/base/Procedure.d.ts +92 -0
- package/base/Procedure.d.ts.map +1 -0
- package/base/Procedure.js +362 -0
- package/base/Procedure.js.map +1 -0
- package/base/TransactionQueue.d.ts +142 -0
- package/base/TransactionQueue.d.ts.map +1 -0
- package/base/TransactionQueue.js +420 -0
- package/base/TransactionQueue.js.map +1 -0
- package/base/types.d.ts +9 -0
- package/base/types.d.ts.map +1 -0
- package/base/types.js +4 -0
- package/base/types.js.map +1 -0
- package/generated/types.d.ts +253 -0
- package/generated/types.d.ts.map +1 -0
- package/generated/types.js +258 -0
- package/generated/types.js.map +1 -0
- package/generated/utils.d.ts +12 -0
- package/generated/utils.d.ts.map +1 -0
- package/generated/utils.js +767 -0
- package/generated/utils.js.map +1 -0
- package/index.d.ts +5 -0
- package/index.d.ts.map +1 -0
- package/index.js +12 -0
- package/index.js.map +1 -0
- package/internal.d.ts +107 -0
- package/internal.d.ts.map +1 -0
- package/internal.js +219 -0
- package/internal.js.map +1 -0
- package/middleware/queries.d.ts +129 -0
- package/middleware/queries.d.ts.map +1 -0
- package/middleware/queries.js +701 -0
- package/middleware/queries.js.map +1 -0
- package/middleware/types.d.ts +1624 -0
- package/middleware/types.d.ts.map +1 -0
- package/middleware/types.js +866 -0
- package/middleware/types.js.map +1 -0
- package/npm-package/polymeshassociation-polymesh-sdk-14.0.0-beta.11.tgz +0 -0
- package/package.json +131 -0
- package/polkadot/asset/definitions.d.ts +25 -0
- package/polkadot/asset/definitions.d.ts.map +1 -0
- package/polkadot/asset/definitions.js +96 -0
- package/polkadot/asset/definitions.js.map +1 -0
- package/polkadot/asset/index.d.ts +2 -0
- package/polkadot/asset/index.d.ts.map +1 -0
- package/polkadot/asset/index.js +20 -0
- package/polkadot/asset/index.js.map +1 -0
- package/polkadot/asset/types.d.ts +2 -0
- package/polkadot/asset/types.d.ts.map +1 -0
- package/polkadot/asset/types.js +5 -0
- package/polkadot/asset/types.js.map +1 -0
- package/polkadot/augment-api-consts.d.ts +178 -0
- package/polkadot/augment-api-consts.d.ts.map +1 -0
- package/polkadot/augment-api-consts.js +5 -0
- package/polkadot/augment-api-consts.js.map +1 -0
- package/polkadot/augment-api-errors.d.ts +1638 -0
- package/polkadot/augment-api-errors.d.ts.map +1 -0
- package/polkadot/augment-api-errors.js +5 -0
- package/polkadot/augment-api-errors.js.map +1 -0
- package/polkadot/augment-api-events.d.ts +1671 -0
- package/polkadot/augment-api-events.d.ts.map +1 -0
- package/polkadot/augment-api-events.js +5 -0
- package/polkadot/augment-api-events.js.map +1 -0
- package/polkadot/augment-api-query.d.ts +1993 -0
- package/polkadot/augment-api-query.d.ts.map +1 -0
- package/polkadot/augment-api-query.js +5 -0
- package/polkadot/augment-api-query.js.map +1 -0
- package/polkadot/augment-api-rpc.d.ts +695 -0
- package/polkadot/augment-api-rpc.d.ts.map +1 -0
- package/polkadot/augment-api-rpc.js +5 -0
- package/polkadot/augment-api-rpc.js.map +1 -0
- package/polkadot/augment-api-tx.d.ts +5464 -0
- package/polkadot/augment-api-tx.d.ts.map +1 -0
- package/polkadot/augment-api-tx.js +5 -0
- package/polkadot/augment-api-tx.js.map +1 -0
- package/polkadot/augment-api.d.ts +8 -0
- package/polkadot/augment-api.d.ts.map +1 -0
- package/polkadot/augment-api.js +12 -0
- package/polkadot/augment-api.js.map +1 -0
- package/polkadot/augment-types.d.ts +3243 -0
- package/polkadot/augment-types.d.ts.map +1 -0
- package/polkadot/augment-types.js +5 -0
- package/polkadot/augment-types.js.map +1 -0
- package/polkadot/compliance/definitions.d.ts +16 -0
- package/polkadot/compliance/definitions.d.ts.map +1 -0
- package/polkadot/compliance/definitions.js +35 -0
- package/polkadot/compliance/definitions.js.map +1 -0
- package/polkadot/compliance/index.d.ts +2 -0
- package/polkadot/compliance/index.d.ts.map +1 -0
- package/polkadot/compliance/index.js +20 -0
- package/polkadot/compliance/index.js.map +1 -0
- package/polkadot/compliance/types.d.ts +2 -0
- package/polkadot/compliance/types.d.ts.map +1 -0
- package/polkadot/compliance/types.js +5 -0
- package/polkadot/compliance/types.js.map +1 -0
- package/polkadot/definitions.d.ts +8 -0
- package/polkadot/definitions.d.ts.map +1 -0
- package/polkadot/definitions.js +22 -0
- package/polkadot/definitions.js.map +1 -0
- package/polkadot/identity/definitions.d.ts +61 -0
- package/polkadot/identity/definitions.d.ts.map +1 -0
- package/polkadot/identity/definitions.js +120 -0
- package/polkadot/identity/definitions.js.map +1 -0
- package/polkadot/identity/index.d.ts +2 -0
- package/polkadot/identity/index.d.ts.map +1 -0
- package/polkadot/identity/index.js +20 -0
- package/polkadot/identity/index.js.map +1 -0
- package/polkadot/identity/types.d.ts +2 -0
- package/polkadot/identity/types.d.ts.map +1 -0
- package/polkadot/identity/types.js +5 -0
- package/polkadot/identity/types.js.map +1 -0
- package/polkadot/index.d.ts +2 -0
- package/polkadot/index.d.ts.map +1 -0
- package/polkadot/index.js +20 -0
- package/polkadot/index.js.map +1 -0
- package/polkadot/pips/definitions.d.ts +34 -0
- package/polkadot/pips/definitions.d.ts.map +1 -0
- package/polkadot/pips/definitions.js +57 -0
- package/polkadot/pips/definitions.js.map +1 -0
- package/polkadot/pips/index.d.ts +2 -0
- package/polkadot/pips/index.d.ts.map +1 -0
- package/polkadot/pips/index.js +20 -0
- package/polkadot/pips/index.js.map +1 -0
- package/polkadot/pips/types.d.ts +2 -0
- package/polkadot/pips/types.d.ts.map +1 -0
- package/polkadot/pips/types.js +5 -0
- package/polkadot/pips/types.js.map +1 -0
- package/polkadot/polymesh/definitions.d.ts +855 -0
- package/polkadot/polymesh/definitions.d.ts.map +1 -0
- package/polkadot/polymesh/definitions.js +1139 -0
- package/polkadot/polymesh/definitions.js.map +1 -0
- package/polkadot/polymesh/index.d.ts +2 -0
- package/polkadot/polymesh/index.d.ts.map +1 -0
- package/polkadot/polymesh/index.js +20 -0
- package/polkadot/polymesh/index.js.map +1 -0
- package/polkadot/polymesh/types.d.ts +1408 -0
- package/polkadot/polymesh/types.d.ts.map +1 -0
- package/polkadot/polymesh/types.js +5 -0
- package/polkadot/polymesh/types.js.map +1 -0
- package/polkadot/portfolio/definitions.d.ts +25 -0
- package/polkadot/portfolio/definitions.d.ts.map +1 -0
- package/polkadot/portfolio/definitions.js +31 -0
- package/polkadot/portfolio/definitions.js.map +1 -0
- package/polkadot/portfolio/index.d.ts +2 -0
- package/polkadot/portfolio/index.d.ts.map +1 -0
- package/polkadot/portfolio/index.js +20 -0
- package/polkadot/portfolio/index.js.map +1 -0
- package/polkadot/portfolio/types.d.ts +2 -0
- package/polkadot/portfolio/types.d.ts.map +1 -0
- package/polkadot/portfolio/types.js +5 -0
- package/polkadot/portfolio/types.js.map +1 -0
- package/polkadot/protocolFee/definitions.d.ts +16 -0
- package/polkadot/protocolFee/definitions.d.ts.map +1 -0
- package/polkadot/protocolFee/definitions.js +25 -0
- package/polkadot/protocolFee/definitions.js.map +1 -0
- package/polkadot/protocolFee/index.d.ts +2 -0
- package/polkadot/protocolFee/index.d.ts.map +1 -0
- package/polkadot/protocolFee/index.js +20 -0
- package/polkadot/protocolFee/index.js.map +1 -0
- package/polkadot/protocolFee/types.d.ts +2 -0
- package/polkadot/protocolFee/types.d.ts.map +1 -0
- package/polkadot/protocolFee/types.js +5 -0
- package/polkadot/protocolFee/types.js.map +1 -0
- package/polkadot/schema.d.ts +994 -0
- package/polkadot/schema.d.ts.map +1 -0
- package/polkadot/schema.js +1451 -0
- package/polkadot/schema.js.map +1 -0
- package/polkadot/staking/definitions.d.ts +16 -0
- package/polkadot/staking/definitions.d.ts.map +1 -0
- package/polkadot/staking/definitions.js +20 -0
- package/polkadot/staking/definitions.js.map +1 -0
- package/polkadot/staking/index.d.ts +2 -0
- package/polkadot/staking/index.d.ts.map +1 -0
- package/polkadot/staking/index.js +20 -0
- package/polkadot/staking/index.js.map +1 -0
- package/polkadot/staking/types.d.ts +2 -0
- package/polkadot/staking/types.d.ts.map +1 -0
- package/polkadot/staking/types.js +5 -0
- package/polkadot/staking/types.js.map +1 -0
- package/polkadot/types.d.ts +472 -0
- package/polkadot/types.d.ts.map +1 -0
- package/polkadot/types.js +531 -0
- package/polkadot/types.js.map +1 -0
- package/types/index.d.ts +1164 -0
- package/types/index.d.ts.map +1 -0
- package/types/index.js +506 -0
- package/types/index.js.map +1 -0
- package/types/internal.d.ts +304 -0
- package/types/internal.d.ts.map +1 -0
- package/types/internal.js +34 -0
- package/types/internal.js.map +1 -0
- package/types/utils/index.d.ts +47 -0
- package/types/utils/index.d.ts.map +1 -0
- package/types/utils/index.js +11 -0
- package/types/utils/index.js.map +1 -0
- package/utils/constants.d.ts +63 -0
- package/utils/constants.d.ts.map +1 -0
- package/utils/constants.js +109 -0
- package/utils/constants.js.map +1 -0
- package/utils/conversion.d.ts +584 -0
- package/utils/conversion.d.ts.map +1 -0
- package/utils/conversion.js +2649 -0
- package/utils/conversion.js.map +1 -0
- package/utils/index.d.ts +4 -0
- package/utils/index.d.ts.map +1 -0
- package/utils/index.js +28 -0
- package/utils/index.js.map +1 -0
- package/utils/internal.d.ts +296 -0
- package/utils/internal.d.ts.map +1 -0
- package/utils/internal.js +786 -0
- package/utils/internal.js.map +1 -0
- package/utils/typeguards.d.ts +175 -0
- package/utils/typeguards.d.ts.map +1 -0
- package/utils/typeguards.js +312 -0
- package/utils/typeguards.js.map +1 -0
package/base/Context.js
ADDED
|
@@ -0,0 +1,838 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.Context = void 0;
|
|
16
|
+
const types_1 = require("@polkadot/types");
|
|
17
|
+
const types_2 = require("@polkadot/types/types");
|
|
18
|
+
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
|
19
|
+
const bluebird_1 = __importDefault(require("bluebird"));
|
|
20
|
+
const lodash_1 = require("lodash");
|
|
21
|
+
const definitions_1 = require("../polkadot/definitions");
|
|
22
|
+
const types_3 = require("../polkadot/types");
|
|
23
|
+
const internal_1 = require("../internal");
|
|
24
|
+
const queries_1 = require("../middleware/queries");
|
|
25
|
+
const types_4 = require("../middleware/types");
|
|
26
|
+
const types_5 = require("../types");
|
|
27
|
+
const constants_1 = require("../utils/constants");
|
|
28
|
+
const conversion_1 = require("../utils/conversion");
|
|
29
|
+
const internal_2 = require("../utils/internal");
|
|
30
|
+
/**
|
|
31
|
+
* @hidden
|
|
32
|
+
*
|
|
33
|
+
* Context in which the SDK is being used
|
|
34
|
+
*
|
|
35
|
+
* - Holds the polkadot API instance
|
|
36
|
+
* - Holds the middleware API instance (if any)
|
|
37
|
+
* - Holds the Signing Manager (if any)
|
|
38
|
+
*/
|
|
39
|
+
class Context {
|
|
40
|
+
/**
|
|
41
|
+
* @hidden
|
|
42
|
+
*/
|
|
43
|
+
constructor(params) {
|
|
44
|
+
this.isDisconnected = false;
|
|
45
|
+
/**
|
|
46
|
+
* Whether the current node is an archive node (contains a full history from genesis onward) or not
|
|
47
|
+
*/
|
|
48
|
+
this.isArchiveNode = false;
|
|
49
|
+
const { polymeshApi, middlewareApi, ss58Format } = params;
|
|
50
|
+
this._middlewareApi = middlewareApi;
|
|
51
|
+
this._polymeshApi = polymeshApi;
|
|
52
|
+
this.polymeshApi = Context.createPolymeshApiProxy(this);
|
|
53
|
+
this.ss58Format = ss58Format;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* @hidden
|
|
57
|
+
*/
|
|
58
|
+
static createPolymeshApiProxy(ctx) {
|
|
59
|
+
return new Proxy(ctx._polymeshApi, {
|
|
60
|
+
get: (target, prop) => {
|
|
61
|
+
if (prop === 'tx' && !ctx.signingAddress) {
|
|
62
|
+
throw new internal_1.PolymeshError({
|
|
63
|
+
code: types_5.ErrorCode.General,
|
|
64
|
+
message: 'Cannot perform transactions without an active Account',
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
return target[prop];
|
|
68
|
+
},
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* @hidden
|
|
73
|
+
*
|
|
74
|
+
* Create the Context instance
|
|
75
|
+
*/
|
|
76
|
+
static create(params) {
|
|
77
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
78
|
+
const { polymeshApi, middlewareApi, signingManager } = params;
|
|
79
|
+
const ss58Format = (0, conversion_1.u8ToBigNumber)(polymeshApi.consts.system.ss58Prefix);
|
|
80
|
+
const context = new Context({ polymeshApi, middlewareApi, signingManager, ss58Format });
|
|
81
|
+
const isArchiveNodePromise = context.isCurrentNodeArchive();
|
|
82
|
+
if (signingManager) {
|
|
83
|
+
yield context.setSigningManager(signingManager);
|
|
84
|
+
}
|
|
85
|
+
context.isArchiveNode = yield isArchiveNodePromise;
|
|
86
|
+
return new Proxy(context, {
|
|
87
|
+
get: (target, prop) => {
|
|
88
|
+
if (target.isDisconnected) {
|
|
89
|
+
throw new internal_1.PolymeshError({
|
|
90
|
+
code: types_5.ErrorCode.FatalError,
|
|
91
|
+
message: 'Client disconnected. Please create a new instance via "Polymesh.connect()"',
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
return target[prop];
|
|
95
|
+
},
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* @hidden
|
|
101
|
+
*/
|
|
102
|
+
isCurrentNodeArchive() {
|
|
103
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
104
|
+
const { polymeshApi: { query: { balances, system }, }, } = this;
|
|
105
|
+
try {
|
|
106
|
+
const blockHash = yield system.blockHash((0, conversion_1.bigNumberToU32)(new bignumber_js_1.default(0), this));
|
|
107
|
+
const balance = yield balances.totalIssuance.at(blockHash);
|
|
108
|
+
return (0, conversion_1.balanceToBigNumber)(balance).gt(new bignumber_js_1.default(0));
|
|
109
|
+
}
|
|
110
|
+
catch (e) {
|
|
111
|
+
return false;
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* @hidden
|
|
117
|
+
*
|
|
118
|
+
* @note the signing Account will be set to the Signing Manager's first Account. If the Signing Manager has
|
|
119
|
+
* no Accounts yet, the signing Account will be left empty
|
|
120
|
+
*/
|
|
121
|
+
setSigningManager(signingManager) {
|
|
122
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
123
|
+
this._signingManager = signingManager;
|
|
124
|
+
signingManager.setSs58Format(this.ss58Format.toNumber());
|
|
125
|
+
// this could be undefined
|
|
126
|
+
const [firstAccount] = yield signingManager.getAccounts();
|
|
127
|
+
if (!firstAccount) {
|
|
128
|
+
this.signingAddress = undefined;
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
return this.setSigningAddress(firstAccount);
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* @hidden
|
|
137
|
+
*/
|
|
138
|
+
get signingManager() {
|
|
139
|
+
const { _signingManager: manager } = this;
|
|
140
|
+
if (!manager) {
|
|
141
|
+
throw new internal_1.PolymeshError({
|
|
142
|
+
code: types_5.ErrorCode.General,
|
|
143
|
+
message: 'There is no Signing Manager attached to the SDK',
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
return manager;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* @hidden
|
|
150
|
+
*
|
|
151
|
+
* Retrieve a list of Accounts that can sign transactions
|
|
152
|
+
*/
|
|
153
|
+
getSigningAccounts() {
|
|
154
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
155
|
+
const { signingManager } = this;
|
|
156
|
+
const accounts = yield signingManager.getAccounts();
|
|
157
|
+
return accounts.map(address => new internal_1.Account({ address }, this));
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* @hidden
|
|
162
|
+
*
|
|
163
|
+
* Set the signing Account from among the existing ones in the Signing Manager
|
|
164
|
+
*
|
|
165
|
+
* @throws if the passed address isn't valid, or isn't present in the Signing Manager
|
|
166
|
+
*/
|
|
167
|
+
setSigningAddress(signingAddress) {
|
|
168
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
169
|
+
const { signingManager } = this;
|
|
170
|
+
const newAddress = signingAddress;
|
|
171
|
+
(0, internal_2.assertAddressValid)(newAddress, this.ss58Format);
|
|
172
|
+
const accounts = yield signingManager.getAccounts();
|
|
173
|
+
const newSigningAddress = accounts.find(account => {
|
|
174
|
+
return account === newAddress;
|
|
175
|
+
});
|
|
176
|
+
if (!newSigningAddress) {
|
|
177
|
+
throw new internal_1.PolymeshError({
|
|
178
|
+
code: types_5.ErrorCode.General,
|
|
179
|
+
message: 'The Account is not part of the Signing Manager attached to the SDK',
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
this.signingAddress = newSigningAddress;
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
// eslint-disable-next-line require-jsdoc
|
|
186
|
+
accountBalance(account, callback) {
|
|
187
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
188
|
+
const { polymeshApi: { query: { system }, }, } = this;
|
|
189
|
+
let address;
|
|
190
|
+
if (account) {
|
|
191
|
+
address = (0, conversion_1.signerToString)(account);
|
|
192
|
+
}
|
|
193
|
+
else {
|
|
194
|
+
({ address } = this.getSigningAccount());
|
|
195
|
+
}
|
|
196
|
+
const rawAddress = (0, conversion_1.stringToAccountId)(address, this);
|
|
197
|
+
const assembleResult = ({ data: { free: rawFree, miscFrozen, feeFrozen, reserved: rawReserved }, }) => {
|
|
198
|
+
/*
|
|
199
|
+
* The chain's "free" balance is the balance that isn't locked. Here we calculate it so
|
|
200
|
+
* the free balance is what the Account is able to spend
|
|
201
|
+
*/
|
|
202
|
+
const reserved = (0, conversion_1.balanceToBigNumber)(rawReserved);
|
|
203
|
+
const total = (0, conversion_1.balanceToBigNumber)(rawFree).plus(reserved);
|
|
204
|
+
const locked = bignumber_js_1.default.max((0, conversion_1.balanceToBigNumber)(miscFrozen), (0, conversion_1.balanceToBigNumber)(feeFrozen));
|
|
205
|
+
return {
|
|
206
|
+
total,
|
|
207
|
+
locked,
|
|
208
|
+
free: total.minus(locked).minus(reserved),
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
if (callback) {
|
|
212
|
+
return system.account(rawAddress, info => {
|
|
213
|
+
// eslint-disable-next-line @typescript-eslint/no-floating-promises -- callback errors should be handled by the caller
|
|
214
|
+
callback(assembleResult(info));
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
const accountInfo = yield system.account(rawAddress);
|
|
218
|
+
return assembleResult(accountInfo);
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
// eslint-disable-next-line require-jsdoc
|
|
222
|
+
accountSubsidy(account, callback) {
|
|
223
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
224
|
+
const { polymeshApi: { query: { relayer }, }, } = this;
|
|
225
|
+
let address;
|
|
226
|
+
if (account) {
|
|
227
|
+
address = (0, conversion_1.signerToString)(account);
|
|
228
|
+
}
|
|
229
|
+
else {
|
|
230
|
+
({ address } = this.getSigningAccount());
|
|
231
|
+
}
|
|
232
|
+
const rawAddress = (0, conversion_1.stringToAccountId)(address, this);
|
|
233
|
+
const assembleResult = (meshSubsidy) => {
|
|
234
|
+
if (meshSubsidy.isNone) {
|
|
235
|
+
return null;
|
|
236
|
+
}
|
|
237
|
+
const { paying_key: payingKey, remaining } = meshSubsidy.unwrap();
|
|
238
|
+
const allowance = (0, conversion_1.balanceToBigNumber)(remaining);
|
|
239
|
+
const subsidy = new internal_1.Subsidy({ beneficiary: address, subsidizer: (0, conversion_1.accountIdToString)(payingKey) }, this);
|
|
240
|
+
return {
|
|
241
|
+
subsidy,
|
|
242
|
+
allowance,
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
if (callback) {
|
|
246
|
+
return relayer.subsidies(rawAddress, subsidy => {
|
|
247
|
+
// eslint-disable-next-line @typescript-eslint/no-floating-promises -- callback errors should be handled by the caller
|
|
248
|
+
callback(assembleResult(subsidy));
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
const subsidies = yield relayer.subsidies(rawAddress);
|
|
252
|
+
return assembleResult(subsidies);
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* @hidden
|
|
257
|
+
*
|
|
258
|
+
* Retrieve the signing Account
|
|
259
|
+
*
|
|
260
|
+
* @throws if there is no signing Account associated to the SDK instance
|
|
261
|
+
*/
|
|
262
|
+
getSigningAccount() {
|
|
263
|
+
const address = this.getSigningAddress();
|
|
264
|
+
return new internal_1.Account({ address }, this);
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* @hidden
|
|
268
|
+
*
|
|
269
|
+
* Retrieve the signing Identity
|
|
270
|
+
*
|
|
271
|
+
* @throws if there is no Identity associated to the signing Account (or there is no signing Account associated to the SDK instance)
|
|
272
|
+
*/
|
|
273
|
+
getSigningIdentity() {
|
|
274
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
275
|
+
const account = this.getSigningAccount();
|
|
276
|
+
const identity = yield account.getIdentity();
|
|
277
|
+
if (identity === null) {
|
|
278
|
+
throw new internal_1.PolymeshError({
|
|
279
|
+
code: types_5.ErrorCode.DataUnavailable,
|
|
280
|
+
message: 'The signing Account does not have an associated Identity',
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
return identity;
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* @hidden
|
|
288
|
+
*
|
|
289
|
+
* Retrieve the polkadot.js promise client
|
|
290
|
+
*/
|
|
291
|
+
getPolymeshApi() {
|
|
292
|
+
return this._polymeshApi;
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* @hidden
|
|
296
|
+
*
|
|
297
|
+
* Retrieve the signing address
|
|
298
|
+
*
|
|
299
|
+
* @throws if there is no signing Account associated to the SDK instance
|
|
300
|
+
*/
|
|
301
|
+
getSigningAddress() {
|
|
302
|
+
const { signingAddress } = this;
|
|
303
|
+
if (!signingAddress) {
|
|
304
|
+
throw new internal_1.PolymeshError({
|
|
305
|
+
code: types_5.ErrorCode.General,
|
|
306
|
+
message: 'There is no signing Account associated with the SDK instance',
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
return signingAddress;
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* @hidden
|
|
313
|
+
*
|
|
314
|
+
* Retrieve the external signer from the Signing Manager
|
|
315
|
+
*/
|
|
316
|
+
getExternalSigner() {
|
|
317
|
+
const { signingManager } = this;
|
|
318
|
+
return signingManager.getExternalSigner();
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* @hidden
|
|
322
|
+
*
|
|
323
|
+
* Check whether a set of Identities exist
|
|
324
|
+
*/
|
|
325
|
+
getInvalidDids(identities) {
|
|
326
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
327
|
+
const { polymeshApi: { query: { identity }, }, } = this;
|
|
328
|
+
const dids = identities.map(conversion_1.signerToString);
|
|
329
|
+
const rawIdentities = dids.map(did => (0, conversion_1.stringToIdentityId)(did, this));
|
|
330
|
+
const records = yield identity.didRecords.multi(rawIdentities);
|
|
331
|
+
const invalidDids = [];
|
|
332
|
+
records.forEach((record, index) => {
|
|
333
|
+
if (record.isEmpty) {
|
|
334
|
+
invalidDids.push(dids[index]);
|
|
335
|
+
}
|
|
336
|
+
});
|
|
337
|
+
return invalidDids;
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* @hidden
|
|
342
|
+
*
|
|
343
|
+
* Returns an Identity when given a DID string
|
|
344
|
+
*
|
|
345
|
+
* @throws if the Identity does not exist
|
|
346
|
+
*/
|
|
347
|
+
getIdentity(identity) {
|
|
348
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
349
|
+
if (identity instanceof internal_1.Identity) {
|
|
350
|
+
return identity;
|
|
351
|
+
}
|
|
352
|
+
const id = new internal_1.Identity({ did: identity }, this);
|
|
353
|
+
const exists = yield id.exists();
|
|
354
|
+
if (!exists) {
|
|
355
|
+
throw new internal_1.PolymeshError({
|
|
356
|
+
code: types_5.ErrorCode.DataUnavailable,
|
|
357
|
+
message: 'The Identity does not exist',
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
return id;
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* @hidden
|
|
365
|
+
*
|
|
366
|
+
* Retrieve the protocol fees associated with running specific transactions
|
|
367
|
+
*
|
|
368
|
+
* @param tags - list of transaction tags (i.e. [TxTags.asset.CreateAsset, TxTags.asset.RegisterTicker] or ["asset.createAsset", "asset.registerTicker"])
|
|
369
|
+
* @param blockHash - optional hash of the block to get the protocol fees at that block
|
|
370
|
+
*/
|
|
371
|
+
getProtocolFees({ tags, blockHash, }) {
|
|
372
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
373
|
+
const { polymeshApi: { query: { protocolFee: { baseFees, coefficient }, }, }, } = this;
|
|
374
|
+
const tagsMap = new Map();
|
|
375
|
+
tags.forEach(tag => {
|
|
376
|
+
try {
|
|
377
|
+
tagsMap.set(tag, (0, conversion_1.txTagToProtocolOp)(tag, this));
|
|
378
|
+
}
|
|
379
|
+
catch (err) {
|
|
380
|
+
tagsMap.set(tag, undefined);
|
|
381
|
+
}
|
|
382
|
+
});
|
|
383
|
+
const [baseFeesEntries, coefficientValue] = yield Promise.all([
|
|
384
|
+
blockHash ? baseFees.entriesAt((0, conversion_1.stringToHash)(blockHash, this)) : baseFees.entries(),
|
|
385
|
+
coefficient(),
|
|
386
|
+
]);
|
|
387
|
+
const assembleResult = (rawProtocolOp) => {
|
|
388
|
+
const baseFeeEntry = baseFeesEntries.find(([{ args: [protocolOp], },]) => protocolOp.eq(rawProtocolOp));
|
|
389
|
+
let fee = new bignumber_js_1.default(0);
|
|
390
|
+
if (baseFeeEntry) {
|
|
391
|
+
const [, balance] = baseFeeEntry;
|
|
392
|
+
fee = (0, conversion_1.balanceToBigNumber)(balance).multipliedBy((0, conversion_1.posRatioToBigNumber)(coefficientValue));
|
|
393
|
+
}
|
|
394
|
+
return fee;
|
|
395
|
+
};
|
|
396
|
+
const protocolFees = [];
|
|
397
|
+
tagsMap.forEach((rawProtocolOp, txTag) => {
|
|
398
|
+
protocolFees.push({
|
|
399
|
+
tag: txTag,
|
|
400
|
+
fees: assembleResult(rawProtocolOp),
|
|
401
|
+
});
|
|
402
|
+
});
|
|
403
|
+
return protocolFees;
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* @hidden
|
|
408
|
+
*
|
|
409
|
+
* Return whether the passed transaction can be subsidized
|
|
410
|
+
*/
|
|
411
|
+
supportsSubsidy({ tag }) {
|
|
412
|
+
const moduleName = tag.split('.')[0];
|
|
413
|
+
return [
|
|
414
|
+
types_3.ModuleName.Asset,
|
|
415
|
+
types_3.ModuleName.ComplianceManager,
|
|
416
|
+
types_3.ModuleName.CorporateAction,
|
|
417
|
+
types_3.ModuleName.ExternalAgents,
|
|
418
|
+
types_3.ModuleName.Portfolio,
|
|
419
|
+
types_3.ModuleName.Settlement,
|
|
420
|
+
types_3.ModuleName.Statistics,
|
|
421
|
+
types_3.ModuleName.Sto,
|
|
422
|
+
types_3.ModuleName.Relayer,
|
|
423
|
+
].includes(moduleName);
|
|
424
|
+
}
|
|
425
|
+
/**
|
|
426
|
+
* Retrieve the types of arguments that a certain transaction requires to be run
|
|
427
|
+
*
|
|
428
|
+
* @param args.tag - tag associated with the transaction that will be executed if the proposal passes
|
|
429
|
+
*/
|
|
430
|
+
getTransactionArguments({ tag }) {
|
|
431
|
+
const {
|
|
432
|
+
/*
|
|
433
|
+
* we use the non-proxy polkadot instance since we shouldn't need to
|
|
434
|
+
* have a signer Account for this method
|
|
435
|
+
*/
|
|
436
|
+
_polymeshApi: { tx }, } = this;
|
|
437
|
+
const { types } = definitions_1.polymesh;
|
|
438
|
+
const [section, method] = tag.split('.');
|
|
439
|
+
const getRootType = (type) => {
|
|
440
|
+
const rootType = constants_1.ROOT_TYPES[type];
|
|
441
|
+
if (rootType) {
|
|
442
|
+
return {
|
|
443
|
+
type: rootType,
|
|
444
|
+
};
|
|
445
|
+
}
|
|
446
|
+
if (type === 'Null') {
|
|
447
|
+
return {
|
|
448
|
+
type: types_5.TransactionArgumentType.Null,
|
|
449
|
+
};
|
|
450
|
+
}
|
|
451
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
452
|
+
const definition = types[type];
|
|
453
|
+
if (!definition) {
|
|
454
|
+
return {
|
|
455
|
+
type: types_5.TransactionArgumentType.Unknown,
|
|
456
|
+
};
|
|
457
|
+
}
|
|
458
|
+
const typeDef = (0, types_1.getTypeDef)(JSON.stringify(definition));
|
|
459
|
+
if (typeDef.info === types_2.TypeDefInfo.Plain) {
|
|
460
|
+
return getRootType(definition);
|
|
461
|
+
}
|
|
462
|
+
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
463
|
+
return processType(typeDef, '');
|
|
464
|
+
};
|
|
465
|
+
const processType = (rawType, name) => {
|
|
466
|
+
const { type, info, sub } = rawType;
|
|
467
|
+
const arg = {
|
|
468
|
+
name,
|
|
469
|
+
optional: false,
|
|
470
|
+
_rawType: rawType,
|
|
471
|
+
};
|
|
472
|
+
switch (info) {
|
|
473
|
+
case types_2.TypeDefInfo.Plain: {
|
|
474
|
+
return Object.assign(Object.assign({}, getRootType(type)), arg);
|
|
475
|
+
}
|
|
476
|
+
case types_2.TypeDefInfo.Compact: {
|
|
477
|
+
return Object.assign(Object.assign({}, processType(sub, name)), arg);
|
|
478
|
+
}
|
|
479
|
+
case types_2.TypeDefInfo.Option: {
|
|
480
|
+
return Object.assign(Object.assign(Object.assign({}, processType(sub, name)), arg), { optional: true });
|
|
481
|
+
}
|
|
482
|
+
case types_2.TypeDefInfo.Tuple: {
|
|
483
|
+
return Object.assign(Object.assign({ type: types_5.TransactionArgumentType.Tuple }, arg), { internal: sub.map((def, index) => processType(def, `${index}`)) });
|
|
484
|
+
}
|
|
485
|
+
case types_2.TypeDefInfo.Vec: {
|
|
486
|
+
return Object.assign(Object.assign({ type: types_5.TransactionArgumentType.Array }, arg), { internal: processType(sub, '') });
|
|
487
|
+
}
|
|
488
|
+
case types_2.TypeDefInfo.VecFixed: {
|
|
489
|
+
return Object.assign({ type: types_5.TransactionArgumentType.Text }, arg);
|
|
490
|
+
}
|
|
491
|
+
case types_2.TypeDefInfo.Enum: {
|
|
492
|
+
const subTypes = sub;
|
|
493
|
+
const isSimple = subTypes.every(({ type: subType }) => subType === 'Null');
|
|
494
|
+
if (isSimple) {
|
|
495
|
+
return Object.assign(Object.assign({ type: types_5.TransactionArgumentType.SimpleEnum }, arg), {
|
|
496
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
497
|
+
internal: subTypes.map(({ name: subName }) => subName) });
|
|
498
|
+
}
|
|
499
|
+
return Object.assign(Object.assign({ type: types_5.TransactionArgumentType.RichEnum }, arg), {
|
|
500
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
501
|
+
internal: subTypes.map(def => processType(def, def.name)) });
|
|
502
|
+
}
|
|
503
|
+
case types_2.TypeDefInfo.Struct: {
|
|
504
|
+
return Object.assign(Object.assign({ type: types_5.TransactionArgumentType.Object }, arg), {
|
|
505
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
506
|
+
internal: sub.map(def => processType(def, def.name)) });
|
|
507
|
+
}
|
|
508
|
+
default: {
|
|
509
|
+
return Object.assign({ type: types_5.TransactionArgumentType.Unknown }, arg);
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
};
|
|
513
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
514
|
+
return tx[section][method].meta.args.map(({ name, type }) => {
|
|
515
|
+
const typeDef = (0, types_1.getTypeDef)(type.toString());
|
|
516
|
+
const argName = (0, conversion_1.textToString)(name);
|
|
517
|
+
return processType(typeDef, argName);
|
|
518
|
+
});
|
|
519
|
+
}
|
|
520
|
+
/**
|
|
521
|
+
* @hidden
|
|
522
|
+
*/
|
|
523
|
+
getDividendDistributionsForAssets(args) {
|
|
524
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
525
|
+
const { polymeshApi: { query: { corporateAction: corporateActionQuery, capitalDistribution }, }, } = this;
|
|
526
|
+
const { assets } = args;
|
|
527
|
+
const distributionsMultiParams = [];
|
|
528
|
+
const corporateActionParams = [];
|
|
529
|
+
const corporateActionIds = [];
|
|
530
|
+
const tickers = [];
|
|
531
|
+
const assetChunks = (0, lodash_1.chunk)(assets, constants_1.MAX_CONCURRENT_REQUESTS);
|
|
532
|
+
yield bluebird_1.default.each(assetChunks, (assetChunk) => __awaiter(this, void 0, void 0, function* () {
|
|
533
|
+
const corporateActions = yield Promise.all(assetChunk.map(({ ticker }) => corporateActionQuery.corporateActions.entries((0, conversion_1.stringToTicker)(ticker, this))));
|
|
534
|
+
const eligibleCas = (0, lodash_1.flatten)(corporateActions).filter(([, action]) => {
|
|
535
|
+
const kind = action.unwrap().kind;
|
|
536
|
+
return kind.isUnpredictableBenefit || kind.isPredictableBenefit;
|
|
537
|
+
});
|
|
538
|
+
const corporateActionData = yield bluebird_1.default.map(eligibleCas, ([{ args: [rawTicker, rawId], }, corporateAction,]) => __awaiter(this, void 0, void 0, function* () {
|
|
539
|
+
const localId = (0, conversion_1.u32ToBigNumber)(rawId);
|
|
540
|
+
const ticker = (0, conversion_1.tickerToString)(rawTicker);
|
|
541
|
+
const caId = (0, conversion_1.corporateActionIdentifierToCaId)({ ticker, localId }, this);
|
|
542
|
+
const details = yield corporateActionQuery.details(caId);
|
|
543
|
+
const action = corporateAction.unwrap();
|
|
544
|
+
return {
|
|
545
|
+
ticker,
|
|
546
|
+
localId,
|
|
547
|
+
caId,
|
|
548
|
+
corporateAction: (0, conversion_1.meshCorporateActionToCorporateActionParams)(action, details, this),
|
|
549
|
+
};
|
|
550
|
+
}));
|
|
551
|
+
corporateActionData.forEach(({ ticker, localId, caId, corporateAction }) => {
|
|
552
|
+
tickers.push(ticker);
|
|
553
|
+
corporateActionIds.push(localId);
|
|
554
|
+
distributionsMultiParams.push(caId);
|
|
555
|
+
corporateActionParams.push(corporateAction);
|
|
556
|
+
});
|
|
557
|
+
}));
|
|
558
|
+
/*
|
|
559
|
+
* Divide the requests to account for practical limits
|
|
560
|
+
*/
|
|
561
|
+
const paramChunks = (0, lodash_1.chunk)(distributionsMultiParams, constants_1.MAX_PAGE_SIZE.toNumber());
|
|
562
|
+
const requestChunks = (0, lodash_1.chunk)(paramChunks, constants_1.MAX_CONCURRENT_REQUESTS);
|
|
563
|
+
const distributions = yield bluebird_1.default.mapSeries(requestChunks, requestChunk => Promise.all(requestChunk.map(paramChunk => capitalDistribution.distributions.multi(paramChunk))));
|
|
564
|
+
const result = [];
|
|
565
|
+
(0, lodash_1.flattenDeep)(distributions).forEach((distribution, index) => {
|
|
566
|
+
if (distribution.isNone) {
|
|
567
|
+
return;
|
|
568
|
+
}
|
|
569
|
+
const dist = distribution.unwrap();
|
|
570
|
+
const { reclaimed, remaining } = dist;
|
|
571
|
+
result.push({
|
|
572
|
+
distribution: new internal_1.DividendDistribution(Object.assign(Object.assign({ ticker: tickers[index], id: corporateActionIds[index] }, corporateActionParams[index]), (0, conversion_1.distributionToDividendDistributionParams)(dist, this)), this),
|
|
573
|
+
details: {
|
|
574
|
+
remainingFunds: (0, conversion_1.balanceToBigNumber)(remaining),
|
|
575
|
+
fundsReclaimed: (0, conversion_1.boolToBoolean)(reclaimed),
|
|
576
|
+
},
|
|
577
|
+
});
|
|
578
|
+
});
|
|
579
|
+
return result;
|
|
580
|
+
});
|
|
581
|
+
}
|
|
582
|
+
/**
|
|
583
|
+
* @hidden
|
|
584
|
+
*
|
|
585
|
+
* @note no claimTypes value means ALL claim types
|
|
586
|
+
*/
|
|
587
|
+
getIdentityClaimsFromChain(args) {
|
|
588
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
589
|
+
const { polymeshApi: { query: { identity }, }, } = this;
|
|
590
|
+
const { targets, claimTypes = Object.values(types_5.ClaimType), trustedClaimIssuers, includeExpired, } = args;
|
|
591
|
+
const claim1stKeys = (0, lodash_1.flatMap)(targets, target => claimTypes.map(claimType => {
|
|
592
|
+
return {
|
|
593
|
+
target: (0, conversion_1.signerToString)(target),
|
|
594
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
595
|
+
claim_type: (0, conversion_1.claimTypeToMeshClaimType)(claimType, this),
|
|
596
|
+
};
|
|
597
|
+
}));
|
|
598
|
+
const claimIssuerDids = trustedClaimIssuers === null || trustedClaimIssuers === void 0 ? void 0 : trustedClaimIssuers.map(trustedClaimIssuer => (0, conversion_1.signerToString)(trustedClaimIssuer));
|
|
599
|
+
const claimData = yield bluebird_1.default.map(claim1stKeys, (claim1stKey) => __awaiter(this, void 0, void 0, function* () {
|
|
600
|
+
const entries = yield identity.claims.entries(claim1stKey);
|
|
601
|
+
const data = [];
|
|
602
|
+
entries.forEach(([key, { claim_issuer: claimIssuer, issuance_date: issuanceDate, expiry: rawExpiry, claim },]) => {
|
|
603
|
+
const { target } = key.args[0];
|
|
604
|
+
const expiry = !rawExpiry.isEmpty ? (0, conversion_1.momentToDate)(rawExpiry.unwrap()) : null;
|
|
605
|
+
if ((!includeExpired && (expiry === null || expiry > new Date())) || includeExpired) {
|
|
606
|
+
data.push({
|
|
607
|
+
target: new internal_1.Identity({ did: (0, conversion_1.identityIdToString)(target) }, this),
|
|
608
|
+
issuer: new internal_1.Identity({ did: (0, conversion_1.identityIdToString)(claimIssuer) }, this),
|
|
609
|
+
issuedAt: (0, conversion_1.momentToDate)(issuanceDate),
|
|
610
|
+
expiry,
|
|
611
|
+
claim: (0, conversion_1.meshClaimToClaim)(claim),
|
|
612
|
+
});
|
|
613
|
+
}
|
|
614
|
+
});
|
|
615
|
+
return data;
|
|
616
|
+
}));
|
|
617
|
+
return (0, lodash_1.flatten)(claimData).filter(({ issuer }) => claimIssuerDids ? claimIssuerDids.includes(issuer.did) : true);
|
|
618
|
+
});
|
|
619
|
+
}
|
|
620
|
+
/**
|
|
621
|
+
* @hidden
|
|
622
|
+
*/
|
|
623
|
+
getIdentityClaimsFromMiddleware(args) {
|
|
624
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
625
|
+
const { targets, claimTypes, trustedClaimIssuers, includeExpired, size, start } = args;
|
|
626
|
+
const data = [];
|
|
627
|
+
const result = yield this.queryMiddleware((0, queries_1.didsWithClaims)({
|
|
628
|
+
dids: targets === null || targets === void 0 ? void 0 : targets.map(target => (0, conversion_1.signerToString)(target)),
|
|
629
|
+
trustedClaimIssuers: trustedClaimIssuers === null || trustedClaimIssuers === void 0 ? void 0 : trustedClaimIssuers.map(trustedClaimIssuer => (0, conversion_1.signerToString)(trustedClaimIssuer)),
|
|
630
|
+
claimTypes: claimTypes === null || claimTypes === void 0 ? void 0 : claimTypes.map(ct => types_4.ClaimTypeEnum[ct]),
|
|
631
|
+
includeExpired,
|
|
632
|
+
count: size === null || size === void 0 ? void 0 : size.toNumber(),
|
|
633
|
+
skip: start === null || start === void 0 ? void 0 : start.toNumber(),
|
|
634
|
+
}));
|
|
635
|
+
const { data: { didsWithClaims: { items: didsWithClaimsList, totalCount }, }, } = result;
|
|
636
|
+
const count = new bignumber_js_1.default(totalCount);
|
|
637
|
+
didsWithClaimsList.forEach(({ claims }) => {
|
|
638
|
+
claims.forEach(({ targetDID: target, issuer, issuance_date: issuanceDate, expiry, type, jurisdiction, scope, cdd_id: cddId, }) => {
|
|
639
|
+
data.push({
|
|
640
|
+
target: new internal_1.Identity({ did: target }, this),
|
|
641
|
+
issuer: new internal_1.Identity({ did: issuer }, this),
|
|
642
|
+
issuedAt: new Date(issuanceDate),
|
|
643
|
+
expiry: expiry ? new Date(expiry) : null,
|
|
644
|
+
claim: (0, internal_2.createClaim)(type, jurisdiction, scope, cddId, undefined),
|
|
645
|
+
});
|
|
646
|
+
});
|
|
647
|
+
});
|
|
648
|
+
const next = (0, internal_2.calculateNextKey)(count, size, start);
|
|
649
|
+
return {
|
|
650
|
+
data,
|
|
651
|
+
next,
|
|
652
|
+
count,
|
|
653
|
+
};
|
|
654
|
+
});
|
|
655
|
+
}
|
|
656
|
+
/**
|
|
657
|
+
* @hidden
|
|
658
|
+
*
|
|
659
|
+
* Retrieve a list of claims. Can be filtered using parameters
|
|
660
|
+
*
|
|
661
|
+
* @param opts.targets - Identities (or Identity IDs) for which to fetch claims (targets). Defaults to all targets
|
|
662
|
+
* @param opts.trustedClaimIssuers - Identity IDs of claim issuers. Defaults to all claim issuers
|
|
663
|
+
* @param opts.claimTypes - types of the claims to fetch. Defaults to any type
|
|
664
|
+
* @param opts.includeExpired - whether to include expired claims. Defaults to true
|
|
665
|
+
* @param opts.size - page size
|
|
666
|
+
* @param opts.start - page offset
|
|
667
|
+
*
|
|
668
|
+
* @note uses the middleware (optional)
|
|
669
|
+
*/
|
|
670
|
+
issuedClaims(opts = {}) {
|
|
671
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
672
|
+
const { targets, trustedClaimIssuers, claimTypes, includeExpired = true, size, start } = opts;
|
|
673
|
+
const isMiddlewareAvailable = yield this.isMiddlewareAvailable();
|
|
674
|
+
if (isMiddlewareAvailable) {
|
|
675
|
+
return this.getIdentityClaimsFromMiddleware({
|
|
676
|
+
targets,
|
|
677
|
+
trustedClaimIssuers,
|
|
678
|
+
claimTypes,
|
|
679
|
+
includeExpired,
|
|
680
|
+
size,
|
|
681
|
+
start,
|
|
682
|
+
});
|
|
683
|
+
}
|
|
684
|
+
if (!targets) {
|
|
685
|
+
throw new internal_1.PolymeshError({
|
|
686
|
+
code: types_5.ErrorCode.MiddlewareError,
|
|
687
|
+
message: 'Cannot perform this action without an active middleware connection',
|
|
688
|
+
});
|
|
689
|
+
}
|
|
690
|
+
const identityClaimsFromChain = yield this.getIdentityClaimsFromChain({
|
|
691
|
+
targets,
|
|
692
|
+
claimTypes,
|
|
693
|
+
trustedClaimIssuers,
|
|
694
|
+
includeExpired,
|
|
695
|
+
});
|
|
696
|
+
return {
|
|
697
|
+
data: identityClaimsFromChain,
|
|
698
|
+
next: null,
|
|
699
|
+
count: undefined,
|
|
700
|
+
};
|
|
701
|
+
});
|
|
702
|
+
}
|
|
703
|
+
/**
|
|
704
|
+
* @hidden
|
|
705
|
+
*
|
|
706
|
+
* Retrieve the middleware client
|
|
707
|
+
*
|
|
708
|
+
* @throws if the middleware is not enabled
|
|
709
|
+
*/
|
|
710
|
+
get middlewareApi() {
|
|
711
|
+
const { _middlewareApi: api } = this;
|
|
712
|
+
if (!api) {
|
|
713
|
+
throw new internal_1.PolymeshError({
|
|
714
|
+
code: types_5.ErrorCode.MiddlewareError,
|
|
715
|
+
message: 'Cannot perform this action without an active middleware connection',
|
|
716
|
+
});
|
|
717
|
+
}
|
|
718
|
+
return api;
|
|
719
|
+
}
|
|
720
|
+
/**
|
|
721
|
+
* @hidden
|
|
722
|
+
*
|
|
723
|
+
* Make a query to the middleware server using the apollo client
|
|
724
|
+
*/
|
|
725
|
+
queryMiddleware(query) {
|
|
726
|
+
var _a, _b;
|
|
727
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
728
|
+
let result;
|
|
729
|
+
try {
|
|
730
|
+
result = yield this.middlewareApi.query(query);
|
|
731
|
+
}
|
|
732
|
+
catch (err) {
|
|
733
|
+
const resultMessage = (_b = (_a = err.networkError) === null || _a === void 0 ? void 0 : _a.result) === null || _b === void 0 ? void 0 : _b.message;
|
|
734
|
+
const { message: errorMessage } = err;
|
|
735
|
+
const message = resultMessage !== null && resultMessage !== void 0 ? resultMessage : errorMessage;
|
|
736
|
+
throw new internal_1.PolymeshError({
|
|
737
|
+
code: types_5.ErrorCode.MiddlewareError,
|
|
738
|
+
message: `Error in middleware query: ${message}`,
|
|
739
|
+
});
|
|
740
|
+
}
|
|
741
|
+
return result;
|
|
742
|
+
});
|
|
743
|
+
}
|
|
744
|
+
/**
|
|
745
|
+
* @hidden
|
|
746
|
+
*
|
|
747
|
+
* Return whether the middleware was enabled at startup
|
|
748
|
+
*/
|
|
749
|
+
isMiddlewareEnabled() {
|
|
750
|
+
return !!this._middlewareApi;
|
|
751
|
+
}
|
|
752
|
+
/**
|
|
753
|
+
* @hidden
|
|
754
|
+
*
|
|
755
|
+
* Return whether the middleware is enabled and online
|
|
756
|
+
*/
|
|
757
|
+
isMiddlewareAvailable() {
|
|
758
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
759
|
+
try {
|
|
760
|
+
yield this.middlewareApi.query((0, queries_1.heartbeat)());
|
|
761
|
+
}
|
|
762
|
+
catch (err) {
|
|
763
|
+
return false;
|
|
764
|
+
}
|
|
765
|
+
return true;
|
|
766
|
+
});
|
|
767
|
+
}
|
|
768
|
+
/**
|
|
769
|
+
* @hidden
|
|
770
|
+
*
|
|
771
|
+
* Retrieve the latest block number
|
|
772
|
+
*/
|
|
773
|
+
getLatestBlock() {
|
|
774
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
775
|
+
const { number } = yield this.polymeshApi.rpc.chain.getHeader();
|
|
776
|
+
return (0, conversion_1.u32ToBigNumber)(number.unwrap());
|
|
777
|
+
});
|
|
778
|
+
}
|
|
779
|
+
/**
|
|
780
|
+
* @hidden
|
|
781
|
+
*
|
|
782
|
+
* Retrieve the network version
|
|
783
|
+
*/
|
|
784
|
+
getNetworkVersion() {
|
|
785
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
786
|
+
const version = yield this.polymeshApi.rpc.system.version();
|
|
787
|
+
return (0, conversion_1.textToString)(version);
|
|
788
|
+
});
|
|
789
|
+
}
|
|
790
|
+
/**
|
|
791
|
+
* @hidden
|
|
792
|
+
*
|
|
793
|
+
* Disconnect the Polkadot API, middleware, and render this instance unusable
|
|
794
|
+
*
|
|
795
|
+
* @note after disconnecting, trying to access any property in this object will result
|
|
796
|
+
* in an error
|
|
797
|
+
*/
|
|
798
|
+
disconnect() {
|
|
799
|
+
const { polymeshApi } = this;
|
|
800
|
+
let middlewareApi;
|
|
801
|
+
if (this.isMiddlewareEnabled()) {
|
|
802
|
+
({ middlewareApi } = this);
|
|
803
|
+
}
|
|
804
|
+
this.isDisconnected = true;
|
|
805
|
+
middlewareApi && middlewareApi.stop();
|
|
806
|
+
return polymeshApi.disconnect();
|
|
807
|
+
}
|
|
808
|
+
/**
|
|
809
|
+
* @hidden
|
|
810
|
+
*
|
|
811
|
+
* Returns a (shallow) clone of this instance. Useful for providing a separate
|
|
812
|
+
* Context to Procedures with different signing Accounts
|
|
813
|
+
*/
|
|
814
|
+
clone() {
|
|
815
|
+
const cloned = (0, lodash_1.clone)(this);
|
|
816
|
+
cloned.polymeshApi = Context.createPolymeshApiProxy(cloned);
|
|
817
|
+
return cloned;
|
|
818
|
+
}
|
|
819
|
+
/**
|
|
820
|
+
* @hidden
|
|
821
|
+
*
|
|
822
|
+
* Creates an instance of a type as registered in the polymeshApi instance
|
|
823
|
+
*/
|
|
824
|
+
createType(type, params) {
|
|
825
|
+
try {
|
|
826
|
+
return this.polymeshApi.createType(type, params);
|
|
827
|
+
}
|
|
828
|
+
catch (error) {
|
|
829
|
+
throw new internal_1.PolymeshError({
|
|
830
|
+
code: types_5.ErrorCode.UnexpectedError,
|
|
831
|
+
message: `Could not create internal Polymesh type: "${type}". Please report this error to the Polymath team`,
|
|
832
|
+
data: { type, params, error },
|
|
833
|
+
});
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
exports.Context = Context;
|
|
838
|
+
//# sourceMappingURL=Context.js.map
|