@avalabs/fusion-sdk 0.22.0 → 0.23.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.
Files changed (31) hide show
  1. package/dist/constants.cjs +1 -1
  2. package/dist/constants.cjs.map +1 -1
  3. package/dist/constants.d.cts +18 -2
  4. package/dist/constants.d.ts +18 -2
  5. package/dist/constants.js +1 -1
  6. package/dist/constants.js.map +1 -1
  7. package/dist/mod.cjs +1 -1
  8. package/dist/mod.d.cts +3 -2
  9. package/dist/mod.d.ts +3 -2
  10. package/dist/mod.js +1 -1
  11. package/dist/transfer-service/markr/recurring/_frequency.cjs.map +1 -1
  12. package/dist/transfer-service/markr/recurring/_frequency.d.cts +1 -1
  13. package/dist/transfer-service/markr/recurring/_frequency.d.ts +1 -1
  14. package/dist/transfer-service/markr/recurring/_frequency.js.map +1 -1
  15. package/dist/transfer-service/markr/recurring/_namespace.cjs +1 -1
  16. package/dist/transfer-service/markr/recurring/_namespace.cjs.map +1 -1
  17. package/dist/transfer-service/markr/recurring/_namespace.js +1 -1
  18. package/dist/transfer-service/markr/recurring/_namespace.js.map +1 -1
  19. package/dist/transfer-service/markr/recurring/types.cjs.map +1 -1
  20. package/dist/transfer-service/markr/recurring/types.d.cts +16 -0
  21. package/dist/transfer-service/markr/recurring/types.d.ts +16 -0
  22. package/dist/transfer-service/markr/recurring/types.js.map +1 -1
  23. package/dist/types/transfer.d.cts +8 -0
  24. package/dist/types/transfer.d.ts +8 -0
  25. package/dist/utils/destination-chains.cjs +2 -0
  26. package/dist/utils/destination-chains.cjs.map +1 -0
  27. package/dist/utils/destination-chains.d.cts +52 -0
  28. package/dist/utils/destination-chains.d.ts +52 -0
  29. package/dist/utils/destination-chains.js +2 -0
  30. package/dist/utils/destination-chains.js.map +1 -0
  31. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- let e=function(e){return e.DEV=`dev`,e.PROD=`production`,e.TEST=`test`,e}({}),t=function(e){return e.NATIVE=`native`,e.ERC20=`erc20`,e.SPL=`spl`,e}({}),n=function(e){return e.AVALANCHE_CCT=`avalanche-cct`,e.AVALANCHE_EVM=`avalanche-evm`,e.LOMBARD_BTC_TO_BTCB=`lombard-btc-to-btcb`,e.LOMBARD_BTCB_TO_BTC=`lombard-btcb-to-btc`,e.MARKR=`markr`,e.WRAP_UNWRAP=`wrap-unwrap`,e}({});const r=[n.LOMBARD_BTCB_TO_BTC,n.LOMBARD_BTC_TO_BTCB],i=[n.AVALANCHE_EVM,n.WRAP_UNWRAP];let a=function(e){return e.AddressOwnership=`address-ownership`,e.AllowanceApproval=`allowance-approval`,e.AvalancheCrossChainExport=`avalanche-cross-chain-export`,e.AvalancheCrossChainImport=`avalanche-cross-chain-import`,e.TokensTransfer=`tokens-transfer`,e.WrapToken=`wrap-token`,e.HyperliquidAuthorize=`hyperliquid-authorize`,e.HyperliquidSendAsset=`hyperliquid-send-asset`,e}({}),o=function(e){return e.FUJI=`eip155:43113`,e.MAINNET=`eip155:43114`,e}({}),s=function(e){return e.MAINNET=`eip155:1`,e.SEPOLIA=`eip155:11155111`,e}({}),c=function(e){return e.MAINNET=`bip122:000000000019d6689c085ae165831e93`,e.TESTNET=`bip122:000000000933ea01ad0ee984209779ba`,e}({}),l=function(e){return e.MAINNET=`solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp`,e.DEVNET=`solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1`,e}({}),u=function(e){return e.MAINNET=`eip155:1337`,e}({});const d={C:o.MAINNET,P:`avax:Rr9hnPVPxuUvrdCul-vjEsU1zmqKqRDo`,X:`avax:imji8papUf2EhV3le337w1vgFauqkJg-`},f={C:o.FUJI,P:`avax:Sj7NVE3jXTbJvwFAiu7OEUo_8g8ctXMG`,X:`avax:8AJTpRj3SAqv1e80Mtl9em08LhvKEbkl`},p={C:`2q9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAX5UQxse55x1Q5`,P:`11111111111111111111111111111111LpoYY`,X:`2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM`},m={C:`yH8D7ThNJkxmtkuv2jgBa4P1Rn3Qpr4pPr7QYNfcdoS6k6HWp`,P:`11111111111111111111111111111111LpoYY`,X:`2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm`},h={mainnet:{[d.C]:p.C,[d.P]:p.P,[d.X]:p.X},fuji:{[f.C]:m.C,[f.P]:m.P,[f.X]:m.X}},g={chainId:o.FUJI,chainName:`Avalanche Fuji (C-Chain)`,networkToken:{type:t.NATIVE,name:`AVAX`,symbol:`AVAX`,decimals:18},rpcUrl:`https://api.avax-test.network/ext/bc/C/rpc`},_={chainId:o.MAINNET,chainName:`Avalanche Mainnet (C-Chain)`,rpcUrl:`https://api.avax.network/ext/bc/C/rpc`,networkToken:{type:t.NATIVE,name:`AVAX`,symbol:`AVAX`,decimals:18}},v={chainId:d.P,chainName:`Avalanche Mainnet (P-Chain)`,rpcUrl:`https://api.avax.network/ext/bc/P`,networkToken:{type:t.NATIVE,name:`AVAX`,symbol:`AVAX`,decimals:9}},y={chainId:f.P,chainName:`Avalanche Fuji (P-Chain)`,rpcUrl:`https://api.avax-test.network/ext/bc/P`,networkToken:{type:t.NATIVE,name:`AVAX`,symbol:`AVAX`,decimals:9}},b={chainId:d.X,chainName:`Avalanche Mainnet (X-Chain)`,rpcUrl:`https://api.avax.network/ext/bc/X`,networkToken:{type:t.NATIVE,name:`AVAX`,symbol:`AVAX`,decimals:9}},x={chainId:f.X,chainName:`Avalanche Fuji (X-Chain)`,rpcUrl:`https://api.avax-test.network/ext/bc/X`,networkToken:{type:t.NATIVE,name:`AVAX`,symbol:`AVAX`,decimals:9}},S={chainId:s.SEPOLIA,chainName:`Ethereum Sepolia`,rpcUrl:`https://proxy-api.avax.network/proxy/infura/sepolia`,networkToken:{type:t.NATIVE,name:`ETH`,symbol:`ETH`,decimals:18}},C={chainId:s.MAINNET,chainName:`Ethereum Mainnet`,rpcUrl:`https://proxy-api.avax.network/proxy/infura/mainnet`,networkToken:{type:t.NATIVE,name:`ETH`,symbol:`ETH`,decimals:18}},w={chainId:c.TESTNET,chainName:`Bitcoin Testnet`,rpcUrl:``,networkToken:{type:t.NATIVE,name:`Bitcoin`,symbol:`BTC`,decimals:8}},T={chainId:c.MAINNET,chainName:`Bitcoin Mainnet`,rpcUrl:``,networkToken:{type:t.NATIVE,name:`Bitcoin`,symbol:`BTC`,decimals:8}},E={chainId:l.MAINNET,chainName:`Solana`,rpcUrl:`https://proxy-api.avax.network/proxy/nownodes/sol`,networkToken:{type:t.NATIVE,name:`SOL`,symbol:`SOL`,decimals:9}},D={chainId:l.DEVNET,chainName:`Solana (Devnet)`,rpcUrl:`https://api.devnet.solana.com`,networkToken:{type:t.NATIVE,name:`SOL`,symbol:`SOL`,decimals:9}},O={type:t.NATIVE,name:`Avalanche`,symbol:`AVAX`,decimals:18,logoUri:`https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg`},k={type:t.NATIVE,name:`Ether`,symbol:`ETH`,decimals:18,logoUri:`https://images.ctfassets.net/gcj8jwzm6086/6l56QLVZmvacuBfjHBTThP/791d743dd2c526692562780c2325fedf/eth-circle__1_.svg`};let A=function(e){return e.AVALANCHE=`avalanche`,e.BITCOIN=`bitcoin`,e.ETHEREUM=`ethereum`,e.SOLANA=`solana`,e.UNKNOWN=`_unknown`,e}({}),j=function(e){return e[e.AVALANCHE_MAINNET=43114]=`AVALANCHE_MAINNET`,e[e.AVALANCHE_TESTNET=43113]=`AVALANCHE_TESTNET`,e[e.ETHEREUM_HOMESTEAD=1]=`ETHEREUM_HOMESTEAD`,e[e.ETHEREUM_TEST_SEPOLIA=11155111]=`ETHEREUM_TEST_SEPOLIA`,e[e.BITCOIN=0xfffffffffffeb]=`BITCOIN`,e[e.BITCOIN_TESTNET=0xfffffffffffea]=`BITCOIN_TESTNET`,e}({});const M={slow:`low`,normal:`medium`,fast:`high`};exports.AVALANCHE_CAIP2_TO_BLOCKCHAIN_ID_BY_NETWORK=h,exports.AVALANCHE_FUJI_CHAIN=g,exports.AVALANCHE_FUJI_P_CHAIN=y,exports.AVALANCHE_FUJI_X_CHAIN=x,exports.AVALANCHE_MAINNET_CHAIN=_,exports.AVALANCHE_MAINNET_P_CHAIN=v,exports.AVALANCHE_MAINNET_X_CHAIN=b,exports.AvalancheChainIds=o,exports.AvalancheFujiBlockchainChainIds=f,exports.AvalancheFujiBlockchainIds=m,exports.AvalancheMainnetBlockchainChainIds=d,exports.AvalancheMainnetBlockchainIds=p,exports.BITCOIN_MAINNET_CHAIN=T,exports.BITCOIN_TESTNET_CHAIN=w,exports.BTC_SERVICE_TYPES=r,exports.BitcoinChainIds=c,exports.Blockchain=A,exports.ERC_ZERO_ADDRESS=`0x0000000000000000000000000000000000000000`,exports.ETHEREUM_MAINNET_CHAIN=C,exports.ETHEREUM_SEPOLIA_CHAIN=S,exports.EVM_SERVICE_TYPES=i,exports.Environment=e,exports.EthereumChainIds=s,exports.EvmChainId=j,exports.FEE_RATE_TIER_TO_BITCOIN=M,exports.HyperliquidChainIds=u,exports.NATIVE_AVAX=O,exports.NATIVE_ETH=k,exports.NATIVE_SOL_ADDRESS=`11111111111111111111111111111111`,exports.SOLANA_DEVNET_CHAIN=D,exports.SOLANA_MAINNET_CHAIN=E,exports.ServiceType=n,exports.SolanaChainIds=l,exports.TokenType=t,exports.TransferSignatureReason=a;
1
+ let e=function(e){return e.DEV=`dev`,e.PROD=`production`,e.TEST=`test`,e}({}),t=function(e){return e.NATIVE=`native`,e.ERC20=`erc20`,e.SPL=`spl`,e}({}),n=function(e){return e.AVALANCHE_CCT=`avalanche-cct`,e.AVALANCHE_EVM=`avalanche-evm`,e.LOMBARD_BTC_TO_BTCB=`lombard-btc-to-btcb`,e.LOMBARD_BTCB_TO_BTC=`lombard-btcb-to-btc`,e.MARKR=`markr`,e.WRAP_UNWRAP=`wrap-unwrap`,e}({});const r=[n.LOMBARD_BTCB_TO_BTC,n.LOMBARD_BTC_TO_BTCB],i=[n.AVALANCHE_EVM,n.WRAP_UNWRAP];let a=function(e){return e.AddressOwnership=`address-ownership`,e.AllowanceApproval=`allowance-approval`,e.AvalancheCrossChainExport=`avalanche-cross-chain-export`,e.AvalancheCrossChainImport=`avalanche-cross-chain-import`,e.TokensTransfer=`tokens-transfer`,e.WrapToken=`wrap-token`,e.HyperliquidAuthorize=`hyperliquid-authorize`,e.HyperliquidSendAsset=`hyperliquid-send-asset`,e.ScheduleRecurringSwap=`schedule-recurring-swap`,e.PauseRecurringSwap=`pause-recurring-swap`,e.ResumeRecurringSwap=`resume-recurring-swap`,e.CancelRecurringSwap=`cancel-recurring-swap`,e}({}),o=function(e){return e.FUJI=`eip155:43113`,e.MAINNET=`eip155:43114`,e}({}),s=function(e){return e.MAINNET=`eip155:1`,e.SEPOLIA=`eip155:11155111`,e}({}),c=function(e){return e.MAINNET=`bip122:000000000019d6689c085ae165831e93`,e.TESTNET=`bip122:000000000933ea01ad0ee984209779ba`,e}({}),l=function(e){return e.MAINNET=`solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp`,e.DEVNET=`solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1`,e}({}),u=function(e){return e.MAINNET=`eip155:1337`,e}({}),d=function(e){return e.MAINNET=`eip155:8453`,e.SEPOLIA=`eip155:84532`,e}({}),f=function(e){return e.MAINNET=`eip155:137`,e.AMOY=`eip155:80002`,e}({});const p={C:o.MAINNET,P:`avax:Rr9hnPVPxuUvrdCul-vjEsU1zmqKqRDo`,X:`avax:imji8papUf2EhV3le337w1vgFauqkJg-`},m={C:o.FUJI,P:`avax:Sj7NVE3jXTbJvwFAiu7OEUo_8g8ctXMG`,X:`avax:8AJTpRj3SAqv1e80Mtl9em08LhvKEbkl`},h={C:`2q9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAX5UQxse55x1Q5`,P:`11111111111111111111111111111111LpoYY`,X:`2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM`},g={C:`yH8D7ThNJkxmtkuv2jgBa4P1Rn3Qpr4pPr7QYNfcdoS6k6HWp`,P:`11111111111111111111111111111111LpoYY`,X:`2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm`},_={mainnet:{[p.C]:h.C,[p.P]:h.P,[p.X]:h.X},fuji:{[m.C]:g.C,[m.P]:g.P,[m.X]:g.X}},v={chainId:o.FUJI,chainName:`Avalanche Fuji (C-Chain)`,networkToken:{type:t.NATIVE,name:`AVAX`,symbol:`AVAX`,decimals:18},rpcUrl:`https://api.avax-test.network/ext/bc/C/rpc`},y={chainId:o.MAINNET,chainName:`Avalanche Mainnet (C-Chain)`,rpcUrl:`https://api.avax.network/ext/bc/C/rpc`,networkToken:{type:t.NATIVE,name:`AVAX`,symbol:`AVAX`,decimals:18}},b={chainId:p.P,chainName:`Avalanche Mainnet (P-Chain)`,rpcUrl:`https://api.avax.network/ext/bc/P`,networkToken:{type:t.NATIVE,name:`AVAX`,symbol:`AVAX`,decimals:9}},x={chainId:m.P,chainName:`Avalanche Fuji (P-Chain)`,rpcUrl:`https://api.avax-test.network/ext/bc/P`,networkToken:{type:t.NATIVE,name:`AVAX`,symbol:`AVAX`,decimals:9}},S={chainId:p.X,chainName:`Avalanche Mainnet (X-Chain)`,rpcUrl:`https://api.avax.network/ext/bc/X`,networkToken:{type:t.NATIVE,name:`AVAX`,symbol:`AVAX`,decimals:9}},C={chainId:m.X,chainName:`Avalanche Fuji (X-Chain)`,rpcUrl:`https://api.avax-test.network/ext/bc/X`,networkToken:{type:t.NATIVE,name:`AVAX`,symbol:`AVAX`,decimals:9}},w={chainId:s.SEPOLIA,chainName:`Ethereum Sepolia`,rpcUrl:`https://proxy-api.avax.network/proxy/infura/sepolia`,networkToken:{type:t.NATIVE,name:`ETH`,symbol:`ETH`,decimals:18}},T={chainId:s.MAINNET,chainName:`Ethereum Mainnet`,rpcUrl:`https://proxy-api.avax.network/proxy/infura/mainnet`,networkToken:{type:t.NATIVE,name:`ETH`,symbol:`ETH`,decimals:18}},E={chainId:c.TESTNET,chainName:`Bitcoin Testnet`,rpcUrl:``,networkToken:{type:t.NATIVE,name:`Bitcoin`,symbol:`BTC`,decimals:8}},D={chainId:c.MAINNET,chainName:`Bitcoin Mainnet`,rpcUrl:``,networkToken:{type:t.NATIVE,name:`Bitcoin`,symbol:`BTC`,decimals:8}},O={chainId:l.MAINNET,chainName:`Solana`,rpcUrl:`https://proxy-api.avax.network/proxy/nownodes/sol`,networkToken:{type:t.NATIVE,name:`SOL`,symbol:`SOL`,decimals:9}},k={chainId:l.DEVNET,chainName:`Solana (Devnet)`,rpcUrl:`https://api.devnet.solana.com`,networkToken:{type:t.NATIVE,name:`SOL`,symbol:`SOL`,decimals:9}},A={type:t.NATIVE,name:`Avalanche`,symbol:`AVAX`,decimals:18,logoUri:`https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg`},j={type:t.NATIVE,name:`Ether`,symbol:`ETH`,decimals:18,logoUri:`https://images.ctfassets.net/gcj8jwzm6086/6l56QLVZmvacuBfjHBTThP/791d743dd2c526692562780c2325fedf/eth-circle__1_.svg`};let M=function(e){return e.AVALANCHE=`avalanche`,e.BITCOIN=`bitcoin`,e.ETHEREUM=`ethereum`,e.SOLANA=`solana`,e.UNKNOWN=`_unknown`,e}({}),N=function(e){return e[e.AVALANCHE_MAINNET=43114]=`AVALANCHE_MAINNET`,e[e.AVALANCHE_TESTNET=43113]=`AVALANCHE_TESTNET`,e[e.ETHEREUM_HOMESTEAD=1]=`ETHEREUM_HOMESTEAD`,e[e.ETHEREUM_TEST_SEPOLIA=11155111]=`ETHEREUM_TEST_SEPOLIA`,e[e.BITCOIN=0xfffffffffffeb]=`BITCOIN`,e[e.BITCOIN_TESTNET=0xfffffffffffea]=`BITCOIN_TESTNET`,e}({});const P={slow:`low`,normal:`medium`,fast:`high`};exports.AVALANCHE_CAIP2_TO_BLOCKCHAIN_ID_BY_NETWORK=_,exports.AVALANCHE_FUJI_CHAIN=v,exports.AVALANCHE_FUJI_P_CHAIN=x,exports.AVALANCHE_FUJI_X_CHAIN=C,exports.AVALANCHE_MAINNET_CHAIN=y,exports.AVALANCHE_MAINNET_P_CHAIN=b,exports.AVALANCHE_MAINNET_X_CHAIN=S,exports.AvalancheChainIds=o,exports.AvalancheFujiBlockchainChainIds=m,exports.AvalancheFujiBlockchainIds=g,exports.AvalancheMainnetBlockchainChainIds=p,exports.AvalancheMainnetBlockchainIds=h,exports.BITCOIN_MAINNET_CHAIN=D,exports.BITCOIN_TESTNET_CHAIN=E,exports.BTC_SERVICE_TYPES=r,exports.BaseChainIds=d,exports.BitcoinChainIds=c,exports.Blockchain=M,exports.ERC_ZERO_ADDRESS=`0x0000000000000000000000000000000000000000`,exports.ETHEREUM_MAINNET_CHAIN=T,exports.ETHEREUM_SEPOLIA_CHAIN=w,exports.EVM_SERVICE_TYPES=i,exports.Environment=e,exports.EthereumChainIds=s,exports.EvmChainId=N,exports.FEE_RATE_TIER_TO_BITCOIN=P,exports.HyperliquidChainIds=u,exports.NATIVE_AVAX=A,exports.NATIVE_ETH=j,exports.NATIVE_SOL_ADDRESS=`11111111111111111111111111111111`,exports.PolygonChainIds=f,exports.SOLANA_DEVNET_CHAIN=k,exports.SOLANA_MAINNET_CHAIN=O,exports.ServiceType=n,exports.SolanaChainIds=l,exports.TokenType=t,exports.TransferSignatureReason=a;
2
2
  //# sourceMappingURL=constants.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.cjs","names":[],"sources":["../src/constants.ts"],"sourcesContent":["import type { Address as SolAddress } from '@solana/kit';\nimport type { Address as EvmAddress } from 'viem';\nimport type { NativeAsset } from './types/asset';\nimport type { BitcoinFeeRateTier } from './types/bitcoin';\nimport type { Caip2ChainId } from './types/caip';\nimport type { Chain } from './types/chain';\nimport type { FeeRateTier } from './types/fee';\n\nexport enum Environment {\n DEV = 'dev',\n PROD = 'production',\n TEST = 'test',\n}\n\nexport enum TokenType {\n NATIVE = 'native',\n ERC20 = 'erc20',\n SPL = 'spl',\n}\n\nexport enum ServiceType {\n /** Avalanche Cross-chain transfer service. Export/import between C/P/X Avalanche chains. */\n AVALANCHE_CCT = 'avalanche-cct',\n /** Bridge between EVM chains within Avalanche (or EVM-compatible flows). */\n AVALANCHE_EVM = 'avalanche-evm',\n /** Bitcoin → Avalanche. */\n LOMBARD_BTC_TO_BTCB = 'lombard-btc-to-btcb',\n /** Avalanche → Bitcoin. */\n LOMBARD_BTCB_TO_BTC = 'lombard-btcb-to-btc',\n MARKR = 'markr',\n /** Same-chain wrap/unwrap of native ETH ↔ WETH and AVAX ↔ WAVAX. */\n WRAP_UNWRAP = 'wrap-unwrap',\n}\n\nexport const BTC_SERVICE_TYPES: readonly [ServiceType.LOMBARD_BTCB_TO_BTC, ServiceType.LOMBARD_BTC_TO_BTCB] = [\n ServiceType.LOMBARD_BTCB_TO_BTC,\n ServiceType.LOMBARD_BTC_TO_BTCB,\n];\n\nexport const EVM_SERVICE_TYPES: readonly [ServiceType.AVALANCHE_EVM, ServiceType.WRAP_UNWRAP] = [\n ServiceType.AVALANCHE_EVM,\n ServiceType.WRAP_UNWRAP,\n];\n\n/** Reasons for user signatures during execution. */\nexport enum TransferSignatureReason {\n AddressOwnership = 'address-ownership',\n /** ERC-20 allowance approval for router/bridge. */\n AllowanceApproval = 'allowance-approval',\n /** Primary signature for cross-chain export transaction. */\n AvalancheCrossChainExport = 'avalanche-cross-chain-export',\n /** Primary signature for cross-chain import transaction. */\n AvalancheCrossChainImport = 'avalanche-cross-chain-import',\n /** The primary token movement call (swap or bridge submit). */\n TokensTransfer = 'tokens-transfer',\n /** Optional wrap/unwrap step for native token handling. */\n WrapToken = 'wrap-token',\n /** Hyperliquid 2-phase withdrawal: step 1, nonce-mapping authorization (Relay protocol). */\n HyperliquidAuthorize = 'hyperliquid-authorize',\n /** Hyperliquid 2-phase withdrawal: step 2, the `sendAsset` transfer. */\n HyperliquidSendAsset = 'hyperliquid-send-asset',\n}\n\nexport const ERC_ZERO_ADDRESS: EvmAddress = '0x0000000000000000000000000000000000000000';\nexport const NATIVE_SOL_ADDRESS: SolAddress = '11111111111111111111111111111111' as SolAddress;\n\nexport enum AvalancheChainIds {\n FUJI = 'eip155:43113',\n MAINNET = 'eip155:43114',\n}\n\nexport enum EthereumChainIds {\n MAINNET = 'eip155:1',\n SEPOLIA = 'eip155:11155111',\n}\n\nexport enum BitcoinChainIds {\n MAINNET = 'bip122:000000000019d6689c085ae165831e93',\n TESTNET = 'bip122:000000000933ea01ad0ee984209779ba',\n}\n\nexport enum SolanaChainIds {\n MAINNET = 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp',\n DEVNET = 'solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1',\n}\n\n/**\n * Hyperliquid is identified by CAIP-2 `eip155:1337` per Relay's convention.\n * It's an EVM-namespaced chain ID but has no real EVM execution — withdrawals\n * use a two-signature EIP-712 flow against Hyperliquid's `/exchange` API.\n */\nexport enum HyperliquidChainIds {\n MAINNET = 'eip155:1337',\n}\n\nexport type AvalancheBlockchainAlias = 'C' | 'P' | 'X';\n\nexport const AvalancheMainnetBlockchainChainIds: Readonly<Record<AvalancheBlockchainAlias, Caip2ChainId>> = {\n C: AvalancheChainIds.MAINNET,\n P: 'avax:Rr9hnPVPxuUvrdCul-vjEsU1zmqKqRDo',\n X: 'avax:imji8papUf2EhV3le337w1vgFauqkJg-',\n};\n\nexport const AvalancheFujiBlockchainChainIds: Readonly<Record<AvalancheBlockchainAlias, Caip2ChainId>> = {\n C: AvalancheChainIds.FUJI,\n P: 'avax:Sj7NVE3jXTbJvwFAiu7OEUo_8g8ctXMG',\n X: 'avax:8AJTpRj3SAqv1e80Mtl9em08LhvKEbkl',\n};\n\nexport const AvalancheMainnetBlockchainIds: Readonly<Record<AvalancheBlockchainAlias, string>> = {\n C: '2q9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAX5UQxse55x1Q5',\n P: '11111111111111111111111111111111LpoYY',\n X: '2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM',\n};\n\nexport const AvalancheFujiBlockchainIds: Readonly<Record<AvalancheBlockchainAlias, string>> = {\n C: 'yH8D7ThNJkxmtkuv2jgBa4P1Rn3Qpr4pPr7QYNfcdoS6k6HWp',\n P: '11111111111111111111111111111111LpoYY',\n X: '2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm',\n};\n\nexport const AVALANCHE_CAIP2_TO_BLOCKCHAIN_ID_BY_NETWORK: Readonly<{\n mainnet: Readonly<Record<Caip2ChainId, string>>;\n fuji: Readonly<Record<Caip2ChainId, string>>;\n}> = {\n mainnet: {\n [AvalancheMainnetBlockchainChainIds.C]: AvalancheMainnetBlockchainIds.C,\n [AvalancheMainnetBlockchainChainIds.P]: AvalancheMainnetBlockchainIds.P,\n [AvalancheMainnetBlockchainChainIds.X]: AvalancheMainnetBlockchainIds.X,\n },\n fuji: {\n [AvalancheFujiBlockchainChainIds.C]: AvalancheFujiBlockchainIds.C,\n [AvalancheFujiBlockchainChainIds.P]: AvalancheFujiBlockchainIds.P,\n [AvalancheFujiBlockchainChainIds.X]: AvalancheFujiBlockchainIds.X,\n },\n};\n\nexport const AVALANCHE_FUJI_CHAIN: Chain = {\n chainId: AvalancheChainIds.FUJI,\n chainName: 'Avalanche Fuji (C-Chain)',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'AVAX',\n symbol: 'AVAX',\n decimals: 18,\n },\n rpcUrl: 'https://api.avax-test.network/ext/bc/C/rpc',\n};\n\nexport const AVALANCHE_MAINNET_CHAIN: Chain = {\n chainId: AvalancheChainIds.MAINNET,\n chainName: 'Avalanche Mainnet (C-Chain)',\n rpcUrl: 'https://api.avax.network/ext/bc/C/rpc',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'AVAX',\n symbol: 'AVAX',\n decimals: 18,\n },\n};\n\nexport const AVALANCHE_MAINNET_P_CHAIN: Chain = {\n chainId: AvalancheMainnetBlockchainChainIds.P,\n chainName: 'Avalanche Mainnet (P-Chain)',\n rpcUrl: 'https://api.avax.network/ext/bc/P',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'AVAX',\n symbol: 'AVAX',\n decimals: 9,\n },\n};\n\nexport const AVALANCHE_FUJI_P_CHAIN: Chain = {\n chainId: AvalancheFujiBlockchainChainIds.P,\n chainName: 'Avalanche Fuji (P-Chain)',\n rpcUrl: 'https://api.avax-test.network/ext/bc/P',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'AVAX',\n symbol: 'AVAX',\n decimals: 9,\n },\n};\n\nexport const AVALANCHE_MAINNET_X_CHAIN: Chain = {\n chainId: AvalancheMainnetBlockchainChainIds.X,\n chainName: 'Avalanche Mainnet (X-Chain)',\n rpcUrl: 'https://api.avax.network/ext/bc/X',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'AVAX',\n symbol: 'AVAX',\n decimals: 9,\n },\n};\n\nexport const AVALANCHE_FUJI_X_CHAIN: Chain = {\n chainId: AvalancheFujiBlockchainChainIds.X,\n chainName: 'Avalanche Fuji (X-Chain)',\n rpcUrl: 'https://api.avax-test.network/ext/bc/X',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'AVAX',\n symbol: 'AVAX',\n decimals: 9,\n },\n};\n\nexport const ETHEREUM_SEPOLIA_CHAIN: Chain = {\n chainId: EthereumChainIds.SEPOLIA,\n chainName: 'Ethereum Sepolia',\n rpcUrl: 'https://proxy-api.avax.network/proxy/infura/sepolia',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'ETH',\n symbol: 'ETH',\n decimals: 18,\n },\n};\n\nexport const ETHEREUM_MAINNET_CHAIN: Chain = {\n chainId: EthereumChainIds.MAINNET,\n chainName: 'Ethereum Mainnet',\n rpcUrl: 'https://proxy-api.avax.network/proxy/infura/mainnet',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'ETH',\n symbol: 'ETH',\n decimals: 18,\n },\n};\n\nexport const BITCOIN_TESTNET_CHAIN: Chain = {\n chainId: BitcoinChainIds.TESTNET,\n chainName: 'Bitcoin Testnet',\n rpcUrl: '',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'Bitcoin',\n symbol: 'BTC',\n decimals: 8,\n },\n};\n\nexport const BITCOIN_MAINNET_CHAIN: Chain = {\n chainId: BitcoinChainIds.MAINNET,\n chainName: 'Bitcoin Mainnet',\n rpcUrl: '',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'Bitcoin',\n symbol: 'BTC',\n decimals: 8,\n },\n};\n\nexport const SOLANA_MAINNET_CHAIN: Chain = {\n chainId: SolanaChainIds.MAINNET,\n chainName: 'Solana',\n rpcUrl: 'https://proxy-api.avax.network/proxy/nownodes/sol',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'SOL',\n symbol: 'SOL',\n decimals: 9,\n },\n};\n\nexport const SOLANA_DEVNET_CHAIN: Chain = {\n chainId: SolanaChainIds.DEVNET,\n chainName: 'Solana (Devnet)',\n rpcUrl: 'https://api.devnet.solana.com',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'SOL',\n symbol: 'SOL',\n decimals: 9,\n },\n};\nexport const NATIVE_AVAX: NativeAsset = {\n type: TokenType.NATIVE,\n name: 'Avalanche',\n symbol: 'AVAX',\n decimals: 18,\n logoUri:\n 'https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg',\n};\nexport const NATIVE_ETH: NativeAsset = {\n type: TokenType.NATIVE,\n name: 'Ether',\n symbol: 'ETH',\n decimals: 18,\n logoUri:\n 'https://images.ctfassets.net/gcj8jwzm6086/6l56QLVZmvacuBfjHBTThP/791d743dd2c526692562780c2325fedf/eth-circle__1_.svg',\n};\n\nexport enum Blockchain {\n AVALANCHE = 'avalanche',\n BITCOIN = 'bitcoin',\n ETHEREUM = 'ethereum',\n SOLANA = 'solana',\n UNKNOWN = '_unknown',\n}\n\nexport enum EvmChainId {\n AVALANCHE_MAINNET = 43114,\n AVALANCHE_TESTNET = 43113,\n ETHEREUM_HOMESTEAD = 1,\n ETHEREUM_TEST_SEPOLIA = 11155111,\n /**\n * This is not a real chain ID, as Bitcoin does not have a chain ID.\n * It is used internally to represent Bitcoin in a way that avoids\n * conflicts with real EVM chain IDs.\n */\n BITCOIN = 4_503_599_627_370_476 - 1,\n /**\n * This is not a real chain ID, as Bitcoin does not have a chain ID.\n * It is used internally to represent Bitcoin in a way that avoids\n * conflicts with real EVM chain IDs.\n */\n BITCOIN_TESTNET = 4_503_599_627_370_476 - 2,\n}\n\n/**\n * Maps the unified {@link FeeRateTier} to the Bitcoin-specific\n * {@link BitcoinFeeRateTier} (`low | medium | high`).\n */\nexport const FEE_RATE_TIER_TO_BITCOIN: Record<FeeRateTier, BitcoinFeeRateTier> = {\n slow: 'low',\n normal: 'medium',\n fast: 'high',\n};\n"],"mappings":"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"}
