|
1 | 1 | // Copyright 2017-2024 @polkadot/types authors & contributors |
2 | 2 | // SPDX-License-Identifier: Apache-2.0 |
3 | 3 |
|
4 | | -import type { AnyJson, AnyTuple, AnyU8a, ArgsDef, IMethod, Inspect } from '@polkadot/types-codec/types'; |
| 4 | +import type { AnyJson, AnyTuple, AnyU8a, ArgsDef, IMethod, Inspect, IOption } from '@polkadot/types-codec/types'; |
5 | 5 | import type { HexString } from '@polkadot/util/types'; |
6 | 6 | import type { EcdsaSignature, Ed25519Signature, ExtrinsicUnknown, ExtrinsicV4, Sr25519Signature } from '../interfaces/extrinsics/index.js'; |
7 | 7 | import type { FunctionMetadataLatest } from '../interfaces/metadata/index.js'; |
8 | 8 | import type { Address, Call, CodecHash } from '../interfaces/runtime/index.js'; |
| 9 | +import type { MultiLocation } from '../interfaces/types.js'; |
9 | 10 | import type { CallBase, ExtrinsicPayloadValue, ICompact, IExtrinsic, IKeyringPair, INumber, Registry, SignatureOptions } from '../types/index.js'; |
10 | 11 | import type { GenericExtrinsicEra } from './ExtrinsicEra.js'; |
11 | 12 | import type { ExtrinsicValueV4 } from './v4/Extrinsic.js'; |
@@ -191,6 +192,13 @@ abstract class ExtrinsicBase<A extends AnyTuple> extends AbstractBase<ExtrinsicV |
191 | 192 | return this.inner.signature.tip; |
192 | 193 | } |
193 | 194 |
|
| 195 | + /** |
| 196 | + * @description Forward compat |
| 197 | + */ |
| 198 | + public get assetId (): IOption<INumber> | IOption<MultiLocation> { |
| 199 | + return this.inner.signature.assetId; |
| 200 | + } |
| 201 | + |
194 | 202 | /** |
195 | 203 | * @description Returns the raw transaction version (not flagged with signing information) |
196 | 204 | */ |
@@ -316,6 +324,7 @@ export class GenericExtrinsic<A extends AnyTuple = AnyTuple> extends ExtrinsicBa |
316 | 324 | }, |
317 | 325 | this.isSigned |
318 | 326 | ? { |
| 327 | + assetId: this.assetId.toHuman(isExpanded, disableAscii), |
319 | 328 | era: this.era.toHuman(isExpanded, disableAscii), |
320 | 329 | nonce: this.nonce.toHuman(isExpanded, disableAscii), |
321 | 330 | signature: this.signature.toHex(), |
|
0 commit comments