@gardenfi/core 3.1.0 → 3.1.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.
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CXrX8JpA.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.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.resolveApiConfig=e.resolveApiConfig;exports.solanaProgramAddress=e.solanaProgramAddress;exports.switchOrAddNetwork=e.switchOrAddNetwork;exports.toXOnly=e.toXOnly;exports.validateBTCAddress=e.validateBTCAddress;exports.validateLTCAddress=e.validateLTCAddress;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-DO-nU4_X.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.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;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { K as s, D as t, F as n, I as r, J as o, E as i, G as l, R as d, Q as A, L as S, M as C, m as T, k as c, j as k, O as p, h as I, S as N, T as h, N as m, X as v, A as y, u as F, p as O, n as R, w as L, x as w, y as E, z as G, o as _, r as u, P, C as f, t as g, v as B, q as M } from "./index-D4JpYAtV.js";
1
+ import { L as s, F as t, I as n, J as r, K as o, E as i, G as l, U as d, Q as A, M as S, N as C, m as T, k as c, j as h, P as k, h as m, S as p, T as I, O as N, X as v, A as y, u as F, p as O, n as R, w as L, x as w, y as E, z as G, o as _, C as g, r as u, R as M, D as P, t as f, v as B, q as X } from "./index-CXBmeQii.js";
2
2
  export {
3
3
  s as API,
4
4
  t as BitcoinNetwork,
@@ -13,12 +13,12 @@ export {
13
13
  C as SUI_CONFIG,
14
14
  T as SecretManager,
15
15
  c as SolanaHTLC,
16
- k as SolanaRelay,
17
- p as SolanaRelayerAddress,
18
- I as StarknetHTLC,
19
- N as StarknetRelay,
20
- h as TRON_CONFIG,
21
- m as XRPL_CONFIG,
16
+ h as SolanaRelay,
17
+ k as SolanaRelayerAddress,
18
+ m as StarknetHTLC,
19
+ p as StarknetRelay,
20
+ I as TRON_CONFIG,
21
+ N as XRPL_CONFIG,
22
22
  v as XrplRelay,
23
23
  y as alpenTestnet,
24
24
  F as botanixMainnet,
@@ -29,10 +29,11 @@ export {
29
29
  E as hyperevm,
30
30
  G as hyperliquidTestnet,
31
31
  _ as isStarknetAllowanceSufficient,
32
+ g as megaethMainnet,
32
33
  u as resolveApiConfig,
33
- P as solanaProgramAddress,
34
- f as switchOrAddNetwork,
35
- g as toXOnly,
34
+ M as solanaProgramAddress,
35
+ P as switchOrAddNetwork,
36
+ f as toXOnly,
36
37
  B as validateBTCAddress,
37
- M as validateLTCAddress
38
+ X as validateLTCAddress
38
39
  };
@@ -16,7 +16,7 @@ export { checkAllowanceAndApprove as checkStarknetAllowanceAndApprove, isAllowan
16
16
  export { Quote } from './lib/quote/quote';
17
17
  export type { StrategiesResponse, BaseQuoteParams, IQuote, QuoteOptions, QuoteParamsForAssets, QuoteParamsForOrderPair, QuoteResponse, Strategies, } from './lib/quote/quote.types';
18
18
  export { validateBTCAddress, toXOnly, resolveApiConfig, validateLTCAddress, } from './lib/utils';
19
- export { botanixMainnet, evmToViemChainMap, getChainNameFromChainId, hyperevm, hyperliquidTestnet, alpenTestnet, switchOrAddNetwork, } from './lib/switchOrAddNetwork';
19
+ export { botanixMainnet, evmToViemChainMap, getChainNameFromChainId, hyperevm, hyperliquidTestnet, alpenTestnet, megaethMainnet, switchOrAddNetwork, } from './lib/switchOrAddNetwork';
20
20
  export { BitcoinNetwork } from './lib/bitcoin/provider/provider.interface';
21
21
  export { BitcoinProvider } from './lib/bitcoin/provider/provider';
22
22
  export { BitcoinWallet } from './lib/bitcoin/wallet/wallet';
@@ -148,6 +148,7 @@ export type GardenHTLCModules = {
148
148
  xrpl?: IXrplHTLC;
149
149
  litecoin?: IBitcoinHTLC;
150
150
  alpen_signet?: IBitcoinHTLC;
151
+ spark?: IBitcoinHTLC;
151
152
  };
152
153
  export type GardenWalletModules = {
153
154
  evm?: WalletClient;
@@ -6,9 +6,10 @@ export declare class Quote implements IQuote {
6
6
  private quoteUrl;
7
7
  private auth;
8
8
  constructor(quoteUrl: string, auth: IAuth);
9
- getQuoteFromAssets({ fromAsset, toAsset, amount, isExactOut, options, }: QuoteParamsForAssets): Promise<Err<string> | Ok<QuoteResponse[]>>;
9
+ getQuoteFromAssets({ fromAsset, toAsset, amount, isExactOut, options }: QuoteParamsForAssets): Promise<Err<string> | Ok<QuoteResponse[]>>;
10
10
  getQuote(from: AssetLike, to: AssetLike, amount: number, isExactOut?: boolean, options?: {
11
11
  affiliateFee?: number;
12
12
  request?: UtilsRequest;
13
+ indicative?: boolean;
13
14
  }): Promise<Err<string> | Ok<QuoteResponse[]>>;
14
15
  }
@@ -22,13 +22,14 @@ export interface IQuote {
22
22
  * Chain name and asset are separated by a colon(:) and chain pairs are separated by double colon(::)
23
23
  * @param amount - The amount to quote
24
24
  * @param isExactOut - Whether the amount is exact out
25
- * @param options { affiliateFee?: number; request?: Request } - The options for the quote request, affiliate fee in bps and request object
25
+ * @param options { affiliateFee?: number; request?: Request; indicative?: boolean } - The options for the quote request, affiliate fee in bps, request object and indicative flag to ignore liquidity checks
26
26
  */
27
27
  getQuote(from: AssetLike, to: AssetLike, amount: number, isExactOut: boolean, options?: QuoteOptions): AsyncResult<QuoteResponse[], string>;
28
28
  }
29
29
  export type QuoteOptions = {
30
30
  affiliateFee?: number;
31
31
  request?: Request;
32
+ indicative?: boolean;
32
33
  };
33
34
  export type BaseQuoteParams = {
34
35
  amount: number;
@@ -8,6 +8,8 @@ export declare const hyperliquidTestnet: viemChain;
8
8
  export declare const hyperevm: viemChain;
9
9
  export declare const alpenTestnet: viemChain;
10
10
  export declare const monadMainnet: viemChain;
11
+ export declare const citreaMainnet: viemChain;
12
+ export declare const megaethMainnet: viemChain;
11
13
  export declare const evmToViemChainMap: Record<EVMChains, viemChain>;
12
14
  export declare const getChainNameFromChainId: (chainId: number) => EVMChains | null;
13
15
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gardenfi/core",
3
- "version": "3.1.0",
3
+ "version": "3.1.2",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "build": "vite build",
@@ -29,8 +29,8 @@
29
29
  "dependencies": {
30
30
  "@coral-xyz/anchor": "^0.31.1",
31
31
  "@crossmarkio/sdk": "^0.4.0",
32
- "@gardenfi/orderbook": "3.1.0",
33
- "@gardenfi/utils": "3.1.0",
32
+ "@gardenfi/orderbook": "3.1.2",
33
+ "@gardenfi/utils": "3.1.1",
34
34
  "@mysten/signers": "^0.3.4",
35
35
  "@mysten/sui": "^1.37.1",
36
36
  "@mysten/wallet-standard": "^0.16.9",