@jpool/bond-sdk 0.9.0-next.10 → 0.9.0-next.12
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.mts +144 -28
- package/dist/index.d.ts +144 -28
- package/dist/index.js +155 -29
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +155 -29
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -31,7 +31,7 @@ declare const ENV_PROGRAM_ID: Record<string, PublicKey>;
|
|
|
31
31
|
* IDL can be found at `target/idl/jbond.json`.
|
|
32
32
|
*/
|
|
33
33
|
type Jbond = {
|
|
34
|
-
"address": "
|
|
34
|
+
"address": "93BH9J99hQS3YinydR6SVjHuAEECoA9kR1BHwnXeDzQe";
|
|
35
35
|
"metadata": {
|
|
36
36
|
"name": "jbond";
|
|
37
37
|
"version": "0.2.1";
|
|
@@ -187,6 +187,68 @@ type Jbond = {
|
|
|
187
187
|
}
|
|
188
188
|
];
|
|
189
189
|
},
|
|
190
|
+
{
|
|
191
|
+
"name": "bondDisable";
|
|
192
|
+
"docs": [
|
|
193
|
+
"Disables a validator's bond, preventing it from participating further."
|
|
194
|
+
];
|
|
195
|
+
"discriminator": [
|
|
196
|
+
159,
|
|
197
|
+
156,
|
|
198
|
+
97,
|
|
199
|
+
253,
|
|
200
|
+
70,
|
|
201
|
+
122,
|
|
202
|
+
117,
|
|
203
|
+
129
|
|
204
|
+
];
|
|
205
|
+
"accounts": [
|
|
206
|
+
{
|
|
207
|
+
"name": "bondState";
|
|
208
|
+
"writable": true;
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"name": "authority";
|
|
212
|
+
"writable": true;
|
|
213
|
+
"signer": true;
|
|
214
|
+
"relations": [
|
|
215
|
+
"bondState"
|
|
216
|
+
];
|
|
217
|
+
}
|
|
218
|
+
];
|
|
219
|
+
"args": [];
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"name": "bondEnable";
|
|
223
|
+
"docs": [
|
|
224
|
+
"Enables a previously disabled validator's bond."
|
|
225
|
+
];
|
|
226
|
+
"discriminator": [
|
|
227
|
+
133,
|
|
228
|
+
48,
|
|
229
|
+
84,
|
|
230
|
+
9,
|
|
231
|
+
117,
|
|
232
|
+
131,
|
|
233
|
+
164,
|
|
234
|
+
128
|
|
235
|
+
];
|
|
236
|
+
"accounts": [
|
|
237
|
+
{
|
|
238
|
+
"name": "bondState";
|
|
239
|
+
"writable": true;
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"name": "authority";
|
|
243
|
+
"writable": true;
|
|
244
|
+
"signer": true;
|
|
245
|
+
"relations": [
|
|
246
|
+
"bondState"
|
|
247
|
+
];
|
|
248
|
+
}
|
|
249
|
+
];
|
|
250
|
+
"args": [];
|
|
251
|
+
},
|
|
190
252
|
{
|
|
191
253
|
"name": "bondInitialize";
|
|
192
254
|
"docs": [
|
|
@@ -795,6 +857,37 @@ type Jbond = {
|
|
|
795
857
|
];
|
|
796
858
|
"args": [];
|
|
797
859
|
},
|
|
860
|
+
{
|
|
861
|
+
"name": "sessionFinish";
|
|
862
|
+
"docs": [
|
|
863
|
+
"Finishes a bond, preventing further deposits and withdrawals."
|
|
864
|
+
];
|
|
865
|
+
"discriminator": [
|
|
866
|
+
230,
|
|
867
|
+
209,
|
|
868
|
+
54,
|
|
869
|
+
205,
|
|
870
|
+
127,
|
|
871
|
+
141,
|
|
872
|
+
137,
|
|
873
|
+
113
|
|
874
|
+
];
|
|
875
|
+
"accounts": [
|
|
876
|
+
{
|
|
877
|
+
"name": "bondState";
|
|
878
|
+
"writable": true;
|
|
879
|
+
},
|
|
880
|
+
{
|
|
881
|
+
"name": "authority";
|
|
882
|
+
"writable": true;
|
|
883
|
+
"signer": true;
|
|
884
|
+
"relations": [
|
|
885
|
+
"bondState"
|
|
886
|
+
];
|
|
887
|
+
}
|
|
888
|
+
];
|
|
889
|
+
"args": [];
|
|
890
|
+
},
|
|
798
891
|
{
|
|
799
892
|
"name": "sessionStart";
|
|
800
893
|
"docs": [
|
|
@@ -1063,6 +1156,16 @@ type Jbond = {
|
|
|
1063
1156
|
"code": 6021;
|
|
1064
1157
|
"name": "invalidArgument";
|
|
1065
1158
|
"msg": "Invalid argument provided";
|
|
1159
|
+
},
|
|
1160
|
+
{
|
|
1161
|
+
"code": 6022;
|
|
1162
|
+
"name": "bondNotDisabled";
|
|
1163
|
+
"msg": "Bond is not disabled";
|
|
1164
|
+
},
|
|
1165
|
+
{
|
|
1166
|
+
"code": 6023;
|
|
1167
|
+
"name": "bondNotEnabled";
|
|
1168
|
+
"msg": "Bond is not enabled";
|
|
1066
1169
|
}
|
|
1067
1170
|
];
|
|
1068
1171
|
"types": [
|
|
@@ -1241,6 +1344,14 @@ type Jbond = {
|
|
|
1241
1344
|
];
|
|
1242
1345
|
"type": "i64";
|
|
1243
1346
|
},
|
|
1347
|
+
{
|
|
1348
|
+
"name": "status";
|
|
1349
|
+
"type": {
|
|
1350
|
+
"defined": {
|
|
1351
|
+
"name": "bondStatus";
|
|
1352
|
+
};
|
|
1353
|
+
};
|
|
1354
|
+
},
|
|
1244
1355
|
{
|
|
1245
1356
|
"name": "bump";
|
|
1246
1357
|
"docs": [
|
|
@@ -1251,6 +1362,20 @@ type Jbond = {
|
|
|
1251
1362
|
];
|
|
1252
1363
|
};
|
|
1253
1364
|
},
|
|
1365
|
+
{
|
|
1366
|
+
"name": "bondStatus";
|
|
1367
|
+
"type": {
|
|
1368
|
+
"kind": "enum";
|
|
1369
|
+
"variants": [
|
|
1370
|
+
{
|
|
1371
|
+
"name": "active";
|
|
1372
|
+
},
|
|
1373
|
+
{
|
|
1374
|
+
"name": "disabled";
|
|
1375
|
+
}
|
|
1376
|
+
];
|
|
1377
|
+
};
|
|
1378
|
+
},
|
|
1254
1379
|
{
|
|
1255
1380
|
"name": "bondType";
|
|
1256
1381
|
"docs": [
|
|
@@ -1386,15 +1511,6 @@ type Jbond = {
|
|
|
1386
1511
|
"type": {
|
|
1387
1512
|
"kind": "struct";
|
|
1388
1513
|
"fields": [
|
|
1389
|
-
{
|
|
1390
|
-
"name": "bonds";
|
|
1391
|
-
"docs": [
|
|
1392
|
-
"List of all registered bonds"
|
|
1393
|
-
];
|
|
1394
|
-
"type": {
|
|
1395
|
-
"vec": "pubkey";
|
|
1396
|
-
};
|
|
1397
|
-
},
|
|
1398
1514
|
{
|
|
1399
1515
|
"name": "authority";
|
|
1400
1516
|
"docs": [
|
|
@@ -1418,7 +1534,7 @@ type Jbond = {
|
|
|
1418
1534
|
"kind": "struct";
|
|
1419
1535
|
"fields": [
|
|
1420
1536
|
{
|
|
1421
|
-
"name": "
|
|
1537
|
+
"name": "state";
|
|
1422
1538
|
"type": "pubkey";
|
|
1423
1539
|
},
|
|
1424
1540
|
{
|
|
@@ -1439,26 +1555,10 @@ type Jbond = {
|
|
|
1439
1555
|
"option": "pubkey";
|
|
1440
1556
|
};
|
|
1441
1557
|
},
|
|
1442
|
-
{
|
|
1443
|
-
"name": "totalCompensationAmount";
|
|
1444
|
-
"type": "u64";
|
|
1445
|
-
},
|
|
1446
|
-
{
|
|
1447
|
-
"name": "lastCompensationAmount";
|
|
1448
|
-
"type": "u64";
|
|
1449
|
-
},
|
|
1450
|
-
{
|
|
1451
|
-
"name": "lastCompensationEpoch";
|
|
1452
|
-
"type": "u64";
|
|
1453
|
-
},
|
|
1454
1558
|
{
|
|
1455
1559
|
"name": "createdAt";
|
|
1456
1560
|
"type": "i64";
|
|
1457
1561
|
},
|
|
1458
|
-
{
|
|
1459
|
-
"name": "isActive";
|
|
1460
|
-
"type": "bool";
|
|
1461
|
-
},
|
|
1462
1562
|
{
|
|
1463
1563
|
"name": "bump";
|
|
1464
1564
|
"type": "u8";
|
|
@@ -1763,6 +1863,14 @@ declare class JBondClient {
|
|
|
1763
1863
|
bondType: BondType;
|
|
1764
1864
|
name: string;
|
|
1765
1865
|
}): Promise<string | undefined>;
|
|
1866
|
+
bondEnable(props: {
|
|
1867
|
+
bondType: BondType;
|
|
1868
|
+
name: string;
|
|
1869
|
+
}): Promise<string | undefined>;
|
|
1870
|
+
bondDisable(props: {
|
|
1871
|
+
bondType: BondType;
|
|
1872
|
+
name: string;
|
|
1873
|
+
}): Promise<string | undefined>;
|
|
1766
1874
|
buildBondGlobalStateInitializeIx(props: GlobalInitializeProps): Promise<TransactionInstruction>;
|
|
1767
1875
|
/**
|
|
1768
1876
|
* Build configure instruction
|
|
@@ -1778,7 +1886,7 @@ declare class JBondClient {
|
|
|
1778
1886
|
buildWithdrawIx(props: WithdrawCollateralProps): Promise<TransactionInstruction>;
|
|
1779
1887
|
buildClaimIx(props: ClaimProps): Promise<TransactionInstruction>;
|
|
1780
1888
|
buildSetWithdrawAuthorityIx(props: SetWithdrawAuthorityProps): Promise<TransactionInstruction>;
|
|
1781
|
-
buildBondFinishIx(
|
|
1889
|
+
buildBondFinishIx(props: {
|
|
1782
1890
|
bondType: BondType;
|
|
1783
1891
|
name: string;
|
|
1784
1892
|
}): Promise<TransactionInstruction>;
|
|
@@ -1787,6 +1895,14 @@ declare class JBondClient {
|
|
|
1787
1895
|
name: string;
|
|
1788
1896
|
duration_secs: number;
|
|
1789
1897
|
}): Promise<TransactionInstruction>;
|
|
1898
|
+
buildBondEnableIx(props: {
|
|
1899
|
+
bondType: BondType;
|
|
1900
|
+
name: string;
|
|
1901
|
+
}): Promise<TransactionInstruction>;
|
|
1902
|
+
buildBondDisableIx(props: {
|
|
1903
|
+
bondType: BondType;
|
|
1904
|
+
name: string;
|
|
1905
|
+
}): Promise<TransactionInstruction>;
|
|
1790
1906
|
/**
|
|
1791
1907
|
* Fetch global state or throw if not found
|
|
1792
1908
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ declare const ENV_PROGRAM_ID: Record<string, PublicKey>;
|
|
|
31
31
|
* IDL can be found at `target/idl/jbond.json`.
|
|
32
32
|
*/
|
|
33
33
|
type Jbond = {
|
|
34
|
-
"address": "
|
|
34
|
+
"address": "93BH9J99hQS3YinydR6SVjHuAEECoA9kR1BHwnXeDzQe";
|
|
35
35
|
"metadata": {
|
|
36
36
|
"name": "jbond";
|
|
37
37
|
"version": "0.2.1";
|
|
@@ -187,6 +187,68 @@ type Jbond = {
|
|
|
187
187
|
}
|
|
188
188
|
];
|
|
189
189
|
},
|
|
190
|
+
{
|
|
191
|
+
"name": "bondDisable";
|
|
192
|
+
"docs": [
|
|
193
|
+
"Disables a validator's bond, preventing it from participating further."
|
|
194
|
+
];
|
|
195
|
+
"discriminator": [
|
|
196
|
+
159,
|
|
197
|
+
156,
|
|
198
|
+
97,
|
|
199
|
+
253,
|
|
200
|
+
70,
|
|
201
|
+
122,
|
|
202
|
+
117,
|
|
203
|
+
129
|
|
204
|
+
];
|
|
205
|
+
"accounts": [
|
|
206
|
+
{
|
|
207
|
+
"name": "bondState";
|
|
208
|
+
"writable": true;
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"name": "authority";
|
|
212
|
+
"writable": true;
|
|
213
|
+
"signer": true;
|
|
214
|
+
"relations": [
|
|
215
|
+
"bondState"
|
|
216
|
+
];
|
|
217
|
+
}
|
|
218
|
+
];
|
|
219
|
+
"args": [];
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"name": "bondEnable";
|
|
223
|
+
"docs": [
|
|
224
|
+
"Enables a previously disabled validator's bond."
|
|
225
|
+
];
|
|
226
|
+
"discriminator": [
|
|
227
|
+
133,
|
|
228
|
+
48,
|
|
229
|
+
84,
|
|
230
|
+
9,
|
|
231
|
+
117,
|
|
232
|
+
131,
|
|
233
|
+
164,
|
|
234
|
+
128
|
|
235
|
+
];
|
|
236
|
+
"accounts": [
|
|
237
|
+
{
|
|
238
|
+
"name": "bondState";
|
|
239
|
+
"writable": true;
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"name": "authority";
|
|
243
|
+
"writable": true;
|
|
244
|
+
"signer": true;
|
|
245
|
+
"relations": [
|
|
246
|
+
"bondState"
|
|
247
|
+
];
|
|
248
|
+
}
|
|
249
|
+
];
|
|
250
|
+
"args": [];
|
|
251
|
+
},
|
|
190
252
|
{
|
|
191
253
|
"name": "bondInitialize";
|
|
192
254
|
"docs": [
|
|
@@ -795,6 +857,37 @@ type Jbond = {
|
|
|
795
857
|
];
|
|
796
858
|
"args": [];
|
|
797
859
|
},
|
|
860
|
+
{
|
|
861
|
+
"name": "sessionFinish";
|
|
862
|
+
"docs": [
|
|
863
|
+
"Finishes a bond, preventing further deposits and withdrawals."
|
|
864
|
+
];
|
|
865
|
+
"discriminator": [
|
|
866
|
+
230,
|
|
867
|
+
209,
|
|
868
|
+
54,
|
|
869
|
+
205,
|
|
870
|
+
127,
|
|
871
|
+
141,
|
|
872
|
+
137,
|
|
873
|
+
113
|
|
874
|
+
];
|
|
875
|
+
"accounts": [
|
|
876
|
+
{
|
|
877
|
+
"name": "bondState";
|
|
878
|
+
"writable": true;
|
|
879
|
+
},
|
|
880
|
+
{
|
|
881
|
+
"name": "authority";
|
|
882
|
+
"writable": true;
|
|
883
|
+
"signer": true;
|
|
884
|
+
"relations": [
|
|
885
|
+
"bondState"
|
|
886
|
+
];
|
|
887
|
+
}
|
|
888
|
+
];
|
|
889
|
+
"args": [];
|
|
890
|
+
},
|
|
798
891
|
{
|
|
799
892
|
"name": "sessionStart";
|
|
800
893
|
"docs": [
|
|
@@ -1063,6 +1156,16 @@ type Jbond = {
|
|
|
1063
1156
|
"code": 6021;
|
|
1064
1157
|
"name": "invalidArgument";
|
|
1065
1158
|
"msg": "Invalid argument provided";
|
|
1159
|
+
},
|
|
1160
|
+
{
|
|
1161
|
+
"code": 6022;
|
|
1162
|
+
"name": "bondNotDisabled";
|
|
1163
|
+
"msg": "Bond is not disabled";
|
|
1164
|
+
},
|
|
1165
|
+
{
|
|
1166
|
+
"code": 6023;
|
|
1167
|
+
"name": "bondNotEnabled";
|
|
1168
|
+
"msg": "Bond is not enabled";
|
|
1066
1169
|
}
|
|
1067
1170
|
];
|
|
1068
1171
|
"types": [
|
|
@@ -1241,6 +1344,14 @@ type Jbond = {
|
|
|
1241
1344
|
];
|
|
1242
1345
|
"type": "i64";
|
|
1243
1346
|
},
|
|
1347
|
+
{
|
|
1348
|
+
"name": "status";
|
|
1349
|
+
"type": {
|
|
1350
|
+
"defined": {
|
|
1351
|
+
"name": "bondStatus";
|
|
1352
|
+
};
|
|
1353
|
+
};
|
|
1354
|
+
},
|
|
1244
1355
|
{
|
|
1245
1356
|
"name": "bump";
|
|
1246
1357
|
"docs": [
|
|
@@ -1251,6 +1362,20 @@ type Jbond = {
|
|
|
1251
1362
|
];
|
|
1252
1363
|
};
|
|
1253
1364
|
},
|
|
1365
|
+
{
|
|
1366
|
+
"name": "bondStatus";
|
|
1367
|
+
"type": {
|
|
1368
|
+
"kind": "enum";
|
|
1369
|
+
"variants": [
|
|
1370
|
+
{
|
|
1371
|
+
"name": "active";
|
|
1372
|
+
},
|
|
1373
|
+
{
|
|
1374
|
+
"name": "disabled";
|
|
1375
|
+
}
|
|
1376
|
+
];
|
|
1377
|
+
};
|
|
1378
|
+
},
|
|
1254
1379
|
{
|
|
1255
1380
|
"name": "bondType";
|
|
1256
1381
|
"docs": [
|
|
@@ -1386,15 +1511,6 @@ type Jbond = {
|
|
|
1386
1511
|
"type": {
|
|
1387
1512
|
"kind": "struct";
|
|
1388
1513
|
"fields": [
|
|
1389
|
-
{
|
|
1390
|
-
"name": "bonds";
|
|
1391
|
-
"docs": [
|
|
1392
|
-
"List of all registered bonds"
|
|
1393
|
-
];
|
|
1394
|
-
"type": {
|
|
1395
|
-
"vec": "pubkey";
|
|
1396
|
-
};
|
|
1397
|
-
},
|
|
1398
1514
|
{
|
|
1399
1515
|
"name": "authority";
|
|
1400
1516
|
"docs": [
|
|
@@ -1418,7 +1534,7 @@ type Jbond = {
|
|
|
1418
1534
|
"kind": "struct";
|
|
1419
1535
|
"fields": [
|
|
1420
1536
|
{
|
|
1421
|
-
"name": "
|
|
1537
|
+
"name": "state";
|
|
1422
1538
|
"type": "pubkey";
|
|
1423
1539
|
},
|
|
1424
1540
|
{
|
|
@@ -1439,26 +1555,10 @@ type Jbond = {
|
|
|
1439
1555
|
"option": "pubkey";
|
|
1440
1556
|
};
|
|
1441
1557
|
},
|
|
1442
|
-
{
|
|
1443
|
-
"name": "totalCompensationAmount";
|
|
1444
|
-
"type": "u64";
|
|
1445
|
-
},
|
|
1446
|
-
{
|
|
1447
|
-
"name": "lastCompensationAmount";
|
|
1448
|
-
"type": "u64";
|
|
1449
|
-
},
|
|
1450
|
-
{
|
|
1451
|
-
"name": "lastCompensationEpoch";
|
|
1452
|
-
"type": "u64";
|
|
1453
|
-
},
|
|
1454
1558
|
{
|
|
1455
1559
|
"name": "createdAt";
|
|
1456
1560
|
"type": "i64";
|
|
1457
1561
|
},
|
|
1458
|
-
{
|
|
1459
|
-
"name": "isActive";
|
|
1460
|
-
"type": "bool";
|
|
1461
|
-
},
|
|
1462
1562
|
{
|
|
1463
1563
|
"name": "bump";
|
|
1464
1564
|
"type": "u8";
|
|
@@ -1763,6 +1863,14 @@ declare class JBondClient {
|
|
|
1763
1863
|
bondType: BondType;
|
|
1764
1864
|
name: string;
|
|
1765
1865
|
}): Promise<string | undefined>;
|
|
1866
|
+
bondEnable(props: {
|
|
1867
|
+
bondType: BondType;
|
|
1868
|
+
name: string;
|
|
1869
|
+
}): Promise<string | undefined>;
|
|
1870
|
+
bondDisable(props: {
|
|
1871
|
+
bondType: BondType;
|
|
1872
|
+
name: string;
|
|
1873
|
+
}): Promise<string | undefined>;
|
|
1766
1874
|
buildBondGlobalStateInitializeIx(props: GlobalInitializeProps): Promise<TransactionInstruction>;
|
|
1767
1875
|
/**
|
|
1768
1876
|
* Build configure instruction
|
|
@@ -1778,7 +1886,7 @@ declare class JBondClient {
|
|
|
1778
1886
|
buildWithdrawIx(props: WithdrawCollateralProps): Promise<TransactionInstruction>;
|
|
1779
1887
|
buildClaimIx(props: ClaimProps): Promise<TransactionInstruction>;
|
|
1780
1888
|
buildSetWithdrawAuthorityIx(props: SetWithdrawAuthorityProps): Promise<TransactionInstruction>;
|
|
1781
|
-
buildBondFinishIx(
|
|
1889
|
+
buildBondFinishIx(props: {
|
|
1782
1890
|
bondType: BondType;
|
|
1783
1891
|
name: string;
|
|
1784
1892
|
}): Promise<TransactionInstruction>;
|
|
@@ -1787,6 +1895,14 @@ declare class JBondClient {
|
|
|
1787
1895
|
name: string;
|
|
1788
1896
|
duration_secs: number;
|
|
1789
1897
|
}): Promise<TransactionInstruction>;
|
|
1898
|
+
buildBondEnableIx(props: {
|
|
1899
|
+
bondType: BondType;
|
|
1900
|
+
name: string;
|
|
1901
|
+
}): Promise<TransactionInstruction>;
|
|
1902
|
+
buildBondDisableIx(props: {
|
|
1903
|
+
bondType: BondType;
|
|
1904
|
+
name: string;
|
|
1905
|
+
}): Promise<TransactionInstruction>;
|
|
1790
1906
|
/**
|
|
1791
1907
|
* Fetch global state or throw if not found
|
|
1792
1908
|
*/
|