@hyperbridge/sdk 2.3.0 → 2.3.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.
@@ -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 IntentOrderStatusUpdate, t as SelectBidResult, u as ResumeIntentOrderOptions, v as CancelOrderOptions, w as CancelQuote, x as SubmitBidOptions, y as PackedUserOperation, F as FillerBid, B as Bid, z as EstimateFillOrderParams, D as FillOrderEstimate, J as ERC7821Call, K as OrderWithStatus, L as OrderStatus, M as TokenGatewayAssetTeleportedWithStatus, N as TeleportStatus, Q as DecodedOrderPlacedLog, U as DecodedPostRequestEvent, V as DecodedPostResponseEvent } from './IntentGatewayV2-C55Aitcb.cjs';
2
- export { W as AllStatusKey, X as AssetTeleportedResponse, Y as BidStorageEntry, Z as BidSubmissionResult, _ as BlockMetadata, $ as BytesLikeHex, a0 as CancelOptions, a1 as ChainConfig, a2 as ChainConfigData, a3 as Chains, a4 as ConfiguredAssetSymbol, a5 as Deployment, a6 as DispatchGet, a7 as DispatchInfo, a8 as DispatchPost, a9 as ExecuteIntentOrderOptions, aa as ExecutionResult, ab as FillOptions, ac as FillerConfig, ad as GetRequestResponse, ae as GetResponseByRequestIdResponse, af as GetResponseStorageValues, ag as HostParams, ah as HyperClientStatus, ai as IBatchConsensusAndGetResponseMessage, aj as IBatchConsensusAndPostRequestMessage, ak as IConfig, al as IConsensusMessage, am as IGetRequestMessage, an as IGetResponse, ao as IGetResponseMessage, ap as IHyperbridgeConfig, aq as IPostResponse, ar as IRequestMessage, as as ISubstrateConfig, at as ITimeoutPostRequestMessage, au as IntentGatewayABI, av as IntentGatewayParams, aw as IntentOrderStatus, ax as IntentOrderStatusKey, ay as IsmpRequest, az as OrderResponse, aA as OrderStatusMetadata, aB as PaymentInfo, aC as PhantomOrderEvent, aD as PostRequestStatus, aE as RequestBody, aF as RequestCommitment, aG as RequestKind, aH as RequestResponse, aI as RequestStatus, aJ as RequestStatusKey, aK as SelectOptions, aL as SigningAccount, aM as StateMachineId, aN as StateMachineResponse, aO as StorageFacade, aP as TimeoutStatus, aQ as TimeoutStatusKey, aR as TokenGatewayAssetTeleportedResponse, aS as TokenInfo, aT as TokenPrice, aU as TokenPricesResponse, aV as UniswapV4PoolConfigData, aW as chainConfigs, aX as convertCodecToIGetRequest, aY as convertCodecToIProof, aZ as convertIGetRequestToCodec, a_ as convertIProofToCodec, a$ as convertStateIdToStateMachineId, b0 as convertStateMachineEnumToString, b1 as convertStateMachineIdToEnum, b2 as decodeERC7821ExecuteBatch, b3 as decodeUserOpScale, b4 as encodeERC7821ExecuteBatch, b5 as encodeISMPMessage, b6 as encodeUserOpScale, b7 as getChainId, b8 as getConfigByStateMachineId, b9 as getViemChain, ba as hyperbridgeAddress, bb as pharosAtlantic, bc as pharosMainnet, bd as polkadotAssetHubPaseo, be as polkadotHubMainnet, bf as tronChainIds, bg as tronNile } from './IntentGatewayV2-C55Aitcb.cjs';
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 IntentOrderStatusUpdate, t as SelectBidResult, u as ResumeIntentOrderOptions, v as CancelOrderOptions, w as CancelQuote, x as SubmitBidOptions, y as PackedUserOperation, F as FillerBid, B as Bid, z as EstimateFillOrderParams, D as FillOrderEstimate, J as ERC7821Call, K as OrderWithStatus, L as OrderStatus, M as TokenGatewayAssetTeleportedWithStatus, N as TeleportStatus, Q as DecodedOrderPlacedLog, U as DecodedPostRequestEvent, V as DecodedPostResponseEvent } from './IntentGatewayV2-SB851bZs.cjs';
2
+ export { W as AllStatusKey, X as AssetTeleportedResponse, Y as BidStorageEntry, Z as BidSubmissionResult, _ as BlockMetadata, $ as BytesLikeHex, a0 as CancelOptions, a1 as ChainConfig, a2 as ChainConfigData, a3 as Chains, a4 as ConfiguredAssetSymbol, a5 as Deployment, a6 as DispatchGet, a7 as DispatchInfo, a8 as DispatchPost, a9 as ExecuteIntentOrderOptions, aa as ExecutionResult, ab as FillOptions, ac as FillerConfig, ad as GetRequestResponse, ae as GetResponseByRequestIdResponse, af as GetResponseStorageValues, ag as HostParams, ah as HyperClientStatus, ai as IBatchConsensusAndGetResponseMessage, aj as IBatchConsensusAndPostRequestMessage, ak as IConfig, al as IConsensusMessage, am as IGetRequestMessage, an as IGetResponse, ao as IGetResponseMessage, ap as IHyperbridgeConfig, aq as IPostResponse, ar as IRequestMessage, as as ISubstrateConfig, at as ITimeoutPostRequestMessage, au as IntentGatewayABI, av as IntentGatewayParams, aw as IntentOrderStatus, ax as IntentOrderStatusKey, ay as IsmpRequest, az as OrderResponse, aA as OrderStatusMetadata, aB as PaymentInfo, aC as PhantomOrderEvent, aD as PostRequestStatus, aE as RequestBody, aF as RequestCommitment, aG as RequestKind, aH as RequestResponse, aI as RequestStatus, aJ as RequestStatusKey, aK as SelectOptions, aL as SigningAccount, aM as StateMachineId, aN as StateMachineResponse, aO as StorageFacade, aP as TimeoutStatus, aQ as TimeoutStatusKey, aR as TokenGatewayAssetTeleportedResponse, aS as TokenInfo, aT as TokenPrice, aU as TokenPricesResponse, aV as UniswapV4PoolConfigData, aW as chainConfigs, aX as convertCodecToIGetRequest, aY as convertCodecToIProof, aZ as convertIGetRequestToCodec, a_ as convertIProofToCodec, a$ as convertStateIdToStateMachineId, b0 as convertStateMachineEnumToString, b1 as convertStateMachineIdToEnum, b2 as decodeERC7821ExecuteBatch, b3 as decodeUserOpScale, b4 as encodeERC7821ExecuteBatch, b5 as encodeISMPMessage, b6 as encodeUserOpScale, b7 as getChainId, b8 as getConfigByStateMachineId, b9 as getViemChain, ba as hyperbridgeAddress, bb as pharosAtlantic, bc as pharosMainnet, bd as polkadotAssetHubPaseo, be as polkadotHubMainnet, bf as tronChainIds, bg as tronNile } from './IntentGatewayV2-SB851bZs.cjs';
3
3
  import { ConsolaInstance } from 'consola';
