@7kprotocol/sdk-ts 3.4.2-beta.4 → 3.4.2-beta.5
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.
- package/README.md +151 -4
- package/lib/cjs/constants/_7k.js +5 -1
- package/lib/cjs/constants/sui.js +4 -0
- package/lib/cjs/features/metaAg/index.js +243 -0
- package/lib/cjs/features/metaAg/providers/bluefin.js +69 -0
- package/lib/cjs/features/metaAg/providers/cetus.js +67 -0
- package/lib/cjs/features/metaAg/providers/flowx.js +56 -0
- package/lib/cjs/index.js +6 -1
- package/lib/cjs/types/constants/_7k.d.ts +4 -0
- package/lib/cjs/types/constants/_7k.d.ts.map +1 -1
- package/lib/cjs/types/constants/sui.d.ts +2 -0
- package/lib/cjs/types/constants/sui.d.ts.map +1 -0
- package/lib/cjs/types/features/metaAg/index.d.ts +28 -0
- package/lib/cjs/types/features/metaAg/index.d.ts.map +1 -0
- package/lib/cjs/types/features/metaAg/providers/bluefin.d.ts +11 -0
- package/lib/cjs/types/features/metaAg/providers/bluefin.d.ts.map +1 -0
- package/lib/cjs/types/features/metaAg/providers/cetus.d.ts +13 -0
- package/lib/cjs/types/features/metaAg/providers/cetus.d.ts.map +1 -0
- package/lib/cjs/types/features/metaAg/providers/flowx.d.ts +14 -0
- package/lib/cjs/types/features/metaAg/providers/flowx.d.ts.map +1 -0
- package/lib/cjs/types/index.d.ts +4 -1
- package/lib/cjs/types/index.d.ts.map +1 -1
- package/lib/cjs/types/metaAg.js +12 -0
- package/lib/cjs/types/types/metaAg.d.ts +127 -0
- package/lib/cjs/types/types/metaAg.d.ts.map +1 -0
- package/lib/cjs/types/utils/ObjectCache.d.ts +87 -0
- package/lib/cjs/types/utils/ObjectCache.d.ts.map +1 -0
- package/lib/cjs/types/utils/SuiClientUtils.d.ts +15 -0
- package/lib/cjs/types/utils/SuiClientUtils.d.ts.map +1 -0
- package/lib/cjs/types/utils/condition.d.ts +2 -0
- package/lib/cjs/types/utils/condition.d.ts.map +1 -0
- package/lib/cjs/utils/ObjectCache.js +273 -0
- package/lib/cjs/utils/SuiClientUtils.js +50 -0
- package/lib/cjs/utils/condition.js +8 -0
- package/lib/esm/constants/_7k.js +4 -0
- package/lib/esm/constants/sui.js +1 -0
- package/lib/esm/features/metaAg/index.js +209 -0
- package/lib/esm/features/metaAg/providers/bluefin.js +67 -0
- package/lib/esm/features/metaAg/providers/cetus.js +66 -0
- package/lib/esm/features/metaAg/providers/flowx.js +56 -0
- package/lib/esm/index.mjs +5 -1
- package/lib/esm/types/constants/_7k.d.ts +4 -0
- package/lib/esm/types/constants/_7k.d.ts.map +1 -1
- package/lib/esm/types/constants/sui.d.ts +2 -0
- package/lib/esm/types/constants/sui.d.ts.map +1 -0
- package/lib/esm/types/features/metaAg/index.d.ts +28 -0
- package/lib/esm/types/features/metaAg/index.d.ts.map +1 -0
- package/lib/esm/types/features/metaAg/providers/bluefin.d.ts +11 -0
- package/lib/esm/types/features/metaAg/providers/bluefin.d.ts.map +1 -0
- package/lib/esm/types/features/metaAg/providers/cetus.d.ts +13 -0
- package/lib/esm/types/features/metaAg/providers/cetus.d.ts.map +1 -0
- package/lib/esm/types/features/metaAg/providers/flowx.d.ts +14 -0
- package/lib/esm/types/features/metaAg/providers/flowx.d.ts.map +1 -0
- package/lib/esm/types/index.d.ts +4 -1
- package/lib/esm/types/index.d.ts.map +1 -1
- package/lib/esm/types/metaAg.js +8 -0
- package/lib/esm/types/types/metaAg.d.ts +127 -0
- package/lib/esm/types/types/metaAg.d.ts.map +1 -0
- package/lib/esm/types/utils/ObjectCache.d.ts +87 -0
- package/lib/esm/types/utils/ObjectCache.d.ts.map +1 -0
- package/lib/esm/types/utils/SuiClientUtils.d.ts +15 -0
- package/lib/esm/types/utils/SuiClientUtils.d.ts.map +1 -0
- package/lib/esm/types/utils/condition.d.ts +2 -0
- package/lib/esm/types/utils/condition.d.ts.map +1 -0
- package/lib/esm/utils/ObjectCache.js +250 -0
- package/lib/esm/utils/SuiClientUtils.js +34 -0
- package/lib/esm/utils/condition.js +5 -0
- package/package.json +8 -1
package/README.md
CHANGED
|
@@ -6,13 +6,61 @@
|
|
|
6
6
|
npm i @7kprotocol/sdk-ts
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
### Peer Dependencies
|
|
10
|
+
|
|
11
|
+
This package has peer dependencies that are required for core functionality:
|
|
12
|
+
|
|
13
|
+
| Package | Version | Purpose | Required For |
|
|
14
|
+
| -------------------------- | --------- | ---------------------------- | ------------------ |
|
|
15
|
+
| `@mysten/sui` | `^1.39.0` | Sui blockchain interaction | Core functionality |
|
|
16
|
+
| `@pythnetwork/pyth-sui-js` | `^2.2.0` | Pyth price feeds integration | Price feeds |
|
|
17
|
+
|
|
18
|
+
**Required peer dependencies:**
|
|
11
19
|
|
|
12
20
|
```bash
|
|
13
|
-
npm i @pythnetwork/pyth-sui-js
|
|
21
|
+
npm i @mysten/sui@^1.39.0 @pythnetwork/pyth-sui-js@^2.2.0
|
|
14
22
|
```
|
|
15
23
|
|
|
24
|
+
### Optional Dependencies (for MetaAg providers)
|
|
25
|
+
|
|
26
|
+
The following dependencies are **optional** and only needed for specific MetaAg
|
|
27
|
+
providers:
|
|
28
|
+
|
|
29
|
+
| Package | Version | Provider |
|
|
30
|
+
| ------------------------------- | --------- | --------------------- |
|
|
31
|
+
| `@flowx-finance/sdk` | `^1.13.8` | Flowx MetaAg provider |
|
|
32
|
+
| `@cetusprotocol/aggregator-sdk` | `^1.4.1` | Cetus MetaAg provider |
|
|
33
|
+
|
|
34
|
+
**Note**: The Bluefin7K MetaAg provider is built-in and requires no additional
|
|
35
|
+
dependencies.
|
|
36
|
+
|
|
37
|
+
To use Flowx or Cetus providers, install their respective dependencies:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
# For Flowx MetaAg provider
|
|
41
|
+
npm i @flowx-finance/sdk@^1.13.8
|
|
42
|
+
|
|
43
|
+
# For Cetus MetaAg provider
|
|
44
|
+
npm i @cetusprotocol/aggregator-sdk@^1.4.1
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Graceful Degradation
|
|
48
|
+
|
|
49
|
+
The SDK is designed to work gracefully even when optional dependencies are
|
|
50
|
+
missing:
|
|
51
|
+
|
|
52
|
+
- **Missing `@flowx-finance/sdk`**: Flowx MetaAg provider will not be available,
|
|
53
|
+
and a helpful warning with installation instructions will be shown
|
|
54
|
+
- **Missing `@cetusprotocol/aggregator-sdk`**: Cetus MetaAg provider will not be
|
|
55
|
+
available, and a helpful warning with installation instructions will be shown
|
|
56
|
+
- **Missing `@mysten/sui`**: Core functionality will fail (this is required)
|
|
57
|
+
|
|
58
|
+
The SDK will provide clear error messages and installation instructions when
|
|
59
|
+
optional dependencies are missing.
|
|
60
|
+
|
|
61
|
+
**Note**: The Bluefin7K provider works out-of-the-box with no additional
|
|
62
|
+
dependencies.
|
|
63
|
+
|
|
16
64
|
## Usage
|
|
17
65
|
|
|
18
66
|
You can import the entire SDK as a module:
|
|
@@ -103,13 +151,112 @@ See [Limit Orders](docs/LIMIT.md).
|
|
|
103
151
|
|
|
104
152
|
See [DCA Orders](docs/DCA.md).
|
|
105
153
|
|
|
154
|
+
## MetaAg (Multi-Provider Aggregation)
|
|
155
|
+
|
|
156
|
+
The MetaAg feature allows you to aggregate quotes from multiple DEX Aggregator
|
|
157
|
+
providers. By default, all available providers are enabled. You can optionally
|
|
158
|
+
configure specific providers or install optional dependencies to enable
|
|
159
|
+
additional providers.
|
|
160
|
+
|
|
161
|
+
### Using Default Providers
|
|
162
|
+
|
|
163
|
+
The Bluefin7K provider is built-in and works without additional dependencies:
|
|
164
|
+
|
|
165
|
+
```typescript
|
|
166
|
+
import { MetaAg, EProvider } from "@7kprotocol/sdk-ts";
|
|
167
|
+
|
|
168
|
+
const metaAg = new MetaAg();
|
|
169
|
+
|
|
170
|
+
// Get quotes from all available providers
|
|
171
|
+
const quotes = await metaAg.quote({
|
|
172
|
+
amountIn: "1000000000", // 1 SUI (9 decimals)
|
|
173
|
+
coinInType:
|
|
174
|
+
"0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI",
|
|
175
|
+
coinOutType:
|
|
176
|
+
"0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC",
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
// Find the best quote
|
|
180
|
+
const bestQuote = quotes.reduce((best, current) =>
|
|
181
|
+
Number(current.amountOut) > Number(best.amountOut) ? current : best
|
|
182
|
+
);
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
### Configuring Specific Providers
|
|
186
|
+
|
|
187
|
+
You can configure specific providers and their options:
|
|
188
|
+
|
|
189
|
+
```typescript
|
|
190
|
+
const metaAg = new MetaAg({
|
|
191
|
+
providers: {
|
|
192
|
+
[EProvider.BLUEFIN7K]: {
|
|
193
|
+
apiKey: "your-bluefin-api-key", // Optional
|
|
194
|
+
},
|
|
195
|
+
[EProvider.FLOWX]: {
|
|
196
|
+
apiKey: "your-flowx-api-key", // Optional
|
|
197
|
+
},
|
|
198
|
+
[EProvider.CETUS]: {
|
|
199
|
+
apiKey: "your-cetus-api-key", // Optional
|
|
200
|
+
},
|
|
201
|
+
},
|
|
202
|
+
});
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
**Note**: To use Flowx or Cetus providers, you must install their respective
|
|
206
|
+
optional dependencies. See the
|
|
207
|
+
[Optional Dependencies](#optional-dependencies-for-metaag-providers) section
|
|
208
|
+
above.
|
|
209
|
+
|
|
210
|
+
### Sponsored Transactions
|
|
211
|
+
|
|
212
|
+
When building sponsored transactions, `tx.gas` can not be used for swap.
|
|
213
|
+
|
|
214
|
+
**Important considerations:**
|
|
215
|
+
|
|
216
|
+
1. **Gas coin usage**: Set `useGasCoin: false` when creating your coin input
|
|
217
|
+
object to prevent the SDK from trying to use `tx.gas`.
|
|
218
|
+
|
|
219
|
+
2. **Pyth oracle dependencies**: Transactions that use the gas coin cannot be
|
|
220
|
+
sponsored because Pyth oracle fees are paid from `tx.gas`. Exclude DEX
|
|
221
|
+
sources that depend on Pyth oracles.
|
|
222
|
+
|
|
223
|
+
**Example configuration:**
|
|
224
|
+
|
|
225
|
+
```typescript
|
|
226
|
+
import { MetaAg, EProvider } from "@7kprotocol/sdk-ts";
|
|
227
|
+
import { coinWithBalance } from "@mysten/sui/transactions";
|
|
228
|
+
import { Protocol } from "@flowx-finance/sdk"; // Required for Flowx sources
|
|
229
|
+
import { CETUS, BLUEFIN } from "@cetusprotocol/aggregator-sdk
|
|
230
|
+
|
|
231
|
+
const metaAg = new MetaAg({
|
|
232
|
+
providers: {
|
|
233
|
+
[EProvider.BLUEFIN7K]: {
|
|
234
|
+
sources: ["cetus", "bluefin"], // Excludes Pyth oracle-based DEX
|
|
235
|
+
},
|
|
236
|
+
[EProvider.FLOWX]: {
|
|
237
|
+
sources: [Protocol.BLUEFIN, Protocol.CETUS, Protocol.FLOWX_V3],
|
|
238
|
+
},
|
|
239
|
+
[EProvider.CETUS]: {
|
|
240
|
+
sources: [CETUS, BLUEFIN],
|
|
241
|
+
},
|
|
242
|
+
},
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
// Create coin input WITHOUT using the gas coin
|
|
246
|
+
const coinIn = coinWithBalance({
|
|
247
|
+
balance: 1000000000n, // 1 SUI
|
|
248
|
+
type: "0x2::sui::SUI",
|
|
249
|
+
useGasCoin: false, // Important: must be false for sponsored transactions
|
|
250
|
+
});
|
|
251
|
+
```
|
|
252
|
+
|
|
106
253
|
## Prices
|
|
107
254
|
|
|
108
255
|
```typescript
|
|
109
256
|
import { getTokenPrice, getTokenPrices, getSuiPrice } from "@7kprotocol/sdk-ts";
|
|
110
257
|
|
|
111
258
|
const tokenPrice = await getTokenPrice(
|
|
112
|
-
"0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC"
|
|
259
|
+
"0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC"
|
|
113
260
|
);
|
|
114
261
|
|
|
115
262
|
const tokenPrices = await getTokenPrices([
|
package/lib/cjs/constants/_7k.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports._7K_VAULT = exports._7K_CONFIG = exports._7K_PACKAGE_ID = void 0;
|
|
3
|
+
exports._7K_META_CONFIG = exports._7K_META_VAULT = exports._7K_META_PACKAGE_ID = exports._7K_META_PUBLISHED_AT = exports._7K_VAULT = exports._7K_CONFIG = exports._7K_PACKAGE_ID = void 0;
|
|
4
4
|
exports._7K_PACKAGE_ID = "0x62412b7268c35f3808336aee57a52836501f40b8ba5d936f8ad275e672befd04";
|
|
5
5
|
//legacy V4: "0xe8f996ea6ff38c557c253d3b93cfe2ebf393816487266786371aa4532a9229f2";
|
|
6
6
|
//legacy V3: "0x7ea6e27ad7af6f3b8671d59df1aaebd7c03dddab893e52a714227b2f4fe91519";
|
|
@@ -10,3 +10,7 @@ exports._7K_CONFIG = "0x47442a93f7727d188ba7cb71031170d1786af70013cb7ad5115f3fe8
|
|
|
10
10
|
//legacy v3: "0x0f8fc23dbcc9362b72c7a4c5aa53fcefa02ebfbb83a812c8c262ccd2c076d9ee";
|
|
11
11
|
exports._7K_VAULT = "0x442ad50389ed5cda6f7a6f5a7ae6361a4c05ef1d9fb2e54fbba5a268d690bfe6";
|
|
12
12
|
//legacy v3: "0x39a3c55742c0e011b6f65548e73cf589e1ae5e82dbfab449ca57f24c3bcd9514";
|
|
13
|
+
exports._7K_META_PUBLISHED_AT = "0x17c0b1f7a6ad73f51268f16b8c06c049eecc2f28a270cdd29c06e3d2dea23302";
|
|
14
|
+
exports._7K_META_PACKAGE_ID = "0x17c0b1f7a6ad73f51268f16b8c06c049eecc2f28a270cdd29c06e3d2dea23302";
|
|
15
|
+
exports._7K_META_VAULT = "0x9a8abd32fe5721307ce3b697cf982ee84e9ffbd58d667a4a199f1683c1a3d23c";
|
|
16
|
+
exports._7K_META_CONFIG = "0xbbb3a51877ed9b492f26f4e2181811cfb2bd70c532f6f7621263d122d5e96b56";
|
|
@@ -0,0 +1,243 @@
|
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.MetaAg = void 0;
|
|
37
|
+
const client_1 = require("@mysten/sui/client");
|
|
38
|
+
const transactions_1 = require("@mysten/sui/transactions");
|
|
39
|
+
const _7k_1 = require("../../constants/_7k");
|
|
40
|
+
const sui_1 = require("../../constants/sui");
|
|
41
|
+
const metaAg_1 = require("../../types/metaAg");
|
|
42
|
+
const condition_1 = require("../../utils/condition");
|
|
43
|
+
const SuiClientUtils_1 = require("../../utils/SuiClientUtils");
|
|
44
|
+
const buildTx_1 = require("../swap/buildTx");
|
|
45
|
+
const bluefin_1 = require("./providers/bluefin");
|
|
46
|
+
const HERMES_API = "https://hermes.pyth.network";
|
|
47
|
+
const DEFAULT_PROVIDERS = {
|
|
48
|
+
[metaAg_1.EProvider.BLUEFIN7K]: {},
|
|
49
|
+
[metaAg_1.EProvider.FLOWX]: {},
|
|
50
|
+
[metaAg_1.EProvider.CETUS]: {},
|
|
51
|
+
};
|
|
52
|
+
class MetaAg {
|
|
53
|
+
constructor(options) {
|
|
54
|
+
this.providers = {};
|
|
55
|
+
this.options = {
|
|
56
|
+
providers: options?.providers ?? DEFAULT_PROVIDERS,
|
|
57
|
+
slippageBps: options?.slippageBps ?? 100,
|
|
58
|
+
fullnodeUrl: options?.fullnodeUrl ?? (0, client_1.getFullnodeUrl)("mainnet"),
|
|
59
|
+
hermesApi: options?.hermesApi ?? HERMES_API,
|
|
60
|
+
partner: options?.partner ?? sui_1.SUI_ADDRESS_ZERO,
|
|
61
|
+
partnerCommissionBps: options?.partnerCommissionBps ?? 0,
|
|
62
|
+
tipBps: options?.tipBps ?? 0,
|
|
63
|
+
};
|
|
64
|
+
this.client = new client_1.SuiClient({
|
|
65
|
+
url: this.options.fullnodeUrl,
|
|
66
|
+
});
|
|
67
|
+
this.inspector = new SuiClientUtils_1.SuiClientUtils(this.client);
|
|
68
|
+
}
|
|
69
|
+
async _getProvider(provider) {
|
|
70
|
+
const p = this.providers[provider];
|
|
71
|
+
if (p)
|
|
72
|
+
return p;
|
|
73
|
+
switch (provider) {
|
|
74
|
+
case metaAg_1.EProvider.BLUEFIN7K:
|
|
75
|
+
const bluefinOptions = this.options.providers[provider];
|
|
76
|
+
(0, condition_1.assert)(!!bluefinOptions, `Provider not found: ${provider}`);
|
|
77
|
+
this.providers[metaAg_1.EProvider.BLUEFIN7K] = new bluefin_1.BluefinProvider(bluefinOptions, this.options, this.client);
|
|
78
|
+
break;
|
|
79
|
+
case metaAg_1.EProvider.FLOWX:
|
|
80
|
+
const flowxOptions = this.options.providers[provider];
|
|
81
|
+
(0, condition_1.assert)(!!flowxOptions, `Provider not found: ${provider}`);
|
|
82
|
+
const { FlowxProvider } = await Promise.resolve().then(() => __importStar(require("./providers/flowx"))).catch(catchImportError(metaAg_1.EProvider.FLOWX));
|
|
83
|
+
this.providers[metaAg_1.EProvider.FLOWX] = new FlowxProvider(flowxOptions, this.options, this.client);
|
|
84
|
+
break;
|
|
85
|
+
case metaAg_1.EProvider.CETUS:
|
|
86
|
+
const cetusOptions = this.options.providers[provider];
|
|
87
|
+
(0, condition_1.assert)(!!cetusOptions, `Provider not found: ${provider}`);
|
|
88
|
+
const { CetusProvider } = await Promise.resolve().then(() => __importStar(require("./providers/cetus"))).catch(catchImportError(metaAg_1.EProvider.CETUS));
|
|
89
|
+
this.providers[metaAg_1.EProvider.CETUS] = new CetusProvider(cetusOptions, this.options, this.client);
|
|
90
|
+
break;
|
|
91
|
+
default:
|
|
92
|
+
throw new Error(`Provider not supported: ${provider}`);
|
|
93
|
+
}
|
|
94
|
+
return this.providers[provider];
|
|
95
|
+
}
|
|
96
|
+
async _simulate(provider, quote, simulation) {
|
|
97
|
+
try {
|
|
98
|
+
const tx = new transactions_1.Transaction();
|
|
99
|
+
const id = quote.id;
|
|
100
|
+
const coinOut = await provider.swap({
|
|
101
|
+
quote,
|
|
102
|
+
coinIn: (0, transactions_1.coinWithBalance)({
|
|
103
|
+
balance: BigInt(quote.amountIn),
|
|
104
|
+
type: quote.coinTypeIn,
|
|
105
|
+
}),
|
|
106
|
+
signer: simulation.sender,
|
|
107
|
+
tx,
|
|
108
|
+
});
|
|
109
|
+
tx.add(metaSettle(quote, coinOut, 10000, this.options.tipBps, this.options.partner, this.options.partnerCommissionBps));
|
|
110
|
+
tx.transferObjects([coinOut], simulation.sender);
|
|
111
|
+
const res = await timeout(() => this.inspector.devInspectTransactionBlock({
|
|
112
|
+
sender: simulation.sender,
|
|
113
|
+
transactionBlock: tx,
|
|
114
|
+
}), simulation.timeout ?? 2000, `simulation for ${provider.kind} provider with id ${id}`);
|
|
115
|
+
const amountOut = extractAmountOutWrapper(res.events);
|
|
116
|
+
return {
|
|
117
|
+
id,
|
|
118
|
+
simulatedAmountOut: amountOut,
|
|
119
|
+
gasUsed: res.effects.gasUsed,
|
|
120
|
+
provider: provider.kind,
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
catch (error) {
|
|
124
|
+
console.warn(`Failed to simulate ${provider.kind}: `, error);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
async _quote(provider, options, simulation) {
|
|
128
|
+
const quote = await timeout(() => provider.quote(options), options.timeout ?? 2000, `quote for ${provider.kind} provider from ${options.coinInType} to ${options.coinOutType}`);
|
|
129
|
+
if (simulation) {
|
|
130
|
+
if (simulation.onSimulated) {
|
|
131
|
+
this._simulate(provider, quote, simulation).then((payload) => {
|
|
132
|
+
payload && simulation.onSimulated?.(payload);
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
const updated = await this._simulate(provider, quote, simulation);
|
|
137
|
+
quote.simulatedAmountOut = updated?.simulatedAmountOut;
|
|
138
|
+
quote.gasUsed = updated?.gasUsed;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
return quote;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Get quotes from all providers
|
|
145
|
+
* @param options - quote options
|
|
146
|
+
* @param simulation - if present, the quote will be simulated
|
|
147
|
+
* @returns quotes from all providers
|
|
148
|
+
*/
|
|
149
|
+
async quote(options, simulation) {
|
|
150
|
+
const quotes = await Promise.allSettled(Object.keys(this.options.providers).map(async (provider) => {
|
|
151
|
+
const p = await this._getProvider(provider);
|
|
152
|
+
return this._quote(p, options, simulation);
|
|
153
|
+
}));
|
|
154
|
+
return quotes
|
|
155
|
+
.map((quote) => quote.status === "fulfilled"
|
|
156
|
+
? quote.value
|
|
157
|
+
: (console.log(quote.reason), null))
|
|
158
|
+
.filter((quote) => quote !== null);
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Build transaction from quote
|
|
162
|
+
* @param options - build tx options
|
|
163
|
+
* @param slippageBps - slippage bps if not specified, fallback to global slippage bps, if none of them specified, default to 100
|
|
164
|
+
* @returns coin out object, you must consume it by transferObjects, or other sub sequence commands
|
|
165
|
+
*/
|
|
166
|
+
async swap(options, slippageBps) {
|
|
167
|
+
const provider = await this._getProvider(options.quote.provider);
|
|
168
|
+
(0, condition_1.assert)(!!provider, `Provider not found: ${options.quote.provider}`);
|
|
169
|
+
const coinOut = await provider.swap(options);
|
|
170
|
+
options.tx.add(metaSettle(options.quote, coinOut, slippageBps ?? this.options.slippageBps ?? 100, this.options.tipBps, this.options.partner, this.options.partnerCommissionBps));
|
|
171
|
+
return coinOut;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
exports.MetaAg = MetaAg;
|
|
175
|
+
/**
|
|
176
|
+
* this settlement does not charge commission fee for partner, since all integrated aggregators already charge commission fee for partner
|
|
177
|
+
* @param quote Meta Aggregator Quote
|
|
178
|
+
* @param coinOut Coin Out Object
|
|
179
|
+
* @param slippageBps Slippage Bps
|
|
180
|
+
* @param tipBps Tip Bps default = 0
|
|
181
|
+
* @param partner address of partner for analytic default is zero address
|
|
182
|
+
*/
|
|
183
|
+
const metaSettle = (quote, coinOut, slippageBps = 100, tipBps = 0, partner, commissionBps = 0) => {
|
|
184
|
+
return (tx) => {
|
|
185
|
+
const { minAmount, expectedAmount } = (0, buildTx_1.getExpectedReturn)(quote.rawAmountOut, slippageBps, commissionBps, // use for calculate expected amount out
|
|
186
|
+
tipBps);
|
|
187
|
+
if (tipBps > 0) {
|
|
188
|
+
tx.moveCall({
|
|
189
|
+
target: `${_7k_1._7K_META_PUBLISHED_AT}::vault::collect_tip`,
|
|
190
|
+
typeArguments: [quote.coinTypeOut],
|
|
191
|
+
arguments: [
|
|
192
|
+
tx.object(_7k_1._7K_META_VAULT),
|
|
193
|
+
tx.object(_7k_1._7K_META_CONFIG),
|
|
194
|
+
coinOut,
|
|
195
|
+
tx.pure.u64(tipBps),
|
|
196
|
+
],
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
tx.moveCall({
|
|
200
|
+
target: `${_7k_1._7K_META_PUBLISHED_AT}::settle::settle`,
|
|
201
|
+
typeArguments: [quote.coinTypeIn, quote.coinTypeOut],
|
|
202
|
+
arguments: [
|
|
203
|
+
tx.object(_7k_1._7K_META_CONFIG),
|
|
204
|
+
tx.object(_7k_1._7K_META_VAULT),
|
|
205
|
+
tx.pure.u64(quote.amountIn),
|
|
206
|
+
coinOut,
|
|
207
|
+
tx.pure.u64(minAmount),
|
|
208
|
+
tx.pure.u64(expectedAmount),
|
|
209
|
+
tx.pure.option("address", partner),
|
|
210
|
+
tx.pure.u64(0), // commission must be 0 since all integrated aggregators already charge commission fee for partner
|
|
211
|
+
tx.pure.u64(0), // ps
|
|
212
|
+
],
|
|
213
|
+
});
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
const extractAmountOutWrapper = (events) => {
|
|
217
|
+
const swapEvent = events
|
|
218
|
+
.filter((event) => event.type === `${_7k_1._7K_META_PACKAGE_ID}::settle::Swap`)
|
|
219
|
+
?.pop();
|
|
220
|
+
return swapEvent?.parsedJson?.amount_out;
|
|
221
|
+
};
|
|
222
|
+
const catchImportError = (provider) => {
|
|
223
|
+
return (e) => {
|
|
224
|
+
const map = {
|
|
225
|
+
[metaAg_1.EProvider.CETUS]: "@cetusprotocol/aggregator-sdk",
|
|
226
|
+
[metaAg_1.EProvider.FLOWX]: "@flowx-finance/sdk",
|
|
227
|
+
[metaAg_1.EProvider.BLUEFIN7K]: "@7kprotocol/sdk-ts",
|
|
228
|
+
};
|
|
229
|
+
console.warn(`Please install ${map[provider]} to use ${provider} provider`);
|
|
230
|
+
throw e;
|
|
231
|
+
};
|
|
232
|
+
};
|
|
233
|
+
const timeout = async (fn, timeout, msg) => {
|
|
234
|
+
if (timeout <= 0)
|
|
235
|
+
return fn();
|
|
236
|
+
return new Promise((resolve, reject) => {
|
|
237
|
+
const timer = setTimeout(() => reject(new Error(`Timeout ${msg ?? "operation"}`)), timeout);
|
|
238
|
+
fn()
|
|
239
|
+
.then(resolve)
|
|
240
|
+
.catch(reject)
|
|
241
|
+
.finally(() => clearTimeout(timer));
|
|
242
|
+
});
|
|
243
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BluefinProvider = void 0;
|
|
4
|
+
const pyth_sui_js_1 = require("@pythnetwork/pyth-sui-js");
|
|
5
|
+
const uuid_1 = require("uuid");
|
|
6
|
+
const config_1 = require("../../../config");
|
|
7
|
+
const apiEndpoints_1 = require("../../../constants/apiEndpoints");
|
|
8
|
+
const sui_1 = require("../../../constants/sui");
|
|
9
|
+
const metaAg_1 = require("../../../types/metaAg");
|
|
10
|
+
const condition_1 = require("../../../utils/condition");
|
|
11
|
+
const buildTx_1 = require("../../swap/buildTx");
|
|
12
|
+
const buildTxV2_1 = require("../../swap/buildTxV2");
|
|
13
|
+
const getQuote_1 = require("../../swap/getQuote");
|
|
14
|
+
const WORMHOLE_STATE_ID = "0xaeab97f96cf9877fee2883315d459552b2b921edc16d7ceac6eab944dd88919c";
|
|
15
|
+
const PYTH_STATE_ID = "0x1f9310238ee9298fb703c3419030b35b22bb1cc37113e3bb5007c99aec79e5b8";
|
|
16
|
+
class BluefinProvider {
|
|
17
|
+
constructor(options, metaOptions, client) {
|
|
18
|
+
this.options = options;
|
|
19
|
+
this.metaOptions = metaOptions;
|
|
20
|
+
this.kind = metaAg_1.EProvider.BLUEFIN7K;
|
|
21
|
+
const pythClient = new pyth_sui_js_1.SuiPythClient(client, PYTH_STATE_ID, WORMHOLE_STATE_ID);
|
|
22
|
+
const pythConnection = new pyth_sui_js_1.SuiPriceServiceConnection(this.metaOptions.hermesApi);
|
|
23
|
+
options.apiKey && config_1.Config.setApiKey(options.apiKey);
|
|
24
|
+
config_1.Config.setSuiClient(client);
|
|
25
|
+
config_1.Config.setPythClient(pythClient);
|
|
26
|
+
config_1.Config.setPythConnection(pythConnection);
|
|
27
|
+
}
|
|
28
|
+
async quote(options) {
|
|
29
|
+
const quote = await (0, getQuote_1.getQuote)({
|
|
30
|
+
amountIn: options.amountIn,
|
|
31
|
+
tokenIn: options.coinInType,
|
|
32
|
+
tokenOut: options.coinOutType,
|
|
33
|
+
api: this.options.api || apiEndpoints_1.API_ENDPOINTS.MAIN,
|
|
34
|
+
sources: this.options.sources,
|
|
35
|
+
maxPaths: this.options.maxPaths,
|
|
36
|
+
excludedPools: this.options.excludedPools,
|
|
37
|
+
targetPools: this.options.targetPools,
|
|
38
|
+
});
|
|
39
|
+
const { expectedAmount } = (0, buildTx_1.getExpectedReturn)(quote.returnAmountWithDecimal.toString(), 0, this.metaOptions.partnerCommissionBps ?? 0, this.metaOptions.tipBps ?? 0);
|
|
40
|
+
return {
|
|
41
|
+
id: (0, uuid_1.v4)(),
|
|
42
|
+
provider: metaAg_1.EProvider.BLUEFIN7K,
|
|
43
|
+
quote,
|
|
44
|
+
amountIn: quote.swapAmountWithDecimal,
|
|
45
|
+
rawAmountOut: quote.returnAmountWithDecimal,
|
|
46
|
+
amountOut: expectedAmount,
|
|
47
|
+
coinTypeIn: quote.tokenIn,
|
|
48
|
+
coinTypeOut: quote.tokenOut,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
async swap({ quote, signer, tx, coinIn }) {
|
|
52
|
+
(0, condition_1.assert)(quote.provider === metaAg_1.EProvider.BLUEFIN7K, "Invalid quote");
|
|
53
|
+
const { coinOut } = await (0, buildTxV2_1.buildTxV2)({
|
|
54
|
+
quoteResponse: quote.quote,
|
|
55
|
+
accountAddress: signer,
|
|
56
|
+
commission: {
|
|
57
|
+
commissionBps: this.metaOptions.partnerCommissionBps ?? 0,
|
|
58
|
+
partner: this.metaOptions.partner ?? sui_1.SUI_ADDRESS_ZERO,
|
|
59
|
+
},
|
|
60
|
+
slippage: 1,
|
|
61
|
+
extendTx: {
|
|
62
|
+
tx,
|
|
63
|
+
coinIn,
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
return coinOut;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
exports.BluefinProvider = BluefinProvider;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CetusProvider = void 0;
|
|
4
|
+
const aggregator_sdk_1 = require("@cetusprotocol/aggregator-sdk");
|
|
5
|
+
const uuid_1 = require("uuid");
|
|
6
|
+
const metaAg_1 = require("../../../types/metaAg");
|
|
7
|
+
const condition_1 = require("../../../utils/condition");
|
|
8
|
+
const buildTx_1 = require("../../swap/buildTx");
|
|
9
|
+
class CetusProvider {
|
|
10
|
+
constructor(options, metaOptions, client) {
|
|
11
|
+
this.options = options;
|
|
12
|
+
this.metaOptions = metaOptions;
|
|
13
|
+
this.kind = metaAg_1.EProvider.CETUS;
|
|
14
|
+
this.cetusClient = new aggregator_sdk_1.AggregatorClient({
|
|
15
|
+
apiKey: options.apiKey,
|
|
16
|
+
overlayFeeReceiver: metaOptions.partner,
|
|
17
|
+
overlayFeeRate: metaOptions.partnerCommissionBps
|
|
18
|
+
? metaOptions.partnerCommissionBps / 10000
|
|
19
|
+
: undefined,
|
|
20
|
+
client,
|
|
21
|
+
endpoint: options.api,
|
|
22
|
+
env: aggregator_sdk_1.Env.Mainnet,
|
|
23
|
+
pythUrls: metaOptions.hermesApi ? [metaOptions.hermesApi] : [],
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
async quote(quoteOptions) {
|
|
27
|
+
const quote = await this.cetusClient.findRouters({
|
|
28
|
+
amount: quoteOptions.amountIn,
|
|
29
|
+
byAmountIn: true,
|
|
30
|
+
from: quoteOptions.coinInType,
|
|
31
|
+
target: quoteOptions.coinOutType,
|
|
32
|
+
providers: this.options.sources,
|
|
33
|
+
splitCount: this.options.splitCount,
|
|
34
|
+
splitAlgorithm: this.options.splitAlgorithm,
|
|
35
|
+
splitFactor: this.options.splitFactor,
|
|
36
|
+
depth: this.options.depth,
|
|
37
|
+
liquidityChanges: this.options.liquidityChanges,
|
|
38
|
+
});
|
|
39
|
+
(0, condition_1.assert)(!!quote, "No quote found");
|
|
40
|
+
const bps = BigInt(this.metaOptions.partnerCommissionBps ?? 0);
|
|
41
|
+
// calc amount out before any commission fees
|
|
42
|
+
const amountOut = ((BigInt(quote.amountOut.toString()) * 10000n) /
|
|
43
|
+
(10000n - bps)).toString();
|
|
44
|
+
const { expectedAmount } = (0, buildTx_1.getExpectedReturn)(amountOut, 0, this.metaOptions.partnerCommissionBps ?? 0, this.metaOptions.tipBps ?? 0);
|
|
45
|
+
return {
|
|
46
|
+
id: (0, uuid_1.v4)(),
|
|
47
|
+
provider: metaAg_1.EProvider.CETUS,
|
|
48
|
+
quote,
|
|
49
|
+
amountIn: quote.amountIn.toString(),
|
|
50
|
+
rawAmountOut: amountOut,
|
|
51
|
+
amountOut: expectedAmount,
|
|
52
|
+
coinTypeIn: quoteOptions.coinInType,
|
|
53
|
+
coinTypeOut: quoteOptions.coinOutType,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
async swap(options) {
|
|
57
|
+
(0, condition_1.assert)(options.quote.provider === metaAg_1.EProvider.CETUS, "Expect Cetus quote");
|
|
58
|
+
const coinOut = await this.cetusClient.routerSwap({
|
|
59
|
+
inputCoin: options.coinIn,
|
|
60
|
+
router: options.quote.quote,
|
|
61
|
+
slippage: 1,
|
|
62
|
+
txb: options.tx,
|
|
63
|
+
});
|
|
64
|
+
return coinOut;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
exports.CetusProvider = CetusProvider;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FlowxProvider = void 0;
|
|
4
|
+
const sdk_1 = require("@flowx-finance/sdk");
|
|
5
|
+
const uuid_1 = require("uuid");
|
|
6
|
+
const metaAg_1 = require("../../../types/metaAg");
|
|
7
|
+
const condition_1 = require("../../../utils/condition");
|
|
8
|
+
const buildTx_1 = require("../../swap/buildTx");
|
|
9
|
+
class FlowxProvider {
|
|
10
|
+
constructor(options, metaOptions, client) {
|
|
11
|
+
this.options = options;
|
|
12
|
+
this.metaOptions = metaOptions;
|
|
13
|
+
this.client = client;
|
|
14
|
+
this.kind = metaAg_1.EProvider.FLOWX;
|
|
15
|
+
this.quoter = new sdk_1.AggregatorQuoter("mainnet", options.apiKey);
|
|
16
|
+
}
|
|
17
|
+
async quote(quoteOptions) {
|
|
18
|
+
const quote = await this.quoter.getRoutes({
|
|
19
|
+
amountIn: quoteOptions.amountIn,
|
|
20
|
+
tokenIn: quoteOptions.coinInType,
|
|
21
|
+
tokenOut: quoteOptions.coinOutType,
|
|
22
|
+
includeSources: this.options.sources,
|
|
23
|
+
excludePools: this.options.excludePools,
|
|
24
|
+
excludeSources: this.options.excludeSources,
|
|
25
|
+
maxHops: this.options.maxHops,
|
|
26
|
+
splitDistributionPercent: this.options.splitDistributionPercent,
|
|
27
|
+
});
|
|
28
|
+
const { expectedAmount } = (0, buildTx_1.getExpectedReturn)(quote.amountOut.toString(), 0, this.metaOptions.partnerCommissionBps ?? 0, this.metaOptions.tipBps ?? 0);
|
|
29
|
+
return {
|
|
30
|
+
id: (0, uuid_1.v4)(),
|
|
31
|
+
provider: metaAg_1.EProvider.FLOWX,
|
|
32
|
+
quote: quote,
|
|
33
|
+
amountIn: quote.amountIn.toString(),
|
|
34
|
+
rawAmountOut: quote.amountOut.toString(),
|
|
35
|
+
amountOut: expectedAmount,
|
|
36
|
+
coinTypeIn: quoteOptions.coinInType,
|
|
37
|
+
coinTypeOut: quoteOptions.coinOutType,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
async swap(options) {
|
|
41
|
+
(0, condition_1.assert)(options.quote.provider === metaAg_1.EProvider.FLOWX, "Invalid quote");
|
|
42
|
+
const builder = new sdk_1.TradeBuilder("mainnet", options.quote.quote.routes);
|
|
43
|
+
if (this.metaOptions.partner) {
|
|
44
|
+
builder.commission(new sdk_1.Commission(this.metaOptions.partner, options.quote.quote.coinOut, sdk_1.CommissionType.PERCENTAGE, (this.metaOptions.partnerCommissionBps ?? 0) * 100, true));
|
|
45
|
+
}
|
|
46
|
+
builder.sender(options.signer);
|
|
47
|
+
builder.slippage(10000 * 100);
|
|
48
|
+
const res = await builder.build().swap({
|
|
49
|
+
tx: options.tx,
|
|
50
|
+
client: this.client,
|
|
51
|
+
coinIn: options.coinIn,
|
|
52
|
+
});
|
|
53
|
+
return res;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
exports.FlowxProvider = FlowxProvider;
|
package/lib/cjs/index.js
CHANGED
|
@@ -14,10 +14,13 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.setSuiClient = exports.placeLimitOrder = exports.placeDcaOrder = exports.multiSwap = exports.getTokenPrices = exports.getTokenPrice = exports.getSwapHistory = exports.getSuiPrice = exports.getSuiClient = exports.getQuote = exports.getOpenLimitOrders = exports.getOpenDcaOrders = exports.getDcaOrderExecutions = exports.getClosedLimitOrders = exports.getClosedDcaOrders = exports.executeTx = exports.executeBluefinTx = exports.estimateGasFee = exports.DEFAULT_SOURCES = exports.Config = exports.claimExpiredLimitOrder = exports.cancelLimitOrder = exports.cancelDcaOrder = exports.buildTxV2 = exports.buildTx = void 0;
|
|
17
|
+
exports.setSuiClient = exports.placeLimitOrder = exports.placeDcaOrder = exports.multiSwap = exports.MetaAg = exports.getTokenPrices = exports.getTokenPrice = exports.getSwapHistory = exports.getSuiPrice = exports.getSuiClient = exports.getQuote = exports.getOpenLimitOrders = exports.getOpenDcaOrders = exports.getDcaOrderExecutions = exports.getClosedLimitOrders = exports.getClosedDcaOrders = exports.executeTx = exports.executeBluefinTx = exports.estimateGasFee = exports.DEFAULT_SOURCES = exports.Config = exports.claimExpiredLimitOrder = exports.cancelLimitOrder = exports.cancelDcaOrder = exports.buildTxV2 = exports.buildTx = void 0;
|
|
18
18
|
__exportStar(require("./types/aggregator"), exports);
|
|
19
|
+
__exportStar(require("./types/metaAg"), exports);
|
|
19
20
|
const config_1 = require("./config");
|
|
20
21
|
Object.defineProperty(exports, "Config", { enumerable: true, get: function () { return config_1.Config; } });
|
|
22
|
+
const metaAg_1 = require("./features/metaAg");
|
|
23
|
+
Object.defineProperty(exports, "MetaAg", { enumerable: true, get: function () { return metaAg_1.MetaAg; } });
|
|
21
24
|
const prices_1 = require("./features/prices");
|
|
22
25
|
Object.defineProperty(exports, "getSuiPrice", { enumerable: true, get: function () { return prices_1.getSuiPrice; } });
|
|
23
26
|
Object.defineProperty(exports, "getTokenPrice", { enumerable: true, get: function () { return prices_1.getTokenPrice; } });
|
|
@@ -81,4 +84,6 @@ exports.default = {
|
|
|
81
84
|
cancelDcaOrder: limitDca_1.cancelDcaOrder,
|
|
82
85
|
getClosedDcaOrders: limitDca_1.getClosedDcaOrders,
|
|
83
86
|
getDcaOrderExecutions: limitDca_1.getDcaOrderExecutions,
|
|
87
|
+
// Meta aggregator
|
|
88
|
+
MetaAg: metaAg_1.MetaAg,
|
|
84
89
|
};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export declare const _7K_PACKAGE_ID = "0x62412b7268c35f3808336aee57a52836501f40b8ba5d936f8ad275e672befd04";
|
|
2
2
|
export declare const _7K_CONFIG = "0x47442a93f7727d188ba7cb71031170d1786af70013cb7ad5115f3fe877ff0c54";
|
|
3
3
|
export declare const _7K_VAULT = "0x442ad50389ed5cda6f7a6f5a7ae6361a4c05ef1d9fb2e54fbba5a268d690bfe6";
|
|
4
|
+
export declare const _7K_META_PUBLISHED_AT = "0x17c0b1f7a6ad73f51268f16b8c06c049eecc2f28a270cdd29c06e3d2dea23302";
|
|
5
|
+
export declare const _7K_META_PACKAGE_ID = "0x17c0b1f7a6ad73f51268f16b8c06c049eecc2f28a270cdd29c06e3d2dea23302";
|
|
6
|
+
export declare const _7K_META_VAULT = "0x9a8abd32fe5721307ce3b697cf982ee84e9ffbd58d667a4a199f1683c1a3d23c";
|
|
7
|
+
export declare const _7K_META_CONFIG = "0xbbb3a51877ed9b492f26f4e2181811cfb2bd70c532f6f7621263d122d5e96b56";
|
|
4
8
|
//# sourceMappingURL=_7k.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_7k.d.ts","sourceRoot":"","sources":["../../../../src/constants/_7k.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,uEAC2C,CAAC;AAKvE,eAAO,MAAM,UAAU,uEAC+C,CAAC;AAGvE,eAAO,MAAM,SAAS,uEACgD,CAAC"}
|
|
1
|
+
{"version":3,"file":"_7k.d.ts","sourceRoot":"","sources":["../../../../src/constants/_7k.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,uEAC2C,CAAC;AAKvE,eAAO,MAAM,UAAU,uEAC+C,CAAC;AAGvE,eAAO,MAAM,SAAS,uEACgD,CAAC;AAEvE,eAAO,MAAM,qBAAqB,uEACoC,CAAC;AACvE,eAAO,MAAM,mBAAmB,uEACsC,CAAC;AACvE,eAAO,MAAM,cAAc,uEAC2C,CAAC;AACvE,eAAO,MAAM,eAAe,uEAC0C,CAAC"}
|