@glamsystems/glam-sdk 0.1.23 → 0.1.24
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/index.cjs.js +19534 -379
- package/index.esm.js +19534 -380
- package/package.json +3 -3
- package/src/client/assets.d.ts +17 -0
- package/src/client/base.d.ts +3 -0
- package/src/client/investor.d.ts +4 -4
- package/src/client/kamino.d.ts +2 -2
- package/src/client/marinade.d.ts +18 -2
- package/src/client/meteora.d.ts +1 -1
- package/src/client/price.d.ts +1 -1
- package/src/client/staking.d.ts +1 -6
- package/src/client/state.d.ts +1 -15
- package/src/client/vault.d.ts +27 -0
- package/src/client.d.ts +3 -3
- package/src/constants.d.ts +1 -3
- package/src/models.d.ts +18 -2
- package/src/react/glam.d.ts +3 -1
- package/src/utils/helpers.d.ts +8 -4
- package/target/idl/glam_protocol.json +269 -44
- package/target/types/glam_protocol.d.ts +269 -44
- package/target/types/glam_protocol.ts +269 -44
- package/src/client/wsol.d.ts +0 -11
|
@@ -8,7 +8,7 @@ export type GlamProtocol = {
|
|
|
8
8
|
"address": "GLAMbTqav9N9witRjswJ8enwp9vv5G8bsSJ2kPJ4rcyc";
|
|
9
9
|
"metadata": {
|
|
10
10
|
"name": "glamProtocol";
|
|
11
|
-
"version": "0.4.
|
|
11
|
+
"version": "0.4.24";
|
|
12
12
|
"spec": "0.1.0";
|
|
13
13
|
"description": "Glam Protocol";
|
|
14
14
|
};
|
|
@@ -2906,11 +2906,6 @@ export type GlamProtocol = {
|
|
|
2906
2906
|
"name": "escrow";
|
|
2907
2907
|
"writable": true;
|
|
2908
2908
|
},
|
|
2909
|
-
{
|
|
2910
|
-
"name": "payer";
|
|
2911
|
-
"writable": true;
|
|
2912
|
-
"signer": true;
|
|
2913
|
-
},
|
|
2914
2909
|
{
|
|
2915
2910
|
"name": "systemProgram";
|
|
2916
2911
|
"address": "11111111111111111111111111111111";
|
|
@@ -4178,6 +4173,126 @@ export type GlamProtocol = {
|
|
|
4178
4173
|
}
|
|
4179
4174
|
];
|
|
4180
4175
|
},
|
|
4176
|
+
{
|
|
4177
|
+
"name": "marinadeWithdrawStakeAccount";
|
|
4178
|
+
"discriminator": [
|
|
4179
|
+
88,
|
|
4180
|
+
200,
|
|
4181
|
+
107,
|
|
4182
|
+
134,
|
|
4183
|
+
244,
|
|
4184
|
+
89,
|
|
4185
|
+
194,
|
|
4186
|
+
111
|
|
4187
|
+
];
|
|
4188
|
+
"accounts": [
|
|
4189
|
+
{
|
|
4190
|
+
"name": "glamState";
|
|
4191
|
+
"writable": true;
|
|
4192
|
+
},
|
|
4193
|
+
{
|
|
4194
|
+
"name": "glamVault";
|
|
4195
|
+
"writable": true;
|
|
4196
|
+
"pda": {
|
|
4197
|
+
"seeds": [
|
|
4198
|
+
{
|
|
4199
|
+
"kind": "const";
|
|
4200
|
+
"value": [
|
|
4201
|
+
118,
|
|
4202
|
+
97,
|
|
4203
|
+
117,
|
|
4204
|
+
108,
|
|
4205
|
+
116
|
|
4206
|
+
];
|
|
4207
|
+
},
|
|
4208
|
+
{
|
|
4209
|
+
"kind": "account";
|
|
4210
|
+
"path": "glamState";
|
|
4211
|
+
}
|
|
4212
|
+
];
|
|
4213
|
+
};
|
|
4214
|
+
},
|
|
4215
|
+
{
|
|
4216
|
+
"name": "glamSigner";
|
|
4217
|
+
"writable": true;
|
|
4218
|
+
"signer": true;
|
|
4219
|
+
},
|
|
4220
|
+
{
|
|
4221
|
+
"name": "cpiProgram";
|
|
4222
|
+
"address": "MarBmsSgKXdrN1egZf5sqe1TMai9K1rChYNDJgjq7aD";
|
|
4223
|
+
},
|
|
4224
|
+
{
|
|
4225
|
+
"name": "state";
|
|
4226
|
+
"writable": true;
|
|
4227
|
+
},
|
|
4228
|
+
{
|
|
4229
|
+
"name": "msolMint";
|
|
4230
|
+
"writable": true;
|
|
4231
|
+
},
|
|
4232
|
+
{
|
|
4233
|
+
"name": "burnMsolFrom";
|
|
4234
|
+
"writable": true;
|
|
4235
|
+
},
|
|
4236
|
+
{
|
|
4237
|
+
"name": "treasuryMsolAccount";
|
|
4238
|
+
"writable": true;
|
|
4239
|
+
},
|
|
4240
|
+
{
|
|
4241
|
+
"name": "validatorList";
|
|
4242
|
+
"writable": true;
|
|
4243
|
+
},
|
|
4244
|
+
{
|
|
4245
|
+
"name": "stakeList";
|
|
4246
|
+
"writable": true;
|
|
4247
|
+
},
|
|
4248
|
+
{
|
|
4249
|
+
"name": "stakeWithdrawAuthority";
|
|
4250
|
+
},
|
|
4251
|
+
{
|
|
4252
|
+
"name": "stakeDepositAuthority";
|
|
4253
|
+
},
|
|
4254
|
+
{
|
|
4255
|
+
"name": "stakeAccount";
|
|
4256
|
+
"writable": true;
|
|
4257
|
+
},
|
|
4258
|
+
{
|
|
4259
|
+
"name": "splitStakeAccount";
|
|
4260
|
+
"writable": true;
|
|
4261
|
+
"signer": true;
|
|
4262
|
+
},
|
|
4263
|
+
{
|
|
4264
|
+
"name": "clock";
|
|
4265
|
+
},
|
|
4266
|
+
{
|
|
4267
|
+
"name": "systemProgram";
|
|
4268
|
+
"address": "11111111111111111111111111111111";
|
|
4269
|
+
},
|
|
4270
|
+
{
|
|
4271
|
+
"name": "tokenProgram";
|
|
4272
|
+
},
|
|
4273
|
+
{
|
|
4274
|
+
"name": "stakeProgram";
|
|
4275
|
+
}
|
|
4276
|
+
];
|
|
4277
|
+
"args": [
|
|
4278
|
+
{
|
|
4279
|
+
"name": "stakeIndex";
|
|
4280
|
+
"type": "u32";
|
|
4281
|
+
},
|
|
4282
|
+
{
|
|
4283
|
+
"name": "validatorIndex";
|
|
4284
|
+
"type": "u32";
|
|
4285
|
+
},
|
|
4286
|
+
{
|
|
4287
|
+
"name": "msolAmount";
|
|
4288
|
+
"type": "u64";
|
|
4289
|
+
},
|
|
4290
|
+
{
|
|
4291
|
+
"name": "beneficiary";
|
|
4292
|
+
"type": "pubkey";
|
|
4293
|
+
}
|
|
4294
|
+
];
|
|
4295
|
+
},
|
|
4181
4296
|
{
|
|
4182
4297
|
"name": "merkleDistributorNewClaimAndStake";
|
|
4183
4298
|
"discriminator": [
|
|
@@ -4820,16 +4935,16 @@ export type GlamProtocol = {
|
|
|
4820
4935
|
];
|
|
4821
4936
|
},
|
|
4822
4937
|
{
|
|
4823
|
-
"name": "
|
|
4938
|
+
"name": "meteoraDlmmClosePosition2";
|
|
4824
4939
|
"discriminator": [
|
|
4825
|
-
|
|
4940
|
+
69,
|
|
4826
4941
|
117,
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
221,
|
|
4830
|
-
194,
|
|
4942
|
+
240,
|
|
4943
|
+
192,
|
|
4831
4944
|
34,
|
|
4832
|
-
|
|
4945
|
+
79,
|
|
4946
|
+
62,
|
|
4947
|
+
230
|
|
4833
4948
|
];
|
|
4834
4949
|
"accounts": [
|
|
4835
4950
|
{
|
|
@@ -4870,18 +4985,6 @@ export type GlamProtocol = {
|
|
|
4870
4985
|
"name": "position";
|
|
4871
4986
|
"writable": true;
|
|
4872
4987
|
},
|
|
4873
|
-
{
|
|
4874
|
-
"name": "lbPair";
|
|
4875
|
-
"writable": true;
|
|
4876
|
-
},
|
|
4877
|
-
{
|
|
4878
|
-
"name": "binArrayLower";
|
|
4879
|
-
"writable": true;
|
|
4880
|
-
},
|
|
4881
|
-
{
|
|
4882
|
-
"name": "binArrayUpper";
|
|
4883
|
-
"writable": true;
|
|
4884
|
-
},
|
|
4885
4988
|
{
|
|
4886
4989
|
"name": "rentReceiver";
|
|
4887
4990
|
"writable": true;
|
|
@@ -4942,11 +5045,6 @@ export type GlamProtocol = {
|
|
|
4942
5045
|
"name": "cpiProgram";
|
|
4943
5046
|
"address": "LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo";
|
|
4944
5047
|
},
|
|
4945
|
-
{
|
|
4946
|
-
"name": "payer";
|
|
4947
|
-
"writable": true;
|
|
4948
|
-
"signer": true;
|
|
4949
|
-
},
|
|
4950
5048
|
{
|
|
4951
5049
|
"name": "position";
|
|
4952
5050
|
"writable": true;
|
|
@@ -5028,11 +5126,6 @@ export type GlamProtocol = {
|
|
|
5028
5126
|
"name": "cpiProgram";
|
|
5029
5127
|
"address": "LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo";
|
|
5030
5128
|
},
|
|
5031
|
-
{
|
|
5032
|
-
"name": "payer";
|
|
5033
|
-
"writable": true;
|
|
5034
|
-
"signer": true;
|
|
5035
|
-
},
|
|
5036
5129
|
{
|
|
5037
5130
|
"name": "position";
|
|
5038
5131
|
"writable": true;
|
|
@@ -6772,6 +6865,102 @@ export type GlamProtocol = {
|
|
|
6772
6865
|
}
|
|
6773
6866
|
];
|
|
6774
6867
|
},
|
|
6868
|
+
{
|
|
6869
|
+
"name": "setProtocolFees";
|
|
6870
|
+
"discriminator": [
|
|
6871
|
+
49,
|
|
6872
|
+
143,
|
|
6873
|
+
189,
|
|
6874
|
+
18,
|
|
6875
|
+
56,
|
|
6876
|
+
206,
|
|
6877
|
+
158,
|
|
6878
|
+
226
|
|
6879
|
+
];
|
|
6880
|
+
"accounts": [
|
|
6881
|
+
{
|
|
6882
|
+
"name": "glamState";
|
|
6883
|
+
"writable": true;
|
|
6884
|
+
},
|
|
6885
|
+
{
|
|
6886
|
+
"name": "signer";
|
|
6887
|
+
"writable": true;
|
|
6888
|
+
"signer": true;
|
|
6889
|
+
},
|
|
6890
|
+
{
|
|
6891
|
+
"name": "glamConfig";
|
|
6892
|
+
"pda": {
|
|
6893
|
+
"seeds": [
|
|
6894
|
+
{
|
|
6895
|
+
"kind": "const";
|
|
6896
|
+
"value": [
|
|
6897
|
+
103,
|
|
6898
|
+
108,
|
|
6899
|
+
111,
|
|
6900
|
+
98,
|
|
6901
|
+
97,
|
|
6902
|
+
108,
|
|
6903
|
+
95,
|
|
6904
|
+
99,
|
|
6905
|
+
111,
|
|
6906
|
+
110,
|
|
6907
|
+
102,
|
|
6908
|
+
105,
|
|
6909
|
+
103
|
|
6910
|
+
];
|
|
6911
|
+
}
|
|
6912
|
+
];
|
|
6913
|
+
"program": {
|
|
6914
|
+
"kind": "const";
|
|
6915
|
+
"value": [
|
|
6916
|
+
10,
|
|
6917
|
+
11,
|
|
6918
|
+
0,
|
|
6919
|
+
83,
|
|
6920
|
+
72,
|
|
6921
|
+
16,
|
|
6922
|
+
46,
|
|
6923
|
+
144,
|
|
6924
|
+
46,
|
|
6925
|
+
42,
|
|
6926
|
+
79,
|
|
6927
|
+
22,
|
|
6928
|
+
157,
|
|
6929
|
+
123,
|
|
6930
|
+
21,
|
|
6931
|
+
242,
|
|
6932
|
+
192,
|
|
6933
|
+
146,
|
|
6934
|
+
1,
|
|
6935
|
+
78,
|
|
6936
|
+
88,
|
|
6937
|
+
59,
|
|
6938
|
+
102,
|
|
6939
|
+
9,
|
|
6940
|
+
190,
|
|
6941
|
+
226,
|
|
6942
|
+
92,
|
|
6943
|
+
189,
|
|
6944
|
+
187,
|
|
6945
|
+
232,
|
|
6946
|
+
83,
|
|
6947
|
+
220
|
|
6948
|
+
];
|
|
6949
|
+
};
|
|
6950
|
+
};
|
|
6951
|
+
}
|
|
6952
|
+
];
|
|
6953
|
+
"args": [
|
|
6954
|
+
{
|
|
6955
|
+
"name": "baseFeeBps";
|
|
6956
|
+
"type": "u16";
|
|
6957
|
+
},
|
|
6958
|
+
{
|
|
6959
|
+
"name": "flowFeeBps";
|
|
6960
|
+
"type": "u16";
|
|
6961
|
+
}
|
|
6962
|
+
];
|
|
6963
|
+
},
|
|
6775
6964
|
{
|
|
6776
6965
|
"name": "setTokenAccountsStates";
|
|
6777
6966
|
"discriminator": [
|
|
@@ -6876,7 +7065,7 @@ export type GlamProtocol = {
|
|
|
6876
7065
|
"type": "pubkey";
|
|
6877
7066
|
},
|
|
6878
7067
|
{
|
|
6879
|
-
"name": "
|
|
7068
|
+
"name": "stakerOrWithdrawer";
|
|
6880
7069
|
"type": "u32";
|
|
6881
7070
|
}
|
|
6882
7071
|
];
|
|
@@ -9282,6 +9471,26 @@ export type GlamProtocol = {
|
|
|
9282
9471
|
"name": "timelockStillActive";
|
|
9283
9472
|
"msg": "Timelock still active";
|
|
9284
9473
|
},
|
|
9474
|
+
{
|
|
9475
|
+
"code": 48006;
|
|
9476
|
+
"name": "assetNotBorrowable";
|
|
9477
|
+
"msg": "Asset is not allowed to borrow";
|
|
9478
|
+
},
|
|
9479
|
+
{
|
|
9480
|
+
"code": 48007;
|
|
9481
|
+
"name": "invalidAccountOwner";
|
|
9482
|
+
"msg": "Account owned by an invalid program";
|
|
9483
|
+
},
|
|
9484
|
+
{
|
|
9485
|
+
"code": 48008;
|
|
9486
|
+
"name": "invalidAuthority";
|
|
9487
|
+
"msg": "Invalid authority";
|
|
9488
|
+
},
|
|
9489
|
+
{
|
|
9490
|
+
"code": 48009;
|
|
9491
|
+
"name": "invalidPriceDenom";
|
|
9492
|
+
"msg": "Invalid price denom";
|
|
9493
|
+
},
|
|
9285
9494
|
{
|
|
9286
9495
|
"code": 49000;
|
|
9287
9496
|
"name": "invalidAccountType";
|
|
@@ -9472,6 +9681,16 @@ export type GlamProtocol = {
|
|
|
9472
9681
|
"name": "mathError";
|
|
9473
9682
|
"msg": "Math error";
|
|
9474
9683
|
},
|
|
9684
|
+
{
|
|
9685
|
+
"code": 51108;
|
|
9686
|
+
"name": "typeCastingError";
|
|
9687
|
+
"msg": "Type casting error";
|
|
9688
|
+
},
|
|
9689
|
+
{
|
|
9690
|
+
"code": 51109;
|
|
9691
|
+
"name": "baseAssetNotSupported";
|
|
9692
|
+
"msg": "Base asset must have 6 decimals.";
|
|
9693
|
+
},
|
|
9475
9694
|
{
|
|
9476
9695
|
"code": 52000;
|
|
9477
9696
|
"name": "transfersDisabled";
|
|
@@ -10020,6 +10239,9 @@ export type GlamProtocol = {
|
|
|
10020
10239
|
},
|
|
10021
10240
|
{
|
|
10022
10241
|
"name": "meteoraDlmmPools";
|
|
10242
|
+
},
|
|
10243
|
+
{
|
|
10244
|
+
"name": "borrowableAssets";
|
|
10023
10245
|
}
|
|
10024
10246
|
];
|
|
10025
10247
|
};
|
|
@@ -11617,6 +11839,9 @@ export type GlamProtocol = {
|
|
|
11617
11839
|
},
|
|
11618
11840
|
{
|
|
11619
11841
|
"name": "marinadeState";
|
|
11842
|
+
},
|
|
11843
|
+
{
|
|
11844
|
+
"name": "baseAsset";
|
|
11620
11845
|
}
|
|
11621
11846
|
];
|
|
11622
11847
|
};
|
|
@@ -12513,14 +12738,6 @@ export type GlamProtocol = {
|
|
|
12513
12738
|
};
|
|
12514
12739
|
};
|
|
12515
12740
|
},
|
|
12516
|
-
{
|
|
12517
|
-
"name": "externalVaultAccounts";
|
|
12518
|
-
"type": {
|
|
12519
|
-
"option": {
|
|
12520
|
-
"vec": "pubkey";
|
|
12521
|
-
};
|
|
12522
|
-
};
|
|
12523
|
-
},
|
|
12524
12741
|
{
|
|
12525
12742
|
"name": "mints";
|
|
12526
12743
|
"type": {
|
|
@@ -12609,6 +12826,14 @@ export type GlamProtocol = {
|
|
|
12609
12826
|
};
|
|
12610
12827
|
};
|
|
12611
12828
|
},
|
|
12829
|
+
{
|
|
12830
|
+
"name": "borrowableAssets";
|
|
12831
|
+
"type": {
|
|
12832
|
+
"option": {
|
|
12833
|
+
"vec": "pubkey";
|
|
12834
|
+
};
|
|
12835
|
+
};
|
|
12836
|
+
},
|
|
12612
12837
|
{
|
|
12613
12838
|
"name": "driftMarketIndexesPerp";
|
|
12614
12839
|
"type": {
|