Class Extrinsic

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Extrinsic.ExtrinsicValue  
      • Nested classes/interfaces inherited from class java.util.AbstractMap

        java.util.AbstractMap.SimpleEntry<K extends java.lang.Object,​V extends java.lang.Object>, java.util.AbstractMap.SimpleImmutableEntry<K extends java.lang.Object,​V extends java.lang.Object>
    • Constructor Summary

      Constructors 
      Constructor Description
      Extrinsic​(java.lang.Object value)  
    • Method Summary

      Modifier and Type Method 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()
      `true` is method has `Origin` argument (compatibility with Method)
      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
      • 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
      • Methods inherited from class java.util.AbstractMap

        equals, hashCode
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Map

        compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
    • Constructor Detail

      • Extrinsic

        public Extrinsic​(java.lang.Object value)
    • Method Detail

      • getArgs

        public java.util.List<Codec> getArgs()
        The arguments passed to for the call, exposes args so it is compatible with Method
        Specified by:
        getArgs in interface Types.IMethod
      • getCallIndex

        public byte[] getCallIndex()
        The actual `[sectionIndex, methodIndex]` as used in the Method
        Specified by:
        getCallIndex in interface Types.IMethod
      • getData

        public byte[] getData()
        The actual data for the Method
        Specified by:
        getData in interface Types.IMethod
      • getHash

        public U8a getHash()
        Convernience function, encodes the extrinsic and returns the actual hash
        Specified by:
        getHash in interface Types.IExtrinsic
      • hasOrigin

        public boolean hasOrigin()
        `true` is method has `Origin` argument (compatibility with Method)
        Specified by:
        hasOrigin in interface Types.IMethod
      • isSigned

        public boolean isSigned()
        `true` id the extrinsic is signed
        Specified by:
        isSigned in interface Types.IExtrinsic
      • length

        public int length()
        The length of the encoded value
      • addSignature

        public Extrinsic addSignature​(java.lang.Object signer,
                                      byte[] signature,
                                      java.lang.Object nonce,
                                      byte[] era)
        Add an ExtrinsicSignature to the extrinsic (already generated)
        Specified by:
        addSignature in interface Types.IExtrinsic
      • toHex

        public java.lang.String toHex()
        Returns a hex string representation of the value
        Specified by:
        toHex in interface Codec
        Overrides:
        toHex in class Struct
      • toJson

        public java.lang.Object toJson()
        Converts the Object to JSON, typically used for RPC transfers
        Specified by:
        toJson in interface Codec
        Overrides:
        toJson in class Struct
      • toU8a

        public byte[] toU8a​(boolean isBare)
        Description copied from class: Struct
        Encodes the value as a Uint8Array as per the parity-codec specifications
        Specified by:
        toU8a in interface Codec
        Overrides:
        toU8a in class Struct
        Parameters:
        isBare - true when the value has none of the type-specific prefixes (internal) Encodes the value as a Uint8Array as per the parity-codec specifications