aftermath-ts-sdk 1.3.29 → 1.3.30-perps.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) 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/packages/gasPools/gasPools.d.ts +115 -0
  9. package/dist/packages/gasPools/gasPools.d.ts.map +1 -0
  10. package/dist/packages/gasPools/gasPools.js +168 -0
  11. package/dist/packages/gasPools/gasPoolsTypes.d.ts +45 -0
  12. package/dist/packages/gasPools/gasPoolsTypes.d.ts.map +1 -0
  13. package/dist/packages/gasPools/gasPoolsTypes.js +2 -0
  14. package/dist/packages/gasPools/index.d.ts +2 -0
  15. package/dist/packages/gasPools/index.d.ts.map +1 -0
  16. package/dist/packages/gasPools/index.js +17 -0
  17. package/dist/packages/index.d.ts +1 -0
  18. package/dist/packages/index.d.ts.map +1 -1
  19. package/dist/packages/index.js +1 -0
  20. package/dist/packages/perpetuals/perpetuals.d.ts +39 -5
  21. package/dist/packages/perpetuals/perpetuals.d.ts.map +1 -1
  22. package/dist/packages/perpetuals/perpetuals.js +47 -17
  23. package/dist/packages/perpetuals/perpetualsAccount.d.ts +53 -1
  24. package/dist/packages/perpetuals/perpetualsAccount.d.ts.map +1 -1
  25. package/dist/packages/perpetuals/perpetualsAccount.js +109 -37
  26. package/dist/packages/perpetuals/perpetualsMarket.d.ts +14 -1
  27. package/dist/packages/perpetuals/perpetualsMarket.d.ts.map +1 -1
  28. package/dist/packages/perpetuals/perpetualsMarket.js +17 -0
  29. package/dist/packages/perpetuals/perpetualsTypes.d.ts +303 -4
  30. package/dist/packages/perpetuals/perpetualsTypes.d.ts.map +1 -1
  31. package/dist/packages/perpetuals/perpetualsVault.d.ts +11 -1
  32. package/dist/packages/perpetuals/perpetualsVault.d.ts.map +1 -1
  33. package/dist/packages/perpetuals/perpetualsVault.js +3 -6
  34. package/dist/types.d.ts +1 -0
  35. package/dist/types.d.ts.map +1 -1
  36. package/dist/types.js +1 -0
  37. 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,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AACrE,OAAO,EAAE,QAAQ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UG;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,EAAE,GAAG,EAAE,MAAM,wBAAwB,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,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AAA;IAYhC;;;;;;;;;;;OAWG;IACU,IAAI,CAAC,MAAM,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,QAAQ,iBAAkD;IAEjE;;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"}
@@ -18,6 +18,7 @@ const farms_1 = require("../../packages/farms/farms");
18
18
  const faucet_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,MAAM,MAAM,IAAI,GAAG,MAAM,CAAC;AAE1B;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC;AAE9B;;GAEG;A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oB,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,CAC3D,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACvB,EAAE,CACJ,CAAC;AAEF,qBAAa,MAAM;aASD,MAAM,EAAE,YAAY;I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/sui/transactions";
