@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/node/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/node/index.js
CHANGED
|
@@ -3,9 +3,10 @@ import { join } from 'path';
|
|
|
3
3
|
import { TextDecoder as TextDecoder$1, TextEncoder as TextEncoder$1 } from 'util';
|
|
4
4
|
import { createConsola, LogLevels } from 'consola';
|
|
5
5
|
import { capitalize, flatten, zip, maxBy, isNil } from 'lodash-es';
|
|
6
|
-
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';
|
|
6
|
+
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';
|
|
7
7
|
import mergeRace from '@async-generator/merge-race';
|
|
8
|
-
import { polygonAmoy, unichain, polygon, base, arbitrum, bsc, mainnet, sepolia, gnosisChiado, bscTestnet, gnosis, soneium, baseSepolia, optimismSepolia, optimism, arbitrumSepolia } from 'viem/chains';
|
|
8
|
+
import { polygonAmoy, unichain, polygon, base, arbitrum, bsc, mainnet, sepolia, gnosisChiado, bscTestnet, tron, gnosis, soneium, baseSepolia, optimismSepolia, optimism, arbitrumSepolia } from 'viem/chains';
|
|
9
|
+
import { TronWeb } from 'tronweb';
|
|
9
10
|
import { hasWindow, isNode, env } from 'std-env';
|
|
10
11
|
import { Vector, u8, Struct, Tuple, Enum, _void, u64, u32, Option, Bytes, bool, u128 } from 'scale-ts';
|
|
11
12
|
import { match } from 'ts-pattern';
|
|
@@ -3316,6 +3317,9 @@ var ABI2 = [
|
|
|
3316
3317
|
}
|
|
3317
3318
|
];
|
|
3318
3319
|
var handler_default = { ABI: ABI2 };
|
|
3320
|
+
function tronAddress(base58) {
|
|
3321
|
+
return `0x${TronWeb.address.toHex(base58).slice(2)}`;
|
|
3322
|
+
}
|
|
3319
3323
|
var Chains = /* @__PURE__ */ ((Chains3) => {
|
|
3320
3324
|
Chains3["BSC_CHAPEL"] = "EVM-97";
|
|
3321
3325
|
Chains3["GNOSIS_CHIADO"] = "EVM-10200";
|
|
@@ -3328,8 +3332,21 @@ var Chains = /* @__PURE__ */ ((Chains3) => {
|
|
|
3328
3332
|
Chains3["POLYGON_MAINNET"] = "EVM-137";
|
|
3329
3333
|
Chains3["UNICHAIN_MAINNET"] = "EVM-130";
|
|
3330
3334
|
Chains3["POLYGON_AMOY"] = "EVM-80002";
|
|
3335
|
+
Chains3["TRON_MAINNET"] = "EVM-728126428";
|
|
3336
|
+
Chains3["TRON_NILE"] = "EVM-3448148188";
|
|
3331
3337
|
return Chains3;
|
|
3332
3338
|
})(Chains || {});
|
|
3339
|
+
var tronNile = defineChain({
|
|
3340
|
+
id: 3448148188,
|
|
3341
|
+
name: "TRON Nile Testnet",
|
|
3342
|
+
nativeCurrency: { name: "TRX", symbol: "TRX", decimals: 6 },
|
|
3343
|
+
rpcUrls: {
|
|
3344
|
+
default: { http: ["https://nile.trongrid.io/jsonrpc"] }
|
|
3345
|
+
},
|
|
3346
|
+
blockExplorers: {
|
|
3347
|
+
default: { name: "Nile Tronscan", url: "https://nile.tronscan.org" }
|
|
3348
|
+
}
|
|
3349
|
+
});
|
|
3333
3350
|
var chainConfigs = {
|
|
3334
3351
|
97: {
|
|
3335
3352
|
chainId: 97,
|
|
@@ -3339,7 +3356,7 @@ var chainConfigs = {
|
|
|
3339
3356
|
assets: {
|
|
3340
3357
|
WETH: "0xae13d989dac2f0debff460ac112a837c89baa7cd",
|
|
3341
3358
|
DAI: "0x1938165569a5463327fb206be06d8d9253aa06b7",
|
|
3342
|
-
USDC: "
|
|
3359
|
+
USDC: "0xA801da100bF16D07F668F4A49E1f71fc54D05177",
|
|
3343
3360
|
USDT: "0xc043f483373072f7f27420d6e7d7ad269c018e18"
|
|
3344
3361
|
},
|
|
3345
3362
|
tokenDecimals: {
|
|
@@ -3473,12 +3490,14 @@ var chainConfigs = {
|
|
|
3473
3490
|
UniswapV4Quoter: "0x52f0e24d1c21c8a0cb1e5a5dd6198556bd9e1203",
|
|
3474
3491
|
Calldispatcher: "0xc71251c8b3e7b02697a84363eef6dce8dfbdf333",
|
|
3475
3492
|
Permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
|
|
3476
|
-
EntryPointV08: "0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108"
|
|
3493
|
+
EntryPointV08: "0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108",
|
|
3494
|
+
Usdt0Oft: "0x6C96dE32CEa08842dcc4058c14d3aaAD7Fa41dee"
|
|
3477
3495
|
},
|
|
3478
3496
|
rpcEnvKey: "ETH_MAINNET",
|
|
3479
3497
|
defaultRpcUrl: "https://eth-mainnet.g.alchemy.com/v2/demo",
|
|
3480
3498
|
consensusStateId: "ETH0",
|
|
3481
3499
|
coingeckoId: "ethereum",
|
|
3500
|
+
layerZeroEid: 30101,
|
|
3482
3501
|
popularTokens: [
|
|
3483
3502
|
"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
|
|
3484
3503
|
"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
|
|
@@ -3520,6 +3539,7 @@ var chainConfigs = {
|
|
|
3520
3539
|
Calldispatcher: "0xc71251c8b3e7b02697a84363eef6dce8dfbdf333",
|
|
3521
3540
|
Permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
|
|
3522
3541
|
EntryPointV08: "0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108"
|
|
3542
|
+
// "Usdt0Oft": Not available on BSC
|
|
3523
3543
|
},
|
|
3524
3544
|
rpcEnvKey: "BSC_MAINNET",
|
|
3525
3545
|
defaultRpcUrl: "https://binance.llamarpc.com",
|
|
@@ -3568,12 +3588,14 @@ var chainConfigs = {
|
|
|
3568
3588
|
UniswapV4Quoter: "0x3972c00f7ed4885e145823eb7c655375d275a1c5",
|
|
3569
3589
|
Calldispatcher: "0xc71251c8b3e7b02697a84363eef6dce8dfbdf333",
|
|
3570
3590
|
Permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
|
|
3571
|
-
EntryPointV08: "0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108"
|
|
3591
|
+
EntryPointV08: "0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108",
|
|
3592
|
+
Usdt0Oft: "0x14E4A1B13bf7F943c8ff7C51fb60FA964A298D92"
|
|
3572
3593
|
},
|
|
3573
3594
|
rpcEnvKey: "ARBITRUM_MAINNET",
|
|
3574
3595
|
defaultRpcUrl: "https://arbitrum-one.public.blastapi.io",
|
|
3575
3596
|
consensusStateId: "ETH0",
|
|
3576
3597
|
coingeckoId: "arbitrum-one",
|
|
3598
|
+
layerZeroEid: 30110,
|
|
3577
3599
|
popularTokens: [
|
|
3578
3600
|
"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",
|
|
3579
3601
|
"0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
|
|
@@ -3615,11 +3637,13 @@ var chainConfigs = {
|
|
|
3615
3637
|
Calldispatcher: "0xc71251c8b3e7b02697a84363eef6dce8dfbdf333",
|
|
3616
3638
|
Permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
|
|
3617
3639
|
EntryPointV08: "0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108"
|
|
3640
|
+
// Usdt0Oft: Not available on Base
|
|
3618
3641
|
},
|
|
3619
3642
|
rpcEnvKey: "BASE_MAINNET",
|
|
3620
3643
|
defaultRpcUrl: "https://base-mainnet.public.blastapi.io",
|
|
3621
3644
|
consensusStateId: "ETH0",
|
|
3622
3645
|
coingeckoId: "base",
|
|
3646
|
+
layerZeroEid: 30184,
|
|
3623
3647
|
popularTokens: [
|
|
3624
3648
|
"0x4200000000000000000000000000000000000006",
|
|
3625
3649
|
"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
|
|
@@ -3660,12 +3684,14 @@ var chainConfigs = {
|
|
|
3660
3684
|
UniswapV4Quoter: "0xb3d5c3dfc3a7aebff71895a7191796bffc2c81b9",
|
|
3661
3685
|
Calldispatcher: "0xc71251c8b3e7b02697a84363eef6dce8dfbdf333",
|
|
3662
3686
|
Permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
|
|
3663
|
-
EntryPointV08: "0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108"
|
|
3687
|
+
EntryPointV08: "0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108",
|
|
3688
|
+
Usdt0Oft: "0x6BA10300f0DC58B7a1e4c0e41f5daBb7D7829e13"
|
|
3664
3689
|
},
|
|
3665
3690
|
rpcEnvKey: "POLYGON_MAINNET",
|
|
3666
3691
|
defaultRpcUrl: "https://polygon-bor-rpc.publicnode.com",
|
|
3667
3692
|
consensusStateId: "POLY",
|
|
3668
3693
|
coingeckoId: "polygon-pos",
|
|
3694
|
+
layerZeroEid: 30109,
|
|
3669
3695
|
popularTokens: [
|
|
3670
3696
|
"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",
|
|
3671
3697
|
"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
|
|
@@ -3700,7 +3726,8 @@ var chainConfigs = {
|
|
|
3700
3726
|
UniswapV4Quoter: "0x52f0e24d1c21c8a0cb1e5a5dd6198556bd9e1203",
|
|
3701
3727
|
Calldispatcher: "0xc71251c8b3e7b02697a84363eef6dce8dfbdf333",
|
|
3702
3728
|
Permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
|
|
3703
|
-
EntryPointV08: "0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108"
|
|
3729
|
+
EntryPointV08: "0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108",
|
|
3730
|
+
Usdt0Oft: "0xc07be8994d035631c36fb4a89c918cefb2f03ec3"
|
|
3704
3731
|
},
|
|
3705
3732
|
rpcEnvKey: "UNICHAIN_MAINNET",
|
|
3706
3733
|
defaultRpcUrl: "https://unichain.api.onfinality.io/public",
|
|
@@ -3713,6 +3740,33 @@ var chainConfigs = {
|
|
|
3713
3740
|
"0x0000000000000000000000000000000000000000"
|
|
3714
3741
|
]
|
|
3715
3742
|
},
|
|
3743
|
+
3448148188: {
|
|
3744
|
+
chainId: 3448148188,
|
|
3745
|
+
stateMachineId: "EVM-3448148188" /* TRON_NILE */,
|
|
3746
|
+
viemChain: tronNile,
|
|
3747
|
+
wrappedNativeDecimals: 6,
|
|
3748
|
+
assets: {
|
|
3749
|
+
WETH: "0x0000000000000000000000000000000000000000",
|
|
3750
|
+
// WTRX — TODO: fill in
|
|
3751
|
+
DAI: "0x0000000000000000000000000000000000000000",
|
|
3752
|
+
USDC: tronAddress("TNuoKL1ni8aoshfFL1ASca1Gou9RXwAzfn"),
|
|
3753
|
+
USDT: tronAddress("TXYZopYRdj2D9XRtbG411XZZ3kM5VkAeBf")
|
|
3754
|
+
},
|
|
3755
|
+
tokenDecimals: {
|
|
3756
|
+
USDC: 6,
|
|
3757
|
+
USDT: 6
|
|
3758
|
+
},
|
|
3759
|
+
addresses: {
|
|
3760
|
+
IntentGatewayV2: tronAddress("TT4CjjHw7QgLbE9wKtYEopid1YqePkbAfb"),
|
|
3761
|
+
Host: tronAddress("TNduR7v184pMWv2oTamRxxzsmz7oHrKqJc"),
|
|
3762
|
+
Calldispatcher: tronAddress("TA9XyBPuXL9ecXcLpcFV1g778fzstke2Eh"),
|
|
3763
|
+
UniswapRouter02: tronAddress("TLXGSird23Ww5FZrtbTYisrZNARUmjwmcy")
|
|
3764
|
+
},
|
|
3765
|
+
rpcEnvKey: "TRON_NILE",
|
|
3766
|
+
defaultRpcUrl: "https://nile.trongrid.io/jsonrpc",
|
|
3767
|
+
consensusStateId: "TRON",
|
|
3768
|
+
coingeckoId: "tron"
|
|
3769
|
+
},
|
|
3716
3770
|
80002: {
|
|
3717
3771
|
chainId: 80002,
|
|
3718
3772
|
stateMachineId: "EVM-80002" /* POLYGON_AMOY */,
|
|
@@ -3722,9 +3776,8 @@ var chainConfigs = {
|
|
|
3722
3776
|
WETH: "0x360ad4f9a9A8EFe9A8DCB5f461c4Cc1047E1Dcf9",
|
|
3723
3777
|
//wmatic, change it to wpol
|
|
3724
3778
|
DAI: "0x0000000000000000000000000000000000000000",
|
|
3725
|
-
USDC: "
|
|
3726
|
-
|
|
3727
|
-
USDT: "0x0000000000000000000000000000000000000000"
|
|
3779
|
+
USDC: "0x693b854d6965ffeaae21c74049dea644b56fcacb",
|
|
3780
|
+
USDT: "0x693B854D6965ffEAaE21C74049deA644b56FCaCB"
|
|
3728
3781
|
},
|
|
3729
3782
|
tokenDecimals: {
|
|
3730
3783
|
USDC: 18,
|
|
@@ -3870,6 +3923,21 @@ var ChainConfigService = class {
|
|
|
3870
3923
|
getHyperbridgeAddress() {
|
|
3871
3924
|
return hyperbridgeAddress;
|
|
3872
3925
|
}
|
|
3926
|
+
/**
|
|
3927
|
+
* Get the LayerZero Endpoint ID for the chain
|
|
3928
|
+
* Used for USDT0 cross-chain transfers via LayerZero OFT
|
|
3929
|
+
*/
|
|
3930
|
+
getLayerZeroEid(chain) {
|
|
3931
|
+
return this.getConfig(chain)?.layerZeroEid;
|
|
3932
|
+
}
|
|
3933
|
+
/**
|
|
3934
|
+
* Get the USDT0 OFT contract address for the chain
|
|
3935
|
+
* On Ethereum: OFT Adapter (locks/unlocks USDT)
|
|
3936
|
+
* On other chains: OFT contract (mints/burns USDT0)
|
|
3937
|
+
*/
|
|
3938
|
+
getUsdt0OftAddress(chain) {
|
|
3939
|
+
return this.getConfig(chain)?.addresses.Usdt0Oft;
|
|
3940
|
+
}
|
|
3873
3941
|
};
|
|
3874
3942
|
|
|
3875
3943
|
// src/abis/IntentGatewayV2.ts
|
|
@@ -7125,7 +7193,9 @@ var chains = {
|
|
|
7125
7193
|
[gnosis.id]: gnosis,
|
|
7126
7194
|
[gnosisChiado.id]: gnosisChiado,
|
|
7127
7195
|
[polygon.id]: polygon,
|
|
7128
|
-
[unichain.id]: unichain
|
|
7196
|
+
[unichain.id]: unichain,
|
|
7197
|
+
[tron.id]: tron,
|
|
7198
|
+
[tronNile.id]: tronNile
|
|
7129
7199
|
};
|
|
7130
7200
|
var DEFAULT_ADDRESS = "0x0000000000000000000000000000000000000000";
|
|
7131
7201
|
var EvmChain = class {
|
|
@@ -9209,6 +9279,8 @@ var IndexerClient = class {
|
|
|
9209
9279
|
hyperbridgeDelivered = request.statuses.find((item) => item.status === RequestStatus.HYPERBRIDGE_DELIVERED);
|
|
9210
9280
|
if (!hyperbridgeDelivered) return addFinalityEvents(request);
|
|
9211
9281
|
}
|
|
9282
|
+
const isHyperbridgeTimedOut = request.statuses.some((s) => s.status === TimeoutStatus.HYPERBRIDGE_TIMED_OUT);
|
|
9283
|
+
if (isHyperbridgeTimedOut) return addFinalityEvents(request);
|
|
9212
9284
|
if (request.dest === this.config.hyperbridge.config.stateMachineId) {
|
|
9213
9285
|
return addFinalityEvents(request);
|
|
9214
9286
|
}
|
|
@@ -16804,6 +16876,6 @@ async function teleportDot(param_) {
|
|
|
16804
16876
|
return stream;
|
|
16805
16877
|
}
|
|
16806
16878
|
|
|
16807
|
-
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 };
|
|
16879
|
+
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 };
|
|
16808
16880
|
//# sourceMappingURL=index.js.map
|
|
16809
16881
|
//# sourceMappingURL=index.js.map
|