@hodlmarkets/sdk 0.1.0 → 0.1.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.
Files changed (51) hide show
  1. package/dist/accounts.cjs +22 -0
  2. package/dist/accounts.cjs.map +1 -1
  3. package/dist/accounts.js +22 -0
  4. package/dist/accounts.js.map +1 -1
  5. package/dist/client.cjs +340 -28
  6. package/dist/client.cjs.map +1 -1
  7. package/dist/client.d.cts +6 -2
  8. package/dist/client.d.ts +6 -2
  9. package/dist/client.js +341 -29
  10. package/dist/client.js.map +1 -1
  11. package/dist/constants.cjs +3 -1
  12. package/dist/constants.cjs.map +1 -1
  13. package/dist/constants.d.cts +5 -3
  14. package/dist/constants.d.ts +5 -3
  15. package/dist/constants.js +3 -2
  16. package/dist/constants.js.map +1 -1
  17. package/dist/events.cjs +333 -14
  18. package/dist/events.cjs.map +1 -1
  19. package/dist/events.d.cts +9 -0
  20. package/dist/events.d.ts +9 -0
  21. package/dist/events.js +334 -15
  22. package/dist/events.js.map +1 -1
  23. package/dist/index.cjs +375 -31
  24. package/dist/index.cjs.map +1 -1
  25. package/dist/index.d.cts +3 -3
  26. package/dist/index.d.ts +3 -3
  27. package/dist/index.js +375 -32
  28. package/dist/index.js.map +1 -1
  29. package/dist/instructions.cjs +22 -0
  30. package/dist/instructions.cjs.map +1 -1
  31. package/dist/instructions.js +22 -0
  32. package/dist/instructions.js.map +1 -1
  33. package/dist/math.cjs +33 -0
  34. package/dist/math.cjs.map +1 -1
  35. package/dist/math.d.cts +14 -4
  36. package/dist/math.d.ts +14 -4
  37. package/dist/math.js +33 -1
  38. package/dist/math.js.map +1 -1
  39. package/dist/pda.cjs +1 -0
  40. package/dist/pda.cjs.map +1 -1
  41. package/dist/pda.js +1 -0
  42. package/dist/pda.js.map +1 -1
  43. package/dist/transaction.cjs +0 -13
  44. package/dist/transaction.cjs.map +1 -1
  45. package/dist/transaction.d.cts +5 -3
  46. package/dist/transaction.d.ts +5 -3
  47. package/dist/transaction.js +1 -13
  48. package/dist/transaction.js.map +1 -1
  49. package/dist/types.d.cts +3 -0
  50. package/dist/types.d.ts +3 -0
  51. package/package.json +5 -3
package/dist/index.cjs CHANGED
@@ -9,7 +9,238 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
9
9
 
10
10
  var BN2__default = /*#__PURE__*/_interopDefault(BN2);
11
11
 