4
4
  import { GraphQLClient } from 'graphql-request';
5
5
  import { PublicClient, TransactionReceipt, Hex, Address } from 'viem';
@@ -113,9 +113,16 @@ declare class EvmChain implements IChain {
113
113
  queryProof(message: IMessage, counterparty: string, at?: bigint): Promise<HexString>;
114
114
  /**
115
115
  * Query and return the encoded storage proof for the provided keys at the given height.
116
+ *
117
+ * Keys may be either:
118
+ * - 32-byte storage slots — read from `address` (or the host contract when omitted), or
119
+ * - 52-byte cross-chain GET keys encoded as `address(20) || slot(32)`, where the target
120
+ * contract is embedded in the key. These may span multiple contracts.
121
+ *
116
122
  * @param {bigint} at - The block height at which to query the storage proof.
117
123
  * @param {HexString[]} keys - The keys for which to query the storage proof.
118
- * @param {HexString} address - Optional contract address to fetch storage proof else default to host contract
124
+ * @param {HexString} address - Optional contract address; forces all keys to be read as slots
125
+ * of this contract. Omit to let 52-byte keys carry their own contract address.
119
126
  * @returns {Promise<HexString>} The encoded storage proof.
120
127
  */
121
128
  queryStateProof(at: bigint, keys: HexString[], address?: HexString): Promise<HexString>;
@@ -826,6 +833,20 @@ declare class GetRequestClient {
826
833
  */
827
834
  getRequestStatusStream(hash: HexString): AsyncGenerator<RequestStatusWithMetadata, void>;
828
835
  private streamInternal;
836
+ /**
837
+ * Self-delivers a GET request to Hyperbridge — the request→Hyperbridge hop that would
838
+ * otherwise require an external relayer.
839
+ *
840
+ * Mirrors the relayer path (and {@link OrderCanceller}): prove the request commitment on
841
+ * the source chain at the Hyperbridge-finalized source height, prove the requested keys on
842
+ * the destination chain at the request's height, wait out the source challenge period, then
843
+ * submit an unsigned `GetRequest` message. Source and destination may each be EVM or
844
+ * substrate — proofs are built via the chain-agnostic {@link IChain} methods.
845
+ *
846
+ * Idempotent: returns early if Hyperbridge already holds the response receipt. The caller
847
+ * wraps this best-effort, so a failure leaves the stream observing as before.
848
+ */
849
+ private deliverToHyperbridge;
829
850
  /**
830
851
  * Snapshot helper: returns the `HYPERBRIDGE_FINALIZED` event with source-chain
831
852
  * calldata if prerequisites are met, or `undefined` if we're still waiting
@@ -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 IntentOrderStatusUpdate, t as SelectBidResult, u as ResumeIntentOrderOptions, v as CancelOrderOptions, w as CancelQuote, x as SubmitBidOptions, y as PackedUserOperation, F as FillerBid, B as Bid, z as EstimateFillOrderParams, D as FillOrderEstimate, J as ERC7821Call, K as OrderWithStatus, L as OrderStatus, M as TokenGatewayAssetTeleportedWithStatus, N as TeleportStatus, Q as DecodedOrderPlacedLog, U as DecodedPostRequestEvent, V as DecodedPostResponseEvent } from './IntentGatewayV2-C55Aitcb.js';
2
- export { W as AllStatusKey, X as AssetTeleportedResponse, Y as BidStorageEntry, Z as BidSubmissionResult, _ as BlockMetadata, $ as BytesLikeHex, a0 as CancelOptions, a1 as ChainConfig, a2 as ChainConfigData, a3 as Chains, a4 as ConfiguredAssetSymbol, a5 as Deployment, a6 as DispatchGet, a7 as DispatchInfo, a8 as DispatchPost, a9 as ExecuteIntentOrderOptions, aa as ExecutionResult, ab as FillOptions, ac as FillerConfig, ad as GetRequestResponse, ae as GetResponseByRequestIdResponse, af as GetResponseStorageValues, ag as HostParams, ah as HyperClientStatus, ai as IBatchConsensusAndGetResponseMessage, aj as IBatchConsensusAndPostRequestMessage, ak as IConfig, al as IConsensusMessage, am as IGetRequestMessage, an as IGetResponse, ao as IGetResponseMessage, ap as IHyperbridgeConfig, aq as IPostResponse, ar as IRequestMessage, as as ISubstrateConfig, at as ITimeoutPostRequestMessage, au as IntentGatewayABI, av as IntentGatewayParams, aw as IntentOrderStatus, ax as IntentOrderStatusKey, ay as IsmpRequest, az as OrderResponse, aA as OrderStatusMetadata, aB as PaymentInfo, aC as PhantomOrderEvent, aD as PostRequestStatus, aE as RequestBody, aF as RequestCommitment, aG as RequestKind, aH as RequestResponse, aI as RequestStatus, aJ as RequestStatusKey, aK as SelectOptions, aL as SigningAccount, aM as StateMachineId, aN as StateMachineResponse, aO as StorageFacade, aP as TimeoutStatus, aQ as TimeoutStatusKey, aR as TokenGatewayAssetTeleportedResponse, aS as TokenInfo, aT as TokenPrice, aU as TokenPricesResponse, aV as UniswapV4PoolConfigData, aW as chainConfigs, aX as convertCodecToIGetRequest, aY as convertCodecToIProof, aZ as convertIGetRequestToCodec, a_ as convertIProofToCodec, a$ as convertStateIdToStateMachineId, b0 as convertStateMachineEnumToString, b1 as convertStateMachineIdToEnum, b2 as decodeERC7821ExecuteBatch, b3 as decodeUserOpScale, b4 as encodeERC7821ExecuteBatch, b5 as encodeISMPMessage, b6 as encodeUserOpScale, b7 as getChainId, b8 as getConfigByStateMachineId, b9 as getViemChain, ba as hyperbridgeAddress, bb as pharosAtlantic, bc as pharosMainnet, bd as polkadotAssetHubPaseo, be as polkadotHubMainnet, bf as tronChainIds, bg as tronNile } from './IntentGatewayV2-C55Aitcb.js';
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 IntentOrderStatusUpdate, t as SelectBidResult, u as ResumeIntentOrderOptions, v as CancelOrderOptions, w as CancelQuote, x as SubmitBidOptions, y as PackedUserOperation, F as FillerBid, B as Bid, z as EstimateFillOrderParams, D as FillOrderEstimate, J as ERC7821Call, K as OrderWithStatus, L as OrderStatus, M as TokenGatewayAssetTeleportedWithStatus, N as TeleportStatus, Q as DecodedOrderPlacedLog, U as DecodedPostRequestEvent, V as DecodedPostResponseEvent } from './IntentGatewayV2-SB851bZs.js';
2
+ export { W as AllStatusKey, X as AssetTeleportedResponse, Y as BidStorageEntry, Z as BidSubmissionResult, _ as BlockMetadata, $ as BytesLikeHex, a0 as CancelOptions, a1 as ChainConfig, a2 as ChainConfigData, a3 as Chains, a4 as ConfiguredAssetSymbol, a5 as Deployment, a6 as DispatchGet, a7 as DispatchInfo, a8 as DispatchPost, a9 as ExecuteIntentOrderOptions, aa as ExecutionResult, ab as FillOptions, ac as FillerConfig, ad as GetRequestResponse, ae as GetResponseByRequestIdResponse, af as GetResponseStorageValues, ag as HostParams, ah as HyperClientStatus, ai as IBatchConsensusAndGetResponseMessage, aj as IBatchConsensusAndPostRequestMessage, ak as IConfig, al as IConsensusMessage, am as IGetRequestMessage, an as IGetResponse, ao as IGetResponseMessage, ap as IHyperbridgeConfig, aq as IPostResponse, ar as IRequestMessage, as as ISubstrateConfig, at as ITimeoutPostRequestMessage, au as IntentGatewayABI, av as IntentGatewayParams, aw as IntentOrderStatus, ax as IntentOrderStatusKey, ay as IsmpRequest, az as OrderResponse, aA as OrderStatusMetadata, aB as PaymentInfo, aC as PhantomOrderEvent, aD as PostRequestStatus, aE as RequestBody, aF as RequestCommitment, aG as RequestKind, aH as RequestResponse, aI as RequestStatus, aJ as RequestStatusKey, aK as SelectOptions, aL as SigningAccount, aM as StateMachineId, aN as StateMachineResponse, aO as StorageFacade, aP as TimeoutStatus, aQ as TimeoutStatusKey, aR as TokenGatewayAssetTeleportedResponse, aS as TokenInfo, aT as TokenPrice, aU as TokenPricesResponse, aV as UniswapV4PoolConfigData, aW as chainConfigs, aX as convertCodecToIGetRequest, aY as convertCodecToIProof, aZ as convertIGetRequestToCodec, a_ as convertIProofToCodec, a$ as convertStateIdToStateMachineId, b0 as convertStateMachineEnumToString, b1 as convertStateMachineIdToEnum, b2 as decodeERC7821ExecuteBatch, b3 as decodeUserOpScale, b4 as encodeERC7821ExecuteBatch, b5 as encodeISMPMessage, b6 as encodeUserOpScale, b7 as getChainId, b8 as getConfigByStateMachineId, b9 as getViemChain, ba as hyperbridgeAddress, bb as pharosAtlantic, bc as pharosMainnet, bd as polkadotAssetHubPaseo, be as polkadotHubMainnet, bf as tronChainIds, bg as tronNile } from './IntentGatewayV2-SB851bZs.js';
3
3
  import { ConsolaInstance } from 'consola';
4
4
  import { GraphQLClient } from 'graphql-request';
5
5
  import { PublicClient, TransactionReceipt, Hex, Address } from 'viem';
@@ -113,9 +113,16 @@ declare class EvmChain implements IChain {
113
113
  queryProof(message: IMessage, counterparty: string, at?: bigint): Promise<HexString>;
114
114
  /**
115
115
  * Query and return the encoded storage proof for the provided keys at the given height.
116
+ *
117
+ * Keys may be either:
118
+ * - 32-byte storage slots — read from `address` (or the host contract when omitted), or
119
+ * - 52-byte cross-chain GET keys encoded as `address(20) || slot(32)`, where the target
120
+ * contract is embedded in the key. These may span multiple contracts.
121
+ *
116
122
  * @param {bigint} at - The block height at which to query the storage proof.
117
123
  * @param {HexString[]} keys - The keys for which to query the storage proof.
118
- * @param {HexString} address - Optional contract address to fetch storage proof else default to host contract
124
+ * @param {HexString} address - Optional contract address; forces all keys to be read as slots
125
+ * of this contract. Omit to let 52-byte keys carry their own contract address.
119
126
  * @returns {Promise<HexString>} The encoded storage proof.
120
127
  */
121
128
  queryStateProof(at: bigint, keys: HexString[], address?: HexString): Promise<HexString>;
@@ -826,6 +833,20 @@ declare class GetRequestClient {
826
833
  */
827
834
  getRequestStatusStream(hash: HexString): AsyncGenerator<RequestStatusWithMetadata, void>;
828
835
  private streamInternal;
836
+ /**
837
+ * Self-delivers a GET request to Hyperbridge — the request→Hyperbridge hop that would
838
+ * otherwise require an external relayer.
839
+ *
840
+ * Mirrors the relayer path (and {@link OrderCanceller}): prove the request commitment on
841
+ * the source chain at the Hyperbridge-finalized source height, prove the requested keys on
842
+ * the destination chain at the request's height, wait out the source challenge period, then
843
+ * submit an unsigned `GetRequest` message. Source and destination may each be EVM or
844
+ * substrate — proofs are built via the chain-agnostic {@link IChain} methods.
845
+ *
846
+ * Idempotent: returns early if Hyperbridge already holds the response receipt. The caller
847
+ * wraps this best-effort, so a failure leaves the stream observing as before.
848
+ */
849
+ private deliverToHyperbridge;
829
850
  /**
830
851
  * Snapshot helper: returns the `HYPERBRIDGE_FINALIZED` event with source-chain
831
852
  * calldata if prerequisites are met, or `undefined` if we're still waiting