@gardenfi/core 2.2.1-beta.1 → 2.2.1

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 (47) hide show
  1. package/dist/{ccip-Bllqmmv_.js → ccip-BkdyF3_3.js} +1 -1
  2. package/dist/{ccip-B1_TRO36.cjs → ccip-l_tRzCaI.cjs} +1 -1
  3. package/dist/index-eHNvzW2C.js +26591 -0
  4. package/dist/index-lHPQc7tc.cjs +84 -0
  5. package/dist/index.cjs +1 -1
  6. package/dist/index.js +34 -37
  7. package/dist/src/index.d.ts +0 -4
  8. package/dist/src/lib/bitcoin/htlc.d.ts +1 -2
  9. package/dist/src/lib/blockNumberFetcher/blockNumber.d.ts +2 -1
  10. package/dist/src/lib/evm/htlc/evmHTLC.d.ts +1 -1
  11. package/dist/src/lib/evm/htlc/evmHTLC.types.d.ts +2 -2
  12. package/dist/src/lib/evm/relay/evmRelay.types.d.ts +2 -1
  13. package/dist/src/lib/garden/garden.d.ts +3 -2
  14. package/dist/src/lib/garden/garden.types.d.ts +4 -3
  15. package/dist/src/lib/quote/quote.d.ts +4 -4
  16. package/dist/src/lib/quote/quote.types.d.ts +2 -1
  17. package/dist/src/lib/secretManager/secretManager.d.ts +5 -5
  18. package/dist/src/lib/secretManager/secretManager.types.d.ts +2 -1
  19. package/dist/src/lib/solana/htlc/ISolanaHTLC.d.ts +1 -1
  20. package/dist/src/lib/solana/htlc/solanaHTLC.d.ts +1 -1
  21. package/dist/src/lib/solana/relayer/solanaRelay.d.ts +2 -1
  22. package/dist/src/lib/starknet/checkAllowanceAndApprove.d.ts +1 -1
  23. package/dist/src/lib/starknet/htlc/starknetHTLC.d.ts +2 -1
  24. package/dist/src/lib/starknet/relay/starknetRelay.d.ts +2 -1
  25. package/dist/src/lib/starknet/starknetHTLC.types.d.ts +1 -1
  26. package/dist/src/lib/switchOrAddNetwork.d.ts +1 -1
  27. package/dist/src/lib/utils.d.ts +2 -7
  28. package/package.json +7 -9
  29. package/dist/index-D10jIxwi.js +0 -24321
  30. package/dist/index-DyvVJhoD.cjs +0 -99
  31. package/dist/src/lib/bitcoin/API.d.ts +0 -4
  32. package/dist/src/lib/bitcoin/ASConfig.d.ts +0 -19
  33. package/dist/src/lib/bitcoin/errors.d.ts +0 -16
  34. package/dist/src/lib/bitcoin/htlcScript.d.ts +0 -7
  35. package/dist/src/lib/bitcoin/interface.d.ts +0 -6
  36. package/dist/src/lib/bitcoin/paths.d.ts +0 -7
  37. package/dist/src/lib/bitcoin/provider/provider.d.ts +0 -118
  38. package/dist/src/lib/bitcoin/provider/provider.interface.d.ts +0 -99
  39. package/dist/src/lib/bitcoin/script.d.ts +0 -6
  40. package/dist/src/lib/bitcoin/sig.d.ts +0 -20
  41. package/dist/src/lib/bitcoin/utils.d.ts +0 -8
  42. package/dist/src/lib/bitcoin/wallet/abstractWallet.d.ts +0 -145
  43. package/dist/src/lib/bitcoin/wallet/baseWallet.d.ts +0 -13
  44. package/dist/src/lib/bitcoin/wallet/wallet.d.ts +0 -103
  45. package/dist/src/lib/bitcoin/wallet/wallet.interface.d.ts +0 -79
  46. package/dist/src/lib/htlc.interface.d.ts +0 -7
  47. package/dist/src/lib/identifier.d.ts +0 -19
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-DyvVJhoD.cjs");exports.API=e.API;exports.BitcoinNetwork=e.BitcoinNetwork;exports.BitcoinProvider=e.BitcoinProvider;exports.BitcoinWallet=e.BitcoinWallet;exports.BlockNumberFetcher=e.BlockNumberFetcher;exports.EvmRelay=e.EvmRelay;exports.Garden=e.Garden;exports.OrderActions=e.OrderActions;exports.OrderStatus=e.OrderStatus;exports.ParseOrderStatus=e.ParseOrderStatus;exports.ParseSwapStatus=e.ParseSwapStatus;exports.Quote=e.Quote;exports.STARKNET_CONFIG=e.STARKNET_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.SwapStatus=e.SwapStatus;exports.botanix=e.botanixMainnet;exports.checkStarknetAlloance=e.checkAllowance;exports.checkStarknetAllowanceAndApprove=e.checkAllowanceAndApprove;exports.constructOrderPair=e.constructOrderPair;exports.evmToViemChainMap=e.evmToViemChainMap;exports.filterDeadlineExpiredOrders=e.filterDeadlineExpiredOrders;exports.hyperliquid=e.hyperliquid;exports.hyperliquidTestnet=e.hyperliquidTestnet;exports.isExpired=e.isExpired;exports.isStarknetAllowanceSufficient=e.isAllowanceSufficient;exports.parseAction=e.parseAction;exports.parseActionFromStatus=e.parseActionFromStatus;exports.resolveApiConfig=e.resolveApiConfig;exports.solanaProgramAddress=e.solanaProgramAddress;exports.switchOrAddNetwork=e.switchOrAddNetwork;exports.toXOnly=e.toXOnly;exports.validateBTCAddress=e.validateBTCAddress;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-lHPQc7tc.cjs");exports.API=e.API;exports.BlockNumberFetcher=e.BlockNumberFetcher;exports.EvmRelay=e.EvmRelay;exports.Garden=e.Garden;exports.OrderActions=e.OrderActions;exports.OrderStatus=e.OrderStatus;exports.ParseOrderStatus=e.ParseOrderStatus;exports.ParseSwapStatus=e.ParseSwapStatus;exports.Quote=e.Quote;exports.STARKNET_CONFIG=e.STARKNET_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.SwapStatus=e.SwapStatus;exports.botanix=e.botanixMainnet;exports.checkStarknetAlloance=e.checkAllowance;exports.checkStarknetAllowanceAndApprove=e.checkAllowanceAndApprove;exports.constructOrderPair=e.constructOrderPair;exports.evmToViemChainMap=e.evmToViemChainMap;exports.filterDeadlineExpiredOrders=e.filterDeadlineExpiredOrders;exports.hyperliquid=e.hyperliquid;exports.hyperliquidTestnet=e.hyperliquidTestnet;exports.isExpired=e.isExpired;exports.isStarknetAllowanceSufficient=e.isAllowanceSufficient;exports.parseAction=e.parseAction;exports.parseActionFromStatus=e.parseActionFromStatus;exports.resolveApiConfig=e.resolveApiConfig;exports.solanaProgramAddress=e.solanaProgramAddress;exports.switchOrAddNetwork=e.switchOrAddNetwork;exports.toXOnly=e.toXOnly;exports.validateBTCAddress=e.validateBTCAddress;
package/dist/index.js CHANGED
@@ -1,40 +1,37 @@
1
- import { T as e, M as r, N as t, R as i, m as n, E as o, G as l, O as d, n as c, P as S, q as A, Q as p, U as u, v as k, k as O, j as h, V as m, h as w, S as y, o as T, L as v, y as C, w as P, z as N, F as R, t as f, K as x, J as B, r as E, x as F, p as g, u as q, D as G, W as I, I as L, C as M, A as b } from "./index-D10jIxwi.js";
1
+ import { M as e, m as r, E as t, G as n, O as o, n as i, P as l, q as d, Q as S, N as c, v as A, k as p, j as u, R as k, h as O, S as h, o as m, L as y, y as T, w, z as C, F as v, t as P, K as R, J as f, r as x, x as E, p as N, u as F, D as g, T as q, I as G, C as I, A as L } from "./index-eHNvzW2C.js";
2
2
  export {
3
3
  e as API,
4
- r as BitcoinNetwork,
5
- t as BitcoinProvider,
6
- i as BitcoinWallet,
7
- n as BlockNumberFetcher,
8
- o as EvmRelay,
9
- l as Garden,
10
- d as OrderActions,
11
- c as OrderStatus,
12
- S as ParseOrderStatus,
13
- A as ParseSwapStatus,
14
- p as Quote,
15
- u as STARKNET_CONFIG,
16
- k as SecretManager,
17
- O as SolanaHTLC,
18
- h as SolanaRelay,
19
- m as SolanaRelayerAddress,
20
- w as StarknetHTLC,
21
- y as StarknetRelay,
22
- T as SwapStatus,
23
- v as botanix,
24
- C as checkStarknetAlloance,
25
- P as checkStarknetAllowanceAndApprove,
26
- N as constructOrderPair,
27
- R as evmToViemChainMap,
28
- f as filterDeadlineExpiredOrders,
29
- x as hyperliquid,
30
- B as hyperliquidTestnet,
31
- E as isExpired,
32
- F as isStarknetAllowanceSufficient,
33
- g as parseAction,
34
- q as parseActionFromStatus,
35
- G as resolveApiConfig,
36
- I as solanaProgramAddress,
37
- L as switchOrAddNetwork,
38
- M as toXOnly,
39
- b as validateBTCAddress
4
+ r as BlockNumberFetcher,
5
+ t as EvmRelay,
6
+ n as Garden,
7
+ o as OrderActions,
8
+ i as OrderStatus,
9
+ l as ParseOrderStatus,
10
+ d as ParseSwapStatus,
11
+ S as Quote,
12
+ c as STARKNET_CONFIG,
13
+ A as SecretManager,
14
+ p as SolanaHTLC,
15
+ u as SolanaRelay,
16
+ k as SolanaRelayerAddress,
17
+ O as StarknetHTLC,
18
+ h as StarknetRelay,
19
+ m as SwapStatus,
20
+ y as botanix,
21
+ T as checkStarknetAlloance,
22
+ w as checkStarknetAllowanceAndApprove,
23
+ C as constructOrderPair,
24
+ v as evmToViemChainMap,
25
+ P as filterDeadlineExpiredOrders,
26
+ R as hyperliquid,
27
+ f as hyperliquidTestnet,
28
+ x as isExpired,
29
+ E as isStarknetAllowanceSufficient,
30
+ N as parseAction,
31
+ F as parseActionFromStatus,
32
+ g as resolveApiConfig,
33
+ q as solanaProgramAddress,
34
+ G as switchOrAddNetwork,
35
+ I as toXOnly,
36
+ L as validateBTCAddress
40
37
  };
