@gardenfi/core 2.0.11 → 2.0.13

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.
@@ -12,5 +12,5 @@ export type { ISecretManager, Secret, } from './lib/secretManager/secretManager.
12
12
  export { Quote } from './lib/quote/quote';
13
13
  export type { IQuote, QuoteResponse, Strategies, } from './lib/quote/quote.types';
14
14
  export { constructOrderPair, validateBTCAddress } from './lib/utils';
15
- export { citreaTestnet, evmToViemChainMap, switchOrAddNetwork, } from './lib/switchOrAddNetwork';
15
+ export { evmToViemChainMap, switchOrAddNetwork, } from './lib/switchOrAddNetwork';
16
16
  export { API } from './lib/constants';
@@ -54,6 +54,7 @@ export declare class GardenHTLC implements IHTLCWallet {
54
54
  */
55
55
  id(): string;
56
56
  private _buildRawTx;
57
+ private _tempBuildRawTx;
57
58
  /**
58
59
  * Builds a raw unsigned transaction with utxos from gardenHTLC address
59
60
  * and uses signer's address as the output address
@@ -78,7 +79,7 @@ export declare class GardenHTLC implements IHTLCWallet {
78
79
  /**
79
80
  * Reveals the secret and redeems the HTLC
80
81
  */
81
- redeem(secret: string, receiver?: string, fee?: number): Promise<string>;
82
+ redeem(secret: string, receiver?: string): Promise<string>;
82
83
  /**
83
84
  * Refunds the funds back to the initiator if the expiry block height + 1 is reached
84
85
  */
@@ -7,3 +7,8 @@ export declare class ExecutorCache implements IOrderExecutorCache {
7
7
  get(order: MatchedOrder, action: OrderActions): OrderCacheValue | null;
8
8
  remove(order: MatchedOrder, action: OrderActions): void;
9
9
  }
10
+ export declare class Cache<T> {
11
+ private cache;
12
+ set(key: string, value: T): void;
13
+ get(key: string): T | null;
14
+ }
@@ -22,6 +22,7 @@ export declare class Garden extends EventBroker<GardenEvents> implements IGarden
22
22
  private _evmRelay;
23
23
  private _evmWallet;
24
24
  private _btcWallet;
25
+ private bitcoinRedeemCache;
25
26
  constructor(config: GardenProps);
26
27
  get orderbookUrl(): string;
27
28
  get evmRelay(): IEVMRelay;
@@ -3,43 +3,6 @@ import { Chain, EvmChain } from '@gardenfi/orderbook';
3
3
  import { WalletClient } from 'viem';
4
4
  import { AsyncResult } from '@catalogfi/utils';
5
5
 
6
- export declare const citreaTestnet: {
7
- blockExplorers: {
8
- readonly default: {
9
- readonly name: "Citrea Explorer";
10
- readonly url: "https://explorer.testnet.citrea.xyz";
11
- readonly apiUrl: "https://explorer.testnet.citrea.xyz/api/v2/";
12
- };
13
- };
14
- contracts?: import('viem').Prettify<{
15
- [key: string]: import('viem').ChainContract | {
16
- [sourceId: number]: import('viem').ChainContract | undefined;
17
- } | undefined;
18
- } & {
19
- ensRegistry?: import('viem').ChainContract | undefined;
20
- ensUniversalResolver?: import('viem').ChainContract | undefined;
21
- multicall3?: import('viem').ChainContract | undefined;
22
- universalSignatureVerifier?: import('viem').ChainContract | undefined;
23
- }> | undefined;
24
- id: 5115;
25
- name: "Citrea Testnet";
26
- nativeCurrency: {
27
- readonly name: "";
28
- readonly symbol: "cBTC";
29
- readonly decimals: 18;
30
- };
31
- rpcUrls: {
32
- readonly default: {
33
- readonly http: readonly ["https://rpc.testnet.citrea.xyz"];
34
- };
35
- };
36
- sourceId?: number | undefined;
37
- testnet: true;
38
- custom?: Record<string, unknown> | undefined;
39
- fees?: import('viem').ChainFees<undefined> | undefined;
40
- formatters?: undefined;
41
- serializers?: import('viem').ChainSerializers<undefined, import('viem').TransactionSerializable> | undefined;
42
- };
43
6
  export declare const evmToViemChainMap: Record<EvmChain, viemChain>;
44
7
  /**
45
8
  * Switches or adds a network to the wallet
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gardenfi/core",
3
- "version": "2.0.11",
3
+ "version": "2.0.13",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "build": "vite build",
@@ -26,8 +26,8 @@
26
26
  "registry": "https://registry.npmjs.org/"
27
27
  },
28
28
  "dependencies": {
29
- "@catalogfi/wallets": "^0.2.51",
30
- "@gardenfi/orderbook": "^2.0.3",
29
+ "@catalogfi/wallets": "^0.2.57",
30
+ "@gardenfi/orderbook": "^2.0.4",
31
31
  "@gardenfi/utils": "^2.0.1",
32
32
  "bignumber.js": "^9.1.2",
33
33
  "bitcoinjs-lib": "^6.1.6",