@gardenfi/core 2.5.3 → 3.0.0

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 (48) hide show
  1. package/dist/{ccip-DSGVoxhU.cjs → ccip-DGrkijK3.cjs} +1 -1
  2. package/dist/{ccip-Bg3f6Dwh.js → ccip-DoKK2Eev.js} +1 -1
  3. package/dist/index-BB1moYTm.cjs +106 -0
  4. package/dist/index-dcGJN5tW.js +33698 -0
  5. package/dist/index.cjs +1 -1
  6. package/dist/index.js +32 -39
  7. package/dist/src/index.d.ts +7 -12
  8. package/dist/src/lib/bitcoin/API.d.ts +3 -1
  9. package/dist/src/lib/bitcoin/bitcoinHtlc.d.ts +98 -0
  10. package/dist/src/lib/bitcoin/bitcoinhtlc.types.d.ts +53 -0
  11. package/dist/src/lib/bitcoin/provider/provider.d.ts +2 -1
  12. package/dist/src/lib/bitcoin/wallet/abstractWallet.d.ts +1 -1
  13. package/dist/src/lib/bitcoin/wallet/wallet.d.ts +1 -1
  14. package/dist/src/lib/bitcoin/wallet/wallet.interface.d.ts +1 -1
  15. package/dist/src/lib/constants.d.ts +4 -9
  16. package/dist/src/lib/evm/htlc/evmHTLC.d.ts +102 -102
  17. package/dist/src/lib/evm/htlc.types.d.ts +4 -4
  18. package/dist/src/lib/evm/relay/evmRelay.d.ts +9 -11
  19. package/dist/src/lib/evm/relay/htlcInitiate.d.ts +25 -0
  20. package/dist/src/lib/garden/cache/GardenCache.d.ts +45 -0
  21. package/dist/src/lib/garden/executor/executor.d.ts +26 -0
  22. package/dist/src/lib/garden/garden.d.ts +43 -52
  23. package/dist/src/lib/garden/garden.types.d.ts +70 -103
  24. package/dist/src/lib/garden/utils.d.ts +4 -0
  25. package/dist/src/lib/quote/quote.d.ts +8 -7
  26. package/dist/src/lib/quote/quote.types.d.ts +21 -13
  27. package/dist/src/lib/relayer/relayer.d.ts +9 -0
  28. package/dist/src/lib/solana/htlc/ISolanaHTLC.d.ts +4 -4
  29. package/dist/src/lib/solana/htlc/solanaHTLC.d.ts +7 -7
  30. package/dist/src/lib/solana/relayer/solanaRelay.d.ts +28 -35
  31. package/dist/src/lib/solana/solanaTypes.d.ts +6 -6
  32. package/dist/src/lib/starknet/htlc/starknetHTLC.d.ts +4 -4
  33. package/dist/src/lib/starknet/relay/starknetRelay.d.ts +9 -5
  34. package/dist/src/lib/starknet/starknetHTLC.types.d.ts +4 -4
  35. package/dist/src/lib/sui/htlc/suiHTLC.d.ts +7 -6
  36. package/dist/src/lib/sui/relay/suiRelay.d.ts +8 -5
  37. package/dist/src/lib/sui/suiHTLC.types.d.ts +4 -4
  38. package/dist/src/lib/switchOrAddNetwork.d.ts +5 -3
  39. package/dist/src/lib/utils.d.ts +38 -6
  40. package/package.json +4 -3
  41. package/dist/index-D-NHDZrP.js +0 -31936
  42. package/dist/index-s2tkcnpk.cjs +0 -105
  43. package/dist/src/lib/bitcoin/htlc.d.ts +0 -106
  44. package/dist/src/lib/blockNumberFetcher/blockNumber.d.ts +0 -15
  45. package/dist/src/lib/evm/relay/evmRelay.types.d.ts +0 -26
  46. package/dist/src/lib/garden/cache/executorCache.d.ts +0 -14
  47. package/dist/src/lib/orderStatus/orderStatusParser.d.ts +0 -37
  48. package/dist/src/lib/orderStatus/status.d.ts +0 -130
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-s2tkcnpk.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.isOrderExpired=e.isOrderExpired;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-BB1moYTm.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.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.alpenTestnet=e.alpenTestnet;exports.botanixMainnet=e.botanixMainnet;exports.checkStarknetAlloance=e.checkAllowance;exports.checkStarknetAllowanceAndApprove=e.checkAllowanceAndApprove;exports.constructOrderPair=e.constructOrderPair;exports.evmToViemChainMap=e.evmToViemChainMap;exports.getChainNameFromChainId=e.getChainNameFromChainId;exports.hyperliquid=e.hyperliquid;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;
package/dist/index.js CHANGED
@@ -1,41 +1,34 @@
1
- import { U as e, N as r, R as t, T as i, m as n, E as o, G as d, O as l, n as c, P as S, q as A, Q as p, V as u, w as k, k as O, j as h, W as m, h as w, S as y, o as T, M as v, z as C, x as P, A as x, I as E, u as N, L as R, K as f, r as B, t as F, y as g, p as q, v as G, F as I, X as L, J as M, D as b, C as D } from "./index-D-NHDZrP.js";
1
+ import { K as s, D as t, F as n, I as r, J as o, E as i, G as l, Q as A, L as d, M as c, m as S, k as T, j as k, N as C, h, S as p, A as m, u as y, p as I, n as v, q as F, w as N, x as u, y as w, z as E, o as O, r as L, O as R, C as f, t as g, v as B } from "./index-dcGJN5tW.js";
2
2
  export {
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
- d as Garden,
10
- l 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
- x as constructOrderPair,
27
- E as evmToViemChainMap,
28
- N as filterDeadlineExpiredOrders,
29
- R as hyperliquid,
30
- f as hyperliquidTestnet,
31
- B as isExpired,
32
- F as isOrderExpired,
33
- g as isStarknetAllowanceSufficient,
34
- q as parseAction,
35
- G as parseActionFromStatus,
36
- I as resolveApiConfig,
37
- L as solanaProgramAddress,
38
- M as switchOrAddNetwork,
39
- b as toXOnly,
40
- D as validateBTCAddress
3
+ s as API,
4
+ t as BitcoinNetwork,
5
+ n as BitcoinProvider,
6
+ r as BitcoinWallet,
7
+ o as DEFAULT_AFFILIATE_ASSET,
8
+ i as EvmRelay,
9
+ l as Garden,
10
+ A as Quote,
11
+ d as STARKNET_CONFIG,
12
+ c as SUI_CONFIG,
13
+ S as SecretManager,
14
+ T as SolanaHTLC,
15
+ k as SolanaRelay,
16
+ C as SolanaRelayerAddress,
17
+ h as StarknetHTLC,
18
+ p as StarknetRelay,
19
+ m as alpenTestnet,
20
+ y as botanixMainnet,
21
+ I as checkStarknetAlloance,
22
+ v as checkStarknetAllowanceAndApprove,
23
+ F as constructOrderPair,
24
+ N as evmToViemChainMap,
25
+ u as getChainNameFromChainId,
26
+ w as hyperliquid,
27
+ E as hyperliquidTestnet,
28
+ O as isStarknetAllowanceSufficient,
29
+ L as resolveApiConfig,
30
+ R as solanaProgramAddress,
31
+ f as switchOrAddNetwork,
32
+ g as toXOnly,
33
+ B as validateBTCAddress
41
34
  };
