@triadxyz/poseidons-protocol 0.1.1 → 0.1.3
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]
|
|
@@ -1095,6 +1103,10 @@
|
|
|
1095
1103
|
"name": "coins",
|
|
1096
1104
|
"type": "u64"
|
|
1097
1105
|
},
|
|
1106
|
+
{
|
|
1107
|
+
"name": "amount",
|
|
1108
|
+
"type": "u64"
|
|
1109
|
+
},
|
|
1098
1110
|
{
|
|
1099
1111
|
"name": "timestamp",
|
|
1100
1112
|
"type": "i64"
|
|
@@ -1185,6 +1197,34 @@
|
|
|
1185
1197
|
]
|
|
1186
1198
|
}
|
|
1187
1199
|
},
|
|
1200
|
+
{
|
|
1201
|
+
"name": "ChestCreatedEvent",
|
|
1202
|
+
"type": {
|
|
1203
|
+
"kind": "struct",
|
|
1204
|
+
"fields": [
|
|
1205
|
+
{
|
|
1206
|
+
"name": "chest",
|
|
1207
|
+
"type": "pubkey"
|
|
1208
|
+
},
|
|
1209
|
+
{
|
|
1210
|
+
"name": "authority",
|
|
1211
|
+
"type": "pubkey"
|
|
1212
|
+
},
|
|
1213
|
+
{
|
|
1214
|
+
"name": "price",
|
|
1215
|
+
"type": "u64"
|
|
1216
|
+
},
|
|
1217
|
+
{
|
|
1218
|
+
"name": "timer",
|
|
1219
|
+
"type": "i64"
|
|
1220
|
+
},
|
|
1221
|
+
{
|
|
1222
|
+
"name": "timestamp",
|
|
1223
|
+
"type": "i64"
|
|
1224
|
+
}
|
|
1225
|
+
]
|
|
1226
|
+
}
|
|
1227
|
+
},
|
|
1188
1228
|
{
|
|
1189
1229
|
"name": "ChestFinishedEvent",
|
|
1190
1230
|
"type": {
|
|
@@ -1499,10 +1539,14 @@
|
|
|
1499
1539
|
"name": "created_at",
|
|
1500
1540
|
"type": "i64"
|
|
1501
1541
|
},
|
|
1542
|
+
{
|
|
1543
|
+
"name": "coins",
|
|
1544
|
+
"type": "u64"
|
|
1545
|
+
},
|
|
1502
1546
|
{
|
|
1503
1547
|
"name": "padding",
|
|
1504
1548
|
"type": {
|
|
1505
|
-
"array": ["u8",
|
|
1549
|
+
"array": ["u8", 56]
|
|
1506
1550
|
}
|
|
1507
1551
|
}
|
|
1508
1552
|
]
|
|
@@ -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];
|
|
@@ -1473,6 +1481,10 @@ export type PoseidonsProtocol = {
|
|
|
1473
1481
|
name: 'coins';
|
|
1474
1482
|
type: 'u64';
|
|
1475
1483
|
},
|
|
1484
|
+
{
|
|
1485
|
+
name: 'amount';
|
|
1486
|
+
type: 'u64';
|
|
1487
|
+
},
|
|
1476
1488
|
{
|
|
1477
1489
|
name: 'timestamp';
|
|
1478
1490
|
type: 'i64';
|
|
@@ -1563,6 +1575,34 @@ export type PoseidonsProtocol = {
|
|
|
1563
1575
|
];
|
|
1564
1576
|
};
|
|
1565
1577
|
},
|
|
1578
|
+
{
|
|
1579
|
+
name: 'chestCreatedEvent';
|
|
1580
|
+
type: {
|
|
1581
|
+
kind: 'struct';
|
|
1582
|
+
fields: [
|
|
1583
|
+
{
|
|
1584
|
+
name: 'chest';
|
|
1585
|
+
type: 'pubkey';
|
|
1586
|
+
},
|
|
1587
|
+
{
|
|
1588
|
+
name: 'authority';
|
|
1589
|
+
type: 'pubkey';
|
|
1590
|
+
},
|
|
1591
|
+
{
|
|
1592
|
+
name: 'price';
|
|
1593
|
+
type: 'u64';
|
|
1594
|
+
},
|
|
1595
|
+
{
|
|
1596
|
+
name: 'timer';
|
|
1597
|
+
type: 'i64';
|
|
1598
|
+
},
|
|
1599
|
+
{
|
|
1600
|
+
name: 'timestamp';
|
|
1601
|
+
type: 'i64';
|
|
1602
|
+
}
|
|
1603
|
+
];
|
|
1604
|
+
};
|
|
1605
|
+
},
|
|
1566
1606
|
{
|
|
1567
1607
|
name: 'chestFinishedEvent';
|
|
1568
1608
|
type: {
|
|
@@ -1877,10 +1917,14 @@ export type PoseidonsProtocol = {
|
|
|
1877
1917
|
name: 'createdAt';
|
|
1878
1918
|
type: 'i64';
|
|
1879
1919
|
},
|
|
1920
|
+
{
|
|
1921
|
+
name: 'coins';
|
|
1922
|
+
type: 'u64';
|
|
1923
|
+
},
|
|
1880
1924
|
{
|
|
1881
1925
|
name: 'padding';
|
|
1882
1926
|
type: {
|
|
1883
|
-
array: ['u8',
|
|
1927
|
+
array: ['u8', 56];
|
|
1884
1928
|
};
|
|
1885
1929
|
}
|
|
1886
1930
|
];
|