@@ -21,8 +21,4 @@ export { Quote } from './lib/quote/quote';
21
21
  export type { IQuote, QuoteResponse, Strategies, } from './lib/quote/quote.types';
22
22
  export { constructOrderPair, validateBTCAddress, toXOnly, resolveApiConfig, } from './lib/utils';
23
23
  export { evmToViemChainMap, switchOrAddNetwork, hyperliquidTestnet, hyperliquid, botanixMainnet as botanix, } from './lib/switchOrAddNetwork';
24
- export { BitcoinNetwork } from './lib/bitcoin/provider/provider.interface';
25
- export { BitcoinProvider } from './lib/bitcoin/provider/provider';
26
- export { BitcoinWallet } from './lib/bitcoin/wallet/wallet';
27
- export type { IBitcoinProvider } from './lib/bitcoin/provider/provider.interface';
28
24
  export { API, STARKNET_CONFIG, SolanaRelayerAddress, solanaProgramAddress, } from './lib/constants';
@@ -1,5 +1,4 @@
1
- import { IHTLCWallet } from '../htlc.interface';
2
- import { IBitcoinWallet } from './wallet/wallet.interface';
1
+ import { IBitcoinWallet, IHTLCWallet } from '@catalogfi/wallets';
3
2
 
4
3
  export declare enum Leaf {
5
4
  REFUND = 0,
@@ -1,5 +1,6 @@
1
+ import { AsyncResult } from '@catalogfi/utils';
1
2
  import { Chain } from '@gardenfi/orderbook';
2
- import { Environment, AsyncResult } from '@gardenfi/utils';
3
+ import { Environment } from '@gardenfi/utils';
3
4
 
4
5
  type Response = {
5
6
  [key in Chain]: number;
@@ -1,6 +1,6 @@
1
+ import { IHTLCWallet } from '@catalogfi/wallets';
1
2
  import { EVMSwapConfig } from './evmHTLC.types';
2
3
  import { Address, WalletClient } from 'viem';
3
- import { IHTLCWallet } from '../../htlc.interface';
4
4
 
5
5
  export declare class EVMHTLC implements IHTLCWallet {
6
6
  private swap;
@@ -1,5 +1,5 @@
1
- import { MarkRequired } from '@gardenfi/utils';
2
- import { OnChainIdentifier } from '../../identifier';
1
+ import { MarkRequired } from '@catalogfi/utils';
2
+ import { OnChainIdentifier } from '@catalogfi/wallets';
3
3
  import { Address } from 'viem';
4
4
 
5
5
  export type AtomicSwapConfig = {
@@ -1,5 +1,6 @@
1
+ import { AsyncResult } from '@catalogfi/utils';
1
2
  import { MatchedOrder } from '@gardenfi/orderbook';
2
- import { AsyncResult, IStore } from '@gardenfi/utils';
3
+ import { IStore } from '@gardenfi/utils';
3
4
  import { WalletClient } from 'viem';
4
5
 
5
6
  export type EVMRelayOpts = {
@@ -1,12 +1,13 @@
1
1
  import { ISecretManager } from './../secretManager/secretManager.types';
2
+ import { AsyncResult } from '@catalogfi/utils';
2
3
  import { GardenEvents, IGardenJS, SwapParams, GardenConfigWithHTLCs, GardenConfigWithWallets } from './garden.types';
3
4
  import { IOrderbook, MatchedOrder } from '@gardenfi/orderbook';
4
- import { EventBroker, IAuth, DigestKey, AsyncResult } from '@gardenfi/utils';
5
+ import { EventBroker, IAuth, DigestKey } from '@gardenfi/utils';
5
6
  import { IQuote } from '../quote/quote.types';
7
+ import { IBitcoinWallet } from '@catalogfi/wallets';
6
8
  import { IBlockNumberFetcher } from '../blockNumberFetcher/blockNumber';
7
9
  import { IEVMHTLC } from '../evm/htlc.types';
8
10
  import { IStarknetHTLC } from '../starknet/starknetHTLC.types';
9
- import { IBitcoinWallet } from '../bitcoin/wallet/wallet.interface';
10
11
  import { ISolanaHTLC } from '../solana/htlc/ISolanaHTLC';
11
12
 
12
13
  export declare class Garden extends EventBroker<GardenEvents> implements IGardenJS {
@@ -1,15 +1,16 @@
1
+ import { AsyncResult } from '@catalogfi/utils';
1
2
  import { AffiliateFeeOptionalChainAsset, Asset, IOrderbook, MatchedOrder } from '@gardenfi/orderbook';
2
3
  import { OrderStatus } from '../orderStatus/status';
3
- import { AsyncResult, Environment, EventBroker, IAuth, DigestKey } from '@gardenfi/utils';
4
+ import { Environment, EventBroker, IAuth, DigestKey } from '@gardenfi/utils';
4
5
  import { ISecretManager } from '../secretManager/secretManager.types';
5
6
  import { IQuote } from '../quote/quote.types';
6
7
  import { IBlockNumberFetcher } from '../blockNumberFetcher/blockNumber';
8
+ import { BitcoinWallet, IBitcoinWallet } from '@catalogfi/wallets';
7
9
  import { IEVMHTLC } from '../evm/htlc.types';
8
10
  import { IStarknetHTLC } from '../starknet/starknetHTLC.types';
9
11
  import { AccountInterface } from 'starknet';
10
12
  import { WalletClient } from 'viem';
11
13
  import { Api } from '../constants';
12
- import { IBitcoinWallet } from '../bitcoin/wallet/wallet.interface';
13
14
  import { ISolanaHTLC } from '../solana/htlc/ISolanaHTLC';
14
15
  import { AnchorProvider } from '@coral-xyz/anchor';
15
16
 
@@ -158,7 +159,7 @@ export type GardenCoreConfig = {
158
159
  orderbook?: IOrderbook;
159
160
  quote?: IQuote;
160
161
  blockNumberFetcher?: IBlockNumberFetcher;
161
- btcWallet?: IBitcoinWallet;
162
+ btcWallet?: BitcoinWallet;
162
163
  solanaProgramAddress?: string;
163
164
  };
164
165
  export type GardenHTLCModules = {
@@ -1,6 +1,6 @@
1
+ import { AsyncResult, Request } from '@catalogfi/utils';
1
2
  import { IQuote, QuoteResponse, Strategies } from './quote.types';
2
3
  import { Asset, CreateOrderRequestWithAdditionalData, CreateOrderReqWithStrategyId } from '@gardenfi/orderbook';
3
- import { AsyncResult, Err, Ok } from '@gardenfi/utils';
4
4
 
5
5
  export declare class Quote implements IQuote {
6
6
  private quoteUrl;
@@ -8,11 +8,11 @@ export declare class Quote implements IQuote {
8
8
  getQuoteFromAssets(fromAsset: Asset, toAsset: Asset, amount: number, isExactOut?: boolean, options?: {
9
9
  affiliateFee?: number;
10
10
  request?: Request;
11
- }): Promise<Err<string> | Ok<QuoteResponse>>;
11
+ }): Promise<import('@catalogfi/utils').Result<never, string> | import('@catalogfi/utils').Result<QuoteResponse, never>>;
12
12
  getQuote(orderpair: string, amount: number, isExactOut?: boolean, options?: {
13
13
  affiliateFee?: number;
14
14
  request?: Request;
15
- }): Promise<Err<string> | Ok<QuoteResponse>>;
15
+ }): Promise<import('@catalogfi/utils').Result<never, string> | import('@catalogfi/utils').Result<QuoteResponse, never>>;
16
16
  getAttestedQuote(order: CreateOrderReqWithStrategyId): AsyncResult<CreateOrderRequestWithAdditionalData, string>;
17
- getStrategies(): Promise<Err<string> | Ok<Strategies>>;
17
+ getStrategies(): Promise<import('@catalogfi/utils').Result<never, string> | import('@catalogfi/utils').Result<Strategies, never>>;
18
18
  }
@@ -1,5 +1,6 @@
1
+ import { AsyncResult, Request } from '@catalogfi/utils';
1
2
  import { Asset, Chain, CreateOrderRequestWithAdditionalData, CreateOrderReqWithStrategyId } from '@gardenfi/orderbook';
2
- import { APIResponse, AsyncResult } from '@gardenfi/utils';
3
+ import { APIResponse } from '@gardenfi/utils';
3
4
 
4
5
  export interface IQuote {
5
6
  /**
@@ -1,5 +1,5 @@
1
1
  import { WalletClient } from 'viem';
2
- import { Err, EventBroker, Ok } from '@gardenfi/utils';
2
+ import { EventBroker } from '@gardenfi/utils';
3
3
  import { ISecretManager, SecretManagerEvents } from './secretManager.types';
4
4
 
5
5
  export declare class SecretManager extends EventBroker<SecretManagerEvents> implements ISecretManager {
@@ -9,12 +9,12 @@ export declare class SecretManager extends EventBroker<SecretManagerEvents> impl
9
9
  private constructor();
10
10
  static fromDigestKey(digestKey: string): SecretManager;
11
11
  static fromWalletClient(walletClient: WalletClient): SecretManager;
12
- initialize(): Promise<Err<string> | Ok<string>>;
12
+ initialize(): Promise<import('@catalogfi/utils').Result<never, string> | import('@catalogfi/utils').Result<string, never>>;
13
13
  private deriveDigestKeyFromWalletClient;
14
- getDigestKey(): Promise<Err<string> | Ok<string>>;
15
- generateSecret(nonce: string): Promise<Err<string> | Ok<{
14
+ getDigestKey(): Promise<import('@catalogfi/utils').Result<never, string> | import('@catalogfi/utils').Result<string, never>>;
15
+ generateSecret(nonce: string): Promise<import('@catalogfi/utils').Result<never, string> | import('@catalogfi/utils').Result<{
16
16
  secret: `0x${string}`;
17
17
  secretHash: `0x${string}`;
18
- }>>;
18
+ }, never>>;
19
19
  private signMessage;
20
20
  }
@@ -1,4 +1,5 @@
1
- import { AsyncResult, EventBroker } from '@gardenfi/utils';
1
+ import { AsyncResult } from '@catalogfi/utils';
2
+ import { EventBroker } from '@gardenfi/utils';
2
3
 
3
4
  export type Secret = {
4
5
  secretHash: string;
@@ -1,5 +1,5 @@
1
1
  import { MatchedOrder } from '@gardenfi/orderbook';
2
- import { AsyncResult } from '@gardenfi/utils';
2
+ import { AsyncResult } from '@catalogfi/utils';
3
3
 
4
4
  export interface ISolanaHTLC {
5
5
  /**
@@ -1,7 +1,7 @@
1
1
  import { AnchorProvider } from '@coral-xyz/anchor';
2
2
  import { ISolanaHTLC } from './ISolanaHTLC';
3
3
  import { MatchedOrder } from '@gardenfi/orderbook';
4
- import { AsyncResult } from '@gardenfi/utils';
4
+ import { AsyncResult } from '@catalogfi/utils';
5
5
 
6
6
  /**
7
7
  * SolanaHTLC is an implementation of ISolanaHTLC that performs atomic swaps directly on-chain.
@@ -1,5 +1,6 @@
1
1
  import { AnchorProvider } from '@coral-xyz/anchor';
2
- import { AsyncResult, Url } from '@gardenfi/utils';
2
+ import { AsyncResult } from '@catalogfi/utils';
3
+ import { Url } from '@gardenfi/utils';
3
4
  import { ISolanaHTLC } from '../htlc/ISolanaHTLC';
4
5
  import { MatchedOrder } from '@gardenfi/orderbook';
5
6
 
@@ -1,5 +1,5 @@
1
1
  import { AccountInterface, RpcProvider } from 'starknet';
2
- import { AsyncResult } from '@gardenfi/utils';
2
+ import { AsyncResult } from '@catalogfi/utils';
3
3
 
4
4
  export declare const checkAllowanceAndApprove: (account: AccountInterface, tokenAddress: string, htlcAddress: string, amount: bigint, starknetProvider: RpcProvider) => AsyncResult<string, string>;
5
5
  export declare const checkAllowance: (accountAddress: string, tokenAddress: string, htlcAddress: string, starknetProvider: RpcProvider) => AsyncResult<bigint, string>;
@@ -1,6 +1,7 @@
1
1
  import { MatchedOrder } from '@gardenfi/orderbook';
2
+ import { AsyncResult } from '@catalogfi/utils';
2
3
  import { Account, CallData } from 'starknet';
3
- import { AsyncResult, Network } from '@gardenfi/utils';
4
+ import { Network } from '@gardenfi/utils';
4
5
  import { IStarknetHTLC } from '../starknetHTLC.types';
5
6
 
6
7
  export declare class StarknetHTLC implements IStarknetHTLC {
@@ -1,6 +1,7 @@
1
1
  import { AccountInterface } from 'starknet';
2
2
  import { MatchedOrder } from '@gardenfi/orderbook';
3
- import { AsyncResult, Network, Url } from '@gardenfi/utils';
3
+ import { AsyncResult } from '@catalogfi/utils';
4
+ import { Network, Url } from '@gardenfi/utils';
4
5
  import { IStarknetHTLC } from '../starknetHTLC.types';
5
6
 
6
7
  export declare class StarknetRelay implements IStarknetHTLC {
@@ -1,5 +1,5 @@
1
1
  import { MatchedOrder } from '@gardenfi/orderbook';
2
- import { AsyncResult } from '@gardenfi/utils';
2
+ import { AsyncResult } from '@catalogfi/utils';
3
3
 
4
4
  export interface IStarknetHTLC {
5
5
  /**
@@ -1,7 +1,7 @@
1
1
  import { Chain as viemChain } from 'viem/chains';
2
2
  import { EvmChain } from '@gardenfi/orderbook';
3
3
  import { WalletClient } from 'viem';
4
- import { AsyncResult } from '@gardenfi/utils';
4
+ import { AsyncResult } from '@catalogfi/utils';
5
5
 
6
6
  export declare const botanixMainnet: viemChain;
7
7
  export declare const hyperliquidTestnet: viemChain;
@@ -1,10 +1,9 @@
1
+ import { BitcoinNetwork, IBaseWallet } from '@catalogfi/wallets';
1
2
  import { Environment, Err, Ok } from '@gardenfi/utils';
2
3
  import { Chain } from '@gardenfi/orderbook';
3
4
  import { Signature } from 'starknet';
4
5
  import { Api } from './constants';
5
6
  import { ApiConfig } from './garden/garden.types';
6
- import { BitcoinNetwork } from './bitcoin/provider/provider.interface';
7
- import { IBaseWallet } from './bitcoin/wallet/baseWallet';
8
7
  import { web3 } from '@coral-xyz/anchor';
9
8
 
10
9
  export declare function resolveApiConfig(env: ApiConfig): {
@@ -33,9 +32,5 @@ export declare const constructOrderPair: (sourceChain: Chain, sourceAsset: strin
33
32
  export declare function validateBTCAddress(address: string, networkType: Environment): boolean;
34
33
  export declare const getBitcoinNetwork: (network: Environment) => BitcoinNetwork;
35
34
  export declare const isHexString: (value: string) => boolean;
36
- export declare const formatStarknetSignature: (sig: Signature) => Err<string> | Ok<string[]>;
37
- export declare function reversify(val: string): Buffer;
38
- export declare function isErrorWithMessage(err: unknown): err is {
39
- message: string;
40
- };
35
+ export declare const formatStarknetSignature: (sig: Signature) => Ok<string[]> | Err<string>;
41
36
  export declare const waitForSolanaTxConfirmation: (connection: web3.Connection, txHash: string) => Promise<boolean>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gardenfi/core",
3
- "version": "2.2.1-beta.1",
3
+ "version": "2.2.1",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "build": "vite build",
@@ -26,18 +26,16 @@
26
26
  "registry": "https://registry.npmjs.org/"
27
27
  },
28
28
  "dependencies": {
29
+ "@catalogfi/utils": "^0.1.6",
30
+ "@catalogfi/wallets": "^0.2.59",
29
31
  "@coral-xyz/anchor": "^0.30.1",
30
- "@gardenfi/orderbook": "2.2.1-beta.1",
31
- "@gardenfi/utils": "2.2.1-beta.1",
32
+ "@gardenfi/orderbook": "2.2.1",
33
+ "@gardenfi/utils": "2.2.1",
32
34
  "bignumber.js": "^9.1.2",
33
- "bip32": "^4.0.0",
34
- "bip39": "^3.1.0",
35
- "bitcoinjs-lib": "^6.1.5",
36
- "ecpair": "^2.1.0",
35
+ "bitcoinjs-lib": "^6.1.6",
37
36
  "starknet": "6.23.1",
38
37
  "tiny-secp256k1": "^2.2.3",
39
- "varuint-bitcoin": "^1.1.2",
40
- "yup": "^1.4.0"
38
+ "varuint-bitcoin": "^1.1.2"
41
39
  },
42
40
  "devDependencies": {
43
41
  "dotenv": "^16.3.1",