33
44import type { Registry } from '@polkadot/types-codec/types' ;
55import type { HexString } from '@polkadot/util/types' ;
6- import type { Address , Balance , BlockNumber , Call , ExtrinsicEra , Hash , Index , RuntimeVersion } from '../interfaces' ;
7- import type { Codec , ISignerPayload , SignerPayloadJSON , SignerPayloadRaw } from '../types' ;
6+ import type { Address , Call , ExtrinsicEra , Hash } from '../interfaces' ;
7+ import type { Codec , ICompact , INumber , IRuntimeVersion , ISignerPayload , SignerPayloadJSON , SignerPayloadRaw } from '../types' ;
88
9- import { Compact , Option , Struct , Text , u8 , Vec } from '@polkadot/types-codec' ;
9+ import { Option , Struct , Text , Vec } from '@polkadot/types-codec' ;
1010import { objectProperty , objectSpread , u8aToHex } from '@polkadot/util' ;
1111
1212export interface SignerPayloadType extends Codec {
1313 address : Address ;
1414 blockHash : Hash ;
15- blockNumber : BlockNumber ;
15+ blockNumber : INumber ;
1616 era : ExtrinsicEra ;
1717 genesisHash : Hash ;
1818 method : Call ;
19- nonce : Compact < Index > ;
20- runtimeVersion : RuntimeVersion ;
19+ nonce : ICompact < INumber > ;
20+ runtimeVersion : IRuntimeVersion ;
2121 signedExtensions : Vec < Text > ;
22- tip : Compact < Balance > ;
23- version : u8 ;
22+ tip : ICompact < INumber > ;
23+ version : INumber ;
2424}
2525
2626const knownTypes : Record < string , string > = {
@@ -71,7 +71,7 @@ export class GenericSignerPayload extends Struct implements ISignerPayload, Sign
7171 return this . getT ( 'blockHash' ) ;
7272 }
7373
74- get blockNumber ( ) : BlockNumber {
74+ get blockNumber ( ) : INumber {
7575 return this . getT ( 'blockNumber' ) ;
7676 }
7777
@@ -87,23 +87,23 @@ export class GenericSignerPayload extends Struct implements ISignerPayload, Sign
8787 return this . getT ( 'method' ) ;
8888 }
8989
90- get nonce ( ) : Compact < Index > {
90+ get nonce ( ) : ICompact < INumber > {
9191 return this . getT ( 'nonce' ) ;
9292 }
9393
94- get runtimeVersion ( ) : RuntimeVersion {
94+ get runtimeVersion ( ) : IRuntimeVersion {
9595 return this . getT ( 'runtimeVersion' ) ;
9696 }
9797
9898 get signedExtensions ( ) : Vec < Text > {
9999 return this . getT ( 'signedExtensions' ) ;
100100 }
101101
102- get tip ( ) : Compact < Balance > {
102+ get tip ( ) : ICompact < INumber > {
103103 return this . getT ( 'tip' ) ;
104104 }
105105
106- get version ( ) : u8 {
106+ get version ( ) : INumber {
107107 return this . getT ( 'version' ) ;
108108 }
109109
0 commit comments