diff --git a/index.html b/index.html index c2a5391..e0b55a2 100644 --- a/index.html +++ b/index.html @@ -623,14 +623,11 @@

Wallet

const keyPairFile = '~/.config/solana/my-keypair.json';
 const wallet = new Wallet(loadKeypair(keyPairFile));
-
from solana.keypair import Keypair
-from anchorpy import Wallet
-import os
-import json
-
-key_pair_file = '~/.config/solana/my-keypair.json'
-with open(os.path.expanduser(key_pair_file), 'r') as f: secret = json.load(f)
-kp = Keypair.from_secret_key(bytes(secret))
+
from anchorpy import Wallet
+from driftpy.keypair import load_keypair
+
+keypair_file = '~/.config/solana/my-keypair.json'
+keypair = load_keypair(keypair_file)
 wallet = Wallet(kp)
 

The wallet used to sign solana transactions. The wallet can be created from a private key or from a keypair file.

@@ -651,16 +648,13 @@

Client Initialization

}); driftClient.subscribe(); -
  import driftpy
-  from anchorpy import Wallet, Provider
-  from driftpy.constants.config import configs
-  from driftpy.clearing_house import ClearingHouse
+
  from anchorpy import Wallet
+  from driftpy.drift_client import DriftClient
+  from solana.rpc.async_api import AsyncClient
 
   # set connection and wallet
   # ...
-  provider = Provider(connection, wallet)
-  config = configs['mainnet'] # or devnet
-  drift_client = ClearingHouse.from_config(config, provider)
+  drift_client = DriftClient(connection, wallet, "mainnet")