Skip to content

base.types

F-OBrien edited this page Aug 14, 2026 · 77 revisions

@polymeshassociation/polymesh-sdk / base/types

base/types

Enumerations

PayingAccountType

Defined in: base/types.ts:120

Type of relationship between a paying account and a beneficiary

Enumeration Members

Caller

Caller: "Caller"

Defined in: base/types.ts:134

the caller Account is responsible of paying the fees

MultiSigCreator

MultiSigCreator: "MultiSigCreator"

Defined in: base/types.ts:138

The creator of the MultiSig is responsible for paying the fees

Other

Other: "Other"

Defined in: base/types.ts:130

the paying Account is paying for a specific transaction because of chain-specific constraints (e.g. the caller is accepting an invitation to an Identity and cannot have any funds to pay for it by definition)

Subsidy

Subsidy: "Subsidy"

Defined in: base/types.ts:124

the paying Account is currently subsidizing the caller


TransactionArgumentType

Defined in: base/types.ts:60

Enumeration Members

Address

Address: "Address"

Defined in: base/types.ts:62

Array

Array: "Array"

Defined in: base/types.ts:68

Balance

Balance: "Balance"

Defined in: base/types.ts:66

Boolean

Boolean: "Boolean"

Defined in: base/types.ts:64

Date

Date: "Date"

Defined in: base/types.ts:67

Did

Did: "Did"

Defined in: base/types.ts:61

Null

Null: "Null"

Defined in: base/types.ts:74

Number

Number: "Number"

Defined in: base/types.ts:65

Object

Object: "Object"

Defined in: base/types.ts:72

RichEnum

RichEnum: "RichEnum"

Defined in: base/types.ts:71

SimpleEnum

SimpleEnum: "SimpleEnum"

Defined in: base/types.ts:70

Text

Text: "Text"

Defined in: base/types.ts:63

Tuple

Tuple: "Tuple"

Defined in: base/types.ts:69

Unknown

Unknown: "Unknown"

Defined in: base/types.ts:73


TransactionStatus

Defined in: base/types.ts:20

Enumeration Members

Aborted

Aborted: "Aborted"

Defined in: base/types.ts:57

the transaction couldn't be broadcast. It was either dropped, usurped or invalidated see https://github.com/paritytech/substrate/blob/master/primitives/transaction-pool/src/pool.rs#L58-L110

Failed

Failed: "Failed"

Defined in: base/types.ts:52

the transaction's execution failed due to a an on-chain validation error, insufficient balance for fees, or other such reasons

Future

Future: "Future"

Defined in: base/types.ts:40

the transaction is scheduled for the future

Idle

Idle: "Idle"

Defined in: base/types.ts:24

the transaction is prepped to run

InBlock

InBlock: "InBlock"

Defined in: base/types.ts:36

the transaction is in a block

Rejected

Rejected: "Rejected"

Defined in: base/types.ts:44

the transaction was rejected by the signer

Running

Running: "Running"

Defined in: base/types.ts:32

the transaction is being executed

Succeeded

Succeeded: "Succeeded"

Defined in: base/types.ts:48

the transaction was run successfully

Unapproved

Unapproved: "Unapproved"

Defined in: base/types.ts:28

the transaction is waiting for the user's signature

Interfaces

ArrayTransactionArgument

Defined in: base/types.ts:88

Properties

internal

internal: TransactionArgument

Defined in: base/types.ts:90

type

type: Array

Defined in: base/types.ts:89


ComplexTransactionArgument

Defined in: base/types.ts:98

Properties

internal

internal: TransactionArgument[]

Defined in: base/types.ts:103

type

type: Tuple | RichEnum | Object

Defined in: base/types.ts:99


PayingAccountFees

Defined in: base/types.ts:165

Breakdown of the fees that will be paid by a specific Account for a transaction, along with data associated to the Paying account

Properties

fees

fees: Fees

Defined in: base/types.ts:169

fees that will be paid by the Account

payingAccountData

payingAccountData: PayingAccount & object

Defined in: base/types.ts:173

data related to the Account responsible of paying for the transaction

Type Declaration
balance

balance: BigNumber

free balance of the Account


PlainTransactionArgument

Defined in: base/types.ts:77

Properties

type

type: Did | Address | Text | Boolean | Number | Balance | Date | Unknown | Null

