@hyperbridge/sdk 1.6.1 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/index.d.ts +87 -2
- package/dist/browser/index.js +84 -12
- package/dist/browser/index.js.map +1 -1
- package/dist/node/index.d.ts +87 -2
- package/dist/node/index.js +84 -12
- package/dist/node/index.js.map +1 -1
- package/package.json +7 -7
package/dist/browser/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ConsolaInstance } from 'consola';
|
|
2
2
|
import { GraphQLClient } from 'graphql-request';
|
|
3
|
+
import * as viem from 'viem';
|
|
3
4
|
import { PublicClient, Hex, Log, ContractFunctionArgs } from 'viem';
|
|
4
5
|
import { ApiPromise } from '@polkadot/api';
|
|
5
6
|
import { KeyringPair } from '@polkadot/keyring/types';
|
|
@@ -626,6 +627,17 @@ declare class ChainConfigService {
|
|
|
626
627
|
getIntentGatewayV2Address(chain: string): HexString;
|
|
627
628
|
getEntryPointV08Address(chain: string): HexString;
|
|
628
629
|
getHyperbridgeAddress(): string;
|
|
630
|
+
/**
|
|
631
|
+
* Get the LayerZero Endpoint ID for the chain
|
|
632
|
+
* Used for USDT0 cross-chain transfers via LayerZero OFT
|
|
633
|
+
*/
|
|
634
|
+
getLayerZeroEid(chain: string): number | undefined;
|
|
635
|
+
/**
|
|
636
|
+
* Get the USDT0 OFT contract address for the chain
|
|
637
|
+
* On Ethereum: OFT Adapter (locks/unlocks USDT)
|
|
638
|
+
* On other chains: OFT contract (mints/burns USDT0)
|
|
639
|
+
*/
|
|
640
|
+
getUsdt0OftAddress(chain: string): HexString | undefined;
|
|
629
641
|
}
|
|
630
642
|
|
|
631
643
|
/**
|
|
@@ -889,6 +901,25 @@ declare const DEFAULT_GRAFFITI: HexString;
|
|
|
889
901
|
* @returns The larger of the two values
|
|
890
902
|
*/
|
|
891
903
|
declare function maxBigInt(a: bigint, b: bigint): bigint;
|
|
904
|
+
/**
|
|
905
|
+
* Converts a state machine ID string to a stateId object.
|
|
906
|
+
* Handles formats like:
|
|
907
|
+
* - "EVM-97" → { Evm: 97 }
|
|
908
|
+
* - "SUBSTRATE-cere" → { Substrate: "0x63657265" } (hex encoded UTF-8 bytes)
|
|
909
|
+
* - "POLKADOT-3367" → { Polkadot: 3367 }
|
|
910
|
+
* - "KUSAMA-123" → { Kusama: 123 }
|
|
911
|
+
*
|
|
912
|
+
* @param stateMachineId The state machine ID string
|
|
913
|
+
* @returns A stateId object conforming to the StateMachineIdParams interface
|
|
914
|
+
*/
|
|
915
|
+
declare function parseStateMachineId(stateMachineId: string): {
|
|
916
|
+
stateId: {
|
|
917
|
+
Evm?: number;
|
|
918
|
+
Substrate?: HexString;
|
|
919
|
+
Polkadot?: number;
|
|
920
|
+
Kusama?: number;
|
|
921
|
+
};
|
|
922
|
+
};
|
|
892
923
|
/**
|
|
893
924
|
* Calculates the commitment hash for a post request.
|
|
894
925
|
* @param post The post request to calculate the commitment hash for.
|
|
@@ -4318,8 +4349,58 @@ declare enum Chains {
|
|
|
4318
4349
|
BASE_MAINNET = "EVM-8453",
|
|
4319
4350
|
POLYGON_MAINNET = "EVM-137",
|
|
4320
4351
|
UNICHAIN_MAINNET = "EVM-130",
|
|
4321
|
-
POLYGON_AMOY = "EVM-80002"
|
|
4352
|
+
POLYGON_AMOY = "EVM-80002",
|
|
4353
|
+
TRON_MAINNET = "EVM-728126428",
|
|
4354
|
+
TRON_NILE = "EVM-3448148188"
|
|
4322
4355
|
}
|
|
4356
|
+
/** Tron Nile Testnet (chain ID 3448148188) — not in viem/chains */
|
|
4357
|
+
declare const tronNile: {
|
|
4358
|
+
blockExplorers: {
|
|
4359
|
+
readonly default: {
|
|
4360
|
+
readonly name: "Nile Tronscan";
|
|
4361
|
+
readonly url: "https://nile.tronscan.org";
|
|
4362
|
+
};
|
|
4363
|
+
};
|
|
4364
|
+
blockTime?: number | undefined | undefined;
|
|
4365
|
+
contracts?: {
|
|
4366
|
+
[x: string]: viem.ChainContract | {
|
|
4367
|
+
[sourceId: number]: viem.ChainContract | undefined;
|
|
4368
|
+
} | undefined;
|
|
4369
|
+
ensRegistry?: viem.ChainContract | undefined;
|
|
4370
|
+
ensUniversalResolver?: viem.ChainContract | undefined;
|
|
4371
|
+
multicall3?: viem.ChainContract | undefined;
|
|
4372
|
+
erc6492Verifier?: viem.ChainContract | undefined;
|
|
4373
|
+
} | undefined;
|
|
4374
|
+
ensTlds?: readonly string[] | undefined;
|
|
4375
|
+
id: 3448148188;
|
|
4376
|
+
name: "TRON Nile Testnet";
|
|
4377
|
+
nativeCurrency: {
|
|
4378
|
+
readonly name: "TRX";
|
|
4379
|
+
readonly symbol: "TRX";
|
|
4380
|
+
readonly decimals: 6;
|
|
4381
|
+
};
|
|
4382
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
4383
|
+
rpcUrls: {
|
|
4384
|
+
readonly default: {
|
|
4385
|
+
readonly http: readonly ["https://nile.trongrid.io/jsonrpc"];
|
|
4386
|
+
};
|
|
4387
|
+
};
|
|
4388
|
+
sourceId?: number | undefined | undefined;
|
|
4389
|
+
testnet?: boolean | undefined | undefined;
|
|
4390
|
+
custom?: Record<string, unknown> | undefined;
|
|
4391
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
4392
|
+
fees?: viem.ChainFees<undefined> | undefined;
|
|
4393
|
+
formatters?: undefined;
|
|
4394
|
+
prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
4395
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
4396
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
4397
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
4398
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
|
|
4399
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
4400
|
+
}] | undefined;
|
|
4401
|
+
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
4402
|
+
verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
|
|
4403
|
+
};
|
|
4323
4404
|
interface ChainConfigData {
|
|
4324
4405
|
chainId: number;
|
|
4325
4406
|
stateMachineId: Chains;
|
|
@@ -4368,12 +4449,16 @@ interface ChainConfigData {
|
|
|
4368
4449
|
Permit2?: `0x${string}`;
|
|
4369
4450
|
/** ERC-4337 v0.8 EntryPoint address (canonical across all EVM chains) */
|
|
4370
4451
|
EntryPointV08?: `0x${string}`;
|
|
4452
|
+
/** USDT0 OFT contract address (OFT Adapter on Ethereum, OFT on other chains) */
|
|
4453
|
+
Usdt0Oft?: `0x${string}`;
|
|
4371
4454
|
};
|
|
4372
4455
|
rpcEnvKey?: string;
|
|
4373
4456
|
defaultRpcUrl?: string;
|
|
4374
4457
|
consensusStateId: string;
|
|
4375
4458
|
coingeckoId: string;
|
|
4376
4459
|
popularTokens?: string[];
|
|
4460
|
+
/** LayerZero Endpoint ID for cross-chain messaging */
|
|
4461
|
+
layerZeroEid?: number;
|
|
4377
4462
|
}
|
|
4378
4463
|
declare const chainConfigs: Record<number, ChainConfigData>;
|
|
4379
4464
|
declare const getConfigByStateMachineId: (id: Chains) => ChainConfigData | undefined;
|
|
@@ -4381,4 +4466,4 @@ declare const getChainId: (stateMachineId: string) => number | undefined;
|
|
|
4381
4466
|
declare const getViemChain: (chainId: number) => Chain | undefined;
|
|
4382
4467
|
declare const hyperbridgeAddress = "";
|
|
4383
4468
|
|
|
4384
|
-
export { ADDRESS_ZERO, type AllStatusKey, type AssetTeleported, type AssetTeleportedResponse, type BidStorageEntry, type BidSubmissionResult, type BlockMetadata, type BundlerGasEstimate, BundlerMethod, type CancelEvent, type CancelEventMap, type CancelOptions, type ChainConfig, type ChainConfigData, ChainConfigService, Chains, type ClientConfig, DEFAULT_ADDRESS, DEFAULT_GRAFFITI, DOMAIN_TYPEHASH, DUMMY_PRIVATE_KEY, type DecodedOrderPlacedLog, type DecodedOrderV2PlacedLog, type DecodedPostRequestEvent, type DecodedPostResponseEvent, type DispatchGet, type DispatchInfoV2, type DispatchPost, ERC20Method, type ERC7821Call, ERC7821_BATCH_MODE, type EstimateFillOrderV2Params, type EstimateGasCallData, EvmChain, type EvmChainParams, EvmLanguage, type ExecuteIntentOrderOptions, type ExecutionResult, type FillOptions, type FillOptionsV2, type FillOrderEstimateV2, type FillerBid, type FillerConfig, type GetRequestResponse, type GetRequestWithStatus, type GetResponseByRequestIdResponse, type GetResponseStorageValues, type HexString, type HostParams, HyperClientStatus, type HyperbridgeTxEvents, type IChain, type IConfig, type IEvmConfig, type IGetRequest, type IGetRequestMessage, type IGetResponse, type IGetResponseMessage, type IHyperbridgeConfig, type IIsmpMessage, type IMessage, type IPostRequest, type IPostResponse, type IProof, type IRequestMessage, type ISubstrateConfig, type ITimeoutPostRequestMessage, IndexerClient, type IndexerQueryClient, IntentGateway, type IntentGatewayParams, IntentGatewayV2, type IntentGatewayV2Params, IntentOrderStatus, type IntentOrderStatusKey, type IntentOrderStatusMetadata, type IntentOrderStatusUpdate, IntentsCoprocessor, type IsmpRequest, MOCK_ADDRESS, type NewDeployment, type Order, type OrderResponse, OrderStatus, type OrderStatusMetadata, type OrderV2, type OrderWithStatus, PACKED_USEROP_TYPEHASH, type PackedUserOperation, type Params, type PaymentInfo, type PaymentInfoV2, type PostRequestStatus, type PostRequestTimeoutStatus, type PostRequestWithStatus, type QuoteNativeResult, REQUEST_COMMITMENTS_SLOT, REQUEST_RECEIPTS_SLOT, RESPONSE_COMMITMENTS_SLOT, RESPONSE_RECEIPTS_SLOT, type RequestBody, type RequestCommitment, RequestKind, type RequestResponse, RequestStatus, type RequestStatusKey, type RequestStatusWithMetadata, type ResponseCommitmentWithValues, type RetryConfig, SELECT_SOLVER_TYPEHASH, STATE_COMMITMENTS_SLOT, type SelectBidResult, type SelectOptions, type StateMachineHeight, type StateMachineIdParams, type StateMachineResponse, type StateMachineUpdate, type StorageFacade, type SubmitBidOptions, SubstrateChain, TESTNET_CHAINS, type TeleportParams, TeleportStatus, TimeoutStatus, type TimeoutStatusKey, TokenGateway, type TokenGatewayAssetTeleportedResponse, type TokenGatewayAssetTeleportedWithStatus, type TokenInfo, type TokenInfoV2, type TokenPrice, type TokenPricesResponse, type TokenRegistry, type TokenRegistryResponse, type Transaction, USE_ETHERSCAN_CHAINS, type XcmGatewayParams, __test, adjustDecimals, bytes20ToBytes32, bytes32ToBytes20, calculateBalanceMappingLocation, chainConfigs, constructRedeemEscrowRequestBody, convertCodecToIGetRequest, convertCodecToIProof, convertIGetRequestToCodec, convertIProofToCodec, convertStateIdToStateMachineId, convertStateMachineEnumToString, convertStateMachineIdToEnum, createChain, createEvmChain, createIndexerClient, createQueryClient, decodeUserOpScale, encodeISMPMessage, encodeUserOpScale, estimateGasForPost, fetchPrice, generateRootWithProof, getChain, getChainId, getConfigByStateMachineId, getContractCallInput, getGasPriceFromEtherscan, getOrderPlacedFromTx, getPostRequestEventFromTx, getPostResponseEventFromTx, getRequestCommitment, getStateCommitmentFieldSlot, getStateCommitmentSlot, getStorageSlot, getViemChain, hexToString, hyperbridgeAddress, maxBigInt, orderCommitment, orderV2Commitment, postRequestCommitment, queryAssetTeleported, queryGetRequest, queryPostRequest, requestCommitmentKey, retryPromise, teleport, teleportDot, transformOrderForContract };
|
|
4469
|
+
export { ADDRESS_ZERO, type AllStatusKey, type AssetTeleported, type AssetTeleportedResponse, type BidStorageEntry, type BidSubmissionResult, type BlockMetadata, type BundlerGasEstimate, BundlerMethod, type CancelEvent, type CancelEventMap, type CancelOptions, type ChainConfig, type ChainConfigData, ChainConfigService, Chains, type ClientConfig, DEFAULT_ADDRESS, DEFAULT_GRAFFITI, DOMAIN_TYPEHASH, DUMMY_PRIVATE_KEY, type DecodedOrderPlacedLog, type DecodedOrderV2PlacedLog, type DecodedPostRequestEvent, type DecodedPostResponseEvent, type DispatchGet, type DispatchInfoV2, type DispatchPost, ERC20Method, type ERC7821Call, ERC7821_BATCH_MODE, type EstimateFillOrderV2Params, type EstimateGasCallData, EvmChain, type EvmChainParams, EvmLanguage, type ExecuteIntentOrderOptions, type ExecutionResult, type FillOptions, type FillOptionsV2, type FillOrderEstimateV2, type FillerBid, type FillerConfig, type GetRequestResponse, type GetRequestWithStatus, type GetResponseByRequestIdResponse, type GetResponseStorageValues, type HexString, type HostParams, HyperClientStatus, type HyperbridgeTxEvents, type IChain, type IConfig, type IEvmConfig, type IGetRequest, type IGetRequestMessage, type IGetResponse, type IGetResponseMessage, type IHyperbridgeConfig, type IIsmpMessage, type IMessage, type IPostRequest, type IPostResponse, type IProof, type IRequestMessage, type ISubstrateConfig, type ITimeoutPostRequestMessage, IndexerClient, type IndexerQueryClient, IntentGateway, type IntentGatewayParams, IntentGatewayV2, type IntentGatewayV2Params, IntentOrderStatus, type IntentOrderStatusKey, type IntentOrderStatusMetadata, type IntentOrderStatusUpdate, IntentsCoprocessor, type IsmpRequest, MOCK_ADDRESS, type NewDeployment, type Order, type OrderResponse, OrderStatus, type OrderStatusMetadata, type OrderV2, type OrderWithStatus, PACKED_USEROP_TYPEHASH, type PackedUserOperation, type Params, type PaymentInfo, type PaymentInfoV2, type PostRequestStatus, type PostRequestTimeoutStatus, type PostRequestWithStatus, type QuoteNativeResult, REQUEST_COMMITMENTS_SLOT, REQUEST_RECEIPTS_SLOT, RESPONSE_COMMITMENTS_SLOT, RESPONSE_RECEIPTS_SLOT, type RequestBody, type RequestCommitment, RequestKind, type RequestResponse, RequestStatus, type RequestStatusKey, type RequestStatusWithMetadata, type ResponseCommitmentWithValues, type RetryConfig, SELECT_SOLVER_TYPEHASH, STATE_COMMITMENTS_SLOT, type SelectBidResult, type SelectOptions, type StateMachineHeight, type StateMachineIdParams, type StateMachineResponse, type StateMachineUpdate, type StorageFacade, type SubmitBidOptions, SubstrateChain, TESTNET_CHAINS, type TeleportParams, TeleportStatus, TimeoutStatus, type TimeoutStatusKey, TokenGateway, type TokenGatewayAssetTeleportedResponse, type TokenGatewayAssetTeleportedWithStatus, type TokenInfo, type TokenInfoV2, type TokenPrice, type TokenPricesResponse, type TokenRegistry, type TokenRegistryResponse, type Transaction, USE_ETHERSCAN_CHAINS, type XcmGatewayParams, __test, adjustDecimals, bytes20ToBytes32, bytes32ToBytes20, calculateBalanceMappingLocation, chainConfigs, constructRedeemEscrowRequestBody, convertCodecToIGetRequest, convertCodecToIProof, convertIGetRequestToCodec, convertIProofToCodec, convertStateIdToStateMachineId, convertStateMachineEnumToString, convertStateMachineIdToEnum, createChain, createEvmChain, createIndexerClient, createQueryClient, decodeUserOpScale, encodeISMPMessage, encodeUserOpScale, estimateGasForPost, fetchPrice, generateRootWithProof, getChain, getChainId, getConfigByStateMachineId, getContractCallInput, getGasPriceFromEtherscan, getOrderPlacedFromTx, getPostRequestEventFromTx, getPostResponseEventFromTx, getRequestCommitment, getStateCommitmentFieldSlot, getStateCommitmentSlot, getStorageSlot, getViemChain, hexToString, hyperbridgeAddress, maxBigInt, orderCommitment, orderV2Commitment, parseStateMachineId, postRequestCommitment, queryAssetTeleported, queryGetRequest, queryPostRequest, requestCommitmentKey, retryPromise, teleport, teleportDot, transformOrderForContract, tronNile };
|
package/dist/browser/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { createConsola, LogLevels } from 'consola';
|
|
2
2
|
import { capitalize, flatten, zip, maxBy, isNil } from 'lodash-es';
|
|
3
|
-
import { keccak256, toHex, encodeFunctionData, parseEventLogs, concatHex, encodeAbiParameters, pad, concat, parseAbiParameters, encodePacked, decodeFunctionData, decodeAbiParameters, formatUnits, maxUint256, parseUnits, erc20Abi, parseAbiItem, hexToBytes, bytesToHex, bytesToBigInt, toBytes, createPublicClient, http, numberToBytes, hexToString as hexToString$1 } from 'viem';
|
|
3
|
+
import { defineChain, keccak256, toHex, encodeFunctionData, parseEventLogs, concatHex, encodeAbiParameters, pad, concat, parseAbiParameters, encodePacked, decodeFunctionData, decodeAbiParameters, formatUnits, maxUint256, parseUnits, erc20Abi, parseAbiItem, hexToBytes, bytesToHex, bytesToBigInt, toBytes, createPublicClient, http, numberToBytes, hexToString as hexToString$1 } from 'viem';
|
|
4
4
|
import mergeRace from '@async-generator/merge-race';
|
|
5
|
-
import { polygonAmoy, unichain, polygon, base, arbitrum, bsc, mainnet, sepolia, gnosisChiado, bscTestnet, gnosis, soneium, baseSepolia, optimismSepolia, optimism, arbitrumSepolia } from 'viem/chains';
|
|
5
|
+
import { polygonAmoy, unichain, polygon, base, arbitrum, bsc, mainnet, sepolia, gnosisChiado, bscTestnet, tron, gnosis, soneium, baseSepolia, optimismSepolia, optimism, arbitrumSepolia } from 'viem/chains';
|
|
6
|
+
import { TronWeb } from 'tronweb';
|
|
6
7
|
import { hasWindow, isNode, env } from 'std-env';
|
|
7
8
|
import { Vector, u8, Struct, Tuple, Enum, _void, u64, u32, Option, Bytes, bool, u128 } from 'scale-ts';
|
|
8
9
|
import { match } from 'ts-pattern';
|
|
@@ -3366,6 +3367,9 @@ var ABI2 = [
|
|
|
3366
3367
|
}
|
|
3367
3368
|
];
|
|
3368
3369
|
var handler_default = { ABI: ABI2 };
|
|
3370
|
+
function tronAddress(base58) {
|
|
3371
|
+
return `0x${TronWeb.address.toHex(base58).slice(2)}`;
|
|
3372
|
+
}
|
|
3369
3373
|
var Chains = /* @__PURE__ */ ((Chains3) => {
|
|
3370
3374
|
Chains3["BSC_CHAPEL"] = "EVM-97";
|
|
3371
3375
|
Chains3["GNOSIS_CHIADO"] = "EVM-10200";
|
|
@@ -3378,8 +3382,21 @@ var Chains = /* @__PURE__ */ ((Chains3) => {
|
|
|
3378
3382
|
Chains3["POLYGON_MAINNET"] = "EVM-137";
|
|
3379
3383
|
Chains3["UNICHAIN_MAINNET"] = "EVM-130";
|
|
3380
3384
|
Chains3["POLYGON_AMOY"] = "EVM-80002";
|
|
3385
|
+
Chains3["TRON_MAINNET"] = "EVM-728126428";
|
|
3386
|
+
Chains3["TRON_NILE"] = "EVM-3448148188";
|
|
3381
3387
|
return Chains3;
|
|
3382
3388
|
})(Chains || {});
|
|
3389
|
+
var tronNile = defineChain({
|
|
3390
|
+
id: 3448148188,
|
|
3391
|
+
name: "TRON Nile Testnet",
|
|
3392
|
+
nativeCurrency: { name: "TRX", symbol: "TRX", decimals: 6 },
|
|
3393
|
+
rpcUrls: {
|
|
3394
|
+
default: { http: ["https://nile.trongrid.io/jsonrpc"] }
|
|
3395
|
+
},
|
|
3396
|
+
blockExplorers: {
|
|
3397
|
+
default: { name: "Nile Tronscan", url: "https://nile.tronscan.org" }
|
|
3398
|
+
}
|
|
3399
|
+
});
|
|
3383
3400
|
var chainConfigs = {
|
|
3384
3401
|
97: {
|
|
3385
3402
|
chainId: 97,
|
|
@@ -3389,7 +3406,7 @@ var chainConfigs = {
|
|
|
3389
3406
|
assets: {
|
|
3390
3407
|
WETH: "0xae13d989dac2f0debff460ac112a837c89baa7cd",
|
|
3391
3408
|
DAI: "0x1938165569a5463327fb206be06d8d9253aa06b7",
|
|
3392
|
-
USDC: "
|
|
3409
|
+
USDC: "0xA801da100bF16D07F668F4A49E1f71fc54D05177",
|
|
3393
3410
|
USDT: "0xc043f483373072f7f27420d6e7d7ad269c018e18"
|
|
3394
3411
|
},
|
|
3395
3412
|
tokenDecimals: {
|
|
@@ -3523,12 +3540,14 @@ var chainConfigs = {
|
|
|
3523
3540
|
UniswapV4Quoter: "0x52f0e24d1c21c8a0cb1e5a5dd6198556bd9e1203",
|
|
3524
3541
|
Calldispatcher: "0xc71251c8b3e7b02697a84363eef6dce8dfbdf333",
|
|
3525
3542
|
Permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
|
|
3526
|
-
EntryPointV08: "0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108"
|
|
3543
|
+
EntryPointV08: "0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108",
|
|
3544
|
+
Usdt0Oft: "0x6C96dE32CEa08842dcc4058c14d3aaAD7Fa41dee"
|
|
3527
3545
|
},
|
|
3528
3546
|
rpcEnvKey: "ETH_MAINNET",
|
|
3529
3547
|
defaultRpcUrl: "https://eth-mainnet.g.alchemy.com/v2/demo",
|
|
3530
3548
|
consensusStateId: "ETH0",
|
|
3531
3549
|
coingeckoId: "ethereum",
|
|
3550
|
+
layerZeroEid: 30101,
|
|
3532
3551
|
popularTokens: [
|
|
3533
3552
|
"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
|
|
3534
3553
|
"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
|
|
@@ -3570,6 +3589,7 @@ var chainConfigs = {
|
|
|
3570
3589
|
Calldispatcher: "0xc71251c8b3e7b02697a84363eef6dce8dfbdf333",
|
|
3571
3590
|
Permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
|
|
3572
3591
|
EntryPointV08: "0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108"
|
|
3592
|
+
// "Usdt0Oft": Not available on BSC
|
|
3573
3593
|
},
|
|
3574
3594
|
rpcEnvKey: "BSC_MAINNET",
|
|
3575
3595
|
defaultRpcUrl: "https://binance.llamarpc.com",
|
|
@@ -3618,12 +3638,14 @@ var chainConfigs = {
|
|
|
3618
3638
|
UniswapV4Quoter: "0x3972c00f7ed4885e145823eb7c655375d275a1c5",
|
|
3619
3639
|
Calldispatcher: "0xc71251c8b3e7b02697a84363eef6dce8dfbdf333",
|
|
3620
3640
|
Permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
|
|
3621
|
-
EntryPointV08: "0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108"
|
|
3641
|
+
EntryPointV08: "0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108",
|
|
3642
|
+
Usdt0Oft: "0x14E4A1B13bf7F943c8ff7C51fb60FA964A298D92"
|
|
3622
3643
|
},
|
|
3623
3644
|
rpcEnvKey: "ARBITRUM_MAINNET",
|
|
3624
3645
|
defaultRpcUrl: "https://arbitrum-one.public.blastapi.io",
|
|
3625
3646
|
consensusStateId: "ETH0",
|
|
3626
3647
|
coingeckoId: "arbitrum-one",
|
|
3648
|
+
layerZeroEid: 30110,
|
|
3627
3649
|
popularTokens: [
|
|
3628
3650
|
"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",
|
|
3629
3651
|
"0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
|
|
@@ -3665,11 +3687,13 @@ var chainConfigs = {
|
|
|
3665
3687
|
Calldispatcher: "0xc71251c8b3e7b02697a84363eef6dce8dfbdf333",
|
|
3666
3688
|
Permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
|
|
3667
3689
|
EntryPointV08: "0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108"
|
|
3690
|
+
// Usdt0Oft: Not available on Base
|
|
3668
3691
|
},
|
|
3669
3692
|
rpcEnvKey: "BASE_MAINNET",
|
|
3670
3693
|
defaultRpcUrl: "https://base-mainnet.public.blastapi.io",
|
|
3671
3694
|
consensusStateId: "ETH0",
|
|
3672
3695
|
coingeckoId: "base",
|
|
3696
|
+
layerZeroEid: 30184,
|
|
3673
3697
|
popularTokens: [
|
|
3674
3698
|
"0x4200000000000000000000000000000000000006",
|
|
3675
3699
|
"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
|
|
@@ -3710,12 +3734,14 @@ var chainConfigs = {
|
|
|
3710
3734
|
UniswapV4Quoter: "0xb3d5c3dfc3a7aebff71895a7191796bffc2c81b9",
|
|
3711
3735
|
Calldispatcher: "0xc71251c8b3e7b02697a84363eef6dce8dfbdf333",
|
|
3712
3736
|
Permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
|
|
3713
|
-
EntryPointV08: "0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108"
|
|
3737
|
+
EntryPointV08: "0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108",
|
|
3738
|
+
Usdt0Oft: "0x6BA10300f0DC58B7a1e4c0e41f5daBb7D7829e13"
|
|
3714
3739
|
},
|
|
3715
3740
|
rpcEnvKey: "POLYGON_MAINNET",
|
|
3716
3741
|
defaultRpcUrl: "https://polygon-bor-rpc.publicnode.com",
|
|
3717
3742
|
consensusStateId: "POLY",
|
|
3718
3743
|
coingeckoId: "polygon-pos",
|
|
3744
|
+
layerZeroEid: 30109,
|
|
3719
3745
|
popularTokens: [
|
|
3720
3746
|
"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",
|
|
3721
3747
|
"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
|
|
@@ -3750,7 +3776,8 @@ var chainConfigs = {
|
|
|
3750
3776
|
UniswapV4Quoter: "0x52f0e24d1c21c8a0cb1e5a5dd6198556bd9e1203",
|
|
3751
3777
|
Calldispatcher: "0xc71251c8b3e7b02697a84363eef6dce8dfbdf333",
|
|
3752
3778
|
Permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
|
|
3753
|
-
EntryPointV08: "0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108"
|
|
3779
|
+
EntryPointV08: "0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108",
|
|
3780
|
+
Usdt0Oft: "0xc07be8994d035631c36fb4a89c918cefb2f03ec3"
|
|
3754
3781
|
},
|
|
3755
3782
|
rpcEnvKey: "UNICHAIN_MAINNET",
|
|
3756
3783
|
defaultRpcUrl: "https://unichain.api.onfinality.io/public",
|
|
@@ -3763,6 +3790,33 @@ var chainConfigs = {
|
|
|
3763
3790
|
"0x0000000000000000000000000000000000000000"
|
|
3764
3791
|
]
|
|
3765
3792
|
},
|
|
3793
|
+
3448148188: {
|
|
3794
|
+
chainId: 3448148188,
|
|
3795
|
+
stateMachineId: "EVM-3448148188" /* TRON_NILE */,
|
|
3796
|
+
viemChain: tronNile,
|
|
3797
|
+
wrappedNativeDecimals: 6,
|
|
3798
|
+
assets: {
|
|
3799
|
+
WETH: "0x0000000000000000000000000000000000000000",
|
|
3800
|
+
// WTRX — TODO: fill in
|
|
3801
|
+
DAI: "0x0000000000000000000000000000000000000000",
|
|
3802
|
+
USDC: tronAddress("TNuoKL1ni8aoshfFL1ASca1Gou9RXwAzfn"),
|
|
3803
|
+
USDT: tronAddress("TXYZopYRdj2D9XRtbG411XZZ3kM5VkAeBf")
|
|
3804
|
+
},
|
|
3805
|
+
tokenDecimals: {
|
|
3806
|
+
USDC: 6,
|
|
3807
|
+
USDT: 6
|
|
3808
|
+
},
|
|
3809
|
+
addresses: {
|
|
3810
|
+
IntentGatewayV2: tronAddress("TT4CjjHw7QgLbE9wKtYEopid1YqePkbAfb"),
|
|
3811
|
+
Host: tronAddress("TNduR7v184pMWv2oTamRxxzsmz7oHrKqJc"),
|
|
3812
|
+
Calldispatcher: tronAddress("TA9XyBPuXL9ecXcLpcFV1g778fzstke2Eh"),
|
|
3813
|
+
UniswapRouter02: tronAddress("TLXGSird23Ww5FZrtbTYisrZNARUmjwmcy")
|
|
3814
|
+
},
|
|
3815
|
+
rpcEnvKey: "TRON_NILE",
|
|
3816
|
+
defaultRpcUrl: "https://nile.trongrid.io/jsonrpc",
|
|
3817
|
+
consensusStateId: "TRON",
|
|
3818
|
+
coingeckoId: "tron"
|
|
3819
|
+
},
|
|
3766
3820
|
80002: {
|
|
3767
3821
|
chainId: 80002,
|
|
3768
3822
|
stateMachineId: "EVM-80002" /* POLYGON_AMOY */,
|
|
@@ -3772,9 +3826,8 @@ var chainConfigs = {
|
|
|
3772
3826
|
WETH: "0x360ad4f9a9A8EFe9A8DCB5f461c4Cc1047E1Dcf9",
|
|
3773
3827
|
//wmatic, change it to wpol
|
|
3774
3828
|
DAI: "0x0000000000000000000000000000000000000000",
|
|
3775
|
-
USDC: "
|
|
3776
|
-
|
|
3777
|
-
USDT: "0x0000000000000000000000000000000000000000"
|
|
3829
|
+
USDC: "0x693b854d6965ffeaae21c74049dea644b56fcacb",
|
|
3830
|
+
USDT: "0x693B854D6965ffEAaE21C74049deA644b56FCaCB"
|
|
3778
3831
|
},
|
|
3779
3832
|
tokenDecimals: {
|
|
3780
3833
|
USDC: 18,
|
|
@@ -3920,6 +3973,21 @@ var ChainConfigService = class {
|
|
|
3920
3973
|
getHyperbridgeAddress() {
|
|
3921
3974
|
return hyperbridgeAddress;
|
|
3922
3975
|
}
|
|
3976
|
+
/**
|
|
3977
|
+
* Get the LayerZero Endpoint ID for the chain
|
|
3978
|
+
* Used for USDT0 cross-chain transfers via LayerZero OFT
|
|
3979
|
+
*/
|
|
3980
|
+
getLayerZeroEid(chain) {
|
|
3981
|
+
return this.getConfig(chain)?.layerZeroEid;
|
|
3982
|
+
}
|
|
3983
|
+
/**
|
|
3984
|
+
* Get the USDT0 OFT contract address for the chain
|
|
3985
|
+
* On Ethereum: OFT Adapter (locks/unlocks USDT)
|
|
3986
|
+
* On other chains: OFT contract (mints/burns USDT0)
|
|
3987
|
+
*/
|
|
3988
|
+
getUsdt0OftAddress(chain) {
|
|
3989
|
+
return this.getConfig(chain)?.addresses.Usdt0Oft;
|
|
3990
|
+
}
|
|
3923
3991
|
};
|
|
3924
3992
|
|
|
3925
3993
|
// src/abis/IntentGatewayV2.ts
|
|
@@ -7175,7 +7243,9 @@ var chains = {
|
|
|
7175
7243
|
[gnosis.id]: gnosis,
|
|
7176
7244
|
[gnosisChiado.id]: gnosisChiado,
|
|
7177
7245
|
[polygon.id]: polygon,
|
|
7178
|
-
[unichain.id]: unichain
|
|
7246
|
+
[unichain.id]: unichain,
|
|
7247
|
+
[tron.id]: tron,
|
|
7248
|
+
[tronNile.id]: tronNile
|
|
7179
7249
|
};
|
|
7180
7250
|
var DEFAULT_ADDRESS = "0x0000000000000000000000000000000000000000";
|
|
7181
7251
|
var EvmChain = class {
|
|
@@ -9259,6 +9329,8 @@ var IndexerClient = class {
|
|
|
9259
9329
|
hyperbridgeDelivered = request.statuses.find((item) => item.status === RequestStatus.HYPERBRIDGE_DELIVERED);
|
|
9260
9330
|
if (!hyperbridgeDelivered) return addFinalityEvents(request);
|
|
9261
9331
|
}
|
|
9332
|
+
const isHyperbridgeTimedOut = request.statuses.some((s) => s.status === TimeoutStatus.HYPERBRIDGE_TIMED_OUT);
|
|
9333
|
+
if (isHyperbridgeTimedOut) return addFinalityEvents(request);
|
|
9262
9334
|
if (request.dest === this.config.hyperbridge.config.stateMachineId) {
|
|
9263
9335
|
return addFinalityEvents(request);
|
|
9264
9336
|
}
|
|
@@ -16864,6 +16936,6 @@ async function teleportDot(param_) {
|
|
|
16864
16936
|
return stream;
|
|
16865
16937
|
}
|
|
16866
16938
|
|
|
16867
|
-
export { ADDRESS_ZERO, BundlerMethod, ChainConfigService, Chains, DEFAULT_ADDRESS, DEFAULT_GRAFFITI, DOMAIN_TYPEHASH, DUMMY_PRIVATE_KEY, ERC20Method, ERC7821_BATCH_MODE, EvmChain, EvmLanguage, HyperClientStatus, IndexerClient, IntentGateway, IntentGatewayV2, IntentOrderStatus, IntentsCoprocessor, MOCK_ADDRESS, OrderStatus, PACKED_USEROP_TYPEHASH, REQUEST_COMMITMENTS_SLOT, REQUEST_RECEIPTS_SLOT, RESPONSE_COMMITMENTS_SLOT, RESPONSE_RECEIPTS_SLOT, RequestKind, RequestStatus, SELECT_SOLVER_TYPEHASH, STATE_COMMITMENTS_SLOT, SubstrateChain, TESTNET_CHAINS, TeleportStatus, TimeoutStatus, TokenGateway, USE_ETHERSCAN_CHAINS, __test, adjustDecimals, bytes20ToBytes32, bytes32ToBytes20, calculateBalanceMappingLocation, chainConfigs, constructRedeemEscrowRequestBody, convertCodecToIGetRequest, convertCodecToIProof, convertIGetRequestToCodec, convertIProofToCodec, convertStateIdToStateMachineId, convertStateMachineEnumToString, convertStateMachineIdToEnum, createChain, createEvmChain, createIndexerClient, createQueryClient, decodeUserOpScale, encodeISMPMessage, encodeUserOpScale, estimateGasForPost, fetchPrice, generateRootWithProof, getChain, getChainId, getConfigByStateMachineId, getContractCallInput, getGasPriceFromEtherscan, getOrderPlacedFromTx, getPostRequestEventFromTx, getPostResponseEventFromTx, getRequestCommitment, getStateCommitmentFieldSlot, getStateCommitmentSlot, getStorageSlot, getViemChain, hexToString, hyperbridgeAddress, maxBigInt, orderCommitment, orderV2Commitment, postRequestCommitment, queryAssetTeleported, queryGetRequest, queryPostRequest, requestCommitmentKey, retryPromise, teleport, teleportDot, transformOrderForContract };
|
|
16939
|
+
export { ADDRESS_ZERO, BundlerMethod, ChainConfigService, Chains, DEFAULT_ADDRESS, DEFAULT_GRAFFITI, DOMAIN_TYPEHASH, DUMMY_PRIVATE_KEY, ERC20Method, ERC7821_BATCH_MODE, EvmChain, EvmLanguage, HyperClientStatus, IndexerClient, IntentGateway, IntentGatewayV2, IntentOrderStatus, IntentsCoprocessor, MOCK_ADDRESS, OrderStatus, PACKED_USEROP_TYPEHASH, REQUEST_COMMITMENTS_SLOT, REQUEST_RECEIPTS_SLOT, RESPONSE_COMMITMENTS_SLOT, RESPONSE_RECEIPTS_SLOT, RequestKind, RequestStatus, SELECT_SOLVER_TYPEHASH, STATE_COMMITMENTS_SLOT, SubstrateChain, TESTNET_CHAINS, TeleportStatus, TimeoutStatus, TokenGateway, USE_ETHERSCAN_CHAINS, __test, adjustDecimals, bytes20ToBytes32, bytes32ToBytes20, calculateBalanceMappingLocation, chainConfigs, constructRedeemEscrowRequestBody, convertCodecToIGetRequest, convertCodecToIProof, convertIGetRequestToCodec, convertIProofToCodec, convertStateIdToStateMachineId, convertStateMachineEnumToString, convertStateMachineIdToEnum, createChain, createEvmChain, createIndexerClient, createQueryClient, decodeUserOpScale, encodeISMPMessage, encodeUserOpScale, estimateGasForPost, fetchPrice, generateRootWithProof, getChain, getChainId, getConfigByStateMachineId, getContractCallInput, getGasPriceFromEtherscan, getOrderPlacedFromTx, getPostRequestEventFromTx, getPostResponseEventFromTx, getRequestCommitment, getStateCommitmentFieldSlot, getStateCommitmentSlot, getStorageSlot, getViemChain, hexToString, hyperbridgeAddress, maxBigInt, orderCommitment, orderV2Commitment, parseStateMachineId, postRequestCommitment, queryAssetTeleported, queryGetRequest, queryPostRequest, requestCommitmentKey, retryPromise, teleport, teleportDot, transformOrderForContract, tronNile };
|
|
16868
16940
|
//# sourceMappingURL=index.js.map
|
|
16869
16941
|
//# sourceMappingURL=index.js.map
|