@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.
- package/dist/game/chest.d.ts +0 -12
- package/dist/game/chest.js +0 -24
- package/dist/game/wheel.d.ts +12 -0
- package/dist/game/wheel.js +25 -0
- package/package.json +1 -1
package/dist/game/chest.d.ts
CHANGED
|
@@ -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
|
}
|
package/dist/game/chest.js
CHANGED
|
@@ -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;
|
package/dist/game/wheel.d.ts
CHANGED
|
@@ -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
|
}
|
package/dist/game/wheel.js
CHANGED
|
@@ -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;
|