@glamsystems/glam-sdk 1.0.12 → 1.0.13

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.
Files changed (36) hide show
  1. package/index.cjs.js +9309 -4898
  2. package/index.esm.js +9299 -4900
  3. package/package.json +1 -1
  4. package/src/assets.d.ts +3 -0
  5. package/src/client/access.d.ts +13 -0
  6. package/src/client/base.d.ts +3 -1
  7. package/src/client/drift/protocol-v2.d.ts +37 -0
  8. package/src/client/fees.d.ts +3 -0
  9. package/src/client/invest.d.ts +1 -1
  10. package/src/client/mint.d.ts +54 -1
  11. package/src/constants.d.ts +5 -0
  12. package/src/deser/index.d.ts +1 -0
  13. package/src/deser/tokenAclLayouts.d.ts +67 -0
  14. package/src/glamExports.d.ts +210 -260
  15. package/src/index.d.ts +1 -0
  16. package/src/utils/accounts.d.ts +5 -0
  17. package/src/utils/bitmask.d.ts +3 -0
  18. package/src/utils/glamPDAs.d.ts +5 -0
  19. package/target/idl/ext_drift-staging.json +1598 -149
  20. package/target/idl/ext_drift.json +1096 -127
  21. package/target/idl/glam_config.json +3 -0
  22. package/target/idl/glam_mint-staging.json +865 -0
  23. package/target/idl/glam_mint.json +25 -0
  24. package/target/idl/glam_protocol-staging.json +305 -0
  25. package/target/idl/glam_protocol.json +15 -0
  26. package/target/types/ext_drift-staging.ts +1598 -149
  27. package/target/types/ext_drift.d.ts +1102 -133
  28. package/target/types/ext_drift.ts +1096 -127
  29. package/target/types/glam_config.d.ts +3 -0
  30. package/target/types/glam_config.ts +3 -0
  31. package/target/types/glam_mint-staging.ts +865 -0
  32. package/target/types/glam_mint.d.ts +25 -0
  33. package/target/types/glam_mint.ts +25 -0
  34. package/target/types/glam_protocol-staging.ts +305 -0
  35. package/target/types/glam_protocol.d.ts +15 -0
  36. package/target/types/glam_protocol.ts +15 -0
@@ -4554,6 +4554,16 @@
4554
4554
  "code": 6016,
4555
4555
  "name": "AmountBelowMinimum",
4556
4556
  "msg": "Amount below minimum threshold"
4557
+ },
4558
+ {
4559
+ "code": 6017,
4560
+ "name": "TokenAclManagesFreezeThaw",
4561
+ "msg": "Token ACL is enabled; freeze/thaw is managed by the Token ACL program"
4562
+ },
4563
+ {
4564
+ "code": 6018,
4565
+ "name": "InvalidMintState",
4566
+ "msg": "Invalid mint state"
4557
4567
  }
4558
4568
  ],
4559
4569
  "types": [
@@ -5864,6 +5874,21 @@
5864
5874
  "name": "PROTO_MINT_PERM_SET_TOKEN_ACCOUNT_STATE",
5865
5875
  "type": "u64",
5866
5876
  "value": "8"
5877
+ },
5878
+ {
5879
+ "name": "PROTO_MINT_PERM_TOKEN_ACL_APPLY_LIST",
5880
+ "type": "u64",
5881
+ "value": "2048"
5882
+ },
5883
+ {
5884
+ "name": "PROTO_MINT_PERM_TOKEN_ACL_FREEZE_THAW",
5885
+ "type": "u64",
5886
+ "value": "512"
5887
+ },
5888
+ {
5889
+ "name": "PROTO_MINT_PERM_TOKEN_ACL_MANAGE_LIST",
5890
+ "type": "u64",
5891
+ "value": "1024"
5867
5892
  }
5868
5893
  ]
5869
5894
  }
@@ -7,6 +7,31 @@
7
7
  "description": "Glam Protocol"
8
8
  },
