Skip to main content
Version: 30.0.x

Class: MultiSig

Defined in: src/api/entities/Account/MultiSig/index.ts:49

Represents a MultiSig Account. A MultiSig Account is composed of one or more signing Accounts. In order to submit a transaction, a specific amount of those signing Accounts must approve it first

Extends​

Properties​

address​

address: string

Defined in: src/api/entities/Account/index.ts:110

Polymesh-specific address of the Account. Serves as an identifier

Inherited from​

Account.address


authorizations​

authorizations: Authorizations<Account>

Defined in: src/api/entities/Account/index.ts:119

Inherited from​

Account.authorizations


key​

key: string

Defined in: src/api/entities/Account/index.ts:116

A hex representation of the cryptographic public key of the Account. This is consistent across Substrate chains, while the address depends on the chain as well.

Inherited from​

Account.key


staking​

staking: Staking

Defined in: src/api/entities/Account/index.ts:121

Inherited from​

Account.staking


subsidies​

subsidies: Subsidies

Defined in: src/api/entities/Account/index.ts:120

Inherited from​

Account.subsidies


uuid​

uuid: string

Defined in: src/api/entities/Entity.ts:46

Inherited from​

Account.uuid

Methods​

checkPermissions()​

checkPermissions(permissions: SimplePermissions): Promise<CheckPermissionsResult<Account>>

Defined in: src/api/entities/Account/index.ts:395

Check if this Account possesses certain Permissions to act on behalf of its corresponding Identity

Parameters​

ParameterType

permissions

SimplePermissions

Returns​

Promise<CheckPermissionsResult<Account>>

which permissions the Account is missing (if any) and the final result

Inherited from​

Account.checkPermissions


details()​

details(): Promise<MultiSigDetails>

Defined in: src/api/entities/Account/MultiSig/index.ts:80

Return details about this MultiSig such as the signing Accounts and the required number of signatures to execute a MultiSigProposal

Returns​

Promise<MultiSigDetails>


exists()​

exists(): Promise<boolean>

Defined in: src/api/entities/Account/index.ts:478

Determine whether this Account exists on chain

Returns​

Promise<boolean>

Inherited from​

Account.exists


getAdmin()​

getAdmin(): Promise<Identity | null>

Defined in: src/api/entities/Account/MultiSig/index.ts:264

Returns the Identity of the MultiSig admin. This Identity can add or remove signers directly without creating a MultiSigProposal first.

Returns​

Promise<Identity | null>


getAssetBalances()​

getAssetBalances(args?: object): Promise<PortfolioBalance[]>

Defined in: src/api/entities/Account/index.ts:684

Retrieve the balances of all fungible assets in this Account

Parameters​

ParameterTypeDescription

args?

{ assets: (string | FungibleAsset)[]; }

‐

args.assets?

(string | FungibleAsset)[]

array of FungibleAssets (or tickers) for which to fetch balances (optional, all balances are retrieved if not passed)

Returns​

Promise<PortfolioBalance[]>

Inherited from​

Account.getAssetBalances


getBalance()​

Call Signature​

getBalance(): Promise<Balance>

Defined in: src/api/entities/Account/index.ts:145

Get the free/locked POLYX balance of the Account

Returns​

Promise<Balance>

Promise that resolves to the Account's POLYX balance information

Inherited from​

Account.getBalance

Call Signature​

getBalance(callback: SubCallback<Balance>): Promise<UnsubCallback>

Defined in: src/api/entities/Account/index.ts:156

Get the free/locked POLYX balance of the Account (with subscription support)

Parameters​
ParameterTypeDescription

callback

SubCallback<Balance>

Callback function that receives balance updates

Returns​

Promise<UnsubCallback>

Promise that resolves to an unsubscribe function

Note​

can be subscribed to, if connected to node using a web socket

Inherited from​

Account.getBalance


getCollections()​

getCollections(args?: object): Promise<PortfolioCollection[]>

Defined in: src/api/entities/Account/index.ts:764

Retrieve the NFTs held in this Account

Parameters​

ParameterTypeDescription

args?

{ collections: (string | NftCollection)[]; }

‐

args.collections?

(string | NftCollection)[]

array of NftCollection (or tickers) for which to fetch holdings (optional, all holdings are retrieved if not passed)

Returns​

Promise<PortfolioCollection[]>

Inherited from​

Account.getCollections


getCurrentNonce()​

getCurrentNonce(): Promise<BigNumber>

Defined in: src/api/entities/Account/index.ts:492

Retrieve the current nonce for this Account

