@moon-cx/sdk 0.0.0-stage → 2.0.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 (155) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +2 -2
  3. package/dist/adapters/sender.d.ts +88 -0
  4. package/dist/adapters/sender.d.ts.map +1 -0
  5. package/dist/adapters/sender.js +62 -0
  6. package/dist/adapters/sender.js.map +1 -0
  7. package/dist/adapters/tonclient.d.ts +13 -0
  8. package/dist/adapters/tonclient.d.ts.map +1 -0
  9. package/dist/adapters/tonclient.js +17 -0
  10. package/dist/adapters/tonclient.js.map +1 -0
  11. package/dist/api/index.d.ts +210 -0
  12. package/dist/api/index.d.ts.map +1 -0
  13. package/dist/api/index.js +364 -0
  14. package/dist/api/index.js.map +1 -0
  15. package/dist/codec/bins.d.ts +26 -0
  16. package/dist/codec/bins.d.ts.map +1 -0
  17. package/dist/codec/bins.js +67 -0
  18. package/dist/codec/bins.js.map +1 -0
  19. package/dist/codec/clmm.d.ts +87 -0
  20. package/dist/codec/clmm.d.ts.map +1 -0
  21. package/dist/codec/clmm.js +119 -0
  22. package/dist/codec/clmm.js.map +1 -0
  23. package/dist/codec/cpmm.d.ts +112 -0
  24. package/dist/codec/cpmm.d.ts.map +1 -0
  25. package/dist/codec/cpmm.js +146 -0
  26. package/dist/codec/cpmm.js.map +1 -0
  27. package/dist/codec/jetton.d.ts +30 -0
  28. package/dist/codec/jetton.d.ts.map +1 -0
  29. package/dist/codec/jetton.js +37 -0
  30. package/dist/codec/jetton.js.map +1 -0
  31. package/dist/codec/mempad.d.ts +109 -0
  32. package/dist/codec/mempad.d.ts.map +1 -0
  33. package/dist/codec/mempad.js +162 -0
  34. package/dist/codec/mempad.js.map +1 -0
  35. package/dist/core/amount.d.ts +33 -0
  36. package/dist/core/amount.d.ts.map +1 -0
  37. package/dist/core/amount.js +81 -0
  38. package/dist/core/amount.js.map +1 -0
  39. package/dist/core/asset.d.ts +82 -0
  40. package/dist/core/asset.d.ts.map +1 -0
  41. package/dist/core/asset.js +143 -0
  42. package/dist/core/asset.js.map +1 -0
  43. package/dist/core/errors.d.ts +70 -0
  44. package/dist/core/errors.d.ts.map +1 -0
  45. package/dist/core/errors.js +114 -0
  46. package/dist/core/errors.js.map +1 -0
  47. package/dist/core/fee.d.ts +36 -0
  48. package/dist/core/fee.d.ts.map +1 -0
  49. package/dist/core/fee.js +40 -0
  50. package/dist/core/fee.js.map +1 -0
  51. package/dist/core/gas.d.ts +112 -0
  52. package/dist/core/gas.d.ts.map +1 -0
  53. package/dist/core/gas.js +265 -0
  54. package/dist/core/gas.js.map +1 -0
  55. package/dist/core/percent.d.ts +27 -0
  56. package/dist/core/percent.d.ts.map +1 -0
  57. package/dist/core/percent.js +71 -0
  58. package/dist/core/percent.js.map +1 -0
  59. package/dist/core/tx.d.ts +36 -0
  60. package/dist/core/tx.d.ts.map +1 -0
  61. package/dist/core/tx.js +17 -0
  62. package/dist/core/tx.js.map +1 -0
  63. package/dist/index.d.ts +63 -0
  64. package/dist/index.d.ts.map +1 -0
  65. package/dist/index.js +41 -0
  66. package/dist/index.js.map +1 -0
  67. package/dist/jetton/index.d.ts +53 -0
  68. package/dist/jetton/index.d.ts.map +1 -0
  69. package/dist/jetton/index.js +90 -0
  70. package/dist/jetton/index.js.map +1 -0
  71. package/dist/math/clmm-swap.d.ts +80 -0
  72. package/dist/math/clmm-swap.d.ts.map +1 -0
  73. package/dist/math/clmm-swap.js +277 -0
  74. package/dist/math/clmm-swap.js.map +1 -0
  75. package/dist/math/clmm.d.ts +234 -0
  76. package/dist/math/clmm.d.ts.map +1 -0
  77. package/dist/math/clmm.js +270 -0
  78. package/dist/math/clmm.js.map +1 -0
  79. package/dist/math/cpmm.d.ts +170 -0
  80. package/dist/math/cpmm.d.ts.map +1 -0
  81. package/dist/math/cpmm.js +175 -0
  82. package/dist/math/cpmm.js.map +1 -0
  83. package/dist/math/integer.d.ts +10 -0
  84. package/dist/math/integer.d.ts.map +1 -0
  85. package/dist/math/integer.js +44 -0
  86. package/dist/math/integer.js.map +1 -0
  87. package/dist/math/q128.d.ts +45 -0
  88. package/dist/math/q128.d.ts.map +1 -0
  89. package/dist/math/q128.js +108 -0
  90. package/dist/math/q128.js.map +1 -0
  91. package/dist/moon.d.ts +245 -0
  92. package/dist/moon.d.ts.map +1 -0
  93. package/dist/moon.js +332 -0
  94. package/dist/moon.js.map +1 -0
  95. package/dist/ops/jetton-input.d.ts +3 -0
  96. package/dist/ops/jetton-input.d.ts.map +1 -0
  97. package/dist/ops/jetton-input.js +8 -0
  98. package/dist/ops/jetton-input.js.map +1 -0
  99. package/dist/ops/liquidity.d.ts +157 -0
  100. package/dist/ops/liquidity.d.ts.map +1 -0
  101. package/dist/ops/liquidity.js +413 -0
  102. package/dist/ops/liquidity.js.map +1 -0
  103. package/dist/ops/mempad.d.ts +143 -0
  104. package/dist/ops/mempad.d.ts.map +1 -0
  105. package/dist/ops/mempad.js +248 -0
  106. package/dist/ops/mempad.js.map +1 -0
  107. package/dist/ops/pool.d.ts +75 -0
  108. package/dist/ops/pool.d.ts.map +1 -0
  109. package/dist/ops/pool.js +129 -0
  110. package/dist/ops/pool.js.map +1 -0
  111. package/dist/ops/position.d.ts +47 -0
  112. package/dist/ops/position.d.ts.map +1 -0
  113. package/dist/ops/position.js +73 -0
  114. package/dist/ops/position.js.map +1 -0
  115. package/dist/ops/swap.d.ts +104 -0
  116. package/dist/ops/swap.d.ts.map +1 -0
  117. package/dist/ops/swap.js +248 -0
  118. package/dist/ops/swap.js.map +1 -0
  119. package/dist/pool/amounts.d.ts +36 -0
  120. package/dist/pool/amounts.d.ts.map +1 -0
  121. package/dist/pool/amounts.js +68 -0
  122. package/dist/pool/amounts.js.map +1 -0
  123. package/dist/pool/assets.d.ts +45 -0
  124. package/dist/pool/assets.d.ts.map +1 -0
  125. package/dist/pool/assets.js +57 -0
  126. package/dist/pool/assets.js.map +1 -0
  127. package/dist/pool/clmm.d.ts +309 -0
  128. package/dist/pool/clmm.d.ts.map +1 -0
  129. package/dist/pool/clmm.js +561 -0
  130. package/dist/pool/clmm.js.map +1 -0
  131. package/dist/pool/cpmm.d.ts +228 -0
  132. package/dist/pool/cpmm.d.ts.map +1 -0
  133. package/dist/pool/cpmm.js +332 -0
  134. package/dist/pool/cpmm.js.map +1 -0
  135. package/dist/protocol/generated.d.ts +2752 -0
  136. package/dist/protocol/generated.d.ts.map +1 -0
  137. package/dist/protocol/generated.js +3564 -0
  138. package/dist/protocol/generated.js.map +1 -0
  139. package/dist/protocol/index.d.ts +19 -0
  140. package/dist/protocol/index.d.ts.map +1 -0
  141. package/dist/protocol/index.js +49 -0
  142. package/dist/protocol/index.js.map +1 -0
  143. package/dist/state/address.d.ts +121 -0
  144. package/dist/state/address.d.ts.map +1 -0
  145. package/dist/state/address.js +143 -0
  146. package/dist/state/address.js.map +1 -0
  147. package/dist/state/source.d.ts +26 -0
  148. package/dist/state/source.d.ts.map +1 -0
  149. package/dist/state/source.js +32 -0
  150. package/dist/state/source.js.map +1 -0
  151. package/dist/state/storage.d.ts +218 -0
  152. package/dist/state/storage.d.ts.map +1 -0
  153. package/dist/state/storage.js +273 -0
  154. package/dist/state/storage.js.map +1 -0
  155. package/package.json +74 -4
