import { Address, Balance, Call, ExtrinsicEra, Index, Signature } from '../../../interfaces/runtime'; import { ExtrinsicPayloadValue, IExtrinsicSignature, IKeyringPair, SignatureOptions } from '../../../types'; import { ExtrinsicSignatureOptions } from '../types'; import Compact from '../../../codec/Compact'; import Struct from '../../../codec/Struct'; /** * @name ExtrinsicSignature * @description * A container for the [[Signature]] associated with a specific [[Extrinsic]] */ export default class ExtrinsicSignatureV1 extends Struct implements IExtrinsicSignature { constructor(value?: ExtrinsicSignatureV1 | Uint8Array, { isSigned }?: ExtrinsicSignatureOptions); static decodeExtrinsicSignature(value: ExtrinsicSignatureV1 | Uint8Array | undefined, isSigned?: boolean): ExtrinsicSignatureV1 | Uint8Array; /** * @description The length of the value when encoded as a Uint8Array */ readonly encodedLength: number; /** * @description `true` if the signature is valid */ readonly isSigned: boolean; /** * @description The [[ExtrinsicEra]] (mortal or immortal) this signature applies to */ readonly era: ExtrinsicEra; /** * @description The [[Index]] for the signature */ readonly nonce: Compact; /** * @description The actuall [[Signature]] hash */ readonly signature: Signature; /** * @description The [[Address]] that signed */ readonly signer: Address; /** * @description Forwards compat */ readonly tip: Compact; private injectSignature; /** * @description Adds a raw signature */ addSignature(signer: Address | Uint8Array | string, signature: Uint8Array | string, payload: ExtrinsicPayloadValue | Uint8Array | string): IExtrinsicSignature; /** * @description Generate a payload and pplies the signature from a keypair */ sign(method: Call, account: IKeyringPair, { blockHash, era, genesisHash, nonce }: SignatureOptions): IExtrinsicSignature; /** * @description Encodes the value as a Uint8Array as per the SCALE specifications * @param isBare true when the value has none of the type-specific prefixes (internal) */ toU8a(isBare?: boolean): Uint8Array; }