12
- // src/constants.ts
12
+ var __create = Object.create;
13
+ var __defProp = Object.defineProperty;
14
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
15
+ var __getOwnPropNames = Object.getOwnPropertyNames;
16
+ var __getProtoOf = Object.getPrototypeOf;
17
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
18
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
19
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
20
+ }) : x)(function(x) {
21
+ if (typeof require !== "undefined") return require.apply(this, arguments);
22
+ throw Error('Dynamic require of "' + x + '" is not supported');
23
+ });
24
+ var __commonJS = (cb, mod) => function __require2() {
25
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
26
+ };
27
+ var __copyProps = (to, from, except, desc) => {
28
+ if (from && typeof from === "object" || typeof from === "function") {
29
+ for (let key of __getOwnPropNames(from))
30
+ if (!__hasOwnProp.call(to, key) && key !== except)
31
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
32
+ }
33
+ return to;
34
+ };
35
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
36
+ // If the importer is in node compatibility mode or this is not an ESM
37
+ // file that has been converted to a CommonJS file using a Babel-
38
+ // compatible transform (i.e. "__esModule" has not been set), then set
39
+ // "default" to the CommonJS "module.exports" for node compatibility.
40
+ __defProp(target, "default", { value: mod, enumerable: true }) ,
41
+ mod
42
+ ));
43
+
44
+ // node_modules/safe-buffer/index.js
45
+ var require_safe_buffer = __commonJS({
46
+ "node_modules/safe-buffer/index.js"(exports$1, module) {
47
+ var buffer = __require("buffer");
48
+ var Buffer2 = buffer.Buffer;
49
+ function copyProps(src, dst) {
50
+ for (var key in src) {
51
+ dst[key] = src[key];
52
+ }
53
+ }
54
+ if (Buffer2.from && Buffer2.alloc && Buffer2.allocUnsafe && Buffer2.allocUnsafeSlow) {
55
+ module.exports = buffer;
56
+ } else {
57
+ copyProps(buffer, exports$1);
58
+ exports$1.Buffer = SafeBuffer;
59
+ }
60
+ function SafeBuffer(arg, encodingOrOffset, length) {
61
+ return Buffer2(arg, encodingOrOffset, length);
62
+ }
63
+ SafeBuffer.prototype = Object.create(Buffer2.prototype);
64
+ copyProps(Buffer2, SafeBuffer);
65
+ SafeBuffer.from = function(arg, encodingOrOffset, length) {
66
+ if (typeof arg === "number") {
67
+ throw new TypeError("Argument must not be a number");
68
+ }
69
+ return Buffer2(arg, encodingOrOffset, length);
70
+ };
71
+ SafeBuffer.alloc = function(size, fill, encoding) {
72
+ if (typeof size !== "number") {
73
+ throw new TypeError("Argument must be a number");
74
+ }
75
+ var buf = Buffer2(size);
76
+ if (fill !== void 0) {
77
+ if (typeof encoding === "string") {
78
+ buf.fill(fill, encoding);
79
+ } else {
80
+ buf.fill(fill);
81
+ }
82
+ } else {
83
+ buf.fill(0);
84
+ }
85
+ return buf;
86
+ };
87
+ SafeBuffer.allocUnsafe = function(size) {
88
+ if (typeof size !== "number") {
89
+ throw new TypeError("Argument must be a number");
90
+ }
91
+ return Buffer2(size);
92
+ };
93
+ SafeBuffer.allocUnsafeSlow = function(size) {
94
+ if (typeof size !== "number") {
95
+ throw new TypeError("Argument must be a number");
96
+ }
97
+ return buffer.SlowBuffer(size);
98
+ };
99
+ }
100
+ });
101
+
102
+ // node_modules/base-x/src/index.js
103
+ var require_src = __commonJS({
104
+ "node_modules/base-x/src/index.js"(exports$1, module) {
105
+ var _Buffer = require_safe_buffer().Buffer;
106
+ function base(ALPHABET) {
107
+ if (ALPHABET.length >= 255) {
108
+ throw new TypeError("Alphabet too long");
109
+ }
110
+ var BASE_MAP = new Uint8Array(256);
111
+ for (var j = 0; j < BASE_MAP.length; j++) {
112
+ BASE_MAP[j] = 255;
113
+ }
114
+ for (var i = 0; i < ALPHABET.length; i++) {
115
+ var x = ALPHABET.charAt(i);
116
+ var xc = x.charCodeAt(0);
117
+ if (BASE_MAP[xc] !== 255) {
118
+ throw new TypeError(x + " is ambiguous");
119
+ }
120
+ BASE_MAP[xc] = i;
121
+ }
122
+ var BASE = ALPHABET.length;
123
+ var LEADER = ALPHABET.charAt(0);
124
+ var FACTOR = Math.log(BASE) / Math.log(256);
125
+ var iFACTOR = Math.log(256) / Math.log(BASE);
126
+ function encode(source) {
127
+ if (Array.isArray(source) || source instanceof Uint8Array) {
128
+ source = _Buffer.from(source);
129
+ }
130
+ if (!_Buffer.isBuffer(source)) {
131
+ throw new TypeError("Expected Buffer");
132
+ }
133
+ if (source.length === 0) {
134
+ return "";
135
+ }
136
+ var zeroes = 0;
137
+ var length = 0;
138
+ var pbegin = 0;
139
+ var pend = source.length;
140
+ while (pbegin !== pend && source[pbegin] === 0) {
141
+ pbegin++;
142
+ zeroes++;
143
+ }
144
+ var size = (pend - pbegin) * iFACTOR + 1 >>> 0;
145
+ var b58 = new Uint8Array(size);
146
+ while (pbegin !== pend) {
147
+ var carry = source[pbegin];
148
+ var i2 = 0;
149
+ for (var it1 = size - 1; (carry !== 0 || i2 < length) && it1 !== -1; it1--, i2++) {
150
+ carry += 256 * b58[it1] >>> 0;
151
+ b58[it1] = carry % BASE >>> 0;
152
+ carry = carry / BASE >>> 0;
153
+ }
154
+ if (carry !== 0) {
155
+ throw new Error("Non-zero carry");
156
+ }
157
+ length = i2;
158
+ pbegin++;
159
+ }
160
+ var it2 = size - length;
161
+ while (it2 !== size && b58[it2] === 0) {
162
+ it2++;
163
+ }
164
+ var str = LEADER.repeat(zeroes);
165
+ for (; it2 < size; ++it2) {
166
+ str += ALPHABET.charAt(b58[it2]);
167
+ }
168
+ return str;
169
+ }
170
+ function decodeUnsafe(source) {
171
+ if (typeof source !== "string") {
172
+ throw new TypeError("Expected String");
173
+ }
174
+ if (source.length === 0) {
175
+ return _Buffer.alloc(0);
176
+ }
177
+ var psz = 0;
178
+ var zeroes = 0;
179
+ var length = 0;
180
+ while (source[psz] === LEADER) {
181
+ zeroes++;
182
+ psz++;
183
+ }
184
+ var size = (source.length - psz) * FACTOR + 1 >>> 0;
185
+ var b256 = new Uint8Array(size);
186
+ while (psz < source.length) {
187
+ var charCode = source.charCodeAt(psz);
188
+ if (charCode > 255) {
189
+ return;
190
+ }
191
+ var carry = BASE_MAP[charCode];
192
+ if (carry === 255) {
193
+ return;
194
+ }
195
+ var i2 = 0;
196
+ for (var it3 = size - 1; (carry !== 0 || i2 < length) && it3 !== -1; it3--, i2++) {
197
+ carry += BASE * b256[it3] >>> 0;
198
+ b256[it3] = carry % 256 >>> 0;
199
+ carry = carry / 256 >>> 0;
200
+ }
201
+ if (carry !== 0) {
202
+ throw new Error("Non-zero carry");
203
+ }
204
+ length = i2;
205
+ psz++;
206
+ }
207
+ var it4 = size - length;
208
+ while (it4 !== size && b256[it4] === 0) {
209
+ it4++;
210
+ }
211
+ var vch = _Buffer.allocUnsafe(zeroes + (size - it4));
212
+ vch.fill(0, 0, zeroes);
213
+ var j2 = zeroes;
214
+ while (it4 !== size) {
215
+ vch[j2++] = b256[it4++];
216
+ }
217
+ return vch;
218
+ }
219
+ function decode(string) {
220
+ var buffer = decodeUnsafe(string);
221
+ if (buffer) {
222
+ return buffer;
223
+ }
224
+ throw new Error("Non-base" + BASE + " character");
225
+ }
226
+ return {
227
+ encode,
228
+ decodeUnsafe,
229
+ decode
230
+ };
231
+ }
232
+ module.exports = base;
233
+ }
234
+ });
235
+
236
+ // node_modules/bs58/index.js
237
+ var require_bs58 = __commonJS({
238
+ "node_modules/bs58/index.js"(exports$1, module) {
239
+ var basex = require_src();
240
+ var ALPHABET = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
241
+ module.exports = basex(ALPHABET);
242
+ }
243
+ });
13
244
  var BPS_DENOMINATOR = 1e4;
