aftermath-ts-sdk 1.3.29 → 1.3.30-deprecated.20

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 (40) hide show
  1. package/dist/general/providers/aftermath.d.ts +5 -0
  2. package/dist/general/providers/aftermath.d.ts.map +1 -1
  3. package/dist/general/providers/aftermath.js +5 -0
  4. package/dist/general/types/generalTypes.d.ts +1 -0
  5. package/dist/general/types/generalTypes.d.ts.map +1 -1
  6. package/dist/general/utils/caller.d.ts +1 -0
  7. package/dist/general/utils/caller.d.ts.map +1 -1
  8. package/dist/general/utils/caller.js +3 -1
  9. package/dist/packages/gasPools/gasPools.d.ts +144 -0
  10. package/dist/packages/gasPools/gasPools.d.ts.map +1 -0
  11. package/dist/packages/gasPools/gasPools.js +202 -0
  12. package/dist/packages/gasPools/gasPoolsTypes.d.ts +75 -0
  13. package/dist/packages/gasPools/gasPoolsTypes.d.ts.map +1 -0
  14. package/dist/packages/gasPools/gasPoolsTypes.js +2 -0
  15. package/dist/packages/gasPools/index.d.ts +2 -0
  16. package/dist/packages/gasPools/index.d.ts.map +1 -0
  17. package/dist/packages/gasPools/index.js +17 -0
  18. package/dist/packages/index.d.ts +1 -0
  19. package/dist/packages/index.d.ts.map +1 -1
  20. package/dist/packages/index.js +1 -0
  21. package/dist/packages/multisig/api/multisigApi.d.ts.map +1 -1
  22. package/dist/packages/multisig/api/multisigApi.js +6 -2
  23. package/dist/packages/perpetuals/perpetuals.d.ts +112 -22
  24. package/dist/packages/perpetuals/perpetuals.d.ts.map +1 -1
  25. package/dist/packages/perpetuals/perpetuals.js +132 -28
  26. package/dist/packages/perpetuals/perpetualsAccount.d.ts +53 -1
  27. package/dist/packages/perpetuals/perpetualsAccount.d.ts.map +1 -1
  28. package/dist/packages/perpetuals/perpetualsAccount.js +109 -37
  29. package/dist/packages/perpetuals/perpetualsMarket.d.ts +14 -1
  30. package/dist/packages/perpetuals/perpetualsMarket.d.ts.map +1 -1
  31. package/dist/packages/perpetuals/perpetualsMarket.js +17 -0
  32. package/dist/packages/perpetuals/perpetualsTypes.d.ts +526 -9
  33. package/dist/packages/perpetuals/perpetualsTypes.d.ts.map +1 -1
  34. package/dist/packages/perpetuals/perpetualsVault.d.ts +48 -1
  35. package/dist/packages/perpetuals/perpetualsVault.d.ts.map +1 -1
  36. package/dist/packages/perpetuals/perpetualsVault.js +43 -6
  37. package/dist/types.d.ts +1 -0
  38. package/dist/types.d.ts.map +1 -1
  39. package/dist/types.js +1 -0
  40. package/package.json +1 -1
@@ -5,6 +5,7 @@ import { Farms } from "../../packages/farms/farms";
5
5
  import { Faucet } from "../../packages/faucet/faucet";
6
6
  import { LimitOrders } from "../../packages/limitOrders/limitOrders";
7
7
  import { Multisig } from "../../packages/multisig/multisig";
8
+ import { GasPools } from "../../packages/gasPools";
8
9
  import { Perpetuals } from "../../packages/perpetuals";
9
10
  import { Pools } from "../../packages/pools/pools";
10
11
  import { Referrals } from "../../packages/referrals/referrals";
