@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/Network.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Network.js","sourceRoot":"","sources":["../src/Network.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gEAAqC;AAErC,yCAAkF;AAClF,kDAAkG;AAalG,iDAA4D;AAC5D,mDAQ4B;AAC5B,+CAAoE;AAEpE;;GAEG;AACH,MAAa,OAAO;IAGlB;;OAEG;IACH,YAAY,OAAgB;QAC1B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QAEvB,IAAI,CAAC,aAAa,GAAG,IAAA,gCAAqB,EACxC,EAAE,mBAAmB,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,wBAAa,EAAE,IAAI,CAAC,EAAE,EACtD,OAAO,CACR,CAAC;IACJ,CAAC;IAED;;OAEG;IACI,cAAc;QACnB,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC;IACvC,CAAC;IAED;;OAEG;IACU,UAAU;;YACrB,OAAO,IAAI,CAAC,OAAO,CAAC,iBAAiB,EAAE,CAAC;QAC1C,CAAC;KAAA;IAED;;OAEG;IACI,aAAa;QAClB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC;IACjC,CAAC;IAED;;OAEG;IACU,oBAAoB;;YAC/B,MAAM,EACJ,OAAO,EAAE,EACP,WAAW,EAAE,EACX,cAAc,EAAE,EAAE,WAAW,EAAE,EAC/B,GAAG,EAAE,EACH,MAAM,EAAE,EAAE,KAAK,EAAE,GAClB,GACF,GACF,GACF,GAAG,IAAI,CAAC;YACT,MAAM,IAAI,GAAG,MAAM,KAAK,EAAE,CAAC;YAE3B,OAAO;gBACL,IAAI,EAAE,IAAA,yBAAY,EAAC,IAAI,CAAC;gBACxB,OAAO,EAAE,IAAA,2BAAc,EAAC,WAAW,CAAC;aACrC,CAAC;QACJ,CAAC;KAAA;IAED;;;;OAIG;I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AS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI;oBAC1C,KAAK;oBACL,MAAM;oBACN,OAAO,EAAE,CAAC,CAAC,SAAS;oBACpB,aAAa,EAAE,IAAI,sBAAS,CAAC,aAAa,CAAC;oBAC3C,oEAAoE;oBACpE,aAAa,EAAE,aAAc;oBAC7B,GAAG,EAAE;wBACH,GAAG,EAAE,IAAA,+BAAkB,EAAC,UAAU,CAAC;wBACnC,QAAQ,EAAE,YAAY;qBACvB;iBACF,CAAC;aACH;YAED,OAAO,IAAI,CAAC;QACd,CAAC;KAAA;CACF;AAzRD,0BAyRC"}
|
package/Polymesh.d.ts
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { ApiPromise } from '@polkadot/api';
|
|
2
|
+
import { SigningManager } from '@polymathnetwork/signing-manager-types';
|
|
3
|
+
import { NormalizedCacheObject } from 'apollo-cache-inmemory';
|
|
4
|
+
import { ApolloClient } from 'apollo-client';
|
|
5
|
+
import { AccountManagement } from "./AccountManagement";
|
|
6
|
+
import { Assets } from "./Assets";
|
|
7
|
+
import { Identities } from "./Identities";
|
|
8
|
+
import { Account, Identity } from "./internal";
|
|
9
|
+
import { Settlements } from "./Settlements";
|
|
10
|
+
import { MiddlewareConfig } from "./types";
|
|
11
|
+
import { Claims } from './Claims';
|
|
12
|
+
import { Network } from './Network';
|
|
13
|
+
interface ConnectParams {
|
|
14
|
+
nodeUrl: string;
|
|
15
|
+
signingManager?: SigningManager;
|
|
16
|
+
middleware?: MiddlewareConfig;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Main entry point of the Polymesh SDK
|
|
20
|
+
*/
|
|
21
|
+
export declare class Polymesh {
|
|
22
|
+
private context;
|
|
23
|
+
/**
|
|
24
|
+
* A set of methods to deal with Claims
|
|
25
|
+
*/
|
|
26
|
+
claims: Claims;
|
|
27
|
+
/**
|
|
28
|
+
* A set of methods to interact with the Polymesh network. This includes transferring POLYX, reading network properties and querying for historical events
|
|
29
|
+
*/
|
|
30
|
+
network: Network;
|
|
31
|
+
/**
|
|
32
|
+
* A set of methods for exchanging Assets
|
|
33
|
+
*/
|
|
34
|
+
settlements: Settlements;
|
|
35
|
+
/**
|
|
36
|
+
* A set of methods for managing a Polymesh Identity's Accounts and their permissions
|
|
37
|
+
*/
|
|
38
|
+
accountManagement: AccountManagement;
|
|
39
|
+
/**
|
|
40
|
+
* A set of methods for interacting with Polymesh Identities.
|
|
41
|
+
*/
|
|
42
|
+
identities: Identities;
|
|
43
|
+
/**
|
|
44
|
+
* A set of methods for interacting with Assets
|
|
45
|
+
*/
|
|
46
|
+
assets: Assets;
|
|
47
|
+
/**
|
|
48
|
+
* @hidden
|
|
49
|
+
*/
|
|
50
|
+
private constructor();
|
|
51
|
+
/**
|
|
52
|
+
* Create an SDK instance and connect to a Polymesh node
|
|
53
|
+
*
|
|
54
|
+
* @param params.nodeUrl - URL of the Polymesh node this instance will be connecting to
|
|
55
|
+
* @param params.signingManager - object in charge of managing keys and signing transactions
|
|
56
|
+
* (optional, if not passed the SDK will not be able to submit transactions). Can be set later with
|
|
57
|
+
* `setSigningManager`
|
|
58
|
+
* @param params.middleware - middleware API URL and key (optional, used for historic queries)
|
|
59
|
+
*/
|
|
60
|
+
static connect(params: ConnectParams): Promise<Polymesh>;
|
|
61
|
+
/**
|
|
62
|
+
* Retrieve the Identity associated to the signing Account (null if there is none)
|
|
63
|
+
*
|
|
64
|
+
* @throws if there is no signing Account associated to the SDK
|
|
65
|
+
*/
|
|
66
|
+
getSigningIdentity(): Promise<Identity | null>;
|
|
67
|
+
/**
|
|
68
|
+
* Handle connection errors
|
|
69
|
+
*
|
|
70
|
+
* @returns an unsubscribe callback
|
|
71
|
+
*/
|
|
72
|
+
onConnectionError(callback: (...args: unknown[]) => unknown): () => void;
|
|
73
|
+
/**
|
|
74
|
+
* Handle disconnection
|
|
75
|
+
*
|
|
76
|
+
* @returns an unsubscribe callback
|
|
77
|
+
*/
|
|
78
|
+
onDisconnect(callback: (...args: unknown[]) => unknown): () => void;
|
|
79
|
+
/**
|
|
80
|
+
* Disconnect the client and close all open connections and subscriptions
|
|
81
|
+
*
|
|
82
|
+
* @note the SDK will become unusable after this operation. It will throw an error when attempting to
|
|
83
|
+
* access any chain or middleware data. If you wish to continue using the SDK, you must
|
|
84
|
+
* create a new instance by calling {@link connect}
|
|
85
|
+
*/
|
|
86
|
+
disconnect(): Promise<void>;
|
|
87
|
+
/**
|
|
88
|
+
* Set the SDK's signing Account to the provided one
|
|
89
|
+
*
|
|
90
|
+
* @throws if the passed Account is not present in the Signing Manager (or there is no Signing Manager)
|
|
91
|
+
*/
|
|
92
|
+
setSigningAccount(signer: string | Account): Promise<void>;
|
|
93
|
+
/**
|
|
94
|
+
* Set the SDK's Signing Manager to the provided one
|
|
95
|
+
*/
|
|
96
|
+
setSigningManager(signingManager: SigningManager): Promise<void>;
|
|
97
|
+
/**
|
|
98
|
+
* Polkadot client
|
|
99
|
+
*/
|
|
100
|
+
get _polkadotApi(): ApiPromise;
|
|
101
|
+
/**
|
|
102
|
+
* signing address (to manually submit transactions with the polkadot API)
|
|
103
|
+
*/
|
|
104
|
+
get _signingAddress(): string;
|
|
105
|
+
/**
|
|
106
|
+
* Middleware client
|
|
107
|
+
*/
|
|
108
|
+
get _middlewareApi(): ApolloClient<NormalizedCacheObject>;
|
|
109
|
+
}
|
|
110
|
+
export {};
|
|
111
|
+
//# sourceMappingURL=Polymesh.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Polymesh.d.ts","sourceRoot":"","sources":["../src/Polymesh.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAc,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,EAAiB,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAO7C,OAAO,EAAE,iBA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I,OAAO,CAAC,IAAI,CAAC;IAIlC;;;;OAIG;IACU,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAIvE;;OAEG;IACI,iBAAiB,CAAC,cAAc,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAMvE;;OAEG;IACH,IAAW,YAAY,IAAI,UAAU,CAEpC;IAGD;;OAEG;IACH,IAAW,eAAe,IAAI,MAAM,CAEnC;IAGD;;OAEG;IACH,IAAW,cAAc,IAAI,YAAY,CAAC,qBAAqB,CAAC,CAE/D;CAEF"}
|
package/Polymesh.js
ADDED
|
@@ -0,0 +1,219 @@
|
|
|
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.Polymesh = void 0;
|
|
16
|
+
const api_1 = require("@polkadot/api");
|
|
17
|
+
const apollo_cache_inmemory_1 = require("apollo-cache-inmemory");
|
|
18
|
+
const apollo_client_1 = require("apollo-client");
|
|
19
|
+
const apollo_link_1 = require("apollo-link");
|
|
20
|
+
const apollo_link_context_1 = require("apollo-link-context");
|
|
21
|
+
const apollo_link_http_1 = require("apollo-link-http");
|
|
22
|
+
const cross_fetch_1 = __importDefault(require("cross-fetch"));
|
|
23
|
+
const schema_1 = __importDefault(require("./polkadot/schema"));
|
|
24
|
+
const AccountManagement_1 = require("./AccountManagement");
|
|
25
|
+
const Assets_1 = require("./Assets");
|
|
26
|
+
const Identities_1 = require("./Identities");
|
|
27
|
+
const internal_1 = require("./internal");
|
|
28
|
+
const queries_1 = require("./middleware/queries");
|
|
29
|
+
const Settlements_1 = require("./Settlements");
|
|
30
|
+
const types_1 = require("./types");
|
|
31
|
+
const conversion_1 = require("./utils/conversion");
|
|
32
|
+
const internal_2 = require("./utils/internal");
|
|
33
|
+
const Claims_1 = require("./Claims");
|
|
34
|
+
const Network_1 = require("./Network");
|
|
35
|
+
/**
|
|
36
|
+
* Main entry point of the Polymesh SDK
|
|
37
|
+
*/
|
|
38
|
+
class Polymesh {
|
|
39
|
+
/**
|
|
40
|
+
* @hidden
|
|
41
|
+
*/
|
|
42
|
+
constructor(context) {
|
|
43
|
+
this.context = {};
|
|
44
|
+
this.context = context;
|
|
45
|
+
this.claims = new Claims_1.Claims(context);
|
|
46
|
+
this.network = new Network_1.Network(context);
|
|
47
|
+
this.settlements = new Settlements_1.Settlements(context);
|
|
48
|
+
this.accountManagement = new AccountManagement_1.AccountManagement(context);
|
|
49
|
+
this.identities = new Identities_1.Identities(context);
|
|
50
|
+
this.assets = new Assets_1.Assets(context);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Create an SDK instance and connect to a Polymesh node
|
|
54
|
+
*
|
|
55
|
+
* @param params.nodeUrl - URL of the Polymesh node this instance will be connecting to
|
|
56
|
+
* @param params.signingManager - object in charge of managing keys and signing transactions
|
|
57
|
+
* (optional, if not passed the SDK will not be able to submit transactions). Can be set later with
|
|
58
|
+
* `setSigningManager`
|
|
59
|
+
* @param params.middleware - middleware API URL and key (optional, used for historic queries)
|
|
60
|
+
*/
|
|
61
|
+
static connect(params) {
|
|
62
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
63
|
+
const { nodeUrl, signingManager, middleware } = params;
|
|
64
|
+
let context;
|
|
65
|
+
yield (0, internal_2.assertExpectedChainVersion)(nodeUrl).catch(error => {
|
|
66
|
+
if (error instanceof internal_1.PolymeshError &&
|
|
67
|
+
error.message.includes('Unsupported Polymesh version')) {
|
|
68
|
+
console.warn(error.message);
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
throw error;
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
try {
|
|
75
|
+
const { types, rpc } = schema_1.default;
|
|
76
|
+
const polymeshApi = yield api_1.ApiPromise.create({
|
|
77
|
+
provider: new api_1.WsProvider(nodeUrl),
|
|
78
|
+
types,
|
|
79
|
+
rpc,
|
|
80
|
+
});
|
|
81
|
+
let middlewareApi = null;
|
|
82
|
+
if (middleware) {
|
|
83
|
+
middlewareApi = new apollo_client_1.ApolloClient({
|
|
84
|
+
link: (0, apollo_link_context_1.setContext)((_, { headers }) => {
|
|
85
|
+
return {
|
|
86
|
+
headers: Object.assign(Object.assign({}, headers), {
|
|
87
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
88
|
+
'x-api-key': middleware.key }),
|
|
89
|
+
};
|
|
90
|
+
}).concat(apollo_link_1.ApolloLink.from([
|
|
91
|
+
new apollo_link_http_1.HttpLink({
|
|
92
|
+
uri: middleware.link,
|
|
93
|
+
fetch: cross_fetch_1.default,
|
|
94
|
+
}),
|
|
95
|
+
])),
|
|
96
|
+
cache: new apollo_cache_inmemory_1.InMemoryCache(),
|
|
97
|
+
defaultOptions: {
|
|
98
|
+
watchQuery: {
|
|
99
|
+
fetchPolicy: 'no-cache',
|
|
100
|
+
},
|
|
101
|
+
query: {
|
|
102
|
+
fetchPolicy: 'no-cache',
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
context = yield internal_1.Context.create({
|
|
108
|
+
polymeshApi,
|
|
109
|
+
middlewareApi,
|
|
110
|
+
signingManager,
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
catch (err) {
|
|
114
|
+
const { message, code } = err;
|
|
115
|
+
throw new internal_1.PolymeshError({
|
|
116
|
+
code,
|
|
117
|
+
message: `Error while connecting to "${nodeUrl}": "${message || 'The node couldn’t be reached'}"`,
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
if (middleware) {
|
|
121
|
+
try {
|
|
122
|
+
yield context.queryMiddleware((0, queries_1.heartbeat)());
|
|
123
|
+
}
|
|
124
|
+
catch (err) {
|
|
125
|
+
if (err.message.indexOf('Forbidden') > -1 ||
|
|
126
|
+
err.message.indexOf('Missing Authentication Token') > -1) {
|
|
127
|
+
throw new internal_1.PolymeshError({
|
|
128
|
+
code: types_1.ErrorCode.FatalError,
|
|
129
|
+
message: 'Incorrect middleware URL or API key',
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
return new Polymesh(context);
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Retrieve the Identity associated to the signing Account (null if there is none)
|
|
139
|
+
*
|
|
140
|
+
* @throws if there is no signing Account associated to the SDK
|
|
141
|
+
*/
|
|
142
|
+
getSigningIdentity() {
|
|
143
|
+
return this.context.getSigningAccount().getIdentity();
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Handle connection errors
|
|
147
|
+
*
|
|
148
|
+
* @returns an unsubscribe callback
|
|
149
|
+
*/
|
|
150
|
+
onConnectionError(callback) {
|
|
151
|
+
const { context: { polymeshApi }, } = this;
|
|
152
|
+
polymeshApi.on('error', callback);
|
|
153
|
+
return () => {
|
|
154
|
+
polymeshApi.off('error', callback);
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Handle disconnection
|
|
159
|
+
*
|
|
160
|
+
* @returns an unsubscribe callback
|
|
161
|
+
*/
|
|
162
|
+
onDisconnect(callback) {
|
|
163
|
+
const { context: { polymeshApi }, } = this;
|
|
164
|
+
polymeshApi.on('disconnected', callback);
|
|
165
|
+
return () => {
|
|
166
|
+
polymeshApi.off('disconnected', callback);
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Disconnect the client and close all open connections and subscriptions
|
|
171
|
+
*
|
|
172
|
+
* @note the SDK will become unusable after this operation. It will throw an error when attempting to
|
|
173
|
+
* access any chain or middleware data. If you wish to continue using the SDK, you must
|
|
174
|
+
* create a new instance by calling {@link connect}
|
|
175
|
+
*/
|
|
176
|
+
disconnect() {
|
|
177
|
+
return this.context.disconnect();
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Set the SDK's signing Account to the provided one
|
|
181
|
+
*
|
|
182
|
+
* @throws if the passed Account is not present in the Signing Manager (or there is no Signing Manager)
|
|
183
|
+
*/
|
|
184
|
+
setSigningAccount(signer) {
|
|
185
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
186
|
+
return this.context.setSigningAddress((0, conversion_1.signerToString)(signer));
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Set the SDK's Signing Manager to the provided one
|
|
191
|
+
*/
|
|
192
|
+
setSigningManager(signingManager) {
|
|
193
|
+
return this.context.setSigningManager(signingManager);
|
|
194
|
+
}
|
|
195
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
196
|
+
/* istanbul ignore next: not part of the official public API */
|
|
197
|
+
/**
|
|
198
|
+
* Polkadot client
|
|
199
|
+
*/
|
|
200
|
+
get _polkadotApi() {
|
|
201
|
+
return this.context.getPolymeshApi();
|
|
202
|
+
}
|
|
203
|
+
/* istanbul ignore next: not part of the official public API */
|
|
204
|
+
/**
|
|
205
|
+
* signing address (to manually submit transactions with the polkadot API)
|
|
206
|
+
*/
|
|
207
|
+
get _signingAddress() {
|
|
208
|
+
return this.context.getSigningAddress();
|
|
209
|
+
}
|
|
210
|
+
/* istanbul ignore next: not part of the official public API */
|
|
211
|
+
/**
|
|
212
|
+
* Middleware client
|
|
213
|
+
*/
|
|
214
|
+
get _middlewareApi() {
|
|
215
|
+
return this.context.middlewareApi;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
exports.Polymesh = Polymesh;
|
|
219
|
+
//# sourceMappingURL=Polymesh.js.map
|
package/Polymesh.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Polymesh.js","sourceRoot":"","sources":["../src/Polymesh.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,uCAAuD;AAEvD,iEAA6E;AAC7E,iDAA6C;AAC7C,6CAAyC;AACzC,6DAAiD;AACjD,uDAA4C;AAC5C,8DAAgC;AAChC,+DAA2C;AAE3C,2DAAwD;AACxD,qCAAkC;AAClC,6CAA0C;AAC1C,yCAAuE;AACvE,kDAAiD;AACjD,+CAA4C;AAC5C,mCAAsD;AACtD,mDAAoD;AACpD,+CAA8D;AAE9D,qCAAkC;AAClC,uCAAoC;AAQpC;;GAEG;AACH,MAAa,QAAQ;IA8BnB;;OAEG;IACH,YAAoB,OAAgB;QAhC5B,YAAO,GAAY,EAAa,CAAC;QAiCvC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QAEvB,IAAI,CAAC,MAAM,GAAG,IAAI,eAAM,CAAC,OAAO,CAAC,CAAC;QAClC,IAAI,CAAC,OAAO,GAAG,IAAI,iBAAO,CAAC,OAAO,CAAC,CAAC;QACpC,IAAI,CAAC,WAAW,GAAG,IAAI,yBAAW,CAAC,OAAO,CAAC,CAAC;QAC5C,IAAI,CAAC,iBAAiB,GAAG,IAAI,qCAAiB,CAAC,OAAO,CAAC,CAAC;QACxD,IAAI,CAAC,UAAU,GAAG,IAAI,uBAAU,CAAC,OAAO,CAAC,CAAC;QAC1C,IAAI,CAAC,MAAM,GAAG,IAAI,eAAM,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC;IAED;;;;;;;;OAQG;I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WithVenueIdParams } from "./api/procedures/addInstruction";
|
|
3
|
+
import { AffirmInstructionParams } from "./api/procedures/modifyInstructionAffirmation";
|
|
4
|
+
import { Context, CreateVenueParams, Instruction, Venue } from "./internal";
|
|
5
|
+
import { ProcedureMethod } from "./types";
|
|
6
|
+
/**
|
|
7
|
+
* Handles all Settlement related functionality
|
|
8
|
+
*/
|
|
9
|
+
export declare class Settlements {
|
|
10
|
+
private context;
|
|
11
|
+
/**
|
|
12
|
+
* @hidden
|
|
13
|
+
*/
|
|
14
|
+
constructor(context: Context);
|
|
15
|
+
/**
|
|
16
|
+
* Retrieve a Venue by its ID
|
|
17
|
+
*
|
|
18
|
+
* @param id - identifier number of the Venue
|
|
19
|
+
*/
|
|
20
|
+
getVenue(args: {
|
|
21
|
+
id: BigNumber;
|
|
22
|
+
}): Promise<Venue>;
|
|
23
|
+
/**
|
|
24
|
+
* Retrieve an Instruction by its ID
|
|
25
|
+
*
|
|
26
|
+
* @param id - identifier number of the Instruction
|
|
27
|
+
*/
|
|
28
|
+
getInstruction(args: {
|
|
29
|
+
id: BigNumber;
|
|
30
|
+
}): Promise<Instruction>;
|
|
31
|
+
/**
|
|
32
|
+
* Create a Venue under the ownership of the signing Identity
|
|
33
|
+
*/
|
|
34
|
+
createVenue: ProcedureMethod<CreateVenueParams, Venue>;
|
|
35
|
+
/**
|
|
36
|
+
* Create an Instruction to exchange Assets
|
|
37
|
+
*/
|
|
38
|
+
addInstruction: ProcedureMethod<AddInstructionWithVenueIdParams, Instruction[], Instruction>;
|
|
39
|
+
/**
|
|
40
|
+
* Affirm an Instruction (authorize)
|
|
41
|
+
*/
|
|
42
|
+
affirmInstruction: ProcedureMethod<AffirmInstructionParams, Instruction>;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=Settlements.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Settlements.d.ts","sourceRoot":"","sources":["../src/Settlements.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,cAAc,CAAC;AAErC,OAAO,EAAkB,+BAA+B,EAAE,wCAAwC;AAClG,OAAO,EAAE,uBAAuB,EAAE,sDAAsD;AACxF,OAAO,EAEL,OAAO,EAEP,iBAAiB,EACjB,WAAW,EAGX,KAAK,EACN,mBAAmB;AACpB,OAAO,EAAa,eAAe,EAAE,gBAAgB;AAIrD;;GAEG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,OAAO,CAAU;IAEzB;;OAEG;gBACS,OAAO,EAAE,OAAO;IA8B5B;;;;OAIG;IACU,QAAQ,CAAC,IAAI,EAAE;QAAE,EAAE,EAAE,SAAS,CAAA;KAAE,GAAG,OAAO,CAAC,KAAK,CAAC;IAgB9D;;;;OAIG;IACU,cAAc,CAAC,IAAI,EAAE;QAAE,EAAE,EAAE,SAAS,CAAA;KAAE,GAAG,OAAO,CAAC,WAAW,CAAC;IAgB1E;;OAEG;IACI,WAAW,EAAE,eAAe,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC;IAE9D;;OAEG;IACI,cAAc,EAAE,eAAe,CACpC,+BAA+B,EAC/B,WAAW,EAAE,EACb,WAAW,CACZ,CAAC;IAEF;;OAEG;IACI,iBAAiB,EAAE,eAAe,CAAC,uBAAuB,EAAE,WAAW,CAAC,CAAC;CACjF"}
|
package/Settlements.js
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
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 __rest = (this && this.__rest) || function (s, e) {
|
|
12
|
+
var t = {};
|
|
13
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
14
|
+
t[p] = s[p];
|
|
15
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
16
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
17
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
18
|
+
t[p[i]] = s[p[i]];
|
|
19
|
+
}
|
|
20
|
+
return t;
|
|
21
|
+
};
|
|
22
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
+
exports.Settlements = void 0;
|
|
24
|
+
const addInstruction_1 = require("./api/procedures/addInstruction");
|
|
25
|
+
const internal_1 = require("./internal");
|
|
26
|
+
const types_1 = require("./types");
|
|
27
|
+
const internal_2 = require("./types/internal");
|
|
28
|
+
const internal_3 = require("./utils/internal");
|
|
29
|
+
/**
|
|
30
|
+
* Handles all Settlement related functionality
|
|
31
|
+
*/
|
|
32
|
+
class Settlements {
|
|
33
|
+
/**
|
|
34
|
+
* @hidden
|
|
35
|
+
*/
|
|
36
|
+
constructor(context) {
|
|
37
|
+
this.context = context;
|
|
38
|
+
this.createVenue = (0, internal_3.createProcedureMethod)({ getProcedureAndArgs: args => [internal_1.createVenue, args] }, context);
|
|
39
|
+
this.addInstruction = (0, internal_3.createProcedureMethod)({
|
|
40
|
+
getProcedureAndArgs: args => {
|
|
41
|
+
const { venueId } = args, instruction = __rest(args, ["venueId"]);
|
|
42
|
+
return [addInstruction_1.addInstruction, { instructions: [instruction], venueId }];
|
|
43
|
+
},
|
|
44
|
+
transformer: internal_1.addInstructionTransformer,
|
|
45
|
+
}, context);
|
|
46
|
+
this.affirmInstruction = (0, internal_3.createProcedureMethod)({
|
|
47
|
+
getProcedureAndArgs: args => [
|
|
48
|
+
internal_1.modifyInstructionAffirmation,
|
|
49
|
+
{ id: args.id, operation: internal_2.InstructionAffirmationOperation.Affirm },
|
|
50
|
+
],
|
|
51
|
+
}, context);
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Retrieve a Venue by its ID
|
|
55
|
+
*
|
|
56
|
+
* @param id - identifier number of the Venue
|
|
57
|
+
*/
|
|
58
|
+
getVenue(args) {
|
|
59
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
60
|
+
const { context } = this;
|
|
61
|
+
const venue = new internal_1.Venue(args, context);
|
|
62
|
+
const venueExists = yield venue.exists();
|
|
63
|
+
if (!venueExists) {
|
|
64
|
+
throw new internal_1.PolymeshError({
|
|
65
|
+
code: types_1.ErrorCode.DataUnavailable,
|
|
66
|
+
message: "The Venue doesn't exist",
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
return venue;
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Retrieve an Instruction by its ID
|
|
74
|
+
*
|
|
75
|
+
* @param id - identifier number of the Instruction
|
|
76
|
+
*/
|
|
77
|
+
getInstruction(args) {
|
|
78
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
79
|
+
const { context } = this;
|
|
80
|
+
const instruction = new internal_1.Instruction(args, context);
|
|
81
|
+
const instructionExists = yield instruction.exists();
|
|
82
|
+
if (!instructionExists) {
|
|
83
|
+
throw new internal_1.PolymeshError({
|
|
84
|
+
code: types_1.ErrorCode.DataUnavailable,
|
|
85
|
+
message: "The Instruction doesn't exist",
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
return instruction;
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
exports.Settlements = Settlements;
|
|
93
|
+
//# sourceMappingURL=Settlements.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Settlements.js","sourceRoot":"","sources":["../src/Settlements.ts"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M,IAAI,wBAAa,CAAC;oBACtB,IAAI,EAAE,iBAAS,CAAC,eAAe;oBAC/B,OAAO,EAAE,yBAAyB;iBACnC,CAAC,CAAC;aACJ;YAED,OAAO,KAAK,CAAC;QACf,CAAC;KAAA;IAED;;;;OAIG;IACU,cAAc,CAAC,IAAuB;;YACjD,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;YAEzB,MAAM,WAAW,GAAG,IAAI,sBAAW,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;YAEnD,MAAM,iBAAiB,GAAG,MAAM,WAAW,CAAC,MAAM,EAAE,CAAC;YACrD,IAAI,CAAC,iBAAiB,EAAE;gBACtB,MAAM,IAAI,wBAAa,CAAC;oBACtB,IAAI,EAAE,iBAAS,CAAC,eAAe;oBAC/B,OAAO,EAAE,+BAA+B;iBACzC,CAAC,CAAC;aACJ;YAED,OAAO,WAAW,CAAC;QACrB,CAAC;KAAA;CAoBF;AAhGD,kCAgGC"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import BigNumber from 'bignumber.js';
|
|
2
|
+
import { Authorizations, Context, Entity, Identity } from "../../internal";
|
|
3
|
+
import { TransactionOrderByInput } from "../../middleware/types";
|
|
4
|
+
import { AccountBalance, CheckPermissionsResult, ExtrinsicData, Permissions, ResultSet, SignerType, SimplePermissions, SubCallback, SubsidyWithAllowance, TxTag, UnsubCallback } from "../../types";
|
|
5
|
+
export interface UniqueIdentifiers {
|
|
6
|
+
address: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Represents an Account in the Polymesh blockchain. Accounts can hold POLYX, control Identities and vote on proposals (among other things)
|
|
10
|
+
*/
|
|
11
|
+
export declare class Account extends Entity<UniqueIdentifiers, string> {
|
|
12
|
+
/**
|
|
13
|
+
* @hidden
|
|
14
|
+
* Check if a value is of type {@link UniqueIdentifiers}
|
|
15
|
+
*/
|
|
16
|
+
static isUniqueIdentifiers(identifier: unknown): identifier is UniqueIdentifiers;
|
|
17
|
+
/**
|
|
18
|
+
* Polymesh-specific address of the Account. Serves as an identifier
|
|
19
|
+
*/
|
|
20
|
+
address: string;
|
|
21
|
+
/**
|
|
22
|
+
* A hex representation of the cryptographic public key of the Account. This is consistent across
|
|
23
|
+
* Substrate chains, while the address depends on the chain as well.
|
|
24
|
+
*/
|
|
25
|
+
key: string;
|
|
26
|
+
authorizations: Authorizations<Account>;
|
|
27
|
+
/**
|
|
28
|
+
* @hidden
|
|
29
|
+
*/
|
|
30
|
+
constructor(identifiers: UniqueIdentifiers, context: Context);
|
|
31
|
+
/**
|
|
32
|
+
* Get the free/locked POLYX balance of the Account
|
|
33
|
+
*
|
|
34
|
+
* @note can be subscribed to
|
|
35
|
+
*/
|
|
36
|
+
getBalance(): Promise<AccountBalance>;
|
|
37
|
+
getBalance(callback: SubCallback<AccountBalance>): Promise<UnsubCallback>;
|
|
38
|
+
/**
|
|
39
|
+
* Get the subsidized balance of this Account and the subsidizer Account. If
|
|
40
|
+
* this Account isn't being subsidized, return null
|
|
41
|
+
*
|
|
42
|
+
* @note can be subscribed to
|
|
43
|
+
*/
|
|
44
|
+
getSubsidy(): Promise<SubsidyWithAllowance | null>;
|
|
45
|
+
getSubsidy(callback: SubCallback<SubsidyWithAllowance | null>): Promise<UnsubCallback>;
|
|
46
|
+
/**
|
|
47
|
+
* Retrieve the Identity associated to this Account (null if there is none)
|
|
48
|
+
*/
|
|
49
|
+
getIdentity(): Promise<Identity | null>;
|
|
50
|
+
/**
|
|
51
|
+
* Retrieve a list of transactions signed by this Account. Can be filtered using parameters
|
|
52
|
+
*
|
|
53
|
+
* @note if both `blockNumber` and `blockHash` are passed, only `blockNumber` is taken into account
|
|
54
|
+
*
|
|
55
|
+
* @param filters.tag - tag associated with the transaction
|
|
56
|
+
* @param filters.success - whether the transaction was successful or not
|
|
57
|
+
* @param filters.size - page size
|
|
58
|
+
* @param filters.start - page offset
|
|
59
|
+
*
|
|
60
|
+
* @note uses the middleware
|
|
61
|
+
*/
|
|
62
|
+
getTransactionHistory(filters?: {
|
|
63
|
+
blockNumber?: BigNumber;
|
|
64
|
+
blockHash?: string;
|
|
65
|
+
tag?: TxTag;
|
|
66
|
+
success?: boolean;
|
|
67
|
+
size?: BigNumber;
|
|
68
|
+
start?: BigNumber;
|
|
69
|
+
orderBy?: TransactionOrderByInput;
|
|
70
|
+
}): Promise<ResultSet<ExtrinsicData>>;
|
|
71
|
+
/**
|
|
72
|
+
* Check whether this Account is frozen. If frozen, it cannot perform any action until the primary Account of the Identity unfreezes all secondary Accounts
|
|
73
|
+
*/
|
|
74
|
+
isFrozen(): Promise<boolean>;
|
|
75
|
+
/**
|
|
76
|
+
* Retrieve the Permissions this Account has as a Permissioned Account for its corresponding Identity
|
|
77
|
+
*
|
|
78
|
+
* @throws if there is no Identity associated with the Account
|
|
79
|
+
*/
|
|
80
|
+
getPermissions(): Promise<Permissions>;
|
|
81
|
+
/**
|
|
82
|
+
* Check if this Account possesses certain Permissions to act on behalf of its corresponding Identity
|
|
83
|
+
*
|
|
84
|
+
* @return which permissions the Account is missing (if any) and the final result
|
|
85
|
+
*/
|
|
86
|
+
checkPermissions(permissions: SimplePermissions): Promise<CheckPermissionsResult<SignerType.Account>>;
|
|
87
|
+
/**
|
|
88
|
+
* Check if this Account possesses certain Permissions to act on behalf of its corresponding Identity
|
|
89
|
+
*
|
|
90
|
+
* @deprecated in favor of `checkPermissions`
|
|
91
|
+
*/
|
|
92
|
+
hasPermissions(permissions: SimplePermissions): Promise<boolean>;
|
|
93
|
+
/**
|
|
94
|
+
* Determine whether this Account exists on chain
|
|
95
|
+
*/
|
|
96
|
+
exists(): Promise<boolean>;
|
|
97
|
+
/**
|
|
98
|
+
* Return the Account's address
|
|
99
|
+
*/
|
|
100
|
+
toHuman(): string;
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=Account.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Account.d.ts","sourceRoot":"","sources":["../../../src/api/entities/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