1
+ {"version":3,"file":"constants.cjs","names":[],"sources":["../src/constants.ts"],"sourcesContent":["import type { Address as SolAddress } from '@solana/kit';\nimport type { Address as EvmAddress } from 'viem';\nimport type { NativeAsset } from './types/asset';\nimport type { BitcoinFeeRateTier } from './types/bitcoin';\nimport type { Caip2ChainId } from './types/caip';\nimport type { Chain } from './types/chain';\nimport type { FeeRateTier } from './types/fee';\n\nexport enum Environment {\n DEV = 'dev',\n PROD = 'production',\n TEST = 'test',\n}\n\nexport enum TokenType {\n NATIVE = 'native',\n ERC20 = 'erc20',\n SPL = 'spl',\n}\n\nexport enum ServiceType {\n /** Avalanche Cross-chain transfer service. Export/import between C/P/X Avalanche chains. */\n AVALANCHE_CCT = 'avalanche-cct',\n /** Bridge between EVM chains within Avalanche (or EVM-compatible flows). */\n AVALANCHE_EVM = 'avalanche-evm',\n /** Bitcoin → Avalanche. */\n LOMBARD_BTC_TO_BTCB = 'lombard-btc-to-btcb',\n /** Avalanche → Bitcoin. */\n LOMBARD_BTCB_TO_BTC = 'lombard-btcb-to-btc',\n MARKR = 'markr',\n /** Same-chain wrap/unwrap of native ETH ↔ WETH and AVAX ↔ WAVAX. */\n WRAP_UNWRAP = 'wrap-unwrap',\n}\n\nexport const BTC_SERVICE_TYPES: readonly [ServiceType.LOMBARD_BTCB_TO_BTC, ServiceType.LOMBARD_BTC_TO_BTCB] = [\n ServiceType.LOMBARD_BTCB_TO_BTC,\n ServiceType.LOMBARD_BTC_TO_BTCB,\n];\n\nexport const EVM_SERVICE_TYPES: readonly [ServiceType.AVALANCHE_EVM, ServiceType.WRAP_UNWRAP] = [\n ServiceType.AVALANCHE_EVM,\n ServiceType.WRAP_UNWRAP,\n];\n\n/** Reasons for user signatures during execution. */\nexport enum TransferSignatureReason {\n AddressOwnership = 'address-ownership',\n /** ERC-20 allowance approval for router/bridge. */\n AllowanceApproval = 'allowance-approval',\n /** Primary signature for cross-chain export transaction. */\n AvalancheCrossChainExport = 'avalanche-cross-chain-export',\n /** Primary signature for cross-chain import transaction. */\n AvalancheCrossChainImport = 'avalanche-cross-chain-import',\n /** The primary token movement call (swap or bridge submit). */\n TokensTransfer = 'tokens-transfer',\n /** Optional wrap/unwrap step for native token handling. */\n WrapToken = 'wrap-token',\n /** Hyperliquid 2-phase withdrawal: step 1, nonce-mapping authorization (Relay protocol). */\n HyperliquidAuthorize = 'hyperliquid-authorize',\n /** Hyperliquid 2-phase withdrawal: step 2, the `sendAsset` transfer. */\n HyperliquidSendAsset = 'hyperliquid-send-asset',\n /** Markr recurring: first-fill swap that schedules the recurring order on-chain. */\n ScheduleRecurringSwap = 'schedule-recurring-swap',\n /** Markr recurring: pause an active schedule (preserves allowance). */\n PauseRecurringSwap = 'pause-recurring-swap',\n /** Markr recurring: resume (unpause) a paused schedule. */\n ResumeRecurringSwap = 'resume-recurring-swap',\n /** Markr recurring: cancel an active or paused schedule. */\n CancelRecurringSwap = 'cancel-recurring-swap',\n}\n\nexport const ERC_ZERO_ADDRESS: EvmAddress = '0x0000000000000000000000000000000000000000';\nexport const NATIVE_SOL_ADDRESS: SolAddress = '11111111111111111111111111111111' as SolAddress;\n\nexport enum AvalancheChainIds {\n FUJI = 'eip155:43113',\n MAINNET = 'eip155:43114',\n}\n\nexport enum EthereumChainIds {\n MAINNET = 'eip155:1',\n SEPOLIA = 'eip155:11155111',\n}\n\nexport enum BitcoinChainIds {\n MAINNET = 'bip122:000000000019d6689c085ae165831e93',\n TESTNET = 'bip122:000000000933ea01ad0ee984209779ba',\n}\n\nexport enum SolanaChainIds {\n MAINNET = 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp',\n DEVNET = 'solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1',\n}\n\n/**\n * Hyperliquid is identified by CAIP-2 `eip155:1337` per Relay's convention.\n * It's an EVM-namespaced chain ID but has no real EVM execution — withdrawals\n * use a two-signature EIP-712 flow against Hyperliquid's `/exchange` API.\n */\nexport enum HyperliquidChainIds {\n MAINNET = 'eip155:1337',\n}\n\nexport enum BaseChainIds {\n MAINNET = 'eip155:8453',\n SEPOLIA = 'eip155:84532',\n}\n\nexport enum PolygonChainIds {\n MAINNET = 'eip155:137',\n AMOY = 'eip155:80002',\n}\n\nexport type AvalancheBlockchainAlias = 'C' | 'P' | 'X';\n\nexport const AvalancheMainnetBlockchainChainIds: Readonly<Record<AvalancheBlockchainAlias, Caip2ChainId>> = {\n C: AvalancheChainIds.MAINNET,\n P: 'avax:Rr9hnPVPxuUvrdCul-vjEsU1zmqKqRDo',\n X: 'avax:imji8papUf2EhV3le337w1vgFauqkJg-',\n};\n\nexport const AvalancheFujiBlockchainChainIds: Readonly<Record<AvalancheBlockchainAlias, Caip2ChainId>> = {\n C: AvalancheChainIds.FUJI,\n P: 'avax:Sj7NVE3jXTbJvwFAiu7OEUo_8g8ctXMG',\n X: 'avax:8AJTpRj3SAqv1e80Mtl9em08LhvKEbkl',\n};\n\nexport const AvalancheMainnetBlockchainIds: Readonly<Record<AvalancheBlockchainAlias, string>> = {\n C: '2q9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAX5UQxse55x1Q5',\n P: '11111111111111111111111111111111LpoYY',\n X: '2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM',\n};\n\nexport const AvalancheFujiBlockchainIds: Readonly<Record<AvalancheBlockchainAlias, string>> = {\n C: 'yH8D7ThNJkxmtkuv2jgBa4P1Rn3Qpr4pPr7QYNfcdoS6k6HWp',\n P: '11111111111111111111111111111111LpoYY',\n X: '2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm',\n};\n\nexport const AVALANCHE_CAIP2_TO_BLOCKCHAIN_ID_BY_NETWORK: Readonly<{\n mainnet: Readonly<Record<Caip2ChainId, string>>;\n fuji: Readonly<Record<Caip2ChainId, string>>;\n}> = {\n mainnet: {\n [AvalancheMainnetBlockchainChainIds.C]: AvalancheMainnetBlockchainIds.C,\n [AvalancheMainnetBlockchainChainIds.P]: AvalancheMainnetBlockchainIds.P,\n [AvalancheMainnetBlockchainChainIds.X]: AvalancheMainnetBlockchainIds.X,\n },\n fuji: {\n [AvalancheFujiBlockchainChainIds.C]: AvalancheFujiBlockchainIds.C,\n [AvalancheFujiBlockchainChainIds.P]: AvalancheFujiBlockchainIds.P,\n [AvalancheFujiBlockchainChainIds.X]: AvalancheFujiBlockchainIds.X,\n },\n};\n\nexport const AVALANCHE_FUJI_CHAIN: Chain = {\n chainId: AvalancheChainIds.FUJI,\n chainName: 'Avalanche Fuji (C-Chain)',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'AVAX',\n symbol: 'AVAX',\n decimals: 18,\n },\n rpcUrl: 'https://api.avax-test.network/ext/bc/C/rpc',\n};\n\nexport const AVALANCHE_MAINNET_CHAIN: Chain = {\n chainId: AvalancheChainIds.MAINNET,\n chainName: 'Avalanche Mainnet (C-Chain)',\n rpcUrl: 'https://api.avax.network/ext/bc/C/rpc',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'AVAX',\n symbol: 'AVAX',\n decimals: 18,\n },\n};\n\nexport const AVALANCHE_MAINNET_P_CHAIN: Chain = {\n chainId: AvalancheMainnetBlockchainChainIds.P,\n chainName: 'Avalanche Mainnet (P-Chain)',\n rpcUrl: 'https://api.avax.network/ext/bc/P',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'AVAX',\n symbol: 'AVAX',\n decimals: 9,\n },\n};\n\nexport const AVALANCHE_FUJI_P_CHAIN: Chain = {\n chainId: AvalancheFujiBlockchainChainIds.P,\n chainName: 'Avalanche Fuji (P-Chain)',\n rpcUrl: 'https://api.avax-test.network/ext/bc/P',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'AVAX',\n symbol: 'AVAX',\n decimals: 9,\n },\n};\n\nexport const AVALANCHE_MAINNET_X_CHAIN: Chain = {\n chainId: AvalancheMainnetBlockchainChainIds.X,\n chainName: 'Avalanche Mainnet (X-Chain)',\n rpcUrl: 'https://api.avax.network/ext/bc/X',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'AVAX',\n symbol: 'AVAX',\n decimals: 9,\n },\n};\n\nexport const AVALANCHE_FUJI_X_CHAIN: Chain = {\n chainId: AvalancheFujiBlockchainChainIds.X,\n chainName: 'Avalanche Fuji (X-Chain)',\n rpcUrl: 'https://api.avax-test.network/ext/bc/X',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'AVAX',\n symbol: 'AVAX',\n decimals: 9,\n },\n};\n\nexport const ETHEREUM_SEPOLIA_CHAIN: Chain = {\n chainId: EthereumChainIds.SEPOLIA,\n chainName: 'Ethereum Sepolia',\n rpcUrl: 'https://proxy-api.avax.network/proxy/infura/sepolia',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'ETH',\n symbol: 'ETH',\n decimals: 18,\n },\n};\n\nexport const ETHEREUM_MAINNET_CHAIN: Chain = {\n chainId: EthereumChainIds.MAINNET,\n chainName: 'Ethereum Mainnet',\n rpcUrl: 'https://proxy-api.avax.network/proxy/infura/mainnet',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'ETH',\n symbol: 'ETH',\n decimals: 18,\n },\n};\n\nexport const BITCOIN_TESTNET_CHAIN: Chain = {\n chainId: BitcoinChainIds.TESTNET,\n chainName: 'Bitcoin Testnet',\n rpcUrl: '',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'Bitcoin',\n symbol: 'BTC',\n decimals: 8,\n },\n};\n\nexport const BITCOIN_MAINNET_CHAIN: Chain = {\n chainId: BitcoinChainIds.MAINNET,\n chainName: 'Bitcoin Mainnet',\n rpcUrl: '',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'Bitcoin',\n symbol: 'BTC',\n decimals: 8,\n },\n};\n\nexport const SOLANA_MAINNET_CHAIN: Chain = {\n chainId: SolanaChainIds.MAINNET,\n chainName: 'Solana',\n rpcUrl: 'https://proxy-api.avax.network/proxy/nownodes/sol',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'SOL',\n symbol: 'SOL',\n decimals: 9,\n },\n};\n\nexport const SOLANA_DEVNET_CHAIN: Chain = {\n chainId: SolanaChainIds.DEVNET,\n chainName: 'Solana (Devnet)',\n rpcUrl: 'https://api.devnet.solana.com',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'SOL',\n symbol: 'SOL',\n decimals: 9,\n },\n};\nexport const NATIVE_AVAX: NativeAsset = {\n type: TokenType.NATIVE,\n name: 'Avalanche',\n symbol: 'AVAX',\n decimals: 18,\n logoUri:\n 'https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg',\n};\nexport const NATIVE_ETH: NativeAsset = {\n type: TokenType.NATIVE,\n name: 'Ether',\n symbol: 'ETH',\n decimals: 18,\n logoUri:\n 'https://images.ctfassets.net/gcj8jwzm6086/6l56QLVZmvacuBfjHBTThP/791d743dd2c526692562780c2325fedf/eth-circle__1_.svg',\n};\n\nexport enum Blockchain {\n AVALANCHE = 'avalanche',\n BITCOIN = 'bitcoin',\n ETHEREUM = 'ethereum',\n SOLANA = 'solana',\n UNKNOWN = '_unknown',\n}\n\nexport enum EvmChainId {\n AVALANCHE_MAINNET = 43114,\n AVALANCHE_TESTNET = 43113,\n ETHEREUM_HOMESTEAD = 1,\n ETHEREUM_TEST_SEPOLIA = 11155111,\n /**\n * This is not a real chain ID, as Bitcoin does not have a chain ID.\n * It is used internally to represent Bitcoin in a way that avoids\n * conflicts with real EVM chain IDs.\n */\n BITCOIN = 4_503_599_627_370_476 - 1,\n /**\n * This is not a real chain ID, as Bitcoin does not have a chain ID.\n * It is used internally to represent Bitcoin in a way that avoids\n * conflicts with real EVM chain IDs.\n */\n BITCOIN_TESTNET = 4_503_599_627_370_476 - 2,\n}\n\n/**\n * Maps the unified {@link FeeRateTier} to the Bitcoin-specific\n * {@link BitcoinFeeRateTier} (`low | medium | high`).\n */\nexport const FEE_RATE_TIER_TO_BITCOIN: Record<FeeRateTier, BitcoinFeeRateTier> = {\n slow: 'low',\n normal: 'medium',\n fast: 'high',\n};\n"],"mappings":"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"}
@@ -48,7 +48,15 @@ declare enum TransferSignatureReason {
48
48
  /** Hyperliquid 2-phase withdrawal: step 1, nonce-mapping authorization (Relay protocol). */
49
49
  HyperliquidAuthorize = "hyperliquid-authorize",
50
50
  /** Hyperliquid 2-phase withdrawal: step 2, the `sendAsset` transfer. */
51
- HyperliquidSendAsset = "hyperliquid-send-asset"
51
+ HyperliquidSendAsset = "hyperliquid-send-asset",
52
+ /** Markr recurring: first-fill swap that schedules the recurring order on-chain. */
53
+ ScheduleRecurringSwap = "schedule-recurring-swap",
54
+ /** Markr recurring: pause an active schedule (preserves allowance). */
55
+ PauseRecurringSwap = "pause-recurring-swap",
56
+ /** Markr recurring: resume (unpause) a paused schedule. */
57
+ ResumeRecurringSwap = "resume-recurring-swap",
58
+ /** Markr recurring: cancel an active or paused schedule. */
59
+ CancelRecurringSwap = "cancel-recurring-swap"
52
60
  }
53
61
  declare const ERC_ZERO_ADDRESS: Address;