@@ -1,8 +1,6 @@
1
1
  export { Garden } from './lib/garden/garden';
2
- export type { IGardenJS, SwapParams, GardenEvents, IOrderExecutorCache, OrderCacheValue, EventCallback, OrderWithStatus, GardenCoreConfig, GardenWalletModules, GardenHTLCModules, GardenConfigWithWallets, GardenConfigWithHTLCs, } from './lib/garden/garden.types';
3
- export { OrderActions } from './lib/garden/garden.types';
2
+ export type { IGardenJS, SwapParams, GardenEvents, IOrderExecutorCache, OrderCacheValue, EventCallback, OrderWithStatus, GardenCoreConfig, GardenWalletModules, GardenHTLCModules, GardenConfigWithWallets, GardenConfigWithHTLCs, ApiConfig, } from './lib/garden/garden.types';
4
3
  export { EvmRelay } from './lib/evm/relay/evmRelay';
5
- export type { IEVMRelay } from './lib/evm/relay/evmRelay.types';
6
4
  export type { IEVMHTLC } from './lib/evm/htlc.types';
7
5
  export { StarknetRelay } from './lib/starknet/relay/starknetRelay';
8
6
  export type { IStarknetHTLC } from './lib/starknet/starknetHTLC.types';
@@ -10,19 +8,16 @@ export { StarknetHTLC } from './lib/starknet/htlc/starknetHTLC';
10
8
  export { SolanaRelay } from './lib/solana/relayer/solanaRelay';
