Skip to content

Commit 4494736

Browse files
connection
1 parent 3935272 commit 4494736

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

src/scripts/connection.ts

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { 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+
44
const stateless = require("@lightprotocol/stateless.js");
55

66
const 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
})();

0 commit comments

Comments
 (0)