9
9
  "instructions": [
10
+ {
11
+ "name": "add_assets",
12
+ "discriminator": [
13
+ 221,
14
+ 232,
15
+ 106,
16
+ 164,
17
+ 156,
18
+ 75,
19
+ 127,
20
+ 106
21
+ ],
22
+ "accounts": [
23
+ {
24
+ "name": "glam_state",
25
+ "writable": true
26
+ },
27
+ {
28
+ "name": "glam_signer",
29
+ "writable": true,
30
+ "signer": true
31
+ }
32
+ ],
33
+ "args": []
34
+ },
10
35
  {
11
36
  "name": "cancel_timelock",
12
37
  "discriminator": [
@@ -32,6 +57,246 @@
32
57
  ],
33
58
  "args": []
34
59
  },
60
+ {
61
+ "name": "charge_protocol_fee",
62
+ "discriminator": [
63
+ 48,
64
+ 225,
65
+ 89,
66
+ 103,
67
+ 48,
68
+ 65,
69
+ 183,
70
+ 238
71
+ ],
72
+ "accounts": [
73
+ {
74
+ "name": "glam_state",
75
+ "writable": true
76
+ },
77
+ {
78
+ "name": "glam_vault",
79
+ "writable": true,
80
+ "pda": {
81
+ "seeds": [
82
+ {
83
+ "kind": "const",
84
+ "value": [
85
+ 118,
86
+ 97,
87
+ 117,
88
+ 108,
89
+ 116
90
+ ]
91
+ },
92
+ {
93
+ "kind": "account",
94
+ "path": "glam_state"
95
+ }
96
+ ]
97
+ }
98
+ },
99
+ {
100
+ "name": "signer",
101
+ "writable": true,
102
+ "signer": true
103
+ },
104
+ {
105
+ "name": "deposit_asset"
106
+ },
107
+ {
108
+ "name": "vault_deposit_ata",
109
+ "writable": true,
110
+ "pda": {
111
+ "seeds": [
112
+ {
113
+ "kind": "account",
114
+ "path": "glam_vault"
115
+ },
116
+ {
117
+ "kind": "account",
118
+ "path": "deposit_token_program"
119
+ },
120
+ {
121
+ "kind": "account",
122
+ "path": "deposit_asset"
123
+ }
124
+ ],
125
+ "program": {
126
+ "kind": "const",
127
+ "value": [
128
+ 140,
129
+ 151,
130
+ 37,
131
+ 143,
132
+ 78,
133
+ 36,
134
+ 137,
135
+ 241,
136
+ 187,
137
+ 61,
138
+ 16,
139
+ 41,
140
+ 20,
141
+ 142,
142
+ 13,
143
+ 131,
144
+ 11,
145
+ 90,
146
+ 19,
147
+ 153,
148
+ 218,
149
+ 255,
150
+ 16,
151
+ 132,
152
+ 4,
153
+ 142,
154
+ 123,
155
+ 216,
156
+ 219,
157
+ 233,
158
+ 248,
159
+ 89
160
+ ]
161
+ }
162
+ }
163
+ },
164
+ {
165
+ "name": "protocol_fee_authority"
166
+ },
167
+ {
168
+ "name": "protocol_fee_authority_ata",
169
+ "writable": true,
170
+ "pda": {
171
+ "seeds": [
172
+ {
173
+ "kind": "account",
174
+ "path": "protocol_fee_authority"
175
+ },
176
+ {
177
+ "kind": "account",
178
+ "path": "deposit_token_program"
179
+ },
180
+ {
181
+ "kind": "account",
182
+ "path": "deposit_asset"
183
+ }
184
+ ],
185
+ "program": {
186
+ "kind": "const",
187
+ "value": [
188
+ 140,
189
+ 151,
190
+ 37,
191
+ 143,
192
+ 78,
193
+ 36,
194
+ 137,
195
+ 241,
196
+ 187,
197
+ 61,
198
+ 16,
199
+ 41,
200
+ 20,
201
+ 142,
202
+ 13,
203
+ 131,
204
+ 11,
205
+ 90,
206
+ 19,
207
+ 153,
208
+ 218,
209
+ 255,
210
+ 16,
211
+ 132,
212
+ 4,
213
+ 142,
214
+ 123,
215
+ 216,
216
+ 219,
217
+ 233,
218
+ 248,
219
+ 89
220
+ ]
221
+ }
222
+ }
223
+ },
224
+ {
225
+ "name": "glam_config",
226
+ "pda": {
227
+ "seeds": [
228
+ {
229
+ "kind": "const",
230
+ "value": [
231
+ 103,
232
+ 108,
233
+ 111,
234
+ 98,
235
+ 97,
236
+ 108,
237
+ 45,
238
+ 99,
239
+ 111,
240
+ 110,
241
+ 102,
242
+ 105,
243
+ 103
244
+ ]
245
+ }
246
+ ],
247
+ "program": {
248
+ "kind": "const",
249
+ "value": [
250
+ 10,
251
+ 11,
252
+ 0,
253
+ 83,
254
+ 72,
255
+ 16,
256
+ 46,
257
+ 144,
258
+ 46,
259
+ 42,
260
+ 79,
261
+ 22,
262
+ 157,
263
+ 123,
264
+ 21,
265
+ 242,
266
+ 192,
267
+ 146,
268
+ 1,
269
+ 78,
270
+ 88,
271
+ 59,
272
+ 102,
273
+ 9,
274
+ 190,
275
+ 226,
276
+ 92,
277
+ 189,
278
+ 187,
279
+ 232,
280
+ 83,
281
+ 220
282
+ ]
283
+ }
284
+ }
285
+ },
286
+ {
287
+ "name": "system_program",
288
+ "address": "11111111111111111111111111111111"
289
+ },
290
+ {
291
+ "name": "associated_token_program",
292
+ "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
293
+ },
294
+ {
295
+ "name": "deposit_token_program"
296
+ }
297
+ ],
298
+ "args": []
299
+ },
35
300
  {
36
301
  "name": "check_and_update_transfer_tracker",
37
302
  "discriminator": [
@@ -237,6 +502,31 @@
237
502
  }
238
503
  ]
239
504
  },
