@triadxyz/poseidons-protocol 0.1.1 → 0.1.2
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/index.d.ts
CHANGED
|
@@ -58,11 +58,13 @@ export default class PoseidonsProtocolClient {
|
|
|
58
58
|
* Add Poseidon rewards
|
|
59
59
|
* @param mint - The mint of the Poseidon
|
|
60
60
|
* @param amount - The amount of rewards to add
|
|
61
|
+
* @param power - The power to add
|
|
61
62
|
* @returns The transaction signature or versioned transaction
|
|
62
63
|
*/
|
|
63
64
|
addPoseidonRewards(poseidons: {
|
|
64
65
|
mint: PublicKey;
|
|
65
66
|
amount: number;
|
|
67
|
+
power: number;
|
|
66
68
|
}[]): Promise<string | import("@solana/web3.js").VersionedTransaction>;
|
|
67
69
|
/**
|
|
68
70
|
* Burn NFT
|
package/dist/index.js
CHANGED
|
@@ -154,6 +154,7 @@ class PoseidonsProtocolClient {
|
|
|
154
154
|
* Add Poseidon rewards
|
|
155
155
|
* @param mint - The mint of the Poseidon
|
|
156
156
|
* @param amount - The amount of rewards to add
|
|
157
|
+
* @param power - The power to add
|
|
157
158
|
* @returns The transaction signature or versioned transaction
|
|
158
159
|
*/
|
|
159
160
|
addPoseidonRewards(poseidons) {
|
|
@@ -161,7 +162,7 @@ class PoseidonsProtocolClient {
|
|
|
161
162
|
const ixs = [];
|
|
162
163
|
for (const poseidon of poseidons) {
|
|
163
164
|
ixs.push(yield this.program.methods
|
|
164
|
-
.addPoseidonRewards(new anchor_1.BN(poseidon.amount * Math.pow(10, 6)))
|
|
165
|
+
.addPoseidonRewards(new anchor_1.BN(poseidon.amount * Math.pow(10, 6)), new anchor_1.BN(poseidon.power))
|
|
165
166
|
.accounts({
|
|
166
167
|
signer: this.program.provider.publicKey,
|
|
167
168
|
poseidon: (0, pda_1.getPoseidonPDA)(poseidon.mint)
|
|
@@ -160,6 +160,10 @@
|
|
|
160
160
|
{
|
|
161
161
|
"name": "rewards",
|
|
162
162
|
"type": "u64"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"name": "power",
|
|
166
|
+
"type": "u64"
|
|
163
167
|
}
|
|
164
168
|
]
|
|
165
169
|
},
|
|
@@ -922,6 +926,10 @@
|
|
|
922
926
|
"name": "BidChestEvent",
|
|
923
927
|
"discriminator": [162, 64, 11, 176, 231, 173, 217, 89]
|
|
924
928
|
},
|
|
929
|
+
{
|
|
930
|
+
"name": "ChestCreatedEvent",
|
|
931
|
+
"discriminator": [27, 178, 135, 161, 240, 189, 246, 238]
|
|
932
|
+
},
|
|
925
933
|
{
|
|
926
934
|
"name": "ChestFinishedEvent",
|
|
927
935
|
"discriminator": [131, 41, 197, 21, 81, 13, 105, 118]
|
|
@@ -1185,6 +1193,34 @@
|
|
|
1185
1193
|
]
|
|
1186
1194
|
}
|
|
1187
1195
|
},
|
|
1196
|
+
{
|
|
1197
|
+
"name": "ChestCreatedEvent",
|
|
1198
|
+
"type": {
|
|
1199
|
+
"kind": "struct",
|
|
1200
|
+
"fields": [
|
|
1201
|
+
{
|
|
1202
|
+
"name": "chest",
|
|
1203
|
+
"type": "pubkey"
|
|
1204
|
+
},
|
|
1205
|
+
{
|
|
1206
|
+
"name": "authority",
|
|
1207
|
+
"type": "pubkey"
|
|
1208
|
+
},
|
|
1209
|
+
{
|
|
1210
|
+
"name": "price",
|
|
1211
|
+
"type": "u64"
|
|
1212
|
+
},
|
|
1213
|
+
{
|
|
1214
|
+
"name": "timer",
|
|
1215
|
+
"type": "i64"
|
|
1216
|
+
},
|
|
1217
|
+
{
|
|
1218
|
+
"name": "timestamp",
|
|
1219
|
+
"type": "i64"
|
|
1220
|
+
}
|
|
1221
|
+
]
|
|
1222
|
+
}
|
|
1223
|
+
},
|
|
1188
1224
|
{
|
|
1189
1225
|
"name": "ChestFinishedEvent",
|
|
1190
1226
|
"type": {
|
|
@@ -1502,7 +1538,7 @@
|
|
|
1502
1538
|
{
|
|
1503
1539
|
"name": "padding",
|
|
1504
1540
|
"type": {
|
|
1505
|
-
"array": ["u8",
|
|
1541
|
+
"array": ["u8", 64]
|
|
1506
1542
|
}
|
|
1507
1543
|
}
|
|
1508
1544
|
]
|
|
@@ -195,6 +195,10 @@ export type PoseidonsProtocol = {
|
|
|
195
195
|
{
|
|
196
196
|
name: 'rewards';
|
|
197
197
|
type: 'u64';
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
name: 'power';
|
|
201
|
+
type: 'u64';
|
|
198
202
|
}
|
|
199
203
|
];
|
|
200
204
|
},
|
|
@@ -1300,6 +1304,10 @@ export type PoseidonsProtocol = {
|
|
|
1300
1304
|
name: 'bidChestEvent';
|
|
1301
1305
|
discriminator: [162, 64, 11, 176, 231, 173, 217, 89];
|
|
1302
1306
|
},
|
|
1307
|
+
{
|
|
1308
|
+
name: 'chestCreatedEvent';
|
|
1309
|
+
discriminator: [27, 178, 135, 161, 240, 189, 246, 238];
|
|
1310
|
+
},
|
|
1303
1311
|
{
|
|
1304
1312
|
name: 'chestFinishedEvent';
|
|
1305
1313
|
discriminator: [131, 41, 197, 21, 81, 13, 105, 118];
|
|
@@ -1563,6 +1571,34 @@ export type PoseidonsProtocol = {
|
|
|
1563
1571
|
];
|
|
1564
1572
|
};
|
|
1565
1573
|
},
|
|
1574
|
+
{
|
|
1575
|
+
name: 'chestCreatedEvent';
|
|
1576
|
+
type: {
|
|
1577
|
+
kind: 'struct';
|
|
1578
|
+
fields: [
|
|
1579
|
+
{
|
|
1580
|
+
name: 'chest';
|
|
1581
|
+
type: 'pubkey';
|
|
1582
|
+
},
|
|
1583
|
+
{
|
|
1584
|
+
name: 'authority';
|
|
1585
|
+
type: 'pubkey';
|
|
1586
|
+
},
|
|
1587
|
+
{
|
|
1588
|
+
name: 'price';
|
|
1589
|
+
type: 'u64';
|
|
1590
|
+
},
|
|
1591
|
+
{
|
|
1592
|
+
name: 'timer';
|
|
1593
|
+
type: 'i64';
|
|
1594
|
+
},
|
|
1595
|
+
{
|
|
1596
|
+
name: 'timestamp';
|
|
1597
|
+
type: 'i64';
|
|
1598
|
+
}
|
|
1599
|
+
];
|
|
1600
|
+
};
|
|
1601
|
+
},
|
|
1566
1602
|
{
|
|
1567
1603
|
name: 'chestFinishedEvent';
|
|
1568
1604
|
type: {
|
|
@@ -1880,7 +1916,7 @@ export type PoseidonsProtocol = {
|
|
|
1880
1916
|
{
|
|
1881
1917
|
name: 'padding';
|
|
1882
1918
|
type: {
|
|
1883
|
-
array: ['u8',
|
|
1919
|
+
array: ['u8', 64];
|
|
1884
1920
|
};
|
|
1885
1921
|
}
|
|
1886
1922
|
];
|