@gardenfi/core 2.3.3 → 2.4.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.
- package/dist/{ccip-mXBzRX9d.cjs → ccip-BnoPaVxR.cjs} +1 -1
- package/dist/{ccip-BOasyyJL.js → ccip-DQRhfQ8Y.js} +1 -1
- package/dist/{index-C65-QBEm.cjs → index-DOE09RAS.cjs} +14 -14
- package/dist/{index-BISodM76.js → index-xKeYVspi.js} +3570 -3562
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/src/lib/garden/garden.d.ts +2 -1
- package/dist/src/lib/quote/quote.d.ts +2 -4
- package/dist/src/lib/quote/quote.types.d.ts +1 -7
- package/package.json +3 -3
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-DOE09RAS.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;
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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-
|
|
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-xKeYVspi.js";
|
|
2
2
|
export {
|
|
3
3
|
e as API,
|
|
4
4
|
r as BitcoinNetwork,
|
|
@@ -26,7 +26,9 @@ export declare class Garden extends EventBroker<GardenEvents> implements IGarden
|
|
|
26
26
|
private bitcoinRedeemCache;
|
|
27
27
|
private _digestKey;
|
|
28
28
|
private _api;
|
|
29
|
+
private isSecretManagementEnabled;
|
|
29
30
|
constructor(config: GardenConfigWithHTLCs);
|
|
31
|
+
handleSecretManagement(enabled: boolean): this;
|
|
30
32
|
static fromWallets(config: GardenConfigWithWallets): Garden;
|
|
31
33
|
get evmHTLC(): IEVMHTLC | undefined;
|
|
32
34
|
get starknetHTLC(): IStarknetHTLC | undefined;
|
|
@@ -49,7 +51,6 @@ export declare class Garden extends EventBroker<GardenEvents> implements IGarden
|
|
|
49
51
|
private validateAndFillParams;
|
|
50
52
|
private getAddresses;
|
|
51
53
|
private validateAmount;
|
|
52
|
-
private pollOrder;
|
|
53
54
|
execute(interval?: number): Promise<() => void>;
|
|
54
55
|
private solRedeem;
|
|
55
56
|
private evmRedeem;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { AsyncResult, Err, Ok, Request as UtilsRequest } from '@gardenfi/utils';
|
|
1
|
+
import { Err, Ok, Request as UtilsRequest } from '@gardenfi/utils';
|
|
2
|
+
import { IQuote, QuoteParamsForAssets, QuoteResponse, Strategies } from './quote.types';
|
|
4
3
|
|
|
5
4
|
export declare class Quote implements IQuote {
|
|
6
5
|
private quoteUrl;
|
|
@@ -10,6 +9,5 @@ export declare class Quote implements IQuote {
|
|
|
10
9
|
affiliateFee?: number;
|
|
11
10
|
request?: UtilsRequest;
|
|
12
11
|
}): Promise<Err<string> | Ok<QuoteResponse>>;
|
|
13
|
-
getAttestedQuote(order: CreateOrderReqWithStrategyId): AsyncResult<CreateOrderRequestWithAdditionalData, string>;
|
|
14
12
|
getStrategies(): Promise<Err<string> | Ok<Strategies>>;
|
|
15
13
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Asset, Chain
|
|
1
|
+
import { Asset, Chain } from '@gardenfi/orderbook';
|
|
2
2
|
import { APIResponse, AsyncResult, Request } from '@gardenfi/utils';
|
|
3
3
|
|
|
4
4
|
export interface IQuote {
|
|
@@ -25,12 +25,6 @@ export interface IQuote {
|
|
|
25
25
|
* @param options { affiliateFee?: number; request?: Request } - The options for the quote request, affiliate fee in bps and request object
|
|
26
26
|
*/
|
|
27
27
|
getQuote(orderpair: string, amount: number, isExactOut: boolean, options?: QuoteOptions): AsyncResult<QuoteResponse, string>;
|
|
28
|
-
/**
|
|
29
|
-
* Attest the quote, server will return a signature by verifying and signing the quote according to the provided `strategy_id`
|
|
30
|
-
* @param order - The order for which the attestation is requested. Order should include `strategy_id` in the `additional_data` field.
|
|
31
|
-
* @returns {string} The attestation signature
|
|
32
|
-
*/
|
|
33
|
-
getAttestedQuote(order: CreateOrderReqWithStrategyId): AsyncResult<CreateOrderRequestWithAdditionalData, string>;
|
|
34
28
|
/**
|
|
35
29
|
* Get the strategies available for quoting
|
|
36
30
|
* @returns {Strategies} The strategies available
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gardenfi/core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "vite build",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@coral-xyz/anchor": "^0.30.1",
|
|
30
|
-
"@gardenfi/orderbook": "2.
|
|
31
|
-
"@gardenfi/utils": "2.
|
|
30
|
+
"@gardenfi/orderbook": "2.4.0",
|
|
31
|
+
"@gardenfi/utils": "2.4.0",
|
|
32
32
|
"bignumber.js": "^9.1.2",
|
|
33
33
|
"bip32": "^4.0.0",
|
|
34
34
|
"bip39": "^3.1.0",
|