@gardenfi/orderbook 2.5.3-beta.2 → 2.5.3-beta.20

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.
@@ -1,5 +1,6 @@
1
1
  import { Network } from '@gardenfi/utils';
2
2
  import { Config } from './asset';
3
+ import { ChainAsset } from '../chainAsset/chainAsset';
3
4
 
4
5
  export declare enum BlockchainType {
5
6
  bitcoin = "bitcoin",
@@ -8,18 +9,23 @@ export declare enum BlockchainType {
8
9
  starknet = "starknet",
9
10
  sui = "sui"
10
11
  }
11
- export type AssetCommon = {
12
+ export type AddressSchema = {
13
+ address: string;
14
+ schema: string | null;
15
+ };
16
+ export type Asset = {
17
+ id: ChainAsset | string;
12
18
  name: string;
13
- decimals: number;
14
- symbol: string;
15
19
  chain: Chain;
16
- logo?: string;
17
- atomicSwapAddress: string;
18
- };
19
- export type AssetToken = AssetCommon & {
20
- tokenAddress: string;
20
+ symbol: string;
21
+ icon?: string;
22
+ htlc: AddressSchema | null;
23
+ token: AddressSchema | null;
24
+ decimals: number;
25
+ min_amount?: string;
26
+ max_amount?: string;
27
+ price?: number;
21
28
  };
22
- export type Asset = AssetToken;
23
29
  export type Chain = keyof typeof Config;
24
30
  export type ChainsByNetwork<T extends Network> = {
25
31
  [K in keyof typeof Config]: (typeof Config)[K]['network'] extends T ? K : never;
@@ -59,6 +59,7 @@ export type CreateOrderRequest = {
59
59
  delegate: string | null;
60
60
  amount: string;
61
61
  };
62
+ solver_id: string;
62
63
  slippage?: number;
63
64
  secret_hash?: string;
64
65
  nonce: number;
@@ -171,7 +172,12 @@ type EvmTypedData = {
171
172
  domain: Record<string, unknown>;
172
173
  types: Record<string, unknown>;
173
174
  primaryType: string;
174
- message: Record<string, unknown>;
175
+ message: {
176
+ amount: string;
177
+ secretHash: string;
178
+ timelock: string;
179
+ redeemer: string;
180
+ };
175
181
  };
176
182
  export type EvmOrderResponse = WithTypedData<BaseCreateOrderResponse & {
177
183
  approval_transaction: EVMTransaction | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gardenfi/orderbook",
3
- "version": "2.5.3-beta.2",
3
+ "version": "2.5.3-beta.20",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
@@ -28,8 +28,9 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@coral-xyz/anchor": "^0.31.1",
31
- "@gardenfi/utils": "workspace:*",
31
+ "@gardenfi/utils": "2.5.3-beta.9",
32
32
  "bufferutil": "^4.0.8",
33
+ "node-cache": "^5.1.2",
33
34
  "siwe": "^2.1.4",
34
35
  "utf-8-validate": "^6.0.3",
35
36
  "ws": "^8.14.2"
@@ -43,4 +44,4 @@
43
44
  "vitest": "^1.6.0"
44
45
  },
45
46
  "sideEffects": false
46
- }
47
+ }