@@ -128,6 +129,10 @@ export declare class Aftermath extends Caller {
128
129
  * Returns an instance of `Referrals` for referral-based interactions in the protocol.
129
130
  */
130
131
  Referrals: () => Referrals;
132
+ /**
133
+ * Returns an instance of `GasPools` for shared gas pool interactions.
134
+ */
135
+ GasPools: () => GasPools;
131
136
  /**
132
137
  * Returns an instance of `Perpetuals` for futures or perpetual contract interactions.
133
138
  */
@@ -1 +1 @@
1
- {"version":3,"file":"aftermath.d.ts","sourceRoot":"","sources":["../../../src/general/providers/aftermath.ts"],"names":[],"mappings":"AACA,OAAO,EACN,IAAI,EACJ,gBAAgB,EAChB,MAAM,EACN,aAAa,EACb,MAAM,EACN,GAAG,EACH,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAChD,OAAO,EAAE,GAAG,EAAE,MAAM,wBAAwB,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAA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AM,CAAC,EAAE;QAAE,WAAW,EAAE,GAAG,CAAA;KAAE;IAyB/C;;;;;;;;;;OAUG;IACU,YAAY;IAIzB;;;;;;;;;;OAUG;IACI,aAAa;IAYpB;;;OAGG;IACI,KAAK,cAA+C;IAE3D;;OAEG;IACI,OAAO,gBAAiD;IAE/D;;OAEG;IACI,gBAAgB,yBAA2C;IAElE;;OAEG;IACI,QAAQ,iBAAkD;IAEjE;;OAEG;IACI,MAAM,eAAgD;IAE7D;;;OAGG;IACI,MAAM,eAAiC;IAC9C;;OAEG;IACI,MAAM,eAAgD;IAE7D;;;OAGG;IACI,aAAa,sBAAwC;IAE5D;;OAEG;IACI,SAAS,kBAAoC;IAEpD;;OAEG;IACI,UAAU,mBAAoD;IAErE;;OAEG;IACI,OAAO,gBAAiD;IAE/D;;OAEG;IACI,KAAK,cAA+C;IAE3D;;OAEG;IACI,GAAG,YAA8B;IAExC;;OAEG;IACI,QAAQ,iBAAkD;IAEjE;;OAEG;IACI,WAAW,oBAAsC;IAExD;;OAEG;IACI,QAAQ,iBAAmC;IAMlD;;OAEG;IACI,GAAG,YAA6C;IAEvD;;OAEG;IACI,MAAM,eAAiC;IAE9C;;;;;OAKG;IACI,MAAM,GAAI,SAAS,UAAU,YACa;IAEjD;;;;;OAKG;IACI,IAAI,GAAI,WAAW,QAAQ,UACc;IAEhD;;;OAGG;IACI,UAAU,mBAAqC;IAEtD;;OAEG;IACI,IAAI,aAA+B;IAM1C;;;OAGG;IACH,OAAc,OAAO,iBAAW;IAEhC;;OAEG;IACH,OAAc,OAAO,iBAAW;CAChC"}
1
+ {"version":3,"file":"aftermath.d.ts","sourceRoot":"","sources":["../../../src/general/providers/aftermath.ts"],"names":[],"mappings":"AACA,OAAO,EACN,IAAI,EACJ,gBAAgB,EAChB,MAAM,EACN,aAAa,EACb,MAAM,EACN,GAAG,EACH,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAChD,OAAO,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1 = require("../../packages/faucet/faucet");
19
19
  const limitOrders_1 = require("../../packages/limitOrders/limitOrders");
20
20
  const multisig_1 = require("../../packages/multisig/multisig");
21
+ const gasPools_1 = require("../../packages/gasPools");
21
22
  const perpetuals_1 = require("../../packages/perpetuals");
22
23
  const pools_1 = require("../../packages/pools/pools");
23
24
  const referrals_1 = require("../../packages/referrals/referrals");
@@ -114,6 +115,10 @@ class Aftermath extends caller_1.Caller {
114
115
  * Returns an instance of `Referrals` for referral-based interactions in the protocol.
115
116
  */
116
117
  this.Referrals = () => new referrals_1.Referrals(this.config);
118
+ /**
119
+ * Returns an instance of `GasPools` for shared gas pool interactions.
120
+ */
121
+ this.GasPools = () => new gasPools_1.GasPools(this.config, this.Provider);
117
122
  /**
118
123
  * Returns an instance of `Perpetuals` for futures or perpetual contract interactions.
119
124
  */
@@ -342,6 +342,7 @@ export interface CallerConfig {
342
342
  }
343
343
  export interface ApiTransactionResponse {
344
344
  txKind: SerializedTransaction;
345
+ sponsorSignature?: string;
345
346
  }
346
347
  export interface SdkTransactionResponse {
347
348
  tx: Transaction;
@@ -1 +1 @@
1
- {"version":3,"file":"generalTypes.d.ts","sourceRoot":"","sources":["../../../src/general/types/generalTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,gBAAgB,EAChB,OAAO,EACP,2BAA2B,EAC3B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC;AAE7B;;;GAGG;AACH,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC;AAC5B,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC;AAEnC;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC;AAE/B;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC;AAE/B;;GAEG;AACH,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AAM,MAAM,oBAAoB,GAAG,qBAAqB,CAAC,MAAM,CAAC,CAAC;AAEjE;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,oBAAoB,GAAG;IAC7D;;OAEG;IACH,aAAa,EAAE,UAAU,CAAC;CAC1B,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAChD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC5B;;OAEG;IACH,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,sBAAsB;IACtC,MAAM,EAAE,qBAAqB,CAAC;IAC9B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,sBAAsB;IACtC,EAAE,EAAE,WAAW,CAAC;CAChB"}
@@ -2,6 +2,7 @@ import { Transaction } from "@mysten/sui/transactions";
2
2
  import { ApiEventsBody, ApiIndexerEventsBody, CallerConfig, EventsWithCursor, IndexerEventsWithCursor, SerializedTransaction, SuiAddress, UniqueId, Url } from "../../types";
3
3
  type ResponseWithTxKind = {
4
4
  txKind: SerializedTransaction;
5
+ sponsorSignature?: string;
5
6
  } & (Record<string, unknown> | {});
6
7
  export declare class Caller {
7
8
  readonly config: CallerConfig;
@@ -1 +1 @@
1
- {"version":3,"file":"caller.d.ts","sourceRoot":"","sources":["../../../src/general/utils/caller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EACN,aAAa,EACb,oBAAoB,EACpB,YAAY,EACZ,gBAAgB,EAChB,uBAAuB,EACvB,qBAAqB,EACrB,UAAU,EAEV,QAAQ,EACR,GAAG,EACH,MAAM,aAAa,CAAC;AAGrB,KAAK,kBAAkB,GAAG;IAAE,MAAM,EAAE,qBAAqB,CAAA;CAAE,GAAG,CA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AAK,IAAI,CAAC;KACnC;;sBAsDqB,gBAAgB;;;CAuBtC"}
@@ -134,7 +134,9 @@ class Caller {
134
134
  fetchApiTxObject(url, body, signal, options) {
135
135
  return __awaiter(this, void 0, void 0, function* () {
136
136
  const response = yield this.fetchApi(url, body, signal, options);
137
- const tx = transactions_1.Transaction.fromKind(response.txKind);
137
+ const tx = response.sponsorSignature
138
+ ? transactions_1.Transaction.from(response.txKind)
139
+ : transactions_1.Transaction.fromKind(response.txKind);
138
140
  if (body === null || body === void 0 ? void 0 : body.walletAddress) {
139
141
  tx.setSender(body.walletAddress);
140
142
  }
@@ -0,0 +1,144 @@
1
+ import { Transaction } from "@mysten/sui/transactions";
2
+ import { AftermathApi } from "../../general/providers";
3
+ import { Caller } from "../../general/utils/caller";
4
+ import { CallerConfig, SdkTransactionResponse } from "../../types";
5
+ import type { ApiGasPoolBody, ApiGasPoolCreateBody, ApiGasPoolCreateResponse, ApiGasPoolDepositBody, ApiGasPoolGrantBody, ApiGasPoolResponse, ApiGasPoolRevokeBody, ApiGasPoolShareBody, ApiGasPoolSponsorBody, ApiGasPoolWithdrawBody, ApiGasPoolWithdrawResponse } from "./gasPoolsTypes";
6
+ /**
7
+ * The `GasPools` class provides methods for interacting with shared gas pool
8
+ * endpoints on the Aftermath platform. This includes querying pool details
9
+ * and building transactions for creating, depositing into, withdrawing from,
10
+ * sponsoring, granting access to, and revoking access from gas pools.
11
+ *
12
+ * @example
13
+ * ```typescript
14
+ * const gasPools = new GasPools({ network: "MAINNET" });
15
+ *
16
+ * // Get gas pool details
17
+ * const pool = await gasPools.getPool({
18
+ * walletAddress: "0x..."
19
+ * });
20
+ *
21
+ * // Build a deposit transaction
22
+ * const { tx } = await gasPools.getDepositTx({
23
+ * walletAddress: "0x...",
24
+ * depositAmount: 100_000_000n
25
+ * });
26
+ * ```
27
+ */
28
+ export declare class GasPools extends Caller {
29
+ readonly Provider?: AftermathApi | undefined;
30
+ constructor(config?: CallerConfig, Provider?: AftermathApi | undefined);
31
+ /**
32
+ * Fetches the gas pool details for a given wallet address.
33
+ *
34
+ * @param inputs - {@link ApiGasPoolBody}
35
+ * @returns {@link ApiGasPoolResponse} containing pool ID, balance, and whitelisted addresses.
36
+ */
37
+ getPool(inputs: ApiGasPoolBody): Promise<ApiGasPoolResponse>;
38
+ /**
39
+ * Builds a transaction to create a new gas pool for the given wallet.
40
+ *
41
+ * When `deferShare` is `true`, the response includes `gasPoolArg` and
42
+ * `sharePolicyArg` so you can compose additional commands (e.g. deposit,
43
+ * grant) before calling {@link getShareTx} to finalize.
44
+ *
45
+ * @param inputs.walletAddress - Wallet address to create the gas pool for.
46
+ * @param inputs.initialDepositAmount - Optional initial deposit amount in MIST.
47
+ * @param inputs.deferShare - When true, returns args without sharing yet.
48
+ * @param inputs.tx - Optional transaction to extend.
49
+ * @returns `tx` plus optional `gasPoolArg` and `sharePolicyArg` when deferred.
50
+ */
51
+ getCreateTx(inputs: Omit<ApiGasPoolCreateBody, "txKind"> & {
52
+ tx?: Transaction;
53
+ }): Promise<Omit<ApiGasPoolCreateResponse, "txKind"> & {
54
+ tx: Transaction;
55
+ }>;
56
+ /**
57
+ * Builds a transaction to deposit into the gas pool.
58
+ *
59
+ * Supports SUI and non-SUI deposits. For non-SUI deposits, the input coin
60
+ * is swapped into SUI via the Aftermath router before depositing.
61
+ *
62
+ * @param inputs.walletAddress - Wallet address submitting the deposit.
63
+ * @param inputs.isSponsoredTx - Whether to build the transaction for sponsored gas. Defaults to false.
64
+ * @param inputs.coinType - Coin type to deposit. Defaults to SUI.
65
+ * @param inputs.amount - Amount to deposit (required when sourcing from wallet or for non-SUI).
66
+ * @param inputs.coinArg - PTB coin argument to use as input (if omitted, sourced from wallet).
67
+ * @param inputs.slippage - Slippage tolerance for non-SUI swaps (defaults to 0.01).
68
+ * @param inputs.gasPoolArg - Optional gas pool argument from a previously-built PTB command.
69
+ * @param inputs.tx - Optional transaction to extend.
70
+ * @returns {@link SdkTransactionResponse} with `tx`.
71
+ */
72
+ getDepositTx(inputs: Omit<ApiGasPoolDepositBody, "txKind"> & {
73
+ tx?: Transaction;
74
+ }): Promise<SdkTransactionResponse>;
75
+ /**
76
+ * Builds a transaction to withdraw SUI from the gas pool.
77
+ *
78
+ * When `deferTransfer` is `true`, the withdrawn coin is not transferred.
79
+ * Instead, `withdrawnCoinArg` is returned for further PTB composition.
80
+ *
81
+ * @param inputs.walletAddress - Wallet address submitting the withdrawal.
82
+ * @param inputs.amount - Amount of SUI to withdraw in MIST.
83
+ * @param inputs.recipientAddress - Optional recipient (defaults to `walletAddress`).
84
+ * @param inputs.deferTransfer - When true, returns the withdrawn coin arg instead of transferring.
85
+ * @param inputs.gasPoolArg - Optional gas pool argument from a previously-built PTB command.
86
+ * @param inputs.tx - Optional transaction to extend.
87
+ * @returns `tx` plus optional `withdrawnCoinArg` when deferred.
88
+ */
89
+ getWithdrawTx(inputs: Omit<ApiGasPoolWithdrawBody, "txKind"> & {
90
+ tx?: Transaction;
91
+ }): Promise<Omit<ApiGasPoolWithdrawResponse, "txKind"> & {
92
+ tx: Transaction;
93
+ }>;
94
+ /**
95
+ * Builds a transaction to sponsor (rebate) the transaction sender
96
+ * using SUI from the gas pool.
97
+ *
98
+ * @param inputs.walletAddress - Wallet address submitting the sponsor transaction.
99
+ * @param inputs.amount - Amount of SUI to rebate in MIST.
100
+ * @param inputs.tx - Optional transaction to extend.
101
+ * @returns {@link SdkTransactionResponse} with `tx`.
102
+ */
103
+ getSponsorTx(inputs: Omit<ApiGasPoolSponsorBody, "txKind"> & {
104
+ tx?: Transaction;
105
+ }): Promise<SdkTransactionResponse>;
106
+ /**
107
+ * Builds a transaction to grant another wallet access to the gas pool.
108
+ *
109
+ * @param inputs.walletAddress - Owner wallet address.
110
+ * @param inputs.targetWalletAddress - Wallet address to grant access to.
111
+ * @param inputs.gasPoolArg - Optional gas pool argument from a previously-built PTB command.
112
+ * @param inputs.tx - Optional transaction to extend.
113
+ * @returns {@link SdkTransactionResponse} with `tx`.
114
+ */
115
+ getGrantTx(inputs: Omit<ApiGasPoolGrantBody, "txKind"> & {
116
+ tx?: Transaction;
117
+ }): Promise<SdkTransactionResponse>;
118
+ /**
119
+ * Builds a transaction to revoke another wallet's access to the gas pool.
120
+ *
121
+ * @param inputs.walletAddress - Owner wallet address.
122
+ * @param inputs.targetWalletAddress - Wallet address to revoke access from.
123
+ * @param inputs.tx - Optional transaction to extend.
124
+ * @returns {@link SdkTransactionResponse} with `tx`.
125
+ */
126
+ getRevokeTx(inputs: Omit<ApiGasPoolRevokeBody, "txKind"> & {
127
+ tx?: Transaction;
128
+ }): Promise<SdkTransactionResponse>;
129
+ /**
130
+ * Builds a transaction to share a gas pool that was created with `deferShare: true`.
131
+ *
132
+ * Use this after composing additional commands (deposit, grant, etc.) with
133
+ * the `gasPoolArg` returned by {@link getCreateTx}.
134
+ *
135
+ * @param inputs.gasPoolArg - Gas pool argument from a deferred create.
136
+ * @param inputs.sharePolicyArg - Share policy argument from a deferred create.
137
+ * @param inputs.tx - Optional transaction to extend.
138
+ * @returns {@link SdkTransactionResponse} with `tx`.
139
+ */
140
+ getShareTx(inputs: Omit<ApiGasPoolShareBody, "txKind"> & {
141
+ tx?: Transaction;
142
+ }): Promise<SdkTransactionResponse>;
143
+ }
144
+ //# sourceMappingURL=gasPools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gasPools.d.ts","sourceRoot":"","sources":["../../../src/packages/gasPools/gasPools.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,WAAW,EAEX,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAEN,YAAY,EACZ,sBAAsB,EAEtB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EACX,cAAc,EACd,oBAAoB,EACpB,wBAAwB,EACxB,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EACl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BAAoB,EAAE,QAAQ,CAAC,GAAG;QAAE,EAAE,CAAC,EAAE,WAAW,CAAA;KAAE,GACjE,OAAO,CAAC,sBAAsB,CAAC;IAkBlC;;;;;;;;;;OAUG;IACU,UAAU,CACtB,MAAM,EAAE,IAAI,CAAC,mBAAmB,EAAE,QAAQ,CAAC,GAAG;QAAE,EAAE,CAAC,EAAE,WAAW,CAAA;KAAE,GAChE,OAAO,CAAC,sBAAsB,CAAC;CAiBlC"}
@@ -0,0 +1,202 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __rest = (this && this.__rest) || function (s, e) {
12
+ var t = {};
13
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
14
+ t[p] = s[p];
15
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
16
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
17
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
18
+ t[p[i]] = s[p[i]];
19
+ }
20
+ return t;
21
+ };
22
+ Object.defineProperty(exports, "__esModule", { value: true });
23
+ exports.GasPools = void 0;
24
+ const caller_1 = require("../../general/utils/caller");
25
+ /**
26
+ * The `GasPools` class provides methods for interacting with shared gas pool
27
+ * endpoints on the Aftermath platform. This includes querying pool details
28
+ * and building transactions for creating, depositing into, withdrawing from,
29
+ * sponsoring, granting access to, and revoking access from gas pools.
30
+ *
31
+ * @example
32
+ * ```typescript
33
+ * const gasPools = new GasPools({ network: "MAINNET" });
34
+ *
35
+ * // Get gas pool details
36
+ * const pool = await gasPools.getPool({
37
+ * walletAddress: "0x..."
38
+ * });
39
+ *
40
+ * // Build a deposit transaction
41
+ * const { tx } = await gasPools.getDepositTx({
42
+ * walletAddress: "0x...",
43
+ * depositAmount: 100_000_000n
44
+ * });
45
+ * ```
46
+ */
47
+ class GasPools extends caller_1.Caller {
48
+ // =========================================================================
49
+ // Constructor
50
+ // =========================================================================
51
+ constructor(config, Provider) {
52
+ super(config, "gas-pool");
53
+ this.Provider = Provider;
54
+ }
55
+ // =========================================================================
56
+ // Pool
57
+ // =========================================================================
58
+ /**
59
+ * Fetches the gas pool details for a given wallet address.
60
+ *
61
+ * @param inputs - {@link ApiGasPoolBody}
62
+ * @returns {@link ApiGasPoolResponse} containing pool ID, balance, and whitelisted addresses.
63
+ */
64
+ getPool(inputs) {
65
+ return __awaiter(this, void 0, void 0, function* () {
66
+ return this.fetchApi("pool", inputs);
67
+ });
68
+ }
69
+ // =========================================================================
70
+ // Transactions
71
+ // =========================================================================
72
+ /**
73
+ * Builds a transaction to create a new gas pool for the given wallet.
74
+ *
75
+ * When `deferShare` is `true`, the response includes `gasPoolArg` and
76
+ * `sharePolicyArg` so you can compose additional commands (e.g. deposit,
77
+ * grant) before calling {@link getShareTx} to finalize.
78
+ *
79
+ * @param inputs.walletAddress - Wallet address to create the gas pool for.
80
+ * @param inputs.initialDepositAmount - Optional initial deposit amount in MIST.
81
+ * @param inputs.deferShare - When true, returns args without sharing yet.
82
+ * @param inputs.tx - Optional transaction to extend.
83
+ * @returns `tx` plus optional `gasPoolArg` and `sharePolicyArg` when deferred.
84
+ */
85
+ getCreateTx(inputs) {
86
+ return __awaiter(this, void 0, void 0, function* () {
87
+ var _a;
88
+ const { tx } = inputs, otherInputs = __rest(inputs, ["tx"]);
89
+ return this.fetchApiTxObject("transactions/create", Object.assign(Object.assign({}, otherInputs), { txKind: yield ((_a = this.Provider) === null || _a === void 0 ? void 0 : _a.Transactions().fetchBase64TxKindFromTx({ tx })) }), undefined, { txKind: true });
90
+ });
91
+ }
92
+ /**
93
+ * Builds a transaction to deposit into the gas pool.
94
+ *
95
+ * Supports SUI and non-SUI deposits. For non-SUI deposits, the input coin
96
+ * is swapped into SUI via the Aftermath router before depositing.
97
+ *
98
+ * @param inputs.walletAddress - Wallet address submitting the deposit.
99
+ * @param inputs.isSponsoredTx - Whether to build the transaction for sponsored gas. Defaults to false.
100
+ * @param inputs.coinType - Coin type to deposit. Defaults to SUI.
101
+ * @param inputs.amount - Amount to deposit (required when sourcing from wallet or for non-SUI).
102
+ * @param inputs.coinArg - PTB coin argument to use as input (if omitted, sourced from wallet).
103
+ * @param inputs.slippage - Slippage tolerance for non-SUI swaps (defaults to 0.01).
104
+ * @param inputs.gasPoolArg - Optional gas pool argument from a previously-built PTB command.
105
+ * @param inputs.tx - Optional transaction to extend.
106
+ * @returns {@link SdkTransactionResponse} with `tx`.
107
+ */
108
+ getDepositTx(inputs) {
109
+ return __awaiter(this, void 0, void 0, function* () {
110
+ var _a;
111
+ const { tx } = inputs, otherInputs = __rest(inputs, ["tx"]);
112
+ return this.fetchApiTxObject("transactions/deposit", Object.assign(Object.assign({}, otherInputs), { txKind: yield ((_a = this.Provider) === null || _a === void 0 ? void 0 : _a.Transactions().fetchBase64TxKindFromTx({ tx })) }), undefined, { txKind: true });
113
+ });
114
+ }
115
+ /**
116
+ * Builds a transaction to withdraw SUI from the gas pool.
117
+ *
118
+ * When `deferTransfer` is `true`, the withdrawn coin is not transferred.
119
+ * Instead, `withdrawnCoinArg` is returned for further PTB composition.
120
+ *
121
+ * @param inputs.walletAddress - Wallet address submitting the withdrawal.
122
+ * @param inputs.amount - Amount of SUI to withdraw in MIST.
123
+ * @param inputs.recipientAddress - Optional recipient (defaults to `walletAddress`).
124
+ * @param inputs.deferTransfer - When true, returns the withdrawn coin arg instead of transferring.
125
+ * @param inputs.gasPoolArg - Optional gas pool argument from a previously-built PTB command.
126
+ * @param inputs.tx - Optional transaction to extend.
127
+ * @returns `tx` plus optional `withdrawnCoinArg` when deferred.
128
+ */
129
+ getWithdrawTx(inputs) {
130
+ return __awaiter(this, void 0, void 0, function* () {
131
+ var _a;
132
+ const { tx } = inputs, otherInputs = __rest(inputs, ["tx"]);
133
+ return this.fetchApiTxObject("transactions/withdraw", Object.assign(Object.assign({}, otherInputs), { txKind: yield ((_a = this.Provider) === null || _a === void 0 ? void 0 : _a.Transactions().fetchBase64TxKindFromTx({ tx })) }), undefined, { txKind: true });
134
+ });
135
+ }
136
+ /**
137
+ * Builds a transaction to sponsor (rebate) the transaction sender
138
+ * using SUI from the gas pool.
139
+ *
140
+ * @param inputs.walletAddress - Wallet address submitting the sponsor transaction.
141
+ * @param inputs.amount - Amount of SUI to rebate in MIST.
142
+ * @param inputs.tx - Optional transaction to extend.
143
+ * @returns {@link SdkTransactionResponse} with `tx`.
144
+ */
145
+ getSponsorTx(inputs) {
146
+ return __awaiter(this, void 0, void 0, function* () {
147
+ var _a;
148
+ const { tx } = inputs, otherInputs = __rest(inputs, ["tx"]);
149
+ return this.fetchApiTxObject("transactions/sponsor", Object.assign(Object.assign({}, otherInputs), { txKind: yield ((_a = this.Provider) === null || _a === void 0 ? void 0 : _a.Transactions().fetchBase64TxKindFromTx({ tx })) }), undefined, { txKind: true });
150
+ });
151
+ }
152
+ /**
153
+ * Builds a transaction to grant another wallet access to the gas pool.
154
+ *
155
+ * @param inputs.walletAddress - Owner wallet address.
156
+ * @param inputs.targetWalletAddress - Wallet address to grant access to.
157
+ * @param inputs.gasPoolArg - Optional gas pool argument from a previously-built PTB command.
158
+ * @param inputs.tx - Optional transaction to extend.
159
+ * @returns {@link SdkTransactionResponse} with `tx`.
160
+ */
161
+ getGrantTx(inputs) {
162
+ return __awaiter(this, void 0, void 0, function* () {
163
+ var _a;
164
+ const { tx } = inputs, otherInputs = __rest(inputs, ["tx"]);
165
+ return this.fetchApiTxObject("transactions/grant", Object.assign(Object.assign({}, otherInputs), { txKind: yield ((_a = this.Provider) === null || _a === void 0 ? void 0 : _a.Transactions().fetchBase64TxKindFromTx({ tx })) }), undefined, { txKind: true });
166
+ });
167
+ }
168
+ /**
169
+ * Builds a transaction to revoke another wallet's access to the gas pool.
170
+ *
171
+ * @param inputs.walletAddress - Owner wallet address.
172
+ * @param inputs.targetWalletAddress - Wallet address to revoke access from.
173
+ * @param inputs.tx - Optional transaction to extend.
174
+ * @returns {@link SdkTransactionResponse} with `tx`.
175
+ */
176
+ getRevokeTx(inputs) {
177
+ return __awaiter(this, void 0, void 0, function* () {
178
+ var _a;
179
+ const { tx } = inputs, otherInputs = __rest(inputs, ["tx"]);
180
+ return this.fetchApiTxObject("transactions/revoke", Object.assign(Object.assign({}, otherInputs), { txKind: yield ((_a = this.Provider) === null || _a === void 0 ? void 0 : _a.Transactions().fetchBase64TxKindFromTx({ tx })) }), undefined, { txKind: true });
181
+ });
182
+ }
183
+ /**
184
+ * Builds a transaction to share a gas pool that was created with `deferShare: true`.
185
+ *
186
+ * Use this after composing additional commands (deposit, grant, etc.) with
187
+ * the `gasPoolArg` returned by {@link getCreateTx}.
188
+ *
189
+ * @param inputs.gasPoolArg - Gas pool argument from a deferred create.
190
+ * @param inputs.sharePolicyArg - Share policy argument from a deferred create.
191
+ * @param inputs.tx - Optional transaction to extend.
192
+ * @returns {@link SdkTransactionResponse} with `tx`.
193
+ */
194
+ getShareTx(inputs) {
195
+ return __awaiter(this, void 0, void 0, function* () {
196
+ var _a;
197
+ const { tx } = inputs, otherInputs = __rest(inputs, ["tx"]);
198
+ return this.fetchApiTxObject("transactions/share", Object.assign(Object.assign({}, otherInputs), { txKind: yield ((_a = this.Provider) === null || _a === void 0 ? void 0 : _a.Transactions().fetchBase64TxKindFromTx({ tx })) }), undefined, { txKind: true });
199
+ });
200
+ }
201
+ }
202
+ exports.GasPools = GasPools;
@@ -0,0 +1,75 @@
1
+ import { Balance, ObjectId, SerializedTransaction, Slippage, SuiAddress } from "../../general/types/generalTypes";
2
+ import { CoinType } from "../coin/coinTypes";
3
+ import { TransactionObjectArgument } from "@mysten/sui/transactions";
4
+ export interface ApiGasPoolBody {
5
+ walletAddress: SuiAddress;
6
+ }
7
+ export interface ApiGasPoolResponse {
8
+ walletAddress: SuiAddress;
9
+ gasPoolId: ObjectId | undefined;
10
+ balance: Balance;
11
+ whitelistedAddresses: SuiAddress[];
12
+ }
13
+ export interface ApiGasPoolCreateBody {
14
+ walletAddress: SuiAddress;
15
+ initialDepositAmount?: Balance;
16
+ txKind?: SerializedTransaction;
17
+ deferShare?: boolean;
18
+ }
19
+ export interface ApiGasPoolCreateResponse {
20
+ txKind: SerializedTransaction;
21
+ gasPoolArg?: TransactionObjectArgument;
22
+ sharePolicyArg?: TransactionObjectArgument;
23
+ }
24
+ export interface ApiGasPoolDepositBody {
25
+ walletAddress: SuiAddress;
26
+ /** Whether to build the transaction for sponsored gas. Defaults to false. */
27
+ isSponsoredTx?: boolean;
28
+ /** Coin type of the deposit token. Defaults to SUI if omitted.
29
+ * When set to a non-SUI type, the endpoint swaps to SUI before depositing. */
30
+ coinType?: CoinType;
31
+ /** Amount of the input coin to deposit (or swap, for non-SUI). */
32
+ amount?: Balance;
33
+ /** PTB coin argument to use as the input coin. If omitted, sourced from wallet. */
34
+ coinArg?: TransactionObjectArgument;
35
+ /** Slippage tolerance for non-SUI swaps (0.0–1.0). Defaults to 0.01. */
36
+ slippage?: Slippage;
37
+ txKind?: SerializedTransaction;
38
+ gasPoolArg?: TransactionObjectArgument;
39
+ }
40
+ export interface ApiGasPoolWithdrawBody {
41
+ walletAddress: SuiAddress;
42
+ amount: Balance;
43
+ recipientAddress?: SuiAddress;
44
+ /** When true, the withdrawn coin is not transferred; its arg is returned instead. */
45
+ deferTransfer?: boolean;
46
+ txKind?: SerializedTransaction;
47
+ gasPoolArg?: TransactionObjectArgument;
48
+ }
49
+ export interface ApiGasPoolWithdrawResponse {
50
+ txKind: SerializedTransaction;
51
+ /** PTB argument for the withdrawn coin (only set when `deferTransfer = true`). */
52
+ withdrawnCoinArg?: TransactionObjectArgument;
53
+ }
54
+ export interface ApiGasPoolSponsorBody {
55
+ walletAddress: SuiAddress;
56
+ amount: Balance;
57
+ txKind?: SerializedTransaction;
58
+ }
59
+ export interface ApiGasPoolGrantBody {
60
+ walletAddress: SuiAddress;
61
+ targetWalletAddress: SuiAddress;
62
+ txKind?: SerializedTransaction;
63
+ gasPoolArg?: TransactionObjectArgument;
64
+ }
65
+ export interface ApiGasPoolRevokeBody {
66
+ walletAddress: SuiAddress;
67
+ targetWalletAddress: SuiAddress;
68
+ txKind?: SerializedTransaction;
69
+ }
70
+ export interface ApiGasPoolShareBody {
71
+ gasPoolArg: TransactionObjectArgument;
72
+ sharePolicyArg: TransactionObjectArgument;
73
+ txKind?: SerializedTransaction;
74
+ }
75
+ //# sourceMappingURL=gasPoolsTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gasPoolsTypes.d.ts","sourceRoot":"","sources":["../../../src/packages/gasPools/gasPoolsTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,OAAO,EACP,QAAQ,EACR,qBAAqB,EACrB,QAAQ,EACR,UAAU,EACV,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAUrE,MAAM,WAAW,cAAc;IAC9B,aAAa,EAAE,UAAU,CAAC;CAC1B;AAED,MAAM,WAAW,kBAAkB;IAClC,aAAa,EAAE,UAAU,CAAC;IAC1B,SAAS,EAAE,QAAQ,GAAG,SAAS,CAAC;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,oBAAoB,EAAE,UAAU,EAAE,CAAC;CACnC;AAUD,MAAM,WAAW,oBAAoB;IACpC,aAAa,EAAE,UAAU,CAAC;IAC1B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,MAAM,CAAC,E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AAC,EAAE,qBAAqB,CAAC;IAC/B,UAAU,CAAC,EAAE,yBAAyB,CAAC;CACvC;AAMD,MAAM,WAAW,oBAAoB;IACpC,aAAa,EAAE,UAAU,CAAC;IAC1B,mBAAmB,EAAE,UAAU,CAAC;IAChC,MAAM,CAAC,EAAE,qBAAqB,CAAC;CAC/B;AAMD,MAAM,WAAW,mBAAmB;IACnC,UAAU,EAAE,yBAAyB,CAAC;IACtC,cAAc,EAAE,yBAAyB,CAAC;IAC1C,MAAM,CAAC,EAAE,qBAAqB,CAAC;CAC/B"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export * from "./gasPools";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/gasPools/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./gasPools"), exports);
@@ -8,6 +8,7 @@ export * from "./nftAmm";
8
8
  export * from "./referralVault";
9
9
  export * from "./farms";
10
10
  export * from "./perpetuals";
11
+ export * from "./gasPools";
11
12
  export * from "./auth";
12
13
  export * from "./sui";
13
14
  export * from "./coin";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/packages/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AAEvB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/packages/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AAEvB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC"}
@@ -24,6 +24,7 @@ __exportStar(require("./nftAmm"), exports);
24
24
  __exportStar(require("./referralVault"), exports);
25
25
  __exportStar(require("./farms"), exports);
26
26
  __exportStar(require("./perpetuals"), exports);
27
+ __exportStar(require("./gasPools"), exports);
27
28
  __exportStar(require("./auth"), exports);
28
29
  __exportStar(require("./sui"), exports);
29
30
  __exportStar(require("./coin"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"multisigApi.d.ts","sourceRoot":"","sources":["../../../../src/packages/multisig/api/multisigApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAGxD,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErE,qBAAa,WAAW;IAWX,OAAO,CAAC,QAAQ,CAAC,QAAQ;IANrC,SAAgB,sBAAsB,EAAE,sBAAsB,CAAC;gBAMlC,QAAQ,EAAE,YAAY;IAc5C,kBAAkB,CAAC,MAAM,EAAE,mBAAmB,GAAG,YAAY;CAuBpE"}
1
+ {"version":3,"file":"multisigApi.d.ts","sourceRoot":"","sources":["../../../../src/packages/multisig/api/multisigApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAGxD,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErE,qBAAa,WAAW;IAWX,OAAO,CAAC,QAAQ,CAAC,QAAQ;IANrC,SAAgB,sBAAsB,EAAE,sBAAsB,CAAC;gBAMlC,QAAQ,EAAE,YAAY;IAc5C,kBAAkB,CAAC,MAAM,EAAE,mBAAmB,GAAG,YAAY;CA+BpE"}
@@ -19,10 +19,14 @@ class MultisigApi {
19
19
  // =========================================================================
20
20
  getMultisigForUser(inputs) {
21
21
  const afPublicKeyBuffer = Buffer.from(this.sharedCustodyAddresses.publicKey || "", "base64");
22
- // MARK: Shifting the first byte
22
+ // MARK: Shifting the first byte (scheme flag)
23
23
  const afPublicKeyArray = new Uint8Array(afPublicKeyBuffer).subarray(1);
24
24
  const afPK = new ed25519_1.Ed25519PublicKey(afPublicKeyArray);
25
- const userPK = new ed25519_1.Ed25519PublicKey(inputs.userPublicKey);
25
+ // MARK: Strip the scheme flag byte from user key if present
26
+ const userPublicKeyArray = new Uint8Array(inputs.userPublicKey);
27
+ const userPK = new ed25519_1.Ed25519PublicKey(userPublicKeyArray.length === 33
28
+ ? userPublicKeyArray.subarray(1)
29
+ : userPublicKeyArray);
26
30
  const newMultiSigPublicKey = multisig_1.MultiSigPublicKey.fromPublicKeys({
27
31
  threshold: 1,
28
32
  publicKeys: [