@gardenfi/orderbook 3.0.4 → 3.0.5-beta.1

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.
@@ -523,20 +523,6 @@ export declare const Config: {
523
523
  };
524
524
  };
525
525
  };
526
- readonly alpen_signet: {
527
- readonly type: BlockchainType.bitcoin;
528
- readonly network: Network.TESTNET;
529
- readonly BTC: {
530
- readonly id: "alpen_signet:btc";
531
- readonly name: "Alpen Bitcoin";
532
- readonly symbol: "BTC";
533
- readonly decimals: 8;
534
- readonly icon: "https://garden-finance.imgix.net/token-images/bitcoin.svg";
535
- readonly chain: "alpen_signet";
536
- readonly htlc: null;
537
- readonly token: null;
538
- };
539
- };
540
526
  readonly alpen_testnet: {
541
527
  readonly type: BlockchainType.evm;
542
528
  readonly network: Network.TESTNET;
@@ -546,9 +532,9 @@ export declare const Config: {
546
532
  readonly symbol: "sBTC";
547
533
  readonly decimals: 18;
548
534
  readonly icon: "https://avatars.githubusercontent.com/u/113091135";
549
- readonly chain: "evm:8150";
535
+ readonly chain: "evm:2892";
550
536
  readonly htlc: {
551
- readonly address: "0x934C87EE12c6c541E9C3A4997ae70371b3db7b3e";
537
+ readonly address: "0x39269522737a4a155F78EC1B1BDb86288c1Fcf67";
552
538
  readonly schema: "evm:htlc";
553
539
  };
554
540
  readonly token: null;
@@ -559,9 +545,9 @@ export declare const Config: {
559
545
  readonly symbol: "USDC";
560
546
  readonly decimals: 6;
561
547
  readonly icon: "https://garden.imgix.net/token-images/usdc.svg";
562
- readonly chain: "evm:8150";
548
+ readonly chain: "evm:2892";
563
549
  readonly htlc: {
564
- readonly address: "0x7031336949223a512C0435dF75dd8114fa3b7261";
550
+ readonly address: "0x45b0d0c85bEb4512610fC2627CCB1587A7a044d4";
565
551
  readonly schema: "evm:htlc_erc20";
566
552
  };
567
553
  readonly token: {
@@ -570,6 +556,26 @@ export declare const Config: {
570
556
  };
571
557
  };
572
558
  };
559
+ readonly tron_shasta: {
560
+ readonly type: BlockchainType.tron;
561
+ readonly network: Network.TESTNET;
562
+ readonly USDT: {
563
+ readonly id: "tron_shasta:usdt";
564
+ readonly name: "Tether USD";
565
+ readonly symbol: "USDT";
566
+ readonly decimals: 6;
567
+ readonly icon: "https://garden.imgix.net/assets/TetherIcon.svg";
568
+ readonly chain: "tron:2494104990";
569
+ readonly htlc: {
570
+ readonly address: "TQa4rN2Vayesv5vmMAXzP5QA1PnPwD46w6";
571
+ readonly schema: "tron:htlc_erc20";
572
+ };
573
+ readonly token: {
574
+ readonly address: "TDg6r1BXkxWbmXXvHWweqdpUY9qPhgUJsC";
575
+ readonly schema: "tron:erc20";
576
+ };
577
+ };
578
+ };
573
579
  readonly bitcoin: {
574
580
  readonly type: BlockchainType.bitcoin;
575
581
  readonly network: Network.MAINNET;
@@ -620,39 +626,6 @@ export declare const Config: {
620
626
  };
621
627
  };
622
628
  };
623
- readonly monad: {
624
- readonly type: BlockchainType.evm;
625
- readonly network: Network.MAINNET;
626
- readonly MON: {
627
- readonly id: "monad:mon";
628
- readonly name: "Mon:MON";
629
- readonly symbol: "MON";
630
- readonly decimals: 18;
631
- readonly icon: "https://garden.imgix.net/chain_images/monad.svg";
632
- readonly chain: "evm:143";
633
- readonly htlc: {
634
- readonly address: "0xE413743B51f3cC8b3ac24addf50D18fa138cB0Bb";
635
- readonly schema: "evm:htlc";
636
- };
637
- readonly token: null;
638
- };
639
- readonly USDC: {
640
- readonly id: "monad:usdc";
641
- readonly name: "USD Coin:USDC";
642
- readonly symbol: "USDC";
643
- readonly decimals: 6;
644
- readonly icon: "https://garden.imgix.net/token-images/usdc.svg";
645
- readonly chain: "evm:143";
646
- readonly htlc: {
647
- readonly address: "0x5fA58e4E89c85B8d678Ade970bD6afD4311aF17E";
648
- readonly schema: "evm:htlc_erc20";
649
- };
650
- readonly token: {
651
- readonly address: "0x754704Bc059F8C67012fEd69BC8A327a5aafb603";
652
- readonly schema: "evm:erc20";
653
- };
654
- };
655
- };
656
629
  readonly arbitrum: {
657
630
  readonly type: BlockchainType.evm;
658
631
  readonly network: Network.MAINNET;
@@ -1563,20 +1536,6 @@ export declare const Assets: import('./utils').AssetsType<{
1563
1536
  };
1564
1537
  };
1565
1538
  };
