import { Hash, ExtrinsicEra, Index } from '../../../interfaces/runtime'; import { ExtrinsicPayloadValue, IKeyringPair } from '../../../types'; import Compact from '../../../codec/Compact'; import Struct from '../../../codec/Struct'; import Bytes from '../../../primitive/Bytes'; /** * @name ExtrinsicPayloadV1 * @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(value?: ExtrinsicPayloadValue | Uint8Array | string); /** * @description The block [[Hash]] the signature applies to (mortal/immortal) */ readonly blockHash: Hash; /** * @description The [[Bytes]] contained in the payload */ readonly method: Bytes; /** * @description The [[ExtrinsicEra]] */ readonly era: ExtrinsicEra; /** * @description The [[Index]] */ readonly nonce: Compact; /** * @description Sign the payload with the keypair */ sign(signerPair: IKeyringPair): Uint8Array; }