Skip to content

api.entities.MultiSig.MultiSig

VictorVicente edited this page Mar 30, 2023 · 12 revisions

Class: MultiSig

api/entities/MultiSig.MultiSig

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

Hierarchy

Table of contents

Properties

Methods

Properties

address

address: string

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

Inherited from

Account.address

Defined in

api/entities/Account.ts:274


authorizations

authorizations: Authorizations<Account>

Inherited from

Account.authorizations

Defined in

api/entities/Account.ts:283


key

key: string

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

Defined in

api/entities/Account.ts:280


subsidies

subsidies: Subsidies

Inherited from

Account.subsidies

Defined in

api/entities/Account.ts:284


uuid

uuid: string

Inherited from

Account.uuid

Defined in

api/entities/Entity.ts:46

Methods

checkPermissions

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

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

Parameters

Name Type
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>

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>

Determine whether this Account exists on chain

Returns

Promise<boolean>

Inherited from

Account.exists


getBalance

getBalance(): Promise<Balance>

Get the free/locked POLYX balance of the Account

Note

can be subscribed to

Returns

Promise<Balance>

Inherited from

Account.getBalance

getBalance(callback): Promise<UnsubCallback>

Parameters

Name Type
callback SubCallback<Balance>

Returns

Promise<UnsubCallback>

Inherited from

Account.getBalance


getCreator

getCreator(): Promise<Identity>

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

Returns

Promise<Identity>


getCurrentNonce

getCurrentNonce(): Promise<BigNumber>

Retrieve the current nonce for this Account

Returns

Promise<BigNumber>

Inherited from

Account.getCurrentNonce


getIdentity

getIdentity(): Promise<null | Identity>

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

Returns

Promise<null | Identity>

Inherited from

Account.getIdentity


getMultiSig

getMultiSig(): Promise<null | MultiSig>

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

Returns

Promise<null | MultiSig>

Inherited from

Account.getMultiSig


getPermissions

getPermissions(): Promise<Permissions>

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

Throws

if there is no Identity associated with the Account

Returns

Promise<Permissions>

Inherited from

Account.getPermissions


getProposal

getProposal(args): Promise<MultiSigProposal>

Given an ID, fetch a MultiSigProposal for this MultiSig

Throws

if the MultiSigProposal is not found

Parameters

Name Type
args Object
args.id BigNumber

Returns

Promise<MultiSigProposal>


getProposals

getProposals(): Promise<MultiSigProposal[]>

Return all MultiSigProposal for this MultiSig Account

Returns

Promise<MultiSigProposal[]>


getSubsidy

getSubsidy(): Promise<null | SubsidyWithAllowance>

Get the subsidized balance of this Account and the subsidizer Account. If this Account isn't being subsidized, return null

Note

can be subscribed to

Deprecated

in favour of subsidies.getSubsidizer

Returns

Promise<null | SubsidyWithAllowance>

Inherited from

Account.getSubsidy

getSubsidy(callback): Promise<UnsubCallback>

Parameters

Name Type
callback SubCallback<null | SubsidyWithAllowance>

Returns

Promise<UnsubCallback>

Inherited from

Account.getSubsidy


getTransactionHistory

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

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

Note

if both blockNumber and blockHash are passed, only blockNumber is taken into account

Note

uses the middleware

Parameters

Name Type Description
filters Object -
filters.blockHash? string -
filters.blockNumber? BigNumber -
filters.orderBy? TransactionOrderByInput -
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>>

Inherited from

Account.getTransactionHistory


getTransactionHistoryV2

getTransactionHistoryV2(filters?): Promise<ResultSet<ExtrinsicData>>

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

Note

if both blockNumber and blockHash are passed, only blockNumber is taken into account

Note

uses the middlewareV2

Parameters

Name Type Description
filters Object -
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>>

Inherited from

Account.getTransactionHistoryV2


isEqual

isEqual(entity): boolean

Determine whether this Entity is the same as another one

Parameters

Name Type
entity Entity<unknown, unknown>

Returns

boolean

Inherited from

Account.isEqual


isFrozen

isFrozen(): Promise<boolean>

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

Note

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

Returns

Promise<boolean>

Inherited from

Account.isFrozen


modify

modify(args, opts?): Promise<GenericPolymeshTransaction<void, void>>

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

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

Parameters

Name Type
args Pick<ModifyMultiSigParams, "signers">
opts? ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<void, void>>


toHuman

toHuman(): string

Return the Account's address

Returns

string

Inherited from

Account.toHuman


generateUuid

Static generateUuid<Identifiers>(identifiers): string

Generate the Entity's UUID from its identifying properties

Type parameters

Name
Identifiers

Parameters

Name Type
identifiers Identifiers

Returns

string

Inherited from

Account.generateUuid


unserialize

Static unserialize<Identifiers>(serialized): Identifiers

Unserialize a UUID into its Unique Identifiers

Type parameters

Name
Identifiers

Parameters

Name Type Description
serialized string UUID to unserialize

Returns

Identifiers

Inherited from

Account.unserialize

Clone this wiki locally