@cetusprotocol/aggregator-sdk 0.0.0-experimental-20241014164740 → 0.0.0-experimental-20241018181434

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/dist/index.d.mts CHANGED
@@ -118,6 +118,7 @@ declare class AggregatorClient {
118
118
  routerSwap(params: BuildRouterSwapParams): Promise<TransactionObjectArgument>;
119
119
  fastRouterSwap(params: BuildFastRouterSwapParams): Promise<void>;
120
120
  publishedAt(): string;
121
+ publishedV2At(): string;
121
122
  deepbookv3DeepFeeType(): string;
122
123
  transferOrDestoryCoin(txb: Transaction, coin: TransactionObjectArgument, coinType: string): void;
123
124
  checkCoinThresholdAndMergeCoin(txb: Transaction, coins: TransactionObjectArgument[], coinType: string, amountLimit: BN): TransactionObjectArgument;
package/dist/index.d.ts CHANGED
@@ -118,6 +118,7 @@ declare class AggregatorClient {
118
118
  routerSwap(params: BuildRouterSwapParams): Promise<TransactionObjectArgument>;
119
119
  fastRouterSwap(params: BuildFastRouterSwapParams): Promise<void>;
120
120
  publishedAt(): string;
121
+ publishedV2At(): string;
121
122
  deepbookv3DeepFeeType(): string;
122
123
  transferOrDestoryCoin(txb: Transaction, coin: TransactionObjectArgument, coinType: string): void;
123
124
  checkCoinThresholdAndMergeCoin(txb: Transaction, coins: TransactionObjectArgument[], coinType: string, amountLimit: BN): TransactionObjectArgument;
package/dist/index.js CHANGED
@@ -6008,7 +6008,7 @@ var Bluemove = class {
6008
6008
  // src/transaction/deepbook_v3.ts
6009
6009
  var DeepbookV3 = class {
6010
6010
  constructor(env) {
6011
- this.deepbookV3Config = env === 0 /* Mainnet */ ? "0xfdedcb665bc9a18f2fb355a80a4744be58acf043d5f65d9b4c98ac64e87da7d6" : "0xe19b5d072346cae83a037d4e3c8492068a74410a74e5830b3a68012db38296aa";
6011
+ this.deepbookV3Config = env === 0 /* Mainnet */ ? "0xa0c3e61f2f57045942f498cdc38c6347bd2e09e04a85ac33b866b84de5b5b141" : "0xe19b5d072346cae83a037d4e3c8492068a74410a74e5830b3a68012db38296aa";
6012
6012
  this.deepCoinType = env === 0 /* Mainnet */ ? "0xdeeb7a4662eec9f2f3def03fb937a663dddaa2e215b8078a284d026b7946c270::deep::DEEP" : "0x36dbef866a1d62bf7328989a10fb2f07d769f4ee587c0de4a0a256e57e0a58a8::deep::DEEP";
6013
6013
  }
6014
6014
  swap(client, txb, path, inputCoin, deepbookv3DeepFee) {
@@ -6029,7 +6029,7 @@ var DeepbookV3 = class {
6029
6029
  txb.object(CLOCK_ADDRESS)
6030
6030
  ];
6031
6031
  const res = txb.moveCall({
6032
- target: `${client.publishedAt()}::deepbookv3::${func}`,
6032
+ target: `${client.publishedV2At()}::deepbookv3::${func}`,
6033
6033
  typeArguments: [coinAType, coinBType],
6034
6034
  arguments: args
6035
6035
  });
@@ -6306,6 +6306,13 @@ var AggregatorClient7 = class {
6306
6306
  return "0x0ed287d6c3fe4962d0994ffddc1d19a15fba6a81533f3f0dcc2bbcedebce0637";
6307
6307
  }
6308
6308
  }
6309
+ publishedV2At() {
6310
+ if (this.env === 0 /* Mainnet */) {
6311
+ return "0x43ddba51e679811ea575c86bf0e0877015eef4d14320cc36c33847d06cf2bffe";
6312
+ } else {
6313
+ return "0x0ed287d6c3fe4962d0994ffddc1d19a15fba6a81533f3f0dcc2bbcedebce0637";
6314
+ }
6315
+ }
6309
6316
  deepbookv3DeepFeeType() {
6310
6317
  if (this.env === 0 /* Mainnet */) {
6311
6318
  return "0xdeeb7a4662eec9f2f3def03fb937a663dddaa2e215b8078a284d026b7946c270::deep::DEEP";
package/dist/index.mjs CHANGED
@@ -6006,7 +6006,7 @@ var Bluemove = class {
6006
6006
  // src/transaction/deepbook_v3.ts
6007
6007
  var DeepbookV3 = class {
6008
6008
  constructor(env) {
6009
- this.deepbookV3Config = env === 0 /* Mainnet */ ? "0xfdedcb665bc9a18f2fb355a80a4744be58acf043d5f65d9b4c98ac64e87da7d6" : "0xe19b5d072346cae83a037d4e3c8492068a74410a74e5830b3a68012db38296aa";
6009
+ this.deepbookV3Config = env === 0 /* Mainnet */ ? "0xa0c3e61f2f57045942f498cdc38c6347bd2e09e04a85ac33b866b84de5b5b141" : "0xe19b5d072346cae83a037d4e3c8492068a74410a74e5830b3a68012db38296aa";
6010
6010
  this.deepCoinType = env === 0 /* Mainnet */ ? "0xdeeb7a4662eec9f2f3def03fb937a663dddaa2e215b8078a284d026b7946c270::deep::DEEP" : "0x36dbef866a1d62bf7328989a10fb2f07d769f4ee587c0de4a0a256e57e0a58a8::deep::DEEP";
6011
6011
  }
6012
6012
  swap(client, txb, path, inputCoin, deepbookv3DeepFee) {
@@ -6027,7 +6027,7 @@ var DeepbookV3 = class {
6027
6027
  txb.object(CLOCK_ADDRESS)
6028
6028
  ];
6029
6029
  const res = txb.moveCall({
6030
- target: `${client.publishedAt()}::deepbookv3::${func}`,
6030
+ target: `${client.publishedV2At()}::deepbookv3::${func}`,
6031
6031
  typeArguments: [coinAType, coinBType],
6032
6032
  arguments: args
6033
6033
  });
@@ -6304,6 +6304,13 @@ var AggregatorClient7 = class {
6304
6304
  return "0x0ed287d6c3fe4962d0994ffddc1d19a15fba6a81533f3f0dcc2bbcedebce0637";
6305
6305
  }
6306
6306
  }
6307
+ publishedV2At() {
6308
+ if (this.env === 0 /* Mainnet */) {
6309
+ return "0x43ddba51e679811ea575c86bf0e0877015eef4d14320cc36c33847d06cf2bffe";
6310
+ } else {
6311
+ return "0x0ed287d6c3fe4962d0994ffddc1d19a15fba6a81533f3f0dcc2bbcedebce0637";
6312
+ }
6313
+ }
6307
6314
  deepbookv3DeepFeeType() {
6308
6315
  if (this.env === 0 /* Mainnet */) {
6309
6316
  return "0xdeeb7a4662eec9f2f3def03fb937a663dddaa2e215b8078a284d026b7946c270::deep::DEEP";
@@ -62,6 +62,7 @@ export declare class AggregatorClient {
62
62
  routerSwap(params: BuildRouterSwapParams): Promise<TransactionObjectArgument>;
63
63
  fastRouterSwap(params: BuildFastRouterSwapParams): Promise<void>;
64
64
  publishedAt(): string;
65
+ publishedV2At(): string;
65
66
  deepbookv3DeepFeeType(): string;
66
67
  transferOrDestoryCoin(txb: Transaction, coin: TransactionObjectArgument, coinType: string): void;
67
68
  checkCoinThresholdAndMergeCoin(txb: Transaction, coins: TransactionObjectArgument[], coinType: string, amountLimit: BN): TransactionObjectArgument;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cetusprotocol/aggregator-sdk",
3
- "version": "0.0.0-experimental-20241014164740",
3
+ "version": "0.0.0-experimental-20241018181434",
4
4
  "sideEffects": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/client.ts CHANGED
@@ -369,6 +369,14 @@ export class AggregatorClient {
369
369
  }
370
370
  }
371
371
 
372
+ publishedV2At(): string {
373
+ if (this.env === Env.Mainnet) {
374
+ return "0x43ddba51e679811ea575c86bf0e0877015eef4d14320cc36c33847d06cf2bffe"
375
+ } else {
376
+ return "0x0ed287d6c3fe4962d0994ffddc1d19a15fba6a81533f3f0dcc2bbcedebce0637"
377
+ }
378
+ }
379
+
372
380
  deepbookv3DeepFeeType(): string {
373
381
  if (this.env === Env.Mainnet) {
374
382
  return "0xdeeb7a4662eec9f2f3def03fb937a663dddaa2e215b8078a284d026b7946c270::deep::DEEP"
@@ -19,7 +19,7 @@ export class DeepbookV3 implements Dex {
19
19
  constructor(env: Env) {
20
20
  this.deepbookV3Config =
21
21
  env === Env.Mainnet
22
- ? "0xfdedcb665bc9a18f2fb355a80a4744be58acf043d5f65d9b4c98ac64e87da7d6"
22
+ ? "0xa0c3e61f2f57045942f498cdc38c6347bd2e09e04a85ac33b866b84de5b5b141"
23
23
  : "0xe19b5d072346cae83a037d4e3c8492068a74410a74e5830b3a68012db38296aa"
24
24
  this.deepCoinType =
25
25
  env === Env.Mainnet
@@ -54,7 +54,7 @@ export class DeepbookV3 implements Dex {
54
54
  txb.object(CLOCK_ADDRESS),
55
55
  ]
56
56
  const res = txb.moveCall({
57
- target: `${client.publishedAt()}::deepbookv3::${func}`,
57
+ target: `${client.publishedV2At()}::deepbookv3::${func}`,
58
58
  typeArguments: [coinAType, coinBType],
59
59
  arguments: args,
60
60
  }) as TransactionArgument