public class Extrinsic extends Struct implements Types.IExtrinsic
Representation of an Extrinsic in the system. It contains the actual call, (optional) signature and encodes with an actual length prefix
Can be: - signed, to create a transaction - left as is, to create an inherent
| Modifier and Type | Class and Description |
|---|---|
static class |
Extrinsic.ExtrinsicValue |
| Constructor and Description |
|---|
Extrinsic(java.lang.Object value) |
| Modifier and Type | Method and Description |
|---|---|
Extrinsic |
addSignature(java.lang.Object signer,
byte[] signature,
java.lang.Object nonce,
byte[] era)
Add an ExtrinsicSignature to the extrinsic (already generated)
|
java.util.List<Codec> |
getArgs()
The arguments passed to for the call, exposes args so it is compatible with
Method |
Types.ConstructorDef |
getArgsDef()
Thge argument defintions, compatible with
Method |
byte[] |
getCallIndex()
The actual
[sectionIndex, methodIndex] as used in the Method |
byte[] |
getData()
The actual data for the Method
|
int |
getEncodedLength()
The length of the value when encoded as a Uint8Array
|
U8a |
getHash()
Convernience function, encodes the extrinsic and returns the actual hash
|
Modules.FunctionMetadata |
getMeta()
The FunctionMetadata that describes the extrinsic
|
Method |
getMethod()
The
Method this extrinsic wraps |
ExtrinsicSignature |
getSignature()
The ExtrinsicSignature
|
boolean |
hasOrigin()
|
boolean |
isSigned()
true id the extrinsic is signed |
int |
length()
The length of the encoded value
|
Extrinsic |
sign(Types.KeyringPair account,
Types.SignatureOptions options)
Sign the extrinsic with a specific keypair
|
java.lang.String |
toHex()
Returns a hex string representation of the value
|
java.lang.Object |
toJson()
Converts the Object to JSON, typically used for RPC transfers
|
byte[] |
toU8a(boolean isBare)
Encodes the value as a Uint8Array as per the parity-codec specifications
|
builder, eq, getField, isEmpty, toArray, toString, withclear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, valuesclone, compute, computeIfAbsent, computeIfPresent, containsKey, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizefinalize, getClass, notify, notifyAll, wait, wait, waiteq, getConstructorCodec, isEmpty, toU8apublic java.util.List<Codec> getArgs()
The arguments passed to for the call, exposes args so it is compatible with Method
getArgs in interface Types.IMethodpublic Types.ConstructorDef getArgsDef()
Thge argument defintions, compatible with Method
getArgsDef in interface Types.IMethodpublic byte[] getCallIndex()
The actual [sectionIndex, methodIndex] as used in the Method
getCallIndex in interface Types.IMethodpublic byte[] getData()
The actual data for the Method
getData in interface Types.IMethodpublic int getEncodedLength()
The length of the value when encoded as a Uint8Array
getEncodedLength in interface CodecgetEncodedLength in class Structpublic U8a getHash()
Convernience function, encodes the extrinsic and returns the actual hash
getHash in interface Types.IExtrinsicpublic boolean hasOrigin()
true is method has Origin argument (compatibility with Method)
hasOrigin in interface Types.IMethodpublic boolean isSigned()
true id the extrinsic is signed
isSigned in interface Types.IExtrinsicpublic int length()
The length of the encoded value
public Modules.FunctionMetadata getMeta()
The FunctionMetadata that describes the extrinsic
getMeta in interface Types.IMethodpublic Method getMethod()
The Method this extrinsic wraps
getMethod in interface Types.IExtrinsicpublic ExtrinsicSignature getSignature()
The ExtrinsicSignature
getSignature in interface Types.IExtrinsicpublic Extrinsic addSignature(java.lang.Object signer, byte[] signature, java.lang.Object nonce, byte[] era)
Add an ExtrinsicSignature to the extrinsic (already generated)
addSignature in interface Types.IExtrinsicpublic Extrinsic sign(Types.KeyringPair account, Types.SignatureOptions options)
Sign the extrinsic with a specific keypair
sign in interface Types.IExtrinsicpublic java.lang.String toHex()
Returns a hex string representation of the value
public java.lang.Object toJson()
Converts the Object to JSON, typically used for RPC transfers
public byte[] toU8a(boolean isBare)
StructEncodes the value as a Uint8Array as per the parity-codec specifications