@triadxyz/poseidons-protocol 0.2.8 → 0.2.9

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.
@@ -318,7 +318,7 @@
318
318
  "seeds": [
319
319
  {
320
320
  "kind": "const",
321
- "value": [119, 104, 101, 108, 108]
321
+ "value": [119, 104, 101, 101, 108]
322
322
  },
323
323
  {
324
324
  "kind": "arg",
@@ -715,7 +715,7 @@
715
715
  "seeds": [
716
716
  {
717
717
  "kind": "const",
718
- "value": [119, 104, 101, 108, 108]
718
+ "value": [119, 104, 101, 101, 108]
719
719
  },
720
720
  {
721
721
  "kind": "arg",
@@ -879,7 +879,7 @@
879
879
  "seeds": [
880
880
  {
881
881
  "kind": "const",
882
- "value": [119, 104, 101, 108, 108]
882
+ "value": [119, 104, 101, 101, 108]
883
883
  },
884
884
  {
885
885
  "kind": "arg",
@@ -1866,10 +1866,14 @@
1866
1866
  ]
1867
1867
  }
1868
1868
  },
1869
+ {
1870
+ "name": "is_active",
1871
+ "type": "bool"
1872
+ },
1869
1873
  {
1870
1874
  "name": "padding",
1871
1875
  "type": {
1872
- "array": ["u8", 32]
1876
+ "array": ["u8", 31]
1873
1877
  }
1874
1878
  }
1875
1879
  ]
@@ -57,6 +57,7 @@ export type Wheel = {
57
57
  id: number;
58
58
  name: string;
59
59
  count: number;
60
+ isActive: boolean;
60
61
  prizes: Prize[];
61
62
  };
62
63
  export type Prize = {
@@ -423,7 +423,7 @@ export type PoseidonsProtocol = {
423
423
  seeds: [
424
424
  {
425
425
  kind: 'const';
426
- value: [119, 104, 101, 108, 108];
426
+ value: [119, 104, 101, 101, 108];
427
427
  },
428
428
  {
429
429
  kind: 'arg';
@@ -948,7 +948,7 @@ export type PoseidonsProtocol = {
948
948
  seeds: [
949
949
  {
950
950
  kind: 'const';
951
- value: [119, 104, 101, 108, 108];
951
+ value: [119, 104, 101, 101, 108];
952
952
  },
953
953
  {
954
954
  kind: 'arg';
@@ -1170,7 +1170,7 @@ export type PoseidonsProtocol = {
1170
1170
  seeds: [
1171
1171
  {
1172
1172
  kind: 'const';
1173
- value: [119, 104, 101, 108, 108];
1173
+ value: [119, 104, 101, 101, 108];
1174
1174
  },
1175
1175
  {
1176
1176
  kind: 'arg';
@@ -2157,10 +2157,14 @@ export type PoseidonsProtocol = {
2157
2157
  ];
2158
2158
  };
2159
2159
  },
2160
+ {
2161
+ name: 'isActive';
2162
+ type: 'bool';
2163
+ },
2160
2164
  {
2161
2165
  name: 'padding';
2162
2166
  type: {
2163
- array: ['u8', 32];
2167
+ array: ['u8', 31];
2164
2168
  };
2165
2169
  }
2166
2170
  ];
@@ -77,13 +77,14 @@ const formatWheel = (account, address) => {
77
77
  id: account.id,
78
78
  name: account.name,
79
79
  count: account.count.toNumber(),
80
+ isActive: account.isActive,
80
81
  prizes: account.prizes.map((prize) => ({
81
82
  id: prize.id,
82
83
  name: prize.name,
83
84
  available: prize.available.toNumber(),
84
85
  rangeMin: prize.rangeMin.toNumber(),
85
86
  rangeMax: prize.rangeMax.toNumber(),
86
- unit: prize.unit.toNumber()
87
+ unit: prize.unit.toNumber() / Math.pow(10, 6)
87
88
  }))
88
89
  };
89
90
  };
package/dist/utils/pda.js CHANGED
@@ -26,6 +26,6 @@ const getChestPDA = (id) => {
26
26
  };
27
27
  exports.getChestPDA = getChestPDA;
28
28
  const getWheelPDA = (id) => {
29
- return web3_js_1.PublicKey.findProgramAddressSync([Buffer.from('wheel'), new anchor_1.BN(id).toArrayLike(Buffer, 'le', 8)], constants_1.POSEIDON_VAULT_PROGRAM_ID)[0];
29
+ return web3_js_1.PublicKey.findProgramAddressSync([Buffer.from('wheel'), new anchor_1.BN(id).toArrayLike(Buffer, 'le', 1)], constants_1.POSEIDON_VAULT_PROGRAM_ID)[0];
30
30
  };
31
31
  exports.getWheelPDA = getWheelPDA;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@triadxyz/poseidons-protocol",
3
- "version": "0.2.8",
3
+ "version": "0.2.9",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",