package/CHANGELOG.md ADDED
@@ -0,0 +1,18 @@
1
+ # Changelog
2
+
3
+ ## 2.0.1 — 2026-10-06
4
+
5
+ - The package page links to the documentation: https://moon.cx/docs#sdk
6
+ - The published protocol tables carry opcodes, field layouts, named constants and exit
7
+ codes only. `gatesAt`, `sourceOf` and `PROTOCOL.generatedFrom` are removed;
8
+ `SELL_MARKER` is a mempad constant (`constantOf('mempad', 'SELL_MARKER')`).
9
+ - `GasRequirement.gate` and `InsufficientGasError` describe each check in words and
10
+ amounts.
11
+ - Error texts changed: `(contract check: …)` is now `(on-chain check: …)`,
12
+ `ContractRejectedError` reads `the message was rejected on chain with exit code …`,
13
+ and the `EXIT_CODES` descriptions for 299, 510 and 700 are reworded. Error classes and
14
+ `exitCode` values are unchanged.
15
+
16
+ ## 2.0.0 — 2026-10-06
17
+
18
+ - First release as `@moon-cx/sdk`.
package/README.md CHANGED
@@ -1,3 +1,3 @@
1
- # Temporary Holding Version
1
+ # @moon-cx/sdk
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Documentation: https://moon.cx/docs#sdk
@@ -0,0 +1,88 @@
1
+ import type { Address } from '@ton/core';
2
+ import { MoonError } from '../core/errors.ts';
3
+ import type { Cell, MessageRelaxed } from '@ton/core';
4
+ import type { BuiltOperation, TxRequest } from '../core/tx.ts';
5
+ /**
6
+ * Anything that signs and sends: a keyed wallet, a TON Connect session, a
7
+ * multisig proposer or a queue.
8
+ */
9
+ export type Sender = {
10
+ /** The wallet the operation is for. Used as the excess address. */
11
+ address: Address;
12
+ send(txs: readonly TxRequest[]): Promise<void>;
13
+ };
14
+ export declare class NoWalletError extends MoonError {
15
+ constructor(operation: string);
16
+ }
17
+ /** A prepared, unsent operation. Review it, then call {@link Operation.send}. */
18
+ export type Operation<TDetails> = BuiltOperation<TDetails> & {
19
+ /** Signs and sends with the wallet it was prepared with, or `wallet` if given. */
20
+ send(wallet?: Sender): Promise<{
21
+ queryId: bigint;
22
+ }>;
23
+ };
24
+ /** Attaches `send()` to a built operation. Sends nothing by itself. */
25
+ export declare function prepared<T>(built: BuiltOperation<T>, wallet: Sender | undefined): Operation<T>;
26
+ /**
27
+ * The slice of an opened `@ton/ton` wallet the sender needs. Accepts
28
+ * V3R2, V4 and V5R1: `sendMode` is required and `authType` optional as in V5R1.
29
+ */
30
+ export type WalletLike = {
31
+ address: Address;
32
+ getSeqno(): Promise<number>;
33
+ sendTransfer(args: {
34
+ secretKey: Buffer;
35
+ seqno: number;
36
+ sendMode: number;
37
+ messages: MessageRelaxed[];
38
+ authType?: 'external';
39
+ }): Promise<unknown>;
40
+ };
41
+ /** Builds internal messages the way `@ton/ton` expects them. `internal` fits. */
42
+ export type InternalMessageFactory = (args: {
43
+ to: Address;
44
+ value: bigint;
45
+ body: Cell;
46
+ bounce: boolean;
47
+ }) => MessageRelaxed;
48
+ /**
49
+ * A sender backed by a wallet and its key.
50
+ *
51
+ * ```ts
52
+ * import { internal } from '@ton/ton'
53
+ * const sender = walletSender({ wallet, secretKey: keys.secretKey, internal })
54
+ * ```
55
+ *
56
+ * `internal` is passed in rather than imported so this package keeps no
57
+ * runtime dependency on `@ton/ton`.
58
+ */
59
+ export declare function walletSender(args: {
60
+ wallet: WalletLike;
61
+ secretKey: Buffer;
62
+ internal: InternalMessageFactory;
63
+ /** Defaults to 3: pay fees separately, ignore errors. */
64
+ sendMode?: number;
65
+ }): Sender;
66
+ /** The slice of a TON Connect UI instance the sender needs. */
67
+ export type TonConnectLike = {
68
+ account: {
69
+ address: string;
70
+ } | null;
71
+ sendTransaction(request: {
72
+ validUntil: number;
73
+ network?: string;
74
+ messages: {
75
+ address: string;
76
+ amount: string;
77
+ payload?: string;
78
+ }[];
79
+ }): Promise<unknown>;
80
+ };
81
+ /** A sender backed by TON Connect. Defaults to mainnet (`-239`) and a five-minute signing window. */
82
+ export declare function tonConnectSender(args: {
83
+ connector: TonConnectLike;
84
+ address: Address;
85
+ validForSeconds?: number;
86
+ network?: string;
87
+ }): Sender;
88
+ //# sourceMappingURL=sender.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sender.d.ts","sourceRoot":"","sources":["../../src/adapters/sender.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAC7C,OAAO,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9D;;;GAGG;AACH,MAAM,MAAM,MAAM,GAAG;IACnB,mEAAmE;IACnE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UAAU,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,sBAAsB,CAAA;IAChC,yDAAyD;IACzD,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,GAAG,MAAM,CAcT;AAED,+DAA+D;AAC/D,MAAM,MAAM,cAAc,GAAG;IAC3B,OAAO,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;IACnC,eAAe,CAAC,OAAO,EAAE;QACvB,UAAU,EAAE,MAAM,CAAA;QAClB,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,QAAQ,EAAE;YAAE,OAAO,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAC;YAAC,OAAO,CAAC,EAAE,MAAM,CAAA;SAAE,EAAE,CAAA;KAClE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;CACrB,CAAA;AAED,qGAAqG;AACrG,wBAAgB,gBAAgB,CAAC,IAAI,EAAE;IACrC,SAAS,EAAE,cAAc,CAAA;IACzB,OAAO,EAAE,OAAO,CAAA;IAChB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,GAAG,MAAM,CAeT"}
@@ -0,0 +1,62 @@
1
+ import { MoonError } from "../core/errors.js";
2
+ export class NoWalletError extends MoonError {
3
+ constructor(operation) {
4
+ super(`${operation} needs to know whose it is — pass wallet: walletSender(...), ` +
5
+ 'or sender: <address> if you are signing elsewhere');
6
+ }
7
+ }
8
+ /** Attaches `send()` to a built operation. Sends nothing by itself. */
9
+ export function prepared(built, wallet) {
10
+ return {
11
+ ...built,
12
+ send: async (override) => {
13
+ const to = override ?? wallet;
14
+ if (to === undefined)
15
+ throw new NoWalletError('sending');
16
+ await to.send(built.txs);
17
+ return { queryId: built.queryId };
18
+ },
19
+ };
20
+ }
21
+ /**
22
+ * A sender backed by a wallet and its key.
23
+ *
24
+ * ```ts
25
+ * import { internal } from '@ton/ton'
26
+ * const sender = walletSender({ wallet, secretKey: keys.secretKey, internal })
27
+ * ```
28
+ *
29
+ * `internal` is passed in rather than imported so this package keeps no
30
+ * runtime dependency on `@ton/ton`.
31
+ */
32
+ export function walletSender(args) {
33
+ return {
34
+ address: args.wallet.address,
35
+ async send(txs) {
36
+ await args.wallet.sendTransfer({
37
+ secretKey: args.secretKey,
38
+ seqno: await args.wallet.getSeqno(),
39
+ sendMode: args.sendMode ?? 3,
40
+ messages: txs.map((tx) => args.internal({ to: tx.to, value: tx.value, body: tx.body, bounce: true })),
41
+ });
42
+ },
43
+ };
44
+ }
45
+ /** A sender backed by TON Connect. Defaults to mainnet (`-239`) and a five-minute signing window. */
46
+ export function tonConnectSender(args) {
47
+ return {
48
+ address: args.address,
49
+ async send(txs) {
50
+ await args.connector.sendTransaction({
51
+ validUntil: Math.floor(Date.now() / 1000) + (args.validForSeconds ?? 300),
52
+ network: args.network ?? '-239',
53
+ messages: txs.map((tx) => ({
54
+ address: tx.to.toString(),
55
+ amount: tx.value.toString(),
56
+ payload: tx.body.toBoc().toString('base64'),
57
+ })),
58
+ });
59
+ },
60
+ };
61
+ }
62
+ //# sourceMappingURL=sender.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sender.js","sourceRoot":"","sources":["../../src/adapters/sender.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAc7C,MAAM,OAAO,aAAc,SAAQ,SAAS;IAC1C,YAAY,SAAiB;QAC3B,KAAK,CACH,GAAG,SAAS,+DAA+D;YACzE,mDAAmD,CACtD,CAAA;IACH,CAAC;CACF;AAQD,uEAAuE;AACvE,MAAM,UAAU,QAAQ,CAAI,KAAwB,EAAE,MAA0B;IAC9E,OAAO;QACL,GAAG,KAAK;QACR,IAAI,EAAE,KAAK,EAAE,QAAiB,EAAE,EAAE;YAChC,MAAM,EAAE,GAAG,QAAQ,IAAI,MAAM,CAAA;YAC7B,IAAI,EAAE,KAAK,SAAS;gB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;gBAC/B,QAAQ,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;oBACzB,OAAO,EAAE,EAAE,CAAC,EAAE,CAAC,QAAQ,EAAE;oBACzB,MAAM,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,EAAE;oBAC3B,OAAO,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC;iBAC5C,CAAC,CAAC;aACJ,CAAC,CAAA;QACJ,CAAC;KACF,CAAA;AACH,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { Address } from '@ton/core';
2
+ import type { StateSource } from '../state/source.ts';
3
+ /** The slice of TonClient this SDK needs, typed structurally to avoid a runtime `@ton/ton` dependency. */
4
+ export type TonClientLike = {
5
+ getContractState(address: Address): Promise<{
6
+ code: Buffer | null;
7
+ data: Buffer | null;
8
+ balance: bigint;
9
+ }>;
10
+ };
11
+ /** Wraps a TonClient as a state source. `new Moon({ client })` does this for you. */
12
+ export declare function tonClientSource(client: TonClientLike): StateSource;
13
+ //# sourceMappingURL=tonclient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tonclient.d.ts","sourceRoot":"","sources":["../../src/adapters/tonclient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAQ,MAAM,WAAW,CAAA;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAErD,0GAA0G;AAC1G,MAAM,MAAM,aAAa,GAAG;IAC1B,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC;QAC1C,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;QACnB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;QACnB,OAAO,EAAE,MAAM,CAAA;KAChB,CAAC,CAAA;CACH,CAAA;AAED,qFAAqF;AACrF,wBAAgB,eAAe,CAAC,MAAM,EAAE,aAAa,GAAG,WAAW,CAYlE"}
@@ -0,0 +1,17 @@
1
+ import { Address, Cell } from '@ton/core';
2
+ /** Wraps a TonClient as a state source. `new Moon({ client })` does this for you. */
3
+ export function tonClientSource(client) {
4
+ return {
5
+ async getAccountState(address) {
6
+ const account = await client.getContractState(address);
7
+ if (account.code === null || account.data === null)
8
+ return null;
9
+ return {
10
+ code: Cell.fromBoc(account.code)[0],
11
+ data: Cell.fromBoc(account.data)[0],
12
+ balance: account.balance,
13
+ };
14
+ },
15
+ };
16
+ }
17
+ //# sourceMappingURL=tonclient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tonclient.js","sourceRoot":"","sources":["../../src/adapters/tonclient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAYzC,qFAAqF;AACrF,MAAM,UAAU,eAAe,CAAC,MAAqB;IACnD,OAAO;QACL,KAAK,CAAC,eAAe,CAAC,OAAgB;YACpC,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAA;YACtD,IAAI,OAAO,CAAC,IAAI,KAAK,IAAI,IAAI,OAAO,CAAC,IAAI,KAAK,IAAI;gBAAE,OAAO,IAAI,CAAA;YAC/D,OAAO;gBACL,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAE;gBACpC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAE;gBACpC,OAAO,EAAE,OAAO,CAAC,OAAO;aACzB,CAAA;QACH,CAAC;KACF,CAAA;AACH,CAAC"}
@@ -0,0 +1,210 @@
1
+ import { Address } from '@ton/core';
2
+ import { Asset } from '../core/asset.ts';
3
+ import { MoonError } from '../core/errors.ts';
4
+ /**
5
+ * Optional backend client: pool listing, a wallet's positions, and the deployment's
6
+ * factory addresses. Quotes and transaction bodies are always computed locally.
7
+ * `Moon` sends create* calls to the factories from here unless `factories` is pinned.
8
+ */
9
+ export type PoolProtocol = 'cpmm' | 'clmm';
10
+ /** One token, as the pool listing describes it. */
11
+ export type TokenInfo = {
12
+ symbol: string;
13
+ name: string;
14
+ /** Jetton master, or `null` for native TON. */
15
+ address: Address | null;
16
+ decimals: number;
17
+ };
18
+ /** One pool from the listing. */
19
+ export type PoolInfo = {
20
+ /** Pool address. */
21
+ address: Address;
22
+ protocol: PoolProtocol;
23
+ tokens: {
24
+ x: TokenInfo;
25
+ y: TokenInfo;
26
+ };
27
+ /**
28
+ * LP fee tier in basis points, the number the pool is named by ("0.3%" for 30).
29
+ * Not the whole swap fee; see `totalFeeBps`.
30
+ */
31
+ feeBps: number;
32
+ /** Protocol share of the swap fee, basis points. `null` from a backend that does not send it. */
33
+ protocolFeeBps: number | null;
34
+ /**
35
+ * Total swap fee in basis points: `feeBps + protocolFeeBps`. CPMM takes both shares
36
+ * from the input; CLMM takes the LP share from the input and the protocol share from
37
+ * the output. `null` from a backend that does not send it.
38
+ */
39
+ totalFeeBps: number | null;
40
+ /** CLMM only. */
41
+ binStep: number | null;
42
+ tvlUsd: number | null;
43
+ volume24hUsd: number | null;
44
+ /** `null` when the backend has no meaningful APR: the pool's TVL is below its floor. */
45
+ aprPct: number | null;
46
+ price: number | null;
47
+ };
48
+ /**
49
+ * One of a wallet's positions, as the backend describes it. Use `address` to open it
50
+ * on chain and read the real numbers there.
51
+ */
52
+ export type PositionRecord = {
53
+ /** The LP position address. Pass it to `pool.positionAt()` or `range.positionAt()`. */
54
+ address: Address;
55
+ /** Index within the range. `null` for CPMM, where one wallet has one position. */
56
+ nftIndex: bigint | null;
57
+ pool: Address;
58
+ protocol: PoolProtocol;
59
+ /** Backend status: `in-range`, `out-range`, or `closed`. */
60
+ status: string;
61
+ /** Bin bounds, CLMM only. */
62
+ bins: {
63
+ low: number;
64
+ high: number;
65
+ } | null;
66
+ /** Price bounds, CLMM only. */
67
+ prices: {
68
+ low: number;
69
+ high: number;
70
+ } | null;
71
+ liquidityUsd: number | null;
72
+ feesUsd: number | null;
73
+ aprPct: number | null;
74
+ };
75
+ export declare class MoonApiError extends MoonError {
76
+ readonly status: number;
77
+ /** The response's `Retry-After`, in milliseconds; `null` when it sent none. */
78
+ readonly retryAfterMs: number | null;
79
+ /** The response body as text, cut to 2000 characters. */
80
+ readonly body: string;
81
+ /**
82
+ * `true` for a 503 or 429: the same request is expected to succeed later. Check this
83
+ * (or `instanceof PoolIndexWarmingError`) rather than a particular status.
84
+ */
85
+ readonly retryable: boolean;
86
+ constructor(path: string, status: number, body: string, retryAfterMs?: number | null);
87
+ }
88
+ /**
89
+ * The backend has not finished listing pools of a protocol you asked for. Retryable:
90
+ * wait `retryAfterMs` (5 s when the backend does not say) and call again.
91
+ *
92
+ * Thrown instead of returning a shorter list, which would look like "no pool for this
93
+ * pair". Covers both a 503 from a per-protocol route and `incompleteTypes` in a 200 from
94
+ * `GET /v1/pools`; `status` is 503 in both cases (the 200 is visible in `body`).
95
+ * `load('cpmm')` still works while only CLMM is being listed.
96
+ */
97
+ export declare class PoolIndexWarmingError extends MoonApiError {
98
+ /** Always `true`: this condition clears by itself; retry after `retryAfterMs`. */
99
+ readonly retryable: true;
100
+ /** The protocols that are not listed yet — the ones you asked for. */
101
+ readonly incomplete: readonly PoolProtocol[];
102
+ /** Never `null` here: the backend's `Retry-After` (at least 1 s), or 5 s. */
103
+ readonly retryAfterMs: number;
104
+ constructor(path: string, body: string, incomplete: readonly PoolProtocol[], retryAfterMs: number | null);
105
+ }
106
+ /** What GET /v1/config publishes: the network and the DEX factories. */
107
+ export type ApiConfig = {
108
+ /** 'mainnet' | 'testnet' as the backend reports it; null if it says nothing. */
109
+ network: string | null;
110
+ /** null — the deployment has no such factory (not deployed or turned off). */
111
+ cpmmFactory: Address | null;
112
+ clmmFactory: Address | null;
113
+ /** The Degen Jackpot address. */
114
+ jackpot: Address | null;
115
+ };
116
+ /** What GET /v1/mempad/launches/config publishes about the launch factory. */
117
+ export type ApiMempadConfig = {
118
+ network: string | null;
119
+ /** null — launches are turned off on this deployment. */
120
+ factory: Address | null;
121
+ };
122
+ export type MoonApiOptions = {
123
+ baseUrl?: string;
124
+ fetch?: typeof globalThis.fetch;
125
+ /** Request timeout in milliseconds. Defaults to 15 seconds. */
126
+ timeoutMs?: number;
127
+ };
128
+ export declare class MoonApi {
129
+ readonly baseUrl: string;
130
+ private readonly doFetch;
131
+ private readonly timeoutMs;
132
+ constructor(options?: MoonApiOptions);
133
+ private get;
134
+ /**
135
+ * Fetches the pool listing once and returns it indexed for in-memory lookups.
136
+ * Call {@link PoolList.refresh} for fresh numbers.
137
+ *
138
+ * The list is always complete for the protocols asked for; while the backend is
139
+ * still listing one of them this throws {@link PoolIndexWarmingError} (retryable).
140
+ */
141
+ load(protocol?: PoolProtocol): Promise<PoolList>;
142
+ /**
143
+ * One raw fetch of the listing as a plain array. Prefer {@link load} rather than
144
+ * calling this per lookup.
145
+ */
146
+ fetchPools(protocol?: PoolProtocol): Promise<PoolInfo[]>;
147
+ /**
148
+ * The deployment's network and DEX factory addresses (GET /v1/config). `Moon` asks
149
+ * once, when a create* call needs a factory and none was given.
150
+ */
151
+ config(): Promise<ApiConfig>;
152
+ /** The launch factory (GET /v1/mempad/launches/config); a separate service from {@link config}. */
153
+ mempadConfig(): Promise<ApiMempadConfig>;
154
+ /**
155
+ * A wallet's positions in one request. The records are pointers: open them with
156
+ * `range.positionAt()` and read the real numbers on chain.
157
+ */
158
+ positionsOf(wallet: Address | string, options?: {
159
+ pool?: Address | string;
160
+ }): Promise<WalletPositions>;
161
+ }
162
+ /**
163
+ * A wallet's positions, split by protocol: a CPMM position is one per pool, while a
164
+ * wallet can hold many CLMM positions per range.
165
+ */
166
+ export declare class WalletPositions {
167
+ /** Every position, in the order the backend returned them. */
168
+ readonly all: readonly PositionRecord[];
169
+ readonly cpmm: readonly PositionRecord[];
170
+ readonly clmm: readonly PositionRecord[];
171
+ constructor(positions: readonly PositionRecord[]);
172
+ get size(): number;
173
+ /** Positions in one pool. */
174
+ inPool(pool: Address | string): PositionRecord[];
175
+ /** Positions the backend still considers open. */
176
+ active(): PositionRecord[];
177
+ }
178
+ /** The pool listing, fetched once and queried in memory; only {@link refresh} hits the network. */
179
+ export declare class PoolList {
180
+ #private;
181
+ /** Every pool in the listing, in the order the backend returned them. */
182
+ readonly pools: readonly PoolInfo[];
183
+ /** Unix milliseconds when this listing was fetched. */
184
+ readonly fetchedAt: number;
185
+ constructor(api: MoonApi, protocol: PoolProtocol | undefined, pools: readonly PoolInfo[]);
186
+ get size(): number;
187
+ /** How long ago this listing was fetched, in milliseconds. */
188
+ get ageMs(): number;
189
+ /** Every pool, optionally narrowed to one protocol. */
190
+ all(protocol?: PoolProtocol): PoolInfo[];
191
+ byAddress(address: Address | string): PoolInfo | null;
192
+ /** Pools holding both assets, deepest first. Pure lookup, no request. */
193
+ find(a: Asset, b: Asset, protocol?: PoolProtocol): PoolInfo[];
194
+ /** The deepest pool for a pair, or `null`. */
195
+ best(a: Asset, b: Asset, protocol?: PoolProtocol): PoolInfo | null;
196
+ /** Every asset that appears in the listing, as {@link Asset} objects. */
197
+ assets(): Asset[];
198
+ /** Fetches the listing again and returns a new list. This one is unchanged. */
199
+ refresh(): Promise<PoolList>;
200
+ }
201
+ /**
202
+ * Turns a listing entry into SDK assets with the listing's decimals. A pool opened with
203
+ * them, on a client that cannot read jetton metadata, reports `'listed'` in
204
+ * `pool.decimalsSource` and takes amounts on that side only as raw `bigint`.
205
+ */
206
+ export declare function assetsOf(pool: PoolInfo): {
207
+ x: Asset;
208
+ y: Asset;
209
+ };
210
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AACxC,OAAO,EAAE,SAAS,EAAE,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