@symmetry-hq/temp-v3-sdk 0.0.9 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -312,15 +312,17 @@ function fetchBaskets(connection, filters) {
312
312
  { dataSize: 8 + basket_1.BasketLayout.getSpan() },
313
313
  ];
314
314
  for (const filter of filters) {
315
- if (filter.filterType === "host") {
315
+ if (filter.filterType === "creator") {
316
+ // Offset: discriminator(8) + version(1) + ownAddress(32) + mint(32) + supplyOutstanding(8) = 81
316
317
  accountFilters.push({ memcmp: {
317
- offset: 8 + 1 + 16 + 32 + 32 + 8 + 16 + 8,
318
+ offset: 8 + 1 + 32 + 32 + 8,
318
319
  bytes: filter.filterValue.toBase58()
319
320
  } });
320
321
  }
321
- else if (filter.filterType === "creator") {
322
+ else if (filter.filterType === "host") {
323
+ // Offset: discriminator(8) + version(1) + ownAddress(32) + mint(32) + supplyOutstanding(8) + creator(32) = 113
322
324
  accountFilters.push({ memcmp: {
323
- offset: 8 + 1 + 16 + 32 + 32 + 8 + 16 + 8 + 32,
325
+ offset: 8 + 1 + 32 + 32 + 8 + 32,
324
326
  bytes: filter.filterValue.toBase58()
325
327
  } });
326
328
  }
package/dist/test.js CHANGED
@@ -15,7 +15,6 @@ const anchor_1 = require("@coral-xyz/anchor");
15
15
  let connection = new web3_js_1.Connection("https://api.devnet.solana.com");
16
16
  function testStates() {
17
17
  return __awaiter(this, void 0, void 0, function* () {
18
- return;
19
18
  let kp = Array.from(web3_js_1.Keypair.generate().secretKey);
20
19
  let wallet = new anchor_1.Wallet(web3_js_1.Keypair.fromSecretKey(new Uint8Array(kp)));
21
20
  console.log(wallet.publicKey.toBase58());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@symmetry-hq/temp-v3-sdk",
3
- "version": "0.0.9",
3
+ "version": "0.0.10",
4
4
  "description": "Symmetry Baskets V3 SDK",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",
package/src/constants.ts CHANGED
@@ -22,7 +22,6 @@ export const MINTS: Record<string, Record<string, PublicKey>> = {
22
22
  export const PYTHNET_CUSTODY_PRICE_WSOL_ACCOUNT = new PublicKey("7UVimffxr9ow1uXYxsr4LHAcV58mLzhmwaeKvJ1pjLiE");
23
23
  export const PYTHNET_CUSTODY_PRICE_USDC_ACCOUNT = new PublicKey("Dpw1EAVrSB1ibxiDQyTAW6Zip3J4Btk2x4SgApQCeFbX");
24
24
 
25
-
26
25
  export const INTENT_TASK_DATA_SIZE = 600;
27
26
  export const MAX_MANAGERS_PER_BASKET = 10;
28
27
 
@@ -319,14 +319,16 @@ export async function fetchBaskets(
319
319
  { dataSize: 8 + BasketLayout.getSpan() },
320
320
  ];
321
321
  for (const filter of filters) {
322
- if (filter.filterType === "host") {
322
+ if (filter.filterType === "creator") {
323
+ // Offset: discriminator(8) + version(1) + ownAddress(32) + mint(32) + supplyOutstanding(8) = 81
323
324
  accountFilters.push({ memcmp: {
324
- offset: 8 + 1 + 16 + 32 + 32 + 8 + 16 + 8,
325
+ offset: 8 + 1 + 32 + 32 + 8,
325
326
  bytes: filter.filterValue.toBase58()
326
327
  } });
327
- } else if (filter.filterType === "creator") {
328
+ } else if (filter.filterType === "host") {
329
+ // Offset: discriminator(8) + version(1) + ownAddress(32) + mint(32) + supplyOutstanding(8) + creator(32) = 113
328
330
  accountFilters.push({ memcmp: {
329
- offset: 8 + 1 + 16 + 32 + 32 + 8 + 16 + 8 + 32,
331
+ offset: 8 + 1 + 32 + 32 + 8 + 32,
330
332
  bytes: filter.filterValue.toBase58()
331
333
  } });
332
334
  }
package/test.ts CHANGED
@@ -7,7 +7,6 @@ import { bs58 } from "@coral-xyz/anchor/dist/cjs/utils/bytes";
7
7
  let connection = new Connection("https://api.devnet.solana.com");
8
8
 
9
9
  async function testStates() {
10
- return;
11
10
  let kp = Array.from(Keypair.generate().secretKey);
12
11
  let wallet = new Wallet(Keypair.fromSecretKey(new Uint8Array(kp)));
13
12
  console.log(wallet.publicKey.toBase58());