@gardenfi/core 3.1.3-beta.21 → 3.1.3-beta.22

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.
@@ -12434,7 +12434,7 @@ async function yf(e, t) {
12434
12434
  });
12435
12435
  return se === "0x" ? { data: void 0 } : { data: se };
12436
12436
  } catch (ee) {
12437
- const G = ik(ee), { offchainLookup: O, offchainLookupSignature: L } = await import("./ccip-C2Eoa1eT.js");
12437
+ const G = ik(ee), { offchainLookup: O, offchainLookupSignature: L } = await import("./ccip-lEkjUd0z.js");
12438
12438
  if (e.ccipRead !== !1 && (G == null ? void 0 : G.slice(0, 10)) === L && w)
12439
12439
  return { data: await O(e, { data: G, to: w }) };
12440
12440
  throw U && (G == null ? void 0 : G.slice(0, 10)) === "0x101bb98d" ? new NA({ factory: h }) : Vw(ee, {
@@ -23855,36 +23855,38 @@ class Q4 {
23855
23855
  );
23856
23856
  }
23857
23857
  }
23858
+ // Initiate with create order response
23858
23859
  async initiateWithCreateOrderResponse(t) {
23859
23860
  const r = await this.auth.getAuthHeaders();
23860
23861
  if (!r.ok) return _(r.error);
23861
23862
  if (!this.account.address) return _("No account address");
23862
23863
  const n = await this.executeApprovalTransaction(t);
23863
23864
  if (n.error) return _(n.error);
23864
- const { typed_data: s } = t;
23865
+ const { typed_data: s, valid_until: i } = t;
23865
23866
  if (s === null) {
23866
- const c = t.initiate_transaction;
23867
- if (!c) return _("No initiate_transaction found for native initiate");
23868
- const u = await this.account.execute([
23867
+ const u = t.initiate_transaction;
23868
+ if (!u) return _("No initiate_transaction found for native initiate");
23869
+ const f = await this.account.execute([
23869
23870
  {
23870
- contractAddress: _e(c.to),
23871
+ contractAddress: _e(u.to),
23871
23872
  entrypoint: "initiate",
23872
- calldata: c.calldata
23873
+ calldata: u.calldata
23873
23874
  }
23874
23875
  ]);
23875
- return await this.starknetProvider.waitForTransaction(u.transaction_hash, {
23876
+ return await this.starknetProvider.waitForTransaction(f.transaction_hash, {
23876
23877
  retryInterval: 2e3,
23877
23878
  successStates: [Zc.SUCCEEDED]
23878
- }), Y(u.transaction_hash);
23879
+ }), Y(f.transaction_hash);
23879
23880
  }
23880
- const i = await this.account.signMessage(s), a = ry(i);
23881
- if (a.error)
23882
- return _(a.error);
23883
- const o = await Et.patch(
23881
+ const a = await this.account.signMessage(s), o = ry(a);
23882
+ if (o.error)
23883
+ return _(o.error);
23884
+ const c = await Et.patch(
23884
23885
  this.url.endpoint("/v2/orders").endpoint(t.order_id).addSearchParams({ action: "initiate" }),
23885
23886
  {
23886
23887
  body: JSON.stringify({
23887
- signature: Array.isArray(a.val) ? a.val.join(",") : a.val
23888
+ signature: Array.isArray(o.val) ? o.val.join(",") : o.val,
23889
+ valid_until: i
23888
23890
  }),
23889
23891
  headers: {
23890
23892
  ...r.val,
@@ -23892,7 +23894,7 @@ class Q4 {
23892
23894
  }
23893
23895
  }
23894
23896
  );
23895
- return o.error ? _(o.error) : Y(o.result);
23897
+ return c.error ? _(c.error) : Y(c.result);
23896
23898
  }
23897
23899
  async refund() {
23898
23900
  return _("Refund is taken care of by the relayer");
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CqZ13e8l.cjs");exports.API=e.API;exports.BitcoinNetwork=e.BitcoinNetwork;exports.BitcoinProvider=e.BitcoinProvider;exports.BitcoinWallet=e.BitcoinWallet;exports.DEFAULT_AFFILIATE_ASSET=e.DEFAULT_AFFILIATE_ASSET;exports.EvmRelay=e.EvmRelay;exports.Garden=e.Garden;exports.OrderCreationStatus=e.OrderCreationStatus;exports.Quote=e.Quote;exports.STARKNET_CONFIG=e.STARKNET_CONFIG;exports.SUI_CONFIG=e.SUI_CONFIG;exports.SecretManager=e.SecretManager;exports.SolanaHTLC=e.SolanaHTLC;exports.SolanaRelay=e.SolanaRelay;exports.SolanaRelayerAddress=e.SolanaRelayerAddress;exports.StarknetHTLC=e.StarknetHTLC;exports.StarknetRelay=e.StarknetRelay;exports.TRON_CONFIG=e.TRON_CONFIG;exports.XRPL_CONFIG=e.XRPL_CONFIG;exports.XrplRelay=e.XrplRelay;exports.alpenTestnet=e.alpenTestnet;exports.arcTestnet=e.arcTestnet;exports.botanixMainnet=e.botanixMainnet;exports.checkStarknetAlloance=e.checkAllowance;exports.checkStarknetAllowanceAndApprove=e.checkAllowanceAndApprove;exports.evmToViemChainMap=e.evmToViemChainMap;exports.getChainNameFromChainId=e.getChainNameFromChainId;exports.hyperevm=e.hyperevm;exports.hyperliquidTestnet=e.hyperliquidTestnet;exports.isStarknetAllowanceSufficient=e.isAllowanceSufficient;exports.megaethMainnet=e.megaethMainnet;exports.resolveApiConfig=e.resolveApiConfig;exports.solanaProgramAddress=e.solanaProgramAddress;exports.switchOrAddNetwork=e.switchOrAddNetwork;exports.toXOnly=e.toXOnly;exports.validateBTCAddress=e.validateBTCAddress;exports.validateLTCAddress=e.validateLTCAddress;exports.validateLightningAddress=e.validateLightningAddress;exports.validateSparkAddress=e.validateSparkAddress;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-B1ZwxQmd.cjs");exports.API=e.API;exports.BitcoinNetwork=e.BitcoinNetwork;exports.BitcoinProvider=e.BitcoinProvider;exports.BitcoinWallet=e.BitcoinWallet;exports.DEFAULT_AFFILIATE_ASSET=e.DEFAULT_AFFILIATE_ASSET;exports.EvmRelay=e.EvmRelay;exports.Garden=e.Garden;exports.OrderCreationStatus=e.OrderCreationStatus;exports.Quote=e.Quote;exports.STARKNET_CONFIG=e.STARKNET_CONFIG;exports.SUI_CONFIG=e.SUI_CONFIG;exports.SecretManager=e.SecretManager;exports.SolanaHTLC=e.SolanaHTLC;exports.SolanaRelay=e.SolanaRelay;exports.SolanaRelayerAddress=e.SolanaRelayerAddress;exports.StarknetHTLC=e.StarknetHTLC;exports.StarknetRelay=e.StarknetRelay;exports.TRON_CONFIG=e.TRON_CONFIG;exports.XRPL_CONFIG=e.XRPL_CONFIG;exports.XrplRelay=e.XrplRelay;exports.alpenTestnet=e.alpenTestnet;exports.arcTestnet=e.arcTestnet;exports.botanixMainnet=e.botanixMainnet;exports.checkStarknetAlloance=e.checkAllowance;exports.checkStarknetAllowanceAndApprove=e.checkAllowanceAndApprove;exports.evmToViemChainMap=e.evmToViemChainMap;exports.getChainNameFromChainId=e.getChainNameFromChainId;exports.hyperevm=e.hyperevm;exports.hyperliquidTestnet=e.hyperliquidTestnet;exports.isStarknetAllowanceSufficient=e.isAllowanceSufficient;exports.megaethMainnet=e.megaethMainnet;exports.resolveApiConfig=e.resolveApiConfig;exports.solanaProgramAddress=e.solanaProgramAddress;exports.switchOrAddNetwork=e.switchOrAddNetwork;exports.toXOnly=e.toXOnly;exports.validateBTCAddress=e.validateBTCAddress;exports.validateLTCAddress=e.validateLTCAddress;exports.validateLightningAddress=e.validateLightningAddress;exports.validateSparkAddress=e.validateSparkAddress;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { O as s, K as t, L as n, M as r, N as i, E as l, G as o, Y as d, Q as A, P as S, R as T, m as c, k as C, j as h, V as k, h as p, S as v, T as m, U as I, X as N, D as y, I as F, x as O, p as R, n as L, y as g, z as w, A as E, C as G, o as _, F as u, r as M, W as P, J as f, t as B, v as X, q as x, w as U, u as q } from "./index-DmawpGMO.js";
1
+ import { O as s, K as t, L as n, M as r, N as i, E as l, G as o, Y as d, Q as A, P as S, R as T, m as c, k as C, j as h, V as k, h as p, S as v, T as m, U as I, X as N, D as y, I as F, x as O, p as R, n as L, y as g, z as w, A as E, C as G, o as _, F as u, r as M, W as P, J as f, t as B, v as X, q as x, w as U, u as q } from "./index-Y2kHukYU.js";
2
2
  export {
3
3
  s as API,
4
4
  t as BitcoinNetwork,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gardenfi/core",
3
- "version": "3.1.3-beta.21",
3
+ "version": "3.1.3-beta.22",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "build": "vite build",
@@ -30,8 +30,8 @@
30
30
  "@buildonspark/spark-sdk": "^0.6.3",
31
31
  "@coral-xyz/anchor": "^0.31.1",
32
32
  "@crossmarkio/sdk": "^0.4.0",
33
- "@gardenfi/orderbook": "3.1.3-beta.21",
34
- "@gardenfi/utils": "3.1.1-beta.19",
33
+ "@gardenfi/orderbook": "3.1.3-beta.22",
34
+ "@gardenfi/utils": "3.1.1-beta.20",
35
35
  "@mysten/signers": "^0.3.4",
36
36
  "@mysten/sui": "^1.37.1",
37
37
  "@mysten/wallet-standard": "^0.16.9",