11
9
  export type { ISolanaHTLC } from './lib/solana/htlc/ISolanaHTLC';
12
10
  export { SolanaHTLC } from './lib/solana/htlc/solanaHTLC';
13
- export { BlockNumberFetcher } from './lib/blockNumberFetcher/blockNumber';
14
- export type { IBlockNumberFetcher } from './lib/blockNumberFetcher/blockNumber';
15
- export { OrderStatus, SwapStatus } from './lib/orderStatus/status';
16
- export { parseAction, ParseOrderStatus, ParseSwapStatus, isExpired, isOrderExpired, filterDeadlineExpiredOrders, parseActionFromStatus, } from './lib/orderStatus/orderStatusParser';
17
11
  export { SecretManager } from './lib/secretManager/secretManager';
18
- export type { ISecretManager, Secret, } from './lib/secretManager/secretManager.types';
12
+ export type { ISecretManager, Secret, SecretManagerEvents, } from './lib/secretManager/secretManager.types';
19
13
  export { checkAllowanceAndApprove as checkStarknetAllowanceAndApprove, isAllowanceSufficient as isStarknetAllowanceSufficient, checkAllowance as checkStarknetAlloance, } from './lib/starknet/checkAllowanceAndApprove';
20
14
  export { Quote } from './lib/quote/quote';
21
- export type { IQuote, QuoteResponse, Strategies, QuoteParamsForAssets, QuoteParamsForOrderPair, QuoteOptions, BaseQuoteParams, } from './lib/quote/quote.types';
15
+ export type { StrategiesResponse, BaseQuoteParams, IQuote, QuoteOptions, QuoteParamsForAssets, QuoteParamsForOrderPair, QuoteResponse, Strategies, } from './lib/quote/quote.types';
22
16
  export { constructOrderPair, validateBTCAddress, toXOnly, resolveApiConfig, } from './lib/utils';
23
- export { evmToViemChainMap, switchOrAddNetwork, hyperliquidTestnet, hyperliquid, botanixMainnet as botanix, } from './lib/switchOrAddNetwork';
17
+ export { botanixMainnet, evmToViemChainMap, getChainNameFromChainId, hyperliquid, hyperliquidTestnet, alpenTestnet, switchOrAddNetwork, } from './lib/switchOrAddNetwork';
24
18
  export { BitcoinNetwork } from './lib/bitcoin/provider/provider.interface';
25
19
  export { BitcoinProvider } from './lib/bitcoin/provider/provider';
26
20
  export { BitcoinWallet } from './lib/bitcoin/wallet/wallet';
