@glamsystems/glam-sdk 1.0.12 → 1.0.13-test

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 (110) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +1 -1
  3. package/index.cjs.js +1 -57320
  4. package/index.esm.js +1 -57081
  5. package/package.json +26 -15
  6. package/src/assets.d.ts +10 -17
  7. package/src/client/access.d.ts +13 -0
  8. package/src/client/base.d.ts +30 -7
  9. package/src/client/bridge.d.ts +183 -0
  10. package/src/client/bridgeRegistry.d.ts +32 -0
  11. package/src/client/epi.d.ts +78 -0
  12. package/src/client/fees.d.ts +4 -0
  13. package/src/client/invest.d.ts +1 -1
  14. package/src/client/jupiter.d.ts +27 -20
  15. package/src/client/loopscale.d.ts +84 -0
  16. package/src/client/mint.d.ts +54 -1
  17. package/src/client/price.d.ts +26 -39
  18. package/src/client.d.ts +9 -5
  19. package/src/constants.d.ts +11 -7
  20. package/src/deser/index.d.ts +1 -1
  21. package/src/deser/integrationPolicies.d.ts +30 -20
  22. package/src/deser/tokenAclLayouts.d.ts +67 -0
  23. package/src/error.d.ts +2 -1
  24. package/src/glamExports.d.ts +1351 -1546
  25. package/src/globalConfig.d.ts +27 -0
  26. package/src/index.d.ts +5 -1
  27. package/src/models/state.d.ts +2 -0
  28. package/src/utils/accounts.d.ts +9 -1
  29. package/src/utils/bitmask.d.ts +3 -0
  30. package/src/utils/common.d.ts +2 -0
  31. package/src/utils/glamPDAs.d.ts +6 -0
  32. package/src/utils/index.d.ts +0 -1
  33. package/src/utils/pkmap.d.ts +23 -18
  34. package/src/utils/positionCategorizer.d.ts +3 -21
  35. package/target/idl/ext_bridge-staging.json +2379 -0
  36. package/target/idl/ext_bridge.json +2379 -0
  37. package/target/idl/ext_cctp.json +1 -1
  38. package/target/idl/ext_drift.json +1613 -142
  39. package/target/idl/ext_epi-staging.json +2169 -0
  40. package/target/idl/ext_epi.json +2169 -0
  41. package/target/idl/ext_kamino-staging.json +1 -1
  42. package/target/idl/ext_kamino.json +109 -1
  43. package/target/idl/{ext_drift-staging.json → ext_loopscale-staging.json} +986 -1438
  44. package/target/idl/ext_loopscale.json +3541 -0
  45. package/target/idl/ext_marinade-staging.json +1587 -0
  46. package/target/idl/ext_spl-staging.json +1 -1
  47. package/target/idl/ext_spl.json +1 -1
  48. package/target/idl/glam_config.json +78 -9
  49. package/target/idl/glam_mint-staging.json +3002 -1244
  50. package/target/idl/glam_mint.json +239 -8
  51. package/target/idl/glam_policies.json +2 -7
  52. package/target/idl/glam_protocol-staging.json +187 -266
  53. package/target/idl/glam_protocol.json +217 -114
  54. package/target/idl/mock_layerzero_endpoint.json +144 -0
  55. package/target/idl/mock_layerzero_oft.json +155 -0
  56. package/target/types/ext_bridge-staging.d.ts +2385 -0
  57. package/target/types/ext_bridge-staging.ts +2385 -0
  58. package/target/types/ext_bridge.d.ts +2385 -0
  59. package/target/types/ext_bridge.ts +2385 -0
  60. package/target/types/ext_cctp.d.ts +1 -1
  61. package/target/types/ext_cctp.ts +1 -1
  62. package/target/types/ext_drift.d.ts +1609 -138
  63. package/target/types/ext_drift.ts +1613 -142
  64. package/target/types/ext_epi-staging.d.ts +2175 -0
  65. package/target/types/ext_epi-staging.ts +2175 -0
  66. package/target/types/ext_epi.d.ts +2175 -0
  67. package/target/types/ext_epi.ts +2175 -0
  68. package/target/types/ext_kamino-staging.d.ts +3433 -0
  69. package/target/types/ext_kamino-staging.ts +1 -1
  70. package/target/types/ext_kamino.d.ts +109 -1
  71. package/target/types/ext_kamino.ts +109 -1
  72. package/target/types/ext_loopscale-staging.d.ts +3547 -0
  73. package/target/types/{ext_drift-staging.ts → ext_loopscale-staging.ts} +988 -1440
  74. package/target/types/ext_loopscale.d.ts +3547 -0
  75. package/target/types/ext_loopscale.ts +3547 -0
  76. package/target/types/ext_marinade-staging.d.ts +1593 -0
  77. package/target/types/ext_marinade-staging.ts +1593 -0
  78. package/target/types/{ext_offchain.d.ts → ext_spl-staging.d.ts} +219 -19
  79. package/target/types/ext_spl-staging.ts +1 -1
  80. package/target/types/ext_spl.d.ts +1 -1
  81. package/target/types/ext_spl.ts +1 -1
  82. package/target/types/ext_stake_pool-staging.d.ts +1622 -0
  83. package/target/types/glam_config.d.ts +78 -9
  84. package/target/types/glam_config.ts +78 -9
  85. package/target/types/glam_mint-staging.d.ts +7856 -0
  86. package/target/types/glam_mint-staging.ts +3002 -1244
  87. package/target/types/glam_mint.d.ts +239 -8
  88. package/target/types/glam_mint.ts +239 -8
  89. package/target/types/glam_policies.d.ts +477 -0
  90. package/target/types/glam_policies.ts +2 -7
  91. package/target/types/glam_protocol-staging.d.ts +3292 -0
  92. package/target/types/glam_protocol-staging.ts +187 -266
  93. package/target/types/glam_protocol.d.ts +217 -114
  94. package/target/types/glam_protocol.ts +217 -114
  95. package/target/types/mock_layerzero_endpoint.d.ts +150 -0
  96. package/target/types/mock_layerzero_endpoint.ts +150 -0
  97. package/target/types/mock_layerzero_oft.d.ts +161 -0
  98. package/target/types/mock_layerzero_oft.ts +161 -0
  99. package/src/client/drift/index.d.ts +0 -2
  100. package/src/client/drift/protocol-v2.d.ts +0 -93
  101. package/src/client/drift/vaults.d.ts +0 -60
  102. package/src/deser/driftLayouts.d.ts +0 -217
  103. package/src/react/cluster-provider.d.ts +0 -22
  104. package/src/react/glam.d.ts +0 -51
  105. package/src/react/index.d.ts +0 -5
  106. package/src/react/query-keys.d.ts +0 -40
  107. package/src/react/useVaultBalanceSubscription.d.ts +0 -17
  108. package/src/utils/drift/index.d.ts +0 -2
  109. package/src/utils/drift/orderParams.d.ts +0 -28
  110. package/src/utils/drift/types.d.ts +0 -522
