-
Notifications
You must be signed in to change notification settings - Fork 11
api.client.types
@polymeshassociation/polymesh-sdk / api/client/types
Defined in: api/client/types.ts:63
Specifies possible types of errors in the SDK
DataUnavailable:
"DataUnavailable"
Defined in: api/client/types.ts:99
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:121
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:81
error that should cause termination of the calling application
General:
"General"
Defined in: api/client/types.ts:134
general purpose errors that don't fit well into the other categories
InsufficientBalance:
"InsufficientBalance"
Defined in: api/client/types.ts:125
one or more parties involved in the transaction do not have enough balance to perform it
LimitExceeded:
"LimitExceeded"
Defined in: api/client/types.ts:109
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:94
errors encountered when interacting with the historic data middleware (GQL server)
NoDataChange:
"NoDataChange"
Defined in: api/client/types.ts:104
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:90
user does not have the required roles/permissions to perform an operation
NotSupported:
"NotSupported"
Defined in: api/client/types.ts:138
method not supported
TransactionAborted:
"TransactionAborted"
Defined in: api/client/types.ts:67
transaction removed from the tx pool
TransactionRejectedByUser:
"TransactionRejectedByUser"
Defined in: api/client/types.ts:71
user rejected the transaction in their wallet
TransactionReverted:
"TransactionReverted"
Defined in: api/client/types.ts:77
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:130
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:116
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:86
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:180
blockDate:
Date
Defined in: api/client/types.ts:183
blockHash:
string
Defined in: api/client/types.ts:182
blockNumber:
BigNumber
Defined in: api/client/types.ts:181
eventIndex:
BigNumber
Defined in: api/client/types.ts:184
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:193
gas:
BigNumber
Defined in: api/client/types.ts:201
regular network fee
protocol:
BigNumber
Defined in: api/client/types.ts:197
bonus fee charged by certain transactions
total:
BigNumber
Defined in: api/client/types.ts:205
sum of the protocol and gas fees
Defined in: api/client/types.ts:225
Filters for instructions
optionalasset?:string|Asset
Defined in: api/client/types.ts:233
The asset ID to filter by
optionalidentity?:string|Identity
Defined in: api/client/types.ts:229
The DID of the identity to filter by
optionalmediator?:string|Identity
Defined in: api/client/types.ts:249
The mediator did to filter by
optionalparty?:string|Identity
Defined in: api/client/types.ts:253
The party did to filter by
optionalreceiver?:string|Identity
Defined in: api/client/types.ts:245
The receiver did to filter by
optionalsender?:string|Identity
Defined in: api/client/types.ts:241
The sender did to filter by
optionalsize?:BigNumber
Defined in: api/client/types.ts:257
The number of results to return
optionalstart?:BigNumber
Defined in: api/client/types.ts:261
The number of results to skip
optionalstatus?:InstructionStatusEnum
Defined in: api/client/types.ts:237
The status to filter by
Defined in: api/client/types.ts:141
key:
string
Defined in: api/client/types.ts:143
link:
string
Defined in: api/client/types.ts:142
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
paddedIds:
boolean
Defined in: api/client/types.ts:47
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:187
genesisHash:
string
Defined in: api/client/types.ts:190
name:
string
Defined in: api/client/types.ts:188
version:
BigNumber
Defined in: api/client/types.ts:189
Defined in: api/client/types.ts:146
optionalmetadata?:Record<string,`0x${string}`>
Defined in: api/client/types.ts:165
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:170
set to true to disable polkadot start up warnings
optionaltypesBundle?:OverrideBundleType
Defined in: api/client/types.ts:177
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:267
A conglomeration of staking storage related to the active era
activeEra:
BigNumber
Defined in: api/client/types.ts:271
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:275
The block in which the active era began
currentEra:
BigNumber
Defined in: api/client/types.ts:279
The current era
plannedSession:
BigNumber
Defined in: api/client/types.ts:283
The planned session number. A session is a subdivision of an era
totalStaked:
BigNumber
Defined in: api/client/types.ts:287
The total amount of POLYX staked
Defined in: api/client/types.ts:50
blockHash:
string
Defined in: api/client/types.ts:51
result:
ISubmittableResult
Defined in: api/client/types.ts:57
The raw result of the transaction. Contains event data for the transaction
transactionHash:
string
Defined in: api/client/types.ts:53
transactionIndex:
BigNumber
Defined in: api/client/types.ts:52
CustomClaimType =
object
Defined in: api/client/types.ts:211
CustomClaimType
id:
BigNumber
Defined in: api/client/types.ts:213
name:
string
Defined in: api/client/types.ts:212
CustomClaimTypeWithDid =
CustomClaimType&object
Defined in: api/client/types.ts:219
CustomClaimType with DID that registered the CustomClaimType
optionaldid?:string