27
- export type { IBitcoinProvider } from './lib/bitcoin/provider/provider.interface';
28
- export { API, STARKNET_CONFIG, SolanaRelayerAddress, solanaProgramAddress, } from './lib/constants';
21
+ export type { UrgencyToFeeRateKey, Urgency, IBitcoinProvider, FeeRates, BitcoinTxType, BitcoinTx, BitcoinUTXO, FeeRateKeys, } from './lib/bitcoin/provider/provider.interface';
22
+ export { DEFAULT_AFFILIATE_ASSET, API, STARKNET_CONFIG, SUI_CONFIG, SolanaRelayerAddress, solanaProgramAddress, } from './lib/constants';
23
+ export type { Api } from './lib/constants';
@@ -1,4 +1,6 @@
1
+ import { Network } from '@gardenfi/utils';
2
+
1
3
  export declare const verifyAPIs: (APIs: string[]) => string[];
2
- export declare const getAPIs: (network: string) => string[];
4
+ export declare const getAPIs: (network: Network) => string[];
3
5
  export declare const RPC_URLS_TESTNET: string[];
4
6
  export declare const RPC_URLS_MAINNET: string[];
@@ -0,0 +1,98 @@
1
+ import { IBitcoinProvider } from './provider/provider.interface';
2
+ import { IBitcoinWallet } from './wallet/wallet.interface';
3
+ import { IBitcoinHTLC } from './bitcoinhtlc.types';
4
+ import { BitcoinOrderResponse, Order } from '@gardenfi/orderbook';
5
+ import { AsyncResult, Network } from '@gardenfi/utils';
6
+
7
+ export declare enum Leaf {
8
+ REFUND = 0,
9
+ REDEEM = 1,
10
+ INSTANT_REFUND = 2
11
+ }
12
+ export type TxType = 'redeem' | 'refund' | 'instantRefund';
13
+ export type LeafScript = {
14
+ version: number;
15
+ output: Buffer;
16
+ };
17
+ export type LeafTree = LeafScript | [LeafScript, LeafScript];
18
+ export declare class BitcoinHTLC implements IBitcoinHTLC {
19
+ /**
20
+ * Signer of the HTLC can be either the initiator or the redeemer
21
+ */
22
+ private signer;
23
+ private internalPubkey;
24
+ private network;
25
+ /**
26
+ * Note: redeemerAddress and initiatorAddress should be x-only public key without 02 or 03 prefix
27
+ */
28
+ constructor(signer: IBitcoinWallet, network: Network);
29
+ /**
30
+ * Generates a taproot address for receiving the funds
31
+ * @param order The order object
32
+ * @param type The type of address to generate ('redeem' | 'refund' | 'instantRefund')
33
+ * - 'redeem': uses destination_swap parameters (default)
34
+ * - 'refund': uses source_swap parameters
35
+ * - 'instantRefund': uses source_swap parameters with redeemer
36
+ */
37
+ address(order: Order, type: TxType): string;
38
+ private _buildRawTx;
39
+ /**
40
+ * prevout script for the BitcoinHTLC address
41
+ */
42
+ private getOutputScript;
43
+ initiate(order: Order | BitcoinOrderResponse, fee?: number): AsyncResult<string, string>;
44
+ generateRedeemSACP(order: Order, secret: string, fee?: number): Promise<string>;
45
+ generateInstantRefundSACP(order: Order): Promise<string>;
46
+ generateInstantRefundSACPWithHash(hash: string[]): AsyncResult<string[], string>;
47
+ /**
48
+ * Instantly refunds the funds to the initiator given the counterparty's signatures and pubkey
49
+ *
50
+ * Note: If there are multiple UTXOs being spend, there should be a signature for each UTXO in counterPartySigs
51
+ */
52
+ instantRefund(order: Order, counterPartySigs: {
53
+ utxo: string;
54
+ sig: string;
55
+ }[], fee?: number): Promise<string>;
56
+ /**
57
+ * Reveals the secret and redeems the HTLC
58
+ */
59
+ redeem(order: Order, secret: string, utxoHashes?: string[]): AsyncResult<string, string>;
60
+ getRedeemHex(order: Order, secret: string, utxoHashes?: string[]): AsyncResult<string, string>;
61
+ /**
62
+ * Refunds the funds back to the initiator if the expiry block height + 1 is reached
63
+ */
64
+ refund(order: Order, fee?: number): AsyncResult<string, string>;
65
+ /**
66
+ * Given a list of UTXOs, checks if the HTLC can be refunded
67
+ */
68
+ private canRefund;
69
+ /**
70
+ * Given a leaf, generates the control block necessary for spending the leaf
71
+ */
72
+ private generateControlBlockFor;
73
+ /**
74
+ * Generates the hash of the leaf script
75
+ * @param leaf Use leaf enum or pass 0 for refund, 1 for redeem, 2 for instant refund
76
+ * @returns hash of the leaf script
77
+ */
78
+ leafHash(leaf: Leaf, order: Order): Buffer;
79
+ private refundLeaf;
80
+ private redeemLeaf;
81
+ private instantRefundLeaf;
82
+ /**
83
+ * Generates leaves for a given action type (redeem, refund, instant refund)
84
+ * @param order The order object
85
+ * @param type 'redeem' | 'refund' | 'instantRefund'
86
+ * - 'redeem': uses destination_swap for all params
87
+ * - 'refund': uses source_swap for all params
88
+ * - 'instantRefund': uses source_swap, but redeem/instantRefund use .redeemer
89
+ */
90
+ private generateLeaves;
91
+ /**
92
+ * Generates the merkle proof for the leaf script
93
+ */
94
+ private generateMerkleProofFor;
95
+ getProvider(): Promise<IBitcoinProvider>;
96
+ get getPublicKey(): string;
97
+ get htlcActorAddress(): string;
98
+ }
@@ -0,0 +1,53 @@
1
+ import { BitcoinOrderResponse, Order } from '@gardenfi/orderbook';
2
+ import { AsyncResult } from '@gardenfi/utils';
3
+ import { IBitcoinProvider } from './provider/provider.interface';
4
+
5
+ export interface IBitcoinHTLC {
6
+ /**
7
+ * Initiates the HTLC by sending funds to the HTLC contract.
8
+ * @param order - The matched order.
9
+ * @returns A promise resolving to the transaction hash of the initiation.
10
+ */
11
+ initiate(order: Order | BitcoinOrderResponse, fee?: number): AsyncResult<string, string>;
12
+ /**
13
+ * Redeems funds from the HTLC contract to the actor's address.
14
+ * @param order - The matched order.
15
+ * @param secret - The secret required to unlock the htlc.
16
+ * @returns A promise resolving to the transaction hash of the redemption.
17
+ */
18
+ redeem(order: Order, secret: string): AsyncResult<string, string>;
19
+ /**
20
+ * Refunds funds from the HTLC contract back to the actor's address upon expiration.
21
+ * @param order - The matched order.
22
+ * @returns A promise resolving to the transaction hash of the refund.
23
+ */
24
+ refund(order: Order): AsyncResult<string, string>;
25
+ /**
26
+ * Generates the instant refund SACP with the hash of the refund transaction.
27
+ * @param hash - The hash of the refund transaction.
28
+ * @returns A promise resolving to the SACP.
29
+ */
30
+ generateInstantRefundSACPWithHash(hash: string[]): AsyncResult<string[], string>;
31
+ /**
32
+ * Generates the redeem SACP with the secret.
33
+ * @param order - The matched order.
34
+ * @param secret - The secret required to unlock the htlc.
35
+ * @returns A promise resolving to the SACP.
36
+ */
37
+ getRedeemHex(order: Order, secret: string, utxoHashes?: string[]): AsyncResult<string, string>;
38
+ /**
39
+ * Gets the provider of the wallet.
40
+ * @returns A promise resolving to the provider.
41
+ */
42
+ getProvider(): Promise<IBitcoinProvider>;
43
+ /**
44
+ * Gets the public key of the wallet.
45
+ * @returns A promise resolving to the public key.
46
+ */
47
+ get getPublicKey(): string;
48
+ /**
49
+ * Returns the HTLC actor address.
50
+ * This is the user's wallet address in the case of EVM.
51
+ */
52
+ get htlcActorAddress(): string;
53
+ }
@@ -1,3 +1,4 @@
1
+ import { Network } from '@gardenfi/utils';
1
2
  import { BitcoinNetwork, BitcoinTx, BitcoinTxType, BitcoinUTXO, FeeRates, IBitcoinProvider, Urgency } from './provider.interface';