Returns​

Promise<BigNumber>

Inherited from​

Account.getCurrentNonce


getHistoricalProposals()​

getHistoricalProposals(opts?: object): Promise<ResultSet<HistoricalMultiSigProposal>>

Defined in: src/api/entities/Account/MultiSig/index.ts:198

Return a set of MultiSigProposal for this MultiSig Account

Parameters​

ParameterType

opts?

{ size?: BigNumber; start?: BigNumber; }

opts.size?

BigNumber

opts.start?

BigNumber

Returns​

Promise<ResultSet<HistoricalMultiSigProposal>>

Note​

uses the middlewareV2


getIdentity()​

getIdentity(): Promise<Identity | null>

Defined in: src/api/entities/Account/index.ts:175

Retrieve the Identity associated to this Account (null if there is none)

Returns​

Promise<Identity | null>

Inherited from​

Account.getIdentity


getMultiSig()​

getMultiSig(): Promise<MultiSig | null>

Defined in: src/api/entities/Account/index.ts:450

Fetch the MultiSig this Account is part of. If this Account is not a signer on any MultiSig, return null

Returns​

Promise<MultiSig | null>

Inherited from​

Account.getMultiSig


getNextAssetId()​

getNextAssetId(): Promise<string>

Defined in: src/api/entities/Account/index.ts:637

Returns next assetID that will be generated for this Identity

Returns​

Promise<string>

Inherited from​

Account.getNextAssetId


getOffChainReceipts()​

getOffChainReceipts(): Promise<BigNumber[]>

Defined in: src/api/entities/Account/index.ts:610

Returns all off chain receipts used by this Account

Returns​

Promise<BigNumber[]>

Inherited from​

Account.getOffChainReceipts


getPayer()​

getPayer(): Promise<Identity | null>

Defined in: src/api/entities/Account/MultiSig/index.ts:290

Returns the payer for the MultiSig, if set the primary account of the identity will pay for any fees the MultiSig may incur

Returns​

Promise<Identity | null>


getPendingProposals()​

getPendingProposals(): Promise<MultiSigProposal[]>

Defined in: src/api/entities/Account/index.ts:594

Returns pending MultiSig proposals for this Account

Returns​

Promise<MultiSigProposal[]>

Note​

uses the middleware

Throws​

if the Account is not a signer on any MultiSig

Inherited from​

Account.getPendingProposals


getPermissions()​

getPermissions(): Promise<Permissions>

Defined in: src/api/entities/Account/index.ts:342

Retrieve the Permissions this Account has as a Permissioned Account for its corresponding Identity

Returns​

Promise<Permissions>

Throws​

if there is no Identity associated with the Account

Inherited from​

Account.getPermissions


getPolyxTransactions()​

getPolyxTransactions(filters: object): Promise<ResultSet<HistoricPolyxTransaction>>

Defined in: src/api/entities/Account/index.ts:576

Returns POLYX transactions associated with this account

Parameters​

ParameterTypeDescription

filters

{ size?: BigNumber; start?: BigNumber; }

‐

filters.size?

BigNumber

page size

filters.start?

BigNumber

page offset

Returns​

Promise<ResultSet<HistoricPolyxTransaction>>

Note​

uses the middleware

Inherited from​

Account.getPolyxTransactions


getProposal()​

getProposal(args: object): Promise<MultiSigProposal>

Defined in: src/api/entities/Account/MultiSig/index.ts:116

Given an ID, fetch a MultiSigProposal for this MultiSig

Parameters​

ParameterType

args

{ id: BigNumber; }

args.id

BigNumber

Returns​

Promise<MultiSigProposal>

Throws​

if the MultiSigProposal is not found


getProposals()​

getProposals(): Promise<MultiSigProposal[]>

Defined in: src/api/entities/Account/MultiSig/index.ts:136

Return all active MultiSig Proposals for this MultiSig Account

Returns​

Promise<MultiSigProposal[]>


getTransactionHistory()​

getTransactionHistory(filters?: object): Promise<ResultSet<ExtrinsicData>>

Defined in: src/api/entities/Account/index.ts:211

Retrieve a list of transactions signed by this Account. Can be filtered using parameters

Parameters​

ParameterTypeDescription

filters

{ blockHash?: string; blockNumber?: BigNumber; orderBy?: ExtrinsicsOrderBy; size?: BigNumber; start?: BigNumber; success?: boolean; tag?: TxTag; }

‐

filters.blockHash?

string

‐

filters.blockNumber?

BigNumber

‐

filters.orderBy?

