@gardenfi/orderbook 0.2.0-beta.40 → 0.2.0-beta.41
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 +1 -1
- package/dist/index3.js +9 -7
- package/dist/index5.cjs +1 -1
- package/dist/index5.js +9 -0
- package/dist/src/lib/asset.d.ts +2 -1
- package/dist/src/lib/constants.d.ts +1 -0
- package/package.json +1 -1
package/dist/index3.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var i=(e=>(e.Bitcoin="Bitcoin",e.EVM="EVM",e))(i||{}),o=(e=>(e.mainnet="mainnet",e.testnet="testnet",e.localnet="localnet",e))(o||{});const t={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"},a=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),s=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,r={[t.bitcoin]:144,[t.bitcoin_testnet]:144,[t.bitcoin_regtest]:144,[t.ethereum]:7200,[t.arbitrum]:7200,[t.ethereum_sepolia]:7200,[t.arbitrum_localnet]:7200,[t.arbitrum_sepolia]:7200,[t.ethereum_localnet]:7200,[t.base_sepolia]:7200,[t.base]:43200,[t.bera_testnet]:28800},l=e=>{if(s(e))return"Bitcoin";if(n(e))return"EVM";throw new Error("Invalid or unsupported chain")},
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var i=(e=>(e.Bitcoin="Bitcoin",e.EVM="EVM",e))(i||{}),o=(e=>(e.mainnet="mainnet",e.testnet="testnet",e.localnet="localnet",e))(o||{});const t={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"},a=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),s=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,r={[t.bitcoin]:144,[t.bitcoin_testnet]:144,[t.bitcoin_regtest]:144,[t.ethereum]:7200,[t.arbitrum]:7200,[t.ethereum_sepolia]:7200,[t.arbitrum_localnet]:7200,[t.arbitrum_sepolia]:7200,[t.ethereum_localnet]:7200,[t.base_sepolia]:7200,[t.base]:43200,[t.bera_testnet]:28800,[t.citrea_testnet]:28800},l=e=>{if(s(e))return"Bitcoin";if(n(e))return"EVM";throw new Error("Invalid or unsupported chain")},_=e=>{if(!r[e])throw new Error("Invalid or unsupported chain");return r[e]};exports.BlockchainType=i;exports.Chains=t;exports.NetworkType=o;exports.TimeLocks=r;exports.getBlockchainType=l;exports.getTimeLock=_;exports.isBitcoin=s;exports.isEVM=n;exports.isMainnet=a;
|
package/dist/index3.js
CHANGED
|
@@ -11,8 +11,9 @@ const t = {
|
|
|
11
11
|
arbitrum_sepolia: "arbitrum_sepolia",
|
|
12
12
|
ethereum_localnet: "ethereum_localnet",
|
|
13
13
|
base_sepolia: "base_sepolia",
|
|
14
|
-
bera_testnet: "bera_testnet"
|
|
15
|
-
|
|
14
|
+
bera_testnet: "bera_testnet",
|
|
15
|
+
citrea_testnet: "citrea_testnet"
|
|
16
|
+
}, a = (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), s = (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, r = {
|
|
16
17
|
[t.bitcoin]: 144,
|
|
17
18
|
[t.bitcoin_testnet]: 144,
|
|
18
19
|
[t.bitcoin_regtest]: 144,
|
|
@@ -24,12 +25,13 @@ const t = {
|
|
|
24
25
|
[t.ethereum_localnet]: 7200,
|
|
25
26
|
[t.base_sepolia]: 7200,
|
|
26
27
|
[t.base]: 43200,
|
|
27
|
-
[t.bera_testnet]: 28800
|
|
28
|
-
|
|
28
|
+
[t.bera_testnet]: 28800,
|
|
29
|
+
[t.citrea_testnet]: 28800
|
|
30
|
+
}, _ = (e) => {
|
|
29
31
|
if (s(e)) return "Bitcoin";
|
|
30
32
|
if (n(e)) return "EVM";
|
|
31
33
|
throw new Error("Invalid or unsupported chain");
|
|
32
|
-
},
|
|
34
|
+
}, b = (e) => {
|
|
33
35
|
if (!r[e]) throw new Error("Invalid or unsupported chain");
|
|
34
36
|
return r[e];
|
|
35
37
|
};
|
|
@@ -38,8 +40,8 @@ export {
|
|
|
38
40
|
t as Chains,
|
|
39
41
|
o as NetworkType,
|
|
40
42
|
r as TimeLocks,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
+
_ as getBlockchainType,
|
|
44
|
+
b as getTimeLock,
|
|
43
45
|
s as isBitcoin,
|
|
44
46
|
n as isEVM,
|
|
45
47
|
a as isMainnet
|
package/dist/index5.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index3.cjs"),t={id:31338,name:"Arbitrum Localnet",nativeCurrency:{name:"Ethereum",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["http://localhost:8546/"]}},testnet:!0},
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index3.cjs"),t={id:31338,name:"Arbitrum Localnet",nativeCurrency:{name:"Ethereum",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["http://localhost:8546/"]}},testnet:!0},d={id:31337,name:"Ethereum Localnet",nativeCurrency:{name:"Ethereum",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["http://localhost:8545/"]}},testnet:!0},c={name:"Bitcoin Regtest",decimals:8,symbol:"BTC",chain:e.Chains.bitcoin_regtest,atomicSwapAddress:"primary",tokenAddress:"primary"},a={name:"WBTC Arbitrum Localnet",decimals:8,symbol:"WBTC",chain:e.Chains.arbitrum_localnet,atomicSwapAddress:"0xDc64a140Aa3E981100a9becA4E685f962f0cF6C9",tokenAddress:"0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512"},s={name:"WBTC Ethereum Localnet",decimals:8,symbol:"WBTC",chain:e.Chains.ethereum_localnet,atomicSwapAddress:"0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512",tokenAddress:"0x5FbDB2315678afecb367f032d93F642f64180aa3"},i={localnet:{arbitrum_localnet_0xdc64a140aa3e981100a9beca4e685f962f0cf6c9:a,ethereum_localnet_0xe7f1725e7734ce288f8367e1bb143e90bb3f0512:s},testnet:{bitcoin_testnet_primary:{name:"BTC",decimals:8,symbol:"BTC",chain:e.Chains.bitcoin_testnet,tokenAddress:"primary",atomicSwapAddress:"primary"},ethereum_sepolia_0x3c6a17b8cd92976d1d91e491c93c98cd81998265:{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_0x1cd0bbd55fd66b4c5f7dfe434efd009c09e628d1:{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_0xd5fedb4cecb0f1d32788a190d9eb47d94d23ee4e:{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_0xdfe6d9363ee96152d39391009a6723819d9e25eb:{name:"iBTC",decimals:8,symbol:"iBTC",chain:e.Chains.arbitrum_sepolia,logo:"https://garden-finance.imgix.net/token-images/dlcBTCIcon.svg",tokenAddress:"0x685437f025c5f33a94818408c286bc1f023201fc",atomicSwapAddress:"0xdfe6d9363ee96152d39391009a6723819d9e25eb"},base_sepolia_0x00ab86f54f436cfe15253845f139955ae0c00baf:{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_0xb391ca6d0a76cd2a927bc314856e8a374a225cfc:{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_0xbcdad29ac77e5bb27fd528ab0045af630259fe4f:{name:"iBTC",decimals:8,symbol:"iBTC",chain:e.Chains.base_sepolia,logo:"https://garden-finance.imgix.net/token-images/dlcBTCIcon.svg",tokenAddress:"0x0b0D554D9573bAe1a7556d220847f45182918B28",atomicSwapAddress:"0xbcdad29ac77e5bb27fd528ab0045af630259fe4f"},bera_testnet_0x1dc94fdcad8aee13cfd34db8a26d26e31572805c:{name:"Wrapped Bitcoin",decimals:8,symbol:"WBTC",chain:e.Chains.bera_testnet,logo:"https://garden-finance.imgix.net/token-images/wbtc.svg",tokenAddress:"0x00ab86f54F436CfE15253845F139955ae0C00bAf",atomicSwapAddress:"0x1dC94FdcAd8Aee13cfd34Db8a26d26E31572805c"},citrea_testnet_0xad9d14ca82d9bf97fff745ffc7d48172a1c0969e:{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"}},mainnet:{bitcoin_primary:{name:"BTC",decimals:8,symbol:"BTC",chain:e.Chains.bitcoin,tokenAddress:"primary",atomicSwapAddress:"primary"},base_0xeae7721d779276eb0f5837e2fe260118724a2ba4:{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_0xd8a6e3fca403d79b6ad6216b60527f51cc967d39:{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_0x795dcb58d1cd4789169d5f938ea05e17eceb68ca:{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_0xd8a6e3fca403d79b6ad6216b60527f51cc967d39:{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_0xeae7721d779276eb0f5837e2fe260118724a2ba4:{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_0x6b6303fab8ec7232b4f2a7b9fa58e5216f608fcb:{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_0xeae7721d779276eb0f5837e2fe260118724a2ba4:{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_0xdc74a45e86dedf1ff7c6dac77e0c2f082f9e4f72:{name:"iBTC",decimals:8,symbol:"iBTC",chain:e.Chains.arbitrum,logo:"https://garden-finance.imgix.net/token-images/iBTC.svg",tokenAddress:"0x050C24dBf1eEc17babE5fc585F06116A259CC77A",atomicSwapAddress:"0xdc74a45e86dedf1ff7c6dac77e0c2f082f9e4f72"}}};exports.ArbitrumLocalnet=t;exports.EthereumLocalnet=d;exports.SupportedAssets=i;exports.WBTCArbitrumLocalnetAsset=a;exports.WBTCEthereumLocalnetAsset=s;exports.bitcoinRegtestAsset=c;
|
package/dist/index5.js
CHANGED
|
@@ -133,6 +133,15 @@ const s = {
|
|
|
133
133
|
logo: "https://garden-finance.imgix.net/token-images/wbtc.svg",
|
|
134
134
|
tokenAddress: "0x00ab86f54F436CfE15253845F139955ae0C00bAf",
|
|
135
135
|
atomicSwapAddress: "0x1dC94FdcAd8Aee13cfd34Db8a26d26E31572805c"
|
|
136
|
+
},
|
|
137
|
+
citrea_testnet_0xad9d14ca82d9bf97fff745ffc7d48172a1c0969e: {
|
|
138
|
+
name: "Wrapped Citrea Bitcoin",
|
|
139
|
+
decimals: 18,
|
|
140
|
+
symbol: "WCBTC",
|
|
141
|
+
chain: e.citrea_testnet,
|
|
142
|
+
logo: "https://garden-finance.imgix.net/token-images/wbtc.svg",
|
|
143
|
+
tokenAddress: "0x8d0c9d1c17aE5e40ffF9bE350f57840E9E66Cd93",
|
|
144
|
+
atomicSwapAddress: "0xaD9d14CA82d9BF97fFf745fFC7d48172A1c0969E"
|
|
136
145
|
}
|
|
137
146
|
},
|
|
138
147
|
mainnet: {
|
package/dist/src/lib/asset.d.ts
CHANGED
|
@@ -42,12 +42,13 @@ export declare const Chains: {
|
|
|
42
42
|
readonly ethereum_localnet: "ethereum_localnet";
|
|
43
43
|
readonly base_sepolia: "base_sepolia";
|
|
44
44
|
readonly bera_testnet: "bera_testnet";
|
|
45
|
+
readonly citrea_testnet: "citrea_testnet";
|
|
45
46
|
};
|
|
46
47
|
export type Chain = keyof typeof Chains;
|
|
47
48
|
export type EvmChain = keyof Omit<typeof Chains, 'bitcoin' | 'bitcoin_testnet' | 'bitcoin_regtest'>;
|
|
48
49
|
export declare const isMainnet: (chain: Chain) => chain is "bitcoin" | "ethereum" | "base" | "arbitrum";
|
|
49
50
|
export declare const isBitcoin: (chain: Chain) => chain is "bitcoin" | "bitcoin_testnet" | "bitcoin_regtest";
|
|
50
|
-
export declare const isEVM: (chain: Chain) => chain is "ethereum" | "base" | "arbitrum" | "ethereum_sepolia" | "arbitrum_localnet" | "arbitrum_sepolia" | "ethereum_localnet" | "base_sepolia" | "bera_testnet";
|
|
51
|
+
export declare const isEVM: (chain: Chain) => chain is "ethereum" | "base" | "arbitrum" | "ethereum_sepolia" | "arbitrum_localnet" | "arbitrum_sepolia" | "ethereum_localnet" | "base_sepolia" | "bera_testnet" | "citrea_testnet";
|
|
51
52
|
export declare const TimeLocks: Record<Chain, number>;
|
|
52
53
|
export declare const getBlockchainType: (chain: Chain) => BlockchainType;
|
|
53
54
|
export declare const getTimeLock: (chain: Chain) => number;
|
|
@@ -21,6 +21,7 @@ type SupportedAssets = {
|
|
|
21
21
|
base_sepolia_0xb391ca6d0a76cd2a927bc314856e8a374a225cfc: Asset;
|
|
22
22
|
base_sepolia_0xbcdad29ac77e5bb27fd528ab0045af630259fe4f: Asset;
|
|
23
23
|
bera_testnet_0x1dc94fdcad8aee13cfd34db8a26d26e31572805c: Asset;
|
|
24
|
+
citrea_testnet_0xad9d14ca82d9bf97fff745ffc7d48172a1c0969e: Asset;
|
|
24
25
|
};
|
|
25
26
|
mainnet: {
|
|
26
27
|
bitcoin_primary: Asset;
|