@polymeshassociation/polymesh-types
Version:
Substrate types used in Polymesh chain
898 lines • 337 kB
TypeScript
import '@polkadot/api-base/types/submittable';
import type { ApiTypes, AugmentedSubmittable, SubmittableExtrinsic, SubmittableExtrinsicFunction } from '@polkadot/api-base/types';
import type { BTreeSet, Bytes, Compact, Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent, Permill } from '@polkadot/types/interfaces/runtime';
import type { PalletContractsWasmDeterminism, PalletCorporateActionsBallotBallotMeta, PalletCorporateActionsBallotBallotTimeRange, PalletCorporateActionsBallotBallotVote, PalletCorporateActionsCaId, PalletCorporateActionsCaKind, PalletCorporateActionsInitiateCorporateActionArgs, PalletCorporateActionsRecordDateSpec, PalletCorporateActionsTargetIdentities, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletPipsSnapshotResult, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingSlashingSwitch, PalletStakingValidatorPrefs, PalletStoFundingMethod, PalletStoPriceTier, PalletUtilityUniqueCall, PolymeshCommonUtilitiesCheckpointScheduleCheckpoints, PolymeshCommonUtilitiesIdentityCreateChildIdentityWithAuth, PolymeshCommonUtilitiesIdentitySecondaryKeyWithAuth, PolymeshCommonUtilitiesProtocolFeeProtocolOp, PolymeshContractsApi, PolymeshContractsChainExtensionExtrinsicId, PolymeshContractsNextUpgrade, PolymeshPrimitivesAgentAgentGroup, PolymeshPrimitivesAssetAssetId, PolymeshPrimitivesAssetAssetType, PolymeshPrimitivesAssetIdentifier, PolymeshPrimitivesAssetMetadataAssetMetadataKey, PolymeshPrimitivesAssetMetadataAssetMetadataSpec, PolymeshPrimitivesAssetMetadataAssetMetadataValueDetail, PolymeshPrimitivesAssetNonFungibleType, PolymeshPrimitivesAuthorizationAuthorizationData, PolymeshPrimitivesBeneficiary, PolymeshPrimitivesComplianceManagerComplianceRequirement, PolymeshPrimitivesCondition, PolymeshPrimitivesConditionTrustedIssuer, PolymeshPrimitivesDocument, PolymeshPrimitivesIdentityClaimClaim, PolymeshPrimitivesIdentityClaimClaimType, PolymeshPrimitivesIdentityClaimScope, PolymeshPrimitivesIdentityId, PolymeshPrimitivesIdentityIdPortfolioId, PolymeshPrimitivesIdentityIdPortfolioKind, PolymeshPrimitivesMaybeBlock, PolymeshPrimitivesMemo, PolymeshPrimitivesNftNfTs, PolymeshPrimitivesNftNftCollectionKeys, PolymeshPrimitivesNftNftMetadataAttribute, PolymeshPrimitivesPortfolioFund, PolymeshPrimitivesPosRatio, PolymeshPrimitivesSecondaryKey, PolymeshPrimitivesSecondaryKeyExtrinsicPermissions, PolymeshPrimitivesSecondaryKeyPermissions, PolymeshPrimitivesSecondaryKeySignatory, PolymeshPrimitivesSettlementAffirmationCount, PolymeshPrimitivesSettlementAssetCount, PolymeshPrimitivesSettlementLeg, PolymeshPrimitivesSettlementReceiptDetails, PolymeshPrimitivesSettlementSettlementType, PolymeshPrimitivesSettlementVenueType, PolymeshPrimitivesStatisticsStatType, PolymeshPrimitivesStatisticsStatUpdate, PolymeshPrimitivesTicker, PolymeshPrimitivesTransferComplianceTransferCondition, PolymeshPrimitivesTransferComplianceTransferConditionExemptKey, PolymeshRuntimeDevelopRuntimeOriginCaller, PolymeshRuntimeDevelopRuntimeSessionKeys, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusGrandpaEquivocationProof, SpConsensusSlotsEquivocationProof, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeMultiSignature, SpSessionMembershipProof, SpWeightsWeightV2Weight } from '@polkadot/types/lookup';
export type __AugmentedSubmittable = AugmentedSubmittable<() => unknown>;
export type __SubmittableExtrinsic<ApiType extends ApiTypes> = SubmittableExtrinsic<ApiType>;
export type __SubmittableExtrinsicFunction<ApiType extends ApiTypes> = SubmittableExtrinsicFunction<ApiType>;
declare module '@polkadot/api-base/types/submittable' {
interface AugmentedSubmittables<ApiType extends ApiTypes> {
asset: {
/**
* Accepts an asset ownership transfer.
*
* Consumes the authorization `auth_id` (see `pallet_identity::consume_auth`).
* NB: To reject the transfer, call remove auth function in identity module.
*
* # Arguments
* * `origin` - The origin of the call, which can be the primary or secondary key of an identity.
* * `auth_id` - Authorization ID of the asset ownership transfer authorization.
*
* # Events
* * `AssetOwnershipTransferred` - When a asset ownership is successfully transferred.
*
* # Errors
* * `TickerRegistrationNotFound` - If the ticker registration is not found.
* * `TickerIsAlreadyLinkedToAnAsset` - If the ticker is already linked to an asset.
**/
acceptAssetOwnershipTransfer: AugmentedSubmittable<(authId: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [
u64
]>;
/**
* Accepts a ticker transfer.
*
* Consumes the authorization `auth_id` (see `pallet_identity::consume_auth`).
* NB: To reject the transfer, call remove auth function in identity module.
*
* # Arguments
* * `origin` - The origin of the call, which can be the primary or secondary key of an identity.
* * `auth_id` - Authorization ID of ticker transfer authorization.
*
* # Events
* * `TickerTransferred` - When a ticker is successfully transferred.
*
* # Errors
* * `TickerRegistrationNotFound` - If the ticker registration is not found.
* * `TickerIsAlreadyLinkedToAnAsset` - If the ticker is already linked to an asset.
**/
acceptTickerTransfer: AugmentedSubmittable<(authId: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [
u64
]>;
/**
* Add documents for a given asset.
*
* This function allows the asset issuer or an external agent to add documents to an asset.
*
* # Arguments
* * `origin` - The origin of the call, which can be the primary or secondary key of an identity.
* * `asset_id` - The [`AssetId`] associated to the asset.
* * `docs` - Documents to be attached to the asset.
*
* # Permissions
* * Asset
*
* # Events
* * `DocumentAdded` - When a document is successfully added to an asset.
*
* # Errors
* * `CounterOverflow` - If the document ID counter overflows.
**/
addDocuments: AugmentedSubmittable<(docs: Vec<PolymeshPrimitivesDocument> | (PolymeshPrimitivesDocument | {
uri?: any;
contentHash?: any;
name?: any;
docType?: any;
filingDate?: any;
} | string | Uint8Array)[], assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
Vec<PolymeshPrimitivesDocument>,
PolymeshPrimitivesAssetAssetId
]>;
/**
* Sets all identities in the `mediators` set as mandatory mediators for any instruction transferring `asset_id`.
*
* This function allows the asset issuer or an external agent to add mandatory mediators for an asset.
*
* # Arguments
* * `origin` - The origin of the call, which can be the primary or secondary key of an identity.
* * `asset_id` - The [`AssetId`] of the asset that will require the mediators.
* * `mediators` - A set of [`IdentityId`] of all the mandatory mediators for the given ticker.
*
* # Permissions
* * Asset
*
* # Events
* * `AssetMediatorsAdded` - When the mandatory mediators are successfully added.
*
* # Errors
* * `NumberOfAssetMediatorsExceeded` - If the number of mandatory mediators exceeds the maximum allowed limit.
**/
addMandatoryMediators: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, mediators: BTreeSet<PolymeshPrimitivesIdentityId>) => SubmittableExtrinsic<ApiType>, [
PolymeshPrimitivesAssetAssetId,
BTreeSet<PolymeshPrimitivesIdentityId>
]>;
/**
* Forces a transfer of tokens from `from_portfolio` to the caller's default portfolio.
*
* This function allows the asset issuer or an external agent to force a transfer of tokens from one portfolio to another.
*
* # Arguments
* * `origin` - The origin of the call, which can be the primary or secondary key of an identity.
* * `asset_id` - The [`AssetId`] associated to the asset.
* * `value` - The [`Balance`] of tokens that will be transferred.
* * `from_portfolio` - The [`PortfolioId`] that will have its balance reduced.
*
* # Permissions
* * Asset
* * Portfolio
*
* # Events
* * `ControllerTransfer` - When tokens are successfully transferred.
*
* # Errors
* * `UnexpectedNonFungibleToken` - If the asset is a non-fungible token.
* * `InvalidGranularity` - If the amount to transfer does not meet the granularity requirements.
* * `TotalSupplyOverflow` - If the total supply exceeds the maximum allowed limit.
**/
controllerTransfer: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, value: u128 | AnyNumber | Uint8Array, fromPortfolio: PolymeshPrimitivesIdentityIdPortfolioId | {
did?: any;
kind?: any;
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
PolymeshPrimitivesAssetAssetId,
u128,
PolymeshPrimitivesIdentityIdPortfolioId
]>;
/**
* Creates a new asset.
*
* The total supply will initially be zero. To mint tokens, use [`Pallet::issue`].
*
* # Arguments
* * `origin` - The origin of the call, which can be the primary or secondary key of an identity.
* * `asset_name` - The [`AssetName`] of the new asset.
* * `divisible` - Sets [`AssetDetails::divisible`], where `true` means the asset is divisible.
* * `asset_type` - The [`AssetType`] of the new asset.
* * `asset_identifiers` - A vector of [`AssetIdentifier`].
* * `funding_round_name` - The name of the funding round ([`FundingRoundName`]).
*
* # Events
* * `AssetCreated` - When a new asset is successfully created.
*
* # Errors
* * `MaxLengthOfAssetNameExceeded` - If the asset name length exceeds the maximum allowed length.
* * `InvalidCustomAssetTypeId` - If the custom asset type ID is invalid.
* * `InvalidAssetIdentifier` - If any of the asset identifiers are invalid.
**/
createAsset: AugmentedSubmittable<(assetName: Bytes | string | Uint8Array, divisible: bool | boolean | Uint8Array, assetType: PolymeshPrimitivesAssetAssetType | {
EquityCommon: any;
} | {
EquityPreferred: any;
} | {
Commodity: any;
} | {
FixedIncome: any;
} | {
REIT: any;
} | {
Fund: any;
} | {
RevenueShareAgreement: any;
} | {
StructuredProduct: any;
} | {
Derivative: any;
} | {
Custom: any;
} | {
StableCoin: any;
} | {
NonFungible: any;
} | string | Uint8Array, assetIdentifiers: Vec<PolymeshPrimitivesAssetIdentifier> | (PolymeshPrimitivesAssetIdentifier | {
CUSIP: any;
} | {
CINS: any;
} | {
ISIN: any;
} | {
LEI: any;
} | {
FIGI: any;
} | string | Uint8Array)[], fundingRoundName: Option<Bytes> | null | Uint8Array | Bytes | string) => SubmittableExtrinsic<ApiType>, [
Bytes,
bool,
PolymeshPrimitivesAssetAssetType,
Vec<PolymeshPrimitivesAssetIdentifier>,
Option<Bytes>
]>;
/**
* Creates a new asset with a new custom asset type.
*
* The total supply will initially be zero. To mint tokens, use [`Pallet::issue`].
*
* # Arguments
* * `origin` - The origin of the call, which can be the primary or secondary key of an identity.
* * `asset_name` - The [`AssetName`] of the new asset.
* * `divisible` - Sets [`AssetDetails::divisible`], where `true` means the asset is divisible.
* * `custom_asset_type` - The custom asset type of the asset.
* * `asset_identifiers` - A vector of [`AssetIdentifier`].
* * `funding_round_name` - The name of the funding round ([`FundingRoundName`]).
*
* # Events
* * `AssetCreated` - When a new asset is successfully created.
* * `CustomAssetTypeRegistered` - When a new custom asset type is successfully registered.
* * `CustomAssetTypeAlreadyRegistered` - When the custom asset type is already registered.
*
* # Errors
* * `MaxLengthOfAssetNameExceeded` - If the asset name length exceeds the maximum allowed length.
* * `InvalidCustomAssetTypeId` - If the custom asset type ID is invalid.
* * `InvalidAssetIdentifier` - If any of the asset identifiers are invalid.
* * `TooLong` - If the custom asset type length exceeds the maximum allowed length.
**/
createAssetWithCustomType: AugmentedSubmittable<(assetName: Bytes | string | Uint8Array, divisible: bool | boolean | Uint8Array, customAssetType: Bytes | string | Uint8Array, assetIdentifiers: Vec<PolymeshPrimitivesAssetIdentifier> | (PolymeshPrimitivesAssetIdentifier | {
CUSIP: any;
} | {
CINS: any;
} | {
ISIN: any;
} | {
LEI: any;
} | {
FIGI: any;
} | string | Uint8Array)[], fundingRoundName: Option<Bytes> | null | Uint8Array | Bytes | string) => SubmittableExtrinsic<ApiType>, [
Bytes,
bool,
Bytes,
Vec<PolymeshPrimitivesAssetIdentifier>,
Option<Bytes>
]>;
/**
* Pre-approves the receivement of the asset for all identities.
*
* This function allows the root origin to pre-approve the receivement of an asset for all identities.
*
* # Arguments
* * `origin` - The root origin.
* * `asset_id` - The [`AssetId`] that will be exempt from affirmation.
*
* # Events
* * `AssetAffirmationExemption` - When the asset is successfully exempted from affirmation.
**/
exemptAssetAffirmation: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
PolymeshPrimitivesAssetAssetId
]>;
/**
* Freezes transfers of a given asset.
*
* This function allows the asset issuer or an external agent to freeze transfers of a given asset.
*
* # Arguments
* * `origin` - The origin of the call, which can be the primary or secondary key of an identity.
* * `asset_id` - The asset to freeze.
*
* # Permissions
* * Asset
*
* # Events
* * `AssetFrozen` - When an asset is successfully frozen.
*
* # Errors
* * `NoSuchAsset` - If the asset does not exist.
* * `AlreadyFrozen` - If the asset is already frozen.
**/
freeze: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
PolymeshPrimitivesAssetAssetId
]>;
/**
* Issue (i.e mint) new tokens to the caller, which must be an authorized external agent.
*
* This function allows the asset issuer or an external agent to mint new tokens for a given asset.
*
* # Arguments
* * `origin`: A signer that has permissions to act as an agent of `ticker`.
* * `asset_id`: the [`AssetId`] associated to the asset.
* * `amount`: The amount of tokens that will be issued.
* * `portfolio_kind`: The [`PortfolioKind`] of the portfolio that will receive the minted tokens.
*
* # Permissions
* * Asset
* * Portfolio
*
* # Events
* * `AssetBalanceUpdated` - When the asset balance is successfully updated.
*
* # Errors
* * `UnexpectedNonFungibleToken` - If the asset is a non-fungible token.
* * `InvalidGranularity` - If the amount to issue does not meet the granularity requirements.
* * `TotalSupplyOverflow` - If the total supply exceeds the maximum allowed limit.
**/
issue: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, amount: u128 | AnyNumber | Uint8Array, portfolioKind: PolymeshPrimitivesIdentityIdPortfolioKind | {
Default: any;
} | {
User: any;
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
PolymeshPrimitivesAssetAssetId,
u128,
PolymeshPrimitivesIdentityIdPortfolioKind
]>;
/**
* Establishes a connection between a ticker and an AssetId.
*
* This function allows the asset issuer or an external agent to link a ticker to an asset.
*
* # Arguments
* * `origin` - The origin of the call, which can be the primary or secondary key of an identity.
* * `ticker` - The [`Ticker`] that will be linked to the given `asset_id`.
* * `asset_id` - The [`AssetId`] that will be connected to `ticker`.
*
* # Permissions
* * Asset
*
* # Events
* * `TickerLinkedToAsset` - When the ticker is successfully linked to the asset.
*
* # Errors
* * `TickerNotRegisteredToCaller` - If the ticker is not registered to the caller.
* * `TickerRegistrationExpired` - If the ticker registration has expired.
* * `TickerRegistrationNotFound` - If the ticker registration is not found.
* * `TickerIsAlreadyLinkedToAnAsset` - If the ticker is already linked to an asset.
* * `AssetIsAlreadyLinkedToATicker` - If the asset is already linked to a ticker.
**/
linkTickerToAssetId: AugmentedSubmittable<(ticker: PolymeshPrimitivesTicker | string | Uint8Array, assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
PolymeshPrimitivesTicker,
PolymeshPrimitivesAssetAssetId
]>;
/**
* If the asset associated to `asset_id` is indivisible, sets [`AssetDetails::divisible`] to true.
*
* This function allows the asset issuer or an external agent to make an indivisible asset divisible.
*
* # Arguments
* * `origin` - The origin of the call, which can be the primary or secondary key of an identity.
* * `asset_id` - The [`AssetId`] associated to the asset.
*
* # Permissions
* * Asset
*
* # Events
* * `DivisibilityChanged` - When the divisibility of an asset is successfully changed.
*
* # Errors
* * `NoSuchAsset` - If the asset does not exist.
* * `UnexpectedNonFungibleToken` - If the asset is a non-fungible token.
* * `AssetAlreadyDivisible` - If the asset is already divisible.
**/
makeDivisible: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
PolymeshPrimitivesAssetAssetId
]>;
/**
* Pre-approves the receivement of an asset.
*
* # Arguments
* * `origin` - The origin of the call, which can be the primary or secondary key of an identity.
* * `asset_id` - The [`AssetId`] that will be exempt from affirmation.
*
* # Permissions
* * Asset
*
* # Events
* * `PreApprovedAsset` - When the asset is successfully pre-approved for receivement.
**/
preApproveAsset: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
PolymeshPrimitivesAssetAssetId
]>;
/**
* Redeems (i.e burns) existing tokens by reducing the balance of the caller's portfolio and the total supply of the asset.
*
* This function allows the asset issuer or an external agent to redeem tokens from a given asset.
*
* # Arguments
* * `origin`: is a signer that has permissions to act as an agent of `asset_id`.
* * `asset_id`: the [`AssetId`] associated to the asset.
* * `value`: amount of tokens to redeem.
* * `portfolio_kind`: the [`PortfolioKind`] that will have its balance reduced.
*
* # Permissions
* * Asset
* * Portfolio
*
* # Events
* * `AssetBalanceUpdated` - When the asset balance is successfully updated.
*
* # Errors
* * `UnexpectedNonFungibleToken` - If the asset is a non-fungible token.
* * `InvalidGranularity` - If the value to redeem does not meet the granularity requirements.
* * `TotalSupplyOverflow` - If the total supply exceeds the maximum allowed limit.
**/
redeem: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, value: u128 | AnyNumber | Uint8Array, portfolioKind: PolymeshPrimitivesIdentityIdPortfolioKind | {
Default: any;
} | {
User: any;
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
PolymeshPrimitivesAssetAssetId,
u128,
PolymeshPrimitivesIdentityIdPortfolioKind
]>;
/**
* Registers and set local asset metadata.
*
* This function allows the asset issuer or an external agent to register and set local metadata for an asset.
*
* # Arguments
* * `origin` - The origin of the call, which can be the primary or secondary key of an identity.
* * `asset_id` - The [`AssetId`] associated to the asset.
* * `name` - The [`AssetMetadataName`].
* * `spec` - The asset metadata specifications ([`AssetMetadataSpec`]).
* * `value` - The [`AssetMetadataValue`] of the given metadata key.
* * `details` - Optional [`AssetMetadataValueDetail`] (expire, lock status).
*
* # Permissions
* * Asset
*
* # Events
* * `RegisterAssetMetadataLocalType` - When the local asset metadata type is successfully registered.
* * `SetAssetMetadataValue` - When the asset metadata value is successfully set.
*
* # Errors
* * `AssetMetadataLocalKeyAlreadyExists` - If the local metadata key already exists.
* * `AssetMetadataValueIsLocked` - If the metadata value is locked.
* * `AssetMetadataValueMaxLengthExceeded` - If the metadata value length exceeds the maximum allowed length.
**/
registerAndSetLocalAssetMetadata: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, name: Bytes | string | Uint8Array, spec: PolymeshPrimitivesAssetMetadataAssetMetadataSpec | {
url?: any;
description?: any;
typeDef?: any;
} | string | Uint8Array, value: Bytes | string | Uint8Array, detail: Option<PolymeshPrimitivesAssetMetadataAssetMetadataValueDetail> | null | Uint8Array | PolymeshPrimitivesAssetMetadataAssetMetadataValueDetail | {
expire?: any;
lockStatus?: any;
} | string) => SubmittableExtrinsic<ApiType>, [
PolymeshPrimitivesAssetAssetId,
Bytes,
PolymeshPrimitivesAssetMetadataAssetMetadataSpec,
Bytes,
Option<PolymeshPrimitivesAssetMetadataAssetMetadataValueDetail>
]>;
/**
* Registers asset metadata global type.
*
* This function allows the root origin to register a global metadata type.
*
* # Arguments
* * `origin` - The root origin.
* * `name` - The [`AssetMetadataName`].
* * `spec` - The asset metadata specifications ([`AssetMetadataSpec`]).
*
* # Events
* * `RegisterAssetMetadataGlobalType` - When the global asset metadata type is successfully registered.
*
* # Errors
* * `AssetMetadataGlobalKeyAlreadyExists` - If the global metadata key already exists.
* * `AssetMetadataNameMaxLengthExceeded` - If the metadata name length exceeds the maximum allowed length.
* * `AssetMetadataTypeDefMaxLengthExceeded` - If the metadata type definition length exceeds the maximum allowed length.
**/
registerAssetMetadataGlobalType: AugmentedSubmittable<(name: Bytes | string | Uint8Array, spec: PolymeshPrimitivesAssetMetadataAssetMetadataSpec | {
url?: any;
description?: any;
typeDef?: any;
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
Bytes,
PolymeshPrimitivesAssetMetadataAssetMetadataSpec
]>;
/**
* Registers asset metadata local type.
*
* This function allows the asset issuer or an external agent to register a local metadata type for an asset.
*
* # Arguments
* * `origin` - The origin of the call, which can be the primary or secondary key of an identity.
* * `asset_id` - The [`AssetId`] associated to the asset.
* * `name` - The [`AssetMetadataName`].
* * `spec` - The asset metadata specifications ([`AssetMetadataSpec`]).
*
* # Permissions
* * Asset
*
* # Events
* * `RegisterAssetMetadataLocalType` - When the local asset metadata type is successfully registered.
*
* # Errors
* * `AssetMetadataLocalKeyAlreadyExists` - If the local metadata key already exists.
* * `AssetMetadataNameMaxLengthExceeded` - If the metadata name length exceeds the maximum allowed length.
* * `AssetMetadataTypeDefMaxLengthExceeded` - If the metadata type definition length exceeds the maximum allowed length.
**/
registerAssetMetadataLocalType: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, name: Bytes | string | Uint8Array, spec: PolymeshPrimitivesAssetMetadataAssetMetadataSpec | {
url?: any;
description?: any;
typeDef?: any;
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
PolymeshPrimitivesAssetAssetId,
Bytes,
PolymeshPrimitivesAssetMetadataAssetMetadataSpec
]>;
/**
* Registers a custom asset type.
*
* # Arguments
* * `origin` - The origin of the call, which can be the primary or secondary key of an identity.
* * `ty` - Contains the string representation of the asset type.
*
* # Events
* * `CustomAssetTypeRegistered` - When a new custom asset type is successfully registered.
* * `CustomAssetTypeAlreadyRegistered` - When the custom asset type is already registered.
*
* # Errors
* * `TooLong` - If the custom asset type length exceeds the maximum allowed length.
**/
registerCustomAssetType: AugmentedSubmittable<(ty: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
Bytes
]>;
/**
* Registers a unique ticker or extends the validity of an existing ticker.
*
* This function allows the caller to register a new ticker or extend the registration
* of an existing ticker. The ticker validity does not carry forward when renewing.
*
* # Arguments
* * `origin` - The origin of the call, which can be the primary or secondary key of an identity.
* * `ticker` - The ticker to register.
*
* # Events
* * `TickerRegistered` - When a ticker is successfully registered.
*
* # Errors
* * `TickerAlreadyRegistered` - If the ticker is already registered.
* * `TickerTooLong` - If the ticker length exceeds the maximum allowed length.
* * `InvalidTickerCharacter` - If the ticker contains invalid characters.
**/
registerUniqueTicker: AugmentedSubmittable<(ticker: PolymeshPrimitivesTicker | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
PolymeshPrimitivesTicker
]>;
/**
* Removes the pre-approval of the asset for all identities.
*
* This function allows the root origin to remove the pre-approval of an asset for all identities.
*
* # Arguments
* * `origin` - The root origin.
* * `asset_id` - The [`AssetId`] that will have its exemption removed.
*
* # Events
* * `RemoveAssetAffirmationExemption` - When the asset's affirmation exemption is successfully removed.
**/
removeAssetAffirmationExemption: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
PolymeshPrimitivesAssetAssetId
]>;
/**
* Removes the pre-approval of an asset.
*
* # Arguments
* * `origin` - The origin of the call, which can be the primary or secondary key of an identity.
* * `asset_id` - The [`AssetId`] that will have its exemption removed.
*
* # Permissions
* * Asset
*
* # Events
* * `RemovePreApprovedAsset` - When the asset's pre-approval is successfully removed.
**/
removeAssetPreApproval: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
PolymeshPrimitivesAssetAssetId
]>;
/**
* Remove documents for a given asset.
*
* This function allows the asset issuer or an external agent to remove documents from an asset.
*
* # Arguments
* * `origin` - The origin of the call, which can be the primary or secondary key of an identity.
* * `asset_id` - The [`AssetId`] associated to the asset.
* * `docs_id` - A vector of all [`DocumentId`] that will be removed from the asset.
*
* # Permissions
* * Asset
*
* # Events
* * `DocumentRemoved` - When a document is successfully removed from an asset.
**/
removeDocuments: AugmentedSubmittable<(docsId: Vec<u32> | (u32 | AnyNumber | Uint8Array)[], assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
Vec<u32>,
PolymeshPrimitivesAssetAssetId
]>;
/**
* Removes the asset metadata key and value of a local key.
*
* This function allows the asset issuer or an external agent to remove a local metadata key and its value for an asset.
*
* # Arguments
* * `origin` - The origin of the call, which can be the primary or secondary key of an identity.
* * `asset_id` - The [`AssetId`] associated to the local metadata key.
* * `local_key` - The [`AssetMetadataLocalKey`] that will be removed.
*
* # Permissions
* * Asset
*
* # Events
* * `LocalMetadataKeyDeleted` - When the local metadata key is successfully deleted.
*
* # Errors
* * `AssetMetadataKeyIsMissing` - If the local metadata key is missing.
* * `AssetMetadataValueIsLocked` - If the metadata value is locked.
* * `AssetMetadataKeyBelongsToNFTCollection` - If the metadata key belongs to an NFT collection.
**/
removeLocalMetadataKey: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, localKey: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [
PolymeshPrimitivesAssetAssetId,
u64
]>;
/**
* Removes all identities in the `mediators` set from the mandatory mediators list for the given `asset_id`.
*
* This function allows the asset issuer or an external agent to remove mandatory mediators for an asset.
*
* # Arguments
* * `origin` - The origin of the call, which can be the primary or secondary key of an identity.
* * `asset_id` - The [`AssetId`] of the asset that will have mediators removed.
* * `mediators` - A set of [`IdentityId`] of all the mediators that will be removed from the mandatory mediators list.
*
* # Permissions
* * Asset
*
* # Events
* * `AssetMediatorsRemoved` - When the mandatory mediators are successfully removed.
**/
removeMandatoryMediators: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, mediators: BTreeSet<PolymeshPrimitivesIdentityId>) => SubmittableExtrinsic<ApiType>, [
PolymeshPrimitivesAssetAssetId,
BTreeSet<PolymeshPrimitivesIdentityId>
]>;
/**
* Removes the asset metadata value of a metadata key.
*
* This function allows the asset issuer or an external agent to remove a metadata value for an asset.
*
* # Arguments
* * `origin` - The origin of the call, which can be the primary or secondary key of an identity.
* * `asset_id` - The [`AssetId`] associated to the metadata key.
* * `metadata_key` - The [`AssetMetadataKey`] that will have its value deleted.
*
* # Permissions
* * Asset
*
* # Events
* * `MetadataValueDeleted` - When the metadata value is successfully deleted.
*
* # Errors
* * `AssetMetadataKeyIsMissing` - If the metadata key is missing.
* * `AssetMetadataValueIsLocked` - If the metadata value is locked.
**/
removeMetadataValue: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, metadataKey: PolymeshPrimitivesAssetMetadataAssetMetadataKey | {
Global: any;
} | {
Local: any;
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
PolymeshPrimitivesAssetAssetId,
PolymeshPrimitivesAssetMetadataAssetMetadataKey
]>;
/**
* Updates the [`AssetName`] associated to an asset.
*
* This function allows the asset issuer or an external agent to update the name of an asset.
*
* # Arguments
* * `origin` - The origin of the call, which can be the primary or secondary key of an identity.
* * `asset_id` - The [`AssetId`] associated to the asset.
* * `asset_name` - The new [`AssetName`] that will be associated to the asset.
*
* # Permissions
* * Asset
*
* # Events
* * `AssetRenamed` - When an asset is successfully renamed.
*
* # Errors
* * `MaxLengthOfAssetNameExceeded` - If the asset name length exceeds the maximum allowed length.
* * `NoSuchAsset` - If the asset does not exist.
**/
renameAsset: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, assetName: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
PolymeshPrimitivesAssetAssetId,
Bytes
]>;
/**
* Set asset metadata value.
*
* This function allows the asset issuer or an external agent to set metadata for an asset.
*
* # Arguments
* * `origin` - The origin of the call, which can be the primary or secondary key of an identity.
* * `asset_id` - The [`AssetId`] associated to the asset.
* * `key` - The [`AssetMetadataKey`] associated to the asset.
* * `value` - The [`AssetMetadataValue`] of the given metadata key.
* * `details` - Optional [`AssetMetadataValueDetail`] (expire, lock status).
*
* # Permissions
* * Asset
*
* # Events
* * `SetAssetMetadataValue` - When the asset metadata value is successfully set.
*
* # Errors
* * `AssetMetadataKeyIsMissing` - If the metadata key is missing.
* * `AssetMetadataValueIsLocked` - If the metadata value is locked.
* * `AssetMetadataValueMaxLengthExceeded` - If the metadata value length exceeds the maximum allowed length.
**/
setAssetMetadata: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, key: PolymeshPrimitivesAssetMetadataAssetMetadataKey | {
Global: any;
} | {
Local: any;
} | string | Uint8Array, value: Bytes | string | Uint8Array, detail: Option<PolymeshPrimitivesAssetMetadataAssetMetadataValueDetail> | null | Uint8Array | PolymeshPrimitivesAssetMetadataAssetMetadataValueDetail | {
expire?: any;
lockStatus?: any;
} | string) => SubmittableExtrinsic<ApiType>, [
PolymeshPrimitivesAssetAssetId,
PolymeshPrimitivesAssetMetadataAssetMetadataKey,
Bytes,
Option<PolymeshPrimitivesAssetMetadataAssetMetadataValueDetail>
]>;
/**
* Set asset metadata value details (expire, lock status).
*
* This function allows the asset issuer or an external agent to set metadata details for an asset.
*
* # Arguments
* * `origin` - The origin of the call, which can be the primary or secondary key of an identity.
* * `asset_id` - The [`AssetId`] associated to the asset.
* * `key` - The [`AssetMetadataKey`] associated to the asset.
* * `details` - The [`AssetMetadataValueDetail`] (expire, lock status) that will be associated to the asset.
*
* # Permissions
* * Asset
*
* # Events
* * `SetAssetMetadataValueDetails` - When the asset metadata value details are successfully set.
*
* # Errors
* * `AssetMetadataKeyIsMissing` - If the metadata key is missing.
* * `AssetMetadataValueIsLocked` - If the metadata value is locked.
* * `AssetMetadataValueIsEmpty` - If the metadata value is empty.
**/
setAssetMetadataDetails: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, key: PolymeshPrimitivesAssetMetadataAssetMetadataKey | {
Global: any;
} | {
Local: any;
} | string | Uint8Array, detail: PolymeshPrimitivesAssetMetadataAssetMetadataValueDetail | {
expire?: any;
lockStatus?: any;
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
PolymeshPrimitivesAssetAssetId,
PolymeshPrimitivesAssetMetadataAssetMetadataKey,
PolymeshPrimitivesAssetMetadataAssetMetadataValueDetail
]>;
/**
* Sets the name of the current funding round.
*
* This function allows the asset issuer or an external agent to set the name of the current funding round for an asset.
*
* # Arguments
* * `origin` - The origin of the call, which can be the primary or secondary key of an identity.
* * `asset_id` - The [`AssetId`] associated to the asset.
* * `funding_round_name` - The [`FundingRoundName`] of the current funding round.
*
* # Permissions
* * Asset
*
* # Events
* * `FundingRoundSet` - When the funding round name is successfully set.
*
* # Errors
* * `FundingRoundNameMaxLengthExceeded` - If the funding round name length exceeds the maximum allowed length.
**/
setFundingRound: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, fundingRoundName: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
PolymeshPrimitivesAssetAssetId,
Bytes
]>;
/**
* Unfreezes transfers of a given asset.
*
* This function allows the asset issuer or an external agent to unfreeze transfers of a given asset.
*
* # Arguments
* * `origin` - The origin of the call, which can be the primary or secondary key of an identity.
* * `asset_id` - The asset to unfreeze.
*
* # Permissions
* * Asset
*
* # Events
* * `AssetUnfrozen` - When an asset is successfully unfrozen.
*
* # Errors
* * `NoSuchAsset` - If the asset does not exist.
* * `NotFrozen` - If the asset is not frozen.
**/
unfreeze: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
PolymeshPrimitivesAssetAssetId
]>;
/**
* Removes the link between a ticker and an asset.
*
* This function allows the asset issuer or an external agent to unlink a ticker from an asset.
*
* # Arguments
* * `origin` - The origin of the call, which can be the primary or secondary key of an identity.
* * `ticker` - The [`Ticker`] that will be unlinked from the given `asset_id`.
* * `asset_id` - The [`AssetId`] that will be unlinked from `ticker`.
*
* # Permissions
* * Asset
*
* # Events
* * `TickerUnlinkedFromAsset` - When the ticker is successfully unlinked from the asset.
*
* # Errors
* * `TickerNotRegisteredToCaller` - If the ticker is not registered to the caller.
* * `TickerRegistrationNotFound` - If the ticker registration is not found.
* * `TickerIsNotLinkedToTheAsset` - If the ticker is not linked to the asset.
**/
unlinkTickerFromAssetId: AugmentedSubmittable<(ticker: PolymeshPrimitivesTicker | string | Uint8Array, assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
PolymeshPrimitivesTicker,
PolymeshPrimitivesAssetAssetId
]>;
/**
* Updates the type of an asset.
*
* This function allows the asset issuer or an external agent to update the type of an asset.
*
* # Arguments
* * `origin` - The origin of the call, which can be the primary or secondary key of an identity.
* * `asset_id` - The [`AssetId`] associated to the asset.
* * `asset_type` - The new [`AssetType`] of the asset.
*
* # Permissions
* * Asset
*
* # Events
* * `AssetTypeChanged` - When the asset type is successfully changed.
*
* # Errors
* * `NoSuchAsset` - If the asset does not exist.
* * `InvalidCustomAssetTypeId` - If the custom asset type ID is invalid.
* * `IncompatibleAssetTypeUpdate` - If the new asset type is incompatible with the existing asset type.
**/
updateAssetType: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, assetType: PolymeshPrimitivesAssetAssetType | {
EquityCommon: any;
} | {
EquityPreferred: any;
} | {
Commodity: any;
} | {
FixedIncome: any;
} | {
REIT: any;
} | {
Fund: any;
} | {
RevenueShareAgreement: any;
} | {
StructuredProduct: any;
} | {
Derivative: any;
} | {
Custom: any;
} | {
StableCoin: any;
} | {
NonFungible: any;
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
PolymeshPrimitivesAssetAssetId,
PolymeshPrimitivesAssetAssetType
]>;
/**
* Updates the global metadata specification.
*
* # Arguments
* * `origin` - The origin of the call, which can be the primary or secondary key of an identity.
* * `asset_metadata_name` - The [`AssetMetadataName`] associated with the global metadata.
* * `asset_metadata_spec` - The new [`AssetMetadataSpec`] that will be associated with the global metadata.
*
* # Events
* * `GlobalMetadataSpecUpdated` - When the global metadata specification is successfully updated.
*
* # Errors
* * `BadOrigin` - If the origin is not authorized.
* * `TooLong` - If the metadata url or description length exceeds the maximum allowed length.
* * `AssetMetadataTypeDefMaxLengthExceeded` - If the metadata type definition length exceeds the maximum allowed length.
**/
updateGlobalMetadataSpec: AugmentedSubmittable<(assetMetadataName: Bytes | string | Uint8Array, assetMetadataSpec: PolymeshPrimitivesAssetMetadataAssetMetadataSpec | {
url?: any;
description?: any;
typeDef?: any;
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
B