@glamsystems/glam-sdk 1.0.13 → 1.0.14-alpha.1
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/README.md +1 -1
- package/index.cjs.js +14513 -21874
- package/index.esm.js +14492 -21817
- package/package.json +2 -2
- package/src/assets.d.ts +6 -15
- package/src/client/base.d.ts +24 -5
- package/src/client/bridge.d.ts +184 -0
- package/src/client/bridgeRegistry.d.ts +32 -0
- package/src/client/epi.d.ts +78 -0
- package/src/client/fees.d.ts +1 -0
- package/src/client/jupiter.d.ts +22 -18
- package/src/client/price.d.ts +13 -37
- package/src/client.d.ts +6 -5
- package/src/constants.d.ts +5 -7
- package/src/deser/index.d.ts +0 -1
- package/src/deser/integrationPolicies.d.ts +23 -20
- package/src/error.d.ts +2 -1
- package/src/glamExports.d.ts +2423 -1787
- package/src/globalConfig.d.ts +22 -0
- package/src/index.d.ts +3 -1
- package/src/react/glam.d.ts +0 -4
- package/src/react/query-keys.d.ts +1 -3
- package/src/utils/accounts.d.ts +4 -1
- package/src/utils/common.d.ts +2 -0
- package/src/utils/index.d.ts +0 -1
- package/src/utils/positionCategorizer.d.ts +3 -21
- package/target/idl/ext_cctp.json +1 -1
- package/target/idl/ext_kamino-staging.json +1 -1
- package/target/idl/ext_kamino.json +109 -1
- package/target/idl/ext_spl-staging.json +1 -1
- package/target/idl/ext_spl.json +1 -1
- package/target/idl/glam_config.json +75 -9
- package/target/idl/glam_mint.json +205 -11
- package/target/idl/glam_policies.json +2 -7
- package/target/idl/glam_protocol-staging.json +118 -522
- package/target/idl/glam_protocol.json +204 -121
- package/target/types/ext_bridge.d.ts +2398 -0
- package/target/types/ext_cctp.d.ts +1 -1
- package/target/types/ext_cctp.ts +1 -1
- package/target/types/ext_epi.d.ts +2175 -0
- package/target/types/ext_kamino-staging.ts +1 -1
- package/target/types/ext_kamino.d.ts +109 -1
- package/target/types/ext_kamino.ts +109 -1
- package/target/types/ext_spl-staging.ts +1 -1
- package/target/types/ext_spl.d.ts +1 -1
- package/target/types/ext_spl.ts +1 -1
- package/target/types/glam_config.d.ts +75 -9
- package/target/types/glam_config.ts +75 -9
- package/target/types/glam_mint.d.ts +205 -11
- package/target/types/glam_mint.ts +205 -11
- package/target/types/glam_policies.ts +2 -7
- package/target/types/glam_protocol-staging.ts +118 -522
- package/target/types/glam_protocol.d.ts +204 -121
- package/target/types/glam_protocol.ts +204 -121
- package/src/client/drift/index.d.ts +0 -2
- package/src/client/drift/protocol-v2.d.ts +0 -130
- package/src/client/drift/vaults.d.ts +0 -60
- package/src/deser/driftLayouts.d.ts +0 -217
- package/src/utils/drift/index.d.ts +0 -2
- package/src/utils/drift/orderParams.d.ts +0 -28
- package/src/utils/drift/types.d.ts +0 -522
- package/target/idl/ext_drift-staging.json +0 -5442
- package/target/idl/ext_drift.json +0 -4962
- package/target/types/ext_drift-staging.ts +0 -5448
- package/target/types/ext_drift.d.ts +0 -4968
- package/target/types/ext_drift.ts +0 -4968
- package/target/types/ext_offchain.d.ts +0 -1074
|
@@ -8,7 +8,7 @@ export type GlamProtocol = {
|
|
|
8
8
|
"address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz";
|
|
9
9
|
"metadata": {
|
|
10
10
|
"name": "glamProtocol";
|
|
11
|
-
"version": "1.0.
|
|
11
|
+
"version": "1.0.4";
|
|
12
12
|
"spec": "0.1.0";
|
|
13
13
|
"description": "Glam Protocol";
|
|
14
14
|
};
|
|
@@ -450,6 +450,149 @@ export type GlamProtocol = {
|
|
|
450
450
|
}
|
|
451
451
|
];
|
|
452
452
|
},
|
|
453
|
+
{
|
|
454
|
+
"name": "jupiterSwapV2";
|
|
455
|
+
"discriminator": [
|
|
456
|
+
28,
|
|
457
|
+
155,
|
|
458
|
+
14,
|
|
459
|
+
63,
|
|
460
|
+
87,
|
|
461
|
+
96,
|
|
462
|
+
62,
|
|
463
|
+
221
|
|
464
|
+
];
|
|
465
|
+
"accounts": [
|
|
466
|
+
{
|
|
467
|
+
"name": "glamState";
|
|
468
|
+
"writable": true;
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
"name": "glamVault";
|
|
472
|
+
"writable": true;
|
|
473
|
+
"pda": {
|
|
474
|
+
"seeds": [
|
|
475
|
+
{
|
|
476
|
+
"kind": "const";
|
|
477
|
+
"value": [
|
|
478
|
+
118,
|
|
479
|
+
97,
|
|
480
|
+
117,
|
|
481
|
+
108,
|
|
482
|
+
116
|
|
483
|
+
];
|
|
484
|
+
},
|
|
485
|
+
{
|
|
486
|
+
"kind": "account";
|
|
487
|
+
"path": "glamState";
|
|
488
|
+
}
|
|
489
|
+
];
|
|
490
|
+
};
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
"name": "glamSigner";
|
|
494
|
+
"writable": true;
|
|
495
|
+
"signer": true;
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
"name": "cpiProgram";
|
|
499
|
+
"address": "JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4";
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
"name": "inputStakePool";
|
|
503
|
+
"optional": true;
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
"name": "outputStakePool";
|
|
507
|
+
"optional": true;
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
"name": "glamConfig";
|
|
511
|
+
"optional": true;
|
|
512
|
+
"pda": {
|
|
513
|
+
"seeds": [
|
|
514
|
+
{
|
|
515
|
+
"kind": "const";
|
|
516
|
+
"value": [
|
|
517
|
+
103,
|
|
518
|
+
108,
|
|
519
|
+
111,
|
|
520
|
+
98,
|
|
521
|
+
97,
|
|
522
|
+
108,
|
|
523
|
+
45,
|
|
524
|
+
99,
|
|
525
|
+
111,
|
|
526
|
+
110,
|
|
527
|
+
102,
|
|
528
|
+
105,
|
|
529
|
+
103
|
|
530
|
+
];
|
|
531
|
+
}
|
|
532
|
+
];
|
|
533
|
+
"program": {
|
|
534
|
+
"kind": "const";
|
|
535
|
+
"value": [
|
|
536
|
+
10,
|
|
537
|
+
11,
|
|
538
|
+
0,
|
|
539
|
+
83,
|
|
540
|
+
72,
|
|
541
|
+
16,
|
|
542
|
+
46,
|
|
543
|
+
144,
|
|
544
|
+
46,
|
|
545
|
+
42,
|
|
546
|
+
79,
|
|
547
|
+
22,
|
|
548
|
+
157,
|
|
549
|
+
123,
|
|
550
|
+
21,
|
|
551
|
+
242,
|
|
552
|
+
192,
|
|
553
|
+
146,
|
|
554
|
+
1,
|
|
555
|
+
78,
|
|
556
|
+
88,
|
|
557
|
+
59,
|
|
558
|
+
102,
|
|
559
|
+
9,
|
|
560
|
+
190,
|
|
561
|
+
226,
|
|
562
|
+
92,
|
|
563
|
+
189,
|
|
564
|
+
187,
|
|
565
|
+
232,
|
|
566
|
+
83,
|
|
567
|
+
220
|
|
568
|
+
];
|
|
569
|
+
};
|
|
570
|
+
};
|
|
571
|
+
},
|
|
572
|
+
{
|
|
573
|
+
"name": "solUsdOracle";
|
|
574
|
+
"optional": true;
|
|
575
|
+
},
|
|
576
|
+
{
|
|
577
|
+
"name": "inputTokenOracle";
|
|
578
|
+
"optional": true;
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
"name": "outputTokenOracle";
|
|
582
|
+
"optional": true;
|
|
583
|
+
}
|
|
584
|
+
];
|
|
585
|
+
"args": [
|
|
586
|
+
{
|
|
587
|
+
"name": "skipQuotePriceCheck";
|
|
588
|
+
"type": "bool";
|
|
589
|
+
},
|
|
590
|
+
{
|
|
591
|
+
"name": "data";
|
|
592
|
+
"type": "bytes";
|
|
593
|
+
}
|
|
594
|
+
];
|
|
595
|
+
},
|
|
453
596
|
{
|
|
454
597
|
"name": "linkUnlinkMintByMintAuthority";
|
|
455
598
|
"docs": [
|
|
@@ -1002,8 +1145,8 @@ export type GlamProtocol = {
|
|
|
1002
1145
|
},
|
|
1003
1146
|
{
|
|
1004
1147
|
"code": 48010;
|
|
1005
|
-
"name": "
|
|
1006
|
-
"msg": "Account
|
|
1148
|
+
"name": "unexpectedProgramOwner";
|
|
1149
|
+
"msg": "Account is owned by an unexpected program";
|
|
1007
1150
|
},
|
|
1008
1151
|
{
|
|
1009
1152
|
"code": 48011;
|
|
@@ -1032,8 +1175,8 @@ export type GlamProtocol = {
|
|
|
1032
1175
|
},
|
|
1033
1176
|
{
|
|
1034
1177
|
"code": 49004;
|
|
1035
|
-
"name": "
|
|
1036
|
-
"msg": "
|
|
1178
|
+
"name": "invalidAssetsLen";
|
|
1179
|
+
"msg": "Too many assets: max 100";
|
|
1037
1180
|
},
|
|
1038
1181
|
{
|
|
1039
1182
|
"code": 49005;
|
|
@@ -1092,24 +1235,29 @@ export type GlamProtocol = {
|
|
|
1092
1235
|
},
|
|
1093
1236
|
{
|
|
1094
1237
|
"code": 49016;
|
|
1095
|
-
"name": "
|
|
1096
|
-
"msg": "
|
|
1238
|
+
"name": "staleDriftInterest";
|
|
1239
|
+
"msg": "Drift spot market cumulative interest is stale";
|
|
1097
1240
|
},
|
|
1098
1241
|
{
|
|
1099
1242
|
"code": 49017;
|
|
1100
|
-
"name": "delegateAclLimitExceeded";
|
|
1101
|
-
"msg": "Delegate ACL limit exceeded";
|
|
1102
|
-
},
|
|
1103
|
-
{
|
|
1104
|
-
"code": 49018;
|
|
1105
1243
|
"name": "assetBalanceNotZero";
|
|
1106
1244
|
"msg": "Cannot delete asset: vault token account balance is not zero";
|
|
1107
1245
|
},
|
|
1108
1246
|
{
|
|
1109
|
-
"code":
|
|
1247
|
+
"code": 49018;
|
|
1110
1248
|
"name": "cannotDeleteBaseAsset";
|
|
1111
1249
|
"msg": "Cannot delete base asset from allowlist";
|
|
1112
1250
|
},
|
|
1251
|
+
{
|
|
1252
|
+
"code": 49019;
|
|
1253
|
+
"name": "integrationAclLimitExceeded";
|
|
1254
|
+
"msg": "Integration ACL limit exceeded";
|
|
1255
|
+
},
|
|
1256
|
+
{
|
|
1257
|
+
"code": 49020;
|
|
1258
|
+
"name": "delegateAclLimitExceeded";
|
|
1259
|
+
"msg": "Delegate ACL limit exceeded";
|
|
1260
|
+
},
|
|
1113
1261
|
{
|
|
1114
1262
|
"code": 50000;
|
|
1115
1263
|
"name": "withdrawDenied";
|
|
@@ -1150,6 +1298,11 @@ export type GlamProtocol = {
|
|
|
1150
1298
|
"name": "multipleStakeAccountsDisallowed";
|
|
1151
1299
|
"msg": "Multiple stake accounts disallowed";
|
|
1152
1300
|
},
|
|
1301
|
+
{
|
|
1302
|
+
"code": 50008;
|
|
1303
|
+
"name": "maxDeviationExceeded";
|
|
1304
|
+
"msg": "Max deviation exceeded";
|
|
1305
|
+
},
|
|
1153
1306
|
{
|
|
1154
1307
|
"code": 51000;
|
|
1155
1308
|
"name": "invalidAssetPrice";
|
|
@@ -1188,7 +1341,7 @@ export type GlamProtocol = {
|
|
|
1188
1341
|
{
|
|
1189
1342
|
"code": 51105;
|
|
1190
1343
|
"name": "priceDivergenceTooLarge";
|
|
1191
|
-
"msg": "
|
|
1344
|
+
"msg": "No priced assets found";
|
|
1192
1345
|
},
|
|
1193
1346
|
{
|
|
1194
1347
|
"code": 51106;
|
|
@@ -1197,18 +1350,18 @@ export type GlamProtocol = {
|
|
|
1197
1350
|
},
|
|
1198
1351
|
{
|
|
1199
1352
|
"code": 51107;
|
|
1200
|
-
"name": "
|
|
1201
|
-
"msg": "
|
|
1353
|
+
"name": "mathError";
|
|
1354
|
+
"msg": "Math error";
|
|
1202
1355
|
},
|
|
1203
1356
|
{
|
|
1204
1357
|
"code": 51108;
|
|
1205
|
-
"name": "
|
|
1206
|
-
"msg": "
|
|
1358
|
+
"name": "typeCastingError";
|
|
1359
|
+
"msg": "Type casting error";
|
|
1207
1360
|
},
|
|
1208
1361
|
{
|
|
1209
1362
|
"code": 51109;
|
|
1210
|
-
"name": "
|
|
1211
|
-
"msg": "
|
|
1363
|
+
"name": "baseAssetNotSupported";
|
|
1364
|
+
"msg": "Base asset must have 6 decimals.";
|
|
1212
1365
|
},
|
|
1213
1366
|
{
|
|
1214
1367
|
"code": 51110;
|
|
@@ -1227,8 +1380,8 @@ export type GlamProtocol = {
|
|
|
1227
1380
|
},
|
|
1228
1381
|
{
|
|
1229
1382
|
"code": 51113;
|
|
1230
|
-
"name": "
|
|
1231
|
-
"msg": "
|
|
1383
|
+
"name": "unexpectedDiscriminator";
|
|
1384
|
+
"msg": "Invalid account: discriminator mismatch";
|
|
1232
1385
|
},
|
|
1233
1386
|
{
|
|
1234
1387
|
"code": 51114;
|
|
@@ -1240,6 +1393,11 @@ export type GlamProtocol = {
|
|
|
1240
1393
|
"name": "oraclePriceSuspended";
|
|
1241
1394
|
"msg": "Oracle price is suspended";
|
|
1242
1395
|
},
|
|
1396
|
+
{
|
|
1397
|
+
"code": 51116;
|
|
1398
|
+
"name": "assetNotInPricingSet";
|
|
1399
|
+
"msg": "Asset not in pricing set";
|
|
1400
|
+
},
|
|
1243
1401
|
{
|
|
1244
1402
|
"code": 50100;
|
|
1245
1403
|
"name": "transferRateLimitExceeded";
|
|
@@ -1269,6 +1427,16 @@ export type GlamProtocol = {
|
|
|
1269
1427
|
"code": 52003;
|
|
1270
1428
|
"name": "lockUp";
|
|
1271
1429
|
"msg": "Policy violation: lock-up has not expired";
|
|
1430
|
+
},
|
|
1431
|
+
{
|
|
1432
|
+
"code": 52004;
|
|
1433
|
+
"name": "policyNotSet";
|
|
1434
|
+
"msg": "Protocol policy not set";
|
|
1435
|
+
},
|
|
1436
|
+
{
|
|
1437
|
+
"code": 52005;
|
|
1438
|
+
"name": "unsupportedOracleSource";
|
|
1439
|
+
"msg": "Oracle source not supported in this context";
|
|
1272
1440
|
}
|
|
1273
1441
|
];
|
|
1274
1442
|
"types": [
|
|
@@ -1358,30 +1526,6 @@ export type GlamProtocol = {
|
|
|
1358
1526
|
];
|
|
1359
1527
|
};
|
|
1360
1528
|
},
|
|
1361
|
-
{
|
|
1362
|
-
"name": "assetRateLimit";
|
|
1363
|
-
"type": {
|
|
1364
|
-
"kind": "struct";
|
|
1365
|
-
"fields": [
|
|
1366
|
-
{
|
|
1367
|
-
"name": "mint";
|
|
1368
|
-
"type": "pubkey";
|
|
1369
|
-
},
|
|
1370
|
-
{
|
|
1371
|
-
"name": "periodType";
|
|
1372
|
-
"type": {
|
|
1373
|
-
"defined": {
|
|
1374
|
-
"name": "periodType";
|
|
1375
|
-
};
|
|
1376
|
-
};
|
|
1377
|
-
},
|
|
1378
|
-
{
|
|
1379
|
-
"name": "amount";
|
|
1380
|
-
"type": "u64";
|
|
1381
|
-
}
|
|
1382
|
-
];
|
|
1383
|
-
};
|
|
1384
|
-
},
|
|
1385
1529
|
{
|
|
1386
1530
|
"name": "createdModel";
|
|
1387
1531
|
"type": {
|
|
@@ -1433,28 +1577,6 @@ export type GlamProtocol = {
|
|
|
1433
1577
|
];
|
|
1434
1578
|
};
|
|
1435
1579
|
},
|
|
1436
|
-
{
|
|
1437
|
-
"name": "delegateRateLimit";
|
|
1438
|
-
"type": {
|
|
1439
|
-
"kind": "struct";
|
|
1440
|
-
"fields": [
|
|
1441
|
-
{
|
|
1442
|
-
"name": "delegate";
|
|
1443
|
-
"type": "pubkey";
|
|
1444
|
-
},
|
|
1445
|
-
{
|
|
1446
|
-
"name": "limits";
|
|
1447
|
-
"type": {
|
|
1448
|
-
"vec": {
|
|
1449
|
-
"defined": {
|
|
1450
|
-
"name": "assetRateLimit";
|
|
1451
|
-
};
|
|
1452
|
-
};
|
|
1453
|
-
};
|
|
1454
|
-
}
|
|
1455
|
-
];
|
|
1456
|
-
};
|
|
1457
|
-
},
|
|
1458
1580
|
{
|
|
1459
1581
|
"name": "emergencyAccessUpdateArgs";
|
|
1460
1582
|
"type": {
|
|
@@ -1963,6 +2085,10 @@ export type GlamProtocol = {
|
|
|
1963
2085
|
"vec": "pubkey";
|
|
1964
2086
|
};
|
|
1965
2087
|
};
|
|
2088
|
+
},
|
|
2089
|
+
{
|
|
2090
|
+
"name": "maxDeviationBps";
|
|
2091
|
+
"type": "i16";
|
|
1966
2092
|
}
|
|
1967
2093
|
];
|
|
1968
2094
|
};
|
|
@@ -2125,26 +2251,6 @@ export type GlamProtocol = {
|
|
|
2125
2251
|
];
|
|
2126
2252
|
};
|
|
2127
2253
|
},
|
|
2128
|
-
{
|
|
2129
|
-
"name": "periodType";
|
|
2130
|
-
"repr": {
|
|
2131
|
-
"kind": "rust";
|
|
2132
|
-
};
|
|
2133
|
-
"type": {
|
|
2134
|
-
"kind": "enum";
|
|
2135
|
-
"variants": [
|
|
2136
|
-
{
|
|
2137
|
-
"name": "day";
|
|
2138
|
-
},
|
|
2139
|
-
{
|
|
2140
|
-
"name": "week";
|
|
2141
|
-
},
|
|
2142
|
-
{
|
|
2143
|
-
"name": "month";
|
|
2144
|
-
}
|
|
2145
|
-
];
|
|
2146
|
-
};
|
|
2147
|
-
},
|
|
2148
2254
|
{
|
|
2149
2255
|
"name": "pricedProtocol";
|
|
2150
2256
|
"type": {
|
|
@@ -2512,34 +2618,6 @@ export type GlamProtocol = {
|
|
|
2512
2618
|
];
|
|
2513
2619
|
};
|
|
2514
2620
|
},
|
|
2515
|
-
{
|
|
2516
|
-
"name": "transferRateLimitPolicy";
|
|
2517
|
-
"type": {
|
|
2518
|
-
"kind": "struct";
|
|
2519
|
-
"fields": [
|
|
2520
|
-
{
|
|
2521
|
-
"name": "vaultDefaults";
|
|
2522
|
-
"type": {
|
|
2523
|
-
"vec": {
|
|
2524
|
-
"defined": {
|
|
2525
|
-
"name": "assetRateLimit";
|
|
2526
|
-
};
|
|
2527
|
-
};
|
|
2528
|
-
};
|
|
2529
|
-
},
|
|
2530
|
-
{
|
|
2531
|
-
"name": "delegateOverrides";
|
|
2532
|
-
"type": {
|
|
2533
|
-
"vec": {
|
|
2534
|
-
"defined": {
|
|
2535
|
-
"name": "delegateRateLimit";
|
|
2536
|
-
};
|
|
2537
|
-
};
|
|
2538
|
-
};
|
|
2539
|
-
}
|
|
2540
|
-
];
|
|
2541
|
-
};
|
|
2542
|
-
},
|
|
2543
2621
|
{
|
|
2544
2622
|
"name": "valuationModel";
|
|
2545
2623
|
"type": {
|
|
@@ -2561,6 +2639,16 @@ export type GlamProtocol = {
|
|
|
2561
2639
|
"type": "u16";
|
|
2562
2640
|
"value": "4";
|
|
2563
2641
|
},
|
|
2642
|
+
{
|
|
2643
|
+
"name": "protoJupiterSwapPermSkipQuotePriceCheck";
|
|
2644
|
+
"type": "u64";
|
|
2645
|
+
"value": "32";
|
|
2646
|
+
},
|
|
2647
|
+
{
|
|
2648
|
+
"name": "protoJupiterSwapPermSkipQuotePriceCheckLimited";
|
|
2649
|
+
"type": "u64";
|
|
2650
|
+
"value": "16";
|
|
2651
|
+
},
|
|
2564
2652
|
{
|
|
2565
2653
|
"name": "protoJupiterSwapPermSwapAllowlisted";
|
|
2566
2654
|
"type": "u64";
|
|
@@ -2615,11 +2703,6 @@ export type GlamProtocol = {
|
|
|
2615
2703
|
"name": "protoSystemPermWsol";
|
|
2616
2704
|
"type": "u64";
|
|
2617
2705
|
"value": "1";
|
|
2618
|
-
},
|
|
2619
|
-
{
|
|
2620
|
-
"name": "protoTransferLimit";
|
|
2621
|
-
"type": "u16";
|
|
2622
|
-
"value": "8";
|
|
2623
2706
|
}
|
|
2624
2707
|
];
|
|
2625
2708
|
};
|