Repository navigation
api.client.types
@polymeshassociation/polymesh-sdk / api/client/types
Defined in: api/client/types.ts:62
Specifies possible types of errors in the SDK
DataUnavailable:
"DataUnavailable"
Defined in: api/client/types.ts:98
the data that is being fetched does not exist on-chain, or relies on non-existent data. There are some cases where the data did exist at some point, but has been deleted to save storage space
EntityInUse:
"EntityInUse"
Defined in: api/client/types.ts:120
this type of error is thrown when attempting to delete/modify an entity which has other entities depending on it. For example, deleting a Portfolio that still holds assets, or removing a Checkpoint Schedule that is being referenced by a Corporate Action
FatalError:
"FatalError"
Defined in: api/client/types.ts:80
error that should cause termination of the calling application
General:
"General"
Defined in: api/client/types.ts:133
general purpose errors that don't fit well into the other categories
InsufficientBalance:
"InsufficientBalance"
Defined in: api/client/types.ts:124
one or more parties involved in the transaction do not have enough balance to perform it
LimitExceeded:
"LimitExceeded"
Defined in: api/client/types.ts:108
the data that is being written to the chain would result in some limit being exceeded. For example, adding a transfer restriction when the maximum possible amount has already been added
MiddlewareError:
"MiddlewareError"
Defined in: api/client/types.ts:93
errors encountered when interacting with the historic data middleware (GQL server)
NoDataChange:
"NoDataChange"
Defined in: api/client/types.ts:103
the data that is being written to the chain is the same data that is already in place. This would result in a redundant/useless transaction being executed
NotAuthorized:
"NotAuthorized"
Defined in: api/client/types.ts:89
user does not have the required roles/permissions to perform an operation
NotSupported:
"NotSupported"
Defined in: api/client/types.ts:137
method not supported
TransactionAborted:
"TransactionAborted"
Defined in: api/client/types.ts:66
transaction removed from the tx pool
TransactionRejectedByUser:
"TransactionRejectedByUser"
Defined in: api/client/types.ts:70
user rejected the transaction in their wallet
TransactionReverted:
"TransactionReverted"
Defined in: api/client/types.ts:76
transaction failed due to an on-chain error. This is a business logic error, and it should be caught by the SDK before being sent to the chain. Please report it to the Polymesh team
UnexpectedError:
"UnexpectedError"
Defined in: api/client/types.ts:129
errors that are the result of something unforeseen. These should generally be reported to the Polymesh team
UnmetPrerequisite:
"UnmetPrerequisite"
Defined in: api/client/types.ts:115
one or more base prerequisites for a transaction to be successful haven't been met. For example, reserving a ticker requires said ticker to not be already reserved. Attempting to reserve a ticker without that prerequisite being met would result in this type of error. Attempting to create an entity that already exists would also fall into this category, if the entity in question is supposed to be unique
ValidationError:
"ValidationError"
Defined in: api/client/types.ts:85
user input error. This means that one or more inputs passed by the user do not conform to expected value ranges or types
Defined in: middleware/types.ts:5282
Created:
"Created"
Defined in: middleware/types.ts:5283
Executed:
"Executed"
Defined in: middleware/types.ts:5284
Failed:
"Failed"
Defined in: middleware/types.ts:5285
Locked:
"Locked"
Defined in: middleware/types.ts:5286
Rejected:
"Rejected"
Defined in: middleware/types.ts:5287
Defined in: api/client/types.ts:179
blockDate:
Date
Defined in: api/client/types.ts:182
blockHash:
string
Defined in: api/client/types.ts:181
blockNumber:
BigNumber
Defined in: api/client/types.ts:180
eventIndex:
BigNumber
Defined in: api/client/types.ts:183
Defined in: api/client/types.ts:9
address:
string|null
Defined in: api/client/types.ts:17
public key of the signer. Unsigned transactions have no signer, in which case this value is null (example: an enacted governance proposal)
blockDate:
Date
Defined in: api/client/types.ts:12
blockHash:
string
Defined in: api/client/types.ts:10
blockNumber:
BigNumber
Defined in: api/client/types.ts:11
extrinsicHash:
string
Defined in: api/client/types.ts:26
extrinsicIdx:
BigNumber
Defined in: api/client/types.ts:13
nonce:
BigNumber|null
Defined in: api/client/types.ts:21
nonce of the transaction. Null for unsigned transactions where address is null
params:
Record<string,unknown>[]
Defined in: api/client/types.ts:23
specVersionId:
BigNumber
Defined in: api/client/types.ts:25
success:
boolean
Defined in: api/client/types.ts:24
txTag:
TxTag
Defined in: api/client/types.ts:22
Defined in: api/client/types.ts:29
address:
string|null
Defined in: api/client/types.ts:17
public key of the signer. Unsigned transactions have no signer, in which case this value is null (example: an enacted governance proposal)
blockDate:
Date
Defined in: api/client/types.ts:12
blockHash:
string
Defined in: api/client/types.ts:10
blockNumber:
BigNumber
Defined in: api/client/types.ts:11
extrinsicHash:
string
Defined in: api/client/types.ts:26
extrinsicIdx:
BigNumber
Defined in: api/client/types.ts:13
fee:
Fees
Defined in: api/client/types.ts:30
nonce:
BigNumber|null
Defined in: api/client/types.ts:21
nonce of the transaction. Null for unsigned transactions where address is null
params:
Record<string,unknown>[]
Defined in: api/client/types.ts:23
specVersionId:
BigNumber
Defined in: api/client/types.ts:25
success:
boolean
Defined in: api/client/types.ts:24
txTag:
TxTag
Defined in: api/client/types.ts:22
Defined in: api/client/types.ts:192
gas:
BigNumber
Defined in: api/client/types.ts:200
regular network fee
protocol:
BigNumber
Defined in: api/client/types.ts:196
bonus fee charged by certain transactions
total:
BigNumber
Defined in: api/client/types.ts:204
sum of the protocol and gas fees
Defined in: api/client/types.ts:224
Filters for instructions
optionalasset?:string|Asset
Defined in: api/client/types.ts:232
The asset ID to filter by
optionalidentity?:string|Identity
Defined in: api/client/types.ts:228
The DID of the identity to filter by
optionalmediator?:string|Identity
Defined in: api/client/types.ts:248
The mediator did to filter by
optionalparty?:string|Identity
Defined in: api/client/types.ts:252
The party did to filter by
optionalreceiver?:string|Identity
Defined in: api/client/types.ts:244
The receiver did to filter by
optionalsender?:string|Identity
Defined in: api/client/types.ts:240
The sender did to filter by
optionalsize?:BigNumber
Defined in: api/client/types.ts:256
The number of results to return
optionalstart?:BigNumber
Defined in: api/client/types.ts:260
The number of results to skip
optionalstatus?:InstructionStatusEnum
Defined in: api/client/types.ts:236
The status to filter by
Defined in: api/client/types.ts:140
key:
string
Defined in: api/client/types.ts:142
link:
string
Defined in: api/client/types.ts:141
Defined in: api/client/types.ts:38
chain:
string
Defined in: api/client/types.ts:39
genesisHash:
string
Defined in: api/client/types.ts:40
indexerHealthy:
boolean
Defined in: api/client/types.ts:41
lastProcessedHeight:
BigNumber
Defined in: api/client/types.ts:42
lastProcessedTimestamp:
Date
Defined in: api/client/types.ts:43
specName:
string
Defined in: api/client/types.ts:44
sqVersion:
string
Defined in: api/client/types.ts:46
targetHeight:
BigNumber
Defined in: api/client/types.ts:45
Defined in: api/client/types.ts:186
genesisHash:
string
Defined in: api/client/types.ts:189
name:
string
Defined in: api/client/types.ts:187
version:
BigNumber
Defined in: api/client/types.ts:188
Defined in: api/client/types.ts:145
optionalmetadata?:Record<string,`0x${string}`>
Defined in: api/client/types.ts:164
provide a locally saved metadata file for a modestly fast startup time (e.g. 1 second when provided, 1.5 seconds without).
if not provided the SDK will read the needed data from chain during startup
format is key as genesis hash and spec version and the value hex encoded chain metadata
creating valid metadata
const meta = _polkadotApi.runtimeMetadata.toHex();
const genesisHash = _polkadotApi.genesisHash;
const specVersion = _polkadotApi.runtimeVersion.specVersion;
const metadata = {
[`${genesisHash}-${specVersion}`]: meta,
};
optionalnoInitWarn?:boolean
Defined in: api/client/types.ts:169
set to true to disable polkadot start up warnings
optionaltypesBundle?:OverrideBundleType
Defined in: api/client/types.ts:176
allows for types to be provided for multiple chain specs at once
shouldn't be needed for most use cases
Defined in: api/client/types.ts:33
fees:
BigNumber
Defined in: api/client/types.ts:35
tag:
TxTag
Defined in: api/client/types.ts:34
Defined in: api/client/types.ts:266
A conglomeration of staking storage related to the active era
activeEra:
BigNumber
Defined in: api/client/types.ts:270
The active era. This is the era whose rewards and slashes are being processed and may lag the current era
activeEraStart:
BigNumber
Defined in: api/client/types.ts:274
The block in which the active era began
currentEra:
BigNumber
Defined in: api/client/types.ts:278
The current era
plannedSession:
BigNumber
Defined in: api/client/types.ts:282
The planned session number. A session is a subdivision of an era
totalStaked:
BigNumber
Defined in: api/client/types.ts:286
The total amount of POLYX staked
Defined in: api/client/types.ts:49
blockHash:
string
Defined in: api/client/types.ts:50
result:
ISubmittableResult
Defined in: api/client/types.ts:56
The raw result of the transaction. Contains event data for the transaction
transactionHash:
string
Defined in: api/client/types.ts:52
transactionIndex:
BigNumber
Defined in: api/client/types.ts:51
CustomClaimType =
object
Defined in: api/client/types.ts:210
CustomClaimType
id:
BigNumber
Defined in: api/client/types.ts:212
name:
string
Defined in: api/client/types.ts:211
CustomClaimTypeWithDid =
CustomClaimType&object
Defined in: api/client/types.ts:218
CustomClaimType with DID that registered the CustomClaimType
optionaldid?:string