2
+ import { AftermathApi } from "../../general/providers";
3
+ import { Caller } from "../../general/utils/caller";
4
+ import { Balance, CallerConfig, SdkTransactionResponse, SuiAddress } from "../../types";
5
+ import type { ApiGasPoolBody, ApiGasPoolCreateBody, ApiGasPoolGrantBody, ApiGasPoolResponse, ApiGasPoolRevokeBody, ApiGasPoolSponsorBody, ApiGasPoolWithdrawBody } 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
+ * @param inputs.walletAddress - Wallet address to create the gas pool for.
42
+ * @param inputs.tx - Optional transaction to extend.
43
+ * @returns {@link SdkTransactionResponse} with `tx`.
44
+ */
45
+ getCreateTx(inputs: Omit<ApiGasPoolCreateBody, "txKind"> & {
46
+ tx?: Transaction;
47
+ }): Promise<SdkTransactionResponse>;
48
+ /**
49
+ * Builds a transaction to deposit SUI into the gas pool.
50
+ *
51
+ * Accepts either a `depositAmount` (the backend selects coins) or a
52
+ * `depositCoinArg` (an existing transaction argument pointing to a coin).
53
+ *
54
+ * @param inputs.walletAddress - Wallet address submitting the deposit.
55
+ * @param inputs.depositAmount - Amount to deposit (mutually exclusive with `depositCoinArg`).
56
+ * @param inputs.depositCoinArg - Existing transaction argument for the coin (mutually exclusive with `depositAmount`).
57
+ * @param inputs.tx - Optional transaction to extend.
58
+ * @returns {@link SdkTransactionResponse} with `tx`.
59
+ */
60
+ getDepositTx(inputs: {
61
+ walletAddress: SuiAddress;
62
+ tx?: Transaction;
63
+ } & ({
64
+ depositCoinArg: TransactionObjectArgument;
65
+ } | {
66
+ depositAmount: Balance;
67
+ })): Promise<SdkTransactionResponse>;
68
+ /**
69
+ * Builds a transaction to withdraw SUI from the gas pool.
70
+ *
71
+ * @param inputs.walletAddress - Wallet address submitting the withdrawal.
72
+ * @param inputs.amount - Amount of SUI to withdraw in MIST.
73
+ * @param inputs.recipientAddress - Optional recipient (defaults to `walletAddress`).
74
+ * @param inputs.tx - Optional transaction to extend.
75
+ * @returns {@link SdkTransactionResponse} with `tx`.
76
+ */
77
+ getWithdrawTx(inputs: Omit<ApiGasPoolWithdrawBody, "txKind"> & {
78
+ tx?: Transaction;
79
+ }): Promise<SdkTransactionResponse>;
80
+ /**
81
+ * Builds a transaction to sponsor (rebate) the transaction sender
82
+ * using SUI from the gas pool.
83
+ *
84
+ * @param inputs.walletAddress - Wallet address submitting the sponsor transaction.
85
+ * @param inputs.amount - Amount of SUI to rebate in MIST.
86
+ * @param inputs.tx - Optional transaction to extend.
87
+ * @returns {@link SdkTransactionResponse} with `tx`.
88
+ */
89
+ getSponsorTx(inputs: Omit<ApiGasPoolSponsorBody, "txKind"> & {
90
+ tx?: Transaction;
91
+ }): Promise<SdkTransactionResponse>;
92
+ /**
93
+ * Builds a transaction to grant another wallet access to the gas pool.
94
+ *
95
+ * @param inputs.walletAddress - Owner wallet address.
96
+ * @param inputs.targetWalletAddress - Wallet address to grant access to.
97
+ * @param inputs.tx - Optional transaction to extend.
98
+ * @returns {@link SdkTransactionResponse} with `tx`.
99
+ */
100
+ getGrantTx(inputs: Omit<ApiGasPoolGrantBody, "txKind"> & {
101
+ tx?: Transaction;
102
+ }): Promise<SdkTransactionResponse>;
103
+ /**
104
+ * Builds a transaction to revoke another wallet's access to the gas pool.
105
+ *
106
+ * @param inputs.walletAddress - Owner wallet address.
107
+ * @param inputs.targetWalletAddress - Wallet address to revoke access from.
108
+ * @param inputs.tx - Optional transaction to extend.
109
+ * @returns {@link SdkTransactionResponse} with `tx`.
110
+ */
111
+ getRevokeTx(inputs: Omit<ApiGasPoolRevokeBody, "txKind"> & {
112
+ tx?: Transaction;
113
+ }): Promise<SdkTransactionResponse>;
114
+ }
115
+ //# 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,EACX,yBAAyB,EACzB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAEN,OAAO,EACP,YAAY,EACZ,sBAAsB,EACtB,UAAU,EACV,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EACX,cAAc,EACd,oBAAoB,EAEpB,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,sBAAsB,EACtB,MAAM,iBAAiB,CAAC;AAEzB;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,QAAS,SAAQ,MAAM;aAOlB,QAAQ,CAAC,EAAE,YAAY;gBADvC,MAAM,CAAC,EAAE,YAAY,EACL,QAAQ,CAAC,EAAE,YAAY,YAAA;IASxC;;;;;OAKG;IACU,OAAO,CAAC,MAAM,EAA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, 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
+ * @param inputs.walletAddress - Wallet address to create the gas pool for.
76
+ * @param inputs.tx - Optional transaction to extend.
77
+ * @returns {@link SdkTransactionResponse} with `tx`.
78
+ */
79
+ getCreateTx(inputs) {
80
+ return __awaiter(this, void 0, void 0, function* () {
81
+ var _a;
82
+ const { tx } = inputs, otherInputs = __rest(inputs, ["tx"]);
83
+ 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 });
84
+ });
85
+ }
86
+ /**
87
+ * Builds a transaction to deposit SUI into the gas pool.
88
+ *
89
+ * Accepts either a `depositAmount` (the backend selects coins) or a
90
+ * `depositCoinArg` (an existing transaction argument pointing to a coin).
91
+ *
92
+ * @param inputs.walletAddress - Wallet address submitting the deposit.
93
+ * @param inputs.depositAmount - Amount to deposit (mutually exclusive with `depositCoinArg`).
94
+ * @param inputs.depositCoinArg - Existing transaction argument for the coin (mutually exclusive with `depositAmount`).
95
+ * @param inputs.tx - Optional transaction to extend.
96
+ * @returns {@link SdkTransactionResponse} with `tx`.
97
+ */
98
+ getDepositTx(inputs) {
99
+ return __awaiter(this, void 0, void 0, function* () {
100
+ var _a;
101
+ const { tx } = inputs, otherInputs = __rest(inputs, ["tx"]);
102
+ 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 });
103
+ });
104
+ }
105
+ /**
106
+ * Builds a transaction to withdraw SUI from the gas pool.
107
+ *
108
+ * @param inputs.walletAddress - Wallet address submitting the withdrawal.
109
+ * @param inputs.amount - Amount of SUI to withdraw in MIST.
110
+ * @param inputs.recipientAddress - Optional recipient (defaults to `walletAddress`).
111
+ * @param inputs.tx - Optional transaction to extend.
112
+ * @returns {@link SdkTransactionResponse} with `tx`.
113
+ */
114
+ getWithdrawTx(inputs) {
115
+ return __awaiter(this, void 0, void 0, function* () {
116
+ var _a;
117
+ const { tx } = inputs, otherInputs = __rest(inputs, ["tx"]);
118
+ 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 });
119
+ });
120
+ }
121
+ /**
122
+ * Builds a transaction to sponsor (rebate) the transaction sender
123
+ * using SUI from the gas pool.
124
+ *
125
+ * @param inputs.walletAddress - Wallet address submitting the sponsor transaction.
126
+ * @param inputs.amount - Amount of SUI to rebate in MIST.
127
+ * @param inputs.tx - Optional transaction to extend.
128
+ * @returns {@link SdkTransactionResponse} with `tx`.
129
+ */
130
+ getSponsorTx(inputs) {
131
+ return __awaiter(this, void 0, void 0, function* () {
132
+ var _a;
133
+ const { tx } = inputs, otherInputs = __rest(inputs, ["tx"]);
134
+ 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 });
135
+ });
136
+ }
137
+ /**
138
+ * Builds a transaction to grant another wallet access to the gas pool.
139
+ *
140
+ * @param inputs.walletAddress - Owner wallet address.
141
+ * @param inputs.targetWalletAddress - Wallet address to grant access to.
142
+ * @param inputs.tx - Optional transaction to extend.
143
+ * @returns {@link SdkTransactionResponse} with `tx`.
144
+ */
145
+ getGrantTx(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/grant", 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 revoke another wallet's access to the gas pool.
154
+ *
155
+ * @param inputs.walletAddress - Owner wallet address.
156
+ * @param inputs.targetWalletAddress - Wallet address to revoke access from.
157
+ * @param inputs.tx - Optional transaction to extend.
158
+ * @returns {@link SdkTransactionResponse} with `tx`.
159
+ */
160
+ getRevokeTx(inputs) {
161
+ return __awaiter(this, void 0, void 0, function* () {
162
+ var _a;
163
+ const { tx } = inputs, otherInputs = __rest(inputs, ["tx"]);
164
+ 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 });
165
+ });
166
+ }
167
+ }
168
+ exports.GasPools = GasPools;
@@ -0,0 +1,45 @@
1
+ import { Balance, ObjectId, SerializedTransaction, SuiAddress } from "../../general/types/generalTypes";
2
+ import { TransactionObjectArgument } from "@mysten/sui/transactions";
3
+ export interface ApiGasPoolBody {
4
+ walletAddress: SuiAddress;
5
+ }
6
+ export interface ApiGasPoolResponse {
7
+ walletAddress: SuiAddress;
8
+ gasPoolId: ObjectId | undefined;
9
+ balance: Balance;
10
+ whitelistedAddresses: SuiAddress[];
11
+ }
12
+ export interface ApiGasPoolCreateBody {
13
+ walletAddress: SuiAddress;
14
+ txKind?: SerializedTransaction;
15
+ }
16
+ export type ApiGasPoolDepositBody = {
17
+ walletAddress: SuiAddress;
18
+ txKind?: SerializedTransaction;
19
+ } & ({
20
+ depositCoinArg: TransactionObjectArgument;
21
+ } | {
22
+ depositAmount: Balance;
23
+ });
24
+ export interface ApiGasPoolWithdrawBody {
25
+ walletAddress: SuiAddress;
26
+ amount: Balance;
27
+ recipientAddress?: SuiAddress;
28
+ txKind?: SerializedTransaction;
29
+ }
30
+ export interface ApiGasPoolSponsorBody {
31
+ walletAddress: SuiAddress;
32
+ amount: Balance;
33
+ txKind?: SerializedTransaction;
34
+ }
35
+ export interface ApiGasPoolGrantBody {
36
+ walletAddress: SuiAddress;
37
+ targetWalletAddress: SuiAddress;
38
+ txKind?: SerializedTransaction;
39
+ }
40
+ export interface ApiGasPoolRevokeBody {
41
+ walletAddress: SuiAddress;
42
+ targetWalletAddress: SuiAddress;
43
+ txKind?: SerializedTransaction;
44
+ }
45
+ //# 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,UAAU,EACV,MAAM,kCAAkC,CAAC;AAC1C,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,MAAM,CAAC,EAAE,qBAAqB,CAAC;CAC/B;AAMD,MAAM,MAAM,qBAAqB,GAAG;IACnC,aAAa,EAAE,UAAU,CAAC;IAC1B,MAAM,CAAC,EAAE,qBAAqB,CAAC;CAC/B,GAAG,CACD;IACA,cAAc,EAAE,yBAAyB,CAAC;CACzC,GACD;IACA,aAAa,EAAE,OAAO,CAAC;CACtB,CACH,CAAC;AAMF,MAAM,WAAW,sBAAsB;IACtC,aAAa,EAAE,UAAU,CAAC;IAC1B,MAAM,EAAE,OAAO,CAAC;IAChB,gBAAgB,CAAC,EAAE,UAAU,CAAC;IAC9B,MAAM,CAAC,EAAE,qBAAqB,CAAC;CAC/B;AAMD,MAAM,WAAW,qBAAqB;IACrC,aAAa,EAAE,UAAU,CAAC;IAC1B,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,qBAAqB,CAAC;CAC/B;AAMD,MAAM,WAAW,mBAAmB;IACnC,aAAa,EAAE,UAAU,CAAC;IAC1B,mBAAmB,EAAE,UAAU,CAAC;IAChC,MAAM,CAAC,EAAE,qBAAqB,CAAC;CAC/B;AAMD,MAAM,WAAW,oBAAoB;IACpC,aAAa,EAAE,UAAU,CAAC;IAC1B,mBAAmB,EAAE,UAAU,CAAC;IAChC,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,5 +1,5 @@
1
1
  import { Caller } from "../../general/utils/caller";
