@gardenfi/core 2.2.1-beta.2 → 2.2.1-beta.3
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/{ccip-Bllqmmv_.js → ccip-CCZu2izI.js} +1 -1
- package/dist/{ccip-B1_TRO36.cjs → ccip-CvdgewpK.cjs} +1 -1
- package/dist/index-B0VTecr4.cjs +84 -0
- package/dist/{index-D10jIxwi.js → index-Dgz3PcKO.js} +14853 -12575
- package/dist/index.cjs +1 -1
- package/dist/index.js +34 -37
- package/dist/src/index.d.ts +0 -4
- package/dist/src/lib/bitcoin/htlc.d.ts +1 -2
- package/dist/src/lib/blockNumberFetcher/blockNumber.d.ts +2 -1
- package/dist/src/lib/evm/htlc/evmHTLC.d.ts +1 -1
- package/dist/src/lib/evm/htlc/evmHTLC.types.d.ts +2 -2
- package/dist/src/lib/evm/relay/evmRelay.types.d.ts +2 -1
- package/dist/src/lib/garden/garden.d.ts +5 -3
- package/dist/src/lib/garden/garden.types.d.ts +4 -3
- package/dist/src/lib/quote/quote.d.ts +5 -6
- package/dist/src/lib/quote/quote.types.d.ts +3 -8
- package/dist/src/lib/secretManager/secretManager.d.ts +5 -5
- package/dist/src/lib/secretManager/secretManager.types.d.ts +2 -1
- package/dist/src/lib/solana/htlc/ISolanaHTLC.d.ts +1 -1
- package/dist/src/lib/solana/htlc/solanaHTLC.d.ts +1 -1
- package/dist/src/lib/solana/relayer/solanaRelay.d.ts +2 -1
- package/dist/src/lib/starknet/checkAllowanceAndApprove.d.ts +1 -1
- package/dist/src/lib/starknet/htlc/starknetHTLC.d.ts +2 -1
- package/dist/src/lib/starknet/relay/starknetRelay.d.ts +2 -1
- package/dist/src/lib/starknet/starknetHTLC.types.d.ts +1 -1
- package/dist/src/lib/switchOrAddNetwork.d.ts +1 -1
- package/dist/src/lib/utils.d.ts +2 -7
- package/package.json +7 -9
- package/dist/index-DyvVJhoD.cjs +0 -99
- package/dist/src/lib/bitcoin/API.d.ts +0 -4
- package/dist/src/lib/bitcoin/ASConfig.d.ts +0 -19
- package/dist/src/lib/bitcoin/errors.d.ts +0 -16
- package/dist/src/lib/bitcoin/htlcScript.d.ts +0 -7
- package/dist/src/lib/bitcoin/interface.d.ts +0 -6
- package/dist/src/lib/bitcoin/paths.d.ts +0 -7
- package/dist/src/lib/bitcoin/provider/provider.d.ts +0 -118
- package/dist/src/lib/bitcoin/provider/provider.interface.d.ts +0 -99
- package/dist/src/lib/bitcoin/script.d.ts +0 -6
- package/dist/src/lib/bitcoin/sig.d.ts +0 -20
- package/dist/src/lib/bitcoin/utils.d.ts +0 -8
- package/dist/src/lib/bitcoin/wallet/abstractWallet.d.ts +0 -145
- package/dist/src/lib/bitcoin/wallet/baseWallet.d.ts +0 -13
- package/dist/src/lib/bitcoin/wallet/wallet.d.ts +0 -103
- package/dist/src/lib/bitcoin/wallet/wallet.interface.d.ts +0 -79
- package/dist/src/lib/htlc.interface.d.ts +0 -7
- 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-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-B0VTecr4.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 {
|
|
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-Dgz3PcKO.js";
|
|
2
2
|
export {
|
|
3
3
|
e as API,
|
|
4
|
-
r as
|
|
5
|
-
t as
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
l as
|
|
10
|
-
d as
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
A as
|
|
14
|
-
p as
|
|
15
|
-
u as
|
|
16
|
-
k as
|
|
17
|
-
O as
|
|
18
|
-
h as
|
|
19
|
-
m as
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
P as
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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
|
};
|
package/dist/src/index.d.ts
CHANGED
|
@@ -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,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 '@
|
|
2
|
-
import { OnChainIdentifier } from '
|
|
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 {
|
|
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
|
|
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 {
|
|
@@ -26,7 +27,9 @@ export declare class Garden extends EventBroker<GardenEvents> implements IGarden
|
|
|
26
27
|
private bitcoinRedeemCache;
|
|
27
28
|
private _digestKey;
|
|
28
29
|
private _api;
|
|
30
|
+
private isSecretManagementEnabled;
|
|
29
31
|
constructor(config: GardenConfigWithHTLCs);
|
|
32
|
+
handleSecretManagement(enabled: boolean): this;
|
|
30
33
|
static fromWallets(config: GardenConfigWithWallets): Garden;
|
|
31
34
|
get evmHTLC(): IEVMHTLC | undefined;
|
|
32
35
|
get starknetHTLC(): IStarknetHTLC | undefined;
|
|
@@ -49,7 +52,6 @@ export declare class Garden extends EventBroker<GardenEvents> implements IGarden
|
|
|
49
52
|
private validateAndFillParams;
|
|
50
53
|
private getAddresses;
|
|
51
54
|
private validateAmount;
|
|
52
|
-
private pollOrder;
|
|
53
55
|
execute(interval?: number): Promise<() => void>;
|
|
54
56
|
private solRedeem;
|
|
55
57
|
private evmRedeem;
|
|
@@ -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 {
|
|
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?:
|
|
162
|
+
btcWallet?: BitcoinWallet;
|
|
162
163
|
solanaProgramAddress?: string;
|
|
163
164
|
};
|
|
164
165
|
export type GardenHTLCModules = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { Request } from '@catalogfi/utils';
|
|
1
2
|
import { IQuote, QuoteResponse, Strategies } from './quote.types';
|
|
2
|
-
import { Asset
|
|
3
|
-
import { AsyncResult, Err, Ok } from '@gardenfi/utils';
|
|
3
|
+
import { Asset } from '@gardenfi/orderbook';
|
|
4
4
|
|
|
5
5
|
export declare class Quote implements IQuote {
|
|
6
6
|
private quoteUrl;
|
|
@@ -8,11 +8,10 @@ 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<
|
|
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<
|
|
16
|
-
|
|
17
|
-
getStrategies(): Promise<Err<string> | Ok<Strategies>>;
|
|
15
|
+
}): Promise<import('@catalogfi/utils').Result<never, string> | import('@catalogfi/utils').Result<QuoteResponse, never>>;
|
|
16
|
+
getStrategies(): Promise<import('@catalogfi/utils').Result<never, string> | import('@catalogfi/utils').Result<Strategies, never>>;
|
|
18
17
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { AsyncResult, Request } from '@catalogfi/utils';
|
|
2
|
+
import { Asset, Chain } from '@gardenfi/orderbook';
|
|
3
|
+
import { APIResponse } from '@gardenfi/utils';
|
|
3
4
|
|
|
4
5
|
export interface IQuote {
|
|
5
6
|
/**
|
|
@@ -31,12 +32,6 @@ export interface IQuote {
|
|
|
31
32
|
affiliateFee?: number;
|
|
32
33
|
request?: Request;
|
|
33
34
|
}): AsyncResult<QuoteResponse, string>;
|
|
34
|
-
/**
|
|
35
|
-
* Attest the quote, server will return a signature by verifying and signing the quote according to the provided `strategy_id`
|
|
36
|
-
* @param order - The order for which the attestation is requested. Order should include `strategy_id` in the `additional_data` field.
|
|
37
|
-
* @returns {string} The attestation signature
|
|
38
|
-
*/
|
|
39
|
-
getAttestedQuote(order: CreateOrderReqWithStrategyId): AsyncResult<CreateOrderRequestWithAdditionalData, string>;
|
|
40
35
|
/**
|
|
41
36
|
* Get the strategies available for quoting
|
|
42
37
|
* @returns {Strategies} The strategies available
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { WalletClient } from 'viem';
|
|
2
|
-
import {
|
|
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<
|
|
12
|
+
initialize(): Promise<import('@catalogfi/utils').Result<never, string> | import('@catalogfi/utils').Result<string, never>>;
|
|
13
13
|
private deriveDigestKeyFromWalletClient;
|
|
14
|
-
getDigestKey(): Promise<
|
|
15
|
-
generateSecret(nonce: string): Promise<
|
|
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,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 '@
|
|
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
|
|
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 '@
|
|
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 {
|
|
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
|
|
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,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 '@
|
|
4
|
+
import { AsyncResult } from '@catalogfi/utils';
|
|
5
5
|
|
|
6
6
|
export declare const botanixMainnet: viemChain;
|
|
7
7
|
export declare const hyperliquidTestnet: viemChain;
|
package/dist/src/lib/utils.d.ts
CHANGED
|
@@ -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) =>
|
|
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.
|
|
3
|
+
"version": "2.2.1-beta.3",
|
|
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.
|
|
31
|
-
"@gardenfi/utils": "2.2.1
|
|
32
|
+
"@gardenfi/orderbook": "2.2.1-beta.3",
|
|
33
|
+
"@gardenfi/utils": "2.2.1",
|
|
32
34
|
"bignumber.js": "^9.1.2",
|
|
33
|
-
"
|
|
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",
|