ExtrinsicsOrderBy

‐

filters.size?

BigNumber

page size

filters.start?

BigNumber

page offset

filters.success?

boolean

whether the transaction was successful or not

filters.tag?

TxTag

tag associated with the transaction

Returns​

Promise<ResultSet<ExtrinsicData>>

Note​

if both blockNumber and blockHash are passed, only blockNumber is taken into account. Also, for ordering by block_id, one should pass ExtrinsicsOrderBy.BlockIdAsc or ExtrinsicsOrderBy.BlockIdDesc in order of their choice (since block ID is a string field in middleware v2)

Note​

uses the middleware v2

Inherited from​

Account.getTransactionHistory


getTypeInfo()​

getTypeInfo(): Promise<AccountTypeInfo>

Defined in: src/api/entities/Account/index.ts:513

Retrieve the type of Account, and its relation to an Identity, if applicable

Returns​

Promise<AccountTypeInfo>

Inherited from​

Account.getTypeInfo


isEqual()​

isEqual(entity: Entity<unknown, unknown>): boolean

Defined in: src/api/entities/Entity.ts:61

Determine whether this Entity is the same as another one

Parameters​

ParameterType

entity

Entity<unknown, unknown>

Returns​

boolean

Inherited from​

Account.isEqual


isFrozen()​

isFrozen(): Promise<boolean>

Defined in: src/api/entities/Account/index.ts:321

Check whether this Account is frozen. If frozen, it cannot perform any Identity related action until the primary Account of the Identity unfreezes all secondary Accounts

Returns​

Promise<boolean>

Note​

returns false if the Account isn't associated to any Identity

Inherited from​

Account.isFrozen


modify()​

modify(args: Pick<ModifyMultiSigParams, "signers" | "requiredSignatures">, opts?: ProcedureOpts): Promise<GenericPolymeshTransaction<void, void>>

Defined in: src/api/entities/Account/MultiSig/index.ts:315

Modify the signers for the MultiSig. The signing Account must belong to the Identity of the creator of the MultiSig

Parameters​

ParameterType

args

Pick<ModifyMultiSigParams, "signers" | "requiredSignatures">

opts?

ProcedureOpts

Returns​

Promise<GenericPolymeshTransaction<void, void>>

Note​

this method is of type ProcedureMethod, which means you can call modify.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it


removePayer()​

removePayer(opts?: ProcedureOpts): Promise<GenericPolymeshTransaction<void, void>>

Defined in: src/api/entities/Account/MultiSig/index.ts:332

A MultiSig's creator is initially responsible for any fees the MultiSig may incur. This method allows for the MultiSig to pay for it's own fees.

Parameters​

ParameterType

opts?

ProcedureOpts

Returns​

Promise<GenericPolymeshTransaction<void, void>>

Note​

This method must be called by one of the MultiSig signer's or by the paying identity.

Note​

this method is of type NoArgsProcedureMethod, which means you can call removePayer.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it


setAdmin()​

setAdmin(args: SetMultiSigAdminParams, opts?: ProcedureOpts): Promise<GenericPolymeshTransaction<void, void>>

Defined in: src/api/entities/Account/MultiSig/index.ts:324

Set an admin for the MultiSig. When setting an admin it must be signed by one of the MultiSig signers and ran as a proposal. When removing an admin it must be called by account belonging to the admin's identity

Parameters​

ParameterType

args

SetMultiSigAdminParams

opts?

ProcedureOpts

Returns​

Promise<GenericPolymeshTransaction<void, void>>

Note​

this method is of type ProcedureMethod, which means you can call setAdmin.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it


toHuman()​

toHuman(): string

Defined in: src/api/entities/Account/index.ts:485

Return the Account's address

Returns​

string

Inherited from​

Account.toHuman


generateUuid()​

static generateUuid<Identifiers>(identifiers: Identifiers): string

Defined in: src/api/entities/Entity.ts:14

Generate the Entity's UUID from its identifying properties

Type Parameters​

Type Parameter

Identifiers

Parameters​

ParameterTypeDescription

identifiers

Identifiers

‐

Returns​

string

Inherited from​

Account.generateUuid


unserialize()​

static unserialize<Identifiers>(serialized: string): Identifiers

Defined in: src/api/entities/Entity.ts:23

Unserialize a UUID into its Unique Identifiers

Type Parameters​

Type Parameter

Identifiers

Parameters​

ParameterTypeDescription

serialized

string

UUID to unserialize

Returns​

Identifiers

Inherited from​

Account.unserialize