@@ -2,36 +2,200 @@
2
2
  * Program IDL in camelCase format in order to be used in JS/TS.
3
3
  *
4
4
  * Note that this is only a type helper and is not the actual IDL. The original
5
- * IDL can be found at `target/idl/ext_offchain.json`.
5
+ * IDL can be found at `target/idl/ext_spl.json`.
6
6
  */
7
- export type ExtOffchain = {
8
- "address": "G1NToc8Syn5cPU1k3pPDydqkAFCFbfPQ9377Tt96F29m";
7
+ export type ExtSpl = {
8
+ "address": "gstgs9nJgX8PmRHWAAEP9H7xT3ZkaPWSGPYbj3mXdTa";
9
9
  "metadata": {
10
- "name": "extOffchain";
11
- "version": "1.0.0";
10
+ "name": "extSpl";
11
+ "version": "1.0.1";
12
12
  "spec": "0.1.0";
13
- "description": "Off-chain AUM reporting integration for GLAM Protocol";
13
+ "description": "SPL integration for GLAM Protocol";
14
14
  };
15
15
  "instructions": [
16
16
  {
17
- "name": "updateOffchainAum";
17
+ "name": "setTokenTransferPolicy";
18
18
  "discriminator": [
19
- 152,
20
- 206,
21
- 102,
22
- 69,
23
- 11,
24
- 81,
25
- 234,
26
- 229
19
+ 0,
20
+ 144,
21
+ 15,
22
+ 4,
23
+ 149,
24
+ 22,
25
+ 95,
26
+ 50
27
+ ];
28
+ "accounts": [
29
+ {
30
+ "name": "glamState";
31
+ "writable": true;
32
+ },
33
+ {
34
+ "name": "glamSigner";
35
+ "writable": true;
36
+ "signer": true;
37
+ },
38
+ {
39
+ "name": "glamProtocolProgram";
40
+ "address": "gstgptmbgJVi5f8ZmSRVZjZkDQwqKa3xWuUtD5WmJHz";
41
+ }
42
+ ];
43
+ "args": [
44
+ {
45
+ "name": "policy";
46
+ "type": {
47
+ "defined": {
48
+ "name": "transferPolicy";
49
+ };
50
+ };
51
+ }
52
+ ];
53
+ },
54
+ {
55
+ "name": "tokenCloseAccount";
56
+ "discriminator": [
57
+ 240,
58
+ 32,
59
+ 179,
60
+ 154,
61
+ 96,
62
+ 110,
63
+ 43,
64
+ 79
65
+ ];
66
+ "accounts": [
67
+ {
68
+ "name": "glamState";
69
+ "writable": true;
70
+ },
71
+ {
72
+ "name": "glamVault";
73
+ "writable": true;
74
+ "pda": {
75
+ "seeds": [
76
+ {
77
+ "kind": "const";
78
+ "value": [
79
+ 118,
80
+ 97,
81
+ 117,
82
+ 108,
83
+ 116
84
+ ];
85
+ },
86
+ {
87
+ "kind": "account";
88
+ "path": "glamState";
89
+ }
90
+ ];
91
+ "program": {
92
+ "kind": "account";
93
+ "path": "glamProtocolProgram";
94
+ };
95
+ };
96
+ },
97
+ {
98
+ "name": "glamSigner";
99
+ "writable": true;
100
+ "signer": true;
101
+ },
102
+ {
103
+ "name": "integrationAuthority";
104
+ "pda": {
105
+ "seeds": [
106
+ {
107
+ "kind": "const";
108
+ "value": [
109
+ 105,
110
+ 110,
111
+ 116,
112
+ 101,
113
+ 103,
114
+ 114,
115
+ 97,
116
+ 116,
117
+ 105,
118
+ 111,
119
+ 110,
120
+ 45,
121
+ 97,
122
+ 117,
123
+ 116,
124
+ 104,
125
+ 111,
126
+ 114,
127
+ 105,
128
+ 116,
129
+ 121
130
+ ];
131
+ }
132
+ ];
133
+ };
134
+ },
135
+ {
136
+ "name": "cpiProgram";
137
+ },
138
+ {
139
+ "name": "glamProtocolProgram";
140
+ "address": "gstgptmbgJVi5f8ZmSRVZjZkDQwqKa3xWuUtD5WmJHz";
141
+ },
142
+ {
143
+ "name": "systemProgram";
144
+ "address": "11111111111111111111111111111111";
145
+ },
146
+ {
147
+ "name": "tokenAccount";
148
+ "writable": true;
149
+ }
150
+ ];
151
+ "args": [];
152
+ },
153
+ {
154
+ "name": "tokenTransferChecked";
155
+ "discriminator": [
156
+ 169,
157
+ 178,
158
+ 117,
159
+ 156,
160
+ 169,
161
+ 191,
162
+ 199,
163
+ 116
27
164
  ];
28
165
  "accounts": [
29
166
  {
30
167
  "name": "glamState";
31
168
  "writable": true;
32
169
  },
170
+ {
171
+ "name": "glamVault";
172
+ "writable": true;
173
+ "pda": {
174
+ "seeds": [
175
+ {
176
+ "kind": "const";
177
+ "value": [
178
+ 118,
179
+ 97,
180
+ 117,
181
+ 108,
182
+ 116
183
+ ];
184
+ },
185
+ {
186
+ "kind": "account";
187
+ "path": "glamState";
188
+ }
189
+ ];
190
+ "program": {
191
+ "kind": "account";
192
+ "path": "glamProtocolProgram";
193
+ };
194
+ };
195
+ },
33
196
  {
34
197
  "name": "glamSigner";
198
+ "writable": true;
35
199
  "signer": true;
36
200
  },
37
201
  {
@@ -67,15 +231,37 @@ export type ExtOffchain = {
67
231
  ];
68
232
  };
69
233
  },
234
+ {
235
+ "name": "cpiProgram";
236
+ },
70
237
  {
71
238
  "name": "glamProtocolProgram";
72
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz";
239
+ "address": "gstgptmbgJVi5f8ZmSRVZjZkDQwqKa3xWuUtD5WmJHz";
240
+ },
241
+ {
242
+ "name": "systemProgram";
243
+ "address": "11111111111111111111111111111111";
244
+ },
245
+ {
246
+ "name": "from";
247
+ "writable": true;
248
+ },
249
+ {
250
+ "name": "mint";
251
+ },
252
+ {
253
+ "name": "to";
254
+ "writable": true;
73
255
  }
74
256
  ];
75
257
  "args": [
76
258
  {
77
259
  "name": "amount";
78
- "type": "i128";
260
+ "type": "u64";
261
+ },
262
+ {
263
+ "name": "decimals";
264
+ "type": "u8";
79
265
  }
80
266
  ];
81
267
  }
@@ -1044,6 +1230,20 @@ export type ExtOffchain = {
1044
1230
  ];
1045
1231
  };
1046
1232
  },
