Package org.polkadot.types.type
Class SignaturePayload
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<K,V>
-
- java.util.LinkedHashMap<java.lang.String,Codec>
-
- org.polkadot.types.codec.Struct
-
- org.polkadot.types.type.SignaturePayload
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,java.util.Map<java.lang.String,Codec>,Codec
public class SignaturePayload extends Struct
A signing payload for anorg.polkadot.type.extrinsics. 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.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSignaturePayload.SignaturePayloadValue
-
Field Summary
Fields Modifier and Type Field Description protected byte[]_signature
-
Constructor Summary
Constructors Constructor Description SignaturePayload(java.lang.Object value)
-
Method Summary
Modifier and Type Method Description HashgetBlockHash()The blockHashthe signature applies to (mortal/immortal)ExtrinsicEragetEra()The ExtrinsicEraMethodgetMethod()TheMethodcontained in the payloadNonceCompactgetNonce()TheNoncebyte[]getSignature()The raw signature as a `Uint8Array`booleanisSigned()`true` if the payload refers to a valid signaturebyte[]sign(Types.KeyringPair signerPair, RuntimeVersion version)Sign the payload with the keypair-
Methods inherited from class org.polkadot.types.codec.Struct
builder, eq, getEncodedLength, getField, isEmpty, toArray, toHex, toJson, toString, toU8a, with
-
Methods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, values
-
Methods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
-
-
-
-
Method Detail
-
isSigned
public boolean isSigned()
`true` if the payload refers to a valid signature
-
getEra
public ExtrinsicEra getEra()
The ExtrinsicEra
-
getNonce
public NonceCompact getNonce()
TheNonce
-
getSignature
public byte[] getSignature()
The raw signature as a `Uint8Array`
-
sign
public byte[] sign(Types.KeyringPair signerPair, RuntimeVersion version)
Sign the payload with the keypair
-
-