@gardenfi/core 3.0.6-beta.6 → 3.0.6-beta.8
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-EiEdg5Xp.cjs → ccip-CSNgtKAY.cjs} +1 -1
- package/dist/{ccip-DBPkm9c_.js → ccip-aPouOwnC.js} +1 -1
- package/dist/index-B8ZUjJVu.cjs +104 -0
- package/dist/{index-BMNrJYJ8.js → index-jL_ESG0F.js} +8340 -8063
- package/dist/index.cjs +1 -1
- package/dist/index.js +17 -16
- package/dist/src/index.d.ts +1 -1
- package/dist/src/lib/garden/garden.types.d.ts +12 -0
- package/dist/src/lib/utils.d.ts +1 -0
- package/package.json +6 -5
- package/dist/index-ClcKfQMx.cjs +0 -104
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-B8ZUjJVu.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;exports.validateLTCAddress=e.validateLTCAddress;
|
package/dist/index.js
CHANGED
|
@@ -1,34 +1,35 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { L as s, F as t, I as n, J as r, K as i, E as o, G as l, Q as d, M as A, N as c, m as S, k as T, j as C, O as k, h, S as p, C as m, w as v, p as y, n as I, q as F, x as N, y as u, z as w, A as E, o as L, r as O, P, D as R, t as f, v as g, u as B } from "./index-jL_ESG0F.js";
|
|
2
2
|
export {
|
|
3
3
|
s as API,
|
|
4
4
|
t as BitcoinNetwork,
|
|
5
5
|
n as BitcoinProvider,
|
|
6
6
|
r as BitcoinWallet,
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
i as DEFAULT_AFFILIATE_ASSET,
|
|
8
|
+
o as EvmRelay,
|
|
9
9
|
l as Garden,
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
d as Quote,
|
|
11
|
+
A as STARKNET_CONFIG,
|
|
12
12
|
c as SUI_CONFIG,
|
|
13
13
|
S as SecretManager,
|
|
14
14
|
T as SolanaHTLC,
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
C as SolanaRelay,
|
|
16
|
+
k as SolanaRelayerAddress,
|
|
17
17
|
h as StarknetHTLC,
|
|
18
18
|
p as StarknetRelay,
|
|
19
19
|
m as alpenTestnet,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
v as botanixMainnet,
|
|
21
|
+
y as checkStarknetAlloance,
|
|
22
|
+
I as checkStarknetAllowanceAndApprove,
|
|
23
23
|
F as constructOrderPair,
|
|
24
24
|
N as evmToViemChainMap,
|
|
25
25
|
u as getChainNameFromChainId,
|
|
26
26
|
w as hyperliquid,
|
|
27
27
|
E as hyperliquidTestnet,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
L as isStarknetAllowanceSufficient,
|
|
29
|
+
O as resolveApiConfig,
|
|
30
|
+
P as solanaProgramAddress,
|
|
31
|
+
R as switchOrAddNetwork,
|
|
32
|
+
f as toXOnly,
|
|
33
|
+
g as validateBTCAddress,
|
|
34
|
+
B as validateLTCAddress
|
|
34
35
|
};
|
package/dist/src/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export type { ISecretManager, Secret, SecretManagerEvents, } from './lib/secretM
|
|
|
13
13
|
export { checkAllowanceAndApprove as checkStarknetAllowanceAndApprove, isAllowanceSufficient as isStarknetAllowanceSufficient, checkAllowance as checkStarknetAlloance, } from './lib/starknet/checkAllowanceAndApprove';
|
|
14
14
|
export { Quote } from './lib/quote/quote';
|
|
15
15
|
export type { StrategiesResponse, BaseQuoteParams, IQuote, QuoteOptions, QuoteParamsForAssets, QuoteParamsForOrderPair, QuoteResponse, Strategies, } from './lib/quote/quote.types';
|
|
16
|
-
export { constructOrderPair, validateBTCAddress, toXOnly, resolveApiConfig, } from './lib/utils';
|
|
16
|
+
export { constructOrderPair, validateBTCAddress, toXOnly, resolveApiConfig, validateLTCAddress, } from './lib/utils';
|
|
17
17
|
export { botanixMainnet, evmToViemChainMap, getChainNameFromChainId, hyperliquid, hyperliquidTestnet, alpenTestnet, switchOrAddNetwork, } from './lib/switchOrAddNetwork';
|
|
18
18
|
export { BitcoinNetwork } from './lib/bitcoin/provider/provider.interface';
|
|
19
19
|
export { BitcoinProvider } from './lib/bitcoin/provider/provider';
|
|
@@ -47,6 +47,14 @@ export type SwapParams = {
|
|
|
47
47
|
* Addresses for the order.
|
|
48
48
|
*/
|
|
49
49
|
addresses?: Partial<Record<BlockchainType, string>>;
|
|
50
|
+
/**
|
|
51
|
+
* Address for source chain.
|
|
52
|
+
*/
|
|
53
|
+
sourceAddress?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Address for destination chain.
|
|
56
|
+
*/
|
|
57
|
+
destinationAddress?: string;
|
|
50
58
|
/**
|
|
51
59
|
* Integrator fee for the order.
|
|
52
60
|
*/
|
|
@@ -148,6 +156,8 @@ export type GardenHTLCModules = {
|
|
|
148
156
|
sui?: ISuiHTLC;
|
|
149
157
|
bitcoin?: IBitcoinHTLC;
|
|
150
158
|
tron?: ITronHTLC;
|
|
159
|
+
litecoin?: IBitcoinHTLC;
|
|
160
|
+
alpen_signet?: IBitcoinHTLC;
|
|
151
161
|
};
|
|
152
162
|
export type GardenWalletModules = {
|
|
153
163
|
evm?: WalletClient;
|
|
@@ -169,4 +179,6 @@ export type ResponseTypeMap = {
|
|
|
169
179
|
[BlockchainType.starknet]: StarknetOrderResponse;
|
|
170
180
|
[BlockchainType.solana]: SolanaOrderResponse;
|
|
171
181
|
[BlockchainType.sui]: SuiOrderResponse;
|
|
182
|
+
[BlockchainType.litecoin]: BitcoinOrderResponse;
|
|
183
|
+
[BlockchainType.alpen_signet]: BitcoinOrderResponse;
|
|
172
184
|
};
|
package/dist/src/lib/utils.d.ts
CHANGED
|
@@ -39,6 +39,7 @@ export declare const toXOnly: (pubKey: string) => string;
|
|
|
39
39
|
export declare const isValidBitcoinPubKey: (pubKey: string) => boolean;
|
|
40
40
|
export declare const constructOrderPair: (sourceChain: Chain, sourceAsset: string, destChain: Chain, destAsset: string) => string;
|
|
41
41
|
export declare function validateBTCAddress(address: string, networkType: Environment): boolean;
|
|
42
|
+
export declare function validateLTCAddress(address: string, networkType: Environment): boolean;
|
|
42
43
|
export declare function generateOutputs(output: Buffer, count: number): Buffer[];
|
|
43
44
|
export declare const getBitcoinNetworkFromEnvironment: (network: Network) => BitcoinNetwork;
|
|
44
45
|
export declare const getBitcoinNetworkFromNetwork: (network: Network) => bitcoin.networks.Network;
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gardenfi/core",
|
|
3
|
-
"version": "3.0.6-beta.
|
|
3
|
+
"version": "3.0.6-beta.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "vite build",
|
|
7
7
|
"test": "vitest run",
|
|
8
8
|
"dev": "vite build --watch",
|
|
9
|
-
"link": "
|
|
9
|
+
"link": "bun link"
|
|
10
10
|
},
|
|
11
11
|
"files": [
|
|
12
12
|
"dist"
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@coral-xyz/anchor": "^0.31.1",
|
|
31
|
-
"@gardenfi/orderbook": "3.0.5
|
|
32
|
-
"@gardenfi/utils": "3.0.0
|
|
31
|
+
"@gardenfi/orderbook": "3.0.5",
|
|
32
|
+
"@gardenfi/utils": "3.0.0",
|
|
33
33
|
"@mysten/signers": "^0.3.4",
|
|
34
34
|
"@mysten/sui": "^1.37.1",
|
|
35
35
|
"@mysten/wallet-standard": "^0.16.9",
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"bip32": "^4.0.0",
|
|
40
40
|
"bip39": "^3.1.0",
|
|
41
41
|
"bitcoinjs-lib": "^6.1.5",
|
|
42
|
+
"bitcore-lib-ltc": "^10.10.5",
|
|
42
43
|
"ecpair": "^2.1.0",
|
|
43
44
|
"node-cache": "^5.1.2",
|
|
44
45
|
"starknet": "7.6.4",
|
|
@@ -55,4 +56,4 @@
|
|
|
55
56
|
"vitest": "^1.6.0"
|
|
56
57
|
},
|
|
57
58
|
"sideEffects": false
|
|
58
|
-
}
|
|
59
|
+
}
|