@@ -48,12 +48,12 @@ export class RpcChannel {
48
48
49
49
private chainId ?: StarknetChainId ;
50
50
51
- private speckVersion ?: string ;
51
+ private specVersion ?: string ;
52
52
53
53
readonly waitMode : Boolean ; // behave like web2 rpc and return when tx is processed
54
54
55
55
constructor ( optionsOrProvider ?: RpcProviderOptions ) {
56
- const { nodeUrl, retries, headers, blockIdentifier, chainId, waitMode } =
56
+ const { nodeUrl, retries, headers, blockIdentifier, chainId, specVersion , waitMode } =
57
57
optionsOrProvider || { } ;
58
58
if ( Object . values ( NetworkName ) . includes ( nodeUrl as NetworkName ) ) {
59
59
this . nodeUrl = getDefaultNodeUrl ( nodeUrl as NetworkName , optionsOrProvider ?. default ) ;
@@ -66,6 +66,7 @@ export class RpcChannel {
66
66
this . headers = { ...defaultOptions . headers , ...headers } ;
67
67
this . blockIdentifier = blockIdentifier || defaultOptions . blockIdentifier ;
68
68
this . chainId = chainId ;
69
+ this . specVersion = specVersion ;
69
70
this . waitMode = waitMode || false ;
70
71
this . requestId = 0 ;
71
72
}
@@ -121,8 +122,8 @@ export class RpcChannel {
121
122
}
122
123
123
124
public async getSpecVersion ( ) {
124
- this . speckVersion ??= ( await this . fetchEndpoint ( 'starknet_specVersion' ) ) as StarknetChainId ;
125
- return this . speckVersion ;
125
+ this . specVersion ??= ( await this . fetchEndpoint ( 'starknet_specVersion' ) ) as StarknetChainId ;
126
+ return this . specVersion ;
126
127
}
127
128
128
129
public getNonceForAddress (
0 commit comments