1566
- readonly alpen_signet: {
1567
- readonly type: BlockchainType.bitcoin;
1568
- readonly network: Network.TESTNET;
1569
- readonly BTC: {
1570
- readonly id: "alpen_signet:btc";
1571
- readonly name: "Alpen Bitcoin";
1572
- readonly symbol: "BTC";
1573
- readonly decimals: 8;
1574
- readonly icon: "https://garden-finance.imgix.net/token-images/bitcoin.svg";
1575
- readonly chain: "alpen_signet";
1576
- readonly htlc: null;
1577
- readonly token: null;
1578
- };
1579
- };
1580
1539
  readonly alpen_testnet: {
1581
1540
  readonly type: BlockchainType.evm;
1582
1541
  readonly network: Network.TESTNET;
@@ -1586,9 +1545,9 @@ export declare const Assets: import('./utils').AssetsType<{
1586
1545
  readonly symbol: "sBTC";
1587
1546
  readonly decimals: 18;
1588
1547
  readonly icon: "https://avatars.githubusercontent.com/u/113091135";
1589
- readonly chain: "evm:8150";
1548
+ readonly chain: "evm:2892";
1590
1549
  readonly htlc: {
1591
- readonly address: "0x934C87EE12c6c541E9C3A4997ae70371b3db7b3e";
1550
+ readonly address: "0x39269522737a4a155F78EC1B1BDb86288c1Fcf67";
1592
1551
  readonly schema: "evm:htlc";
1593
1552
  };
1594
1553
  readonly token: null;
@@ -1599,9 +1558,9 @@ export declare const Assets: import('./utils').AssetsType<{
1599
1558
  readonly symbol: "USDC";
1600
1559
  readonly decimals: 6;
1601
1560
  readonly icon: "https://garden.imgix.net/token-images/usdc.svg";
1602
- readonly chain: "evm:8150";
1561
+ readonly chain: "evm:2892";
1603
1562
  readonly htlc: {
1604
- readonly address: "0x7031336949223a512C0435dF75dd8114fa3b7261";
1563
+ readonly address: "0x45b0d0c85bEb4512610fC2627CCB1587A7a044d4";
1605
1564
  readonly schema: "evm:htlc_erc20";
1606
1565
  };
1607
1566
  readonly token: {
@@ -1610,6 +1569,26 @@ export declare const Assets: import('./utils').AssetsType<{
1610
1569
  };
1611
1570
  };
1612
1571
  };
1572
+ readonly tron_shasta: {
1573
+ readonly type: BlockchainType.tron;
1574
+ readonly network: Network.TESTNET;
1575
+ readonly USDT: {
1576
+ readonly id: "tron_shasta:usdt";
1577
+ readonly name: "Tether USD";
1578
+ readonly symbol: "USDT";
1579
+ readonly decimals: 6;
1580
+ readonly icon: "https://garden.imgix.net/assets/TetherIcon.svg";
1581
+ readonly chain: "tron:2494104990";
1582
+ readonly htlc: {
1583
+ readonly address: "TQa4rN2Vayesv5vmMAXzP5QA1PnPwD46w6";
1584
+ readonly schema: "tron:htlc_erc20";
1585
+ };
1586
+ readonly token: {
1587
+ readonly address: "TDg6r1BXkxWbmXXvHWweqdpUY9qPhgUJsC";
1588
+ readonly schema: "tron:erc20";
1589
+ };
1590
+ };
1591
+ };
1613
1592
  readonly bitcoin: {
1614
1593
  readonly type: BlockchainType.bitcoin;
1615
1594
  readonly network: Network.MAINNET;
@@ -1660,39 +1639,6 @@ export declare const Assets: import('./utils').AssetsType<{
1660
1639
  };
1661
1640
  };
1662
1641
  };
1663
- readonly monad: {
1664
- readonly type: BlockchainType.evm;
1665
- readonly network: Network.MAINNET;
1666
- readonly MON: {
1667
- readonly id: "monad:mon";
1668
- readonly name: "Mon:MON";
1669
- readonly symbol: "MON";
1670
- readonly decimals: 18;
1671
- readonly icon: "https://garden.imgix.net/chain_images/monad.svg";
1672
- readonly chain: "evm:143";
1673
- readonly htlc: {
1674
- readonly address: "0xE413743B51f3cC8b3ac24addf50D18fa138cB0Bb";
1675
- readonly schema: "evm:htlc";
1676
- };
1677
- readonly token: null;
1678
- };
1679
- readonly USDC: {
1680
- readonly id: "monad:usdc";
1681
- readonly name: "USD Coin:USDC";
1682
- readonly symbol: "USDC";
1683
- readonly decimals: 6;
1684
- readonly icon: "https://garden.imgix.net/token-images/usdc.svg";
1685
- readonly chain: "evm:143";
1686
- readonly htlc: {
1687
- readonly address: "0x5fA58e4E89c85B8d678Ade970bD6afD4311aF17E";
1688
- readonly schema: "evm:htlc_erc20";
1689
- };
1690
- readonly token: {
1691
- readonly address: "0x754704Bc059F8C67012fEd69BC8A327a5aafb603";
1692
- readonly schema: "evm:erc20";
1693
- };
1694
- };
1695
- };
1696
1642
  readonly arbitrum: {
1697
1643
  readonly type: BlockchainType.evm;
1698
1644
  readonly network: Network.MAINNET;
@@ -2105,11 +2051,12 @@ export declare const Assets: import('./utils').AssetsType<{
2105
2051
  }>;
2106
2052
  export declare const isMainnet: (chain: Chain) => boolean;
2107
2053
  export declare function is<T extends BlockchainType>(type: T): (chain: Chain) => chain is Extract<Chain, ChainsByBlockchainType<T>>;
2108
- export declare const isEVM: (chain: Chain) => chain is "arbitrum_localnet" | "ethereum_localnet" | "ethereum_sepolia" | "arbitrum_sepolia" | "base_sepolia" | "bera_testnet" | "citrea_testnet" | "monad_testnet" | "hyperliquid_testnet" | "bnbchain_testnet" | "alpen_testnet" | "base" | "monad" | "arbitrum" | "ethereum" | "bera" | "hyperliquid" | "unichain" | "corn" | "botanix" | "bnbchain" | "core" | "hypercore" | "hypercore_testnet";
2109
- export declare const isBitcoin: (chain: Chain) => chain is "bitcoin" | "alpen_signet" | "bitcoin_regtest" | "bitcoin_testnet";
2054
+ export declare const isEVM: (chain: Chain) => chain is "arbitrum_localnet" | "ethereum_localnet" | "ethereum_sepolia" | "arbitrum_sepolia" | "base_sepolia" | "bera_testnet" | "citrea_testnet" | "monad_testnet" | "hyperliquid_testnet" | "bnbchain_testnet" | "alpen_testnet" | "base" | "arbitrum" | "ethereum" | "bera" | "hyperliquid" | "unichain" | "corn" | "botanix" | "bnbchain" | "core" | "hypercore" | "hypercore_testnet";
2055
+ export declare const isBitcoin: (chain: Chain) => chain is "bitcoin" | "bitcoin_regtest" | "bitcoin_testnet";
2110
2056
  export declare const isSolana: (chain: Chain) => chain is "solana_localnet" | "solana_testnet" | "solana";
2111
2057
  export declare const isStarknet: (chain: Chain) => chain is "starknet_devnet" | "starknet_sepolia" | "starknet";
2112
2058
  export declare const isSui: (chain: Chain) => chain is "sui" | "sui_testnet";
2059
+ export declare const isTron: (chain: Chain) => chain is "tron_shasta";
2113
2060
  export declare const getBlockchainType: (chain: Chain) => BlockchainType;
2114
2061
  export declare const NATIVE_TOKENS: {
2115
2062
  evm: string;
@@ -7,7 +7,8 @@ export declare enum BlockchainType {
7
7
  evm = "evm",
8
8
  solana = "solana",
9
9
  starknet = "starknet",
10
- sui = "sui"
10
+ sui = "sui",
11
+ tron = "tron"
11
12
  }
12
13
  export type AddressSchema = {
13
14
  address: string;
@@ -41,3 +42,4 @@ export type BitcoinChains = ChainsByBlockchainType<BlockchainType.bitcoin>;
41
42
  export type SolanaChains = ChainsByBlockchainType<BlockchainType.solana>;
42
43
  export type StarknetChains = ChainsByBlockchainType<BlockchainType.starknet>;
43
44
  export type SuiChains = ChainsByBlockchainType<BlockchainType.sui>;
45
+ export type TronChains = ChainsByBlockchainType<BlockchainType.tron>;
@@ -172,12 +172,7 @@ type EvmTypedData = {
172
172
  domain: Record<string, unknown>;
173
173
  types: Record<string, unknown>;
174
174
  primaryType: string;
175
- message: {
176
- amount: string;
177
- secretHash: string;
178
- timelock: string;
179
- redeemer: string;
180
- };
175
+ message: Record<string, unknown>;
181
176
  };
182
177
  export type EvmOrderResponse = WithTypedData<BaseCreateOrderResponse & {
183
178
  approval_transaction: EVMTransaction | null;
@@ -194,12 +189,14 @@ export type SolanaOrderResponse = BaseCreateOrderResponse & {
194
189
  export type SuiOrderResponse = BaseCreateOrderResponse & {
195
190
  ptb_bytes: number[];
196
191
  };
192
+ export type TronOrderResponse = EvmOrderResponse;
197
193
  type OrderResponseMap = {
198
194
  [BlockchainType.evm]: EvmOrderResponse;
199
195
  [BlockchainType.bitcoin]: BitcoinOrderResponse;
200
196
  [BlockchainType.starknet]: StarknetOrderResponse;
201
197
  [BlockchainType.solana]: SolanaOrderResponse;
202
198
  [BlockchainType.sui]: SuiOrderResponse;
199
+ [BlockchainType.tron]: TronOrderResponse;
203
200
  };
204
201
  export type CreateOrderResponse<T extends BlockchainType = BlockchainType> = {
205
202
  type: T;
@@ -1,5 +1,5 @@
1
1
  import { Url } from '@gardenfi/utils';
2
- import { BaseCreateOrderResponse, CreateOrderResponse, Order, StarknetOrderResponse, EvmOrderResponse, BitcoinOrderResponse, SolanaOrderResponse, SuiOrderResponse } from './orderbook/orderbook.types';
2
+ import { BaseCreateOrderResponse, CreateOrderResponse, Order, StarknetOrderResponse, EvmOrderResponse, BitcoinOrderResponse, SolanaOrderResponse, SuiOrderResponse, TronOrderResponse } from './orderbook/orderbook.types';
3
3
  import { BlockchainType } from './constants/asset.types';
4
4
 
5
5
  /**
@@ -32,6 +32,10 @@ export declare const isSolanaOrderResponse: OrderResponseTypeGuard<SolanaOrderRe
32
32
  * Type guard for Sui order responses
33
33
  */
34
34
  export declare const isSuiOrderResponse: OrderResponseTypeGuard<SuiOrderResponse>;
35
+ /**
36
+ * Type guard for Tron order responses
37
+ */
38
+ export declare const isTronOrderResponse: OrderResponseTypeGuard<TronOrderResponse>;
35
39
  /**
36
40
  * Type guard for Order objects (matched orders)
37
41
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gardenfi/orderbook",
3
- "version": "3.0.4",
3
+ "version": "3.0.5-beta.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@coral-xyz/anchor": "^0.31.1",
31
- "@gardenfi/utils": "3.0.0",
31
+ "@gardenfi/utils": "2.5.3",
32
32
  "bufferutil": "^4.0.8",
33
33
  "node-cache": "^5.1.2",
34
34
  "siwe": "^2.1.4",