505
+ {
506
+ "name": "delete_assets",
507
+ "discriminator": [
508
+ 85,
509
+ 141,
510
+ 142,
511
+ 118,
512
+ 39,
513
+ 152,
514
+ 168,
515
+ 188
516
+ ],
517
+ "accounts": [
518
+ {
519
+ "name": "glam_state",
520
+ "writable": true
521
+ },
522
+ {
523
+ "name": "glam_signer",
524
+ "writable": true,
525
+ "signer": true
526
+ }
527
+ ],
528
+ "args": []
529
+ },
240
530
  {
241
531
  "name": "emergency_access_update",
242
532
  "docs": [
@@ -1823,6 +2113,16 @@
1823
2113
  "name": "DelegateAclLimitExceeded",
1824
2114
  "msg": "Delegate ACL limit exceeded"
1825
2115
  },
2116
+ {
2117
+ "code": 49018,
2118
+ "name": "AssetBalanceNotZero",
2119
+ "msg": "Cannot delete asset: vault token account balance is not zero"
2120
+ },
2121
+ {
2122
+ "code": 49019,
2123
+ "name": "CannotDeleteBaseAsset",
2124
+ "msg": "Cannot delete base asset from allowlist"
2125
+ },
1826
2126
  {
1827
2127
  "code": 50000,
1828
2128
  "name": "WithdrawDenied",
@@ -1948,6 +2248,11 @@
1948
2248
  "name": "InvalidAccountData",
1949
2249
  "msg": "Invalid account data"
1950
2250
  },
2251
+ {
2252
+ "code": 51115,
2253
+ "name": "OraclePriceSuspended",
2254
+ "msg": "Oracle price is suspended"
2255
+ },
1951
2256
  {
1952
2257
  "code": 50100,
1953
2258
  "name": "TransferRateLimitExceeded",
@@ -1094,6 +1094,16 @@
1094
1094
  "name": "DelegateAclLimitExceeded",
1095
1095
  "msg": "Delegate ACL limit exceeded"
1096
1096
  },
1097
+ {
1098
+ "code": 49018,
1099
+ "name": "AssetBalanceNotZero",
1100
+ "msg": "Cannot delete asset: vault token account balance is not zero"
1101
+ },
1102
+ {
1103
+ "code": 49019,
1104
+ "name": "CannotDeleteBaseAsset",
1105
+ "msg": "Cannot delete base asset from allowlist"
1106
+ },
1097
1107
  {
1098
1108
  "code": 50000,
1099
1109
  "name": "WithdrawDenied",
@@ -1219,6 +1229,11 @@
1219
1229
  "name": "InvalidAccountData",
1220
1230
  "msg": "Invalid account data"
1221
1231
  },
1232
+ {
1233
+ "code": 51115,
1234
+ "name": "OraclePriceSuspended",
1235
+ "msg": "Oracle price is suspended"
1236
+ },
1222
1237
  {
1223
1238
  "code": 50100,
1224
1239
  "name": "TransferRateLimitExceeded",