2
- import { PerpetualsMarketId, ApiPerpetualsOwnedAccountCapsBody, PerpetualsOrderSide, CoinType, PerpetualsOrderId, FilledTakerOrderEvent, ApiPerpetualsMarketCandleHistoryResponse, PerpetualsAccountCap, PerpetualsAccountId, CallerConfig, SuiAddress, ObjectId, ApiPerpetualsMarkets24hrStatsResponse, ApiPerpetualsAdminAccountCapsBody, Percentage, Balance, ApiPerpetualsVaultOwnedWithdrawRequestsBody, PerpetualsOrderPrice, ApiTransactionResponse, PerpetualsWsUpdatesResponseMessage, PerpetualsWsCandleResponseMessage, ApiPerpetualsCreateVaultCapBody, PerpetualsPartialVaultCap, ApiPerpetualsMarketCandleHistoryBody, ApiPerpetualsAdminAccountCapsResponse, ApiPerpetualsOwnedAccountCapsResponse, ApiPerpetualsAccountPositionsResponse, ApiPerpetualsAccountPositionsBody, ApiPerpetualsMarketsPricesResponse, ApiPerpetualsVaultLpCoinPricesResponse, ApiPerpetualsVaultLpCoinPricesBody, ApiPerpetualsVaultOwnedLpCoinsResponse, ApiPerpetualsVaultOwnedLpCoinsBody, ApiPerpetualsOwnedVaultCapsBody, ApiPerpetualsOwnedVaultCapsResponse, ApiPerpetualsVaultOwnedWithdrawRequestsResponse, SdkTransactionResponse, ApiPerpetualsBuilderCodesCreateIntegratorConfigTxBody, ApiPerpetualsBuilderCodesCreateIntegratorVaultTxBody, ApiPerpetualsBuilderCodesClaimIntegratorVaultFeesTxBody, ApiPerpetualsBuilderCodesClaimIntegratorVaultFeesTxResponse, ApiPerpetualsBuilderCodesIntegratorConfigBody, ApiPerpetualsBuilderCodesIntegratorConfigResponse, ApiPerpetualsBuilderCodesIntegratorVaultsBody, ApiPerpetualsBuilderCodesIntegratorVaultsResponse, ApiPerpetualsBuilderCodesRemoveIntegratorConfigTxBody } from "../../types";
2
+ import { PerpetualsMarketId, ApiPerpetualsOwnedAccountCapsBody, PerpetualsOrderSide, CoinType, PerpetualsOrderId, FilledTakerOrderEvent, ApiPerpetualsMarketCandleHistoryResponse, PerpetualsAccountCap, PerpetualsAccountId, CallerConfig, SuiAddress, ObjectId, ApiPerpetualsMarkets24hrStatsResponse, ApiPerpetualsAdminAccountCapsBody, Percentage, Balance, ApiPerpetualsVaultOwnedWithdrawRequestsBody, PerpetualsOrderPrice, ApiTransactionResponse, PerpetualsWsUpdatesResponseMessage, PerpetualsWsCandleResponseMessage, ApiPerpetualsCreateVaultCapBody, PerpetualsPartialVaultCap, ApiPerpetualsMarketCandleHistoryBody, ApiPerpetualsAdminAccountCapsResponse, ApiPerpetualsOwnedAccountCapsResponse, ApiPerpetualsAccountPositionsResponse, ApiPerpetualsAccountPositionsBody, ApiPerpetualsMarketsPricesResponse, ApiPerpetualsVaultLpCoinPricesResponse, ApiPerpetualsVaultLpCoinPricesBody, ApiPerpetualsVaultOwnedLpCoinsResponse, ApiPerpetualsVaultOwnedLpCoinsBody, ApiPerpetualsOwnedVaultCapsBody, ApiPerpetualsOwnedVaultCapsResponse, ApiPerpetualsVaultOwnedWithdrawRequestsResponse, SdkTransactionResponse, ApiPerpetualsBuilderCodesCreateIntegratorConfigTxBody, ApiPerpetualsBuilderCodesCreateIntegratorVaultTxBody, ApiPerpetualsBuilderCodesClaimIntegratorVaultFeesTxBody, ApiPerpetualsBuilderCodesClaimIntegratorVaultFeesTxResponse, ApiPerpetualsBuilderCodesIntegratorConfigBody, ApiPerpetualsBuilderCodesIntegratorConfigResponse, ApiPerpetualsBuilderCodesIntegratorVaultsBody, ApiPerpetualsBuilderCodesIntegratorVaultsResponse, ApiPerpetualsBuilderCodesRemoveIntegratorConfigTxBody, PerpetualsSponsorConfig, ApiPerpetualsCurrentRebateRewardsBody, ApiPerpetualsCurrentRebateRewardsResponse } from "../../types";
3
3
  import { PerpetualsMarket } from "./perpetualsMarket";
