name: SignaturePayload
description: A signing payload for an Extrinsic. For the final encoding, it is variable length based on the conetnts included
8 bytes: The Transaction Index/Nonce as provided in the transaction itself. 2+ bytes: The Function Descriptor as provided in the transaction itself. 2 bytes: The Transaction Era as provided in the transaction itself. 32 bytes: The hash of the authoring block implied by the Transaction Era and the current block.
Type parameters
S : ConstructorDef
T : object
V : object
E : object
Hierarchy
↳ Struct
↳ SignaturePayload
Implements
Constructors
constructor
⊕ new SignaturePayload(value?: SignaturePayloadValue | Uint8Array): SignaturePayload
Overrides Struct.constructor
Defined in SignaturePayload.ts:36
Parameters:
| Name | Type | |
|---|---|---|
Optional value |
SignaturePayloadValue |
Uint8Array |
Returns: SignaturePayload
Accessors
Type
getType(): E
Defined in codec/Struct.ts:142
description: Returns the Type description to sthe structure
Returns: E
blockHash
getblockHash(): Hash
Defined in SignaturePayload.ts:57
description: The block Hash the signature applies to (mortal/immortal)
Returns: Hash
encodedLength
getencodedLength(): number
Inherited from Struct.encodedLength
Defined in codec/Struct.ts:149
description: The length of the value when encoded as a Uint8Array
Returns: number
era
getera(): ExtrinsicEra
Defined in SignaturePayload.ts:71
description: The ExtrinsicEra
Returns: ExtrinsicEra
isSigned
getisSigned(): boolean
Defined in SignaturePayload.ts:50
description: true if the payload refers to a valid signature
Returns: boolean
method
getmethod(): Method
Defined in SignaturePayload.ts:64
description: The Method contained in the payload
Returns: Method
nonce
getnonce(): Nonce
Defined in SignaturePayload.ts:78
description: The Nonce
Returns: Nonce
signature
getsignature(): Uint8Array
Defined in SignaturePayload.ts:85
description: The raw signature as a Uint8Array
Returns: Uint8Array
Methods
eq
▸ eq(other?: any): boolean
Defined in codec/Struct.ts:158
description: Compares the value of the input to see if there is a match
Parameters:
| Name | Type |
|---|---|
Optional other |
any |
Returns: boolean
get
▸ get(name: keyof S): Codec | undefined
Overrides Map.get
Defined in codec/Struct.ts:166
description: Returns a specific names entry in the structure
Parameters:
| Name | Type | Description |
|---|---|---|
| name | keyof S |
The name of the entry to retrieve |
Returns: Codec | undefined
getAtIndex
▸ getAtIndex(index: number): Codec
Inherited from Struct.getAtIndex
Defined in codec/Struct.ts:173
description: Returns the values of a member at a specific index (Rather use get(name) for performance)
Parameters:
| Name | Type |
|---|---|
| index | number |
Returns: Codec
sign
▸ sign(signerPair: KeyringPair, version?: RuntimeVersion): Uint8Array
Defined in SignaturePayload.ts:96
description: Sign the payload with the keypair
Parameters:
| Name | Type |
|---|---|
| signerPair | KeyringPair |
Optional version |
RuntimeVersion |
Returns: Uint8Array
toArray
▸ toArray(): Array<Codec>
Defined in codec/Struct.ts:180
description: Converts the Object to an standard JavaScript Array
Returns: Array<Codec>
toHex
▸ toHex(): string
Defined in codec/Struct.ts:187
description: Returns a hex string representation of the value
Returns: string
toJSON
▸ toJSON(): any
Implementation of Codec.toJSON
Defined in codec/Struct.ts:194
description: Converts the Object to JSON, typically used for RPC transfers
Returns: any
toString
▸ toString(): string
Implementation of Codec.toString
Inherited from Struct.toString
Defined in codec/Struct.ts:208
description: Returns the string representation of the value
Returns: string
toU8a
▸ toU8a(isBare?: undefined | false | true): Uint8Array
Defined in codec/Struct.ts:216
description: Encodes the value as a Uint8Array as per the parity-codec specifications
Parameters:
| Name | Type | Description | ||
|---|---|---|---|---|
Optional isBare |
undefined |
false |
true |
true when the value has none of the type-specific prefixes (internal) |
Returns: Uint8Array
<Static> with
▸ with<S>(Types: S): Constructor<Struct<S>>
Defined in codec/Struct.ts:122
Type parameters:
S : ConstructorDef
Parameters:
| Name | Type |
|---|---|
| Types | S |
Returns: Constructor<Struct<S>>