1233
+ {
1234
+ "name": "transferPolicy";
1235
+ "type": {
1236
+ "kind": "struct";
1237
+ "fields": [
1238
+ {
1239
+ "name": "allowlist";
1240
+ "type": {
1241
+ "vec": "pubkey";
1242
+ };
1243
+ }
1244
+ ];
1245
+ };
1246
+ },
1047
1247
  {
1048
1248
  "name": "valuationModel";
1049
1249
  "type": {
@@ -1061,12 +1261,12 @@ export type ExtOffchain = {
1061
1261
  ];
1062
1262
  "constants": [
1063
1263
  {
1064
- "name": "protoOffchainAum";
1264
+ "name": "protoToken";
1065
1265
  "type": "u16";
1066
1266
  "value": "1";
1067
1267
  },
1068
1268
  {
1069
- "name": "protoOffchainAumPermUpdate";
1269
+ "name": "protoTokenPermTransfer";
1070
1270
  "type": "u64";
1071
1271
  "value": "1";
1072
1272
  }
@@ -8,7 +8,7 @@ export type ExtSpl = {
8
8
  "address": "gstgs9nJgX8PmRHWAAEP9H7xT3ZkaPWSGPYbj3mXdTa",
9
9
  "metadata": {
10
10
  "name": "extSpl",
11
- "version": "1.0.0",
11
+ "version": "1.0.1",
12
12
  "spec": "0.1.0",
13
13
  "description": "SPL integration for GLAM Protocol"
14
14
  },
@@ -8,7 +8,7 @@ export type ExtSpl = {
8
8
  "address": "G1NTsQ36mjPe89HtPYqxKsjY5HmYsDR6CbD2gd2U2pta";
9
9
  "metadata": {
10
10
  "name": "extSpl";
11
- "version": "1.0.0";
11
+ "version": "1.0.1";
12
12
  "spec": "0.1.0";
13
13
  "description": "SPL integration for GLAM Protocol";
14
14
  };
@@ -8,7 +8,7 @@ export type ExtSpl = {
8
8
  "address": "G1NTsQ36mjPe89HtPYqxKsjY5HmYsDR6CbD2gd2U2pta",
9
9
  "metadata": {
10
10
  "name": "extSpl",
11
- "version": "1.0.0",
11
+ "version": "1.0.1",
12
12
  "spec": "0.1.0",
13
13
  "description": "SPL integration for GLAM Protocol"
14
14
  },