2
3
 
3
4
  export declare class BitcoinProvider implements IBitcoinProvider {
@@ -5,7 +6,7 @@ export declare class BitcoinProvider implements IBitcoinProvider {
5
6
  private readonly APIs;
6
7
  private cacheTimeout;
7
8
  private readonly utxosCache;
8
- constructor(network: BitcoinNetwork, API?: string);
9
+ constructor(network: Network, API?: string);
9
10
  /**
10
11
  * Gets the output index of the UTXO
11
12
  *
@@ -11,7 +11,7 @@ export declare abstract class AbstractBitcoinWallet implements IBitcoinWallet {
11
11
  abstract getAddress(): Promise<string>;
12
12
  abstract getBalance(): Promise<number>;
13
13
  abstract sign(hexString: string): Promise<string>;
14
- abstract getPublicKey(): Promise<string>;
14
+ abstract getPublicKey(): string;
15
15
  abstract getNetwork(): Promise<Network>;
16
16
  abstract getProvider(): Promise<IBitcoinProvider>;
17
17
  abstract send(toAddress: string, amt: number, fee?: number): Promise<string>;
@@ -90,7 +90,7 @@ export declare class BitcoinWallet extends AbstractBitcoinWallet {
90
90
  getAddress(): Promise<string>;
91
91
  getProvider(): Promise<IBitcoinProvider>;
92
92
  getBalance(): Promise<number>;
93
- getPublicKey(): Promise<string>;
93
+ getPublicKey(): string;
94
94
  getNetwork(): Promise<networks.Network>;
95
95
  static generateUnsignedPSBT(provider: IBitcoinProvider, network: networks.Network, fromAddress: string, toAddress: string, amt: number, fee?: number): Promise<{
96
96
  txHex: string;
@@ -14,7 +14,7 @@ export interface IBitcoinWallet extends IBaseWallet {
14
14
  /**
15
15
  * @returns {Promise<string>} Public key of the wallet
16
16
  */
17
- getPublicKey(): Promise<string>;
17
+ getPublicKey(): string;
18
18
  /**
19
19
  * @returns {Promise<Network>} Network of the wallet provided during initialization
20
20
  */
@@ -1,14 +1,10 @@
1
+ import { ChainAsset } from '@gardenfi/orderbook';
1
2
  import { Environment, Network } from '@gardenfi/utils';
2
3
 
3
4
  export type Api = {
4
- orderbook: string;
5
+ baseurl: string;
5
6
  auth: string;
6
- quote: string;
7
- info: string;
8
- evmRelay: string;
9
- starknetRelay: string;
10
- solanaRelay: string;
11
- suiRelay: string;
7
+ relayer: string;
12
8
  };
13
9
  export declare const API: Record<Environment, Api>;
14
10
  export declare const STARKNET_CONFIG: Record<Network, {
@@ -31,6 +27,5 @@ export declare const SUI_CONFIG: Record<Network, {
31
27
  moduleName: string;
32
28
  }>;
33
29
  export declare const DEFAULT_AFFILIATE_ASSET: {
34
- chain: "base";
35
- asset: "0xeae7721d779276eb0f5837e2fe260118724a2ba4";
30
+ asset: ChainAsset;
36
31
  };