54
62
  declare const NATIVE_SOL_ADDRESS: Address$1;
@@ -76,6 +84,14 @@ declare enum SolanaChainIds {
76
84
  declare enum HyperliquidChainIds {
77
85
  MAINNET = "eip155:1337"
78
86
  }
87
+ declare enum BaseChainIds {
88
+ MAINNET = "eip155:8453",
89
+ SEPOLIA = "eip155:84532"
90
+ }
91
+ declare enum PolygonChainIds {
92
+ MAINNET = "eip155:137",
93
+ AMOY = "eip155:80002"
94
+ }
79
95
  type AvalancheBlockchainAlias = "C" | "P" | "X";
80
96
  declare const AvalancheMainnetBlockchainChainIds: Readonly<Record<AvalancheBlockchainAlias, Caip2ChainId>>;
81
97
  declare const AvalancheFujiBlockchainChainIds: Readonly<Record<AvalancheBlockchainAlias, Caip2ChainId>>;
@@ -130,5 +146,5 @@ declare enum EvmChainId {
130
146
  */
131
147
  declare const FEE_RATE_TIER_TO_BITCOIN: Record<FeeRateTier, BitcoinFeeRateTier>;
132
148
  //#endregion
133
- export { AVALANCHE_CAIP2_TO_BLOCKCHAIN_ID_BY_NETWORK, AVALANCHE_FUJI_CHAIN, AVALANCHE_FUJI_P_CHAIN, AVALANCHE_FUJI_X_CHAIN, AVALANCHE_MAINNET_CHAIN, AVALANCHE_MAINNET_P_CHAIN, AVALANCHE_MAINNET_X_CHAIN, AvalancheBlockchainAlias, AvalancheChainIds, AvalancheFujiBlockchainChainIds, AvalancheFujiBlockchainIds, AvalancheMainnetBlockchainChainIds, AvalancheMainnetBlockchainIds, BITCOIN_MAINNET_CHAIN, BITCOIN_TESTNET_CHAIN, BTC_SERVICE_TYPES, BitcoinChainIds, Blockchain, ERC_ZERO_ADDRESS, ETHEREUM_MAINNET_CHAIN, ETHEREUM_SEPOLIA_CHAIN, EVM_SERVICE_TYPES, Environment, EthereumChainIds, EvmChainId, FEE_RATE_TIER_TO_BITCOIN, HyperliquidChainIds, NATIVE_AVAX, NATIVE_ETH, NATIVE_SOL_ADDRESS, SOLANA_DEVNET_CHAIN, SOLANA_MAINNET_CHAIN, ServiceType, SolanaChainIds, TokenType, TransferSignatureReason };
149
+ export { AVALANCHE_CAIP2_TO_BLOCKCHAIN_ID_BY_NETWORK, AVALANCHE_FUJI_CHAIN, AVALANCHE_FUJI_P_CHAIN, AVALANCHE_FUJI_X_CHAIN, AVALANCHE_MAINNET_CHAIN, AVALANCHE_MAINNET_P_CHAIN, AVALANCHE_MAINNET_X_CHAIN, AvalancheBlockchainAlias, AvalancheChainIds, AvalancheFujiBlockchainChainIds, AvalancheFujiBlockchainIds, AvalancheMainnetBlockchainChainIds, AvalancheMainnetBlockchainIds, BITCOIN_MAINNET_CHAIN, BITCOIN_TESTNET_CHAIN, BTC_SERVICE_TYPES, BaseChainIds, BitcoinChainIds, Blockchain, ERC_ZERO_ADDRESS, ETHEREUM_MAINNET_CHAIN, ETHEREUM_SEPOLIA_CHAIN, EVM_SERVICE_TYPES, Environment, EthereumChainIds, EvmChainId, FEE_RATE_TIER_TO_BITCOIN, HyperliquidChainIds, NATIVE_AVAX, NATIVE_ETH, NATIVE_SOL_ADDRESS, PolygonChainIds, SOLANA_DEVNET_CHAIN, SOLANA_MAINNET_CHAIN, ServiceType, SolanaChainIds, TokenType, TransferSignatureReason };
134
150
  //# sourceMappingURL=constants.d.cts.map
@@ -48,7 +48,15 @@ declare enum TransferSignatureReason {
48
48
  /** Hyperliquid 2-phase withdrawal: step 1, nonce-mapping authorization (Relay protocol). */
49
49
  HyperliquidAuthorize = "hyperliquid-authorize",
50
50
  /** Hyperliquid 2-phase withdrawal: step 2, the `sendAsset` transfer. */
51
- HyperliquidSendAsset = "hyperliquid-send-asset"
51
+ HyperliquidSendAsset = "hyperliquid-send-asset",
52
+ /** Markr recurring: first-fill swap that schedules the recurring order on-chain. */
53
+ ScheduleRecurringSwap = "schedule-recurring-swap",
54
+ /** Markr recurring: pause an active schedule (preserves allowance). */
55
+ PauseRecurringSwap = "pause-recurring-swap",
56
+ /** Markr recurring: resume (unpause) a paused schedule. */
57
+ ResumeRecurringSwap = "resume-recurring-swap",
58
+ /** Markr recurring: cancel an active or paused schedule. */
59
+ CancelRecurringSwap = "cancel-recurring-swap"
52
60
  }
53
61
  declare const ERC_ZERO_ADDRESS: Address;
54
62
  declare const NATIVE_SOL_ADDRESS: Address$1;
@@ -76,6 +84,14 @@ declare enum SolanaChainIds {
76
84
  declare enum HyperliquidChainIds {
77
85
  MAINNET = "eip155:1337"
78
86
  }
87
+ declare enum BaseChainIds {
88
+ MAINNET = "eip155:8453",
89
+ SEPOLIA = "eip155:84532"
90
+ }
91
+ declare enum PolygonChainIds {
92
+ MAINNET = "eip155:137",
93
+ AMOY = "eip155:80002"
94
+ }
79
95
  type AvalancheBlockchainAlias = "C" | "P" | "X";
80
96
  declare const AvalancheMainnetBlockchainChainIds: Readonly<Record<AvalancheBlockchainAlias, Caip2ChainId>>;
81
97
  declare const AvalancheFujiBlockchainChainIds: Readonly<Record<AvalancheBlockchainAlias, Caip2ChainId>>;
@@ -130,5 +146,5 @@ declare enum EvmChainId {
130
146
  */
131
147
  declare const FEE_RATE_TIER_TO_BITCOIN: Record<FeeRateTier, BitcoinFeeRateTier>;
132
148
  //#endregion
133
- export { AVALANCHE_CAIP2_TO_BLOCKCHAIN_ID_BY_NETWORK, AVALANCHE_FUJI_CHAIN, AVALANCHE_FUJI_P_CHAIN, AVALANCHE_FUJI_X_CHAIN, AVALANCHE_MAINNET_CHAIN, AVALANCHE_MAINNET_P_CHAIN, AVALANCHE_MAINNET_X_CHAIN, AvalancheBlockchainAlias, AvalancheChainIds, AvalancheFujiBlockchainChainIds, AvalancheFujiBlockchainIds, AvalancheMainnetBlockchainChainIds, AvalancheMainnetBlockchainIds, BITCOIN_MAINNET_CHAIN, BITCOIN_TESTNET_CHAIN, BTC_SERVICE_TYPES, BitcoinChainIds, Blockchain, ERC_ZERO_ADDRESS, ETHEREUM_MAINNET_CHAIN, ETHEREUM_SEPOLIA_CHAIN, EVM_SERVICE_TYPES, Environment, EthereumChainIds, EvmChainId, FEE_RATE_TIER_TO_BITCOIN, HyperliquidChainIds, NATIVE_AVAX, NATIVE_ETH, NATIVE_SOL_ADDRESS, SOLANA_DEVNET_CHAIN, SOLANA_MAINNET_CHAIN, ServiceType, SolanaChainIds, TokenType, TransferSignatureReason };
149
+ export { AVALANCHE_CAIP2_TO_BLOCKCHAIN_ID_BY_NETWORK, AVALANCHE_FUJI_CHAIN, AVALANCHE_FUJI_P_CHAIN, AVALANCHE_FUJI_X_CHAIN, AVALANCHE_MAINNET_CHAIN, AVALANCHE_MAINNET_P_CHAIN, AVALANCHE_MAINNET_X_CHAIN, AvalancheBlockchainAlias, AvalancheChainIds, AvalancheFujiBlockchainChainIds, AvalancheFujiBlockchainIds, AvalancheMainnetBlockchainChainIds, AvalancheMainnetBlockchainIds, BITCOIN_MAINNET_CHAIN, BITCOIN_TESTNET_CHAIN, BTC_SERVICE_TYPES, BaseChainIds, BitcoinChainIds, Blockchain, ERC_ZERO_ADDRESS, ETHEREUM_MAINNET_CHAIN, ETHEREUM_SEPOLIA_CHAIN, EVM_SERVICE_TYPES, Environment, EthereumChainIds, EvmChainId, FEE_RATE_TIER_TO_BITCOIN, HyperliquidChainIds, NATIVE_AVAX, NATIVE_ETH, NATIVE_SOL_ADDRESS, PolygonChainIds, SOLANA_DEVNET_CHAIN, SOLANA_MAINNET_CHAIN, ServiceType, SolanaChainIds, TokenType, TransferSignatureReason };
134
150
  //# sourceMappingURL=constants.d.ts.map
package/dist/constants.js CHANGED
@@ -1,2 +1,2 @@
1
- let e=function(e){return e.DEV=`dev`,e.PROD=`production`,e.TEST=`test`,e}({}),t=function(e){return e.NATIVE=`native`,e.ERC20=`erc20`,e.SPL=`spl`,e}({}),n=function(e){return e.AVALANCHE_CCT=`avalanche-cct`,e.AVALANCHE_EVM=`avalanche-evm`,e.LOMBARD_BTC_TO_BTCB=`lombard-btc-to-btcb`,e.LOMBARD_BTCB_TO_BTC=`lombard-btcb-to-btc`,e.MARKR=`markr`,e.WRAP_UNWRAP=`wrap-unwrap`,e}({});const r=[n.LOMBARD_BTCB_TO_BTC,n.LOMBARD_BTC_TO_BTCB],i=[n.AVALANCHE_EVM,n.WRAP_UNWRAP];let a=function(e){return e.AddressOwnership=`address-ownership`,e.AllowanceApproval=`allowance-approval`,e.AvalancheCrossChainExport=`avalanche-cross-chain-export`,e.AvalancheCrossChainImport=`avalanche-cross-chain-import`,e.TokensTransfer=`tokens-transfer`,e.WrapToken=`wrap-token`,e.HyperliquidAuthorize=`hyperliquid-authorize`,e.HyperliquidSendAsset=`hyperliquid-send-asset`,e}({});const o=`0x0000000000000000000000000000000000000000`,s=`11111111111111111111111111111111`;let c=function(e){return e.FUJI=`eip155:43113`,e.MAINNET=`eip155:43114`,e}({}),l=function(e){return e.MAINNET=`eip155:1`,e.SEPOLIA=`eip155:11155111`,e}({}),u=function(e){return e.MAINNET=`bip122:000000000019d6689c085ae165831e93`,e.TESTNET=`bip122:000000000933ea01ad0ee984209779ba`,e}({}),d=function(e){return e.MAINNET=`solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp`,e.DEVNET=`solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1`,e}({}),f=function(e){return e.MAINNET=`eip155:1337`,e}({});const p={C:c.MAINNET,P:`avax:Rr9hnPVPxuUvrdCul-vjEsU1zmqKqRDo`,X:`avax:imji8papUf2EhV3le337w1vgFauqkJg-`},m={C:c.FUJI,P:`avax:Sj7NVE3jXTbJvwFAiu7OEUo_8g8ctXMG`,X:`avax:8AJTpRj3SAqv1e80Mtl9em08LhvKEbkl`},h={C:`2q9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAX5UQxse55x1Q5`,P:`11111111111111111111111111111111LpoYY`,X:`2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM`},g={C:`yH8D7ThNJkxmtkuv2jgBa4P1Rn3Qpr4pPr7QYNfcdoS6k6HWp`,P:`11111111111111111111111111111111LpoYY`,X:`2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm`},_={mainnet:{[p.C]:h.C,[p.P]:h.P,[p.X]:h.X},fuji:{[m.C]:g.C,[m.P]:g.P,[m.X]:g.X}},v={chainId:c.FUJI,chainName:`Avalanche Fuji (C-Chain)`,networkToken:{type:t.NATIVE,name:`AVAX`,symbol:`AVAX`,decimals:18},rpcUrl:`https://api.avax-test.network/ext/bc/C/rpc`},y={chainId:c.MAINNET,chainName:`Avalanche Mainnet (C-Chain)`,rpcUrl:`https://api.avax.network/ext/bc/C/rpc`,networkToken:{type:t.NATIVE,name:`AVAX`,symbol:`AVAX`,decimals:18}},b={chainId:p.P,chainName:`Avalanche Mainnet (P-Chain)`,rpcUrl:`https://api.avax.network/ext/bc/P`,networkToken:{type:t.NATIVE,name:`AVAX`,symbol:`AVAX`,decimals:9}},x={chainId:m.P,chainName:`Avalanche Fuji (P-Chain)`,rpcUrl:`https://api.avax-test.network/ext/bc/P`,networkToken:{type:t.NATIVE,name:`AVAX`,symbol:`AVAX`,decimals:9}},S={chainId:p.X,chainName:`Avalanche Mainnet (X-Chain)`,rpcUrl:`https://api.avax.network/ext/bc/X`,networkToken:{type:t.NATIVE,name:`AVAX`,symbol:`AVAX`,decimals:9}},C={chainId:m.X,chainName:`Avalanche Fuji (X-Chain)`,rpcUrl:`https://api.avax-test.network/ext/bc/X`,networkToken:{type:t.NATIVE,name:`AVAX`,symbol:`AVAX`,decimals:9}},w={chainId:l.SEPOLIA,chainName:`Ethereum Sepolia`,rpcUrl:`https://proxy-api.avax.network/proxy/infura/sepolia`,networkToken:{type:t.NATIVE,name:`ETH`,symbol:`ETH`,decimals:18}},T={chainId:l.MAINNET,chainName:`Ethereum Mainnet`,rpcUrl:`https://proxy-api.avax.network/proxy/infura/mainnet`,networkToken:{type:t.NATIVE,name:`ETH`,symbol:`ETH`,decimals:18}},E={chainId:u.TESTNET,chainName:`Bitcoin Testnet`,rpcUrl:``,networkToken:{type:t.NATIVE,name:`Bitcoin`,symbol:`BTC`,decimals:8}},D={chainId:u.MAINNET,chainName:`Bitcoin Mainnet`,rpcUrl:``,networkToken:{type:t.NATIVE,name:`Bitcoin`,symbol:`BTC`,decimals:8}},O={chainId:d.MAINNET,chainName:`Solana`,rpcUrl:`https://proxy-api.avax.network/proxy/nownodes/sol`,networkToken:{type:t.NATIVE,name:`SOL`,symbol:`SOL`,decimals:9}},k={chainId:d.DEVNET,chainName:`Solana (Devnet)`,rpcUrl:`https://api.devnet.solana.com`,networkToken:{type:t.NATIVE,name:`SOL`,symbol:`SOL`,decimals:9}},A={type:t.NATIVE,name:`Avalanche`,symbol:`AVAX`,decimals:18,logoUri:`https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg`},j={type:t.NATIVE,name:`Ether`,symbol:`ETH`,decimals:18,logoUri:`https://images.ctfassets.net/gcj8jwzm6086/6l56QLVZmvacuBfjHBTThP/791d743dd2c526692562780c2325fedf/eth-circle__1_.svg`};let M=function(e){return e.AVALANCHE=`avalanche`,e.BITCOIN=`bitcoin`,e.ETHEREUM=`ethereum`,e.SOLANA=`solana`,e.UNKNOWN=`_unknown`,e}({}),N=function(e){return e[e.AVALANCHE_MAINNET=43114]=`AVALANCHE_MAINNET`,e[e.AVALANCHE_TESTNET=43113]=`AVALANCHE_TESTNET`,e[e.ETHEREUM_HOMESTEAD=1]=`ETHEREUM_HOMESTEAD`,e[e.ETHEREUM_TEST_SEPOLIA=11155111]=`ETHEREUM_TEST_SEPOLIA`,e[e.BITCOIN=0xfffffffffffeb]=`BITCOIN`,e[e.BITCOIN_TESTNET=0xfffffffffffea]=`BITCOIN_TESTNET`,e}({});const P={slow:`low`,normal:`medium`,fast:`high`};export{_ as AVALANCHE_CAIP2_TO_BLOCKCHAIN_ID_BY_NETWORK,v as AVALANCHE_FUJI_CHAIN,x as AVALANCHE_FUJI_P_CHAIN,C as AVALANCHE_FUJI_X_CHAIN,y as AVALANCHE_MAINNET_CHAIN,b as AVALANCHE_MAINNET_P_CHAIN,S as AVALANCHE_MAINNET_X_CHAIN,c as AvalancheChainIds,m as AvalancheFujiBlockchainChainIds,g as AvalancheFujiBlockchainIds,p as AvalancheMainnetBlockchainChainIds,h as AvalancheMainnetBlockchainIds,D as BITCOIN_MAINNET_CHAIN,E as BITCOIN_TESTNET_CHAIN,r as BTC_SERVICE_TYPES,u as BitcoinChainIds,M as Blockchain,o as ERC_ZERO_ADDRESS,T as ETHEREUM_MAINNET_CHAIN,w as ETHEREUM_SEPOLIA_CHAIN,i as EVM_SERVICE_TYPES,e as Environment,l as EthereumChainIds,N as EvmChainId,P as FEE_RATE_TIER_TO_BITCOIN,f as HyperliquidChainIds,A as NATIVE_AVAX,j as NATIVE_ETH,s as NATIVE_SOL_ADDRESS,k as SOLANA_DEVNET_CHAIN,O as SOLANA_MAINNET_CHAIN,n as ServiceType,d as SolanaChainIds,t as TokenType,a as TransferSignatureReason};
1
+ let e=function(e){return e.DEV=`dev`,e.PROD=`production`,e.TEST=`test`,e}({}),t=function(e){return e.NATIVE=`native`,e.ERC20=`erc20`,e.SPL=`spl`,e}({}),n=function(e){return e.AVALANCHE_CCT=`avalanche-cct`,e.AVALANCHE_EVM=`avalanche-evm`,e.LOMBARD_BTC_TO_BTCB=`lombard-btc-to-btcb`,e.LOMBARD_BTCB_TO_BTC=`lombard-btcb-to-btc`,e.MARKR=`markr`,e.WRAP_UNWRAP=`wrap-unwrap`,e}({});const r=[n.LOMBARD_BTCB_TO_BTC,n.LOMBARD_BTC_TO_BTCB],i=[n.AVALANCHE_EVM,n.WRAP_UNWRAP];let a=function(e){return e.AddressOwnership=`address-ownership`,e.AllowanceApproval=`allowance-approval`,e.AvalancheCrossChainExport=`avalanche-cross-chain-export`,e.AvalancheCrossChainImport=`avalanche-cross-chain-import`,e.TokensTransfer=`tokens-transfer`,e.WrapToken=`wrap-token`,e.HyperliquidAuthorize=`hyperliquid-authorize`,e.HyperliquidSendAsset=`hyperliquid-send-asset`,e.ScheduleRecurringSwap=`schedule-recurring-swap`,e.PauseRecurringSwap=`pause-recurring-swap`,e.ResumeRecurringSwap=`resume-recurring-swap`,e.CancelRecurringSwap=`cancel-recurring-swap`,e}({});const o=`0x0000000000000000000000000000000000000000`,s=`11111111111111111111111111111111`;let c=function(e){return e.FUJI=`eip155:43113`,e.MAINNET=`eip155:43114`,e}({}),l=function(e){return e.MAINNET=`eip155:1`,e.SEPOLIA=`eip155:11155111`,e}({}),u=function(e){return e.MAINNET=`bip122:000000000019d6689c085ae165831e93`,e.TESTNET=`bip122:000000000933ea01ad0ee984209779ba`,e}({}),d=function(e){return e.MAINNET=`solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp`,e.DEVNET=`solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1`,e}({}),f=function(e){return e.MAINNET=`eip155:1337`,e}({}),p=function(e){return e.MAINNET=`eip155:8453`,e.SEPOLIA=`eip155:84532`,e}({}),m=function(e){return e.MAINNET=`eip155:137`,e.AMOY=`eip155:80002`,e}({});const h={C:c.MAINNET,P:`avax:Rr9hnPVPxuUvrdCul-vjEsU1zmqKqRDo`,X:`avax:imji8papUf2EhV3le337w1vgFauqkJg-`},g={C:c.FUJI,P:`avax:Sj7NVE3jXTbJvwFAiu7OEUo_8g8ctXMG`,X:`avax:8AJTpRj3SAqv1e80Mtl9em08LhvKEbkl`},_={C:`2q9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAX5UQxse55x1Q5`,P:`11111111111111111111111111111111LpoYY`,X:`2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM`},v={C:`yH8D7ThNJkxmtkuv2jgBa4P1Rn3Qpr4pPr7QYNfcdoS6k6HWp`,P:`11111111111111111111111111111111LpoYY`,X:`2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm`},y={mainnet:{[h.C]:_.C,[h.P]:_.P,[h.X]:_.X},fuji:{[g.C]:v.C,[g.P]:v.P,[g.X]:v.X}},b={chainId:c.FUJI,chainName:`Avalanche Fuji (C-Chain)`,networkToken:{type:t.NATIVE,name:`AVAX`,symbol:`AVAX`,decimals:18},rpcUrl:`https://api.avax-test.network/ext/bc/C/rpc`},x={chainId:c.MAINNET,chainName:`Avalanche Mainnet (C-Chain)`,rpcUrl:`https://api.avax.network/ext/bc/C/rpc`,networkToken:{type:t.NATIVE,name:`AVAX`,symbol:`AVAX`,decimals:18}},S={chainId:h.P,chainName:`Avalanche Mainnet (P-Chain)`,rpcUrl:`https://api.avax.network/ext/bc/P`,networkToken:{type:t.NATIVE,name:`AVAX`,symbol:`AVAX`,decimals:9}},C={chainId:g.P,chainName:`Avalanche Fuji (P-Chain)`,rpcUrl:`https://api.avax-test.network/ext/bc/P`,networkToken:{type:t.NATIVE,name:`AVAX`,symbol:`AVAX`,decimals:9}},w={chainId:h.X,chainName:`Avalanche Mainnet (X-Chain)`,rpcUrl:`https://api.avax.network/ext/bc/X`,networkToken:{type:t.NATIVE,name:`AVAX`,symbol:`AVAX`,decimals:9}},T={chainId:g.X,chainName:`Avalanche Fuji (X-Chain)`,rpcUrl:`https://api.avax-test.network/ext/bc/X`,networkToken:{type:t.NATIVE,name:`AVAX`,symbol:`AVAX`,decimals:9}},E={chainId:l.SEPOLIA,chainName:`Ethereum Sepolia`,rpcUrl:`https://proxy-api.avax.network/proxy/infura/sepolia`,networkToken:{type:t.NATIVE,name:`ETH`,symbol:`ETH`,decimals:18}},D={chainId:l.MAINNET,chainName:`Ethereum Mainnet`,rpcUrl:`https://proxy-api.avax.network/proxy/infura/mainnet`,networkToken:{type:t.NATIVE,name:`ETH`,symbol:`ETH`,decimals:18}},O={chainId:u.TESTNET,chainName:`Bitcoin Testnet`,rpcUrl:``,networkToken:{type:t.NATIVE,name:`Bitcoin`,symbol:`BTC`,decimals:8}},k={chainId:u.MAINNET,chainName:`Bitcoin Mainnet`,rpcUrl:``,networkToken:{type:t.NATIVE,name:`Bitcoin`,symbol:`BTC`,decimals:8}},A={chainId:d.MAINNET,chainName:`Solana`,rpcUrl:`https://proxy-api.avax.network/proxy/nownodes/sol`,networkToken:{type:t.NATIVE,name:`SOL`,symbol:`SOL`,decimals:9}},j={chainId:d.DEVNET,chainName:`Solana (Devnet)`,rpcUrl:`https://api.devnet.solana.com`,networkToken:{type:t.NATIVE,name:`SOL`,symbol:`SOL`,decimals:9}},M={type:t.NATIVE,name:`Avalanche`,symbol:`AVAX`,decimals:18,logoUri:`https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg`},N={type:t.NATIVE,name:`Ether`,symbol:`ETH`,decimals:18,logoUri:`https://images.ctfassets.net/gcj8jwzm6086/6l56QLVZmvacuBfjHBTThP/791d743dd2c526692562780c2325fedf/eth-circle__1_.svg`};let P=function(e){return e.AVALANCHE=`avalanche`,e.BITCOIN=`bitcoin`,e.ETHEREUM=`ethereum`,e.SOLANA=`solana`,e.UNKNOWN=`_unknown`,e}({}),F=function(e){return e[e.AVALANCHE_MAINNET=43114]=`AVALANCHE_MAINNET`,e[e.AVALANCHE_TESTNET=43113]=`AVALANCHE_TESTNET`,e[e.ETHEREUM_HOMESTEAD=1]=`ETHEREUM_HOMESTEAD`,e[e.ETHEREUM_TEST_SEPOLIA=11155111]=`ETHEREUM_TEST_SEPOLIA`,e[e.BITCOIN=0xfffffffffffeb]=`BITCOIN`,e[e.BITCOIN_TESTNET=0xfffffffffffea]=`BITCOIN_TESTNET`,e}({});const I={slow:`low`,normal:`medium`,fast:`high`};export{y as AVALANCHE_CAIP2_TO_BLOCKCHAIN_ID_BY_NETWORK,b as AVALANCHE_FUJI_CHAIN,C as AVALANCHE_FUJI_P_CHAIN,T as AVALANCHE_FUJI_X_CHAIN,x as AVALANCHE_MAINNET_CHAIN,S as AVALANCHE_MAINNET_P_CHAIN,w as AVALANCHE_MAINNET_X_CHAIN,c as AvalancheChainIds,g as AvalancheFujiBlockchainChainIds,v as AvalancheFujiBlockchainIds,h as AvalancheMainnetBlockchainChainIds,_ as AvalancheMainnetBlockchainIds,k as BITCOIN_MAINNET_CHAIN,O as BITCOIN_TESTNET_CHAIN,r as BTC_SERVICE_TYPES,p as BaseChainIds,u as BitcoinChainIds,P as Blockchain,o as ERC_ZERO_ADDRESS,D as ETHEREUM_MAINNET_CHAIN,E as ETHEREUM_SEPOLIA_CHAIN,i as EVM_SERVICE_TYPES,e as Environment,l as EthereumChainIds,F as EvmChainId,I as FEE_RATE_TIER_TO_BITCOIN,f as HyperliquidChainIds,M as NATIVE_AVAX,N as NATIVE_ETH,s as NATIVE_SOL_ADDRESS,m as PolygonChainIds,j as SOLANA_DEVNET_CHAIN,A as SOLANA_MAINNET_CHAIN,n as ServiceType,d as SolanaChainIds,t as TokenType,a as TransferSignatureReason};
2
2
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","names":[],"sources":["../src/constants.ts"],"sourcesContent":["import type { Address as SolAddress } from '@solana/kit';\nimport type { Address as EvmAddress } from 'viem';\nimport type { NativeAsset } from './types/asset';\nimport type { BitcoinFeeRateTier } from './types/bitcoin';\nimport type { Caip2ChainId } from './types/caip';\nimport type { Chain } from './types/chain';\nimport type { FeeRateTier } from './types/fee';\n\nexport enum Environment {\n DEV = 'dev',\n PROD = 'production',\n TEST = 'test',\n}\n\nexport enum TokenType {\n NATIVE = 'native',\n ERC20 = 'erc20',\n SPL = 'spl',\n}\n\nexport enum ServiceType {\n /** Avalanche Cross-chain transfer service. Export/import between C/P/X Avalanche chains. */\n AVALANCHE_CCT = 'avalanche-cct',\n /** Bridge between EVM chains within Avalanche (or EVM-compatible flows). */\n AVALANCHE_EVM = 'avalanche-evm',\n /** Bitcoin → Avalanche. */\n LOMBARD_BTC_TO_BTCB = 'lombard-btc-to-btcb',\n /** Avalanche → Bitcoin. */\n LOMBARD_BTCB_TO_BTC = 'lombard-btcb-to-btc',\n MARKR = 'markr',\n /** Same-chain wrap/unwrap of native ETH ↔ WETH and AVAX ↔ WAVAX. */\n WRAP_UNWRAP = 'wrap-unwrap',\n}\n\nexport const BTC_SERVICE_TYPES: readonly [ServiceType.LOMBARD_BTCB_TO_BTC, ServiceType.LOMBARD_BTC_TO_BTCB] = [\n ServiceType.LOMBARD_BTCB_TO_BTC,\n ServiceType.LOMBARD_BTC_TO_BTCB,\n];\n\nexport const EVM_SERVICE_TYPES: readonly [ServiceType.AVALANCHE_EVM, ServiceType.WRAP_UNWRAP] = [\n ServiceType.AVALANCHE_EVM,\n ServiceType.WRAP_UNWRAP,\n];\n\n/** Reasons for user signatures during execution. */\nexport enum TransferSignatureReason {\n AddressOwnership = 'address-ownership',\n /** ERC-20 allowance approval for router/bridge. */\n AllowanceApproval = 'allowance-approval',\n /** Primary signature for cross-chain export transaction. */\n AvalancheCrossChainExport = 'avalanche-cross-chain-export',\n /** Primary signature for cross-chain import transaction. */\n AvalancheCrossChainImport = 'avalanche-cross-chain-import',\n /** The primary token movement call (swap or bridge submit). */\n TokensTransfer = 'tokens-transfer',\n /** Optional wrap/unwrap step for native token handling. */\n WrapToken = 'wrap-token',\n /** Hyperliquid 2-phase withdrawal: step 1, nonce-mapping authorization (Relay protocol). */\n HyperliquidAuthorize = 'hyperliquid-authorize',\n /** Hyperliquid 2-phase withdrawal: step 2, the `sendAsset` transfer. */\n HyperliquidSendAsset = 'hyperliquid-send-asset',\n}\n\nexport const ERC_ZERO_ADDRESS: EvmAddress = '0x0000000000000000000000000000000000000000';\nexport const NATIVE_SOL_ADDRESS: SolAddress = '11111111111111111111111111111111' as SolAddress;\n\nexport enum AvalancheChainIds {\n FUJI = 'eip155:43113',\n MAINNET = 'eip155:43114',\n}\n\nexport enum EthereumChainIds {\n MAINNET = 'eip155:1',\n SEPOLIA = 'eip155:11155111',\n}\n\nexport enum BitcoinChainIds {\n MAINNET = 'bip122:000000000019d6689c085ae165831e93',\n TESTNET = 'bip122:000000000933ea01ad0ee984209779ba',\n}\n\nexport enum SolanaChainIds {\n MAINNET = 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp',\n DEVNET = 'solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1',\n}\n\n/**\n * Hyperliquid is identified by CAIP-2 `eip155:1337` per Relay's convention.\n * It's an EVM-namespaced chain ID but has no real EVM execution — withdrawals\n * use a two-signature EIP-712 flow against Hyperliquid's `/exchange` API.\n */\nexport enum HyperliquidChainIds {\n MAINNET = 'eip155:1337',\n}\n\nexport type AvalancheBlockchainAlias = 'C' | 'P' | 'X';\n\nexport const AvalancheMainnetBlockchainChainIds: Readonly<Record<AvalancheBlockchainAlias, Caip2ChainId>> = {\n C: AvalancheChainIds.MAINNET,\n P: 'avax:Rr9hnPVPxuUvrdCul-vjEsU1zmqKqRDo',\n X: 'avax:imji8papUf2EhV3le337w1vgFauqkJg-',\n};\n\nexport const AvalancheFujiBlockchainChainIds: Readonly<Record<AvalancheBlockchainAlias, Caip2ChainId>> = {\n C: AvalancheChainIds.FUJI,\n P: 'avax:Sj7NVE3jXTbJvwFAiu7OEUo_8g8ctXMG',\n X: 'avax:8AJTpRj3SAqv1e80Mtl9em08LhvKEbkl',\n};\n\nexport const AvalancheMainnetBlockchainIds: Readonly<Record<AvalancheBlockchainAlias, string>> = {\n C: '2q9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAX5UQxse55x1Q5',\n P: '11111111111111111111111111111111LpoYY',\n X: '2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM',\n};\n\nexport const AvalancheFujiBlockchainIds: Readonly<Record<AvalancheBlockchainAlias, string>> = {\n C: 'yH8D7ThNJkxmtkuv2jgBa4P1Rn3Qpr4pPr7QYNfcdoS6k6HWp',\n P: '11111111111111111111111111111111LpoYY',\n X: '2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm',\n};\n\nexport const AVALANCHE_CAIP2_TO_BLOCKCHAIN_ID_BY_NETWORK: Readonly<{\n mainnet: Readonly<Record<Caip2ChainId, string>>;\n fuji: Readonly<Record<Caip2ChainId, string>>;\n}> = {\n mainnet: {\n [AvalancheMainnetBlockchainChainIds.C]: AvalancheMainnetBlockchainIds.C,\n [AvalancheMainnetBlockchainChainIds.P]: AvalancheMainnetBlockchainIds.P,\n [AvalancheMainnetBlockchainChainIds.X]: AvalancheMainnetBlockchainIds.X,\n },\n fuji: {\n [AvalancheFujiBlockchainChainIds.C]: AvalancheFujiBlockchainIds.C,\n [AvalancheFujiBlockchainChainIds.P]: AvalancheFujiBlockchainIds.P,\n [AvalancheFujiBlockchainChainIds.X]: AvalancheFujiBlockchainIds.X,\n },\n};\n\nexport const AVALANCHE_FUJI_CHAIN: Chain = {\n chainId: AvalancheChainIds.FUJI,\n chainName: 'Avalanche Fuji (C-Chain)',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'AVAX',\n symbol: 'AVAX',\n decimals: 18,\n },\n rpcUrl: 'https://api.avax-test.network/ext/bc/C/rpc',\n};\n\nexport const AVALANCHE_MAINNET_CHAIN: Chain = {\n chainId: AvalancheChainIds.MAINNET,\n chainName: 'Avalanche Mainnet (C-Chain)',\n rpcUrl: 'https://api.avax.network/ext/bc/C/rpc',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'AVAX',\n symbol: 'AVAX',\n decimals: 18,\n },\n};\n\nexport const AVALANCHE_MAINNET_P_CHAIN: Chain = {\n chainId: AvalancheMainnetBlockchainChainIds.P,\n chainName: 'Avalanche Mainnet (P-Chain)',\n rpcUrl: 'https://api.avax.network/ext/bc/P',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'AVAX',\n symbol: 'AVAX',\n decimals: 9,\n },\n};\n\nexport const AVALANCHE_FUJI_P_CHAIN: Chain = {\n chainId: AvalancheFujiBlockchainChainIds.P,\n chainName: 'Avalanche Fuji (P-Chain)',\n rpcUrl: 'https://api.avax-test.network/ext/bc/P',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'AVAX',\n symbol: 'AVAX',\n decimals: 9,\n },\n};\n\nexport const AVALANCHE_MAINNET_X_CHAIN: Chain = {\n chainId: AvalancheMainnetBlockchainChainIds.X,\n chainName: 'Avalanche Mainnet (X-Chain)',\n rpcUrl: 'https://api.avax.network/ext/bc/X',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'AVAX',\n symbol: 'AVAX',\n decimals: 9,\n },\n};\n\nexport const AVALANCHE_FUJI_X_CHAIN: Chain = {\n chainId: AvalancheFujiBlockchainChainIds.X,\n chainName: 'Avalanche Fuji (X-Chain)',\n rpcUrl: 'https://api.avax-test.network/ext/bc/X',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'AVAX',\n symbol: 'AVAX',\n decimals: 9,\n },\n};\n\nexport const ETHEREUM_SEPOLIA_CHAIN: Chain = {\n chainId: EthereumChainIds.SEPOLIA,\n chainName: 'Ethereum Sepolia',\n rpcUrl: 'https://proxy-api.avax.network/proxy/infura/sepolia',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'ETH',\n symbol: 'ETH',\n decimals: 18,\n },\n};\n\nexport const ETHEREUM_MAINNET_CHAIN: Chain = {\n chainId: EthereumChainIds.MAINNET,\n chainName: 'Ethereum Mainnet',\n rpcUrl: 'https://proxy-api.avax.network/proxy/infura/mainnet',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'ETH',\n symbol: 'ETH',\n decimals: 18,\n },\n};\n\nexport const BITCOIN_TESTNET_CHAIN: Chain = {\n chainId: BitcoinChainIds.TESTNET,\n chainName: 'Bitcoin Testnet',\n rpcUrl: '',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'Bitcoin',\n symbol: 'BTC',\n decimals: 8,\n },\n};\n\nexport const BITCOIN_MAINNET_CHAIN: Chain = {\n chainId: BitcoinChainIds.MAINNET,\n chainName: 'Bitcoin Mainnet',\n rpcUrl: '',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'Bitcoin',\n symbol: 'BTC',\n decimals: 8,\n },\n};\n\nexport const SOLANA_MAINNET_CHAIN: Chain = {\n chainId: SolanaChainIds.MAINNET,\n chainName: 'Solana',\n rpcUrl: 'https://proxy-api.avax.network/proxy/nownodes/sol',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'SOL',\n symbol: 'SOL',\n decimals: 9,\n },\n};\n\nexport const SOLANA_DEVNET_CHAIN: Chain = {\n chainId: SolanaChainIds.DEVNET,\n chainName: 'Solana (Devnet)',\n rpcUrl: 'https://api.devnet.solana.com',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'SOL',\n symbol: 'SOL',\n decimals: 9,\n },\n};\nexport const NATIVE_AVAX: NativeAsset = {\n type: TokenType.NATIVE,\n name: 'Avalanche',\n symbol: 'AVAX',\n decimals: 18,\n logoUri:\n 'https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg',\n};\nexport const NATIVE_ETH: NativeAsset = {\n type: TokenType.NATIVE,\n name: 'Ether',\n symbol: 'ETH',\n decimals: 18,\n logoUri:\n 'https://images.ctfassets.net/gcj8jwzm6086/6l56QLVZmvacuBfjHBTThP/791d743dd2c526692562780c2325fedf/eth-circle__1_.svg',\n};\n\nexport enum Blockchain {\n AVALANCHE = 'avalanche',\n BITCOIN = 'bitcoin',\n ETHEREUM = 'ethereum',\n SOLANA = 'solana',\n UNKNOWN = '_unknown',\n}\n\nexport enum EvmChainId {\n AVALANCHE_MAINNET = 43114,\n AVALANCHE_TESTNET = 43113,\n ETHEREUM_HOMESTEAD = 1,\n ETHEREUM_TEST_SEPOLIA = 11155111,\n /**\n * This is not a real chain ID, as Bitcoin does not have a chain ID.\n * It is used internally to represent Bitcoin in a way that avoids\n * conflicts with real EVM chain IDs.\n */\n BITCOIN = 4_503_599_627_370_476 - 1,\n /**\n * This is not a real chain ID, as Bitcoin does not have a chain ID.\n * It is used internally to represent Bitcoin in a way that avoids\n * conflicts with real EVM chain IDs.\n */\n BITCOIN_TESTNET = 4_503_599_627_370_476 - 2,\n}\n\n/**\n * Maps the unified {@link FeeRateTier} to the Bitcoin-specific\n * {@link BitcoinFeeRateTier} (`low | medium | high`).\n */\nexport const FEE_RATE_TIER_TO_BITCOIN: Record<FeeRateTier, BitcoinFeeRateTier> = {\n slow: 'low',\n normal: 'medium',\n fast: 'high',\n};\n"],"mappings":"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"}
1
+ {"version":3,"file":"constants.js","names":[],"sources":["../src/constants.ts"],"sourcesContent":["import type { Address as SolAddress } from '@solana/kit';\nimport type { Address as EvmAddress } from 'viem';\nimport type { NativeAsset } from './types/asset';\nimport type { BitcoinFeeRateTier } from './types/bitcoin';\nimport type { Caip2ChainId } from './types/caip';\nimport type { Chain } from './types/chain';\nimport type { FeeRateTier } from './types/fee';\n\nexport enum Environment {\n DEV = 'dev',\n PROD = 'production',\n TEST = 'test',\n}\n\nexport enum TokenType {\n NATIVE = 'native',\n ERC20 = 'erc20',\n SPL = 'spl',\n}\n\nexport enum ServiceType {\n /** Avalanche Cross-chain transfer service. Export/import between C/P/X Avalanche chains. */\n AVALANCHE_CCT = 'avalanche-cct',\n /** Bridge between EVM chains within Avalanche (or EVM-compatible flows). */\n AVALANCHE_EVM = 'avalanche-evm',\n /** Bitcoin → Avalanche. */\n LOMBARD_BTC_TO_BTCB = 'lombard-btc-to-btcb',\n /** Avalanche → Bitcoin. */\n LOMBARD_BTCB_TO_BTC = 'lombard-btcb-to-btc',\n MARKR = 'markr',\n /** Same-chain wrap/unwrap of native ETH ↔ WETH and AVAX ↔ WAVAX. */\n WRAP_UNWRAP = 'wrap-unwrap',\n}\n\nexport const BTC_SERVICE_TYPES: readonly [ServiceType.LOMBARD_BTCB_TO_BTC, ServiceType.LOMBARD_BTC_TO_BTCB] = [\n ServiceType.LOMBARD_BTCB_TO_BTC,\n ServiceType.LOMBARD_BTC_TO_BTCB,\n];\n\nexport const EVM_SERVICE_TYPES: readonly [ServiceType.AVALANCHE_EVM, ServiceType.WRAP_UNWRAP] = [\n ServiceType.AVALANCHE_EVM,\n ServiceType.WRAP_UNWRAP,\n];\n\n/** Reasons for user signatures during execution. */\nexport enum TransferSignatureReason {\n AddressOwnership = 'address-ownership',\n /** ERC-20 allowance approval for router/bridge. */\n AllowanceApproval = 'allowance-approval',\n /** Primary signature for cross-chain export transaction. */\n AvalancheCrossChainExport = 'avalanche-cross-chain-export',\n /** Primary signature for cross-chain import transaction. */\n AvalancheCrossChainImport = 'avalanche-cross-chain-import',\n /** The primary token movement call (swap or bridge submit). */\n TokensTransfer = 'tokens-transfer',\n /** Optional wrap/unwrap step for native token handling. */\n WrapToken = 'wrap-token',\n /** Hyperliquid 2-phase withdrawal: step 1, nonce-mapping authorization (Relay protocol). */\n HyperliquidAuthorize = 'hyperliquid-authorize',\n /** Hyperliquid 2-phase withdrawal: step 2, the `sendAsset` transfer. */\n HyperliquidSendAsset = 'hyperliquid-send-asset',\n /** Markr recurring: first-fill swap that schedules the recurring order on-chain. */\n ScheduleRecurringSwap = 'schedule-recurring-swap',\n /** Markr recurring: pause an active schedule (preserves allowance). */\n PauseRecurringSwap = 'pause-recurring-swap',\n /** Markr recurring: resume (unpause) a paused schedule. */\n ResumeRecurringSwap = 'resume-recurring-swap',\n /** Markr recurring: cancel an active or paused schedule. */\n CancelRecurringSwap = 'cancel-recurring-swap',\n}\n\nexport const ERC_ZERO_ADDRESS: EvmAddress = '0x0000000000000000000000000000000000000000';\nexport const NATIVE_SOL_ADDRESS: SolAddress = '11111111111111111111111111111111' as SolAddress;\n\nexport enum AvalancheChainIds {\n FUJI = 'eip155:43113',\n MAINNET = 'eip155:43114',\n}\n\nexport enum EthereumChainIds {\n MAINNET = 'eip155:1',\n SEPOLIA = 'eip155:11155111',\n}\n\nexport enum BitcoinChainIds {\n MAINNET = 'bip122:000000000019d6689c085ae165831e93',\n TESTNET = 'bip122:000000000933ea01ad0ee984209779ba',\n}\n\nexport enum SolanaChainIds {\n MAINNET = 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp',\n DEVNET = 'solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1',\n}\n\n/**\n * Hyperliquid is identified by CAIP-2 `eip155:1337` per Relay's convention.\n * It's an EVM-namespaced chain ID but has no real EVM execution — withdrawals\n * use a two-signature EIP-712 flow against Hyperliquid's `/exchange` API.\n */\nexport enum HyperliquidChainIds {\n MAINNET = 'eip155:1337',\n}\n\nexport enum BaseChainIds {\n MAINNET = 'eip155:8453',\n SEPOLIA = 'eip155:84532',\n}\n\nexport enum PolygonChainIds {\n MAINNET = 'eip155:137',\n AMOY = 'eip155:80002',\n}\n\nexport type AvalancheBlockchainAlias = 'C' | 'P' | 'X';\n\nexport const AvalancheMainnetBlockchainChainIds: Readonly<Record<AvalancheBlockchainAlias, Caip2ChainId>> = {\n C: AvalancheChainIds.MAINNET,\n P: 'avax:Rr9hnPVPxuUvrdCul-vjEsU1zmqKqRDo',\n X: 'avax:imji8papUf2EhV3le337w1vgFauqkJg-',\n};\n\nexport const AvalancheFujiBlockchainChainIds: Readonly<Record<AvalancheBlockchainAlias, Caip2ChainId>> = {\n C: AvalancheChainIds.FUJI,\n P: 'avax:Sj7NVE3jXTbJvwFAiu7OEUo_8g8ctXMG',\n X: 'avax:8AJTpRj3SAqv1e80Mtl9em08LhvKEbkl',\n};\n\nexport const AvalancheMainnetBlockchainIds: Readonly<Record<AvalancheBlockchainAlias, string>> = {\n C: '2q9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAX5UQxse55x1Q5',\n P: '11111111111111111111111111111111LpoYY',\n X: '2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM',\n};\n\nexport const AvalancheFujiBlockchainIds: Readonly<Record<AvalancheBlockchainAlias, string>> = {\n C: 'yH8D7ThNJkxmtkuv2jgBa4P1Rn3Qpr4pPr7QYNfcdoS6k6HWp',\n P: '11111111111111111111111111111111LpoYY',\n X: '2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm',\n};\n\nexport const AVALANCHE_CAIP2_TO_BLOCKCHAIN_ID_BY_NETWORK: Readonly<{\n mainnet: Readonly<Record<Caip2ChainId, string>>;\n fuji: Readonly<Record<Caip2ChainId, string>>;\n}> = {\n mainnet: {\n [AvalancheMainnetBlockchainChainIds.C]: AvalancheMainnetBlockchainIds.C,\n [AvalancheMainnetBlockchainChainIds.P]: AvalancheMainnetBlockchainIds.P,\n [AvalancheMainnetBlockchainChainIds.X]: AvalancheMainnetBlockchainIds.X,\n },\n fuji: {\n [AvalancheFujiBlockchainChainIds.C]: AvalancheFujiBlockchainIds.C,\n [AvalancheFujiBlockchainChainIds.P]: AvalancheFujiBlockchainIds.P,\n [AvalancheFujiBlockchainChainIds.X]: AvalancheFujiBlockchainIds.X,\n },\n};\n\nexport const AVALANCHE_FUJI_CHAIN: Chain = {\n chainId: AvalancheChainIds.FUJI,\n chainName: 'Avalanche Fuji (C-Chain)',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'AVAX',\n symbol: 'AVAX',\n decimals: 18,\n },\n rpcUrl: 'https://api.avax-test.network/ext/bc/C/rpc',\n};\n\nexport const AVALANCHE_MAINNET_CHAIN: Chain = {\n chainId: AvalancheChainIds.MAINNET,\n chainName: 'Avalanche Mainnet (C-Chain)',\n rpcUrl: 'https://api.avax.network/ext/bc/C/rpc',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'AVAX',\n symbol: 'AVAX',\n decimals: 18,\n },\n};\n\nexport const AVALANCHE_MAINNET_P_CHAIN: Chain = {\n chainId: AvalancheMainnetBlockchainChainIds.P,\n chainName: 'Avalanche Mainnet (P-Chain)',\n rpcUrl: 'https://api.avax.network/ext/bc/P',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'AVAX',\n symbol: 'AVAX',\n decimals: 9,\n },\n};\n\nexport const AVALANCHE_FUJI_P_CHAIN: Chain = {\n chainId: AvalancheFujiBlockchainChainIds.P,\n chainName: 'Avalanche Fuji (P-Chain)',\n rpcUrl: 'https://api.avax-test.network/ext/bc/P',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'AVAX',\n symbol: 'AVAX',\n decimals: 9,\n },\n};\n\nexport const AVALANCHE_MAINNET_X_CHAIN: Chain = {\n chainId: AvalancheMainnetBlockchainChainIds.X,\n chainName: 'Avalanche Mainnet (X-Chain)',\n rpcUrl: 'https://api.avax.network/ext/bc/X',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'AVAX',\n symbol: 'AVAX',\n decimals: 9,\n },\n};\n\nexport const AVALANCHE_FUJI_X_CHAIN: Chain = {\n chainId: AvalancheFujiBlockchainChainIds.X,\n chainName: 'Avalanche Fuji (X-Chain)',\n rpcUrl: 'https://api.avax-test.network/ext/bc/X',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'AVAX',\n symbol: 'AVAX',\n decimals: 9,\n },\n};\n\nexport const ETHEREUM_SEPOLIA_CHAIN: Chain = {\n chainId: EthereumChainIds.SEPOLIA,\n chainName: 'Ethereum Sepolia',\n rpcUrl: 'https://proxy-api.avax.network/proxy/infura/sepolia',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'ETH',\n symbol: 'ETH',\n decimals: 18,\n },\n};\n\nexport const ETHEREUM_MAINNET_CHAIN: Chain = {\n chainId: EthereumChainIds.MAINNET,\n chainName: 'Ethereum Mainnet',\n rpcUrl: 'https://proxy-api.avax.network/proxy/infura/mainnet',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'ETH',\n symbol: 'ETH',\n decimals: 18,\n },\n};\n\nexport const BITCOIN_TESTNET_CHAIN: Chain = {\n chainId: BitcoinChainIds.TESTNET,\n chainName: 'Bitcoin Testnet',\n rpcUrl: '',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'Bitcoin',\n symbol: 'BTC',\n decimals: 8,\n },\n};\n\nexport const BITCOIN_MAINNET_CHAIN: Chain = {\n chainId: BitcoinChainIds.MAINNET,\n chainName: 'Bitcoin Mainnet',\n rpcUrl: '',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'Bitcoin',\n symbol: 'BTC',\n decimals: 8,\n },\n};\n\nexport const SOLANA_MAINNET_CHAIN: Chain = {\n chainId: SolanaChainIds.MAINNET,\n chainName: 'Solana',\n rpcUrl: 'https://proxy-api.avax.network/proxy/nownodes/sol',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'SOL',\n symbol: 'SOL',\n decimals: 9,\n },\n};\n\nexport const SOLANA_DEVNET_CHAIN: Chain = {\n chainId: SolanaChainIds.DEVNET,\n chainName: 'Solana (Devnet)',\n rpcUrl: 'https://api.devnet.solana.com',\n networkToken: {\n type: TokenType.NATIVE,\n name: 'SOL',\n symbol: 'SOL',\n decimals: 9,\n },\n};\nexport const NATIVE_AVAX: NativeAsset = {\n type: TokenType.NATIVE,\n name: 'Avalanche',\n symbol: 'AVAX',\n decimals: 18,\n logoUri:\n 'https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg',\n};\nexport const NATIVE_ETH: NativeAsset = {\n type: TokenType.NATIVE,\n name: 'Ether',\n symbol: 'ETH',\n decimals: 18,\n logoUri:\n 'https://images.ctfassets.net/gcj8jwzm6086/6l56QLVZmvacuBfjHBTThP/791d743dd2c526692562780c2325fedf/eth-circle__1_.svg',\n};\n\nexport enum Blockchain {\n AVALANCHE = 'avalanche',\n BITCOIN = 'bitcoin',\n ETHEREUM = 'ethereum',\n SOLANA = 'solana',\n UNKNOWN = '_unknown',\n}\n\nexport enum EvmChainId {\n AVALANCHE_MAINNET = 43114,\n AVALANCHE_TESTNET = 43113,\n ETHEREUM_HOMESTEAD = 1,\n ETHEREUM_TEST_SEPOLIA = 11155111,\n /**\n * This is not a real chain ID, as Bitcoin does not have a chain ID.\n * It is used internally to represent Bitcoin in a way that avoids\n * conflicts with real EVM chain IDs.\n */\n BITCOIN = 4_503_599_627_370_476 - 1,\n /**\n * This is not a real chain ID, as Bitcoin does not have a chain ID.\n * It is used internally to represent Bitcoin in a way that avoids\n * conflicts with real EVM chain IDs.\n */\n BITCOIN_TESTNET = 4_503_599_627_370_476 - 2,\n}\n\n/**\n * Maps the unified {@link FeeRateTier} to the Bitcoin-specific\n * {@link BitcoinFeeRateTier} (`low | medium | high`).\n */\nexport const FEE_RATE_TIER_TO_BITCOIN: Record<FeeRateTier, BitcoinFeeRateTier> = {\n slow: 'low',\n normal: 'medium',\n fast: 'high',\n};\n"],"mappings":"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"}
package/dist/mod.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./constants.cjs`),t=require(`./errors.cjs`),n=require(`./type-guards.cjs`),r=require(`./transfer-manager.cjs`),i=require(`./utils/caip.cjs`),a=require(`./utils/bridgeable-assets.cjs`),o=require(`./utils/price-impact.cjs`),s=require(`./utils/transfer-utils.cjs`),c=require(`./transfer-service/markr/recurring/types.cjs`),l=require(`./transfer-service/markr/recurring/_frequency.cjs`),u=require(`./transfer-service/_evm-approval.cjs`);exports.AVALANCHE_CAIP2_TO_BLOCKCHAIN_ID_BY_NETWORK=e.AVALANCHE_CAIP2_TO_BLOCKCHAIN_ID_BY_NETWORK,exports.AVALANCHE_FUJI_CHAIN=e.AVALANCHE_FUJI_CHAIN,exports.AVALANCHE_FUJI_P_CHAIN=e.AVALANCHE_FUJI_P_CHAIN,exports.AVALANCHE_FUJI_X_CHAIN=e.AVALANCHE_FUJI_X_CHAIN,exports.AVALANCHE_MAINNET_CHAIN=e.AVALANCHE_MAINNET_CHAIN,exports.AVALANCHE_MAINNET_P_CHAIN=e.AVALANCHE_MAINNET_P_CHAIN,exports.AVALANCHE_MAINNET_X_CHAIN=e.AVALANCHE_MAINNET_X_CHAIN,exports.AbortedError=t.AbortedError,exports.ApprovalRevertedError=u.ApprovalRevertedError,exports.AvalancheChainIds=e.AvalancheChainIds,exports.AvalancheFujiBlockchainChainIds=e.AvalancheFujiBlockchainChainIds,exports.AvalancheFujiBlockchainIds=e.AvalancheFujiBlockchainIds,exports.AvalancheMainnetBlockchainChainIds=e.AvalancheMainnetBlockchainChainIds,exports.AvalancheMainnetBlockchainIds=e.AvalancheMainnetBlockchainIds,exports.BITCOIN_MAINNET_CHAIN=e.BITCOIN_MAINNET_CHAIN,exports.BITCOIN_TESTNET_CHAIN=e.BITCOIN_TESTNET_CHAIN,exports.BTC_SERVICE_TYPES=e.BTC_SERVICE_TYPES,exports.BitcoinChainIds=e.BitcoinChainIds,exports.Blockchain=e.Blockchain,exports.ERC_ZERO_ADDRESS=e.ERC_ZERO_ADDRESS,exports.ETHEREUM_MAINNET_CHAIN=e.ETHEREUM_MAINNET_CHAIN,exports.ETHEREUM_SEPOLIA_CHAIN=e.ETHEREUM_SEPOLIA_CHAIN,exports.EVM_SERVICE_TYPES=e.EVM_SERVICE_TYPES,exports.Environment=e.Environment,exports.ErrorCode=t.ErrorCode,exports.ErrorReason=t.ErrorReason,exports.EstimateNativeFeeError=t.EstimateNativeFeeError,exports.EthereumChainIds=e.EthereumChainIds,exports.EvmChainId=e.EvmChainId,exports.FEE_RATE_TIER_TO_BITCOIN=e.FEE_RATE_TIER_TO_BITCOIN,exports.HttpError=t.HttpError,exports.HyperliquidChainIds=e.HyperliquidChainIds,exports.InsufficientFundsError=t.InsufficientFundsError,exports.InvalidParamsError=t.InvalidParamsError,exports.NATIVE_AVAX=e.NATIVE_AVAX,exports.NATIVE_ETH=e.NATIVE_ETH,exports.NATIVE_SOL_ADDRESS=e.NATIVE_SOL_ADDRESS,exports.RECURRING_FREQUENCY_UNITS=c.RECURRING_FREQUENCY_UNITS,exports.RECURRING_FREQUENCY_VALUE_MAX=l.RECURRING_FREQUENCY_VALUE_MAX,exports.RECURRING_UNLIMITED_ORDERS_SENTINEL=c.RECURRING_UNLIMITED_ORDERS_SENTINEL,exports.RecurringEligibilityReason=c.RecurringEligibilityReason,exports.RecurringOrderStatus=c.RecurringOrderStatus,exports.ResponseValidationError=t.ResponseValidationError,exports.SOLANA_DEVNET_CHAIN=e.SOLANA_DEVNET_CHAIN,exports.SOLANA_MAINNET_CHAIN=e.SOLANA_MAINNET_CHAIN,exports.SdkError=t.SdkError,exports.ServiceInitializationError=t.ServiceInitializationError,exports.ServiceType=e.ServiceType,exports.ServiceUnavailableError=t.ServiceUnavailableError,exports.SolanaChainIds=e.SolanaChainIds,exports.TimeoutError=t.TimeoutError,exports.TokenType=e.TokenType,exports.TransferSignatureReason=e.TransferSignatureReason,exports.caip2ToEip155ChainId=i.caip2ToEip155ChainId,exports.caip2ToEip155HexChainId=i.caip2ToEip155HexChainId,exports.calculatePriceImpactFromQuote=o.calculatePriceImpactFromQuote,exports.createTransferManager=r.createTransferManager,exports.dedupeBridgeableAssets=a.dedupeBridgeableAssets,exports.deriveIntervalSeconds=l.deriveIntervalSeconds,exports.eip155ChainIdToCaip2=i.eip155ChainIdToCaip2,exports.isAbortedError=t.isAbortedError,exports.isCaip2ChainId=i.isCaip2ChainId,exports.isEnvironment=n.isEnvironment,exports.isErc20Asset=n.isErc20Asset,exports.isEstimateNativeFeeError=t.isEstimateNativeFeeError,exports.isEvmBridgeInitializer=n.isEvmBridgeInitializer,exports.isHttpError=t.isHttpError,exports.isInsufficientFundsError=t.isInsufficientFundsError,exports.isInvalidParamsError=t.isInvalidParamsError,exports.isLombardServiceInitializer=n.isLombardServiceInitializer,exports.isMarkrServiceInitializer=n.isMarkrServiceInitializer,exports.isNativeAsset=n.isNativeAsset,exports.isResponseValidationError=t.isResponseValidationError,exports.isSdkError=t.isSdkError,exports.isServiceInitializationError=t.isServiceInitializationError,exports.isServiceInitializer=n.isServiceInitializer,exports.isServiceUnavailableError=t.isServiceUnavailableError,exports.isSplAsset=n.isSplAsset,exports.isTimeoutError=t.isTimeoutError,exports.parseTransfer=s.parseTransfer,exports.splitCaip2ChainId=i.splitCaip2ChainId,exports.stringifyTransfer=s.stringifyTransfer,exports.validateFrequency=l.validateFrequency;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./constants.cjs`),t=require(`./errors.cjs`),n=require(`./type-guards.cjs`),r=require(`./transfer-manager.cjs`),i=require(`./utils/caip.cjs`),a=require(`./utils/bridgeable-assets.cjs`),o=require(`./utils/destination-chains.cjs`),s=require(`./utils/price-impact.cjs`),c=require(`./utils/transfer-utils.cjs`),l=require(`./transfer-service/markr/recurring/types.cjs`),u=require(`./transfer-service/markr/recurring/_frequency.cjs`),d=require(`./transfer-service/_evm-approval.cjs`);exports.AVALANCHE_CAIP2_TO_BLOCKCHAIN_ID_BY_NETWORK=e.AVALANCHE_CAIP2_TO_BLOCKCHAIN_ID_BY_NETWORK,exports.AVALANCHE_FUJI_CHAIN=e.AVALANCHE_FUJI_CHAIN,exports.AVALANCHE_FUJI_P_CHAIN=e.AVALANCHE_FUJI_P_CHAIN,exports.AVALANCHE_FUJI_X_CHAIN=e.AVALANCHE_FUJI_X_CHAIN,exports.AVALANCHE_MAINNET_CHAIN=e.AVALANCHE_MAINNET_CHAIN,exports.AVALANCHE_MAINNET_P_CHAIN=e.AVALANCHE_MAINNET_P_CHAIN,exports.AVALANCHE_MAINNET_X_CHAIN=e.AVALANCHE_MAINNET_X_CHAIN,exports.AbortedError=t.AbortedError,exports.ApprovalRevertedError=d.ApprovalRevertedError,exports.AvalancheChainIds=e.AvalancheChainIds,exports.AvalancheFujiBlockchainChainIds=e.AvalancheFujiBlockchainChainIds,exports.AvalancheFujiBlockchainIds=e.AvalancheFujiBlockchainIds,exports.AvalancheMainnetBlockchainChainIds=e.AvalancheMainnetBlockchainChainIds,exports.AvalancheMainnetBlockchainIds=e.AvalancheMainnetBlockchainIds,exports.BITCOIN_MAINNET_CHAIN=e.BITCOIN_MAINNET_CHAIN,exports.BITCOIN_TESTNET_CHAIN=e.BITCOIN_TESTNET_CHAIN,exports.BTC_SERVICE_TYPES=e.BTC_SERVICE_TYPES,exports.BaseChainIds=e.BaseChainIds,exports.BitcoinChainIds=e.BitcoinChainIds,exports.Blockchain=e.Blockchain,exports.ERC_ZERO_ADDRESS=e.ERC_ZERO_ADDRESS,exports.ETHEREUM_MAINNET_CHAIN=e.ETHEREUM_MAINNET_CHAIN,exports.ETHEREUM_SEPOLIA_CHAIN=e.ETHEREUM_SEPOLIA_CHAIN,exports.EVM_SERVICE_TYPES=e.EVM_SERVICE_TYPES,exports.Environment=e.Environment,exports.ErrorCode=t.ErrorCode,exports.ErrorReason=t.ErrorReason,exports.EstimateNativeFeeError=t.EstimateNativeFeeError,exports.EthereumChainIds=e.EthereumChainIds,exports.EvmChainId=e.EvmChainId,exports.FEE_RATE_TIER_TO_BITCOIN=e.FEE_RATE_TIER_TO_BITCOIN,exports.HttpError=t.HttpError,exports.HyperliquidChainIds=e.HyperliquidChainIds,exports.InsufficientFundsError=t.InsufficientFundsError,exports.InvalidParamsError=t.InvalidParamsError,exports.NATIVE_AVAX=e.NATIVE_AVAX,exports.NATIVE_ETH=e.NATIVE_ETH,exports.NATIVE_SOL_ADDRESS=e.NATIVE_SOL_ADDRESS,exports.PolygonChainIds=e.PolygonChainIds,exports.RECURRING_FREQUENCY_UNITS=l.RECURRING_FREQUENCY_UNITS,exports.RECURRING_FREQUENCY_VALUE_MAX=u.RECURRING_FREQUENCY_VALUE_MAX,exports.RECURRING_UNLIMITED_ORDERS_SENTINEL=l.RECURRING_UNLIMITED_ORDERS_SENTINEL,exports.RecurringEligibilityReason=l.RecurringEligibilityReason,exports.RecurringOrderStatus=l.RecurringOrderStatus,exports.ResponseValidationError=t.ResponseValidationError,exports.SOLANA_DEVNET_CHAIN=e.SOLANA_DEVNET_CHAIN,exports.SOLANA_MAINNET_CHAIN=e.SOLANA_MAINNET_CHAIN,exports.SdkError=t.SdkError,exports.ServiceInitializationError=t.ServiceInitializationError,exports.ServiceType=e.ServiceType,exports.ServiceUnavailableError=t.ServiceUnavailableError,exports.SolanaChainIds=e.SolanaChainIds,exports.TimeoutError=t.TimeoutError,exports.TokenType=e.TokenType,exports.TransferSignatureReason=e.TransferSignatureReason,exports.caip2ToEip155ChainId=i.caip2ToEip155ChainId,exports.caip2ToEip155HexChainId=i.caip2ToEip155HexChainId,exports.calculatePriceImpactFromQuote=s.calculatePriceImpactFromQuote,exports.compareDestinationChains=o.compareDestinationChains,exports.createTransferManager=r.createTransferManager,exports.dedupeBridgeableAssets=a.dedupeBridgeableAssets,exports.deriveIntervalSeconds=u.deriveIntervalSeconds,exports.eip155ChainIdToCaip2=i.eip155ChainIdToCaip2,exports.getDestinationChainPriority=o.getDestinationChainPriority,exports.isAbortedError=t.isAbortedError,exports.isCaip2ChainId=i.isCaip2ChainId,exports.isEnvironment=n.isEnvironment,exports.isErc20Asset=n.isErc20Asset,exports.isEstimateNativeFeeError=t.isEstimateNativeFeeError,exports.isEvmBridgeInitializer=n.isEvmBridgeInitializer,exports.isHttpError=t.isHttpError,exports.isInsufficientFundsError=t.isInsufficientFundsError,exports.isInvalidParamsError=t.isInvalidParamsError,exports.isLombardServiceInitializer=n.isLombardServiceInitializer,exports.isMarkrServiceInitializer=n.isMarkrServiceInitializer,exports.isNativeAsset=n.isNativeAsset,exports.isResponseValidationError=t.isResponseValidationError,exports.isSdkError=t.isSdkError,exports.isServiceInitializationError=t.isServiceInitializationError,exports.isServiceInitializer=n.isServiceInitializer,exports.isServiceUnavailableError=t.isServiceUnavailableError,exports.isSplAsset=n.isSplAsset,exports.isTimeoutError=t.isTimeoutError,exports.parseTransfer=c.parseTransfer,exports.sortDestinationChains=o.sortDestinationChains,exports.splitCaip2ChainId=i.splitCaip2ChainId,exports.stringifyTransfer=c.stringifyTransfer,exports.validateFrequency=u.validateFrequency;
package/dist/mod.d.cts CHANGED
@@ -2,7 +2,7 @@ import { Caip10AccountId, Caip2ChainId } from "./types/caip.cjs";
2
2
  import { BitcoinFeeRateTier, BitcoinFunctions, BitcoinInputUTXO, BitcoinInputUTXOWithOptionalScript, BitcoinOutputUTXO, BitcoinTx } from "./types/bitcoin.cjs";
