@triadxyz/triad-protocol 2.2.0-beta → 2.2.2-beta

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.
@@ -2,3 +2,4 @@ import { PublicKey } from '@solana/web3.js';
2
2
  export declare const getCollectionPDA: (programId: PublicKey, collectionSymbol: string) => PublicKey;
3
3
  export declare const getNftPDA: (programId: PublicKey, number: number) => PublicKey;
4
4
  export declare const getPoseidonPDA: (programId: PublicKey, number: number) => PublicKey;
5
+ export declare const getChestPDA: (programId: PublicKey, id: number) => PublicKey;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getPoseidonPDA = exports.getNftPDA = exports.getCollectionPDA = void 0;
6
+ exports.getChestPDA = exports.getPoseidonPDA = exports.getNftPDA = exports.getCollectionPDA = void 0;
7
7
  const web3_js_1 = require("@solana/web3.js");
8
8
  const bn_js_1 = __importDefault(require("bn.js"));
9
9
  const getCollectionPDA = (programId, collectionSymbol) => {
@@ -18,3 +18,7 @@ const getPoseidonPDA = (programId, number) => {
18
18
  return web3_js_1.PublicKey.findProgramAddressSync([Buffer.from('poseidon'), new bn_js_1.default(number).toArrayLike(Buffer, 'le', 8)], programId)[0];
19
19
  };
20
20
  exports.getPoseidonPDA = getPoseidonPDA;
21
+ const getChestPDA = (programId, id) => {
22
+ return web3_js_1.PublicKey.findProgramAddressSync([Buffer.from('chest'), new bn_js_1.default(id).toArrayLike(Buffer, 'le', 8)], programId)[0];
23
+ };
24
+ exports.getChestPDA = getChestPDA;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@triadxyz/triad-protocol",
3
- "version": "2.2.0-beta",
3
+ "version": "2.2.2-beta",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",