@polymeshassociation/polymesh-sdk 15.0.0-alpha.15 → 15.0.0-alpha.18
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/CHANGELOG.md +2 -2
- package/README.md +109 -0
- package/api/client/Claims.d.ts.map +1 -1
- package/api/client/Claims.js +1 -1
- package/api/client/Claims.js.map +1 -1
- package/api/client/Identities.d.ts +7 -1
- package/api/client/Identities.d.ts.map +1 -1
- package/api/client/Identities.js +13 -1
- package/api/client/Identities.js.map +1 -1
- package/api/client/Network.d.ts +8 -7
- package/api/client/Network.d.ts.map +1 -1
- package/api/client/Network.js +13 -9
- package/api/client/Network.js.map +1 -1
- package/api/client/Polymesh.d.ts +38 -4
- package/api/client/Polymesh.d.ts.map +1 -1
- package/api/client/Polymesh.js +4 -3
- package/api/client/Polymesh.js.map +1 -1
- package/api/entities/Account.d.ts +4 -0
- package/api/entities/Account.d.ts.map +1 -1
- package/api/entities/Account.js +17 -6
- package/api/entities/Account.js.map +1 -1
- package/api/entities/Asset/Checkpoints/Schedules.d.ts +1 -1
- package/api/entities/Asset/Settlements.d.ts +2 -2
- package/api/entities/Asset/Settlements.js +2 -2
- package/api/entities/Asset/TransferRestrictions/ClaimCount.d.ts +61 -0
- package/api/entities/Asset/TransferRestrictions/ClaimCount.d.ts.map +1 -0
- package/api/entities/Asset/TransferRestrictions/ClaimCount.js +16 -0
- package/api/entities/Asset/TransferRestrictions/ClaimCount.js.map +1 -0
- package/api/entities/Asset/TransferRestrictions/ClaimPercentage.d.ts +52 -0
- package/api/entities/Asset/TransferRestrictions/ClaimPercentage.d.ts.map +1 -0
- package/api/entities/Asset/TransferRestrictions/ClaimPercentage.js +16 -0
- package/api/entities/Asset/TransferRestrictions/ClaimPercentage.js.map +1 -0
- package/api/entities/Asset/TransferRestrictions/Count.d.ts +41 -4
- package/api/entities/Asset/TransferRestrictions/Count.d.ts.map +1 -1
- package/api/entities/Asset/TransferRestrictions/Count.js +6 -2
- package/api/entities/Asset/TransferRestrictions/Count.js.map +1 -1
- package/api/entities/Asset/TransferRestrictions/Percentage.d.ts +17 -2
- package/api/entities/Asset/TransferRestrictions/Percentage.d.ts.map +1 -1
- package/api/entities/Asset/TransferRestrictions/Percentage.js.map +1 -1
- package/api/entities/Asset/TransferRestrictions/TransferRestrictionBase.d.ts +15 -1
- package/api/entities/Asset/TransferRestrictions/TransferRestrictionBase.d.ts.map +1 -1
- package/api/entities/Asset/TransferRestrictions/TransferRestrictionBase.js +39 -4
- package/api/entities/Asset/TransferRestrictions/TransferRestrictionBase.js.map +1 -1
- package/api/entities/Asset/TransferRestrictions/index.d.ts +4 -0
- package/api/entities/Asset/TransferRestrictions/index.d.ts.map +1 -1
- package/api/entities/Asset/TransferRestrictions/index.js +4 -0
- package/api/entities/Asset/TransferRestrictions/index.js.map +1 -1
- package/api/entities/DividendDistribution/index.d.ts.map +1 -1
- package/api/entities/DividendDistribution/index.js +2 -2
- package/api/entities/DividendDistribution/index.js.map +1 -1
- package/api/entities/Identity/AssetPermissions.d.ts +3 -2
- package/api/entities/Identity/AssetPermissions.d.ts.map +1 -1
- package/api/entities/Identity/AssetPermissions.js.map +1 -1
- package/api/entities/Identity/index.d.ts +5 -4
- package/api/entities/Identity/index.d.ts.map +1 -1
- package/api/entities/Identity/index.js +32 -23
- package/api/entities/Identity/index.js.map +1 -1
- package/api/entities/Instruction/index.js +3 -2
- package/api/entities/Instruction/index.js.map +1 -1
- package/api/entities/Venue/index.d.ts +5 -1
- package/api/entities/Venue/index.d.ts.map +1 -1
- package/api/entities/Venue/index.js +8 -1
- package/api/entities/Venue/index.js.map +1 -1
- package/api/procedures/addAssetRequirement.d.ts +2 -2
- package/api/procedures/addAssetRequirement.d.ts.map +1 -1
- package/api/procedures/addAssetRequirement.js +3 -3
- package/api/procedures/addAssetRequirement.js.map +1 -1
- package/api/procedures/addAssetStat.d.ts +16 -0
- package/api/procedures/addAssetStat.d.ts.map +1 -0
- package/api/procedures/addAssetStat.js +91 -0
- package/api/procedures/addAssetStat.js.map +1 -0
- package/api/procedures/addInstruction.d.ts +4 -4
- package/api/procedures/addInstruction.d.ts.map +1 -1
- package/api/procedures/addInstruction.js +4 -8
- package/api/procedures/addInstruction.js.map +1 -1
- package/api/procedures/addInvestorUniquenessClaim.d.ts +2 -2
- package/api/procedures/addInvestorUniquenessClaim.d.ts.map +1 -1
- package/api/procedures/addInvestorUniquenessClaim.js +6 -4
- package/api/procedures/addInvestorUniquenessClaim.js.map +1 -1
- package/api/procedures/addTransferRestriction.d.ts +6 -17
- package/api/procedures/addTransferRestriction.d.ts.map +1 -1
- package/api/procedures/addTransferRestriction.js +43 -71
- package/api/procedures/addTransferRestriction.js.map +1 -1
- package/api/procedures/claimClassicTicker.d.ts +2 -1
- package/api/procedures/claimClassicTicker.d.ts.map +1 -1
- package/api/procedures/claimClassicTicker.js +3 -3
- package/api/procedures/claimClassicTicker.js.map +1 -1
- package/api/procedures/claimDividends.d.ts +2 -1
- package/api/procedures/claimDividends.d.ts.map +1 -1
- package/api/procedures/claimDividends.js +3 -2
- package/api/procedures/claimDividends.js.map +1 -1
- package/api/procedures/closeOffering.d.ts +2 -2
- package/api/procedures/closeOffering.d.ts.map +1 -1
- package/api/procedures/closeOffering.js +3 -2
- package/api/procedures/closeOffering.js.map +1 -1
- package/api/procedures/configureDividendDistribution.d.ts +3 -3
- package/api/procedures/configureDividendDistribution.d.ts.map +1 -1
- package/api/procedures/configureDividendDistribution.js +3 -4
- package/api/procedures/configureDividendDistribution.js.map +1 -1
- package/api/procedures/consumeAddMultiSigSignerAuthorization.d.ts +2 -2
- package/api/procedures/consumeAddMultiSigSignerAuthorization.d.ts.map +1 -1
- package/api/procedures/consumeAddMultiSigSignerAuthorization.js +3 -4
- package/api/procedures/consumeAddMultiSigSignerAuthorization.js.map +1 -1
- package/api/procedures/consumeAuthorizationRequests.d.ts +2 -2
- package/api/procedures/consumeAuthorizationRequests.d.ts.map +1 -1
- package/api/procedures/consumeAuthorizationRequests.js +8 -4
- package/api/procedures/consumeAuthorizationRequests.js.map +1 -1
- package/api/procedures/consumeJoinOrRotateAuthorization.d.ts +2 -2
- package/api/procedures/consumeJoinOrRotateAuthorization.d.ts.map +1 -1
- package/api/procedures/consumeJoinOrRotateAuthorization.js +8 -7
- package/api/procedures/consumeJoinOrRotateAuthorization.js.map +1 -1
- package/api/procedures/controllerTransfer.d.ts +2 -2
- package/api/procedures/controllerTransfer.d.ts.map +1 -1
- package/api/procedures/controllerTransfer.js +3 -2
- package/api/procedures/controllerTransfer.js.map +1 -1
- package/api/procedures/createAsset.d.ts +3 -3
- package/api/procedures/createAsset.d.ts.map +1 -1
- package/api/procedures/createAsset.js +50 -45
- package/api/procedures/createAsset.js.map +1 -1
- package/api/procedures/createCheckpoint.d.ts +3 -3
- package/api/procedures/createCheckpoint.d.ts.map +1 -1
- package/api/procedures/createCheckpoint.js +3 -4
- package/api/procedures/createCheckpoint.js.map +1 -1
- package/api/procedures/createCheckpointSchedule.d.ts +3 -3
- package/api/procedures/createCheckpointSchedule.d.ts.map +1 -1
- package/api/procedures/createCheckpointSchedule.js +3 -4
- package/api/procedures/createCheckpointSchedule.js.map +1 -1
- package/api/procedures/createGroup.d.ts +3 -3
- package/api/procedures/createGroup.d.ts.map +1 -1
- package/api/procedures/createGroup.js +3 -4
- package/api/procedures/createGroup.js.map +1 -1
- package/api/procedures/createPortfolios.d.ts +22 -0
- package/api/procedures/createPortfolios.d.ts.map +1 -0
- package/api/procedures/createPortfolios.js +77 -0
- package/api/procedures/createPortfolios.js.map +1 -0
- package/api/procedures/createTransactionBatch.d.ts +25 -0
- package/api/procedures/createTransactionBatch.d.ts.map +1 -0
- package/api/procedures/createTransactionBatch.js +118 -0
- package/api/procedures/createTransactionBatch.js.map +1 -0
- package/api/procedures/createVenue.d.ts +3 -2
- package/api/procedures/createVenue.d.ts.map +1 -1
- package/api/procedures/createVenue.js +3 -4
- package/api/procedures/createVenue.js.map +1 -1
- package/api/procedures/deletePortfolio.d.ts +2 -2
- package/api/procedures/deletePortfolio.d.ts.map +1 -1
- package/api/procedures/deletePortfolio.js +3 -2
- package/api/procedures/deletePortfolio.js.map +1 -1
- package/api/procedures/investInOffering.d.ts +2 -2
- package/api/procedures/investInOffering.d.ts.map +1 -1
- package/api/procedures/investInOffering.js +3 -2
- package/api/procedures/investInOffering.js.map +1 -1
- package/api/procedures/inviteAccount.d.ts +3 -2
- package/api/procedures/inviteAccount.d.ts.map +1 -1
- package/api/procedures/inviteAccount.js +3 -4
- package/api/procedures/inviteAccount.js.map +1 -1
- package/api/procedures/inviteExternalAgent.d.ts +3 -3
- package/api/procedures/inviteExternalAgent.d.ts.map +1 -1
- package/api/procedures/inviteExternalAgent.js +6 -10
- package/api/procedures/inviteExternalAgent.js.map +1 -1
- package/api/procedures/issueTokens.d.ts +2 -2
- package/api/procedures/issueTokens.d.ts.map +1 -1
- package/api/procedures/issueTokens.js +3 -3
- package/api/procedures/issueTokens.js.map +1 -1
- package/api/procedures/launchOffering.d.ts +3 -3
- package/api/procedures/launchOffering.d.ts.map +1 -1
- package/api/procedures/launchOffering.js +3 -4
- package/api/procedures/launchOffering.js.map +1 -1
- package/api/procedures/leaveIdentity.d.ts +2 -1
- package/api/procedures/leaveIdentity.d.ts.map +1 -1
- package/api/procedures/leaveIdentity.js +7 -3
- package/api/procedures/leaveIdentity.js.map +1 -1
- package/api/procedures/linkCaDocs.d.ts +2 -2
- package/api/procedures/linkCaDocs.d.ts.map +1 -1
- package/api/procedures/linkCaDocs.js +3 -2
- package/api/procedures/linkCaDocs.js.map +1 -1
- package/api/procedures/modifyAllowance.d.ts +2 -2
- package/api/procedures/modifyAllowance.d.ts.map +1 -1
- package/api/procedures/modifyAllowance.js +3 -2
- package/api/procedures/modifyAllowance.js.map +1 -1
- package/api/procedures/modifyAsset.d.ts +2 -2
- package/api/procedures/modifyAsset.d.ts.map +1 -1
- package/api/procedures/modifyAsset.js +1 -2
- package/api/procedures/modifyAsset.js.map +1 -1
- package/api/procedures/modifyAssetTrustedClaimIssuers.d.ts +2 -2
- package/api/procedures/modifyAssetTrustedClaimIssuers.d.ts.map +1 -1
- package/api/procedures/modifyAssetTrustedClaimIssuers.js +1 -2
- package/api/procedures/modifyAssetTrustedClaimIssuers.js.map +1 -1
- package/api/procedures/modifyCaCheckpoint.d.ts +2 -2
- package/api/procedures/modifyCaCheckpoint.d.ts.map +1 -1
- package/api/procedures/modifyCaCheckpoint.js +19 -3
- package/api/procedures/modifyCaCheckpoint.js.map +1 -1
- package/api/procedures/modifyCaDefaultConfig.d.ts +2 -2
- package/api/procedures/modifyCaDefaultConfig.d.ts.map +1 -1
- package/api/procedures/modifyCaDefaultConfig.js +1 -1
- package/api/procedures/modifyCaDefaultConfig.js.map +1 -1
- package/api/procedures/modifyClaims.d.ts +2 -2
- package/api/procedures/modifyClaims.d.ts.map +1 -1
- package/api/procedures/modifyClaims.js +2 -3
- package/api/procedures/modifyClaims.js.map +1 -1
- package/api/procedures/modifyComplianceRequirement.d.ts +2 -2
- package/api/procedures/modifyComplianceRequirement.d.ts.map +1 -1
- package/api/procedures/modifyComplianceRequirement.js +3 -2
- package/api/procedures/modifyComplianceRequirement.js.map +1 -1
- package/api/procedures/modifyCorporateActionsAgent.d.ts +2 -2
- package/api/procedures/modifyCorporateActionsAgent.d.ts.map +1 -1
- package/api/procedures/modifyCorporateActionsAgent.js +3 -2
- package/api/procedures/modifyCorporateActionsAgent.js.map +1 -1
- package/api/procedures/modifyInstructionAffirmation.d.ts +2 -2
- package/api/procedures/modifyInstructionAffirmation.d.ts.map +1 -1
- package/api/procedures/modifyInstructionAffirmation.js +9 -10
- package/api/procedures/modifyInstructionAffirmation.js.map +1 -1
- package/api/procedures/modifyOfferingTimes.d.ts +2 -2
- package/api/procedures/modifyOfferingTimes.d.ts.map +1 -1
- package/api/procedures/modifyOfferingTimes.js +3 -2
- package/api/procedures/modifyOfferingTimes.js.map +1 -1
- package/api/procedures/modifyPrimaryIssuanceAgent.d.ts +2 -2
- package/api/procedures/modifyPrimaryIssuanceAgent.d.ts.map +1 -1
- package/api/procedures/modifyPrimaryIssuanceAgent.js +3 -2
- package/api/procedures/modifyPrimaryIssuanceAgent.js.map +1 -1
- package/api/procedures/modifySignerPermissions.d.ts +2 -2
- package/api/procedures/modifySignerPermissions.d.ts.map +1 -1
- package/api/procedures/modifySignerPermissions.js +7 -4
- package/api/procedures/modifySignerPermissions.js.map +1 -1
- package/api/procedures/modifyVenue.d.ts +2 -2
- package/api/procedures/modifyVenue.d.ts.map +1 -1
- package/api/procedures/modifyVenue.js +1 -1
- package/api/procedures/modifyVenue.js.map +1 -1
- package/api/procedures/moveFunds.d.ts +2 -2
- package/api/procedures/moveFunds.d.ts.map +1 -1
- package/api/procedures/moveFunds.js +3 -2
- package/api/procedures/moveFunds.js.map +1 -1
- package/api/procedures/payDividends.d.ts +2 -2
- package/api/procedures/payDividends.d.ts.map +1 -1
- package/api/procedures/payDividends.js +3 -2
- package/api/procedures/payDividends.js.map +1 -1
- package/api/procedures/quitCustody.d.ts +2 -2
- package/api/procedures/quitCustody.d.ts.map +1 -1
- package/api/procedures/quitCustody.js +3 -2
- package/api/procedures/quitCustody.js.map +1 -1
- package/api/procedures/quitSubsidy.d.ts +2 -2
- package/api/procedures/quitSubsidy.d.ts.map +1 -1
- package/api/procedures/quitSubsidy.js +3 -2
- package/api/procedures/quitSubsidy.js.map +1 -1
- package/api/procedures/reclaimDividendDistributionFunds.d.ts +2 -2
- package/api/procedures/reclaimDividendDistributionFunds.d.ts.map +1 -1
- package/api/procedures/reclaimDividendDistributionFunds.js +3 -2
- package/api/procedures/reclaimDividendDistributionFunds.js.map +1 -1
- package/api/procedures/redeemTokens.d.ts +2 -2
- package/api/procedures/redeemTokens.d.ts.map +1 -1
- package/api/procedures/redeemTokens.js +3 -2
- package/api/procedures/redeemTokens.js.map +1 -1
- package/api/procedures/registerIdentity.d.ts +3 -2
- package/api/procedures/registerIdentity.d.ts.map +1 -1
- package/api/procedures/registerIdentity.js +3 -4
- package/api/procedures/registerIdentity.js.map +1 -1
- package/api/procedures/removeAssetRequirement.d.ts +2 -2
- package/api/procedures/removeAssetRequirement.d.ts.map +1 -1
- package/api/procedures/removeAssetRequirement.js +4 -4
- package/api/procedures/removeAssetRequirement.js.map +1 -1
- package/api/procedures/removeAssetStat.d.ts +16 -0
- package/api/procedures/removeAssetStat.d.ts.map +1 -0
- package/api/procedures/removeAssetStat.js +89 -0
- package/api/procedures/removeAssetStat.js.map +1 -0
- package/api/procedures/removeCheckpointSchedule.d.ts +2 -2
- package/api/procedures/removeCheckpointSchedule.d.ts.map +1 -1
- package/api/procedures/removeCheckpointSchedule.js +3 -2
- package/api/procedures/removeCheckpointSchedule.js.map +1 -1
- package/api/procedures/removeCorporateAction.d.ts +2 -2
- package/api/procedures/removeCorporateAction.d.ts.map +1 -1
- package/api/procedures/removeCorporateAction.js +3 -2
- package/api/procedures/removeCorporateAction.js.map +1 -1
- package/api/procedures/removeCorporateActionsAgent.d.ts +2 -2
- package/api/procedures/removeCorporateActionsAgent.d.ts.map +1 -1
- package/api/procedures/removeCorporateActionsAgent.js +3 -2
- package/api/procedures/removeCorporateActionsAgent.js.map +1 -1
- package/api/procedures/removeExternalAgent.d.ts +2 -2
- package/api/procedures/removeExternalAgent.d.ts.map +1 -1
- package/api/procedures/removeExternalAgent.js +3 -2
- package/api/procedures/removeExternalAgent.js.map +1 -1
- package/api/procedures/removePrimaryIssuanceAgent.d.ts +2 -2
- package/api/procedures/removePrimaryIssuanceAgent.d.ts.map +1 -1
- package/api/procedures/removePrimaryIssuanceAgent.js +3 -2
- package/api/procedures/removePrimaryIssuanceAgent.js.map +1 -1
- package/api/procedures/removeSecondaryAccounts.d.ts +2 -1
- package/api/procedures/removeSecondaryAccounts.d.ts.map +1 -1
- package/api/procedures/removeSecondaryAccounts.js +6 -5
- package/api/procedures/removeSecondaryAccounts.js.map +1 -1
- package/api/procedures/renamePortfolio.d.ts +2 -2
- package/api/procedures/renamePortfolio.d.ts.map +1 -1
- package/api/procedures/renamePortfolio.js +4 -4
- package/api/procedures/renamePortfolio.js.map +1 -1
- package/api/procedures/rescheduleInstruction.d.ts +2 -1
- package/api/procedures/rescheduleInstruction.d.ts.map +1 -1
- package/api/procedures/rescheduleInstruction.js +3 -3
- package/api/procedures/rescheduleInstruction.js.map +1 -1
- package/api/procedures/reserveTicker.d.ts +3 -3
- package/api/procedures/reserveTicker.d.ts.map +1 -1
- package/api/procedures/reserveTicker.js +3 -4
- package/api/procedures/reserveTicker.js.map +1 -1
- package/api/procedures/setAssetDocuments.d.ts +2 -2
- package/api/procedures/setAssetDocuments.d.ts.map +1 -1
- package/api/procedures/setAssetDocuments.js +1 -2
- package/api/procedures/setAssetDocuments.js.map +1 -1
- package/api/procedures/setAssetRequirements.d.ts +2 -2
- package/api/procedures/setAssetRequirements.d.ts.map +1 -1
- package/api/procedures/setAssetRequirements.js +9 -10
- package/api/procedures/setAssetRequirements.js.map +1 -1
- package/api/procedures/setCustodian.d.ts +3 -3
- package/api/procedures/setCustodian.d.ts.map +1 -1
- package/api/procedures/setCustodian.js +3 -6
- package/api/procedures/setCustodian.js.map +1 -1
- package/api/procedures/setGroupPermissions.d.ts +2 -2
- package/api/procedures/setGroupPermissions.d.ts.map +1 -1
- package/api/procedures/setGroupPermissions.js +3 -2
- package/api/procedures/setGroupPermissions.js.map +1 -1
- package/api/procedures/setPermissionGroup.d.ts +2 -2
- package/api/procedures/setPermissionGroup.d.ts.map +1 -1
- package/api/procedures/setPermissionGroup.js +6 -7
- package/api/procedures/setPermissionGroup.js.map +1 -1
- package/api/procedures/setTransferRestrictions.d.ts +3 -10
- package/api/procedures/setTransferRestrictions.d.ts.map +1 -1
- package/api/procedures/setTransferRestrictions.js +54 -65
- package/api/procedures/setTransferRestrictions.js.map +1 -1
- package/api/procedures/subsidizeAccount.d.ts +3 -2
- package/api/procedures/subsidizeAccount.d.ts.map +1 -1
- package/api/procedures/subsidizeAccount.js +3 -4
- package/api/procedures/subsidizeAccount.js.map +1 -1
- package/api/procedures/toggleFreezeOffering.d.ts +2 -2
- package/api/procedures/toggleFreezeOffering.d.ts.map +1 -1
- package/api/procedures/toggleFreezeOffering.js +17 -18
- package/api/procedures/toggleFreezeOffering.js.map +1 -1
- package/api/procedures/toggleFreezeSecondaryAccounts.d.ts +2 -2
- package/api/procedures/toggleFreezeSecondaryAccounts.d.ts.map +1 -1
- package/api/procedures/toggleFreezeSecondaryAccounts.js +7 -9
- package/api/procedures/toggleFreezeSecondaryAccounts.js.map +1 -1
- package/api/procedures/toggleFreezeTransfers.d.ts +2 -2
- package/api/procedures/toggleFreezeTransfers.d.ts.map +1 -1
- package/api/procedures/toggleFreezeTransfers.js +12 -13
- package/api/procedures/toggleFreezeTransfers.js.map +1 -1
- package/api/procedures/togglePauseRequirements.d.ts +2 -2
- package/api/procedures/togglePauseRequirements.d.ts.map +1 -1
- package/api/procedures/togglePauseRequirements.js +3 -3
- package/api/procedures/togglePauseRequirements.js.map +1 -1
- package/api/procedures/transferAssetOwnership.d.ts +3 -3
- package/api/procedures/transferAssetOwnership.d.ts.map +1 -1
- package/api/procedures/transferAssetOwnership.js +3 -4
- package/api/procedures/transferAssetOwnership.js.map +1 -1
- package/api/procedures/transferPolyx.d.ts +2 -2
- package/api/procedures/transferPolyx.d.ts.map +1 -1
- package/api/procedures/transferPolyx.js +8 -8
- package/api/procedures/transferPolyx.js.map +1 -1
- package/api/procedures/transferTickerOwnership.d.ts +3 -3
- package/api/procedures/transferTickerOwnership.d.ts.map +1 -1
- package/api/procedures/transferTickerOwnership.js +3 -4
- package/api/procedures/transferTickerOwnership.js.map +1 -1
- package/api/procedures/types.d.ts +105 -9
- package/api/procedures/types.d.ts.map +1 -1
- package/api/procedures/types.js +25 -1
- package/api/procedures/types.js.map +1 -1
- package/api/procedures/utils.d.ts +1 -2
- package/api/procedures/utils.d.ts.map +1 -1
- package/api/procedures/utils.js +4 -15
- package/api/procedures/utils.js.map +1 -1
- package/api/procedures/waivePermissions.d.ts +2 -2
- package/api/procedures/waivePermissions.d.ts.map +1 -1
- package/api/procedures/waivePermissions.js +3 -2
- package/api/procedures/waivePermissions.js.map +1 -1
- package/base/Context.d.ts +16 -3
- package/base/Context.d.ts.map +1 -1
- package/base/Context.js +38 -4
- package/base/Context.js.map +1 -1
- package/base/PolymeshError.js +1 -1
- package/base/PolymeshError.js.map +1 -1
- package/base/PolymeshTransaction.d.ts +20 -19
- package/base/PolymeshTransaction.d.ts.map +1 -1
- package/base/PolymeshTransaction.js +19 -12
- package/base/PolymeshTransaction.js.map +1 -1
- package/base/PolymeshTransactionBase.d.ts +70 -35
- package/base/PolymeshTransactionBase.d.ts.map +1 -1
- package/base/PolymeshTransactionBase.js +237 -68
- package/base/PolymeshTransactionBase.js.map +1 -1
- package/base/PolymeshTransactionBatch.d.ts +46 -15
- package/base/PolymeshTransactionBatch.d.ts.map +1 -1
- package/base/PolymeshTransactionBatch.js +107 -18
- package/base/PolymeshTransactionBatch.js.map +1 -1
- package/base/Procedure.d.ts +10 -35
- package/base/Procedure.d.ts.map +1 -1
- package/base/Procedure.js +28 -93
- package/base/Procedure.js.map +1 -1
- package/base/types.d.ts +2 -4
- package/base/types.d.ts.map +1 -1
- package/generated/utils.js +1 -1
- package/generated/utils.js.map +1 -1
- package/internal.d.ts +7 -6
- package/internal.d.ts.map +1 -1
- package/internal.js +11 -11
- package/internal.js.map +1 -1
- package/middleware/queriesV2.d.ts +1 -2
- package/middleware/queriesV2.d.ts.map +1 -1
- package/middleware/queriesV2.js +25 -51
- package/middleware/queriesV2.js.map +1 -1
- package/middleware/typesV2.d.ts +1018 -46
- package/middleware/typesV2.d.ts.map +1 -1
- package/middleware/typesV2.js +686 -2
- package/middleware/typesV2.js.map +1 -1
- package/npm-package/polymeshassociation-polymesh-sdk-15.0.0-alpha.18.tgz +0 -0
- package/package.json +3 -3
- package/types/index.d.ts +185 -66
- package/types/index.d.ts.map +1 -1
- package/types/index.js +17 -27
- package/types/index.js.map +1 -1
- package/types/internal.d.ts +71 -102
- package/types/internal.d.ts.map +1 -1
- package/types/internal.js +11 -1
- package/types/internal.js.map +1 -1
- package/utils/constants.d.ts +2 -2
- package/utils/constants.js +2 -2
- package/utils/conversion.d.ts +73 -13
- package/utils/conversion.d.ts.map +1 -1
- package/utils/conversion.js +336 -20
- package/utils/conversion.js.map +1 -1
- package/utils/internal.d.ts +80 -18
- package/utils/internal.d.ts.map +1 -1
- package/utils/internal.js +344 -43
- package/utils/internal.js.map +1 -1
- package/utils/typeguards.d.ts +2 -2
- package/utils/typeguards.d.ts.map +1 -1
- package/utils/typeguards.js.map +1 -1
- package/api/procedures/createPortfolio.d.ts +0 -21
- package/api/procedures/createPortfolio.d.ts.map +0 -1
- package/api/procedures/createPortfolio.js +0 -64
- package/api/procedures/createPortfolio.js.map +0 -1
- package/api/procedures/modifyDistributionCheckpoint.d.ts +0 -25
- package/api/procedures/modifyDistributionCheckpoint.d.ts.map +0 -1
- package/api/procedures/modifyDistributionCheckpoint.js +0 -60
- package/api/procedures/modifyDistributionCheckpoint.js.map +0 -1
- package/base/PostTransactionValue.d.ts +0 -45
- package/base/PostTransactionValue.d.ts.map +0 -1
- package/base/PostTransactionValue.js +0 -108
- package/base/PostTransactionValue.js.map +0 -1
- package/base/TransactionQueue.d.ts +0 -142
- package/base/TransactionQueue.d.ts.map +0 -1
- package/base/TransactionQueue.js +0 -420
- package/base/TransactionQueue.js.map +0 -1
- package/npm-package/polymeshassociation-polymesh-sdk-15.0.0-alpha.15.tgz +0 -0
|
@@ -41,11 +41,11 @@ function prepareAddAssetRequirement(args) {
|
|
|
41
41
|
// check that the new requirement won't cause the current ones to exceed the max complexity
|
|
42
42
|
(0, utils_1.assertRequirementsNotTooComplex)([...(0, lodash_1.flatten)(currentConditions), ...conditions], new bignumber_js_1.default(defaultTrustedClaimIssuers.length), context);
|
|
43
43
|
const { senderConditions, receiverConditions } = (0, conversion_1.requirementToComplianceRequirement)({ conditions, id: new bignumber_js_1.default(1) }, context);
|
|
44
|
-
|
|
44
|
+
return {
|
|
45
45
|
transaction: tx.complianceManager.addComplianceRequirement,
|
|
46
46
|
args: [rawTicker, senderConditions, receiverConditions],
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
resolver: asset,
|
|
48
|
+
};
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
51
|
exports.prepareAddAssetRequirement = prepareAddAssetRequirement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addAssetRequirement.js","sourceRoot":"","sources":["../../../src/api/procedures/addAssetRequirement.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gEAAqC;AACrC,mCAAsC;AAEtC,mCAAyE;AACzE,6CAA6D;AAC7D,uCAAuE;AAEvE,uDAAwF;AACxF,mDAAuE;AASvE;;GAEG;AACH,SAAsB,0BAA0B,CAE9C,IAAY;;
|
|
1
|
+
{"version":3,"file":"addAssetRequirement.js","sourceRoot":"","sources":["../../../src/api/procedures/addAssetRequirement.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gEAAqC;AACrC,mCAAsC;AAEtC,mCAAyE;AACzE,6CAA6D;AAC7D,uCAAuE;AAEvE,uDAAwF;AACxF,mDAAuE;AASvE;;GAEG;AACH,SAAsB,0BAA0B,CAE9C,IAAY;;QAIZ,MAAM,EACJ,OAAO,EAAE,EACP,WAAW,EAAE,EAAE,EAAE,EAAE,GACpB,EACD,OAAO,GACR,GAAG,IAAI,CAAC;QACT,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;QAEpC,MAAM,SAAS,GAAG,IAAA,2BAAc,EAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAElD,MAAM,KAAK,GAAG,IAAI,gBAAK,CAAC,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;QAE7C,MAAM,EAAE,YAAY,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,GACrE,MAAM,KAAK,CAAC,UAAU,CAAC,YAAY,CAA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AWC;AAED;;GAEG;AACI,MAAM,mBAAmB,GAAG,GAA6B,EAAE,CAChE,IAAI,oBAAS,CAAC,0BAA0B,EAAE,gBAAgB,CAAC,CAAC;AADjD,QAAA,mBAAmB,uBAC8B"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Procedure } from "../../internal";
|
|
2
|
+
import { AddAssetStatParams } from "../../types";
|
|
3
|
+
import { BatchTransactionSpec, ProcedureAuthorization } from "../../types/internal";
|
|
4
|
+
/**
|
|
5
|
+
* @hidden
|
|
6
|
+
*/
|
|
7
|
+
export declare function prepareAddAssetStat(this: Procedure<AddAssetStatParams, void>, args: AddAssetStatParams): Promise<BatchTransactionSpec<void, unknown[][]>>;
|
|
8
|
+
/**
|
|
9
|
+
* @hidden
|
|
10
|
+
*/
|
|
11
|
+
export declare function getAuthorization(this: Procedure<AddAssetStatParams, void>, { type, ticker }: AddAssetStatParams): ProcedureAuthorization;
|
|
12
|
+
/**
|
|
13
|
+
* @hidden
|
|
14
|
+
*/
|
|
15
|
+
export declare const addAssetStat: () => Procedure<AddAssetStatParams, void>;
|
|
16
|
+
//# sourceMappingURL=addAssetStat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addAssetStat.d.ts","sourceRoot":"","sources":["../../../src/api/procedures/addAssetStat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,SAAS,EAAE,uBAAmB;AAC7D,OAAO,EAAE,kBAAkB,EAA+B,oBAAgB;AAC1E,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAoB,6BAAyB;AAYlG;;GAEG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,SAAS,CAAC,kBAAkB,EAAE,IAAI,CAAC,EACzC,IAAI,EAAE,kBAAkB,GACvB,OAAO,CAAC,oBAAoB,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC,CAgElD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,SAAS,CAAC,kBAAkB,EAAE,IAAI,CAAC,EACzC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,kBAAkB,GACnC,sBAAsB,CAaxB;AAED;;GAEG;AACH,eAAO,MAAM,YAAY,QAAO,UAAU,kBAAkB,EAAE,IAAI,CACZ,CAAC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.addAssetStat = exports.getAuthorization = exports.prepareAddAssetStat = void 0;
|
|
13
|
+
const internal_1 = require("../../internal");
|
|
14
|
+
const types_1 = require("../../types");
|
|
15
|
+
const internal_2 = require("../../types/internal");
|
|
16
|
+
const conversion_1 = require("../../utils/conversion");
|
|
17
|
+
const internal_3 = require("../../utils/internal");
|
|
18
|
+
/**
|
|
19
|
+
* @hidden
|
|
20
|
+
*/
|
|
21
|
+
function prepareAddAssetStat(args) {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
const { context: { polymeshApi: { query: { statistics: statisticsQuery }, tx: { statistics }, }, }, context, } = this;
|
|
24
|
+
const { ticker, type } = args;
|
|
25
|
+
const tickerKey = (0, conversion_1.stringToTickerKey)(ticker, context);
|
|
26
|
+
const currentStats = yield statisticsQuery.activeAssetStats(tickerKey);
|
|
27
|
+
const needStat = ![...currentStats].find(s => (0, internal_3.compareStatsToInput)(s, args));
|
|
28
|
+
if (!needStat) {
|
|
29
|
+
throw new internal_1.PolymeshError({
|
|
30
|
+
code: types_1.ErrorCode.NoDataChange,
|
|
31
|
+
message: 'Stat is already enabled',
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
const op = type === types_1.StatType.Count || type === types_1.StatType.ScopedCount
|
|
35
|
+
? (0, conversion_1.statisticsOpTypeToStatOpType)(internal_2.StatisticsOpType.Count, context)
|
|
36
|
+
: (0, conversion_1.statisticsOpTypeToStatOpType)(internal_2.StatisticsOpType.Balance, context);
|
|
37
|
+
const transactions = [];
|
|
38
|
+
let rawClaimIssuer;
|
|
39
|
+
if (type === types_1.StatType.ScopedCount || type === types_1.StatType.ScopedPercentage) {
|
|
40
|
+
rawClaimIssuer = (0, conversion_1.claimIssuerToMeshClaimIssuer)(args, context);
|
|
41
|
+
}
|
|
42
|
+
const newStat = (0, conversion_1.statisticsOpTypeToStatType)({ op, claimIssuer: rawClaimIssuer }, context);
|
|
43
|
+
const newStats = (0, conversion_1.statisticStatTypesToBtreeStatType)([...currentStats, newStat], context);
|
|
44
|
+
transactions.push((0, internal_3.checkTxType)({
|
|
45
|
+
transaction: statistics.setActiveAssetStats,
|
|
46
|
+
args: [tickerKey, newStats],
|
|
47
|
+
}));
|
|
48
|
+
// Count stats need the user to provide the initial value for the counter as computing may cause prohibitive gas charges on the chain
|
|
49
|
+
// We require users to provide initial stats in this method so they won't miss setting initial values. It could be its own step
|
|
50
|
+
if (args.type === types_1.StatType.Count) {
|
|
51
|
+
const statValue = (0, conversion_1.countStatInputToStatUpdates)(args, context);
|
|
52
|
+
transactions.push((0, internal_3.checkTxType)({
|
|
53
|
+
transaction: statistics.batchUpdateAssetStats,
|
|
54
|
+
args: [tickerKey, newStat, statValue],
|
|
55
|
+
}));
|
|
56
|
+
}
|
|
57
|
+
else if (args.type === types_1.StatType.ScopedCount) {
|
|
58
|
+
const statValue = (0, conversion_1.claimCountStatInputToStatUpdates)(args, context);
|
|
59
|
+
transactions.push((0, internal_3.checkTxType)({
|
|
60
|
+
transaction: statistics.batchUpdateAssetStats,
|
|
61
|
+
args: [tickerKey, newStat, statValue],
|
|
62
|
+
}));
|
|
63
|
+
}
|
|
64
|
+
return { transactions, resolver: undefined };
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
exports.prepareAddAssetStat = prepareAddAssetStat;
|
|
68
|
+
/**
|
|
69
|
+
* @hidden
|
|
70
|
+
*/
|
|
71
|
+
function getAuthorization({ type, ticker }) {
|
|
72
|
+
const transactions = [types_1.TxTags.statistics.SetActiveAssetStats];
|
|
73
|
+
if (type === types_1.StatType.Count || type === types_1.StatType.ScopedCount) {
|
|
74
|
+
transactions.push(types_1.TxTags.statistics.BatchUpdateAssetStats);
|
|
75
|
+
}
|
|
76
|
+
const asset = new internal_1.Asset({ ticker }, this.context);
|
|
77
|
+
return {
|
|
78
|
+
permissions: {
|
|
79
|
+
transactions,
|
|
80
|
+
assets: [asset],
|
|
81
|
+
portfolios: [],
|
|
82
|
+
},
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
exports.getAuthorization = getAuthorization;
|
|
86
|
+
/**
|
|
87
|
+
* @hidden
|
|
88
|
+
*/
|
|
89
|
+
const addAssetStat = () => new internal_1.Procedure(prepareAddAssetStat, getAuthorization);
|
|
90
|
+
exports.addAssetStat = addAssetStat;
|
|
91
|
+
//# sourceMappingURL=addAssetStat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addAssetStat.js","sourceRoot":"","sources":["../../../src/api/procedures/addAssetStat.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA6D;AAC7D,uCAA0E;AAC1E,mDAAkG;AAClG,uDAQ4B;AAC5B,mDAAoE;AAEpE;;GAEG;AACH,SAAsB,mBAAmB,CAEvC,IAAwB;;QAExB,MAAM,EACJ,OAAO,EAAE,EACP,WAAW,EAAE,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AK,gBAAQ,CAAC,WAAW,EAAE;QAC5D,YAAY,CAAC,IAAI,CAAC,cAAM,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAAC;KAC5D;IACD,MAAM,KAAK,GAAG,IAAI,gBAAK,CAAC,EAAE,MAAM,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IAClD,OAAO;QACL,WAAW,EAAE;YACX,YAAY;YACZ,MAAM,EAAE,CAAC,KAAK,CAAC;YACf,UAAU,EAAE,EAAE;SACf;KACF,CAAC;AACJ,CAAC;AAhBD,4CAgBC;AAED;;GAEG;AACI,MAAM,YAAY,GAAG,GAAwC,EAAE,CACpE,IAAI,oBAAS,CAAC,mBAAmB,EAAE,gBAAgB,CAAC,CAAC;AAD1C,QAAA,YAAY,gBAC8B"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ISubmittableResult } from '@polkadot/types/types';
|
|
2
2
|
import BigNumber from 'bignumber.js';
|
|
3
|
-
import { Context, DefaultPortfolio, Instruction, NumberedPortfolio,
|
|
3
|
+
import { Context, DefaultPortfolio, Instruction, NumberedPortfolio, Procedure } from "../../internal";
|
|
4
4
|
import { AddInstructionsParams } from "../../types";
|
|
5
|
-
import { ProcedureAuthorization } from "../../types/internal";
|
|
5
|
+
import { BatchTransactionSpec, ProcedureAuthorization } from "../../types/internal";
|
|
6
6
|
/**
|
|
7
7
|
* @hidden
|
|
8
8
|
*/
|
|
@@ -18,11 +18,11 @@ export interface Storage {
|
|
|
18
18
|
/**
|
|
19
19
|
* @hidden
|
|
20
20
|
*/
|
|
21
|
-
export declare const createAddInstructionResolver: (context: Context
|
|
21
|
+
export declare const createAddInstructionResolver: (context: Context) => (receipt: ISubmittableResult) => Instruction[];
|
|
22
22
|
/**
|
|
23
23
|
* @hidden
|
|
24
24
|
*/
|
|
25
|
-
export declare function prepareAddInstruction(this: Procedure<Params, Instruction[], Storage>, args: Params): Promise<
|
|
25
|
+
export declare function prepareAddInstruction(this: Procedure<Params, Instruction[], Storage>, args: Params): Promise<BatchTransactionSpec<Instruction[], unknown[][]>>;
|
|
26
26
|
/**
|
|
27
27
|
* @hidden
|
|
28
28
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addInstruction.d.ts","sourceRoot":"","sources":["../../../src/api/procedures/addInstruction.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,SAAS,MAAM,cAAc,CAAC;AAMrC,OAAO,EACL,OAAO,EACP,gBAAgB,EAChB,WAAW,EACX,iBAAiB,EAEjB,
|
|
1
|
+
{"version":3,"file":"addInstruction.d.ts","sourceRoot":"","sources":["../../../src/api/procedures/addInstruction.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,SAAS,MAAM,cAAc,CAAC;AAMrC,OAAO,EACL,OAAO,EACP,gBAAgB,EAChB,WAAW,EACX,iBAAiB,EAEjB,SAAS,EACV,uBAAmB;AACpB,OAAO,EAEL,qBAAqB,EAMtB,oBAAgB;AACjB,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,6BAAyB;AAqBhF;;GAEG;AACH,oBAAY,MAAM,GAAG,qBAAqB,GAAG;IAC3C,OAAO,EAAE,SAAS,CAAC;CACpB,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,kBAAkB,EAAE,CAAC,gBAAgB,GAAG,iBAAiB,CAAC,EAAE,EAAE,CAAC;CAChE;AAmCD;;GAEG;AACH,eAAO,MAAM,4BAA4B,YAC7B,OAAO,eACP,kBAAkB,KAAG,WAAW,EAQzC,CAAC;AAmIJ;;GAEG;AACH,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,SAAS,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE,OAAO,CAAC,EAC/C,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,oBAAoB,CAAC,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC,CA2F3D;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,SAAS,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE,OAAO,CAAC,EAC/C,EAAE,OAAO,EAAE,EAAE,MAAM,GAClB,OAAO,CAAC,sBAAsB,CAAC,CAyBjC;AAED;;GAEG;AACH,wBAAsB,cAAc,CAClC,IAAI,EAAE,SAAS,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE,OAAO,CAAC,EAC/C,EAAE,YAAY,EAAE,EAAE,MAAM,GACvB,OAAO,CAAC,OAAO,CAAC,CAgClB;AAED;;GAEG;AACH,eAAO,MAAM,cAAc,QAAO,UAAU,MAAM,EAAE,WAAW,EAAE,EAAE,OAAO,CACF,CAAC"}
|
|
@@ -25,12 +25,9 @@ const internal_2 = require("../../utils/internal");
|
|
|
25
25
|
/**
|
|
26
26
|
* @hidden
|
|
27
27
|
*/
|
|
28
|
-
const createAddInstructionResolver = (context
|
|
28
|
+
const createAddInstructionResolver = (context) => (receipt) => {
|
|
29
29
|
const events = (0, internal_2.filterEventRecords)(receipt, 'settlement', 'InstructionCreated');
|
|
30
30
|
const result = events.map(({ data }) => new internal_1.Instruction({ id: (0, conversion_1.u64ToBigNumber)(data[2]) }, context));
|
|
31
|
-
if (previousInstructions) {
|
|
32
|
-
return previousInstructions.value.concat(result);
|
|
33
|
-
}
|
|
34
31
|
return result;
|
|
35
32
|
};
|
|
36
33
|
exports.createAddInstructionResolver = createAddInstructionResolver;
|
|
@@ -190,11 +187,10 @@ function prepareAddInstruction(args) {
|
|
|
190
187
|
transaction: addAndAffirmTx,
|
|
191
188
|
argsArray: addAndAffirmInstructionParams,
|
|
192
189
|
}));
|
|
193
|
-
|
|
190
|
+
return {
|
|
194
191
|
transactions,
|
|
195
|
-
|
|
196
|
-
}
|
|
197
|
-
return resultInstructions;
|
|
192
|
+
resolver: (0, exports.createAddInstructionResolver)(context),
|
|
193
|
+
};
|
|
198
194
|
});
|
|
199
195
|
}
|
|
200
196
|
exports.prepareAddInstruction = prepareAddInstruction;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addInstruction.js","sourceRoot":"","sources":["../../../src/api/procedures/addInstruction.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAIA,wDAAyB;AACzB,mCAA4D;AAG5D,mCAAkF;AAClF,
|
|
1
|
+
{"version":3,"file":"addInstruction.js","sourceRoot":"","sources":["../../../src/api/procedures/addInstruction.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAIA,wDAAyB;AACzB,mCAA4D;AAG5D,mCAAkF;AAClF,6CAOoB;AACpB,uCAQiB;AAEjB,6CAAsC;AACtC,qDAAoD;AACpD,uDAU4B;AAC5B,mDAK0B;AAiD1B;;GAEG;AACI,MAAM,4BAA4B,GACvC,CAAC,OAAgB,EAAE,EAAE,CACrB,CAAC,OAA2B,EAAiB,EAAE;IAC7C,MAAM,MAAM,GAAG,IAAA,6BAAkB,EAAC,OAAO,EAAE,YAAY,EAAE,oBAAoB,CAAC,CAAC;IAE/E,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CACvB,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,sBAAW,CAAC,EAAE,EAAE,EAAE,IAAA,2BAAc,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,OAAO,CAAC,CACxE,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAVS,QAAA,4BAA4B,gCAUrC;AAEJ;;GAEG;AACH,SAAe,kBAAkB,CAC/B,YAAoC,EACpC,kBAA8D,EAC9D,WAAsB,EACtB,OAAkB,EAClB,OAAgB;;QAWhB,MAAM,6BAA6B,GAA0C,EAAE,CAAC;QAChF,MAAM,oBAAoB,GAAiC,EAAE,CAAC;QAE9D,MAAM,kBAAkB,GAAa,EAAE,CAAC;QACxC,MAAM,mBAAmB,GAAa,EAAE,CAAC;QACzC,M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AAC,GAAG,CAAC,IAAI,EAAE,CAAO,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE;gBAC1D,MAAM,aAAa,GAAG,IAAA,qCAAwB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;gBAC9D,MAAM,WAAW,GAAG,IAAA,qCAAwB,EAAC,EAAE,EAAE,OAAO,CAAC,CAAC;gBAE1D,MAAM,MAAM,GAAG,EAAE,CAAC;gBAClB,MAAM,CAAC,aAAa,EAAE,WAAW,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;oBACrD,aAAa,CAAC,aAAa,CAAC,EAAE,QAAQ,EAAE,CAAC;oBACzC,WAAW,CAAC,aAAa,CAAC,EAAE,QAAQ,EAAE,CAAC;iBACxC,CAAC,CAAC;gBAEH,IAAI,aAAa,EAAE;oBACjB,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;iBAC5B;gBAED,IAAI,WAAW,EAAE;oBACf,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;iBAC1B;gBAED,OAAO,MAAM,CAAC;YAChB,CAAC,CAAA,CAAC,CAAC;YACH,OAAO,IAAA,gBAAO,EAAC,UAAU,CAAC,CAAC;QAC7B,CAAC,CAAA,CAAC,CAAC;QAEH,OAAO;YACL,kBAAkB;SACnB,CAAC;IACJ,CAAC;CAAA;AAnCD,wCAmCC;AAED;;GAEG;AACI,MAAM,cAAc,GAAG,GAA8C,EAAE,CAC5E,IAAI,oBAAS,CAAC,qBAAqB,EAAE,gBAAgB,EAAE,cAAc,CAAC,CAAC;AAD5D,QAAA,cAAc,kBAC8C"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Procedure } from "../../internal";
|
|
2
2
|
import { AddInvestorUniquenessClaimParams } from "../../types";
|
|
3
|
-
import { ProcedureAuthorization } from "../../types/internal";
|
|
3
|
+
import { ExtrinsicParams, ProcedureAuthorization, TransactionSpec } from "../../types/internal";
|
|
4
4
|
/**
|
|
5
5
|
* @hidden
|
|
6
6
|
*/
|
|
7
|
-
export declare function prepareAddInvestorUniquenessClaim(this: Procedure<AddInvestorUniquenessClaimParams, void>, args: AddInvestorUniquenessClaimParams): Promise<void
|
|
7
|
+
export declare function prepareAddInvestorUniquenessClaim(this: Procedure<AddInvestorUniquenessClaimParams, void>, args: AddInvestorUniquenessClaimParams): Promise<TransactionSpec<void, ExtrinsicParams<'identity', 'addInvestorUniquenessClaim'>> | TransactionSpec<void, ExtrinsicParams<'identity', 'addInvestorUniquenessClaimV2'>>>;
|
|
8
8
|
/**
|
|
9
9
|
* @hidden
|
|
10
10
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addInvestorUniquenessClaim.d.ts","sourceRoot":"","sources":["../../../src/api/procedures/addInvestorUniquenessClaim.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAE,uBAAmB;AACtD,OAAO,EAAE,gCAAgC,EAAuC,oBAAgB;AAChG,OAAO,EAAE,sBAAsB,EAAE,6BAAyB;
|
|
1
|
+
{"version":3,"file":"addInvestorUniquenessClaim.d.ts","sourceRoot":"","sources":["../../../src/api/procedures/addInvestorUniquenessClaim.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAE,uBAAmB;AACtD,OAAO,EAAE,gCAAgC,EAAuC,oBAAgB;AAChG,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,eAAe,EAAE,6BAAyB;AAU5F;;GAEG;AACH,wBAAsB,iCAAiC,CACrD,IAAI,EAAE,SAAS,CAAC,gCAAgC,EAAE,IAAI,CAAC,EACvD,IAAI,EAAE,gCAAgC,GACrC,OAAO,CACN,eAAe,CAAC,IAAI,EAAE,eAAe,CAAC,UAAU,EAAE,4BAA4B,CAAC,CAAC,GAChF,eAAe,CAAC,IAAI,EAAE,eAAe,CAAC,UAAU,EAAE,8BAA8B,CAAC,CAAC,CACrF,CA4CA;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,SAAS,CAAC,gCAAgC,CAAC,EACjD,EAAE,KAAK,EAAE,EAAE,gCAAgC,GAC1C,sBAAsB,CAgBxB;AAED;;GAEG;AACH,eAAO,MAAM,0BAA0B,QAAO,UAAU,gCAAgC,EAAE,IAAI,CAC1B,CAAC"}
|
|
@@ -31,14 +31,15 @@ function prepareAddInvestorUniquenessClaim(args) {
|
|
|
31
31
|
const meshExpiry = expiry ? (0, conversion_1.dateToMoment)(expiry, context) : null;
|
|
32
32
|
if (typeof proof === 'string') {
|
|
33
33
|
const meshClaim = (0, conversion_1.claimToMeshClaim)({ type: types_1.ClaimType.InvestorUniqueness, scope, cddId, scopeId }, context);
|
|
34
|
-
|
|
34
|
+
return {
|
|
35
35
|
transaction: tx.identity.addInvestorUniquenessClaim,
|
|
36
36
|
args: [meshIdentityId, meshClaim, (0, conversion_1.stringToInvestorZKProofData)(proof, context), meshExpiry],
|
|
37
|
-
|
|
37
|
+
resolver: undefined,
|
|
38
|
+
};
|
|
38
39
|
}
|
|
39
40
|
else {
|
|
40
41
|
const meshClaim = (0, conversion_1.claimToMeshClaim)({ type: types_1.ClaimType.InvestorUniquenessV2, cddId }, context);
|
|
41
|
-
|
|
42
|
+
return {
|
|
42
43
|
transaction: tx.identity.addInvestorUniquenessClaimV2,
|
|
43
44
|
args: [
|
|
44
45
|
meshIdentityId,
|
|
@@ -47,7 +48,8 @@ function prepareAddInvestorUniquenessClaim(args) {
|
|
|
47
48
|
(0, conversion_1.scopeClaimProofToConfidentialIdentityClaimProof)(proof, scopeId, context),
|
|
48
49
|
meshExpiry,
|
|
49
50
|
],
|
|
50
|
-
|
|
51
|
+
resolver: undefined,
|
|
52
|
+
};
|
|
51
53
|
}
|
|
52
54
|
});
|
|
53
55
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addInvestorUniquenessClaim.js","sourceRoot":"","sources":["../../../src/api/procedures/addInvestorUniquenessClaim.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAsD;AACtD,uCAAgG;AAEhG,uDAO4B;AAE5B;;GAEG;AACH,SAAsB,iCAAiC,CAErD,IAAsC;;
|
|
1
|
+
{"version":3,"file":"addInvestorUniquenessClaim.js","sourceRoot":"","sources":["../../../src/api/procedures/addInvestorUniquenessClaim.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAsD;AACtD,uCAAgG;AAEhG,uDAO4B;AAE5B;;GAEG;AACH,SAAsB,iCAAiC,CAErD,IAAsC;;QAKtC,MAAM,EACJ,OAAO,EAAE,EACP,WAAW,EAAE,EAAE,EAAE,EAAE,GACpB,EACD,OAAO,GACR,GAAG,IAAI,CAAC;QACT,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;QAEtD,MAAM,EAAE,GAAG,EAAE,GAAG,MAAM,OAAO,CAAC,kBAAkB,EAAE,CAAC;QAEnD,IAAI,MAAM,IAAI,MAAM,GAAG,IAAI,IAAI,EAAE,EAAE;YACjC,MAAM,IAAI,wBAAa,CAAC;gBACtB,IAAI,EAAE,iBAAS,CAAC,eAAe;gBAC/B,OAAO,EAAE,mCAAmC;aAC7C,CAAC,CAAC;SACJ;QAED,MAAM,cAAc,GAAG,IAAA,+BAAkB,EAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QACxD,MAAM,UAAU,GAAG,MAAM,CAAC,CAAC,CAAC,IAAA,yBAAY,EAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QACjE,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YAC7B,MAAM,SAAS,GAAG,IAAA,6BAAgB,EAChC,EAAE,IAAI,EAAE,iBAAS,CAAC,kBAAkB,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAC7D,OAAO,CACR,CAAC;YACF,OAAO;gBACL,WAAW,EAAE,EAAE,CAAC,QAAQ,CAAC,0BAA0B;gBACnD,IAAI,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ferComplianceTransferCondition } from "../../polkadot/types-lookup.ts";
|
|
2
|
-
import { BTreeSet } from '@polkadot/types-codec';
|
|
3
1
|
import BigNumber from 'bignumber.js';
|
|
4
2
|
import { Procedure } from "../../internal";
|
|
5
|
-
import { AddCountTransferRestrictionParams, AddPercentageTransferRestrictionParams } from "../../types";
|
|
6
|
-
import { ProcedureAuthorization } from "../../types/internal";
|
|
3
|
+
import { AddClaimCountTransferRestrictionParams, AddClaimPercentageTransferRestrictionParams, AddCountTransferRestrictionParams, AddPercentageTransferRestrictionParams } from "../../types";
|
|
4
|
+
import { BatchTransactionSpec, ProcedureAuthorization } from "../../types/internal";
|
|
7
5
|
/**
|
|
8
6
|
* @hidden
|
|
9
7
|
*/
|
|
10
8
|
export declare type AddTransferRestrictionParams = {
|
|
11
9
|
ticker: string;
|
|
12
|
-
} & (AddCountTransferRestrictionParams | AddPercentageTransferRestrictionParams);
|
|
13
|
-
export interface Storage {
|
|
14
|
-
currentRestrictions: BTreeSet<PolymeshPrimitivesTransferComplianceTransferCondition>;
|
|
15
|
-
currentStats: BTreeSet<PolymeshPrimitivesStatisticsStatType>;
|
|
16
|
-
needStat: boolean;
|
|
17
|
-
}
|
|
10
|
+
} & (AddCountTransferRestrictionParams | AddPercentageTransferRestrictionParams | AddClaimCountTransferRestrictionParams | AddClaimPercentageTransferRestrictionParams);
|
|
18
11
|
/**
|
|
19
12
|
* @hidden
|
|
20
13
|
*/
|
|
21
|
-
export declare function prepareAddTransferRestriction(this: Procedure<AddTransferRestrictionParams, BigNumber
|
|
14
|
+
export declare function prepareAddTransferRestriction(this: Procedure<AddTransferRestrictionParams, BigNumber>, args: AddTransferRestrictionParams): Promise<BatchTransactionSpec<BigNumber, unknown[][]>>;
|
|
22
15
|
/**
|
|
23
16
|
* @hidden
|
|
24
17
|
*/
|
|
25
|
-
export declare function getAuthorization(this: Procedure<AddTransferRestrictionParams, BigNumber
|
|
18
|
+
export declare function getAuthorization(this: Procedure<AddTransferRestrictionParams, BigNumber>, { ticker, exemptedIdentities }: AddTransferRestrictionParams): ProcedureAuthorization;
|
|
26
19
|
/**
|
|
27
20
|
* @hidden
|
|
28
21
|
*/
|
|
29
|
-
export declare
|
|
30
|
-
/**
|
|
31
|
-
* @hidden
|
|
32
|
-
*/
|
|
33
|
-
export declare const addTransferRestriction: () => Procedure<AddTransferRestrictionParams, BigNumber, Storage>;
|
|
22
|
+
export declare const addTransferRestriction: () => Procedure<AddTransferRestrictionParams, BigNumber>;
|
|
34
23
|
//# sourceMappingURL=addTransferRestriction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addTransferRestriction.d.ts","sourceRoot":"","sources":["../../../src/api/procedures/addTransferRestriction.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"addTransferRestriction.d.ts","sourceRoot":"","sources":["../../../src/api/procedures/addTransferRestriction.ts"],"names":[],"mappings":"AACA,OAAO,SAAS,MAAM,cAAc,CAAC;AAErC,OAAO,EAAwB,SAAS,EAAE,uBAAmB;AAC7D,OAAO,EACL,sCAAsC,EACtC,2CAA2C,EAC3C,iCAAiC,EACjC,sCAAsC,EAKvC,oBAAgB;AACjB,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAoB,6BAAyB;AAmBlG;;GAEG;AACH,oBAAY,4BAA4B,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,CAC5D,iCAAiC,GACjC,sCAAsC,GACtC,sCAAsC,GACtC,2CAA2C,CAC9C,CAAC;AAEF;;GAEG;AACH,wBAAsB,6BAA6B,CACjD,IAAI,EAAE,SAAS,CAAC,4BAA4B,EAAE,SAAS,CAAC,EACxD,IAAI,EAAE,4BAA4B,GACjC,OAAO,CAAC,oBAAoB,CAAC,SAAS,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC,CA8GvD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,SAAS,CAAC,4BAA4B,EAAE,SAAS,CAAC,EACxD,EAAE,MAAM,EAAE,kBAAuB,EAAE,EAAE,4BAA4B,GAChE,sBAAsB,CAcxB;AAED;;GAEG;AACH,eAAO,MAAM,sBAAsB,QAAO,UAAU,4BAA4B,EAAE,SAAS,CAC3B,CAAC"}
|
|
@@ -12,7 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.addTransferRestriction = exports.
|
|
15
|
+
exports.addTransferRestriction = exports.getAuthorization = exports.prepareAddTransferRestriction = void 0;
|
|
16
16
|
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
|
17
17
|
const internal_1 = require("../../internal");
|
|
18
18
|
const types_1 = require("../../types");
|
|
@@ -24,9 +24,24 @@ const internal_3 = require("../../utils/internal");
|
|
|
24
24
|
*/
|
|
25
25
|
function prepareAddTransferRestriction(args) {
|
|
26
26
|
return __awaiter(this, void 0, void 0, function* () {
|
|
27
|
-
const { context: { polymeshApi: { tx: { statistics }, query
|
|
27
|
+
const { context: { polymeshApi: { tx: { statistics }, query: { statistics: statisticsQuery }, queryMulti, consts, }, }, context, } = this;
|
|
28
28
|
const { ticker, exemptedIdentities = [], type } = args;
|
|
29
29
|
const tickerKey = (0, conversion_1.stringToTickerKey)(ticker, context);
|
|
30
|
+
let claimIssuer;
|
|
31
|
+
if (type === types_1.TransferRestrictionType.ClaimCount ||
|
|
32
|
+
type === types_1.TransferRestrictionType.ClaimPercentage) {
|
|
33
|
+
const { claim: { type: claimType }, issuer, } = args;
|
|
34
|
+
claimIssuer = { claimType, issuer };
|
|
35
|
+
}
|
|
36
|
+
const [currentStats, { requirements: currentRestrictions }] = yield queryMulti([
|
|
37
|
+
[statisticsQuery.activeAssetStats, tickerKey],
|
|
38
|
+
[
|
|
39
|
+
statisticsQuery.assetTransferCompliances,
|
|
40
|
+
tickerKey,
|
|
41
|
+
],
|
|
42
|
+
]);
|
|
43
|
+
const neededStat = (0, internal_3.neededStatTypeForRestrictionInput)({ type, claimIssuer }, context);
|
|
44
|
+
(0, internal_3.assertStatIsSet)(currentStats, neededStat);
|
|
30
45
|
const maxConditions = (0, conversion_1.u32ToBigNumber)(consts.statistics.maxTransferConditionsPerAsset);
|
|
31
46
|
const restrictionAmount = new bignumber_js_1.default(currentRestrictions.size);
|
|
32
47
|
if (restrictionAmount.gte(maxConditions)) {
|
|
@@ -36,51 +51,41 @@ function prepareAddTransferRestriction(args) {
|
|
|
36
51
|
data: { limit: maxConditions },
|
|
37
52
|
});
|
|
38
53
|
}
|
|
39
|
-
let
|
|
40
|
-
let chainType;
|
|
54
|
+
let restriction;
|
|
41
55
|
if (type === types_1.TransferRestrictionType.Count) {
|
|
42
|
-
value = args.count;
|
|
43
|
-
|
|
56
|
+
const value = args.count;
|
|
57
|
+
restriction = { type, value };
|
|
58
|
+
}
|
|
59
|
+
else if (type === types_1.TransferRestrictionType.Percentage) {
|
|
60
|
+
const value = args.percentage;
|
|
61
|
+
restriction = { type, value };
|
|
62
|
+
}
|
|
63
|
+
else if (type === types_1.TransferRestrictionType.ClaimCount) {
|
|
64
|
+
const { min, max: maybeMax, issuer, claim } = args;
|
|
65
|
+
restriction = { type, value: { min, max: maybeMax, issuer, claim } };
|
|
44
66
|
}
|
|
45
67
|
else {
|
|
46
|
-
|
|
47
|
-
|
|
68
|
+
const { min, max, issuer, claim } = args;
|
|
69
|
+
restriction = { type, value: { min, max, issuer, claim } };
|
|
48
70
|
}
|
|
49
|
-
const rawTransferCondition = (0, conversion_1.transferRestrictionToPolymeshTransferCondition)(
|
|
50
|
-
const
|
|
51
|
-
if (
|
|
71
|
+
const rawTransferCondition = (0, conversion_1.transferRestrictionToPolymeshTransferCondition)(restriction, context);
|
|
72
|
+
const hasRestriction = !![...currentRestrictions].find(r => r.eq(rawTransferCondition));
|
|
73
|
+
if (hasRestriction) {
|
|
52
74
|
throw new internal_1.PolymeshError({
|
|
53
75
|
code: types_1.ErrorCode.NoDataChange,
|
|
54
76
|
message: 'Cannot add the same restriction more than once',
|
|
55
77
|
});
|
|
56
78
|
}
|
|
57
|
-
const
|
|
58
|
-
? (0, conversion_1.statisticsOpTypeToStatOpType)(internal_2.StatisticsOpType.Count, context)
|
|
59
|
-
: (0, conversion_1.statisticsOpTypeToStatOpType)(internal_2.StatisticsOpType.Balance, context);
|
|
79
|
+
const conditions = (0, conversion_1.complianceConditionsToBtreeSet)([...currentRestrictions, rawTransferCondition], context);
|
|
60
80
|
const transactions = [];
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
transaction: statistics.setActiveAssetStats,
|
|
66
|
-
args: [tickerKey, rawNewStats],
|
|
67
|
-
}));
|
|
68
|
-
// If the stat restriction is a Count the actual value needs to be set. This is due to the potentially slow operation of counting all holders for the chain
|
|
69
|
-
if (type === types_1.TransferRestrictionType.Count) {
|
|
70
|
-
const holders = yield query.asset.balanceOf.entries(tickerKey.Ticker);
|
|
71
|
-
const holderCount = new bignumber_js_1.default(holders.length);
|
|
72
|
-
// if an asset has many investors this could be slow and instead should be fetched from SubQuery
|
|
73
|
-
// These should happen near the assets inception, so for now query the chain directly
|
|
74
|
-
const secondKey = (0, conversion_1.createStat2ndKey)(context);
|
|
75
|
-
const stat = (0, conversion_1.statUpdate)(secondKey, (0, conversion_1.bigNumberToU128)(holderCount, context), context);
|
|
76
|
-
const statValue = (0, conversion_1.statUpdatesToBtreeStatUpdate)([stat], context);
|
|
77
|
-
transactions.push((0, internal_3.checkTxType)({
|
|
78
|
-
transaction: statistics.batchUpdateAssetStats,
|
|
79
|
-
args: [tickerKey, newStat, statValue],
|
|
80
|
-
}));
|
|
81
|
-
}
|
|
82
|
-
}
|
|
81
|
+
transactions.push((0, internal_3.checkTxType)({
|
|
82
|
+
transaction: statistics.setAssetTransferCompliance,
|
|
83
|
+
args: [tickerKey, conditions],
|
|
84
|
+
}));
|
|
83
85
|
if (exemptedIdentities.length) {
|
|
86
|
+
const op = [types_1.TransferRestrictionType.Count, types_1.TransferRestrictionType.ClaimCount].includes(type)
|
|
87
|
+
? (0, conversion_1.statisticsOpTypeToStatOpType)(internal_2.StatisticsOpType.Count, context)
|
|
88
|
+
: (0, conversion_1.statisticsOpTypeToStatOpType)(internal_2.StatisticsOpType.Balance, context);
|
|
84
89
|
const exemptedIds = yield (0, internal_3.getExemptedIds)(exemptedIdentities, context, ticker);
|
|
85
90
|
const exemptedScopeIds = exemptedIds.map(entityId => (0, conversion_1.stringToIdentityId)(entityId, context));
|
|
86
91
|
const btreeIds = (0, conversion_1.scopeIdsToBtreeSetIdentityId)(exemptedScopeIds, context);
|
|
@@ -91,14 +96,7 @@ function prepareAddTransferRestriction(args) {
|
|
|
91
96
|
args: [true, exemptKey, btreeIds],
|
|
92
97
|
}));
|
|
93
98
|
}
|
|
94
|
-
|
|
95
|
-
const rawNewConditions = (0, conversion_1.transferConditionsToBtreeTransferConditions)(newConditions, context);
|
|
96
|
-
transactions.push((0, internal_3.checkTxType)({
|
|
97
|
-
transaction: statistics.setAssetTransferCompliance,
|
|
98
|
-
args: [tickerKey, rawNewConditions],
|
|
99
|
-
}));
|
|
100
|
-
this.addBatchTransaction({ transactions });
|
|
101
|
-
return restrictionAmount.plus(1);
|
|
99
|
+
return { transactions, resolver: restrictionAmount.plus(1) };
|
|
102
100
|
});
|
|
103
101
|
}
|
|
104
102
|
exports.prepareAddTransferRestriction = prepareAddTransferRestriction;
|
|
@@ -106,14 +104,10 @@ exports.prepareAddTransferRestriction = prepareAddTransferRestriction;
|
|
|
106
104
|
* @hidden
|
|
107
105
|
*/
|
|
108
106
|
function getAuthorization({ ticker, exemptedIdentities = [] }) {
|
|
109
|
-
const { storage: { needStat }, } = this;
|
|
110
107
|
const transactions = [types_1.TxTags.statistics.SetAssetTransferCompliance];
|
|
111
108
|
if (exemptedIdentities.length) {
|
|
112
109
|
transactions.push(types_1.TxTags.statistics.SetEntitiesExempt);
|
|
113
110
|
}
|
|
114
|
-
if (needStat) {
|
|
115
|
-
transactions.push(types_1.TxTags.statistics.SetActiveAssetStats);
|
|
116
|
-
}
|
|
117
111
|
return {
|
|
118
112
|
permissions: {
|
|
119
113
|
assets: [new internal_1.Asset({ ticker }, this.context)],
|
|
@@ -126,28 +120,6 @@ exports.getAuthorization = getAuthorization;
|
|
|
126
120
|
/**
|
|
127
121
|
* @hidden
|
|
128
122
|
*/
|
|
129
|
-
|
|
130
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
131
|
-
const { context, context: { polymeshApi: { query: { statistics }, }, }, } = this;
|
|
132
|
-
const { ticker, type } = args;
|
|
133
|
-
const tickerKey = (0, conversion_1.stringToTickerKey)(ticker, context);
|
|
134
|
-
const [{ requirements: currentRestrictions }, currentStats] = yield Promise.all([
|
|
135
|
-
statistics.assetTransferCompliances(tickerKey),
|
|
136
|
-
statistics.activeAssetStats(tickerKey),
|
|
137
|
-
]);
|
|
138
|
-
const neededStat = (0, internal_3.neededStatTypeForRestrictionInput)(type, context);
|
|
139
|
-
const needStat = !currentStats.has(neededStat);
|
|
140
|
-
return {
|
|
141
|
-
currentRestrictions,
|
|
142
|
-
needStat,
|
|
143
|
-
currentStats,
|
|
144
|
-
};
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
exports.prepareStorage = prepareStorage;
|
|
148
|
-
/**
|
|
149
|
-
* @hidden
|
|
150
|
-
*/
|
|
151
|
-
const addTransferRestriction = () => new internal_1.Procedure(prepareAddTransferRestriction, getAuthorization, prepareStorage);
|
|
123
|
+
const addTransferRestriction = () => new internal_1.Procedure(prepareAddTransferRestriction, getAuthorization);
|
|
152
124
|
exports.addTransferRestriction = addTransferRestriction;
|
|
153
125
|
//# sourceMappingURL=addTransferRestriction.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addTransferRestriction.js","sourceRoot":"","sources":["../../../src/api/procedures/addTransferRestriction.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"addTransferRestriction.js","sourceRoot":"","sources":["../../../src/api/procedures/addTransferRestriction.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,gEAAqC;AAErC,6CAA6D;AAC7D,uCASiB;AACjB,mDAAkG;AAElG,uDAS4B;AAC5B,mDAK0B;AAY1B;;GAEG;AACH,SAAsB,6BAA6B,CAEjD,IAAkC;;QAElC,MAAM,EACJ,OAAO,EAAE,EACP,WAAW,EAAE,EACX,EAAE,EAAE,EAAE,UAAU,EAAE,EAClB,KAAK,EAAE,EAAE,UAAU,EAAE,eAAe,EAAE,EACtC,UAAU,EACV,MAAM,GACP,GACF,EACD,OAAO,GACR,GAAG,IAAI,CAAC;QACT,MAAM,EAAE,MAAM,EAAE,kBAAkB,GAAG,EAAE,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;QACvD,MAAM,SAAS,GAAG,IAAA,8BAAiB,EAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAErD,IAAI,WAAW,CAAC;QAChB,IACE,IAAI,KAAK,+BAAuB,CAAC,UAAU;YAC3C,IAAI,KAAK,+BAAuB,CAAC,eAAe,EAChD;YACA,MAAM,EACJ,KAAK,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAC1B,MAAM,GACP,GAAG,IAAI,CAAC;YACT,WAAW,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC;SACrC;QAED,MAAM,CAAC,YAAY,EAAE,EAAE,YAAY,EAAE,mBAAmB,EAAE,CAAC,GAAG,MAAM,UAAU,CAK5E;YACA,CAAC,eAAe,CAAC,gBAA+D,EAAE,SAAS,CAAC;YAC5F;gBACE,eAAe,CAAC,wBAAuE;gBACvF,SAAS;aACV;SACF,CAAC,CAAC;QAEH,MAAM,UAAU,GAAG,IAAA,4CAAiC,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,OAAO,CAAC,CAAC;QACrF,IAAA,0BAAe,EAAC,YAAY,EAAE,UA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al";
|
|
2
2
|
import { ClaimClassicTickerParams } from "../../types";
|
|
3
|
+
import { ExtrinsicParams, TransactionSpec } from "../../types/internal";
|
|
3
4
|
/**
|
|
4
5
|
* @hidden
|
|
5
6
|
*/
|
|
6
|
-
export declare function prepareClaimClassicTicker(this: Procedure<ClaimClassicTickerParams, TickerReservation>, args: ClaimClassicTickerParams): Promise<TickerReservation
|
|
7
|
+
export declare function prepareClaimClassicTicker(this: Procedure<ClaimClassicTickerParams, TickerReservation>, args: ClaimClassicTickerParams): Promise<TransactionSpec<TickerReservation, ExtrinsicParams<'asset', 'claimClassicTicker'>>>;
|
|
7
8
|
/**
|
|
8
9
|
* @hidden
|
|
9
10
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claimClassicTicker.d.ts","sourceRoot":"","sources":["../../../src/api/procedures/claimClassicTicker.ts"],"names":[],"mappings":"AAGA,OAAO,EAAiB,SAAS,EAAE,iBAAiB,EAAE,uBAAmB;AACzE,OAAO,EAAE,wBAAwB,EAAqB,oBAAgB;
|
|
1
|
+
{"version":3,"file":"claimClassicTicker.d.ts","sourceRoot":"","sources":["../../../src/api/procedures/claimClassicTicker.ts"],"names":[],"mappings":"AAGA,OAAO,EAAiB,SAAS,EAAE,iBAAiB,EAAE,uBAAmB;AACzE,OAAO,EAAE,wBAAwB,EAAqB,oBAAgB;AACtE,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,6BAAyB;AAuBpE;;GAEG;AACH,wBAAsB,yBAAyB,CAC7C,IAAI,EAAE,SAAS,CAAC,wBAAwB,EAAE,iBAAiB,CAAC,EAC5D,IAAI,EAAE,wBAAwB,GAC7B,OAAO,CAAC,eAAe,CAAC,iBAAiB,EAAE,eAAe,CAAC,OAAO,EAAE,oBAAoB,CAAC,CAAC,CAAC,CAkF7F;AAED;;GAEG;AACH,eAAO,MAAM,kBAAkB,QAAO,UAAU,wBAAwB,EAAE,iBAAiB,CAOvF,CAAC"}
|
|
@@ -90,11 +90,11 @@ function prepareClaimClassicTicker(args) {
|
|
|
90
90
|
},
|
|
91
91
|
});
|
|
92
92
|
}
|
|
93
|
-
|
|
93
|
+
return {
|
|
94
94
|
transaction: tx.asset.claimClassicTicker,
|
|
95
95
|
args: [rawTicker, (0, conversion_1.stringToEcdsaSignature)(ethereumSignature, context)],
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
resolver: new internal_1.TickerReservation({ ticker }, context),
|
|
97
|
+
};
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
100
|
exports.prepareClaimClassicTicker = prepareClaimClassicTicker;
|