api.entities.Account.MultiSig - PolymeshAssociation/polymesh-sdk GitHub Wiki
@polymeshassociation/polymesh-sdk / api/entities/Account/MultiSig
Defined in: api/entities/Account/MultiSig/index.ts:56
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
address:
string
Defined in: api/entities/Account/index.ts:126
Polymesh-specific address of the Account. Serves as an identifier
authorizations:
Authorizations<Account>
Defined in: api/entities/Account/index.ts:135
key:
string
Defined in: api/entities/Account/index.ts:132
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.
staking:
Staking
Defined in: api/entities/Account/index.ts:137
subsidies:
Subsidies
Defined in: api/entities/Account/index.ts:136
uuid:
string
Defined in: api/entities/Entity.ts:46
get ethAddress():
string|null
Defined in: api/entities/Account/index.ts:160
The Ethereum address controlling this Account, or null if it is not an Ethereum-derived
Account (i.e. the last 12 bytes of its decoded AccountId32 are not 0xEE)
string | null
get evmAddress():
string
Defined in: api/entities/Account/index.ts:184
The Ethereum address the chain associates with this Account, mirroring the revive pallet's
address mapper
- for an Ethereum-derived Account, this is the Ethereum key controlling it, and is the same value as ethAddress
- for any other Account, it is derived by hashing:
keccak256(<32-byte AccountId32>)[12..]
this is what the address would be. Because hashing is one way, the chain can only resolve a derived address back to this Account once the Account has called mapEvmAccount — until then, anything sent to it is credited elsewhere. Use getEvmAddressDetails to check before advertising this address
string
checkPermissions(
permissions):Promise<CheckPermissionsResult<Account>>
Defined in: api/entities/Account/index.ts:508
Check if this Account possesses certain Permissions to act on behalf of its corresponding Identity
| Parameter | Type |
|---|---|
permissions |
SimplePermissions |
Promise<CheckPermissionsResult<Account>>
which permissions the Account is missing (if any) and the final result
details():
Promise<MultiSigDetails>
Defined in: api/entities/Account/MultiSig/index.ts:87
Return details about this MultiSig such as the signing Accounts and the required number of signatures to execute a MultiSigProposal
Promise<MultiSigDetails>
exists():
Promise<boolean>
Defined in: api/entities/Account/index.ts:591
Determine whether this Account exists on chain
Promise<boolean>
getAdmin():
Promise<Identity|null>
Defined in: api/entities/Account/MultiSig/index.ts:276
Returns the Identity of the MultiSig admin. This Identity can add or remove signers directly without creating a MultiSigProposal first.
Promise<Identity | null>
getAllowances(
paginationOpts?):Promise<ResultSet<AssetAllowance>>
Defined in: api/entities/Account/index.ts:801
Retrieve the Asset allowances this Account has approved — what each spender may transfer on its behalf, and for which Asset
| Parameter | Type |
|---|---|
paginationOpts? |
PaginationOptions |
Promise<ResultSet<AssetAllowance>>
revoking an allowance removes it, so every entry returned is live. An Account with no approvals returns an empty set
the chain cannot be asked the reverse question, "who has approved me", because the spender is not the key this map is ordered by
getAssetBalances(
args?):Promise<PortfolioBalance[]>
Defined in: api/entities/Account/index.ts:893
Retrieve the balances of all fungible assets in this Account
| Parameter | Type | Description |
|---|---|---|
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) |
Promise<PortfolioBalance[]>
free excludes tokens an Asset agent has frozen, as well as locked tokens. See
AssetHolderBalance
getBalance():
Promise<AccountBalance>
Defined in: api/entities/Account/index.ts:246
Get the free/locked POLYX balance of the Account
Promise<AccountBalance>
Promise that resolves to the Account's POLYX balance information
getBalance(
callback):Promise<UnsubCallback>
Defined in: api/entities/Account/index.ts:257
Get the free/locked POLYX balance of the Account (with subscription support)
| Parameter | Type | Description |
|---|---|---|
callback |
SubCallback<AccountBalance> |
Callback function that receives balance updates |
Promise<UnsubCallback>
Promise that resolves to an unsubscribe function
can be subscribed to, if connected to node using a web socket
getCollections(
args?):Promise<PortfolioCollection[]>
Defined in: api/entities/Account/index.ts:963
Retrieve the NFTs held in this Account
| Parameter | Type | Description |
|---|---|---|
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) |
Promise<PortfolioCollection[]>
getCurrentNonce():
Promise<BigNumber>
Defined in: api/entities/Account/index.ts:605
Retrieve the current nonce for this Account
Promise<BigNumber>
getEvmAddressDetails():
Promise<EvmAddressDetails>
Defined in: api/entities/Account/index.ts:198
Retrieve the Ethereum address the chain associates with this Account, together with whether the chain can currently resolve that address back to this Account, and the fallback Account credited whenever it cannot
Promise<EvmAddressDetails>
for a derived address the fallback Account is reported even once the Account is mapped, since mapping does not move funds that arrived beforehand
getHistoricalProposals(
opts?):Promise<ResultSet<HistoricalMultiSigProposal>>
Defined in: api/entities/Account/MultiSig/index.ts:209
Return a set of MultiSigProposal for this MultiSig Account
| Parameter | Type |
|---|---|
opts? |
MiddlewarePaginationOptions & object
|
Promise<ResultSet<HistoricalMultiSigProposal>>
uses the middlewareV2
getIdentity():
Promise<Identity|null>
Defined in: api/entities/Account/index.ts:276
Retrieve the Identity associated to this Account (null if there is none)
Promise<Identity | null>
getMultiSig():
Promise<MultiSig|null>
Defined in: api/entities/Account/index.ts:563
Fetch the MultiSig this Account is part of. If this Account is not a signer on any MultiSig, return null
Promise<MultiSig | null>
getNextAssetId():
Promise<string>
Defined in: api/entities/Account/index.ts:749
Returns next assetID that will be generated for this Identity
Promise<string>
getNftOperators(
paginationOpts?):Promise<ResultSet<NftOperatorApproval>>
Defined in: api/entities/Account/index.ts:846
Retrieve the operators this Account has approved: Accounts that may transfer any of its NFTs in a collection, set with collection.approveOperator
| Parameter | Type |
|---|---|
paginationOpts? |
PaginationOptions |
Promise<ResultSet<NftOperatorApproval>>
revoking an operator removes it, so every entry returned is live. Unlike a per-NFT approval, an operator approval is not used up, and survives the NFTs changing hands
always empty before Polymesh 8.1.1, which has no NFT approvals
getOffChainReceipts():
Promise<BigNumber[]>
Defined in: api/entities/Account/index.ts:722
Returns all off chain receipts used by this Account
Promise<BigNumber[]>
getPayer():
Promise<Identity|null>
Defined in: api/entities/Account/MultiSig/index.ts:302
Returns the payer for the MultiSig, if set the primary account of the identity will pay for any fees the MultiSig may incur
Promise<Identity | null>
getPendingProposals():
Promise<MultiSigProposal[]>
Defined in: api/entities/Account/index.ts:706
Returns pending MultiSig proposals for this Account
Promise<MultiSigProposal[]>
uses the middleware
if the Account is not a signer on any MultiSig
getPermissions():
Promise<Permissions>
Defined in: api/entities/Account/index.ts:455
Retrieve the Permissions this Account has as a Permissioned Account for its corresponding Identity
Promise<Permissions>
if there is no Identity associated with the Account
getPolyxTransactions(
filters):Promise<ResultSet<HistoricPolyxTransaction>>
Defined in: api/entities/Account/index.ts:687
Returns POLYX transactions associated with this account
| Parameter | Type |
|---|---|
filters |
MiddlewarePaginationOptions & object
|
Promise<ResultSet<HistoricPolyxTransaction>>
uses the middleware
getProposal(
args):Promise<MultiSigProposal>
Defined in: api/entities/Account/MultiSig/index.ts:123
Given an ID, fetch a MultiSigProposal for this MultiSig
| Parameter | Type |
|---|---|
args |
{ id: BigNumber; } |
args.id |
BigNumber |
Promise<MultiSigProposal>
if the MultiSigProposal is not found
getProposals():
Promise<MultiSigProposal[]>
Defined in: api/entities/Account/MultiSig/index.ts:143
Return all active MultiSig Proposals for this MultiSig Account
Promise<MultiSigProposal[]>
getTransactionHistory(
filters?):Promise<ResultSet<ExtrinsicData>>
Defined in: api/entities/Account/index.ts:318
Retrieve a list of transactions signed by this Account. Can be filtered using parameters
| Parameter | Type |
|---|---|
filters |
MiddlewarePaginationOptions & object
|
Promise<ResultSet<ExtrinsicData>>
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)
uses the middleware v2
NotSupported if this Account is Ethereum-derived: the indexer records a
revive.ethTransact extrinsic with address: null, so it cannot attribute any history to
the Ethereum-derived Account. Returning an empty result set would be indistinguishable from
"no history" and read as a bug in the caller's code
getTypeInfo():
Promise<AccountTypeInfo>
Defined in: api/entities/Account/index.ts:626
Retrieve the type of Account, and its relation to an Identity, if applicable
Promise<AccountTypeInfo>
isEqual(
entity):boolean
Defined in: api/entities/Entity.ts:61
Determine whether this Entity is the same as another one
| Parameter | Type |
|---|---|
entity |
Entity<unknown, unknown> |
boolean
isFrozen():
Promise<boolean>
Defined in: api/entities/Account/index.ts:434
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>
returns false if the Account isn't associated to any Identity
modify(
args,opts?):Promise<GenericPolymeshTransaction<void,void>>
Defined in: api/entities/Account/MultiSig/index.ts:327
Modify the signers for the MultiSig. The signing Account must belong to the Identity of the creator of the MultiSig
| Parameter | Type |
|---|---|
args |
Pick<ModifyMultiSigParams, "signers" | "requiredSignatures"> |
opts? |
ProcedureOpts |
Promise<GenericPolymeshTransaction<void, void>>
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(
opts?):Promise<GenericPolymeshTransaction<void,void>>
Defined in: api/entities/Account/MultiSig/index.ts:344
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.
| Parameter | Type |
|---|---|
opts? |
ProcedureOpts |
Promise<GenericPolymeshTransaction<void, void>>
This method must be called by one of the MultiSig signer's or by the paying identity.
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(
args,opts?):Promise<GenericPolymeshTransaction<void,void>>
Defined in: api/entities/Account/MultiSig/index.ts:336
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
| Parameter | Type |
|---|---|
args |
SetMultiSigAdminParams |
opts? |
ProcedureOpts |
Promise<GenericPolymeshTransaction<void, void>>
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():
string
Defined in: api/entities/Account/index.ts:598
Return the Account's address
string
staticgenerateUuid<Identifiers>(identifiers):string
Defined in: api/entities/Entity.ts:14
Generate the Entity's UUID from its identifying properties
| Type Parameter |
|---|
Identifiers |
| Parameter | Type | Description |
|---|---|---|
identifiers |
Identifiers |
- |
string
staticunserialize<Identifiers>(serialized):Identifiers
Defined in: api/entities/Entity.ts:23
Unserialize a UUID into its Unique Identifiers
| Type Parameter |
|---|
Identifiers |
| Parameter | Type | Description |
|---|---|---|
serialized |
string |
UUID to unserialize |
Identifiers