@glamsystems/glam-sdk 1.1.0-alpha.0 → 1.1.0-alpha.2
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 +4898 -1183
- package/index.esm.js +4890 -1172
- package/package.json +2 -2
- package/target/idl/glam_mint-staging.json +236 -0
- package/target/idl/glam_protocol-staging.json +5 -0
- package/target/idl/glam_protocol.json +5 -0
- package/target/types/glam_mint-staging.ts +236 -0
- package/target/types/glam_protocol-staging.ts +5 -0
- package/target/types/glam_protocol.ts +5 -0
- package/src/assets.d.ts +0 -39
- package/src/client/access.d.ts +0 -57
- package/src/client/base.d.ts +0 -184
- package/src/client/bridge.d.ts +0 -183
- package/src/client/bridgeRegistry.d.ts +0 -32
- package/src/client/cctp.d.ts +0 -156
- package/src/client/epi.d.ts +0 -78
- package/src/client/fees.d.ts +0 -33
- package/src/client/invest.d.ts +0 -37
- package/src/client/jupiter.d.ts +0 -45
- package/src/client/kamino/farm.d.ts +0 -39
- package/src/client/kamino/index.d.ts +0 -4
- package/src/client/kamino/lending.d.ts +0 -86
- package/src/client/kamino/types.d.ts +0 -56
- package/src/client/kamino/vaults.d.ts +0 -31
- package/src/client/loopscale.d.ts +0 -84
- package/src/client/marinade.d.ts +0 -42
- package/src/client/mint.d.ts +0 -127
- package/src/client/neutral.d.ts +0 -111
- package/src/client/price.d.ts +0 -137
- package/src/client/stake-pool.d.ts +0 -39
- package/src/client/stake.d.ts +0 -34
- package/src/client/state.d.ts +0 -56
- package/src/client/timelock.d.ts +0 -31
- package/src/client/vault.d.ts +0 -90
- package/src/client.d.ts +0 -68
- package/src/clientConfig.d.ts +0 -29
- package/src/constants.d.ts +0 -84
- package/src/deser/base.d.ts +0 -18
- package/src/deser/index.d.ts +0 -3
- package/src/deser/integrationPolicies.d.ts +0 -120
- package/src/deser/kaminoLayouts.d.ts +0 -264
- package/src/deser/tokenAclLayouts.d.ts +0 -67
- package/src/error.d.ts +0 -29
- package/src/glamExports.d.ts +0 -5116
- package/src/globalConfig.d.ts +0 -27
- package/src/index.d.ts +0 -20
- package/src/models/acl.d.ts +0 -43
- package/src/models/index.d.ts +0 -8
- package/src/models/mint.d.ts +0 -64
- package/src/models/state.d.ts +0 -104
- package/src/models/types.d.ts +0 -28
- package/src/react/cluster-provider.d.ts +0 -22
- package/src/react/glam.d.ts +0 -47
- package/src/react/index.d.ts +0 -5
- package/src/react/query-keys.d.ts +0 -38
- package/src/react/useVaultBalanceSubscription.d.ts +0 -17
- package/src/utils/accounts.d.ts +0 -72
- package/src/utils/bitmask.d.ts +0 -53
- package/src/utils/blockhash.d.ts +0 -11
- package/src/utils/common.d.ts +0 -37
- package/src/utils/computeBudget.d.ts +0 -15
- package/src/utils/evm.d.ts +0 -10
- package/src/utils/fraction.d.ts +0 -29
- package/src/utils/glamPDAs.d.ts +0 -15
- package/src/utils/index.d.ts +0 -16
- package/src/utils/jupiterApi.d.ts +0 -89
- package/src/utils/lookupTables.d.ts +0 -53
- package/src/utils/pkmap.d.ts +0 -87
- package/src/utils/pkset.d.ts +0 -73
- package/src/utils/positionCategorizer.d.ts +0 -36
- package/src/utils/rpc.d.ts +0 -33
- package/src/utils/timelock.d.ts +0 -52
- package/src/utils/transaction.d.ts +0 -13
- package/target/types/ext_bridge.d.ts +0 -2385
- package/target/types/ext_cctp.d.ts +0 -1268
- package/target/types/ext_epi.d.ts +0 -2175
- package/target/types/ext_kamino.d.ts +0 -3433
- package/target/types/ext_loopscale.d.ts +0 -3547
- package/target/types/ext_marinade.d.ts +0 -1593
- package/target/types/ext_neutral.d.ts +0 -1786
- package/target/types/ext_spl.d.ts +0 -1274
- package/target/types/ext_stake_pool.d.ts +0 -1622
- package/target/types/glam_config.d.ts +0 -755
- package/target/types/glam_mint.d.ts +0 -6106
- package/target/types/glam_protocol.d.ts +0 -2708
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@glamsystems/glam-sdk",
|
|
3
|
-
"version": "1.1.0-alpha.
|
|
3
|
+
"version": "1.1.0-alpha.2",
|
|
4
4
|
"description": "TypeScript SDK for the GLAM Protocol",
|
|
5
5
|
"main": "./index.cjs.js",
|
|
6
6
|
"module": "./index.esm.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@solana/spl-token": "^0.4.9",
|
|
27
27
|
"@solana/spl-token-metadata": "^0.1.4",
|
|
28
28
|
"@solana/web3.js": "^1.98.4",
|
|
29
|
-
"
|
|
29
|
+
"@types/bn.js": "^5.2.0",
|
|
30
30
|
"buffer": "^6.0.3",
|
|
31
31
|
"decimal.js": "^10.6.0",
|
|
32
32
|
"fzstd": "^0.1.1",
|
|
@@ -4147,6 +4147,242 @@
|
|
|
4147
4147
|
],
|
|
4148
4148
|
"args": []
|
|
4149
4149
|
},
|
|
4150
|
+
{
|
|
4151
|
+
"name": "price_phoenix_traders",
|
|
4152
|
+
"docs": [
|
|
4153
|
+
"Price Phoenix trader accounts registered as vault external positions.",
|
|
4154
|
+
"",
|
|
4155
|
+
"Remaining accounts:",
|
|
4156
|
+
"- Phoenix global configuration",
|
|
4157
|
+
"- Phoenix perp asset map",
|
|
4158
|
+
"- Phoenix trader accounts x N",
|
|
4159
|
+
"- optional USDC oracle when the GLAM base asset is not USDC",
|
|
4160
|
+
"",
|
|
4161
|
+
"Prices portfolio NAV as collateral plus unrealized PnL from Phoenix's",
|
|
4162
|
+
"cached positions and mark prices. Clients should prepend Phoenix",
|
|
4163
|
+
"`update_trader_state` before this instruction when trader state may be stale."
|
|
4164
|
+
],
|
|
4165
|
+
"discriminator": [
|
|
4166
|
+
112,
|
|
4167
|
+
90,
|
|
4168
|
+
177,
|
|
4169
|
+
46,
|
|
4170
|
+
145,
|
|
4171
|
+
191,
|
|
4172
|
+
219,
|
|
4173
|
+
213
|
|
4174
|
+
],
|
|
4175
|
+
"accounts": [
|
|
4176
|
+
{
|
|
4177
|
+
"name": "glam_state",
|
|
4178
|
+
"writable": true
|
|
4179
|
+
},
|
|
4180
|
+
{
|
|
4181
|
+
"name": "glam_vault",
|
|
4182
|
+
"pda": {
|
|
4183
|
+
"seeds": [
|
|
4184
|
+
{
|
|
4185
|
+
"kind": "const",
|
|
4186
|
+
"value": [
|
|
4187
|
+
118,
|
|
4188
|
+
97,
|
|
4189
|
+
117,
|
|
4190
|
+
108,
|
|
4191
|
+
116
|
|
4192
|
+
]
|
|
4193
|
+
},
|
|
4194
|
+
{
|
|
4195
|
+
"kind": "account",
|
|
4196
|
+
"path": "glam_state"
|
|
4197
|
+
}
|
|
4198
|
+
],
|
|
4199
|
+
"program": {
|
|
4200
|
+
"kind": "const",
|
|
4201
|
+
"value": [
|
|
4202
|
+
10,
|
|
4203
|
+
55,
|
|
4204
|
+
49,
|
|
4205
|
+
193,
|
|
4206
|
+
142,
|
|
4207
|
+
247,
|
|
4208
|
+
75,
|
|
4209
|
+
193,
|
|
4210
|
+
33,
|
|
4211
|
+
61,
|
|
4212
|
+
5,
|
|
4213
|
+
218,
|
|
4214
|
+
254,
|
|
4215
|
+
219,
|
|
4216
|
+
143,
|
|
4217
|
+
206,
|
|
4218
|
+
156,
|
|
4219
|
+
138,
|
|
4220
|
+
14,
|
|
4221
|
+
32,
|
|
4222
|
+
89,
|
|
4223
|
+
232,
|
|
4224
|
+
248,
|
|
4225
|
+
173,
|
|
4226
|
+
46,
|
|
4227
|
+
77,
|
|
4228
|
+
46,
|
|
4229
|
+
206,
|
|
4230
|
+
189,
|
|
4231
|
+
171,
|
|
4232
|
+
68,
|
|
4233
|
+
237
|
|
4234
|
+
]
|
|
4235
|
+
}
|
|
4236
|
+
}
|
|
4237
|
+
},
|
|
4238
|
+
{
|
|
4239
|
+
"name": "signer",
|
|
4240
|
+
"writable": true,
|
|
4241
|
+
"signer": true
|
|
4242
|
+
},
|
|
4243
|
+
{
|
|
4244
|
+
"name": "sol_usd_oracle"
|
|
4245
|
+
},
|
|
4246
|
+
{
|
|
4247
|
+
"name": "base_asset_oracle"
|
|
4248
|
+
},
|
|
4249
|
+
{
|
|
4250
|
+
"name": "integration_authority",
|
|
4251
|
+
"pda": {
|
|
4252
|
+
"seeds": [
|
|
4253
|
+
{
|
|
4254
|
+
"kind": "const",
|
|
4255
|
+
"value": [
|
|
4256
|
+
105,
|
|
4257
|
+
110,
|
|
4258
|
+
116,
|
|
4259
|
+
101,
|
|
4260
|
+
103,
|
|
4261
|
+
114,
|
|
4262
|
+
97,
|
|
4263
|
+
116,
|
|
4264
|
+
105,
|
|
4265
|
+
111,
|
|
4266
|
+
110,
|
|
4267
|
+
45,
|
|
4268
|
+
97,
|
|
4269
|
+
117,
|
|
4270
|
+
116,
|
|
4271
|
+
104,
|
|
4272
|
+
111,
|
|
4273
|
+
114,
|
|
4274
|
+
105,
|
|
4275
|
+
116,
|
|
4276
|
+
121
|
|
4277
|
+
]
|
|
4278
|
+
}
|
|
4279
|
+
]
|
|
4280
|
+
}
|
|
4281
|
+
},
|
|
4282
|
+
{
|
|
4283
|
+
"name": "glam_config",
|
|
4284
|
+
"pda": {
|
|
4285
|
+
"seeds": [
|
|
4286
|
+
{
|
|
4287
|
+
"kind": "const",
|
|
4288
|
+
"value": [
|
|
4289
|
+
103,
|
|
4290
|
+
108,
|
|
4291
|
+
111,
|
|
4292
|
+
98,
|
|
4293
|
+
97,
|
|
4294
|
+
108,
|
|
4295
|
+
45,
|
|
4296
|
+
99,
|
|
4297
|
+
111,
|
|
4298
|
+
110,
|
|
4299
|
+
102,
|
|
4300
|
+
105,
|
|
4301
|
+
103
|
|
4302
|
+
]
|
|
4303
|
+
}
|
|
4304
|
+
],
|
|
4305
|
+
"program": {
|
|
4306
|
+
"kind": "const",
|
|
4307
|
+
"value": [
|
|
4308
|
+
10,
|
|
4309
|
+
11,
|
|
4310
|
+
0,
|
|
4311
|
+
83,
|
|
4312
|
+
72,
|
|
4313
|
+
16,
|
|
4314
|
+
46,
|
|
4315
|
+
144,
|
|
4316
|
+
46,
|
|
4317
|
+
42,
|
|
4318
|
+
79,
|
|
4319
|
+
22,
|
|
4320
|
+
157,
|
|
4321
|
+
123,
|
|
4322
|
+
21,
|
|
4323
|
+
242,
|
|
4324
|
+
192,
|
|
4325
|
+
146,
|
|
4326
|
+
1,
|
|
4327
|
+
78,
|
|
4328
|
+
88,
|
|
4329
|
+
59,
|
|
4330
|
+
102,
|
|
4331
|
+
9,
|
|
4332
|
+
190,
|
|
4333
|
+
226,
|
|
4334
|
+
92,
|
|
4335
|
+
189,
|
|
4336
|
+
187,
|
|
4337
|
+
232,
|
|
4338
|
+
83,
|
|
4339
|
+
220
|
|
4340
|
+
]
|
|
4341
|
+
}
|
|
4342
|
+
}
|
|
4343
|
+
},
|
|
4344
|
+
{
|
|
4345
|
+
"name": "glam_protocol",
|
|
4346
|
+
"address": "gstgptmbgJVi5f8ZmSRVZjZkDQwqKa3xWuUtD5WmJHz"
|
|
4347
|
+
},
|
|
4348
|
+
{
|
|
4349
|
+
"name": "event_authority",
|
|
4350
|
+
"optional": true,
|
|
4351
|
+
"pda": {
|
|
4352
|
+
"seeds": [
|
|
4353
|
+
{
|
|
4354
|
+
"kind": "const",
|
|
4355
|
+
"value": [
|
|
4356
|
+
95,
|
|
4357
|
+
95,
|
|
4358
|
+
101,
|
|
4359
|
+
118,
|
|
4360
|
+
101,
|
|
4361
|
+
110,
|
|
4362
|
+
116,
|
|
4363
|
+
95,
|
|
4364
|
+
97,
|
|
4365
|
+
117,
|
|
4366
|
+
116,
|
|
4367
|
+
104,
|
|
4368
|
+
111,
|
|
4369
|
+
114,
|
|
4370
|
+
105,
|
|
4371
|
+
116,
|
|
4372
|
+
121
|
|
4373
|
+
]
|
|
4374
|
+
}
|
|
4375
|
+
]
|
|
4376
|
+
}
|
|
4377
|
+
},
|
|
4378
|
+
{
|
|
4379
|
+
"name": "event_program",
|
|
4380
|
+
"optional": true,
|
|
4381
|
+
"address": "gstgm1M39mhgnvgyScGUDRwNn5kNVSd97hTtyow1Et5"
|
|
4382
|
+
}
|
|
4383
|
+
],
|
|
4384
|
+
"args": []
|
|
4385
|
+
},
|
|
4150
4386
|
{
|
|
4151
4387
|
"name": "price_single_asset_vault",
|
|
4152
4388
|
"docs": [
|
|
@@ -1831,6 +1831,11 @@
|
|
|
1831
1831
|
"name": "DelegateAclLimitExceeded",
|
|
1832
1832
|
"msg": "Delegate ACL limit exceeded"
|
|
1833
1833
|
},
|
|
1834
|
+
{
|
|
1835
|
+
"code": 49021,
|
|
1836
|
+
"name": "InvalidFeeStructure",
|
|
1837
|
+
"msg": "Invalid fee structure"
|
|
1838
|
+
},
|
|
1834
1839
|
{
|
|
1835
1840
|
"code": 50000,
|
|
1836
1841
|
"name": "WithdrawDenied",
|
|
@@ -1252,6 +1252,11 @@
|
|
|
1252
1252
|
"name": "DelegateAclLimitExceeded",
|
|
1253
1253
|
"msg": "Delegate ACL limit exceeded"
|
|
1254
1254
|
},
|
|
1255
|
+
{
|
|
1256
|
+
"code": 49021,
|
|
1257
|
+
"name": "InvalidFeeStructure",
|
|
1258
|
+
"msg": "Invalid fee structure"
|
|
1259
|
+
},
|
|
1255
1260
|
{
|
|
1256
1261
|
"code": 50000,
|
|
1257
1262
|
"name": "WithdrawDenied",
|
|
@@ -4153,6 +4153,242 @@ export type GlamMint = {
|
|
|
4153
4153
|
],
|
|
4154
4154
|
"args": []
|
|
4155
4155
|
},
|
|
4156
|
+
{
|
|
4157
|
+
"name": "pricePhoenixTraders",
|
|
4158
|
+
"docs": [
|
|
4159
|
+
"Price Phoenix trader accounts registered as vault external positions.",
|
|
4160
|
+
"",
|
|
4161
|
+
"Remaining accounts:",
|
|
4162
|
+
"- Phoenix global configuration",
|
|
4163
|
+
"- Phoenix perp asset map",
|
|
4164
|
+
"- Phoenix trader accounts x N",
|
|
4165
|
+
"- optional USDC oracle when the GLAM base asset is not USDC",
|
|
4166
|
+
"",
|
|
4167
|
+
"Prices portfolio NAV as collateral plus unrealized PnL from Phoenix's",
|
|
4168
|
+
"cached positions and mark prices. Clients should prepend Phoenix",
|
|
4169
|
+
"`update_trader_state` before this instruction when trader state may be stale."
|
|
4170
|
+
],
|
|
4171
|
+
"discriminator": [
|
|
4172
|
+
112,
|
|
4173
|
+
90,
|
|
4174
|
+
177,
|
|
4175
|
+
46,
|
|
4176
|
+
145,
|
|
4177
|
+
191,
|
|
4178
|
+
219,
|
|
4179
|
+
213
|
|
4180
|
+
],
|
|
4181
|
+
"accounts": [
|
|
4182
|
+
{
|
|
4183
|
+
"name": "glamState",
|
|
4184
|
+
"writable": true
|
|
4185
|
+
},
|
|
4186
|
+
{
|
|
4187
|
+
"name": "glamVault",
|
|
4188
|
+
"pda": {
|
|
4189
|
+
"seeds": [
|
|
4190
|
+
{
|
|
4191
|
+
"kind": "const",
|
|
4192
|
+
"value": [
|
|
4193
|
+
118,
|
|
4194
|
+
97,
|
|
4195
|
+
117,
|
|
4196
|
+
108,
|
|
4197
|
+
116
|
|
4198
|
+
]
|
|
4199
|
+
},
|
|
4200
|
+
{
|
|
4201
|
+
"kind": "account",
|
|
4202
|
+
"path": "glamState"
|
|
4203
|
+
}
|
|
4204
|
+
],
|
|
4205
|
+
"program": {
|
|
4206
|
+
"kind": "const",
|
|
4207
|
+
"value": [
|
|
4208
|
+
10,
|
|
4209
|
+
55,
|
|
4210
|
+
49,
|
|
4211
|
+
193,
|
|
4212
|
+
142,
|
|
4213
|
+
247,
|
|
4214
|
+
75,
|
|
4215
|
+
193,
|
|
4216
|
+
33,
|
|
4217
|
+
61,
|
|
4218
|
+
5,
|
|
4219
|
+
218,
|
|
4220
|
+
254,
|
|
4221
|
+
219,
|
|
4222
|
+
143,
|
|
4223
|
+
206,
|
|
4224
|
+
156,
|
|
4225
|
+
138,
|
|
4226
|
+
14,
|
|
4227
|
+
32,
|
|
4228
|
+
89,
|
|
4229
|
+
232,
|
|
4230
|
+
248,
|
|
4231
|
+
173,
|
|
4232
|
+
46,
|
|
4233
|
+
77,
|
|
4234
|
+
46,
|
|
4235
|
+
206,
|
|
4236
|
+
189,
|
|
4237
|
+
171,
|
|
4238
|
+
68,
|
|
4239
|
+
237
|
|
4240
|
+
]
|
|
4241
|
+
}
|
|
4242
|
+
}
|
|
4243
|
+
},
|
|
4244
|
+
{
|
|
4245
|
+
"name": "signer",
|
|
4246
|
+
"writable": true,
|
|
4247
|
+
"signer": true
|
|
4248
|
+
},
|
|
4249
|
+
{
|
|
4250
|
+
"name": "solUsdOracle"
|
|
4251
|
+
},
|
|
4252
|
+
{
|
|
4253
|
+
"name": "baseAssetOracle"
|
|
4254
|
+
},
|
|
4255
|
+
{
|
|
4256
|
+
"name": "integrationAuthority",
|
|
4257
|
+
"pda": {
|
|
4258
|
+
"seeds": [
|
|
4259
|
+
{
|
|
4260
|
+
"kind": "const",
|
|
4261
|
+
"value": [
|
|
4262
|
+
105,
|
|
4263
|
+
110,
|
|
4264
|
+
116,
|
|
4265
|
+
101,
|
|
4266
|
+
103,
|
|
4267
|
+
114,
|
|
4268
|
+
97,
|
|
4269
|
+
116,
|
|
4270
|
+
105,
|
|
4271
|
+
111,
|
|
4272
|
+
110,
|
|
4273
|
+
45,
|
|
4274
|
+
97,
|
|
4275
|
+
117,
|
|
4276
|
+
116,
|
|
4277
|
+
104,
|
|
4278
|
+
111,
|
|
4279
|
+
114,
|
|
4280
|
+
105,
|
|
4281
|
+
116,
|
|
4282
|
+
121
|
|
4283
|
+
]
|
|
4284
|
+
}
|
|
4285
|
+
]
|
|
4286
|
+
}
|
|
4287
|
+
},
|
|
4288
|
+
{
|
|
4289
|
+
"name": "glamConfig",
|
|
4290
|
+
"pda": {
|
|
4291
|
+
"seeds": [
|
|
4292
|
+
{
|
|
4293
|
+
"kind": "const",
|
|
4294
|
+
"value": [
|
|
4295
|
+
103,
|
|
4296
|
+
108,
|
|
4297
|
+
111,
|
|
4298
|
+
98,
|
|
4299
|
+
97,
|
|
4300
|
+
108,
|
|
4301
|
+
45,
|
|
4302
|
+
99,
|
|
4303
|
+
111,
|
|
4304
|
+
110,
|
|
4305
|
+
102,
|
|
4306
|
+
105,
|
|
4307
|
+
103
|
|
4308
|
+
]
|
|
4309
|
+
}
|
|
4310
|
+
],
|
|
4311
|
+
"program": {
|
|
4312
|
+
"kind": "const",
|
|
4313
|
+
"value": [
|
|
4314
|
+
10,
|
|
4315
|
+
11,
|
|
4316
|
+
0,
|
|
4317
|
+
83,
|
|
4318
|
+
72,
|
|
4319
|
+
16,
|
|
4320
|
+
46,
|
|
4321
|
+
144,
|
|
4322
|
+
46,
|
|
4323
|
+
42,
|
|
4324
|
+
79,
|
|
4325
|
+
22,
|
|
4326
|
+
157,
|
|
4327
|
+
123,
|
|
4328
|
+
21,
|
|
4329
|
+
242,
|
|
4330
|
+
192,
|
|
4331
|
+
146,
|
|
4332
|
+
1,
|
|
4333
|
+
78,
|
|
4334
|
+
88,
|
|
4335
|
+
59,
|
|
4336
|
+
102,
|
|
4337
|
+
9,
|
|
4338
|
+
190,
|
|
4339
|
+
226,
|
|
4340
|
+
92,
|
|
4341
|
+
189,
|
|
4342
|
+
187,
|
|
4343
|
+
232,
|
|
4344
|
+
83,
|
|
4345
|
+
220
|
|
4346
|
+
]
|
|
4347
|
+
}
|
|
4348
|
+
}
|
|
4349
|
+
},
|
|
4350
|
+
{
|
|
4351
|
+
"name": "glamProtocol",
|
|
4352
|
+
"address": "gstgptmbgJVi5f8ZmSRVZjZkDQwqKa3xWuUtD5WmJHz"
|
|
4353
|
+
},
|
|
4354
|
+
{
|
|
4355
|
+
"name": "eventAuthority",
|
|
4356
|
+
"optional": true,
|
|
4357
|
+
"pda": {
|
|
4358
|
+
"seeds": [
|
|
4359
|
+
{
|
|
4360
|
+
"kind": "const",
|
|
4361
|
+
"value": [
|
|
4362
|
+
95,
|
|
4363
|
+
95,
|
|
4364
|
+
101,
|
|
4365
|
+
118,
|
|
4366
|
+
101,
|
|
4367
|
+
110,
|
|
4368
|
+
116,
|
|
4369
|
+
95,
|
|
4370
|
+
97,
|
|
4371
|
+
117,
|
|
4372
|
+
116,
|
|
4373
|
+
104,
|
|
4374
|
+
111,
|
|
4375
|
+
114,
|
|
4376
|
+
105,
|
|
4377
|
+
116,
|
|
4378
|
+
121
|
|
4379
|
+
]
|
|
4380
|
+
}
|
|
4381
|
+
]
|
|
4382
|
+
}
|
|
4383
|
+
},
|
|
4384
|
+
{
|
|
4385
|
+
"name": "eventProgram",
|
|
4386
|
+
"optional": true,
|
|
4387
|
+
"address": "gstgm1M39mhgnvgyScGUDRwNn5kNVSd97hTtyow1Et5"
|
|
4388
|
+
}
|
|
4389
|
+
],
|
|
4390
|
+
"args": []
|
|
4391
|
+
},
|
|
4156
4392
|
{
|
|
4157
4393
|
"name": "priceSingleAssetVault",
|
|
4158
4394
|
"docs": [
|
|
@@ -1837,6 +1837,11 @@ export type GlamProtocol = {
|
|
|
1837
1837
|
"name": "delegateAclLimitExceeded",
|
|
1838
1838
|
"msg": "Delegate ACL limit exceeded"
|
|
1839
1839
|
},
|
|
1840
|
+
{
|
|
1841
|
+
"code": 49021,
|
|
1842
|
+
"name": "invalidFeeStructure",
|
|
1843
|
+
"msg": "Invalid fee structure"
|
|
1844
|
+
},
|
|
1840
1845
|
{
|
|
1841
1846
|
"code": 50000,
|
|
1842
1847
|
"name": "withdrawDenied",
|
|
@@ -1258,6 +1258,11 @@ export type GlamProtocol = {
|
|
|
1258
1258
|
"name": "delegateAclLimitExceeded",
|
|
1259
1259
|
"msg": "Delegate ACL limit exceeded"
|
|
1260
1260
|
},
|
|
1261
|
+
{
|
|
1262
|
+
"code": 49021,
|
|
1263
|
+
"name": "invalidFeeStructure",
|
|
1264
|
+
"msg": "Invalid fee structure"
|
|
1265
|
+
},
|
|
1261
1266
|
{
|
|
1262
1267
|
"code": 50000,
|
|
1263
1268
|
"name": "withdrawDenied",
|
package/src/assets.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { PublicKey } from "@solana/web3.js";
|
|
2
|
-
import { PkMap } from "./utils/pkmap";
|
|
3
|
-
export declare const STAKE_POOLS: {
|
|
4
|
-
name: string;
|
|
5
|
-
symbol: string;
|
|
6
|
-
mint: string;
|
|
7
|
-
decimals: number;
|
|
8
|
-
logoURI: string;
|
|
9
|
-
tokenProgram: PublicKey;
|
|
10
|
-
poolState: PublicKey;
|
|
11
|
-
isMarinade: boolean;
|
|
12
|
-
}[];
|
|
13
|
-
export declare const STAKE_POOLS_MAP: Map<string, {
|
|
14
|
-
name: string;
|
|
15
|
-
symbol: string;
|
|
16
|
-
mint: string;
|
|
17
|
-
decimals: number;
|
|
18
|
-
logoURI: string;
|
|
19
|
-
tokenProgram: PublicKey;
|
|
20
|
-
poolState: PublicKey;
|
|
21
|
-
isMarinade: boolean;
|
|
22
|
-
}>;
|
|
23
|
-
/**
|
|
24
|
-
* Metadata for an asset for pricing
|
|
25
|
-
*/
|
|
26
|
-
export interface AssetMeta {
|
|
27
|
-
asset: PublicKey;
|
|
28
|
-
decimals: number;
|
|
29
|
-
oracle: PublicKey;
|
|
30
|
-
programId: PublicKey;
|
|
31
|
-
oracleSource: string;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Transforms the LST list into a map of asset metas.
|
|
35
|
-
*
|
|
36
|
-
* We use functional prices for LSTs, and the oracle pubkey of a LST
|
|
37
|
-
* asset is the pool state.
|
|
38
|
-
*/
|
|
39
|
-
export declare const ASSETS_MAINNET: PkMap<AssetMeta>;
|
package/src/client/access.d.ts
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { PublicKey, VersionedTransaction, TransactionSignature, TransactionInstruction } from "@solana/web3.js";
|
|
2
|
-
import { BN } from "@coral-xyz/anchor";
|
|
3
|
-
import { BaseClient, BaseTxBuilder, TxOptions } from "./base";
|
|
4
|
-
import { EmergencyAccessUpdateArgs } from "../models";
|
|
5
|
-
declare class TxBuilder extends BaseTxBuilder<AccessClient> {
|
|
6
|
-
emergencyAccessUpdateIx(args: Partial<EmergencyAccessUpdateArgs>, signer?: PublicKey): Promise<TransactionInstruction>;
|
|
7
|
-
emergencyAccessUpdateTx(args: Partial<EmergencyAccessUpdateArgs>, txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
8
|
-
enableDisableProtocolsIx(integrationProgram: PublicKey, protocolBitmask: number, setEnabled: boolean, glamSigner: PublicKey): Promise<TransactionInstruction>;
|
|
9
|
-
enableDisableProtocolsTx(integrationProgram: PublicKey, protocolBitmask: number, setEnabled: boolean, txOptions: TxOptions): Promise<VersionedTransaction>;
|
|
10
|
-
grantRevokeDelegatePermissionsIx(delegate: PublicKey, integrationProgram: PublicKey, protocolBitflag: number, permissionsBitmask: BN, setGranted: boolean, signer?: PublicKey): Promise<TransactionInstruction>;
|
|
11
|
-
grantRevokeDelegatePermissionsTx(delegate: PublicKey, integrationProgram: PublicKey, protocolBitflag: number, permissionsBitmask: BN, setGranted: boolean, txOptions: TxOptions): Promise<VersionedTransaction>;
|
|
12
|
-
addAssetsIx(assets: PublicKey[], signer?: PublicKey): Promise<TransactionInstruction>;
|
|
13
|
-
addAssetsTx(assets: PublicKey[], txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
14
|
-
deleteAssetsIx(assets: PublicKey[], signer?: PublicKey): Promise<TransactionInstruction>;
|
|
15
|
-
deleteAssetsTx(assets: PublicKey[], txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
16
|
-
setProtocolPolicyIx(integrationProgram: PublicKey, protocolBitflag: number, data: Buffer, glamSigner: PublicKey): Promise<TransactionInstruction>;
|
|
17
|
-
setProtocolPolicyTx(integrationProgram: PublicKey, protocolBitflag: number, data: Buffer, txOptions: TxOptions): Promise<VersionedTransaction>;
|
|
18
|
-
}
|
|
19
|
-
export declare class AccessClient {
|
|
20
|
-
readonly base: BaseClient;
|
|
21
|
-
txBuilder: TxBuilder;
|
|
22
|
-
constructor(base: BaseClient);
|
|
23
|
-
/**
|
|
24
|
-
* Add assets to the vault allowlist
|
|
25
|
-
*/
|
|
26
|
-
addAssets(assets: PublicKey[], txOptions?: TxOptions): Promise<TransactionSignature>;
|
|
27
|
-
/**
|
|
28
|
-
* Delete assets from the vault allowlist.
|
|
29
|
-
* Assets must have zero vault balance (ATA empty or non-existent).
|
|
30
|
-
*/
|
|
31
|
-
deleteAssets(assets: PublicKey[], txOptions?: TxOptions): Promise<TransactionSignature>;
|
|
32
|
-
/**
|
|
33
|
-
* Emergency access update - bypasses timelock for critical access control changes
|
|
34
|
-
*/
|
|
35
|
-
emergencyAccessUpdate(args: Partial<EmergencyAccessUpdateArgs>, txOptions?: TxOptions): Promise<TransactionSignature>;
|
|
36
|
-
/**
|
|
37
|
-
* Enable protocols for an integration program
|
|
38
|
-
*/
|
|
39
|
-
enableProtocols(integrationProgram: PublicKey, protocolBitmask: number, txOptions?: TxOptions): Promise<TransactionSignature>;
|
|
40
|
-
/**
|
|
41
|
-
* Disable protocols for an integration program
|
|
42
|
-
*/
|
|
43
|
-
disableProtocols(integrationProgram: PublicKey, protocolBitmask: number, txOptions?: TxOptions): Promise<TransactionSignature>;
|
|
44
|
-
/**
|
|
45
|
-
* Grant delegate permissions for a specific protocol
|
|
46
|
-
*/
|
|
47
|
-
grantDelegatePermissions(delegate: PublicKey, integrationProgram: PublicKey, protocolBitflag: number, permissionsBitmask: BN, txOptions?: TxOptions): Promise<TransactionSignature>;
|
|
48
|
-
/**
|
|
49
|
-
* Revoke delegate permissions for a specific protocol
|
|
50
|
-
*/
|
|
51
|
-
revokeDelegatePermissions(delegate: PublicKey, integrationProgram: PublicKey, protocolBitflag: number, permissionsBitmask: BN, txOptions?: TxOptions): Promise<TransactionSignature>;
|
|
52
|
-
/**
|
|
53
|
-
* Set protocol policy data for an integration
|
|
54
|
-
*/
|
|
55
|
-
setProtocolPolicy(integrationProgram: PublicKey, protocolBitflag: number, data: Buffer, txOptions?: TxOptions): Promise<TransactionSignature>;
|
|
56
|
-
}
|
|
57
|
-
export {};
|