File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { Rpc } from "@lightprotocol/stateless.js" ;
2- import { MINT_ADDRESS , RPC_ENDPOINT } from "../constants" ;
3- import { PublicKey } from "@solana/web3.js" ;
2+ import { RPC_ENDPOINT , PAYER_KEYPAIR } from "../constants" ;
3+
44const stateless = require ( "@lightprotocol/stateless.js" ) ;
55
66const connection : Rpc = stateless . createRpc ( RPC_ENDPOINT , RPC_ENDPOINT ) ;
@@ -12,16 +12,9 @@ const connection: Rpc = stateless.createRpc(RPC_ENDPOINT, RPC_ENDPOINT);
1212 const health = await connection . getIndexerHealth ( ) ;
1313 console . log ( "Indexer Health:" , health ) ;
1414
15- // const accs = await connection.getCompressedAccountsByOwner(
16- // new PublicKey("6MZszp7ihPjUeoi8RJs9NNC4jBxi7beiqvXHJhxd7fe")
17- // );
1815 console . log ( "connection" , connection . rpcEndpoint ) ;
1916 const accs = await connection . getCompressedTokenAccountsByOwner (
20- new PublicKey ( "6MZszp7ihPjUeoi8RJs9NNC4jBxi7beiqvXHJhxd7fe" ) ,
21- {
22- mint : MINT_ADDRESS ,
23- // mint: new PublicKey("APMHh8w6ZWLCv4M5daKAvGzcFLemFPvrNfdHiTLEYghK"),
24- }
17+ PAYER_KEYPAIR . publicKey
2518 ) ;
26- console . log ( accs ) ;
19+ console . log ( "compressed token accounts: " , accs ) ;
2720} ) ( ) ;
You can’t perform that action at this time.
0 commit comments