@gardenfi/core 2.1.3-beta.5 → 2.1.3-beta.7

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.
@@ -10,9 +10,6 @@ export declare class EvmRelay implements IEVMHTLC {
10
10
  constructor(url: string | Url, wallet: WalletClient, auth: IAuth);
11
11
  get htlcActorAddress(): string;
12
12
  initiate(order: MatchedOrder): AsyncResult<string, string>;
13
- private getTokenAddress;
14
- private _initiateOnNativeHTLC;
15
- private _initiateOnErc20HTLC;
16
13
  redeem(order: MatchedOrder, secret: string): AsyncResult<string, string>;
17
14
  refund(): AsyncResult<string, string>;
18
15
  }
@@ -2,3 +2,4 @@ import { AccountInterface } from 'starknet';
2
2
  import { AsyncResult } from '@catalogfi/utils';
3
3
 
4
4
  export declare const checkAllowanceAndApprove: (account: AccountInterface, tokenAddress: string, htlcAddress: string, amount: bigint, nodeUrl: string) => AsyncResult<string, string>;
5
+ export declare const checkAllowance: (accountAddress: string, tokenAddress: string, htlcAddress: string, nodeUrl: string) => AsyncResult<bigint, string>;
@@ -1,14 +1,14 @@
1
1
  import { AccountInterface } from 'starknet';
2
2
  import { MatchedOrder } from '@gardenfi/orderbook';
3
3
  import { AsyncResult } from '@catalogfi/utils';
4
- import { Url } from '@gardenfi/utils';
4
+ import { Network, Url } from '@gardenfi/utils';
5
5
  import { IStarknetHTLC } from '../starknetHTLC.types';
6
6
 
7
7
  export declare class StarknetRelay implements IStarknetHTLC {
8
8
  private url;
9
9
  private nodeUrl;
10
10
  private account;
11
- constructor(relayerUrl: string | Url, account: AccountInterface, nodeUrl?: string);
11
+ constructor(relayerUrl: string | Url, account: AccountInterface, network: Network);
12
12
  get htlcActorAddress(): string;
13
13
  initiate(order: MatchedOrder): AsyncResult<string, string>;
14
14
  redeem(order: MatchedOrder, secret: string): AsyncResult<string, string>;
@@ -1,5 +1,5 @@
1
1
  import { Chain as viemChain } from 'viem/chains';
2
- import { EvmChain } from '@gardenfi/orderbook';
2
+ import { Chain, EvmChain } from '@gardenfi/orderbook';
3
3
  import { WalletClient } from 'viem';
4
4
  import { AsyncResult } from '@catalogfi/utils';
5
5
 
@@ -12,7 +12,7 @@ export declare const evmToViemChainMap: Record<EvmChain, viemChain>;
12
12
  * @param walletClient
13
13
  * @returns new walletClient with updated chain
14
14
  */
15
- export declare const switchOrAddNetwork: (chain: EvmChain, walletClient: WalletClient) => AsyncResult<{
15
+ export declare const switchOrAddNetwork: (chain: Chain, walletClient: WalletClient) => AsyncResult<{
16
16
  message: string;
17
17
  walletClient: WalletClient;
18
18
  }, string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gardenfi/core",
3
- "version": "2.1.3-beta.5",
3
+ "version": "2.1.3-beta.7",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "build": "vite build",
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@catalogfi/wallets": "^0.2.59",
30
- "@gardenfi/orderbook": "2.1.2-beta.0",
30
+ "@gardenfi/orderbook": "2.1.2",
31
31
  "@gardenfi/utils": "2.1.2",
32
32
  "bignumber.js": "^9.1.2",
33
33
  "bitcoinjs-lib": "^6.1.6",