Defined in: base/types.ts:78


SimpleEnumTransactionArgument

Defined in: base/types.ts:93

Properties

internal

internal: string[]

Defined in: base/types.ts:95

type

type: SimpleEnum

Defined in: base/types.ts:94


TransactionPayload

Defined in: base/types.ts:184

Unsigned transaction data in JSON a format

Properties

metadata

readonly metadata: Record<string, string>

Defined in: base/types.ts:210

Additional information attached to the payload, such as IDs or memos about the transaction.

Note

this is not chain data. Its for convenience for attaching a trace ID

method

readonly method: `0x${string}`

Defined in: base/types.ts:203

A hex representation of the core extrinsic information. i.e. the extrinsic and args, but does not contain information about who is to sign the transaction.

multiSig

readonly multiSig: string | null

Defined in: base/types.ts:218

The address of the MultiSig if the transaction is a proposal.

Will be set only if the signing account is a MultiSig signer, the transaction is not approving or rejecting an existing proposal,

Note

asProposal: false will force this to be null, even if the signing account is a MultiSig signer

payload

readonly payload: SignerPayloadJSON

Defined in: base/types.ts:190

This is what a Polkadot signer ".signPayload" method expects

Note

this field is recommended to be passed in with the signature when submitting a signed transaction

rawPayload

readonly rawPayload: SignerPayloadRaw

Defined in: base/types.ts:198

An alternative representation of the payload for which Polkadot signers providing ".signRaw" expect.

Note

using the field payload is generally recommended. The raw version is included so any polkadot compliant signer can sign.

Note

signRaw typically returns just the signature. However signatures must be prefixed with a byte to indicate the type. For ed25519 signatures prepend a zero byte (0x00), for sr25519 0x01 byte to indicate sr25519 if the signer implementation does not already do so.

Type Aliases

MapTxData

MapTxData<ArgsArray> = { [K in keyof ArgsArray]: ArgsArray[K] extends unknown[] ? TxData<ArgsArray[K]> : never }

Defined in: base/types.ts:16

Apply the TxData type to all args in an array

Type Parameters

Type Parameter
ArgsArray extends unknown[][]

PayingAccount

PayingAccount = { account: Account; allowance: BigNumber; type: Subsidy; } | { account: Account; type: Caller | Other | MultiSigCreator; }

Defined in: base/types.ts:144

Data representing the Account responsible for paying fees for a transaction

Union Members

Type Literal

{ account: Account; allowance: BigNumber; type: Subsidy; }

account

account: Account

Account that pays for the transaction

allowance

allowance: BigNumber

total amount that can be paid for

type

type: Subsidy


Type Literal

{ account: Account; type: Caller | Other | MultiSigCreator; }


PolymeshError

PolymeshError = PolymeshError

Defined in: base/types.ts:244


PolymeshTransaction

PolymeshTransaction<ReturnValue, TransformedReturnValue, Args> = PolymeshTransaction<ReturnValue, TransformedReturnValue, Args>

Defined in: base/types.ts:234

Type Parameters

Type Parameter Default type
ReturnValue unknown
TransformedReturnValue ReturnValue
Args extends unknown[] | [] unknown[]

PolymeshTransactionBatch

PolymeshTransactionBatch<ReturnValue, TransformedReturnValue, Args> = PolymeshTransactionBatch<ReturnValue, TransformedReturnValue, Args>

Defined in: base/types.ts:239

Type Parameters

Type Parameter Default type
ReturnValue unknown
TransformedReturnValue ReturnValue
Args extends unknown[][] unknown[][]

TransactionArgument

TransactionArgument = object & PlainTransactionArgument | ArrayTransactionArgument | SimpleEnumTransactionArgument | ComplexTransactionArgument

Defined in: base/types.ts:106

Type Declaration

_rawType

_rawType: TypeDef

name

name: string

optional

optional: boolean


TransactionPayloadInput

TransactionPayloadInput = TransactionPayload | TransactionPayload["payload"] | TransactionPayload["rawPayload"]

Defined in: base/types.ts:229

The data needed for submitting an offline transaction.

Note

One of the following can be used to submit an offline transaction -

  1. Full payload
  2. Inner payload field
  3. Inner raw payload field

@polymeshassociation/polymesh-sdk

Modules

Types
- [Utils](../wiki/base.utils)

Clone this wiki locally