3
3
  import { Chain } from "./types/chain.cjs";
4
4
  import { FeeRateTier } from "./types/fee.cjs";
5
- import { AVALANCHE_CAIP2_TO_BLOCKCHAIN_ID_BY_NETWORK, AVALANCHE_FUJI_CHAIN, AVALANCHE_FUJI_P_CHAIN, AVALANCHE_FUJI_X_CHAIN, AVALANCHE_MAINNET_CHAIN, AVALANCHE_MAINNET_P_CHAIN, AVALANCHE_MAINNET_X_CHAIN, AvalancheBlockchainAlias, AvalancheChainIds, AvalancheFujiBlockchainChainIds, AvalancheFujiBlockchainIds, AvalancheMainnetBlockchainChainIds, AvalancheMainnetBlockchainIds, BITCOIN_MAINNET_CHAIN, BITCOIN_TESTNET_CHAIN, BTC_SERVICE_TYPES, BitcoinChainIds, Blockchain, ERC_ZERO_ADDRESS, ETHEREUM_MAINNET_CHAIN, ETHEREUM_SEPOLIA_CHAIN, EVM_SERVICE_TYPES, Environment, EthereumChainIds, EvmChainId, FEE_RATE_TIER_TO_BITCOIN, HyperliquidChainIds, NATIVE_AVAX, NATIVE_ETH, NATIVE_SOL_ADDRESS, SOLANA_DEVNET_CHAIN, SOLANA_MAINNET_CHAIN, ServiceType, SolanaChainIds, TokenType, TransferSignatureReason } from "./constants.cjs";
5
+ import { AVALANCHE_CAIP2_TO_BLOCKCHAIN_ID_BY_NETWORK, AVALANCHE_FUJI_CHAIN, AVALANCHE_FUJI_P_CHAIN, AVALANCHE_FUJI_X_CHAIN, AVALANCHE_MAINNET_CHAIN, AVALANCHE_MAINNET_P_CHAIN, AVALANCHE_MAINNET_X_CHAIN, AvalancheBlockchainAlias, AvalancheChainIds, AvalancheFujiBlockchainChainIds, AvalancheFujiBlockchainIds, AvalancheMainnetBlockchainChainIds, AvalancheMainnetBlockchainIds, BITCOIN_MAINNET_CHAIN, BITCOIN_TESTNET_CHAIN, BTC_SERVICE_TYPES, BaseChainIds, BitcoinChainIds, Blockchain, ERC_ZERO_ADDRESS, ETHEREUM_MAINNET_CHAIN, ETHEREUM_SEPOLIA_CHAIN, EVM_SERVICE_TYPES, Environment, EthereumChainIds, EvmChainId, FEE_RATE_TIER_TO_BITCOIN, HyperliquidChainIds, NATIVE_AVAX, NATIVE_ETH, NATIVE_SOL_ADDRESS, PolygonChainIds, SOLANA_DEVNET_CHAIN, SOLANA_MAINNET_CHAIN, ServiceType, SolanaChainIds, TokenType, TransferSignatureReason } from "./constants.cjs";
6
6
  import { Asset, AssetWithExtras, BridgeableAsset, BridgeableUiAsset, ChainAssetMap, DestinationInfo, Erc20Asset, NativeAsset, SplAsset, TransferableAsset } from "./types/asset.cjs";
