Polkadot JS APIGlobals"extrinsic/ExtrinsicPayload"ExtrinsicPayload

# Class: ExtrinsicPayload

name GenericExtrinsicPayload

description A signing payload for an Extrinsic. For the final encoding, it is variable length based on the contents included

# Hierarchy

  • Base‹ExtrinsicPayloadVx›

    ExtrinsicPayload

# Implements

# Index

# Constructors

# Properties

# Accessors

# Methods

# Constructors

# constructor

+ new ExtrinsicPayload(registry: Registry, value: Partial‹ExtrinsicPayloadValue› | Uint8Array | string | undefined, __namedParameters: object): ExtrinsicPayload

Overrides void

Defined in packages/types/src/extrinsic/ExtrinsicPayload.ts:39

Parameters:

registry: Registry

value: Partial‹ExtrinsicPayloadValue› | Uint8Array | string | undefined

Default value __namedParameters: object= {}

Name Type
version undefined | number

Returns: ExtrinsicPayload

# Properties

# Readonly registry

registry: Registry

Implementation of Codec.registry

Inherited from Base.registry

Defined in packages/types/src/codec/Base.ts:17

# Accessors

# blockHash

get blockHash(): Hash

Defined in packages/types/src/extrinsic/ExtrinsicPayload.ts:56

description The block Hash the signature applies to (mortal/immortal)

Returns: Hash


# encodedLength

get encodedLength(): number

Inherited from Base.encodedLength

Defined in packages/types/src/codec/Base.ts:29

description The length of the value when encoded as a Uint8Array

Returns: number


# era

get era(): ExtrinsicEra

Defined in packages/types/src/extrinsic/ExtrinsicPayload.ts:63

description The ExtrinsicEra

Returns: ExtrinsicEra


# genesisHash

get genesisHash(): Hash

Defined in packages/types/src/extrinsic/ExtrinsicPayload.ts:70

description The genesis block Hash the signature applies to

Returns: Hash


# hash

get hash(): H256

Inherited from Base.hash

Defined in packages/types/src/codec/Base.ts:36

description returns a hash of the contents

Returns: H256


# isEmpty

get isEmpty(): boolean

Inherited from Base.isEmpty

Defined in packages/types/src/codec/Base.ts:43

description Checks if the value is an empty value

Returns: boolean


# method

get method(): Raw

Defined in packages/types/src/extrinsic/ExtrinsicPayload.ts:78

description The Raw contained in the payload

Returns: Raw


# nonce

get nonce(): Compact‹Index›

Defined in packages/types/src/extrinsic/ExtrinsicPayload.ts:85

description The Index

Returns: Compact‹Index›


# specVersion

get specVersion(): u32

Defined in packages/types/src/extrinsic/ExtrinsicPayload.ts:92

description The specVersion as a u32 for this payload

Returns: u32


# tip

get tip(): Compact‹Balance›

Defined in packages/types/src/extrinsic/ExtrinsicPayload.ts:100

description The Balance

Returns: Compact‹Balance›


# transactionVersion

get transactionVersion(): u32

Defined in packages/types/src/extrinsic/ExtrinsicPayload.ts:108

description The transaction version as a u32 for this payload

Returns: u32

# Methods

# eq

eq(other?: unknown): boolean

Implementation of Codec

Overrides Base.eq

Defined in packages/types/src/extrinsic/ExtrinsicPayload.ts:116

description Compares the value of the input to see if there is a match

Parameters:

Name Type
other? unknown

Returns: boolean


# sign

sign(signerPair: IKeyringPair): object

Defined in packages/types/src/extrinsic/ExtrinsicPayload.ts:123

description Sign the payload with the keypair

Parameters:

Name Type
signerPair IKeyringPair

Returns: object

  • signature: string

# toHex

toHex(isLe?: undefined | false | true): string

Implementation of Codec

Inherited from Base.toHex

Defined in packages/types/src/codec/Base.ts:57

description Returns a hex string representation of the value. isLe returns a LE (number-only) representation

Parameters:

Name Type
isLe? undefined | false | true

Returns: string


# toHuman

toHuman(isExtended?: undefined | false | true): AnyJson

Implementation of Codec

Overrides Base.toHuman

Defined in packages/types/src/extrinsic/ExtrinsicPayload.ts:138

description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information

Parameters:

Name Type
isExtended? undefined | false | true

Returns: AnyJson


# toJSON

toJSON(): any

Implementation of Codec

Overrides Base.toJSON

Defined in packages/types/src/extrinsic/ExtrinsicPayload.ts:145

description Converts the Object to JSON, typically used for RPC transfers

Returns: any


# toRawType

toRawType(): string

Implementation of Codec

Inherited from Base.toRawType

Defined in packages/types/src/codec/Base.ts:93

description Returns the base runtime type name for this instance

Returns: string


# toString

toString(): string

Implementation of Codec

Overrides Base.toString

Defined in packages/types/src/extrinsic/ExtrinsicPayload.ts:152

description Returns the string representation of the value

Returns: string


# toU8a

toU8a(isBare?: BareOpts): Uint8Array

Implementation of Codec

Overrides Base.toU8a

Defined in packages/types/src/extrinsic/ExtrinsicPayload.ts:159

description Returns a serialized u8a form

Parameters:

Name Type
isBare? BareOpts

Returns: Uint8Array