@hyperbridge/sdk 2.6.0 → 2.6.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.
- package/dist/browser/index.d.ts +4 -1
- package/dist/browser/index.js +16 -17
- package/dist/browser/index.js.map +1 -1
- package/dist/node/{IntentGatewayV2-DuSwlT02.d.cts → IntentGatewayV2-BJUF1dsr.d.cts} +4 -1
- package/dist/node/{IntentGatewayV2-DuSwlT02.d.ts → IntentGatewayV2-BJUF1dsr.d.ts} +4 -1
- package/dist/node/index.cjs +16 -17
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.d.cts +2 -2
- package/dist/node/index.d.ts +2 -2
- package/dist/node/index.js +16 -17
- package/dist/node/index.js.map +1 -1
- package/dist/node/intents-helpers.d.cts +2 -2
- package/dist/node/intents-helpers.d.ts +2 -2
- package/package.json +1 -1
package/dist/node/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { I as IChain, H as HexString, a as IEvmConfig, C as ChainConfigService, b as IMessage, S as StateMachineIdParams, c as StateMachineHeight, d as IIsmpMessage, e as IPostRequest, f as IGetRequest, O as Order, E as EstimateGasCallData, R as RetryConfig, g as IPolkadotHubConfig, h as IPharosConfig, i as StateMachineUpdate, P as PostRequestWithStatus, G as GetRequestWithStatus, j as ResponseCommitmentWithValues, k as RequestStatusWithMetadata, l as PostRequestTimeoutStatus, m as SubstrateChain, n as ClientConfig, o as IndexerQueryClient, A as AssetTeleported, T as Transaction, p as IProof, q as IEvmChain, r as IntentsCoprocessor, s as AvailableLiquiditySnapshot, t as IntentOrderStatusUpdate, u as SelectBidResult, v as ResumeIntentOrderOptions, w as CancelOrderOptions, x as CancelQuote, y as SubmitBidOptions, z as PackedUserOperation, F as FillerBid, B as Bid, D as EstimateFillOrderParams, J as FillOrderEstimate, K as ERC7821Call, L as OrderWithStatus, M as OrderStatus, N as TokenGatewayAssetTeleportedWithStatus, Q as TeleportStatus, U as DecodedOrderPlacedLog, V as DecodedPostRequestEvent, W as DecodedPostResponseEvent } from './IntentGatewayV2-
|
|
2
|
-
export { X as AllStatusKey, Y as AssetTeleportedResponse, Z as AvailableLiquidityByChain, _ as BidStorageEntry, $ as BidSubmissionResult, a0 as BlockMetadata, a1 as BytesLikeHex, a2 as CancelOptions, a3 as ChainConfig, a4 as ChainConfigData, a5 as Chains, a6 as ConfiguredAssetSymbol, a7 as Deployment, a8 as DispatchGet, a9 as DispatchInfo, aa as DispatchPost, ab as ExecuteIntentOrderOptions, ac as ExecutionResult, ad as FillOptions, ae as FillerConfig, af as GetRequestResponse, ag as GetResponseByRequestIdResponse, ah as GetResponseStorageValues, ai as HostParams, aj as HyperClientStatus, ak as IBatchConsensusAndGetResponseMessage, al as IBatchConsensusAndPostRequestMessage, am as IConfig, an as IConsensusMessage, ao as IGetRequestMessage, ap as IGetResponse, aq as IGetResponseMessage, ar as IHyperbridgeConfig, as as IPostResponse, at as IRequestMessage, au as ISubstrateConfig, av as ITimeoutPostRequestMessage, aw as IntentGatewayABI, ax as IntentGatewayParams, ay as IntentOrderStatus, az as IntentOrderStatusKey, aA as IsmpRequest, aB as OrderResponse, aC as OrderStatusMetadata, aD as PaymentInfo, aE as PhantomOrderEvent, aF as PhantomOrderPriceSnapshot, aG as PhantomOrderPriceSnapshotsResponse, aH as PollPhantomOrdersOptions, aI as PostRequestStatus, aJ as RequestBody, aK as RequestCommitment, aL as RequestKind, aM as RequestResponse, aN as RequestStatus, aO as RequestStatusKey, aP as SelectOptions, aQ as SigningAccount, aR as StateMachineId, aS as StateMachineResponse, aT as StorageFacade, aU as TimeoutStatus, aV as TimeoutStatusKey, aW as TokenGatewayAssetTeleportedResponse, aX as TokenInfo, aY as TokenPrice, aZ as TokenPricesResponse, a_ as UniswapV4PoolConfigData, a$ as chainConfigs, b0 as convertCodecToIGetRequest, b1 as convertCodecToIProof, b2 as convertIGetRequestToCodec, b3 as convertIProofToCodec, b4 as convertStateIdToStateMachineId, b5 as convertStateMachineEnumToString, b6 as convertStateMachineIdToEnum, b7 as decodeERC7821ExecuteBatch, b8 as decodeUserOpScale, b9 as encodeERC7821ExecuteBatch, ba as encodeISMPMessage, bb as encodeUserOpScale, bc as getChainId, bd as getConfigByStateMachineId, be as getViemChain, bf as hyperbridgeAddress, bg as pharosAtlantic, bh as pharosMainnet, bi as polkadotAssetHubPaseo, bj as polkadotHubMainnet, bk as tronChainIds, bl as tronNile } from './IntentGatewayV2-
|
|
1
|
+
import { I as IChain, H as HexString, a as IEvmConfig, C as ChainConfigService, b as IMessage, S as StateMachineIdParams, c as StateMachineHeight, d as IIsmpMessage, e as IPostRequest, f as IGetRequest, O as Order, E as EstimateGasCallData, R as RetryConfig, g as IPolkadotHubConfig, h as IPharosConfig, i as StateMachineUpdate, P as PostRequestWithStatus, G as GetRequestWithStatus, j as ResponseCommitmentWithValues, k as RequestStatusWithMetadata, l as PostRequestTimeoutStatus, m as SubstrateChain, n as ClientConfig, o as IndexerQueryClient, A as AssetTeleported, T as Transaction, p as IProof, q as IEvmChain, r as IntentsCoprocessor, s as AvailableLiquiditySnapshot, t as IntentOrderStatusUpdate, u as SelectBidResult, v as ResumeIntentOrderOptions, w as CancelOrderOptions, x as CancelQuote, y as SubmitBidOptions, z as PackedUserOperation, F as FillerBid, B as Bid, D as EstimateFillOrderParams, J as FillOrderEstimate, K as ERC7821Call, L as OrderWithStatus, M as OrderStatus, N as TokenGatewayAssetTeleportedWithStatus, Q as TeleportStatus, U as DecodedOrderPlacedLog, V as DecodedPostRequestEvent, W as DecodedPostResponseEvent } from './IntentGatewayV2-BJUF1dsr.cjs';
|
|
2
|
+
export { X as AllStatusKey, Y as AssetTeleportedResponse, Z as AvailableLiquidityByChain, _ as BidStorageEntry, $ as BidSubmissionResult, a0 as BlockMetadata, a1 as BytesLikeHex, a2 as CancelOptions, a3 as ChainConfig, a4 as ChainConfigData, a5 as Chains, a6 as ConfiguredAssetSymbol, a7 as Deployment, a8 as DispatchGet, a9 as DispatchInfo, aa as DispatchPost, ab as ExecuteIntentOrderOptions, ac as ExecutionResult, ad as FillOptions, ae as FillerConfig, af as GetRequestResponse, ag as GetResponseByRequestIdResponse, ah as GetResponseStorageValues, ai as HostParams, aj as HyperClientStatus, ak as IBatchConsensusAndGetResponseMessage, al as IBatchConsensusAndPostRequestMessage, am as IConfig, an as IConsensusMessage, ao as IGetRequestMessage, ap as IGetResponse, aq as IGetResponseMessage, ar as IHyperbridgeConfig, as as IPostResponse, at as IRequestMessage, au as ISubstrateConfig, av as ITimeoutPostRequestMessage, aw as IntentGatewayABI, ax as IntentGatewayParams, ay as IntentOrderStatus, az as IntentOrderStatusKey, aA as IsmpRequest, aB as OrderResponse, aC as OrderStatusMetadata, aD as PaymentInfo, aE as PhantomOrderEvent, aF as PhantomOrderPriceSnapshot, aG as PhantomOrderPriceSnapshotsResponse, aH as PollPhantomOrdersOptions, aI as PostRequestStatus, aJ as RequestBody, aK as RequestCommitment, aL as RequestKind, aM as RequestResponse, aN as RequestStatus, aO as RequestStatusKey, aP as SelectOptions, aQ as SigningAccount, aR as StateMachineId, aS as StateMachineResponse, aT as StorageFacade, aU as TimeoutStatus, aV as TimeoutStatusKey, aW as TokenGatewayAssetTeleportedResponse, aX as TokenInfo, aY as TokenPrice, aZ as TokenPricesResponse, a_ as UniswapV4PoolConfigData, a$ as chainConfigs, b0 as convertCodecToIGetRequest, b1 as convertCodecToIProof, b2 as convertIGetRequestToCodec, b3 as convertIProofToCodec, b4 as convertStateIdToStateMachineId, b5 as convertStateMachineEnumToString, b6 as convertStateMachineIdToEnum, b7 as decodeERC7821ExecuteBatch, b8 as decodeUserOpScale, b9 as encodeERC7821ExecuteBatch, ba as encodeISMPMessage, bb as encodeUserOpScale, bc as getChainId, bd as getConfigByStateMachineId, be as getViemChain, bf as hyperbridgeAddress, bg as pharosAtlantic, bh as pharosMainnet, bi as polkadotAssetHubPaseo, bj as polkadotHubMainnet, bk as tronChainIds, bl as tronNile } from './IntentGatewayV2-BJUF1dsr.cjs';
|
|
3
3
|
import { ConsolaInstance } from 'consola';
|
|
4
4
|
import { GraphQLClient } from 'graphql-request';
|
|
5
5
|
import { PublicClient, TransactionReceipt, Hex, Address } from 'viem';
|
package/dist/node/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { I as IChain, H as HexString, a as IEvmConfig, C as ChainConfigService, b as IMessage, S as StateMachineIdParams, c as StateMachineHeight, d as IIsmpMessage, e as IPostRequest, f as IGetRequest, O as Order, E as EstimateGasCallData, R as RetryConfig, g as IPolkadotHubConfig, h as IPharosConfig, i as StateMachineUpdate, P as PostRequestWithStatus, G as GetRequestWithStatus, j as ResponseCommitmentWithValues, k as RequestStatusWithMetadata, l as PostRequestTimeoutStatus, m as SubstrateChain, n as ClientConfig, o as IndexerQueryClient, A as AssetTeleported, T as Transaction, p as IProof, q as IEvmChain, r as IntentsCoprocessor, s as AvailableLiquiditySnapshot, t as IntentOrderStatusUpdate, u as SelectBidResult, v as ResumeIntentOrderOptions, w as CancelOrderOptions, x as CancelQuote, y as SubmitBidOptions, z as PackedUserOperation, F as FillerBid, B as Bid, D as EstimateFillOrderParams, J as FillOrderEstimate, K as ERC7821Call, L as OrderWithStatus, M as OrderStatus, N as TokenGatewayAssetTeleportedWithStatus, Q as TeleportStatus, U as DecodedOrderPlacedLog, V as DecodedPostRequestEvent, W as DecodedPostResponseEvent } from './IntentGatewayV2-
|
|
2
|
-
export { X as AllStatusKey, Y as AssetTeleportedResponse, Z as AvailableLiquidityByChain, _ as BidStorageEntry, $ as BidSubmissionResult, a0 as BlockMetadata, a1 as BytesLikeHex, a2 as CancelOptions, a3 as ChainConfig, a4 as ChainConfigData, a5 as Chains, a6 as ConfiguredAssetSymbol, a7 as Deployment, a8 as DispatchGet, a9 as DispatchInfo, aa as DispatchPost, ab as ExecuteIntentOrderOptions, ac as ExecutionResult, ad as FillOptions, ae as FillerConfig, af as GetRequestResponse, ag as GetResponseByRequestIdResponse, ah as GetResponseStorageValues, ai as HostParams, aj as HyperClientStatus, ak as IBatchConsensusAndGetResponseMessage, al as IBatchConsensusAndPostRequestMessage, am as IConfig, an as IConsensusMessage, ao as IGetRequestMessage, ap as IGetResponse, aq as IGetResponseMessage, ar as IHyperbridgeConfig, as as IPostResponse, at as IRequestMessage, au as ISubstrateConfig, av as ITimeoutPostRequestMessage, aw as IntentGatewayABI, ax as IntentGatewayParams, ay as IntentOrderStatus, az as IntentOrderStatusKey, aA as IsmpRequest, aB as OrderResponse, aC as OrderStatusMetadata, aD as PaymentInfo, aE as PhantomOrderEvent, aF as PhantomOrderPriceSnapshot, aG as PhantomOrderPriceSnapshotsResponse, aH as PollPhantomOrdersOptions, aI as PostRequestStatus, aJ as RequestBody, aK as RequestCommitment, aL as RequestKind, aM as RequestResponse, aN as RequestStatus, aO as RequestStatusKey, aP as SelectOptions, aQ as SigningAccount, aR as StateMachineId, aS as StateMachineResponse, aT as StorageFacade, aU as TimeoutStatus, aV as TimeoutStatusKey, aW as TokenGatewayAssetTeleportedResponse, aX as TokenInfo, aY as TokenPrice, aZ as TokenPricesResponse, a_ as UniswapV4PoolConfigData, a$ as chainConfigs, b0 as convertCodecToIGetRequest, b1 as convertCodecToIProof, b2 as convertIGetRequestToCodec, b3 as convertIProofToCodec, b4 as convertStateIdToStateMachineId, b5 as convertStateMachineEnumToString, b6 as convertStateMachineIdToEnum, b7 as decodeERC7821ExecuteBatch, b8 as decodeUserOpScale, b9 as encodeERC7821ExecuteBatch, ba as encodeISMPMessage, bb as encodeUserOpScale, bc as getChainId, bd as getConfigByStateMachineId, be as getViemChain, bf as hyperbridgeAddress, bg as pharosAtlantic, bh as pharosMainnet, bi as polkadotAssetHubPaseo, bj as polkadotHubMainnet, bk as tronChainIds, bl as tronNile } from './IntentGatewayV2-
|
|
1
|
+
import { I as IChain, H as HexString, a as IEvmConfig, C as ChainConfigService, b as IMessage, S as StateMachineIdParams, c as StateMachineHeight, d as IIsmpMessage, e as IPostRequest, f as IGetRequest, O as Order, E as EstimateGasCallData, R as RetryConfig, g as IPolkadotHubConfig, h as IPharosConfig, i as StateMachineUpdate, P as PostRequestWithStatus, G as GetRequestWithStatus, j as ResponseCommitmentWithValues, k as RequestStatusWithMetadata, l as PostRequestTimeoutStatus, m as SubstrateChain, n as ClientConfig, o as IndexerQueryClient, A as AssetTeleported, T as Transaction, p as IProof, q as IEvmChain, r as IntentsCoprocessor, s as AvailableLiquiditySnapshot, t as IntentOrderStatusUpdate, u as SelectBidResult, v as ResumeIntentOrderOptions, w as CancelOrderOptions, x as CancelQuote, y as SubmitBidOptions, z as PackedUserOperation, F as FillerBid, B as Bid, D as EstimateFillOrderParams, J as FillOrderEstimate, K as ERC7821Call, L as OrderWithStatus, M as OrderStatus, N as TokenGatewayAssetTeleportedWithStatus, Q as TeleportStatus, U as DecodedOrderPlacedLog, V as DecodedPostRequestEvent, W as DecodedPostResponseEvent } from './IntentGatewayV2-BJUF1dsr.js';
|
|
2
|
+
export { X as AllStatusKey, Y as AssetTeleportedResponse, Z as AvailableLiquidityByChain, _ as BidStorageEntry, $ as BidSubmissionResult, a0 as BlockMetadata, a1 as BytesLikeHex, a2 as CancelOptions, a3 as ChainConfig, a4 as ChainConfigData, a5 as Chains, a6 as ConfiguredAssetSymbol, a7 as Deployment, a8 as DispatchGet, a9 as DispatchInfo, aa as DispatchPost, ab as ExecuteIntentOrderOptions, ac as ExecutionResult, ad as FillOptions, ae as FillerConfig, af as GetRequestResponse, ag as GetResponseByRequestIdResponse, ah as GetResponseStorageValues, ai as HostParams, aj as HyperClientStatus, ak as IBatchConsensusAndGetResponseMessage, al as IBatchConsensusAndPostRequestMessage, am as IConfig, an as IConsensusMessage, ao as IGetRequestMessage, ap as IGetResponse, aq as IGetResponseMessage, ar as IHyperbridgeConfig, as as IPostResponse, at as IRequestMessage, au as ISubstrateConfig, av as ITimeoutPostRequestMessage, aw as IntentGatewayABI, ax as IntentGatewayParams, ay as IntentOrderStatus, az as IntentOrderStatusKey, aA as IsmpRequest, aB as OrderResponse, aC as OrderStatusMetadata, aD as PaymentInfo, aE as PhantomOrderEvent, aF as PhantomOrderPriceSnapshot, aG as PhantomOrderPriceSnapshotsResponse, aH as PollPhantomOrdersOptions, aI as PostRequestStatus, aJ as RequestBody, aK as RequestCommitment, aL as RequestKind, aM as RequestResponse, aN as RequestStatus, aO as RequestStatusKey, aP as SelectOptions, aQ as SigningAccount, aR as StateMachineId, aS as StateMachineResponse, aT as StorageFacade, aU as TimeoutStatus, aV as TimeoutStatusKey, aW as TokenGatewayAssetTeleportedResponse, aX as TokenInfo, aY as TokenPrice, aZ as TokenPricesResponse, a_ as UniswapV4PoolConfigData, a$ as chainConfigs, b0 as convertCodecToIGetRequest, b1 as convertCodecToIProof, b2 as convertIGetRequestToCodec, b3 as convertIProofToCodec, b4 as convertStateIdToStateMachineId, b5 as convertStateMachineEnumToString, b6 as convertStateMachineIdToEnum, b7 as decodeERC7821ExecuteBatch, b8 as decodeUserOpScale, b9 as encodeERC7821ExecuteBatch, ba as encodeISMPMessage, bb as encodeUserOpScale, bc as getChainId, bd as getConfigByStateMachineId, be as getViemChain, bf as hyperbridgeAddress, bg as pharosAtlantic, bh as pharosMainnet, bi as polkadotAssetHubPaseo, bj as polkadotHubMainnet, bk as tronChainIds, bl as tronNile } from './IntentGatewayV2-BJUF1dsr.js';
|
|
3
3
|
import { ConsolaInstance } from 'consola';
|
|
4
4
|
import { GraphQLClient } from 'graphql-request';
|
|
5
5
|
import { PublicClient, TransactionReceipt, Hex, Address } from 'viem';
|
package/dist/node/index.js
CHANGED
|
@@ -7391,29 +7391,28 @@ var SubstrateChain = class _SubstrateChain {
|
|
|
7391
7391
|
return BigInt(latestHeight);
|
|
7392
7392
|
}
|
|
7393
7393
|
/**
|
|
7394
|
-
* Get the state machine update time for a given state machine height.
|
|
7394
|
+
* Get the state machine update time for a given state machine height. Reads the
|
|
7395
|
+
* `BoundedStateMachineUpdateTime` map in pallet-ismp directly, so the height is either
|
|
7396
|
+
* still retained on-chain or it has been evicted — there's no intermediate RPC to
|
|
7397
|
+
* reinterpret the absence.
|
|
7395
7398
|
* @param {StateMachineHeight} stateMachineHeight - The state machine height.
|
|
7396
7399
|
* @returns {Promise<bigint>} The statemachine update time in seconds.
|
|
7397
7400
|
*/
|
|
7398
7401
|
async stateMachineUpdateTime(stateMachineHeight) {
|
|
7399
|
-
|
|
7400
|
-
const
|
|
7401
|
-
|
|
7402
|
-
|
|
7403
|
-
|
|
7404
|
-
const payload = {
|
|
7405
|
-
id: stateMachineId,
|
|
7406
|
-
height: Number(stateMachineHeight.height)
|
|
7402
|
+
if (!this.api) throw new Error("API not initialized");
|
|
7403
|
+
const id = {
|
|
7404
|
+
stateId: stateMachineHeight.id.stateId,
|
|
7405
|
+
// on-chain StateMachineId encodes consensusStateId as [u8; 4]
|
|
7406
|
+
consensusStateId: toHex(toBytes(stateMachineHeight.id.consensusStateId))
|
|
7407
7407
|
};
|
|
7408
|
-
|
|
7409
|
-
|
|
7410
|
-
|
|
7411
|
-
|
|
7412
|
-
|
|
7413
|
-
|
|
7414
|
-
}
|
|
7415
|
-
throw error;
|
|
7408
|
+
const updateTime = await this.api.query.ismp.boundedStateMachineUpdateTime(
|
|
7409
|
+
id,
|
|
7410
|
+
Number(stateMachineHeight.height)
|
|
7411
|
+
);
|
|
7412
|
+
if (updateTime.isNone) {
|
|
7413
|
+
throw new MissingConsensusUpdateTimeError(MISSING_CONSENSUS_UPDATE_TIME_MESSAGE);
|
|
7416
7414
|
}
|
|
7415
|
+
return BigInt(updateTime.unwrap().toString());
|
|
7417
7416
|
}
|
|
7418
7417
|
/**
|
|
7419
7418
|
* Get the challenge period for a given state machine id.
|