@gardenfi/orderbook 2.1.7-beta.13 → 2.1.7-beta.14
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/index3.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var s=(t=>(t.Bitcoin="Bitcoin",t.EVM="EVM",t.Starknet="Starknet",t))(s||{}),i=(t=>(t.mainnet="mainnet",t.testnet="testnet",t.localnet="localnet",t))(i||{});const e={bitcoin:"bitcoin",bitcoin_testnet:"bitcoin_testnet",bitcoin_regtest:"bitcoin_regtest",ethereum:"ethereum",base:"base",arbitrum:"arbitrum",ethereum_sepolia:"ethereum_sepolia",arbitrum_localnet:"arbitrum_localnet",arbitrum_sepolia:"arbitrum_sepolia",ethereum_localnet:"ethereum_localnet",base_sepolia:"base_sepolia",bera_testnet:"bera_testnet",citrea_testnet:"citrea_testnet",bera:"bera",monad_testnet:"monad_testnet",starknet:"starknet",starknet_sepolia:"starknet_sepolia",starknet_devnet:"starknet_devnet",hyperliquid_testnet:"hyperliquid_testnet",hyperliquid:"hyperliquid",unichain:"unichain",corn:"corn"},u=t=>!(t===e.ethereum_sepolia||t===e.bitcoin_testnet||t===e.bitcoin_regtest||t===e.arbitrum_localnet||t===e.ethereum_localnet||t===e.arbitrum_sepolia||t===e.base_sepolia||t===e.bera_testnet||t===e.citrea_testnet||t===e.monad_testnet||t===e.starknet_devnet||t===e.starknet_sepolia||t===e.hyperliquid_testnet),o=t=>t===e.bitcoin||t===e.bitcoin_testnet||t===e.bitcoin_regtest,n=t=>t===e.ethereum||t===e.arbitrum||t===e.ethereum_sepolia||t===e.ethereum_localnet||t===e.arbitrum_localnet||t===e.arbitrum_sepolia||t===e.base_sepolia||t===e.base||t===e.bera_testnet||t===e.citrea_testnet||t===e.bera||t===e.monad_testnet||t===e.hyperliquid_testnet||t===e.hyperliquid||t===e.unichain||t===e.corn,a=t=>t===e.starknet||t===e.starknet_devnet||t===e.starknet_sepolia,r={[e.bitcoin]:144,[e.bitcoin_testnet]:144,[e.bitcoin_regtest]:
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var s=(t=>(t.Bitcoin="Bitcoin",t.EVM="EVM",t.Starknet="Starknet",t))(s||{}),i=(t=>(t.mainnet="mainnet",t.testnet="testnet",t.localnet="localnet",t))(i||{});const e={bitcoin:"bitcoin",bitcoin_testnet:"bitcoin_testnet",bitcoin_regtest:"bitcoin_regtest",ethereum:"ethereum",base:"base",arbitrum:"arbitrum",ethereum_sepolia:"ethereum_sepolia",arbitrum_localnet:"arbitrum_localnet",arbitrum_sepolia:"arbitrum_sepolia",ethereum_localnet:"ethereum_localnet",base_sepolia:"base_sepolia",bera_testnet:"bera_testnet",citrea_testnet:"citrea_testnet",bera:"bera",monad_testnet:"monad_testnet",starknet:"starknet",starknet_sepolia:"starknet_sepolia",starknet_devnet:"starknet_devnet",hyperliquid_testnet:"hyperliquid_testnet",hyperliquid:"hyperliquid",unichain:"unichain",corn:"corn"},u=t=>!(t===e.ethereum_sepolia||t===e.bitcoin_testnet||t===e.bitcoin_regtest||t===e.arbitrum_localnet||t===e.ethereum_localnet||t===e.arbitrum_sepolia||t===e.base_sepolia||t===e.bera_testnet||t===e.citrea_testnet||t===e.monad_testnet||t===e.starknet_devnet||t===e.starknet_sepolia||t===e.hyperliquid_testnet),o=t=>t===e.bitcoin||t===e.bitcoin_testnet||t===e.bitcoin_regtest,n=t=>t===e.ethereum||t===e.arbitrum||t===e.ethereum_sepolia||t===e.ethereum_localnet||t===e.arbitrum_localnet||t===e.arbitrum_sepolia||t===e.base_sepolia||t===e.base||t===e.bera_testnet||t===e.citrea_testnet||t===e.bera||t===e.monad_testnet||t===e.hyperliquid_testnet||t===e.hyperliquid||t===e.unichain||t===e.corn,a=t=>t===e.starknet||t===e.starknet_devnet||t===e.starknet_sepolia,r={[e.bitcoin]:144,[e.bitcoin_testnet]:144,[e.bitcoin_regtest]:7200,[e.ethereum]:7200,[e.arbitrum]:7200,[e.ethereum_sepolia]:7200,[e.arbitrum_localnet]:7200,[e.arbitrum_sepolia]:7200,[e.ethereum_localnet]:7200,[e.base_sepolia]:43200,[e.base]:43200,[e.bera_testnet]:43200,[e.citrea_testnet]:43200,[e.bera]:43200,[e.monad_testnet]:172800,[e.starknet]:2880,[e.starknet_devnet]:2880,[e.starknet_sepolia]:2880,[e.hyperliquid_testnet]:43200,[e.hyperliquid]:43200,[e.unichain]:86400,[e.corn]:17136},b=t=>{if(o(t))return"Bitcoin";if(n(t))return"EVM";if(a(t))return"Starknet";throw new Error("Invalid or unsupported chain")},m=t=>{if(!r[t])throw new Error("Invalid or unsupported chain");return r[t]},_="0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",p=(t,l)=>n(t)&&l.toLowerCase()===_.toLowerCase();exports.BlockchainType=s;exports.Chains=e;exports.NativeTokenAddress=_;exports.NetworkType=i;exports.TimeLocks=r;exports.getBlockchainType=b;exports.getTimeLock=m;exports.isBitcoin=o;exports.isEVM=n;exports.isEvmNativeToken=p;exports.isMainnet=u;exports.isStarknet=a;
|
package/dist/index3.js
CHANGED
|
@@ -25,7 +25,7 @@ const t = {
|
|
|
25
25
|
}, l = (e) => !(e === t.ethereum_sepolia || e === t.bitcoin_testnet || e === t.bitcoin_regtest || e === t.arbitrum_localnet || e === t.ethereum_localnet || e === t.arbitrum_sepolia || e === t.base_sepolia || e === t.bera_testnet || e === t.citrea_testnet || e === t.monad_testnet || e === t.starknet_devnet || e === t.starknet_sepolia || e === t.hyperliquid_testnet), a = (e) => e === t.bitcoin || e === t.bitcoin_testnet || e === t.bitcoin_regtest, n = (e) => e === t.ethereum || e === t.arbitrum || e === t.ethereum_sepolia || e === t.ethereum_localnet || e === t.arbitrum_localnet || e === t.arbitrum_sepolia || e === t.base_sepolia || e === t.base || e === t.bera_testnet || e === t.citrea_testnet || e === t.bera || e === t.monad_testnet || e === t.hyperliquid_testnet || e === t.hyperliquid || e === t.unichain || e === t.corn, _ = (e) => e === t.starknet || e === t.starknet_devnet || e === t.starknet_sepolia, r = {
|
|
26
26
|
[t.bitcoin]: 144,
|
|
27
27
|
[t.bitcoin_testnet]: 144,
|
|
28
|
-
[t.bitcoin_regtest]:
|
|
28
|
+
[t.bitcoin_regtest]: 7200,
|
|
29
29
|
[t.ethereum]: 7200,
|
|
30
30
|
[t.arbitrum]: 7200,
|
|
31
31
|
[t.ethereum_sepolia]: 7200,
|
package/dist/index5.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index3.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index3.cjs"),a=require("@gardenfi/utils"),d={id:1001,name:"Starknet Localnet",nativeCurrency:{name:"Stark Token",symbol:"STRK",decimals:18},rpcUrls:{default:{http:[a.API.localnet.starknet]}},testnet:!0},o={id:31338,name:"Arbitrum Localnet",nativeCurrency:{name:"Ethereum",symbol:"ETH",decimals:18},rpcUrls:{default:{http:[a.API.localnet.arbitrum]}},testnet:!0},m={id:31337,name:"Ethereum Localnet",nativeCurrency:{name:"Ethereum",symbol:"ETH",decimals:18},rpcUrls:{default:{http:[a.API.localnet.ethereum]}},testnet:!0},t={name:"Bitcoin Regtest",decimals:8,symbol:"BTC",chain:e.Chains.bitcoin_regtest,atomicSwapAddress:"primary",tokenAddress:"primary"},s={name:"WBTC Arbitrum Localnet",decimals:8,symbol:"WBTC",chain:e.Chains.arbitrum_localnet,atomicSwapAddress:"0x0165878A594ca255338adfa4d48449f69242Eb8F",tokenAddress:"0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0"},n={name:"WBTC Ethereum Localnet",decimals:8,symbol:"WBTC",chain:e.Chains.ethereum_localnet,atomicSwapAddress:"0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0",tokenAddress:"0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512"},i={name:"STRK Starknet Localnet",decimals:18,symbol:"STRK",chain:e.Chains.starknet_devnet,atomicSwapAddress:"0x76f1c2d4fe41e381f368130ef47fa9d8791b3badd5b4a844d06154e99ae56c5",tokenAddress:"primary"},c={name:"ETH Starknet Localnet",decimals:18,symbol:"ETH",chain:e.Chains.starknet_devnet,atomicSwapAddress:"0x37b703339cd490399064ec5203301bfe73b57c96007cec23b406ad22bf61045",tokenAddress:"0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"},r={localnet:{arbitrum_localnet_WBTC:s,ethereum_localnet_WBTC:n,starknet_localnet_STRK:i,starknet_localnet_ETH:c,bitcoin_regtest_BTC:t},testnet:{bitcoin_testnet_BTC:{name:"BTC",decimals:8,symbol:"BTC",chain:e.Chains.bitcoin_testnet,tokenAddress:"primary",atomicSwapAddress:"primary"},ethereum_sepolia_WBTC:{name:"Wrapped Bitcoin",decimals:8,symbol:"WBTC",chain:e.Chains.ethereum_sepolia,logo:"https://garden-finance.imgix.net/token-images/wbtc.svg",tokenAddress:"0x4D68da063577F98C55166c7AF6955cF58a97b20A",atomicSwapAddress:"0x3C6a17b8cD92976D1D91E491c93c98cd81998265"},arbitrum_sepolia_WBTC:{name:"Wrapped Bitcoin",decimals:8,symbol:"WBTC",logo:"https://garden-finance.imgix.net/token-images/wbtc.svg",chain:e.Chains.arbitrum_sepolia,tokenAddress:"0x00ab86f54F436CfE15253845F139955ae0C00bAf",atomicSwapAddress:"0x1cd0bBd55fD66B4C5F7dfE434eFD009C09e628d1"},arbitrum_sepolia_SEED:{name:"Seed",decimals:18,symbol:"SEED",chain:e.Chains.arbitrum_sepolia,logo:"https://garden-finance.imgix.net/token-images/seed.svg",tokenAddress:"0x13DCec0762EcC5E666c207ab44Dc768e5e33070F",atomicSwapAddress:"0xD5FeDb4ceCB0F1D32788a190d9EB47D94D23eE4e"},arbitrum_sepolia_iBTC:{name:"iBTC",decimals:8,symbol:"iBTC",chain:e.Chains.arbitrum_sepolia,logo:"https://garden-finance.imgix.net/token-images/dlcBTCIcon.svg",tokenAddress:"0x8219B871534F29ff7434519287131a875e0D8eCa",atomicSwapAddress:"0xdfe6d9363ee96152d39391009a6723819d9e25eb"},base_sepolia_WBTC:{name:"Wrapped Bitcoin",decimals:8,symbol:"WBTC",chain:e.Chains.base_sepolia,logo:"https://garden-finance.imgix.net/token-images/wbtc.svg",tokenAddress:"0x13DCec0762EcC5E666c207ab44Dc768e5e33070F",atomicSwapAddress:"0x00ab86f54F436CfE15253845F139955ae0C00bAf"},base_sepolia_USDT:{name:"Tether USD",decimals:6,symbol:"USDT",chain:e.Chains.base_sepolia,logo:"https://garden-finance.imgix.net/token-images/usdt.svg",tokenAddress:"0xD72Fc3e7D52301b3e5f7d4E3366F88d5C8747520",atomicSwapAddress:"0xB391CA6D0A76CD2A927bC314856E8a374a225CFc"},base_sepolia_iBTC:{name:"iBTC",decimals:8,symbol:"iBTC",chain:e.Chains.base_sepolia,logo:"https://garden-finance.imgix.net/token-images/dlcBTCIcon.svg",tokenAddress:"0xbaFb499B60F9E30fd82A54342cb7695C92F5B527",atomicSwapAddress:"0xbcdad29ac77e5bb27fd528ab0045af630259fe4f"},citrea_testnet_WCBTC:{name:"Wrapped Citrea Bitcoin",decimals:18,symbol:"WCBTC",chain:e.Chains.citrea_testnet,logo:"https://garden-finance.imgix.net/token-images/wbtc.svg",tokenAddress:"0x8d0c9d1c17aE5e40ffF9bE350f57840E9E66Cd93",atomicSwapAddress:"0xaD9d14CA82d9BF97fFf745fFC7d48172A1c0969E"},citrea_testnet_cBTC:{name:"Citrea Bitcoin",decimals:18,symbol:"cBTC",chain:e.Chains.citrea_testnet,logo:"https://garden-finance.imgix.net/token-images/bitcoin.svg",tokenAddress:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",atomicSwapAddress:"0x6218FA00f47a61aCD8B46D6f1b15c4D730F803F2"},starknet_testnet_WBTC:{name:"Wrapped Bitcoin",decimals:8,symbol:"WBTC",chain:e.Chains.starknet_sepolia,logo:"https://garden-finance.imgix.net/token-images/wbtc.svg",tokenAddress:"0x496bef3ed20371382fbe0ca6a5a64252c5c848f9f1f0cccf8110fc4def912d5",atomicSwapAddress:"0x06579d255314109429a4477d89629bc2b94f529ae01979c2f8014f9246482603"},monad_testnet_cbBTC:{name:"Coinbase Bitcoin",decimals:8,symbol:"cbBTC",chain:e.Chains.monad_testnet,logo:"https://garden-finance.imgix.net/token-images/cbBTC.svg",tokenAddress:"0xaD9d14CA82d9BF97fFf745fFC7d48172A1c0969E",atomicSwapAddress:"0x1dC94FdcAd8Aee13cfd34Db8a26d26E31572805c"},monad_testnet_USDC:{name:"USD Coin",decimals:6,symbol:"USDC",chain:e.Chains.monad_testnet,logo:"https://garden-finance.imgix.net/token-images/usdc.svg",tokenAddress:"0x00ab86f54F436CfE15253845F139955ae0C00bAf",atomicSwapAddress:"0xE99D8A21d4F2ad2f90c279c869311503f9e25867"}},mainnet:{bitcoin_BTC:{name:"BTC",decimals:8,symbol:"BTC",chain:e.Chains.bitcoin,tokenAddress:"primary",atomicSwapAddress:"primary"},base_cbBTC:{name:"Coinbase Bitcoin",decimals:8,symbol:"cbBTC",chain:e.Chains.base,logo:"https://garden-finance.imgix.net/token-images/cbBTC.svg",tokenAddress:"0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf",atomicSwapAddress:"0xeae7721d779276eb0f5837e2fe260118724a2ba4"},base_USDC:{name:"USD Coin",decimals:6,symbol:"USDC",chain:e.Chains.base,logo:"https://garden-finance.imgix.net/token-images/usdc.svg",tokenAddress:"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",atomicSwapAddress:"0xd8a6e3fca403d79b6ad6216b60527f51cc967d39"},ethereum_WBTC:{name:"Wrapped Bitcoin",decimals:8,symbol:"WBTC",chain:e.Chains.ethereum,logo:"https://garden-finance.imgix.net/token-images/wbtc.svg",tokenAddress:"0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599",atomicSwapAddress:"0x795dcb58d1cd4789169d5f938ea05e17eceb68ca"},ethereum_USDC:{name:"USD Coin",decimals:6,symbol:"USDC",chain:e.Chains.ethereum,logo:"https://garden-finance.imgix.net/token-images/usdc.svg",tokenAddress:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",atomicSwapAddress:"0xd8a6e3fca403d79b6ad6216b60527f51cc967d39"},ethereum_cbBTC:{name:"Coinbase Bitcoin",decimals:8,symbol:"cbBTC",chain:e.Chains.ethereum,logo:"https://garden-finance.imgix.net/token-images/cbBTC.svg",tokenAddress:"0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf",atomicSwapAddress:"0xeae7721d779276eb0f5837e2fe260118724a2ba4"},arbitrum_WBTC:{name:"Wrapped Bitcoin",decimals:8,symbol:"WBTC",chain:e.Chains.arbitrum,logo:"https://garden-finance.imgix.net/token-images/wbtc.svg",tokenAddress:"0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f",atomicSwapAddress:"0x6b6303fab8ec7232b4f2a7b9fa58e5216f608fcb"},arbitrum_USDC:{name:"USD Coin",decimals:6,symbol:"USDC",chain:e.Chains.arbitrum,logo:"https://garden-finance.imgix.net/token-images/usdc.svg",tokenAddress:"0xaf88d065e77c8cC2239327C5EDb3A432268e5831",atomicSwapAddress:"0xeae7721d779276eb0f5837e2fe260118724a2ba4"},arbitrum_iBTC:{name:"iBTC",decimals:8,symbol:"iBTC",chain:e.Chains.arbitrum,logo:"https://garden-finance.imgix.net/token-images/iBTC.svg",tokenAddress:"0x050C24dBf1eEc17babE5fc585F06116A259CC77A",atomicSwapAddress:"0xdc74a45e86dedf1ff7c6dac77e0c2f082f9e4f72"},bera_LBTC:{name:"Lombard Bitcoin",decimals:8,symbol:"LBTC",chain:e.Chains.bera,logo:"https://garden-finance.imgix.net/token-images/LBTC.svg",tokenAddress:"0xecAc9C5F704e954931349Da37F60E39f515c11c1",atomicSwapAddress:"0x39f3294352208905fc6ebf033954E6c6455CdB4C"},hyperliquid_uBTC:{name:"Unit Bitcoin",decimals:8,symbol:"uBTC",chain:e.Chains.hyperliquid,tokenAddress:"0x9FDBdA0A5e284c32744D2f17Ee5c74B284993463",atomicSwapAddress:"0x39f3294352208905fc6ebf033954E6c6455CdB4C"},starknet_WBTC:{name:"Wrapped Bitcoin",decimals:8,symbol:"WBTC",chain:e.Chains.starknet,logo:"https://garden-finance.imgix.net/token-images/wbtc.svg",tokenAddress:"0x3fe2b97c1fd336e750087d68b9b867997fd64a2661ff3ca5a7c771641e8e7ac",atomicSwapAddress:"0x7defd8eb3b770005ab1ca5f89ad31f98fb5bc3c52deaeafd130be3b49f967b4"},unichain_USDC:{name:"USD Coin",decimals:6,symbol:"USDC",chain:e.Chains.unichain,logo:"https://garden-finance.imgix.net/token-images/usdc.svg",tokenAddress:"0x078D782b760474a361dDA0AF3839290b0EF57AD6",atomicSwapAddress:"0x795Dcb58d1cd4789169D5F938Ea05E17ecEB68cA"},corn_BTCN:{name:"Bitcorn",decimals:18,symbol:"BTCN",chain:e.Chains.corn,logo:"https://garden-finance.imgix.net/token-images/bitcorn.jpg",tokenAddress:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",atomicSwapAddress:"0xeaE7721d779276eb0f5837e2fE260118724a2Ba4"}}};exports.ArbitrumLocalnet=o;exports.ETHStarknetLocalnetAsset=c;exports.EthereumLocalnet=m;exports.STRKStarknetLocalnetAsset=i;exports.StarknetLocalnet=d;exports.SupportedAssets=r;exports.WBTCArbitrumLocalnetAsset=s;exports.WBTCEthereumLocalnetAsset=n;exports.bitcoinRegtestAsset=t;
|
package/dist/index5.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Chains as e } from "./index3.js";
|
|
2
|
-
|
|
2
|
+
import { API as a } from "@gardenfi/utils";
|
|
3
|
+
const m = {
|
|
3
4
|
id: 1001,
|
|
4
5
|
name: "Starknet Localnet",
|
|
5
6
|
nativeCurrency: {
|
|
@@ -9,11 +10,11 @@ const i = {
|
|
|
9
10
|
},
|
|
10
11
|
rpcUrls: {
|
|
11
12
|
default: {
|
|
12
|
-
http: [
|
|
13
|
+
http: [a.localnet.starknet]
|
|
13
14
|
}
|
|
14
15
|
},
|
|
15
16
|
testnet: !0
|
|
16
|
-
},
|
|
17
|
+
}, r = {
|
|
17
18
|
id: 31338,
|
|
18
19
|
name: "Arbitrum Localnet",
|
|
19
20
|
nativeCurrency: {
|
|
@@ -23,11 +24,11 @@ const i = {
|
|
|
23
24
|
},
|
|
24
25
|
rpcUrls: {
|
|
25
26
|
default: {
|
|
26
|
-
http: [
|
|
27
|
+
http: [a.localnet.arbitrum]
|
|
27
28
|
}
|
|
28
29
|
},
|
|
29
30
|
testnet: !0
|
|
30
|
-
},
|
|
31
|
+
}, b = {
|
|
31
32
|
id: 31337,
|
|
32
33
|
name: "Ethereum Localnet",
|
|
33
34
|
nativeCurrency: {
|
|
@@ -37,51 +38,52 @@ const i = {
|
|
|
37
38
|
},
|
|
38
39
|
rpcUrls: {
|
|
39
40
|
default: {
|
|
40
|
-
http: [
|
|
41
|
+
http: [a.localnet.ethereum]
|
|
41
42
|
}
|
|
42
43
|
},
|
|
43
44
|
testnet: !0
|
|
44
|
-
},
|
|
45
|
+
}, t = {
|
|
45
46
|
name: "Bitcoin Regtest",
|
|
46
47
|
decimals: 8,
|
|
47
48
|
symbol: "BTC",
|
|
48
49
|
chain: e.bitcoin_regtest,
|
|
49
50
|
atomicSwapAddress: "primary",
|
|
50
51
|
tokenAddress: "primary"
|
|
51
|
-
},
|
|
52
|
+
}, s = {
|
|
52
53
|
name: "WBTC Arbitrum Localnet",
|
|
53
54
|
decimals: 8,
|
|
54
55
|
symbol: "WBTC",
|
|
55
56
|
chain: e.arbitrum_localnet,
|
|
56
|
-
atomicSwapAddress: "
|
|
57
|
-
tokenAddress: "
|
|
58
|
-
},
|
|
57
|
+
atomicSwapAddress: "0x0165878A594ca255338adfa4d48449f69242Eb8F",
|
|
58
|
+
tokenAddress: "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0"
|
|
59
|
+
}, n = {
|
|
59
60
|
name: "WBTC Ethereum Localnet",
|
|
60
61
|
decimals: 8,
|
|
61
62
|
symbol: "WBTC",
|
|
62
63
|
chain: e.ethereum_localnet,
|
|
63
|
-
atomicSwapAddress: "
|
|
64
|
-
tokenAddress: "
|
|
65
|
-
},
|
|
64
|
+
atomicSwapAddress: "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0",
|
|
65
|
+
tokenAddress: "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512"
|
|
66
|
+
}, i = {
|
|
66
67
|
name: "STRK Starknet Localnet",
|
|
67
68
|
decimals: 18,
|
|
68
69
|
symbol: "STRK",
|
|
69
70
|
chain: e.starknet_devnet,
|
|
70
|
-
atomicSwapAddress: "
|
|
71
|
-
tokenAddress: "
|
|
72
|
-
},
|
|
71
|
+
atomicSwapAddress: "0x76f1c2d4fe41e381f368130ef47fa9d8791b3badd5b4a844d06154e99ae56c5",
|
|
72
|
+
tokenAddress: "primary"
|
|
73
|
+
}, c = {
|
|
73
74
|
name: "ETH Starknet Localnet",
|
|
74
75
|
decimals: 18,
|
|
75
76
|
symbol: "ETH",
|
|
76
77
|
chain: e.starknet_devnet,
|
|
77
|
-
atomicSwapAddress: "
|
|
78
|
-
tokenAddress: "
|
|
79
|
-
},
|
|
78
|
+
atomicSwapAddress: "0x37b703339cd490399064ec5203301bfe73b57c96007cec23b406ad22bf61045",
|
|
79
|
+
tokenAddress: "0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"
|
|
80
|
+
}, f = {
|
|
80
81
|
localnet: {
|
|
81
|
-
arbitrum_localnet_WBTC:
|
|
82
|
-
ethereum_localnet_WBTC:
|
|
83
|
-
starknet_localnet_STRK:
|
|
84
|
-
starknet_localnet_ETH:
|
|
82
|
+
arbitrum_localnet_WBTC: s,
|
|
83
|
+
ethereum_localnet_WBTC: n,
|
|
84
|
+
starknet_localnet_STRK: i,
|
|
85
|
+
starknet_localnet_ETH: c,
|
|
86
|
+
bitcoin_regtest_BTC: t
|
|
85
87
|
},
|
|
86
88
|
testnet: {
|
|
87
89
|
bitcoin_testnet_BTC: {
|
|
@@ -329,13 +331,13 @@ const i = {
|
|
|
329
331
|
}
|
|
330
332
|
};
|
|
331
333
|
export {
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
334
|
+
r as ArbitrumLocalnet,
|
|
335
|
+
c as ETHStarknetLocalnetAsset,
|
|
336
|
+
b as EthereumLocalnet,
|
|
337
|
+
i as STRKStarknetLocalnetAsset,
|
|
338
|
+
m as StarknetLocalnet,
|
|
339
|
+
f as SupportedAssets,
|
|
340
|
+
s as WBTCArbitrumLocalnetAsset,
|
|
341
|
+
n as WBTCEthereumLocalnetAsset,
|
|
342
|
+
t as bitcoinRegtestAsset
|
|
341
343
|
};
|
|
@@ -15,6 +15,7 @@ export declare const SupportedAssets: {
|
|
|
15
15
|
readonly ethereum_localnet_WBTC: import('./asset').AssetToken;
|
|
16
16
|
readonly starknet_localnet_STRK: import('./asset').AssetToken;
|
|
17
17
|
readonly starknet_localnet_ETH: import('./asset').AssetToken;
|
|
18
|
+
readonly bitcoin_regtest_BTC: import('./asset').AssetToken;
|
|
18
19
|
};
|
|
19
20
|
readonly testnet: {
|
|
20
21
|
readonly bitcoin_testnet_BTC: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AsyncResult } from '@catalogfi/utils';
|
|
2
|
-
import { CreateOrder,
|
|
2
|
+
import { CreateOrder, CreateOrderRequestWithAdditionalData, IOrderbook, MatchedOrder, PaginatedData, PaginationConfig, Status } from './orderbook.types';
|
|
3
3
|
import { IAuth, Url } from '@gardenfi/utils';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -16,7 +16,7 @@ export declare class Orderbook implements IOrderbook {
|
|
|
16
16
|
* @param {IAuth} auth - The auth object.
|
|
17
17
|
* @returns {string} The create order ID.
|
|
18
18
|
*/
|
|
19
|
-
createOrder(order:
|
|
19
|
+
createOrder(order: CreateOrderRequestWithAdditionalData, auth: IAuth): AsyncResult<string, string>;
|
|
20
20
|
getOrder<T extends boolean>(id: string, matched: T): AsyncResult<T extends true ? MatchedOrder : CreateOrder, string>;
|
|
21
21
|
getMatchedOrders(address: string, status: Status, paginationConfig?: PaginationConfig): AsyncResult<PaginatedData<MatchedOrder>, string>;
|
|
22
22
|
getUnMatchedOrders(address: string, paginationConfig?: PaginationConfig): AsyncResult<PaginatedData<CreateOrder>, string>;
|
|
@@ -89,7 +89,7 @@ export interface IOrderbook {
|
|
|
89
89
|
* @param {CreateOrderConfig} orderConfig - The configuration for the creating the order.
|
|
90
90
|
* @returns {number} The create order ID.
|
|
91
91
|
*/
|
|
92
|
-
createOrder(order:
|
|
92
|
+
createOrder(order: CreateOrderRequestWithAdditionalData, auth: IAuth): AsyncResult<string, string>;
|
|
93
93
|
/**
|
|
94
94
|
* Get the order from orderbook based on provided Id and match status.
|
|
95
95
|
* @param id - The create Id of the order
|
|
@@ -192,15 +192,15 @@ export type CreateOrderRequest = {
|
|
|
192
192
|
destination_chain: string;
|
|
193
193
|
source_asset: string;
|
|
194
194
|
destination_asset: string;
|
|
195
|
-
initiator_source_address
|
|
196
|
-
initiator_destination_address
|
|
195
|
+
initiator_source_address: string;
|
|
196
|
+
initiator_destination_address: string;
|
|
197
197
|
source_amount: string;
|
|
198
198
|
destination_amount: string;
|
|
199
199
|
fee: string;
|
|
200
200
|
nonce: string;
|
|
201
201
|
min_destination_confirmations: number;
|
|
202
202
|
timelock: number;
|
|
203
|
-
secret_hash
|
|
203
|
+
secret_hash: string;
|
|
204
204
|
};
|
|
205
205
|
export type CreateOrderRequestWithAdditionalData = CreateOrderRequest & AdditionalData & AffiliateFeeList<AffiliateFeeWithAmount>;
|
|
206
206
|
export type CreateOrder = CreateOrderRequestWithAdditionalData & {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gardenfi/orderbook",
|
|
3
|
-
"version": "2.1.7-beta.
|
|
3
|
+
"version": "2.1.7-beta.14",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"registry": "https://registry.npmjs.org/"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@gardenfi/utils": "2.1.3",
|
|
29
|
+
"@gardenfi/utils": "2.1.3-beta.18",
|
|
30
30
|
"bufferutil": "^4.0.8",
|
|
31
31
|
"siwe": "^2.1.4",
|
|
32
32
|
"utf-8-validate": "^6.0.3",
|