Class: MultiSig
api/entities/Account/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
-
↳
MultiSig
Properties
address
• address: string
Polymesh-specific address of the Account. Serves as an identifier
Inherited from
Defined in
api/entities/Account/index.ts:86
authorizations
• authorizations: Authorizations
<Account
>
Inherited from
Defined in
api/entities/Account/index.ts:95
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
Defined in
api/entities/Account/index.ts:92
subsidies
• subsidies: Subsidies
Inherited from
Defined in
api/entities/Account/index.ts:96
uuid
• uuid: string
Inherited from
Defined in
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
Defined in
api/entities/Account/index.ts:377
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
>
Defined in
api/entities/Account/MultiSig/index.ts:87
exists
▸ exists(): Promise
<boolean
>
Determine whether this Account exists on chain
Returns
Promise
<boolean
>
Inherited from
Defined in
api/entities/Account/index.ts:460
getAdmin
▸ getAdmin(): Promise
<null
| Identity
>
Returns the Identity of the MultiSig admin. This Identity can add or remove signers directly without creating a MultiSigProposal first.
Returns
Promise
<null
| Identity
>
Defined in
api/entities/Account/MultiSig/index.ts:251
getBalance
▸ getBalance(): Promise
<Balance
>
Get the free/locked POLYX balance of the Account
Returns
Promise
<Balance
>
Note
can be subscribed to, if connected to node using a web socket
Inherited from
Defined in
api/entities/Account/index.ts:119
▸ getBalance(callback
): Promise
<UnsubCallback
>
Parameters
Name | Type |
---|---|
callback | SubCallback <Balance > |
Returns
Promise
<UnsubCallback
>
Inherited from
Defined in
api/entities/Account/index.ts:120
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
>
Deprecated
use getAdmin
or getPayer
instead depending on your need
Defined in
api/entities/Account/MultiSig/index.ts:316
getCurrentNonce
▸ getCurrentNonce(): Promise
<BigNumber
>
Retrieve the current nonce for this Account
Returns
Promise
<BigNumber
>
Inherited from
Defined in
api/entities/Account/index.ts:474
getHistoricalProposals
▸ getHistoricalProposals(opts?
): Promise
<ResultSet
<MultiSigProposal
>>
Return a set of MultiSigProposal for this MultiSig Account
Parameters
Name | Type |
---|---|
opts? | Object |
opts.size? | BigNumber |
opts.start? | BigNumber |
Returns
Promise
<ResultSet
<MultiSigProposal
>>
Note
uses the middlewareV2
Defined in
api/entities/Account/MultiSig/index.ts:217
getIdentity
▸ getIdentity(): Promise
<null
| Identity
>
Retrieve the Identity associated to this Account (null if there is none)
Returns
Promise
<null
| Identity
>
Inherited from
Defined in
api/entities/Account/index.ts:164
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
Defined in
api/entities/Account/index.ts:432
getNextAssetId
▸ getNextAssetId(): Promise
<string
>
Returns next assetID that will be generated for this Identity
Returns
Promise
<string
>
Inherited from
Defined in
api/entities/Account/index.ts:619
getOffChainReceipts
▸ getOffChainReceipts(): Promise
<BigNumber
[]>
Returns all off chain receipts used by this Account
Returns
Promise
<BigNumber
[]>
Inherited from
Defined in
api/entities/Account/index.ts:592
getPayer
▸ getPayer(): Promise
<null
| Identity
>
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
<null
| Identity
>
Defined in
api/entities/Account/MultiSig/index.ts:283
getPendingProposals
▸ getPendingProposals(): Promise
<MultiSigProposal
[]>
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
Defined in
api/entities/Account/index.ts:576
getPermissions
▸ getPermissions(): Promise
<Permissions
>
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
Defined in
api/entities/Account/index.ts:337
getPolyxTransactions
▸ getPolyxTransactions(filters
): Promise
<ResultSet
<HistoricPolyxTransaction
>>
Returns POLYX transactions associated with this account
Parameters
Name | Type | Description |
---|---|---|
filters | Object | - |
filters.size? | BigNumber | page size |
filters.start? | BigNumber | page offset |
Returns
Promise
<ResultSet
<HistoricPolyxTransaction
>>
Note
uses the middleware
Inherited from
Defined in
api/entities/Account/index.ts:558
getProposal
▸ getProposal(args
): Promise
<MultiSigProposal
>
Given an ID, fetch a MultiSigProposal for this MultiSig
Parameters
Name | Type |
---|---|
args | Object |
args.id | BigNumber |
Returns
Promise
<MultiSigProposal
>
Throws
if the MultiSigProposal is not found
Defined in
api/entities/Account/MultiSig/index.ts:129
getProposals
▸ getProposals(): Promise
<MultiSigProposal
[]>
Return all active MultiSigProposal for this MultiSig Account
Returns
Promise
<MultiSigProposal
[]>
Defined in
api/entities/Account/MultiSig/index.ts:149
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
Returns
Promise
<null
| SubsidyWithAllowance
>
Note
can be subscribed to, if connected to node using a web socket
Deprecated
in favour of subsidies.getSubsidizer
Inherited from
Defined in
api/entities/Account/index.ts:144
▸ getSubsidy(callback
): Promise
<UnsubCallback
>
Parameters
Name | Type |
---|---|
callback | SubCallback <null | SubsidyWithAllowance > |
Returns
Promise
<UnsubCallback
>
Inherited from
Defined in
api/entities/Account/index.ts:145
getTransactionHistory
▸ getTransactionHistory(filters?
): Promise
<ResultSet
<ExtrinsicData
>>
Retrieve a list of transactions signed by this Account. Can be filtered using parameters
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
>>
Note
if both blockNumber
and blockHash
are passed, only blockNumber
is taken into account.
Also, for ordering by block_id, one should pass ExtrinsicsOrderBy.CreatedAtAsc
or ExtrinsicsOrderBy.CreatedAtDesc
in order of their choice (since block ID is a string field in middleware v2)
Note
uses the middleware v2
Inherited from
Defined in
api/entities/Account/index.ts:200
getTypeInfo
▸ getTypeInfo(): Promise
<AccountTypeInfo
>
Retrieve the type of Account, and its relation to an Identity, if applicable
Returns
Promise
<AccountTypeInfo
>
Inherited from
Defined in
api/entities/Account/index.ts:495
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
Defined in
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
Returns
Promise
<boolean
>
Note
returns false if the Account isn't associated to any Identity
Inherited from
Defined in
api/entities/Account/index.ts:316
joinCreator
▸ joinCreator(args?
, opts?
): Promise
<GenericPolymeshTransaction
<void
, void
>>
Attach a MultiSig directly to the creator's identity. This method bypasses the usual authorization step to join an identity
Parameters
Name | Type |
---|---|
args? | JoinCreatorParams |
opts? | ProcedureOpts |
Returns
Promise
<GenericPolymeshTransaction
<void
, void
>>
Note
the caller should be the MultiSig creator's primary key
Note
To attach the MultiSig to an identity other than the creator's, inviteAccount can be used instead. The MultiSig will then need to accept the created authorization
Deprecated
this method is only available in v6 as in v7 the MultiSig is automatically attached to the creator's identity
Note
this method is of type OptionalArgsProcedureMethod, which means you can call joinCreator.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it
Defined in
api/entities/Account/MultiSig/index.ts:404
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
Parameters
Name | Type |
---|---|
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
Defined in
api/entities/Account/MultiSig/index.ts:364
removePayer
▸ removePayer(opts?
): Promise
<GenericPolymeshTransaction
<void
, void
>>
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
Name | Type |
---|---|
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
Defined in
api/entities/Account/MultiSig/index.ts:388
setAdmin
▸ setAdmin(args
, opts?
): Promise
<GenericPolymeshTransaction
<void
, void
>>
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
Name | Type |
---|---|
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
Defined in
api/entities/Account/MultiSig/index.ts:375
toHuman
▸ toHuman(): string
Return the Account's address
Returns
string
Inherited from
Defined in
api/entities/Account/index.ts:467
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
Defined in
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