7
7
  import { Quote, QuoteFee, QuoteFeeFundingModel, QuoteFeeToken, QuoteFeeType, QuoteFees, QuoterDonePayload, QuoterDonePayloadNoEligibleServices, QuoterDonePayloadNoQuotes, QuoterDonePayloadUnsubscribed, QuoterDoneReason, QuoterEventArgs, QuoterEventHandler, QuoterInterface, QuoterProps, QuotesTuple, ServiceQuoteEventArgs, ServiceQuoteEventHandler } from "./types/quote.cjs";
8
8
  import { ArrayElement, Brand, DeepMutable, Fetch, Mutable } from "./types/utility-types.cjs";
@@ -18,9 +18,10 @@ import { isEnvironment, isErc20Asset, isEvmBridgeInitializer, isLombardServiceIn
18
18
  import { createTransferManager } from "./transfer-manager.cjs";
19
19
  import { caip2ToEip155ChainId, caip2ToEip155HexChainId, eip155ChainIdToCaip2, isCaip2ChainId, splitCaip2ChainId } from "./utils/caip.cjs";
20
20
  import { dedupeBridgeableAssets } from "./utils/bridgeable-assets.cjs";
21
+ import { DestinationChainSortInput, compareDestinationChains, getDestinationChainPriority, sortDestinationChains } from "./utils/destination-chains.cjs";
21
22
  import { calculatePriceImpactFromQuote } from "./utils/price-impact.cjs";
22
23
  import { parseTransfer, stringifyTransfer } from "./utils/transfer-utils.cjs";
23
24
  import { MarkrService } from "./transfer-service/markr/markr-service.cjs";
24
25
  import { FrequencyValidationResult, RECURRING_FREQUENCY_VALUE_MAX, deriveIntervalSeconds, validateFrequency } from "./transfer-service/markr/recurring/_frequency.cjs";
25
26
  import { ApprovalRevertedError } from "./transfer-service/_evm-approval.cjs";
26
- export { AVALANCHE_CAIP2_TO_BLOCKCHAIN_ID_BY_NETWORK, AVALANCHE_FUJI_CHAIN, AVALANCHE_FUJI_P_CHAIN, AVALANCHE_FUJI_X_CHAIN, AVALANCHE_MAINNET_CHAIN, AVALANCHE_MAINNET_P_CHAIN, AVALANCHE_MAINNET_X_CHAIN, AbortedError, ApprovalRevertedError, ArrayElement, Asset, AssetBridgeMap, AssetSearchQuery, AssetWithExtras, AvalancheBlockchainAlias, AvalancheCctInitializer, AvalancheChainIds, AvalancheFujiBlockchainChainIds, AvalancheFujiBlockchainIds, AvalancheMainnetBlockchainChainIds, AvalancheMainnetBlockchainIds, AvalancheSendTxFunction, AvalancheSendTxParams, BITCOIN_MAINNET_CHAIN, BITCOIN_TESTNET_CHAIN, BTC_SERVICE_TYPES, BitcoinChainIds, BitcoinFeeRateTier, BitcoinFunctions, BitcoinInputUTXO, BitcoinInputUTXOWithOptionalScript, BitcoinOutputUTXO, BitcoinTx, Blockchain, Brand, BridgeableAsset, BridgeableUiAsset, BtcDispatch, BtcSign, BtcSigner, BtcTransactionRequest, Caip10AccountId, Caip2ChainId, Chain, ChainAssetMap, type CheckRecurringEligibilityParams, CompletedTransfer, CreateTransferManagerOptions, DeepMutable, DestinationInfo, ERC_ZERO_ADDRESS, ETHEREUM_MAINNET_CHAIN, ETHEREUM_SEPOLIA_CHAIN, EVM_SERVICE_TYPES, Environment, Erc20Asset, ErrorCode, ErrorReason, EstimateNativeFeeError, type EstimateNativeFeeErrorDetails, EstimateNativeFeeOptions, EthereumChainIds, EvmChainId, EvmDispatch, EvmServiceInitializer, EvmSign, EvmSignBatch, EvmSignMessage, EvmSignTypedData, EvmSigner, EvmSignerWithMessage, EvmTransactionRequest, EvmTypedData, FEE_RATE_TIER_TO_BITCOIN, FailedTransfer, FeeRateTier, Fetch, type FrequencyValidationResult, GasSettings, type GetAtomicUtxosCallback, GetBridgeableAssetsProps, GetBridgeableAssetsResult, type GetCoreEthAddressCallback, GetMinimumTransferAmountProps, GetSupportedChainsResult, type GetUtxosCallback, type GetWalletAddressesForChainAliasCallback, type GetWalletChangeAddressForChainAliasCallback, Hex, HttpError, HyperliquidChainIds, InsufficientFundsError, InvalidParamsError, type ListRecurringOrdersParams, type ListRecurringOrdersResponse, LombardServiceInitializer, type MarkrService, MarkrServiceInitializer, Mutable, MutableGetSupportedChainsResult, NATIVE_AVAX, NATIVE_ETH, NATIVE_SOL_ADDRESS, NativeAsset, NativeFeeEstimate, Quote, QuoteFee, QuoteFeeFundingModel, QuoteFeeToken, QuoteFeeType, QuoteFees, QuoterDonePayload, QuoterDonePayloadNoEligibleServices, QuoterDonePayloadNoQuotes, QuoterDonePayloadUnsubscribed, QuoterDoneReason, QuoterEventArgs, QuoterEventHandler, QuoterInterface, QuoterProps, QuotesTuple, RECURRING_FREQUENCY_UNITS, RECURRING_FREQUENCY_VALUE_MAX, RECURRING_UNLIMITED_ORDERS_SENTINEL, type RecurringChainInfoEntry, type RecurringChainInfoMap, type RecurringEligibility, RecurringEligibilityReason, type RecurringExecuteFirstFillParams, type RecurringExecuteOrderActionParams, type RecurringExecuteResult, type RecurringFrequency, type RecurringFrequencyUnit, type RecurringNamespace, type RecurringNamespaceCheckEligibilityParams, type RecurringNamespaceQuoteParams, type RecurringOrder, type RecurringOrderFailure, RecurringOrderStatus, type RecurringQuoteFee, type RecurringQuoteFeeType, type RecurringQuoteParams, type RecurringQuoteResponse, type RecurringSwapParams, RefundedTransfer, ResponseValidationError, SOLANA_DEVNET_CHAIN, SOLANA_MAINNET_CHAIN, SdkError, ServiceInitializationError, ServiceInitializer, ServiceQuoteEventArgs, ServiceQuoteEventHandler, ServiceQuoteOptions, ServiceStatus, ServiceStatusBaseRecord, ServiceStatusErrorRecord, ServiceStatusInitializedRecord, ServiceStatusRecord, ServiceStatusUnsupportedEnvironmentRecord, ServiceType, ServiceUnavailableError, SolanaChainIds, SolanaSendOptions, SolanaSign, SolanaSigner, SolanaTransactionParams, SourceCompletedTransfer, SourcePendingTransfer, SplAsset, TargetPendingTransfer, TimeoutError, TokenType, TrackTransferProps, Transfer, TransferAssetProps, TransferBase, TransferManager, TransferManagerStatus, TransferManagerStatusServicesRecord, TransferService, TransferSignatureReason, TransferSourceProgress, TransferStatus, TransferStepDetails, TransferTargetProgress, TransferableAsset, caip2ToEip155ChainId, caip2ToEip155HexChainId, calculatePriceImpactFromQuote, createTransferManager, dedupeBridgeableAssets, deriveIntervalSeconds, eip155ChainIdToCaip2, isAbortedError, isCaip2ChainId, isEnvironment, isErc20Asset, isEstimateNativeFeeError, isEvmBridgeInitializer, isHttpError, isInsufficientFundsError, isInvalidParamsError, isLombardServiceInitializer, isMarkrServiceInitializer, isNativeAsset, isResponseValidationError, isSdkError, isServiceInitializationError, isServiceInitializer, isServiceUnavailableError, isSplAsset, isTimeoutError, parseTransfer, splitCaip2ChainId, stringifyTransfer, validateFrequency };
27
+ export { AVALANCHE_CAIP2_TO_BLOCKCHAIN_ID_BY_NETWORK, AVALANCHE_FUJI_CHAIN, AVALANCHE_FUJI_P_CHAIN, AVALANCHE_FUJI_X_CHAIN, AVALANCHE_MAINNET_CHAIN, AVALANCHE_MAINNET_P_CHAIN, AVALANCHE_MAINNET_X_CHAIN, AbortedError, ApprovalRevertedError, ArrayElement, Asset, AssetBridgeMap, AssetSearchQuery, AssetWithExtras, AvalancheBlockchainAlias, AvalancheCctInitializer, AvalancheChainIds, AvalancheFujiBlockchainChainIds, AvalancheFujiBlockchainIds, AvalancheMainnetBlockchainChainIds, AvalancheMainnetBlockchainIds, AvalancheSendTxFunction, AvalancheSendTxParams, BITCOIN_MAINNET_CHAIN, BITCOIN_TESTNET_CHAIN, BTC_SERVICE_TYPES, BaseChainIds, BitcoinChainIds, BitcoinFeeRateTier, BitcoinFunctions, BitcoinInputUTXO, BitcoinInputUTXOWithOptionalScript, BitcoinOutputUTXO, BitcoinTx, Blockchain, Brand, BridgeableAsset, BridgeableUiAsset, BtcDispatch, BtcSign, BtcSigner, BtcTransactionRequest, Caip10AccountId, Caip2ChainId, Chain, ChainAssetMap, type CheckRecurringEligibilityParams, CompletedTransfer, CreateTransferManagerOptions, DeepMutable, type DestinationChainSortInput, DestinationInfo, ERC_ZERO_ADDRESS, ETHEREUM_MAINNET_CHAIN, ETHEREUM_SEPOLIA_CHAIN, EVM_SERVICE_TYPES, Environment, Erc20Asset, ErrorCode, ErrorReason, EstimateNativeFeeError, type EstimateNativeFeeErrorDetails, EstimateNativeFeeOptions, EthereumChainIds, EvmChainId, EvmDispatch, EvmServiceInitializer, EvmSign, EvmSignBatch, EvmSignMessage, EvmSignTypedData, EvmSigner, EvmSignerWithMessage, EvmTransactionRequest, EvmTypedData, FEE_RATE_TIER_TO_BITCOIN, FailedTransfer, FeeRateTier, Fetch, type FrequencyValidationResult, GasSettings, type GetAtomicUtxosCallback, GetBridgeableAssetsProps, GetBridgeableAssetsResult, type GetCoreEthAddressCallback, GetMinimumTransferAmountProps, GetSupportedChainsResult, type GetUtxosCallback, type GetWalletAddressesForChainAliasCallback, type GetWalletChangeAddressForChainAliasCallback, Hex, HttpError, HyperliquidChainIds, InsufficientFundsError, InvalidParamsError, type ListRecurringOrdersParams, type ListRecurringOrdersResponse, LombardServiceInitializer, type MarkrService, MarkrServiceInitializer, Mutable, MutableGetSupportedChainsResult, NATIVE_AVAX, NATIVE_ETH, NATIVE_SOL_ADDRESS, NativeAsset, NativeFeeEstimate, PolygonChainIds, Quote, QuoteFee, QuoteFeeFundingModel, QuoteFeeToken, QuoteFeeType, QuoteFees, QuoterDonePayload, QuoterDonePayloadNoEligibleServices, QuoterDonePayloadNoQuotes, QuoterDonePayloadUnsubscribed, QuoterDoneReason, QuoterEventArgs, QuoterEventHandler, QuoterInterface, QuoterProps, QuotesTuple, RECURRING_FREQUENCY_UNITS, RECURRING_FREQUENCY_VALUE_MAX, RECURRING_UNLIMITED_ORDERS_SENTINEL, type RecurringChainInfoEntry, type RecurringChainInfoMap, type RecurringEligibility, RecurringEligibilityReason, type RecurringExecuteFirstFillParams, type RecurringExecuteOrderActionParams, type RecurringExecuteResult, type RecurringFrequency, type RecurringFrequencyUnit, type RecurringNamespace, type RecurringNamespaceCheckEligibilityParams, type RecurringNamespaceQuoteParams, type RecurringOrder, type RecurringOrderFailure, RecurringOrderStatus, type RecurringQuoteFee, type RecurringQuoteFeeType, type RecurringQuoteParams, type RecurringQuoteResponse, type RecurringSwapParams, RefundedTransfer, ResponseValidationError, SOLANA_DEVNET_CHAIN, SOLANA_MAINNET_CHAIN, SdkError, ServiceInitializationError, ServiceInitializer, ServiceQuoteEventArgs, ServiceQuoteEventHandler, ServiceQuoteOptions, ServiceStatus, ServiceStatusBaseRecord, ServiceStatusErrorRecord, ServiceStatusInitializedRecord, ServiceStatusRecord, ServiceStatusUnsupportedEnvironmentRecord, ServiceType, ServiceUnavailableError, SolanaChainIds, SolanaSendOptions, SolanaSign, SolanaSigner, SolanaTransactionParams, SourceCompletedTransfer, SourcePendingTransfer, SplAsset, TargetPendingTransfer, TimeoutError, TokenType, TrackTransferProps, Transfer, TransferAssetProps, TransferBase, TransferManager, TransferManagerStatus, TransferManagerStatusServicesRecord, TransferService, TransferSignatureReason, TransferSourceProgress, TransferStatus, TransferStepDetails, TransferTargetProgress, TransferableAsset, caip2ToEip155ChainId, caip2ToEip155HexChainId, calculatePriceImpactFromQuote, compareDestinationChains, createTransferManager, dedupeBridgeableAssets, deriveIntervalSeconds, eip155ChainIdToCaip2, getDestinationChainPriority, isAbortedError, isCaip2ChainId, isEnvironment, isErc20Asset, isEstimateNativeFeeError, isEvmBridgeInitializer, isHttpError, isInsufficientFundsError, isInvalidParamsError, isLombardServiceInitializer, isMarkrServiceInitializer, isNativeAsset, isResponseValidationError, isSdkError, isServiceInitializationError, isServiceInitializer, isServiceUnavailableError, isSplAsset, isTimeoutError, parseTransfer, sortDestinationChains, splitCaip2ChainId, stringifyTransfer, validateFrequency };
package/dist/mod.d.ts CHANGED
@@ -2,7 +2,7 @@ import { Caip10AccountId, Caip2ChainId } from "./types/caip.js";
2
2
  import { BitcoinFeeRateTier, BitcoinFunctions, BitcoinInputUTXO, BitcoinInputUTXOWithOptionalScript, BitcoinOutputUTXO, BitcoinTx } from "./types/bitcoin.js";
3
3
  import { Chain } from "./types/chain.js";
4
4
  import { FeeRateTier } from "./types/fee.js";
5
- import { AVALANCHE_CAIP2_TO_BLOCKCHAIN_ID_BY_NETWORK, AVALANCHE_FUJI_CHAIN, AVALANCHE_FUJI_P_CHAIN, AVALANCHE_FUJI_X_CHAIN, AVALANCHE_MAINNET_CHAIN, AVALANCHE_MAINNET_P_CHAIN, AVALANCHE_MAINNET_X_CHAIN, AvalancheBlockchainAlias, AvalancheChainIds, AvalancheFujiBlockchainChainIds, AvalancheFujiBlockchainIds, AvalancheMainnetBlockchainChainIds, AvalancheMainnetBlockchainIds, BITCOIN_MAINNET_CHAIN, BITCOIN_TESTNET_CHAIN, BTC_SERVICE_TYPES, BitcoinChainIds, Blockchain, ERC_ZERO_ADDRESS, ETHEREUM_MAINNET_CHAIN, ETHEREUM_SEPOLIA_CHAIN, EVM_SERVICE_TYPES, Environment, EthereumChainIds, EvmChainId, FEE_RATE_TIER_TO_BITCOIN, HyperliquidChainIds, NATIVE_AVAX, NATIVE_ETH, NATIVE_SOL_ADDRESS, SOLANA_DEVNET_CHAIN, SOLANA_MAINNET_CHAIN, ServiceType, SolanaChainIds, TokenType, TransferSignatureReason } from "./constants.js";
5
+ import { AVALANCHE_CAIP2_TO_BLOCKCHAIN_ID_BY_NETWORK, AVALANCHE_FUJI_CHAIN, AVALANCHE_FUJI_P_CHAIN, AVALANCHE_FUJI_X_CHAIN, AVALANCHE_MAINNET_CHAIN, AVALANCHE_MAINNET_P_CHAIN, AVALANCHE_MAINNET_X_CHAIN, AvalancheBlockchainAlias, AvalancheChainIds, AvalancheFujiBlockchainChainIds, AvalancheFujiBlockchainIds, AvalancheMainnetBlockchainChainIds, AvalancheMainnetBlockchainIds, BITCOIN_MAINNET_CHAIN, BITCOIN_TESTNET_CHAIN, BTC_SERVICE_TYPES, BaseChainIds, BitcoinChainIds, Blockchain, ERC_ZERO_ADDRESS, ETHEREUM_MAINNET_CHAIN, ETHEREUM_SEPOLIA_CHAIN, EVM_SERVICE_TYPES, Environment, EthereumChainIds, EvmChainId, FEE_RATE_TIER_TO_BITCOIN, HyperliquidChainIds, NATIVE_AVAX, NATIVE_ETH, NATIVE_SOL_ADDRESS, PolygonChainIds, SOLANA_DEVNET_CHAIN, SOLANA_MAINNET_CHAIN, ServiceType, SolanaChainIds, TokenType, TransferSignatureReason } from "./constants.js";
6
6
  import { Asset, AssetWithExtras, BridgeableAsset, BridgeableUiAsset, ChainAssetMap, DestinationInfo, Erc20Asset, NativeAsset, SplAsset, TransferableAsset } from "./types/asset.js";
7
7
  import { Quote, QuoteFee, QuoteFeeFundingModel, QuoteFeeToken, QuoteFeeType, QuoteFees, QuoterDonePayload, QuoterDonePayloadNoEligibleServices, QuoterDonePayloadNoQuotes, QuoterDonePayloadUnsubscribed, QuoterDoneReason, QuoterEventArgs, QuoterEventHandler, QuoterInterface, QuoterProps, QuotesTuple, ServiceQuoteEventArgs, ServiceQuoteEventHandler } from "./types/quote.js";
8
8
  import { ArrayElement, Brand, DeepMutable, Fetch, Mutable } from "./types/utility-types.js";
@@ -18,9 +18,10 @@ import { isEnvironment, isErc20Asset, isEvmBridgeInitializer, isLombardServiceIn
18
18
  import { createTransferManager } from "./transfer-manager.js";
19
19
  import { caip2ToEip155ChainId, caip2ToEip155HexChainId, eip155ChainIdToCaip2, isCaip2ChainId, splitCaip2ChainId } from "./utils/caip.js";
20
20
  import { dedupeBridgeableAssets } from "./utils/bridgeable-assets.js";
21
+ import { DestinationChainSortInput, compareDestinationChains, getDestinationChainPriority, sortDestinationChains } from "./utils/destination-chains.js";
21
22
  import { calculatePriceImpactFromQuote } from "./utils/price-impact.js";
22
23
  import { parseTransfer, stringifyTransfer } from "./utils/transfer-utils.js";
23
24
  import { MarkrService } from "./transfer-service/markr/markr-service.js";
24
25
  import { FrequencyValidationResult, RECURRING_FREQUENCY_VALUE_MAX, deriveIntervalSeconds, validateFrequency } from "./transfer-service/markr/recurring/_frequency.js";
25
26
  import { ApprovalRevertedError } from "./transfer-service/_evm-approval.js";
26
- export { AVALANCHE_CAIP2_TO_BLOCKCHAIN_ID_BY_NETWORK, AVALANCHE_FUJI_CHAIN, AVALANCHE_FUJI_P_CHAIN, AVALANCHE_FUJI_X_CHAIN, AVALANCHE_MAINNET_CHAIN, AVALANCHE_MAINNET_P_CHAIN, AVALANCHE_MAINNET_X_CHAIN, AbortedError, ApprovalRevertedError, ArrayElement, Asset, AssetBridgeMap, AssetSearchQuery, AssetWithExtras, AvalancheBlockchainAlias, AvalancheCctInitializer, AvalancheChainIds, AvalancheFujiBlockchainChainIds, AvalancheFujiBlockchainIds, AvalancheMainnetBlockchainChainIds, AvalancheMainnetBlockchainIds, AvalancheSendTxFunction, AvalancheSendTxParams, BITCOIN_MAINNET_CHAIN, BITCOIN_TESTNET_CHAIN, BTC_SERVICE_TYPES, BitcoinChainIds, BitcoinFeeRateTier, BitcoinFunctions, BitcoinInputUTXO, BitcoinInputUTXOWithOptionalScript, BitcoinOutputUTXO, BitcoinTx, Blockchain, Brand, BridgeableAsset, BridgeableUiAsset, BtcDispatch, BtcSign, BtcSigner, BtcTransactionRequest, Caip10AccountId, Caip2ChainId, Chain, ChainAssetMap, type CheckRecurringEligibilityParams, CompletedTransfer, CreateTransferManagerOptions, DeepMutable, DestinationInfo, ERC_ZERO_ADDRESS, ETHEREUM_MAINNET_CHAIN, ETHEREUM_SEPOLIA_CHAIN, EVM_SERVICE_TYPES, Environment, Erc20Asset, ErrorCode, ErrorReason, EstimateNativeFeeError, type EstimateNativeFeeErrorDetails, EstimateNativeFeeOptions, EthereumChainIds, EvmChainId, EvmDispatch, EvmServiceInitializer, EvmSign, EvmSignBatch, EvmSignMessage, EvmSignTypedData, EvmSigner, EvmSignerWithMessage, EvmTransactionRequest, EvmTypedData, FEE_RATE_TIER_TO_BITCOIN, FailedTransfer, FeeRateTier, Fetch, type FrequencyValidationResult, GasSettings, type GetAtomicUtxosCallback, GetBridgeableAssetsProps, GetBridgeableAssetsResult, type GetCoreEthAddressCallback, GetMinimumTransferAmountProps, GetSupportedChainsResult, type GetUtxosCallback, type GetWalletAddressesForChainAliasCallback, type GetWalletChangeAddressForChainAliasCallback, Hex, HttpError, HyperliquidChainIds, InsufficientFundsError, InvalidParamsError, type ListRecurringOrdersParams, type ListRecurringOrdersResponse, LombardServiceInitializer, type MarkrService, MarkrServiceInitializer, Mutable, MutableGetSupportedChainsResult, NATIVE_AVAX, NATIVE_ETH, NATIVE_SOL_ADDRESS, NativeAsset, NativeFeeEstimate, Quote, QuoteFee, QuoteFeeFundingModel, QuoteFeeToken, QuoteFeeType, QuoteFees, QuoterDonePayload, QuoterDonePayloadNoEligibleServices, QuoterDonePayloadNoQuotes, QuoterDonePayloadUnsubscribed, QuoterDoneReason, QuoterEventArgs, QuoterEventHandler, QuoterInterface, QuoterProps, QuotesTuple, RECURRING_FREQUENCY_UNITS, RECURRING_FREQUENCY_VALUE_MAX, RECURRING_UNLIMITED_ORDERS_SENTINEL, type RecurringChainInfoEntry, type RecurringChainInfoMap, type RecurringEligibility, RecurringEligibilityReason, type RecurringExecuteFirstFillParams, type RecurringExecuteOrderActionParams, type RecurringExecuteResult, type RecurringFrequency, type RecurringFrequencyUnit, type RecurringNamespace, type RecurringNamespaceCheckEligibilityParams, type RecurringNamespaceQuoteParams, type RecurringOrder, type RecurringOrderFailure, RecurringOrderStatus, type RecurringQuoteFee, type RecurringQuoteFeeType, type RecurringQuoteParams, type RecurringQuoteResponse, type RecurringSwapParams, RefundedTransfer, ResponseValidationError, SOLANA_DEVNET_CHAIN, SOLANA_MAINNET_CHAIN, SdkError, ServiceInitializationError, ServiceInitializer, ServiceQuoteEventArgs, ServiceQuoteEventHandler, ServiceQuoteOptions, ServiceStatus, ServiceStatusBaseRecord, ServiceStatusErrorRecord, ServiceStatusInitializedRecord, ServiceStatusRecord, ServiceStatusUnsupportedEnvironmentRecord, ServiceType, ServiceUnavailableError, SolanaChainIds, SolanaSendOptions, SolanaSign, SolanaSigner, SolanaTransactionParams, SourceCompletedTransfer, SourcePendingTransfer, SplAsset, TargetPendingTransfer, TimeoutError, TokenType, TrackTransferProps, Transfer, TransferAssetProps, TransferBase, TransferManager, TransferManagerStatus, TransferManagerStatusServicesRecord, TransferService, TransferSignatureReason, TransferSourceProgress, TransferStatus, TransferStepDetails, TransferTargetProgress, TransferableAsset, caip2ToEip155ChainId, caip2ToEip155HexChainId, calculatePriceImpactFromQuote, createTransferManager, dedupeBridgeableAssets, deriveIntervalSeconds, eip155ChainIdToCaip2, isAbortedError, isCaip2ChainId, isEnvironment, isErc20Asset, isEstimateNativeFeeError, isEvmBridgeInitializer, isHttpError, isInsufficientFundsError, isInvalidParamsError, isLombardServiceInitializer, isMarkrServiceInitializer, isNativeAsset, isResponseValidationError, isSdkError, isServiceInitializationError, isServiceInitializer, isServiceUnavailableError, isSplAsset, isTimeoutError, parseTransfer, splitCaip2ChainId, stringifyTransfer, validateFrequency };
27
+ export { AVALANCHE_CAIP2_TO_BLOCKCHAIN_ID_BY_NETWORK, AVALANCHE_FUJI_CHAIN, AVALANCHE_FUJI_P_CHAIN, AVALANCHE_FUJI_X_CHAIN, AVALANCHE_MAINNET_CHAIN, AVALANCHE_MAINNET_P_CHAIN, AVALANCHE_MAINNET_X_CHAIN, AbortedError, ApprovalRevertedError, ArrayElement, Asset, AssetBridgeMap, AssetSearchQuery, AssetWithExtras, AvalancheBlockchainAlias, AvalancheCctInitializer, AvalancheChainIds, AvalancheFujiBlockchainChainIds, AvalancheFujiBlockchainIds, AvalancheMainnetBlockchainChainIds, AvalancheMainnetBlockchainIds, AvalancheSendTxFunction, AvalancheSendTxParams, BITCOIN_MAINNET_CHAIN, BITCOIN_TESTNET_CHAIN, BTC_SERVICE_TYPES, BaseChainIds, BitcoinChainIds, BitcoinFeeRateTier, BitcoinFunctions, BitcoinInputUTXO, BitcoinInputUTXOWithOptionalScript, BitcoinOutputUTXO, BitcoinTx, Blockchain, Brand, BridgeableAsset, BridgeableUiAsset, BtcDispatch, BtcSign, BtcSigner, BtcTransactionRequest, Caip10AccountId, Caip2ChainId, Chain, ChainAssetMap, type CheckRecurringEligibilityParams, CompletedTransfer, CreateTransferManagerOptions, DeepMutable, type DestinationChainSortInput, DestinationInfo, ERC_ZERO_ADDRESS, ETHEREUM_MAINNET_CHAIN, ETHEREUM_SEPOLIA_CHAIN, EVM_SERVICE_TYPES, Environment, Erc20Asset, ErrorCode, ErrorReason, EstimateNativeFeeError, type EstimateNativeFeeErrorDetails, EstimateNativeFeeOptions, EthereumChainIds, EvmChainId, EvmDispatch, EvmServiceInitializer, EvmSign, EvmSignBatch, EvmSignMessage, EvmSignTypedData, EvmSigner, EvmSignerWithMessage, EvmTransactionRequest, EvmTypedData, FEE_RATE_TIER_TO_BITCOIN, FailedTransfer, FeeRateTier, Fetch, type FrequencyValidationResult, GasSettings, type GetAtomicUtxosCallback, GetBridgeableAssetsProps, GetBridgeableAssetsResult, type GetCoreEthAddressCallback, GetMinimumTransferAmountProps, GetSupportedChainsResult, type GetUtxosCallback, type GetWalletAddressesForChainAliasCallback, type GetWalletChangeAddressForChainAliasCallback, Hex, HttpError, HyperliquidChainIds, InsufficientFundsError, InvalidParamsError, type ListRecurringOrdersParams, type ListRecurringOrdersResponse, LombardServiceInitializer, type MarkrService, MarkrServiceInitializer, Mutable, MutableGetSupportedChainsResult, NATIVE_AVAX, NATIVE_ETH, NATIVE_SOL_ADDRESS, NativeAsset, NativeFeeEstimate, PolygonChainIds, Quote, QuoteFee, QuoteFeeFundingModel, QuoteFeeToken, QuoteFeeType, QuoteFees, QuoterDonePayload, QuoterDonePayloadNoEligibleServices, QuoterDonePayloadNoQuotes, QuoterDonePayloadUnsubscribed, QuoterDoneReason, QuoterEventArgs, QuoterEventHandler, QuoterInterface, QuoterProps, QuotesTuple, RECURRING_FREQUENCY_UNITS, RECURRING_FREQUENCY_VALUE_MAX, RECURRING_UNLIMITED_ORDERS_SENTINEL, type RecurringChainInfoEntry, type RecurringChainInfoMap, type RecurringEligibility, RecurringEligibilityReason, type RecurringExecuteFirstFillParams, type RecurringExecuteOrderActionParams, type RecurringExecuteResult, type RecurringFrequency, type RecurringFrequencyUnit, type RecurringNamespace, type RecurringNamespaceCheckEligibilityParams, type RecurringNamespaceQuoteParams, type RecurringOrder, type RecurringOrderFailure, RecurringOrderStatus, type RecurringQuoteFee, type RecurringQuoteFeeType, type RecurringQuoteParams, type RecurringQuoteResponse, type RecurringSwapParams, RefundedTransfer, ResponseValidationError, SOLANA_DEVNET_CHAIN, SOLANA_MAINNET_CHAIN, SdkError, ServiceInitializationError, ServiceInitializer, ServiceQuoteEventArgs, ServiceQuoteEventHandler, ServiceQuoteOptions, ServiceStatus, ServiceStatusBaseRecord, ServiceStatusErrorRecord, ServiceStatusInitializedRecord, ServiceStatusRecord, ServiceStatusUnsupportedEnvironmentRecord, ServiceType, ServiceUnavailableError, SolanaChainIds, SolanaSendOptions, SolanaSign, SolanaSigner, SolanaTransactionParams, SourceCompletedTransfer, SourcePendingTransfer, SplAsset, TargetPendingTransfer, TimeoutError, TokenType, TrackTransferProps, Transfer, TransferAssetProps, TransferBase, TransferManager, TransferManagerStatus, TransferManagerStatusServicesRecord, TransferService, TransferSignatureReason, TransferSourceProgress, TransferStatus, TransferStepDetails, TransferTargetProgress, TransferableAsset, caip2ToEip155ChainId, caip2ToEip155HexChainId, calculatePriceImpactFromQuote, compareDestinationChains, createTransferManager, dedupeBridgeableAssets, deriveIntervalSeconds, eip155ChainIdToCaip2, getDestinationChainPriority, isAbortedError, isCaip2ChainId, isEnvironment, isErc20Asset, isEstimateNativeFeeError, isEvmBridgeInitializer, isHttpError, isInsufficientFundsError, isInvalidParamsError, isLombardServiceInitializer, isMarkrServiceInitializer, isNativeAsset, isResponseValidationError, isSdkError, isServiceInitializationError, isServiceInitializer, isServiceUnavailableError, isSplAsset, isTimeoutError, parseTransfer, sortDestinationChains, splitCaip2ChainId, stringifyTransfer, validateFrequency };
package/dist/mod.js CHANGED
@@ -1 +1 @@
1
- import{AVALANCHE_CAIP2_TO_BLOCKCHAIN_ID_BY_NETWORK as e,AVALANCHE_FUJI_CHAIN as t,AVALANCHE_FUJI_P_CHAIN as n,AVALANCHE_FUJI_X_CHAIN as r,AVALANCHE_MAINNET_CHAIN as i,AVALANCHE_MAINNET_P_CHAIN as a,AVALANCHE_MAINNET_X_CHAIN as o,AvalancheChainIds as s,AvalancheFujiBlockchainChainIds as c,AvalancheFujiBlockchainIds as l,AvalancheMainnetBlockchainChainIds as u,AvalancheMainnetBlockchainIds as d,BITCOIN_MAINNET_CHAIN as f,BITCOIN_TESTNET_CHAIN as p,BTC_SERVICE_TYPES as m,BitcoinChainIds as h,Blockchain as g,ERC_ZERO_ADDRESS as _,ETHEREUM_MAINNET_CHAIN as v,ETHEREUM_SEPOLIA_CHAIN as y,EVM_SERVICE_TYPES as b,Environment as x,EthereumChainIds as S,EvmChainId as C,FEE_RATE_TIER_TO_BITCOIN as w,HyperliquidChainIds as T,NATIVE_AVAX as E,NATIVE_ETH as D,NATIVE_SOL_ADDRESS as O,SOLANA_DEVNET_CHAIN as k,SOLANA_MAINNET_CHAIN as A,ServiceType as j,SolanaChainIds as M,TokenType as N,TransferSignatureReason as P}from"./constants.js";import{AbortedError as F,ErrorCode as I,ErrorReason as L,EstimateNativeFeeError as R,HttpError as z,InsufficientFundsError as B,InvalidParamsError as V,ResponseValidationError as H,SdkError as U,ServiceInitializationError as W,ServiceUnavailableError as G,TimeoutError as K,isAbortedError as q,isEstimateNativeFeeError as J,isHttpError as Y,isInsufficientFundsError as X,isInvalidParamsError as Z,isResponseValidationError as Q,isSdkError as $,isServiceInitializationError as ee,isServiceUnavailableError as te,isTimeoutError as ne}from"./errors.js";import{isEnvironment as re,isErc20Asset as ie,isEvmBridgeInitializer as ae,isLombardServiceInitializer as oe,isMarkrServiceInitializer as se,isNativeAsset as ce,isServiceInitializer as le,isSplAsset as ue}from"./type-guards.js";import{createTransferManager as de}from"./transfer-manager.js";import{caip2ToEip155ChainId as fe,caip2ToEip155HexChainId as pe,eip155ChainIdToCaip2 as me,isCaip2ChainId as he,splitCaip2ChainId as ge}from"./utils/caip.js";import{dedupeBridgeableAssets as _e}from"./utils/bridgeable-assets.js";import{calculatePriceImpactFromQuote as ve}from"./utils/price-impact.js";import{parseTransfer as ye,stringifyTransfer as be}from"./utils/transfer-utils.js";import{RECURRING_FREQUENCY_UNITS as xe,RECURRING_UNLIMITED_ORDERS_SENTINEL as Se,RecurringEligibilityReason as Ce,RecurringOrderStatus as we}from"./transfer-service/markr/recurring/types.js";import{RECURRING_FREQUENCY_VALUE_MAX as Te,deriveIntervalSeconds as Ee,validateFrequency as De}from"./transfer-service/markr/recurring/_frequency.js";import{ApprovalRevertedError as Oe}from"./transfer-service/_evm-approval.js";export{e as AVALANCHE_CAIP2_TO_BLOCKCHAIN_ID_BY_NETWORK,t as AVALANCHE_FUJI_CHAIN,n as AVALANCHE_FUJI_P_CHAIN,r as AVALANCHE_FUJI_X_CHAIN,i as AVALANCHE_MAINNET_CHAIN,a as AVALANCHE_MAINNET_P_CHAIN,o as AVALANCHE_MAINNET_X_CHAIN,F as AbortedError,Oe as ApprovalRevertedError,s as AvalancheChainIds,c as AvalancheFujiBlockchainChainIds,l as AvalancheFujiBlockchainIds,u as AvalancheMainnetBlockchainChainIds,d as AvalancheMainnetBlockchainIds,f as BITCOIN_MAINNET_CHAIN,p as BITCOIN_TESTNET_CHAIN,m as BTC_SERVICE_TYPES,h as BitcoinChainIds,g as Blockchain,_ as ERC_ZERO_ADDRESS,v as ETHEREUM_MAINNET_CHAIN,y as ETHEREUM_SEPOLIA_CHAIN,b as EVM_SERVICE_TYPES,x as Environment,I as ErrorCode,L as ErrorReason,R as EstimateNativeFeeError,S as EthereumChainIds,C as EvmChainId,w as FEE_RATE_TIER_TO_BITCOIN,z as HttpError,T as HyperliquidChainIds,B as InsufficientFundsError,V as InvalidParamsError,E as NATIVE_AVAX,D as NATIVE_ETH,O as NATIVE_SOL_ADDRESS,xe as RECURRING_FREQUENCY_UNITS,Te as RECURRING_FREQUENCY_VALUE_MAX,Se as RECURRING_UNLIMITED_ORDERS_SENTINEL,Ce as RecurringEligibilityReason,we as RecurringOrderStatus,H as ResponseValidationError,k as SOLANA_DEVNET_CHAIN,A as SOLANA_MAINNET_CHAIN,U as SdkError,W as ServiceInitializationError,j as ServiceType,G as ServiceUnavailableError,M as SolanaChainIds,K as TimeoutError,N as TokenType,P as TransferSignatureReason,fe as caip2ToEip155ChainId,pe as caip2ToEip155HexChainId,ve as calculatePriceImpactFromQuote,de as createTransferManager,_e as dedupeBridgeableAssets,Ee as deriveIntervalSeconds,me as eip155ChainIdToCaip2,q as isAbortedError,he as isCaip2ChainId,re as isEnvironment,ie as isErc20Asset,J as isEstimateNativeFeeError,ae as isEvmBridgeInitializer,Y as isHttpError,X as isInsufficientFundsError,Z as isInvalidParamsError,oe as isLombardServiceInitializer,se as isMarkrServiceInitializer,ce as isNativeAsset,Q as isResponseValidationError,$ as isSdkError,ee as isServiceInitializationError,le as isServiceInitializer,te as isServiceUnavailableError,ue as isSplAsset,ne as isTimeoutError,ye as parseTransfer,ge as splitCaip2ChainId,be as stringifyTransfer,De as validateFrequency};
1
+ import{AVALANCHE_CAIP2_TO_BLOCKCHAIN_ID_BY_NETWORK as e,AVALANCHE_FUJI_CHAIN as t,AVALANCHE_FUJI_P_CHAIN as n,AVALANCHE_FUJI_X_CHAIN as r,AVALANCHE_MAINNET_CHAIN as i,AVALANCHE_MAINNET_P_CHAIN as a,AVALANCHE_MAINNET_X_CHAIN as o,AvalancheChainIds as s,AvalancheFujiBlockchainChainIds as c,AvalancheFujiBlockchainIds as l,AvalancheMainnetBlockchainChainIds as u,AvalancheMainnetBlockchainIds as d,BITCOIN_MAINNET_CHAIN as f,BITCOIN_TESTNET_CHAIN as p,BTC_SERVICE_TYPES as m,BaseChainIds as h,BitcoinChainIds as g,Blockchain as _,ERC_ZERO_ADDRESS as v,ETHEREUM_MAINNET_CHAIN as y,ETHEREUM_SEPOLIA_CHAIN as b,EVM_SERVICE_TYPES as x,Environment as S,EthereumChainIds as C,EvmChainId as w,FEE_RATE_TIER_TO_BITCOIN as T,HyperliquidChainIds as E,NATIVE_AVAX as D,NATIVE_ETH as O,NATIVE_SOL_ADDRESS as k,PolygonChainIds as A,SOLANA_DEVNET_CHAIN as j,SOLANA_MAINNET_CHAIN as M,ServiceType as N,SolanaChainIds as P,TokenType as F,TransferSignatureReason as I}from"./constants.js";import{AbortedError as L,ErrorCode as R,ErrorReason as z,EstimateNativeFeeError as B,HttpError as V,InsufficientFundsError as H,InvalidParamsError as U,ResponseValidationError as W,SdkError as G,ServiceInitializationError as K,ServiceUnavailableError as q,TimeoutError as J,isAbortedError as Y,isEstimateNativeFeeError as X,isHttpError as Z,isInsufficientFundsError as Q,isInvalidParamsError as $,isResponseValidationError as ee,isSdkError as te,isServiceInitializationError as ne,isServiceUnavailableError as re,isTimeoutError as ie}from"./errors.js";import{isEnvironment as ae,isErc20Asset as oe,isEvmBridgeInitializer as se,isLombardServiceInitializer as ce,isMarkrServiceInitializer as le,isNativeAsset as ue,isServiceInitializer as de,isSplAsset as fe}from"./type-guards.js";import{createTransferManager as pe}from"./transfer-manager.js";import{caip2ToEip155ChainId as me,caip2ToEip155HexChainId as he,eip155ChainIdToCaip2 as ge,isCaip2ChainId as _e,splitCaip2ChainId as ve}from"./utils/caip.js";import{dedupeBridgeableAssets as ye}from"./utils/bridgeable-assets.js";import{compareDestinationChains as be,getDestinationChainPriority as xe,sortDestinationChains as Se}from"./utils/destination-chains.js";import{calculatePriceImpactFromQuote as Ce}from"./utils/price-impact.js";import{parseTransfer as we,stringifyTransfer as Te}from"./utils/transfer-utils.js";import{RECURRING_FREQUENCY_UNITS as Ee,RECURRING_UNLIMITED_ORDERS_SENTINEL as De,RecurringEligibilityReason as Oe,RecurringOrderStatus as ke}from"./transfer-service/markr/recurring/types.js";import{RECURRING_FREQUENCY_VALUE_MAX as Ae,deriveIntervalSeconds as je,validateFrequency as Me}from"./transfer-service/markr/recurring/_frequency.js";import{ApprovalRevertedError as Ne}from"./transfer-service/_evm-approval.js";export{e as AVALANCHE_CAIP2_TO_BLOCKCHAIN_ID_BY_NETWORK,t as AVALANCHE_FUJI_CHAIN,n as AVALANCHE_FUJI_P_CHAIN,r as AVALANCHE_FUJI_X_CHAIN,i as AVALANCHE_MAINNET_CHAIN,a as AVALANCHE_MAINNET_P_CHAIN,o as AVALANCHE_MAINNET_X_CHAIN,L as AbortedError,Ne as ApprovalRevertedError,s as AvalancheChainIds,c as AvalancheFujiBlockchainChainIds,l as AvalancheFujiBlockchainIds,u as AvalancheMainnetBlockchainChainIds,d as AvalancheMainnetBlockchainIds,f as BITCOIN_MAINNET_CHAIN,p as BITCOIN_TESTNET_CHAIN,m as BTC_SERVICE_TYPES,h as BaseChainIds,g as BitcoinChainIds,_ as Blockchain,v as ERC_ZERO_ADDRESS,y as ETHEREUM_MAINNET_CHAIN,b as ETHEREUM_SEPOLIA_CHAIN,x as EVM_SERVICE_TYPES,S as Environment,R as ErrorCode,z as ErrorReason,B as EstimateNativeFeeError,C as EthereumChainIds,w as EvmChainId,T as FEE_RATE_TIER_TO_BITCOIN,V as HttpError,E as HyperliquidChainIds,H as InsufficientFundsError,U as InvalidParamsError,D as NATIVE_AVAX,O as NATIVE_ETH,k as NATIVE_SOL_ADDRESS,A as PolygonChainIds,Ee as RECURRING_FREQUENCY_UNITS,Ae as RECURRING_FREQUENCY_VALUE_MAX,De as RECURRING_UNLIMITED_ORDERS_SENTINEL,Oe as RecurringEligibilityReason,ke as RecurringOrderStatus,W as ResponseValidationError,j as SOLANA_DEVNET_CHAIN,M as SOLANA_MAINNET_CHAIN,G as SdkError,K as ServiceInitializationError,N as ServiceType,q as ServiceUnavailableError,P as SolanaChainIds,J as TimeoutError,F as TokenType,I as TransferSignatureReason,me as caip2ToEip155ChainId,he as caip2ToEip155HexChainId,Ce as calculatePriceImpactFromQuote,be as compareDestinationChains,pe as createTransferManager,ye as dedupeBridgeableAssets,je as deriveIntervalSeconds,ge as eip155ChainIdToCaip2,xe as getDestinationChainPriority,Y as isAbortedError,_e as isCaip2ChainId,ae as isEnvironment,oe as isErc20Asset,X as isEstimateNativeFeeError,se as isEvmBridgeInitializer,Z as isHttpError,Q as isInsufficientFundsError,$ as isInvalidParamsError,ce as isLombardServiceInitializer,le as isMarkrServiceInitializer,ue as isNativeAsset,ee as isResponseValidationError,te as isSdkError,ne as isServiceInitializationError,de as isServiceInitializer,re as isServiceUnavailableError,fe as isSplAsset,ie as isTimeoutError,we as parseTransfer,Se as sortDestinationChains,ve as splitCaip2ChainId,Te as stringifyTransfer,Me as validateFrequency};
@@ -1 +1 @@
1
- {"version":3,"file":"_frequency.cjs","names":[],"sources":["../../../../src/transfer-service/markr/recurring/_frequency.ts"],"sourcesContent":["import type { RecurringFrequency, RecurringFrequencyUnit } from './types';\n\n/**\n * Seconds-per-unit lookup. The \"month\" entry uses 30 days; Markr's `/recurring/quote`\n * returns the server-derived `intervalSeconds`, so this helper is a client-side\n * estimator (used for the picker's \"below-minimum\" greying), not the source of truth.\n */\nconst SECONDS_BY_UNIT: Readonly<Record<RecurringFrequencyUnit, number>> = {\n minute: 60,\n hour: 3600,\n day: 86_400,\n week: 604_800,\n month: 2_592_000,\n};\n\nexport function deriveIntervalSeconds(frequency: RecurringFrequency): number {\n return SECONDS_BY_UNIT[frequency.unit] * frequency.value;\n}\n\nexport type FrequencyValidationResult =\n | { ok: true; intervalSeconds: number }\n | { ok: false; reason: 'below-minimum' | 'invalid-unit' | 'invalid-value' };\n\n/** Server-enforced upper bound on `RecurringFrequency.value` (per Markr API docs). */\nexport const RECURRING_FREQUENCY_VALUE_MAX = 365;\n\nexport function validateFrequency(\n frequency: RecurringFrequency,\n minFrequencySeconds: number,\n): FrequencyValidationResult {\n if (!(frequency.unit in SECONDS_BY_UNIT)) {\n return { ok: false, reason: 'invalid-unit' };\n }\n\n // `1 ≤ value ≤ 365` mirrors the server-side bound. Catching it here lets\n // picker UIs surface the error inline instead of waiting for the\n // `/recurring/quote` HTTP round-trip to fail.\n if (!Number.isInteger(frequency.value) || frequency.value < 1 || frequency.value > RECURRING_FREQUENCY_VALUE_MAX) {\n return { ok: false, reason: 'invalid-value' };\n }\n\n const intervalSeconds = deriveIntervalSeconds(frequency);\n\n if (intervalSeconds < minFrequencySeconds) {\n return { ok: false, reason: 'below-minimum' };\n }\n\n return { ok: true, intervalSeconds };\n}\n"],"mappings":"AAOA,MAAM,EAAoE,CACxE,OAAQ,GACR,KAAM,KACN,IAAK,MACL,KAAM,OACN,MAAO,OACR,CAED,SAAgB,EAAsB,EAAuC,CAC3E,OAAO,EAAgB,EAAU,MAAQ,EAAU,MAUrD,SAAgB,EACd,EACA,EAC2B,CAC3B,GAAI,EAAE,EAAU,QAAQ,GACtB,MAAO,CAAE,GAAI,GAAO,OAAQ,eAAgB,CAM9C,GAAI,CAAC,OAAO,UAAU,EAAU,MAAM,EAAI,EAAU,MAAQ,GAAK,EAAU,MAAA,IACzE,MAAO,CAAE,GAAI,GAAO,OAAQ,gBAAiB,CAG/C,IAAM,EAAkB,EAAsB,EAAU,CAMxD,OAJI,EAAkB,EACb,CAAE,GAAI,GAAO,OAAQ,gBAAiB,CAGxC,CAAE,GAAI,GAAM,kBAAiB"}
1
+ {"version":3,"file":"_frequency.cjs","names":[],"sources":["../../../../src/transfer-service/markr/recurring/_frequency.ts"],"sourcesContent":["import type { RecurringFrequency, RecurringFrequencyUnit } from './types';\n\n/**\n * Seconds-per-unit lookup. The \"month\" entry uses 30 days; Markr's `/recurring/quote`\n * returns the server-derived `intervalSeconds`, so this helper is a client-side\n * estimator (used for the picker's \"below-minimum\" greying), not the source of truth.\n */\nconst SECONDS_BY_UNIT: Readonly<Record<RecurringFrequencyUnit, number>> = {\n minute: 60,\n hour: 3600,\n day: 86_400,\n week: 604_800,\n month: 2_592_000,\n};\n\nexport function deriveIntervalSeconds(frequency: RecurringFrequency): number {\n return SECONDS_BY_UNIT[frequency.unit] * frequency.value;\n}\n\nexport type FrequencyValidationResult =\n | { ok: true; intervalSeconds: number }\n | { ok: false; reason: 'below-minimum' | 'invalid-unit' | 'invalid-value' };\n\n/** Server-enforced upper bound on `RecurringFrequency.value` (per Markr API docs). */\nexport const RECURRING_FREQUENCY_VALUE_MAX: number = 365;\n\nexport function validateFrequency(\n frequency: RecurringFrequency,\n minFrequencySeconds: number,\n): FrequencyValidationResult {\n if (!(frequency.unit in SECONDS_BY_UNIT)) {\n return { ok: false, reason: 'invalid-unit' };\n }\n\n // `1 ≤ value ≤ 365` mirrors the server-side bound. Catching it here lets\n // picker UIs surface the error inline instead of waiting for the\n // `/recurring/quote` HTTP round-trip to fail.\n if (!Number.isInteger(frequency.value) || frequency.value < 1 || frequency.value > RECURRING_FREQUENCY_VALUE_MAX) {\n return { ok: false, reason: 'invalid-value' };\n }\n\n const intervalSeconds = deriveIntervalSeconds(frequency);\n\n if (intervalSeconds < minFrequencySeconds) {\n return { ok: false, reason: 'below-minimum' };\n }\n\n return { ok: true, intervalSeconds };\n}\n"],"mappings":"AAOA,MAAM,EAAoE,CACxE,OAAQ,GACR,KAAM,KACN,IAAK,MACL,KAAM,OACN,MAAO,OACR,CAED,SAAgB,EAAsB,EAAuC,CAC3E,OAAO,EAAgB,EAAU,MAAQ,EAAU,MAUrD,SAAgB,EACd,EACA,EAC2B,CAC3B,GAAI,EAAE,EAAU,QAAQ,GACtB,MAAO,CAAE,GAAI,GAAO,OAAQ,eAAgB,CAM9C,GAAI,CAAC,OAAO,UAAU,EAAU,MAAM,EAAI,EAAU,MAAQ,GAAK,EAAU,MAAA,IACzE,MAAO,CAAE,GAAI,GAAO,OAAQ,gBAAiB,CAG/C,IAAM,EAAkB,EAAsB,EAAU,CAMxD,OAJI,EAAkB,EACb,CAAE,GAAI,GAAO,OAAQ,gBAAiB,CAGxC,CAAE,GAAI,GAAM,kBAAiB"}
@@ -10,7 +10,7 @@ type FrequencyValidationResult = {
10
10
  reason: "below-minimum" | "invalid-unit" | "invalid-value";
11
11
  };
12
12
  /** Server-enforced upper bound on `RecurringFrequency.value` (per Markr API docs). */
13
- declare const RECURRING_FREQUENCY_VALUE_MAX = 365;
13
+ declare const RECURRING_FREQUENCY_VALUE_MAX: number;
14
14
  declare function validateFrequency(frequency: RecurringFrequency, minFrequencySeconds: number): FrequencyValidationResult;
15
15
  //#endregion
16
16
  export { FrequencyValidationResult, RECURRING_FREQUENCY_VALUE_MAX, deriveIntervalSeconds, validateFrequency };
@@ -10,7 +10,7 @@ type FrequencyValidationResult = {
10
10
  reason: "below-minimum" | "invalid-unit" | "invalid-value";
11
11
  };
12
12
  /** Server-enforced upper bound on `RecurringFrequency.value` (per Markr API docs). */
13
- declare const RECURRING_FREQUENCY_VALUE_MAX = 365;
13
+ declare const RECURRING_FREQUENCY_VALUE_MAX: number;
14
14
  declare function validateFrequency(frequency: RecurringFrequency, minFrequencySeconds: number): FrequencyValidationResult;
15
15
  //#endregion
16
16
  export { FrequencyValidationResult, RECURRING_FREQUENCY_VALUE_MAX, deriveIntervalSeconds, validateFrequency };
@@ -1 +1 @@
1
- {"version":3,"file":"_frequency.js","names":[],"sources":["../../../../src/transfer-service/markr/recurring/_frequency.ts"],"sourcesContent":["import type { RecurringFrequency, RecurringFrequencyUnit } from './types';\n\n/**\n * Seconds-per-unit lookup. The \"month\" entry uses 30 days; Markr's `/recurring/quote`\n * returns the server-derived `intervalSeconds`, so this helper is a client-side\n * estimator (used for the picker's \"below-minimum\" greying), not the source of truth.\n */\nconst SECONDS_BY_UNIT: Readonly<Record<RecurringFrequencyUnit, number>> = {\n minute: 60,\n hour: 3600,\n day: 86_400,\n week: 604_800,\n month: 2_592_000,\n};\n\nexport function deriveIntervalSeconds(frequency: RecurringFrequency): number {\n return SECONDS_BY_UNIT[frequency.unit] * frequency.value;\n}\n\nexport type FrequencyValidationResult =\n | { ok: true; intervalSeconds: number }\n | { ok: false; reason: 'below-minimum' | 'invalid-unit' | 'invalid-value' };\n\n/** Server-enforced upper bound on `RecurringFrequency.value` (per Markr API docs). */\nexport const RECURRING_FREQUENCY_VALUE_MAX = 365;\n\nexport function validateFrequency(\n frequency: RecurringFrequency,\n minFrequencySeconds: number,\n): FrequencyValidationResult {\n if (!(frequency.unit in SECONDS_BY_UNIT)) {\n return { ok: false, reason: 'invalid-unit' };\n }\n\n // `1 ≤ value ≤ 365` mirrors the server-side bound. Catching it here lets\n // picker UIs surface the error inline instead of waiting for the\n // `/recurring/quote` HTTP round-trip to fail.\n if (!Number.isInteger(frequency.value) || frequency.value < 1 || frequency.value > RECURRING_FREQUENCY_VALUE_MAX) {\n return { ok: false, reason: 'invalid-value' };\n }\n\n const intervalSeconds = deriveIntervalSeconds(frequency);\n\n if (intervalSeconds < minFrequencySeconds) {\n return { ok: false, reason: 'below-minimum' };\n }\n\n return { ok: true, intervalSeconds };\n}\n"],"mappings":"AAOA,MAAM,EAAoE,CACxE,OAAQ,GACR,KAAM,KACN,IAAK,MACL,KAAM,OACN,MAAO,OACR,CAED,SAAgB,EAAsB,EAAuC,CAC3E,OAAO,EAAgB,EAAU,MAAQ,EAAU,MAQrD,MAAa,EAAgC,IAE7C,SAAgB,EACd,EACA,EAC2B,CAC3B,GAAI,EAAE,EAAU,QAAQ,GACtB,MAAO,CAAE,GAAI,GAAO,OAAQ,eAAgB,CAM9C,GAAI,CAAC,OAAO,UAAU,EAAU,MAAM,EAAI,EAAU,MAAQ,GAAK,EAAU,MAAA,IACzE,MAAO,CAAE,GAAI,GAAO,OAAQ,gBAAiB,CAG/C,IAAM,EAAkB,EAAsB,EAAU,CAMxD,OAJI,EAAkB,EACb,CAAE,GAAI,GAAO,OAAQ,gBAAiB,CAGxC,CAAE,GAAI,GAAM,kBAAiB"}
1
+ {"version":3,"file":"_frequency.js","names":[],"sources":["../../../../src/transfer-service/markr/recurring/_frequency.ts"],"sourcesContent":["import type { RecurringFrequency, RecurringFrequencyUnit } from './types';\n\n/**\n * Seconds-per-unit lookup. The \"month\" entry uses 30 days; Markr's `/recurring/quote`\n * returns the server-derived `intervalSeconds`, so this helper is a client-side\n * estimator (used for the picker's \"below-minimum\" greying), not the source of truth.\n */\nconst SECONDS_BY_UNIT: Readonly<Record<RecurringFrequencyUnit, number>> = {\n minute: 60,\n hour: 3600,\n day: 86_400,\n week: 604_800,\n month: 2_592_000,\n};\n\nexport function deriveIntervalSeconds(frequency: RecurringFrequency): number {\n return SECONDS_BY_UNIT[frequency.unit] * frequency.value;\n}\n\nexport type FrequencyValidationResult =\n | { ok: true; intervalSeconds: number }\n | { ok: false; reason: 'below-minimum' | 'invalid-unit' | 'invalid-value' };\n\n/** Server-enforced upper bound on `RecurringFrequency.value` (per Markr API docs). */\nexport const RECURRING_FREQUENCY_VALUE_MAX: number = 365;\n\nexport function validateFrequency(\n frequency: RecurringFrequency,\n minFrequencySeconds: number,\n): FrequencyValidationResult {\n if (!(frequency.unit in SECONDS_BY_UNIT)) {\n return { ok: false, reason: 'invalid-unit' };\n }\n\n // `1 ≤ value ≤ 365` mirrors the server-side bound. Catching it here lets\n // picker UIs surface the error inline instead of waiting for the\n // `/recurring/quote` HTTP round-trip to fail.\n if (!Number.isInteger(frequency.value) || frequency.value < 1 || frequency.value > RECURRING_FREQUENCY_VALUE_MAX) {\n return { ok: false, reason: 'invalid-value' };\n }\n\n const intervalSeconds = deriveIntervalSeconds(frequency);\n\n if (intervalSeconds < minFrequencySeconds) {\n return { ok: false, reason: 'below-minimum' };\n }\n\n return { ok: true, intervalSeconds };\n}\n"],"mappings":"AAOA,MAAM,EAAoE,CACxE,OAAQ,GACR,KAAM,KACN,IAAK,MACL,KAAM,OACN,MAAO,OACR,CAED,SAAgB,EAAsB,EAAuC,CAC3E,OAAO,EAAgB,EAAU,MAAQ,EAAU,MAQrD,MAAa,EAAwC,IAErD,SAAgB,EACd,EACA,EAC2B,CAC3B,GAAI,EAAE,EAAU,QAAQ,GACtB,MAAO,CAAE,GAAI,GAAO,OAAQ,eAAgB,CAM9C,GAAI,CAAC,OAAO,UAAU,EAAU,MAAM,EAAI,EAAU,MAAQ,GAAK,EAAU,MAAA,IACzE,MAAO,CAAE,GAAI,GAAO,OAAQ,gBAAiB,CAG/C,IAAM,EAAkB,EAAsB,EAAU,CAMxD,OAJI,EAAkB,EACb,CAAE,GAAI,GAAO,OAAQ,gBAAiB,CAGxC,CAAE,GAAI,GAAM,kBAAiB"}
@@ -1,2 +1,2 @@
1
- require(`../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../../constants.cjs`),t=require(`../../../errors.cjs`),n=require(`../../../utils/caip.cjs`),r=require(`../../_utils.cjs`),i=require(`../../_evm-errors.cjs`),a=require(`../../_evm-approval.cjs`),o=require(`../_api.cjs`),s=require(`../_utils.cjs`),c=require(`./_api.cjs`),l=require(`./_eligibility.cjs`);let u=require(`viem`);function d({apiOptions:e,appId:t,evmSigner:n,recurringChainInfo:r}){return{quote:n=>c.markrRecurringQuote(e,{...n,appId:t}),executeFirstFill:r=>f({...r,apiOptions:e,appId:t,evmSigner:n}),listOrders:t=>c.markrListRecurringOrders(e,t),executeCancellation:t=>p({...t,action:`cancel`,apiOptions:e,evmSigner:n,fetchCalldata:c.markrPrepareCancellation}),executePause:t=>p({...t,action:`pause`,apiOptions:e,evmSigner:n,fetchCalldata:c.markrPreparePause}),executeUnpause:t=>p({...t,action:`unpause`,apiOptions:e,evmSigner:n,fetchCalldata:c.markrPrepareUnpause}),checkEligibility:e=>l.checkRecurringEligibility({...e,recurringChainInfo:r}),getRecurringChainInfo:()=>r}}async function f({apiOptions:l,appId:u,evmSigner:d,fallbackToDefaultOnBatchFailure:f,fromAddress:p,gasSettings:h,quote:g,sourceChain:_}){let v=Math.floor(Date.now()/1e3);if(g.expiredAt<=v){let e=v-g.expiredAt;throw new t.InvalidParamsError(t.ErrorReason.QUOTE_EXPIRED,`Recurring quote expired ${e} seconds ago.`)}let y=n.caip2ToEip155ChainId(_.chainId);if(y!==g.chainId)throw new t.InvalidParamsError(`sourceChain does not match quote.chainId`,`sourceChain.chainId=${_.chainId} resolves to ${y}, but quote.chainId=${g.chainId}.`);let b=r.getEvmClientForChain({chain:_}),x=n.caip2ToEip155HexChainId(_.chainId),{address:S}=await o.markrGetSpenderAddress(l,{chainId:g.chainId,crossChainSwap:!1,quoteId:g.uuid});if(!S)throw new t.SdkError(t.ErrorReason.CHAIN_NOT_SUPPORTED,t.ErrorCode.INVALID_PARAMS,{details:`Missing Markr spender address for source chain ${_.chainId}.`});let C=await a.buildErc20ApprovalRequest({chainIdHex:x,client:b,gasSettings:h,owner:p,requiredAllowance:g.totalAmountIn,spender:S,token:g.tokenIn}),w=m({fromAddress:p,quote:g,sourceChain:_}),T=await c.markrRecurringSwap(l,{uuid:g.uuid,appId:u});if(C!==void 0&&typeof d.signBatch==`function`){let n={currentSignature:1,currentSignatureReason:e.TransferSignatureReason.TokensTransfer,quote:w,requiredSignatures:1},i={chainId:x,data:T.data,from:p,gas:void 0,to:T.to,value:T.value,...r.maybe1559(h)};try{let e=(await d.signBatch([C,i],e=>b.sendRawTransaction({serializedTransaction:e}),n)).at(-1);if(!e)throw new t.SdkError(`One-click batch signing returned no transaction hashes.`,t.ErrorCode.SIGNING_FAILED);return{txHash:e}}catch(e){if(!f)throw e}}C&&await a.signApprovalAndAssertConfirmed({client:b,evmSigner:d,request:C,step:{currentSignature:1,currentSignatureReason:e.TransferSignatureReason.AllowanceApproval,quote:w,requiredSignatures:2}});let E=await s.getMarkrSwapWrapperAbi(!1),D=await i.estimateGasWithRevert(b,{account:p,to:T.to,data:T.data,value:T.value},E,`Failed to estimate gas for recurring first-fill swap transaction.`),O={chainId:x,data:T.data,from:p,gas:r.applyFeeUnitsBpsMargin(D,h?.estimateGasMarginBps),to:T.to,value:T.value,...r.maybe1559(h)},k={currentSignature:C?2:1,currentSignatureReason:e.TransferSignatureReason.TokensTransfer,quote:w,requiredSignatures:C?2:1};return{txHash:await d.sign(O,e=>b.sendRawTransaction({serializedTransaction:e}),k)}}async function p({action:t,address:a,apiOptions:o,evmSigner:s,fetchCalldata:c,gasSettings:l,orderId:d,sourceChain:f}){let p=r.getEvmClientForChain({chain:f}),m=n.caip2ToEip155ChainId(f.chainId),g=n.caip2ToEip155HexChainId(f.chainId),_=await c(o,{orderId:d,address:a,chainId:m}),v=await i.estimateGasWithRevert(p,{account:a,to:_.to,data:_.data,value:_.value},u.erc20Abi,`Failed to estimate gas for recurring ${t} transaction.`),y={chainId:g,data:_.data,from:a,gas:r.applyFeeUnitsBpsMargin(v,l?.estimateGasMarginBps),to:_.to,value:_.value,...r.maybe1559(l)},b={currentSignature:1,currentSignatureReason:e.TransferSignatureReason.TokensTransfer,quote:h({address:a,action:t,orderId:d,sourceChain:f}),requiredSignatures:1};return{txHash:await s.sign(y,e=>p.sendRawTransaction({serializedTransaction:e}),b)}}function m({fromAddress:t,quote:n,sourceChain:r}){return{aggregator:{id:`markr-recurring`,name:`Markr Recurring`},amountIn:n.amount,amountOut:n.amountOut,assetIn:{type:e.TokenType.ERC20,address:n.tokenIn,name:``,symbol:``,decimals:0},assetOut:{type:e.TokenType.ERC20,address:n.tokenOut,name:``,symbol:``,decimals:0},expiresAt:n.expiredAt,fees:[],fromAddress:t,id:n.uuid,partnerFeeBps:null,serviceType:e.ServiceType.MARKR,slippageBps:n.recommendedSlippage,sourceChain:r,targetChain:r,toAddress:t}}function h({action:t,address:n,orderId:r,sourceChain:i}){return{aggregator:{id:`markr-recurring-${t}`,name:`Markr Recurring (${t})`},amountIn:0n,amountOut:0n,assetIn:g(),assetOut:g(),expiresAt:0,fees:[],fromAddress:n,id:r,partnerFeeBps:null,serviceType:e.ServiceType.MARKR,slippageBps:0,sourceChain:i,targetChain:i,toAddress:n}}function g(){return{type:e.TokenType.NATIVE,name:``,symbol:``,decimals:0}}exports.createRecurringNamespace=d;
1
+ require(`../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../../constants.cjs`),t=require(`../../../errors.cjs`),n=require(`../../../utils/caip.cjs`),r=require(`../../_utils.cjs`),i=require(`../../_evm-errors.cjs`),a=require(`../../_evm-approval.cjs`),o=require(`../_api.cjs`),s=require(`../_utils.cjs`),c=require(`./_api.cjs`),l=require(`./_eligibility.cjs`);let u=require(`viem`);function d({apiOptions:t,appId:n,evmSigner:r,recurringChainInfo:i}){return{quote:e=>c.markrRecurringQuote(t,{...e,appId:n}),executeFirstFill:e=>f({...e,apiOptions:t,appId:n,evmSigner:r}),listOrders:e=>c.markrListRecurringOrders(t,e),executeCancellation:n=>m({...n,signatureReason:e.TransferSignatureReason.CancelRecurringSwap,apiOptions:t,evmSigner:r,fetchCalldata:c.markrPrepareCancellation}),executePause:n=>m({...n,signatureReason:e.TransferSignatureReason.PauseRecurringSwap,apiOptions:t,evmSigner:r,fetchCalldata:c.markrPreparePause}),executeUnpause:n=>m({...n,signatureReason:e.TransferSignatureReason.ResumeRecurringSwap,apiOptions:t,evmSigner:r,fetchCalldata:c.markrPrepareUnpause}),checkEligibility:e=>l.checkRecurringEligibility({...e,recurringChainInfo:i}),getRecurringChainInfo:()=>i}}async function f({apiOptions:l,appId:u,evmSigner:d,fallbackToDefaultOnBatchFailure:f,fromAddress:p,gasSettings:m,quote:g,signerContext:_,sourceChain:v}){let y=Math.floor(Date.now()/1e3);if(g.expiredAt<=y){let e=y-g.expiredAt;throw new t.InvalidParamsError(t.ErrorReason.QUOTE_EXPIRED,`Recurring quote expired ${e} seconds ago.`)}let b=n.caip2ToEip155ChainId(v.chainId);if(b!==g.chainId)throw new t.InvalidParamsError(`sourceChain does not match quote.chainId`,`sourceChain.chainId=${v.chainId} resolves to ${b}, but quote.chainId=${g.chainId}.`);let x=r.getEvmClientForChain({chain:v}),S=n.caip2ToEip155HexChainId(v.chainId),{address:C}=await o.markrGetSpenderAddress(l,{chainId:g.chainId,crossChainSwap:!1,quoteId:g.uuid});if(!C)throw new t.SdkError(t.ErrorReason.CHAIN_NOT_SUPPORTED,t.ErrorCode.INVALID_PARAMS,{details:`Missing Markr spender address for source chain ${v.chainId}.`});let w=await a.buildErc20ApprovalRequest({chainIdHex:S,client:x,gasSettings:m,owner:p,requiredAllowance:g.totalAmountIn,spender:C,token:g.tokenIn}),T=h({fromAddress:p,quote:g,sourceChain:v}),E=await c.markrRecurringSwap(l,{uuid:g.uuid,appId:u});if(w!==void 0&&typeof d.signBatch==`function`){let n={currentSignature:1,currentSignatureReason:e.TransferSignatureReason.ScheduleRecurringSwap,quote:T,requiredSignatures:1,signerContext:_},i={chainId:S,data:E.data,from:p,gas:void 0,to:E.to,value:E.value,...r.maybe1559(m)};try{let e=(await d.signBatch([w,i],e=>x.sendRawTransaction({serializedTransaction:e}),n)).at(-1);if(!e)throw new t.SdkError(`One-click batch signing returned no transaction hashes.`,t.ErrorCode.SIGNING_FAILED);return{txHash:e}}catch(e){if(!f)throw e}}w&&await a.signApprovalAndAssertConfirmed({client:x,evmSigner:d,request:w,step:{currentSignature:1,currentSignatureReason:e.TransferSignatureReason.AllowanceApproval,quote:T,requiredSignatures:2,signerContext:_}});let D=await s.getMarkrSwapWrapperAbi(!1),O=await i.estimateGasWithRevert(x,{account:p,to:E.to,data:E.data,value:E.value},D,`Failed to estimate gas for recurring first-fill swap transaction.`),k={chainId:S,data:E.data,from:p,gas:r.applyFeeUnitsBpsMargin(O,m?.estimateGasMarginBps),to:E.to,value:E.value,...r.maybe1559(m)},A={currentSignature:w?2:1,currentSignatureReason:e.TransferSignatureReason.ScheduleRecurringSwap,quote:T,requiredSignatures:w?2:1,signerContext:_};return{txHash:await d.sign(k,e=>x.sendRawTransaction({serializedTransaction:e}),A)}}const p={[e.TransferSignatureReason.PauseRecurringSwap]:`pause`,[e.TransferSignatureReason.ResumeRecurringSwap]:`resume`,[e.TransferSignatureReason.CancelRecurringSwap]:`cancel`};async function m({signatureReason:e,address:t,apiOptions:a,evmSigner:o,fetchCalldata:s,gasSettings:c,orderId:l,signerContext:d,sourceChain:f}){let m=r.getEvmClientForChain({chain:f}),h=n.caip2ToEip155ChainId(f.chainId),_=n.caip2ToEip155HexChainId(f.chainId),v=await s(a,{orderId:l,address:t,chainId:h}),y=await i.estimateGasWithRevert(m,{account:t,to:v.to,data:v.data,value:v.value},u.erc20Abi,`Failed to estimate gas for recurring ${p[e]} transaction.`),b={chainId:_,data:v.data,from:t,gas:r.applyFeeUnitsBpsMargin(y,c?.estimateGasMarginBps),to:v.to,value:v.value,...r.maybe1559(c)},x={currentSignature:1,currentSignatureReason:e,quote:g({address:t,signatureReason:e,orderId:l,sourceChain:f}),requiredSignatures:1,signerContext:d};return{txHash:await o.sign(b,e=>m.sendRawTransaction({serializedTransaction:e}),x)}}function h({fromAddress:t,quote:n,sourceChain:r}){return{aggregator:{id:`markr-recurring`,name:`Markr recurring`},amountIn:n.amount,amountOut:n.amountOut,assetIn:{type:e.TokenType.ERC20,address:n.tokenIn,name:``,symbol:``,decimals:0},assetOut:{type:e.TokenType.ERC20,address:n.tokenOut,name:``,symbol:``,decimals:0},expiresAt:n.expiredAt,fees:[],fromAddress:t,id:n.uuid,partnerFeeBps:null,serviceType:e.ServiceType.MARKR,slippageBps:n.recommendedSlippage,sourceChain:r,targetChain:r,toAddress:t}}function g({signatureReason:t,address:n,orderId:r,sourceChain:i}){let a=p[t];return{aggregator:{id:`markr-recurring-${a}`,name:`Markr recurring (${a})`},amountIn:0n,amountOut:0n,assetIn:_(),assetOut:_(),expiresAt:0,fees:[],fromAddress:n,id:r,partnerFeeBps:null,serviceType:e.ServiceType.MARKR,slippageBps:0,sourceChain:i,targetChain:i,toAddress:n}}function _(){return{type:e.TokenType.NATIVE,name:``,symbol:``,decimals:0}}exports.createRecurringNamespace=d;
2
2
  //# sourceMappingURL=_namespace.cjs.map