File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -492,7 +492,7 @@ function getKeyPairPath(
492492 configs : SolanaConfigs
493493) : string {
494494 if ( options . keypair ) return options . keypair ;
495- if ( configs . keypairPath ) return configs . keypairPath ;
495+ if ( configs . keypair_path ) return configs . keypair_path ;
496496 return path . join ( os . homedir ( ) , '.config' , 'solana' , 'id.json' ) ;
497497}
498498
@@ -545,23 +545,23 @@ function getClient(options: { rpc?: string }): Client {
545545
546546function getRpcUrl ( options : { rpc ?: string } , configs : SolanaConfigs ) : string {
547547 if ( options . rpc ) return options . rpc ;
548- if ( configs . jsonRpcUrl ) return configs . jsonRpcUrl ;
548+ if ( configs . json_rpc_url ) return configs . json_rpc_url ;
549549 return LOCALHOST_URL ;
550550}
551551
552552function getRpcSubscriptionsUrl (
553553 rpcUrl : string ,
554554 configs : SolanaConfigs
555555) : string {
556- if ( configs . websocketUrl ) return configs . websocketUrl ;
556+ if ( configs . websocket_url ) return configs . websocket_url ;
557557 if ( rpcUrl === LOCALHOST_URL ) return LOCALHOST_WEBSOCKET_URL ;
558558 return rpcUrl . replace ( / ^ h t t p / , 'ws' ) ;
559559}
560560
561561type SolanaConfigs = {
562- jsonRpcUrl ?: string ;
563- websocketUrl ?: string ;
564- keypairPath ?: string ;
562+ json_rpc_url ?: string ;
563+ websocket_url ?: string ;
564+ keypair_path ?: string ;
565565 commitment ?: Commitment ;
566566} ;
567567
You can’t perform that action at this time.
0 commit comments