14
245
  var PROGRAM_ID = new web3_js.PublicKey("hodLrUfwyK3Z7Td5hdZhyojyznG1rqbHVex11y5s4yG");
15
246
  var PROTOCOL_AUTHORITY = new web3_js.PublicKey("EFAquDGAHjkoPB6TGKVibD3BYhbFXNDjuXKpiBHdYzji");
@@ -42,9 +273,10 @@ var DEVNET_CONFIG = {
42
273
  totalSupply: TOTAL_SUPPLY
43
274
  };
44
275
  var TRADE_FEE_BPS = 25;
276
+ var MIGRATION_SOL_THRESHOLD = new BN2__default.default("85000000000");
45
277
  var VEST_DURATION = {
46
278
  ONE_MINUTE: 60,
47
- TEN_MINUTES: 600
279
+ THIRTY_MINUTES: 1800
48
280
  };
49
281
  var LIMITS = {
50
282
  NAME: { min: 1, max: 32 },
@@ -144,6 +376,37 @@ function calculateTradableVaultedSplit(tokensOut, tokensSold, bandSize = BAND_SI
144
376
  const vaulted = tokensOut.sub(tradable);
145
377
  return { tradable, vaulted, tradablePct };
146
378
  }
379
+ function calculateClaimableTokens(tradableTokens, vaultedTokens, initialVaulted, tokensTransferred, entryTimestamp, poolCreationTimestamp, vestDuration, currentTimestamp) {
380
+ const totalTokens = tradableTokens.add(vaultedTokens);
381
+ if (totalTokens.isZero()) return ZERO;
382
+ const globalUnlockTime = poolCreationTimestamp.add(vestDuration);
383
+ if (currentTimestamp.gte(globalUnlockTime)) {
384
+ const claimable2 = totalTokens.sub(tokensTransferred);
385
+ return claimable2.isNeg() ? ZERO : claimable2;
386
+ }
387
+ if (initialVaulted.isZero() || vestDuration.isZero()) {
388
+ const claimable2 = totalTokens.sub(tokensTransferred);
389
+ return claimable2.isNeg() ? ZERO : claimable2;
390
+ }
391
+ const elapsed = currentTimestamp.sub(entryTimestamp);
392
+ if (elapsed.isNeg()) {
393
+ const claimable2 = tradableTokens.sub(tokensTransferred);
394
+ return claimable2.isNeg() ? ZERO : claimable2;
395
+ }
396
+ let currentVaulted;
397
+ if (elapsed.gte(vestDuration)) {
398
+ currentVaulted = ZERO;
399
+ } else {
400
+ const remainingBps = BPS.sub(elapsed.mul(BPS).div(vestDuration));
401
+ currentVaulted = initialVaulted.mul(remainingBps).div(BPS);
402
+ }
403
+ if (currentVaulted.gt(totalTokens)) {
404
+ currentVaulted = totalTokens;
405
+ }
406
+ const newTradable = totalTokens.sub(currentVaulted);
407
+ const claimable = newTradable.sub(tokensTransferred);
408
+ return claimable.isNeg() ? ZERO : claimable;
409
+ }
147
410
  function calculateAccruedTokens(initialVaulted, tokensTransferred, entryTimestamp, vestDuration, currentTimestamp) {
148
411
  if (initialVaulted.isZero()) return ZERO;
149
412
  const remaining = initialVaulted.sub(tokensTransferred);
@@ -1633,6 +1896,27 @@ var hodl_default = {
1633
1896
  ],
1634
1897
  type: "u64"
1635
1898
  },
1899
+ {
1900
+ name: "migration_complete",
1901
+ docs: [
1902
+ "One-way flag: set to true once vamm_real_sol >= MIGRATION_SOL_THRESHOLD, never reverts"
1903
+ ],
1904
+ type: "bool"
1905
+ },
1906
+ {
1907
+ name: "total_fees_sol",
1908
+ docs: [
1909
+ "Cumulative SOL fees collected from buys (lamports)"
1910
+ ],
1911
+ type: "u64"
1912
+ },
1913
+ {
1914
+ name: "total_fees_tokens",
1915
+ docs: [
1916
+ "Cumulative token fees collected from sells"
1917
+ ],
1918
+ type: "u64"
1919
+ },
1636
1920
  {
1637
1921
  name: "bump_vault_auth",
1638
1922
  docs: [
@@ -2151,18 +2435,80 @@ async function buildClosePositionInstruction(params) {
2151
2435
  program: config.programId
2152
2436
  }).instruction();
2153
2437
  }
2438
+
2439
+ // src/events.ts
2440
+ var import_bs58 = __toESM(require_bs58());
2441
+ var PROGRAM_DATA_PREFIX = "Program data: ";
2442
+ function toCamelCase(name) {
2443
+ return name.charAt(0).toLowerCase() + name.slice(1);
2444
+ }
2445
+ function snakeToCamelKeys(obj) {
2446
+ const result = {};
2447
+ for (const [key, value] of Object.entries(obj)) {
2448
+ const camelKey = key.replace(/_([a-z])/g, (_, c) => c.toUpperCase());
2449
+ result[camelKey] = value;
2450
+ }
2451
+ return result;
2452
+ }
2453
+ function tryDecodeEvent(coder, data) {
2454
+ try {
2455
+ const event = coder.events.decode(data);
2456
+ if (event) {
2457
+ return {
2458
+ name: toCamelCase(event.name),
2459
+ data: snakeToCamelKeys(event.data)
2460
+ };
2461
+ }
2462
+ } catch {
2463
+ }
2464
+ return null;
2465
+ }
2154
2466
  function parseTransactionEvents(input, config) {
2155
2467
  if (!input) return [];
2156
- const logs = Array.isArray(input) ? input : input.meta?.logMessages ?? [];
2157
- if (logs.length === 0) return [];
2158
2468
  const coder = new anchor.BorshCoder(hodl_default);
2159
- const parser = new anchor.EventParser(config.programId, coder);
2160
2469
  const events = [];
2161
- try {
2162
- for (const event of parser.parseLogs(logs)) {
2163
- events.push({ name: event.name, data: event.data });
2470
+ if (Array.isArray(input)) {
2471
+ for (const log of input) {
2472
+ if (!log.startsWith(PROGRAM_DATA_PREFIX)) continue;
2473
+ const b64 = log.slice(PROGRAM_DATA_PREFIX.length);
2474
+ const event = tryDecodeEvent(coder, b64);
2475
+ if (event) events.push(event);
2476
+ }
2477
+ return events;
2478
+ }
2479
+ const tx = input;
2480
+ const logs = tx.meta?.logMessages ?? [];
2481
+ for (const log of logs) {
2482
+ if (!log.startsWith(PROGRAM_DATA_PREFIX)) continue;
2483
+ const b64 = log.slice(PROGRAM_DATA_PREFIX.length);
2484
+ const event = tryDecodeEvent(coder, b64);
2485
+ if (event) events.push(event);
2486
+ }
2487
+ const programId = config.programId.toBase58();
2488
+ const staticKeys = tx.transaction.message.staticAccountKeys;
2489
+ const loadedWritable = tx.meta?.loadedAddresses?.writable ?? [];
2490
+ const loadedReadonly = tx.meta?.loadedAddresses?.readonly ?? [];
2491
+ const allKeys = [...staticKeys, ...loadedWritable, ...loadedReadonly];
2492
+ for (const inner of tx.meta?.innerInstructions ?? []) {
2493
+ for (const ix of inner.instructions) {
2494
+ const ixProgramKey = allKeys[ix.programIdIndex];
2495
+ if (!ixProgramKey || ixProgramKey.toBase58() !== programId) continue;
2496
+ try {
2497
+ const bytes = import_bs58.default.decode(ix.data);
2498
+ const b64Full = anchor.utils.bytes.base64.encode(Buffer.from(bytes));
2499
+ const eventFull = tryDecodeEvent(coder, b64Full);
2500
+ if (eventFull) {
2501
+ events.push(eventFull);
2502
+ continue;
2503
+ }
2504
+ if (bytes.length > 8) {
2505
+ const b64Skip = anchor.utils.bytes.base64.encode(Buffer.from(bytes.slice(8)));
2506
+ const eventSkip = tryDecodeEvent(coder, b64Skip);
2507
+ if (eventSkip) events.push(eventSkip);
2508
+ }
2509
+ } catch {
2510
+ }
2164
2511
  }
2165
- } catch {
2166
2512
  }
2167
2513
  return events;
2168
2514
  }
@@ -2176,7 +2522,6 @@ async function fetchAndParseTransaction(connection, signature, config) {
2176
2522
  function subscribeToEvents(connection, config, onEvent, opts = {}) {
2177
2523
  const commitment = opts.commitment ?? "confirmed";
2178
2524
  const coder = new anchor.BorshCoder(hodl_default);
2179
- const parser = new anchor.EventParser(config.programId, coder);
2180
2525
  return connection.onLogs(
2181
2526
  config.programId,
2182
2527
  ({ logs, err, signature }, context) => {
@@ -2185,12 +2530,13 @@ function subscribeToEvents(connection, config, onEvent, opts = {}) {
2185
2530
  return;
2186
2531
  }
2187
2532
  try {
2188
- for (const event of parser.parseLogs(logs)) {
2189
- onEvent(
2190
- { name: event.name, data: event.data },
2191
- context.slot,
2192
- signature
2193
- );
2533
+ for (const log of logs) {
2534
+ if (!log.startsWith(PROGRAM_DATA_PREFIX)) continue;
2535
+ const b64 = log.slice(PROGRAM_DATA_PREFIX.length);
2536
+ const event = tryDecodeEvent(coder, b64);
2537
+ if (event) {
2538
+ onEvent(event, context.slot, signature);
2539
+ }
2194
2540
  }
2195
2541
  } catch (e) {
2196
2542
  opts.onError?.(e instanceof Error ? e : new Error(String(e)));
@@ -2242,18 +2588,6 @@ async function buildTransaction(connection, instructions, payer, opts = {}) {
2242
2588
  }).compileToV0Message();
2243
2589
  return new web3_js.VersionedTransaction(message);
2244
2590
  }
2245
- async function sendTransaction(connection, tx, opts = {}) {
2246
- const sig = await connection.sendTransaction(tx, {
2247
- skipPreflight: opts.skipPreflight ?? false,
2248
- maxRetries: 3
2249
- });
2250
- const latestBlockhash = await connection.getLatestBlockhash("confirmed");
2251
- await connection.confirmTransaction({
2252
- signature: sig,
2253
- ...latestBlockhash
2254
- }, "confirmed");
2255
- return sig;
2256
- }
2257
2591
 
2258
2592
  // src/client.ts
2259
2593
  var HodlClient = class {
@@ -2289,8 +2623,12 @@ var HodlClient = class {
2289
2623
  const ix = await buildClosePositionInstruction({ ...params, connection: this.connection, config: this.config });
2290
2624
  return buildTransaction(this.connection, [ix], params.owner, opts);
2291
2625
  }
2292
- send(tx, opts) {
2293
- return sendTransaction(this.connection, tx, opts);
2626
+ /**
2627
+ * Build a transaction from raw instructions. Fetches a fresh blockhash.
2628
+ * Sign the returned transaction, then send via connection.sendRawTransaction.
2629
+ */
2630
+ buildTransaction(instructions, payer, opts) {
2631
+ return buildTransaction(this.connection, instructions, payer, opts);
2294
2632
  }
2295
2633
  subscribeToEvents(onEvent, opts) {
2296
2634
  return subscribeToEvents(this.connection, this.config, onEvent, opts);
@@ -2302,6 +2640,11 @@ var HodlClient = class {
2302
2640
  return fetchAndParseTransaction(this.connection, signature, this.config);
2303
2641
  }
2304
2642
  };
2643
+ /*! Bundled license information:
2644
+
2645
+ safe-buffer/index.js:
2646
+ (*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
2647
+ */
2305
2648
 
2306
2649
  exports.BPS_DENOMINATOR = BPS_DENOMINATOR;
2307
2650
  exports.DECIMALS = DECIMALS;
@@ -2311,6 +2654,7 @@ exports.HodlClient = HodlClient;
2311
2654
  exports.HodlError = HodlError;
2312
2655
  exports.LIMITS = LIMITS;
2313
2656
  exports.MAINNET_CONFIG = MAINNET_CONFIG;
2657
+ exports.MIGRATION_SOL_THRESHOLD = MIGRATION_SOL_THRESHOLD;
2314
2658
  exports.PROGRAM_ID = PROGRAM_ID;
2315
2659
  exports.PROTOCOL_AUTHORITY = PROTOCOL_AUTHORITY;
2316
2660
  exports.PROTOCOL_MINT_FEE = PROTOCOL_MINT_FEE;
@@ -2328,6 +2672,7 @@ exports.buildSellInstruction = buildSellInstruction;
2328
2672
  exports.buildTransaction = buildTransaction;
2329
2673
  exports.calculateAccruedTokens = calculateAccruedTokens;
2330
2674
  exports.calculateBuyAmount = calculateBuyAmount;
2675
+ exports.calculateClaimableTokens = calculateClaimableTokens;
2331
2676
  exports.calculatePriceImpact = calculatePriceImpact;
2332
2677
  exports.calculateSellAmount = calculateSellAmount;
2333
2678
  exports.calculateSolForExactTokens = calculateSolForExactTokens;
@@ -2345,7 +2690,6 @@ exports.getSolVaultPDA = getSolVaultPDA;
2345
2690
  exports.getVaultAuthorityPDA = getVaultAuthorityPDA;
2346
2691
  exports.parseHodlError = parseHodlError;
2347
2692
  exports.parseTransactionEvents = parseTransactionEvents;
2348
- exports.sendTransaction = sendTransaction;
2349
2693
  exports.subscribeToAccrualClaimed = subscribeToAccrualClaimed;
2350
2694
  exports.subscribeToEvents = subscribeToEvents;
2351
2695
  exports.subscribeToPositionClosed = subscribeToPositionClosed;