import { ExtrinsicEra } from '../../interfaces/extrinsics'; import { Hash, Index } from '../../interfaces/runtime'; import { ExtrinsicPayloadValue, IKeyringPair, Registry } from '../../types'; import Compact from '../../codec/Compact'; import Struct from '../../codec/Struct'; import Bytes from '../../primitive/Bytes'; /** * @name GenericExtrinsicPayloadV1 * @description * A signing payload for an [[Extrinsic]]. For the final encoding, it is variable length based * on the contents included * * 1-8 bytes: The Transaction Compact as provided in the transaction itself. * 2+ bytes: The Function Descriptor as provided in the transaction itself. * 1/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. */ export default class ExtrinsicPayloadV1 extends Struct { constructor(registry: Registry, value?: ExtrinsicPayloadValue | Uint8Array | string); /** * @description The block [[Hash]] the signature applies to (mortal/immortal) */ get blockHash(): Hash; /** * @description The [[Bytes]] contained in the payload */ get method(): Bytes; /** * @description The [[ExtrinsicEra]] */ get era(): ExtrinsicEra; /** * @description The [[Index]] */ get nonce(): Compact; /** * @description Sign the payload with the keypair */ sign(signerPair: IKeyringPair): Uint8Array; }