@triadxyz/poseidons-protocol 0.4.8 → 0.5.0

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.
@@ -60,16 +60,4 @@ export default class Chest {
60
60
  amount: number;
61
61
  }[];
62
62
  }): Promise<string | import("@solana/web3.js").VersionedTransaction>;
63
- /**
64
- * Add a wheel ticket
65
- * @param id - The id of the wheel
66
- * @param tickets - The tickets to add
67
- * @param isUsdc - Whether to use USDC or SOL
68
- * @returns The transaction signature or versioned transaction
69
- */
70
- addWheelTicket({ wheelId, tickets, isUsdc }: {
71
- wheelId: number;
72
- tickets: number;
73
- isUsdc: boolean;
74
- }): Promise<string | import("@solana/web3.js").VersionedTransaction>;
75
63
  }
@@ -133,29 +133,5 @@ class Chest {
133
133
  return (0, sendVersionedTransaction_1.default)(this.program, ixs, this.rpcOptions);
134
134
  });
135
135
  }
136
- /**
137
- * Add a wheel ticket
138
- * @param id - The id of the wheel
139
- * @param tickets - The tickets to add
140
- * @param isUsdc - Whether to use USDC or SOL
141
- * @returns The transaction signature or versioned transaction
142
- */
143
- addWheelTicket({ wheelId, tickets, isUsdc }) {
144
- return __awaiter(this, void 0, void 0, function* () {
145
- const ixs = [
146
- yield this.program.methods
147
- .addWheelTicket({
148
- tickets: new anchor_1.BN(tickets),
149
- isUsdc
150
- })
151
- .accounts({
152
- signer: this.program.provider.publicKey,
153
- wheel: (0, pda_1.getWheelPDA)(wheelId)
154
- })
155
- .instruction()
156
- ];
157
- return (0, sendVersionedTransaction_1.default)(this.program, ixs, this.rpcOptions);
158
- });
159
- }
160
136
  }
161
137
  exports.default = Chest;
@@ -71,4 +71,16 @@ export default class Wheel {
71
71
  * @returns The transaction signature or versioned transaction
72
72
  */
73
73
  closeWheel(id: number, isActive: boolean): Promise<string | import("@solana/web3.js").VersionedTransaction>;
74
+ /**
75
+ * Add a wheel ticket
76
+ * @param id - The id of the wheel
77
+ * @param tickets - The tickets to add
78
+ * @param isUsdc - Whether to use USDC or SOL
79
+ * @returns The transaction signature or versioned transaction
80
+ */
81
+ addWheelTicket({ wheelId, tickets, isUsdc }: {
82
+ wheelId: number;
83
+ tickets: number;
84
+ isUsdc: boolean;
85
+ }): Promise<string | import("@solana/web3.js").VersionedTransaction>;
74
86
  }
@@ -158,5 +158,30 @@ class Wheel {
158
158
  return (0, sendVersionedTransaction_1.default)(this.program, ixs, this.rpcOptions);
159
159
  });
160
160
  }
161
+ /**
162
+ * Add a wheel ticket
163
+ * @param id - The id of the wheel
164
+ * @param tickets - The tickets to add
165
+ * @param isUsdc - Whether to use USDC or SOL
166
+ * @returns The transaction signature or versioned transaction
167
+ */
168
+ addWheelTicket({ wheelId, tickets, isUsdc }) {
169
+ return __awaiter(this, void 0, void 0, function* () {
170
+ const ixs = [
171
+ yield this.program.methods
172
+ .addWheelTicket({
173
+ tickets: new anchor_1.BN(tickets),
174
+ isUsdc
175
+ })
176
+ .accounts({
177
+ signer: this.program.provider.publicKey,
178
+ user: (0, pda_1.getUserPDA)(this.program.provider.publicKey),
179
+ wheel: (0, pda_1.getWheelPDA)(wheelId)
180
+ })
181
+ .instruction()
182
+ ];
183
+ return (0, sendVersionedTransaction_1.default)(this.program, ixs, this.rpcOptions);
184
+ });
185
+ }
161
186
  }
162
187
  exports.default = Wheel;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@triadxyz/poseidons-protocol",
3
- "version": "0.4.8",
3
+ "version": "0.5.0",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",