api.entities.Account.MultiSig.MultiSig - PolymeshAssociation/polymesh-sdk GitHub Wiki
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
-
↳
MultiSig
- checkPermissions
- details
- exists
- getAdmin
- getBalance
- getCurrentNonce
- getHistoricalProposals
- getIdentity
- getMultiSig
- getNextAssetId
- getOffChainReceipts
- getPayer
- getPendingProposals
- getPermissions
- getPolyxTransactions
- getProposal
- getProposals
- getTransactionHistory
- getTypeInfo
- isEqual
- isFrozen
- modify
- removePayer
- setAdmin
- toHuman
- generateUuid
- unserialize
• address: string
Polymesh-specific address of the Account. Serves as an identifier
api/entities/Account/index.ts:90
• authorizations: Authorizations
<Account
>
api/entities/Account/index.ts:99
• 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.
api/entities/Account/index.ts:96
• staking: Staking
api/entities/Account/index.ts:101
• subsidies: Subsidies
api/entities/Account/index.ts:100
• uuid: string
▸ checkPermissions(permissions
): Promise
<CheckPermissionsResult
<Account
>>
Check if this Account possesses certain Permissions to act on behalf of its corresponding Identity
Name | Type |
---|---|
permissions |
SimplePermissions |
Promise
<CheckPermissionsResult
<Account
>>
which permissions the Account is missing (if any) and the final result
api/entities/Account/index.ts:365
▸ details(): Promise
<MultiSigDetails
>
Return details about this MultiSig such as the signing Accounts and the required number of signatures to execute a MultiSigProposal
Promise
<MultiSigDetails
>
api/entities/Account/MultiSig/index.ts:79
▸ exists(): Promise
<boolean
>
Determine whether this Account exists on chain
Promise
<boolean
>
api/entities/Account/index.ts:448
▸ getAdmin(): Promise
<null
| Identity
>
Returns the Identity of the MultiSig admin. This Identity can add or remove signers directly without creating a MultiSigProposal first.
Promise
<null
| Identity
>
api/entities/Account/MultiSig/index.ts:254
▸ getBalance(): Promise
<Balance
>
Get the free/locked POLYX balance of the Account
Promise
<Balance
>
Note
can be subscribed to, if connected to node using a web socket
api/entities/Account/index.ts:125
▸ getBalance(callback
): Promise
<UnsubCallback
>
Name | Type |
---|---|
callback |
SubCallback <Balance > |
Promise
<UnsubCallback
>
api/entities/Account/index.ts:126
▸ getCurrentNonce(): Promise
<BigNumber
>
Retrieve the current nonce for this Account
Promise
<BigNumber
>
api/entities/Account/index.ts:462
▸ getHistoricalProposals(opts?
): Promise
<ResultSet
<HistoricalMultiSigProposal
>>
Return a set of MultiSigProposal for this MultiSig Account
Name | Type |
---|---|
opts? |
Object |
opts.size? |
BigNumber |
opts.start? |
BigNumber |
Promise
<ResultSet
<HistoricalMultiSigProposal
>>
Note
uses the middlewareV2
api/entities/Account/MultiSig/index.ts:188
▸ getIdentity(): Promise
<null
| Identity
>
Retrieve the Identity associated to this Account (null if there is none)
Promise
<null
| Identity
>
api/entities/Account/index.ts:145
▸ getMultiSig(): Promise
<null
| MultiSig
>
Fetch the MultiSig this Account is part of. If this Account is not a signer on any MultiSig, return null
Promise
<null
| MultiSig
>
api/entities/Account/index.ts:420
▸ getNextAssetId(): Promise
<string
>
Returns next assetID that will be generated for this Identity
Promise
<string
>
api/entities/Account/index.ts:607
▸ getOffChainReceipts(): Promise
<BigNumber
[]>
Returns all off chain receipts used by this Account
Promise
<BigNumber
[]>
api/entities/Account/index.ts:580
▸ 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
Promise
<null
| Identity
>
api/entities/Account/MultiSig/index.ts:280
▸ getPendingProposals(): Promise
<MultiSigProposal
[]>
Returns pending MultiSig proposals for this Account
Promise
<MultiSigProposal
[]>
Note
uses the middleware
Throws
if the Account is not a signer on any MultiSig
api/entities/Account/index.ts:564
▸ getPermissions(): Promise
<Permissions
>
Retrieve the Permissions this Account has as a Permissioned Account for its corresponding Identity
Promise
<Permissions
>
Throws
if there is no Identity associated with the Account
api/entities/Account/index.ts:312
▸ getPolyxTransactions(filters
): Promise
<ResultSet
<HistoricPolyxTransaction
>>
Returns POLYX transactions associated with this account
Name | Type | Description |
---|---|---|
filters |
Object |
- |
filters.size? |
BigNumber |
page size |
filters.start? |
BigNumber |
page offset |
Promise
<ResultSet
<HistoricPolyxTransaction
>>
Note
uses the middleware
api/entities/Account/index.ts:546
▸ getProposal(args
): Promise
<MultiSigProposal
>
Given an ID, fetch a MultiSigProposal for this MultiSig
Name | Type |
---|---|
args |
Object |
args.id |
BigNumber |
Promise
<MultiSigProposal
>
Throws
if the MultiSigProposal is not found
api/entities/Account/MultiSig/index.ts:115
▸ getProposals(): Promise
<MultiSigProposal
[]>
Return all active MultiSigProposal for this MultiSig Account
Promise
<MultiSigProposal
[]>
api/entities/Account/MultiSig/index.ts:135
▸ getTransactionHistory(filters?
): Promise
<ResultSet
<ExtrinsicData
>>
Retrieve a list of transactions signed by this Account. Can be filtered using 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 |
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
api/entities/Account/index.ts:181
▸ getTypeInfo(): Promise
<AccountTypeInfo
>
Retrieve the type of Account, and its relation to an Identity, if applicable
Promise
<AccountTypeInfo
>
api/entities/Account/index.ts:483
▸ isEqual(entity
): boolean
Determine whether this Entity is the same as another one
Name | Type |
---|---|
entity |
Entity <unknown , unknown > |
boolean
▸ 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
Promise
<boolean
>
Note
returns false if the Account isn't associated to any Identity
api/entities/Account/index.ts:291
▸ 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
Name | Type |
---|---|
args |
Pick <ModifyMultiSigParams , "signers" | "requiredSignatures" > |
opts? |
ProcedureOpts |
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
api/entities/Account/MultiSig/index.ts:308
▸ 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.
Name | Type |
---|---|
opts? |
ProcedureOpts |
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
api/entities/Account/MultiSig/index.ts:332
▸ 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
Name | Type |
---|---|
args |
SetMultiSigAdminParams |
opts? |
ProcedureOpts |
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
api/entities/Account/MultiSig/index.ts:319
▸ toHuman(): string
Return the Account's address
string
api/entities/Account/index.ts:455
▸ Static
generateUuid<Identifiers
>(identifiers
): string
Generate the Entity's UUID from its identifying properties
Name |
---|
Identifiers |
Name | Type |
---|---|
identifiers |
Identifiers |
string
▸ Static
unserialize<Identifiers
>(serialized
): Identifiers
Unserialize a UUID into its Unique Identifiers
Name |
---|
Identifiers |
Name | Type | Description |
---|---|---|
serialized |
string |
UUID to unserialize |
Identifiers