4
4
  import { PerpetualsAccount } from "./perpetualsAccount";
5
5
  import { PerpetualsOrderUtils } from "./utils";
@@ -364,6 +364,7 @@ export declare class Perpetuals extends Caller {
364
364
  getTransferCapTx(inputs: {
365
365
  recipientAddress: SuiAddress;
366
366
  capObjectId: ObjectId;
367
+ sponsor?: PerpetualsSponsorConfig;
367
368
  tx?: Transaction;
368
369
  }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
369
370
  tx: Transaction;
@@ -381,6 +382,7 @@ export declare class Perpetuals extends Caller {
381
382
  getCreateAccountTx(inputs: {
382
383
  walletAddress: SuiAddress;
383
384
  collateralCoinType: CoinType;
385
+ sponsor?: PerpetualsSponsorConfig;
384
386
  tx?: Transaction;
385
387
  }): Promise<SdkTransactionResponse>;
386
388
  /**
@@ -450,6 +452,7 @@ export declare class Perpetuals extends Caller {
450
452
  lockPeriodMs: bigint;
451
453
  performanceFeePercentage: Percentage;
452
454
  forceWithdrawDelayMs: bigint;
455
+ sponsor?: PerpetualsSponsorConfig;
453
456
  tx?: Transaction;
454
457
  isSponsoredTx?: boolean;
455
458
  } & ({
@@ -459,6 +462,29 @@ export declare class Perpetuals extends Caller {
459
462
  })): Promise<Omit<ApiTransactionResponse, "txKind"> & {
460
463
  tx: Transaction;
461
464
  }>;
465
+ /**
466
+ * Calculate rewards and rebates for one or more perpetuals accounts.
467
+ *
468
+ * Computes per-account maker and taker reward allocations, fee-tier rebates,
469
+ * and volume-based metrics. When `accountIds` is omitted or empty, all eligible
470
+ * accounts are included.
471
+ *
472
+ * **Note:** All data returned is for the current epoch only.
473
+ *
474
+ * @param inputs.totalMakerRewards - Total maker reward pool to distribute.
475
+ * @param inputs.totalTakerRewards - Total taker reward pool to distribute.
476
+ * @param inputs.accountIds - Optional list of account IDs.
477
+ * @returns {@link ApiPerpetualsCurrentRebateRewardsResponse} with per-account reward and rebate data.
478
+ *
479
+ * @example
480
+ * ```ts
481
+ * const { totalQScoreFinal, rewards } = await perps.getCurrentRebateRewards({
482
+ * totalMakerRewards: 10000,
483
+ * totalTakerRewards: 5000,
484
+ * });
485
+ * ```
486
+ */
487
+ getCurrentRebateRewards(inputs: ApiPerpetualsCurrentRebateRewardsBody): Promise<ApiPerpetualsCurrentRebateRewardsResponse>;
462
488
  /**
463
489
  * Build a transaction to create an integrator configuration.
464
490
  *
@@ -481,7 +507,9 @@ export declare class Perpetuals extends Caller {
481
507
  * });
482
508
  * ```
483
509
  */
484
- getCreateBuilderCodeIntegratorConfigTx(inputs: ApiPerpetualsBuilderCodesCreateIntegratorConfigTxBody): Promise<Omit<ApiTransactionResponse, "txKind"> & {
510
+ getCreateBuilderCodeIntegratorConfigTx(inputs: Omit<ApiPerpetualsBuilderCodesCreateIntegratorConfigTxBody, "txKind"> & {
511
+ tx?: Transaction;
512
+ }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
485
513
  tx: Transaction;
486
514
  }>;
487
515
  /**
@@ -506,7 +534,9 @@ export declare class Perpetuals extends Caller {
506
534
  * });
507
535
  * ```
508
536
  */
509
- getRemoveBuilderCodeIntegratorConfigTx(inputs: ApiPerpetualsBuilderCodesRemoveIntegratorConfigTxBody): Promise<Omit<ApiTransactionResponse, "txKind"> & {
537
+ getRemoveBuilderCodeIntegratorConfigTx(inputs: Omit<ApiPerpetualsBuilderCodesRemoveIntegratorConfigTxBody, "txKind"> & {
538
+ tx?: Transaction;
539
+ }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
510
540
  tx: Transaction;
511
541
  }>;
512
542
  /**
@@ -531,7 +561,9 @@ export declare class Perpetuals extends Caller {
531
561
  * });
532
562
  * ```
533
563
  */
534
- getCreateBuilderCodeIntegratorVaultTx(inputs: ApiPerpetualsBuilderCodesCreateIntegratorVaultTxBody): Promise<Omit<ApiTransactionResponse, "txKind"> & {
564
+ getCreateBuilderCodeIntegratorVaultTx(inputs: Omit<ApiPerpetualsBuilderCodesCreateIntegratorVaultTxBody, "txKind"> & {
565
+ tx?: Transaction;
566
+ }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
535
567
  tx: Transaction;
536
568
  }>;
537
569
  /**
@@ -570,7 +602,9 @@ export declare class Perpetuals extends Caller {
570
602
  * // response.coinOutArg can be used in subsequent transaction commands
571
603
  * ```
572
604
  */
573
- getClaimBuilderCodeIntegratorVaultFeesTx(inputs: ApiPerpetualsBuilderCodesClaimIntegratorVaultFeesTxBody): Promise<Omit<ApiPerpetualsBuilderCodesClaimIntegratorVaultFeesTxResponse, "txKind"> & {
605
+ getClaimBuilderCodeIntegratorVaultFeesTx(inputs: Omit<ApiPerpetualsBuilderCodesClaimIntegratorVaultFeesTxBody, "txKind"> & {
606
+ tx?: Transaction;
607
+ }): Promise<Omit<ApiPerpetualsBuilderCodesClaimIntegratorVaultFeesTxResponse, "txKind"> & {
574
608
  tx: Transaction;
575
609
  }>;
576
610
  /**