@hyperbridge/sdk 2.8.4 → 2.8.6

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.
@@ -3860,19 +3860,17 @@ interface PackedUserOperation {
3860
3860
  signature: HexString$1;
3861
3861
  }
3862
3862
  interface SigningAccount {
3863
- /** Signs a bid message hash for a given chain. Returns a 65-byte ECDSA signature. */
3864
- signMessage: (messageHash: HexString$1, chainId: number) => Promise<HexString$1>;
3865
- /** Signs a raw 32-byte hash, returning split signature components for EIP-7702 etc. */
3866
- signRawHash: (hash: HexString$1) => Promise<{
3867
- r: HexString$1;
3868
- s: HexString$1;
3869
- yParity: number;
3870
- }>;
3871
3863
  /**
3872
3864
  * Signs an EIP-712 typed-data payload (e.g. an EIP-2612 USDC permit for the Circle Paymaster).
3873
3865
  * The shape of `typedData` matches viem's `TypedDataDefinition` (domain + types + message).
3866
+ *
3867
+ * No chain id parameter: EIP-712 carries it in `domain.chainId`, which is what
3868
+ * the digest covers and what a backend scoping the request to a chain reads.
3869
+ *
3870
+ * Returns the 65-byte `r ‖ s ‖ v` signature as 0x-hex, `v` 27 or 28 — the
3871
+ * `eth_signTypedData_v4` form. Bid validation recovers against exactly this.
3874
3872
  */
3875
- signTypedData: (typedData: unknown, chainId?: number) => Promise<HexString$1>;
3873
+ signTypedData: (typedData: unknown) => Promise<HexString$1>;
3876
3874
  }
3877
3875
  interface SubmitBidOptions {
3878
3876
  order: Order;
@@ -16446,12 +16446,9 @@ var OrderCanceller = class _OrderCanceller {
16446
16446
  static DEFAULT_MAX_RECOVERY_RESTARTS = 1;
16447
16447
  static PROOF_FRESHNESS_MAX_RETRIES = 3;
16448
16448
  static PROOF_FRESHNESS_BACKOFF_MS = 500;
16449
- /**
16450
- * Gas budget used to size the relayer fee for a cross-chain cancellation
16451
- * message (the GET response or RefundEscrow POST executed on the source
16452
- * chain), priced at the source chain's gas price.
16453
- */
16454
- static CANCEL_MESSAGE_GAS = 800000n;
16449
+ /** Gas budgets used to price cancellation delivery on the source chain. */
16450
+ static SOURCE_GET_RESPONSE_GAS = 1000000n;
16451
+ static REFUND_POST_GAS = 1000000n;
16455
16452
  logger = createConsola({
16456
16453
  level: LogLevels.info,
16457
16454
  formatOptions: { columns: 80, colors: true, compact: true, date: false }
@@ -16489,9 +16486,7 @@ var OrderCanceller = class _OrderCanceller {
16489
16486
  return { nativeValue: 0n, relayerFee: 0n };
16490
16487
  }
16491
16488
  const height = order.deadline + 1n;
16492
- const destIntentGateway = this.ctx.dest.configService.getIntentGatewayAddress(
16493
- destStateMachine
16494
- );
16489
+ const destIntentGateway = this.ctx.dest.configService.getIntentGatewayAddress(destStateMachine);
16495
16490
  const slotHash = await this.ctx.dest.client.readContract({
16496
16491
  abi: ABI3,
16497
16492
  address: destIntentGateway,
@@ -16512,7 +16507,7 @@ var OrderCanceller = class _OrderCanceller {
16512
16507
  };
16513
16508
  const feeInSourceFeeToken = await convertGasToFeeToken(
16514
16509
  this.ctx,
16515
- _OrderCanceller.CANCEL_MESSAGE_GAS,
16510
+ _OrderCanceller.SOURCE_GET_RESPONSE_GAS,
16516
16511
  "source",
16517
16512
  sourceStateMachine
16518
16513
  );
@@ -17058,9 +17053,7 @@ var OrderCanceller = class _OrderCanceller {
17058
17053
  return null;
17059
17054
  }
17060
17055
  async removeRecoveryItems(...keys) {
17061
- await Promise.all(
17062
- [...new Set(keys)].map((key) => this.ctx.cancellationStorage.removeItem(key))
17063
- );
17056
+ await Promise.all([...new Set(keys)].map((key) => this.ctx.cancellationStorage.removeItem(key)));
17064
17057
  }
17065
17058
  /**
17066
17059
  * Returns the order identifier required to persist or clear recovery state.
@@ -17108,7 +17101,7 @@ var OrderCanceller = class _OrderCanceller {
17108
17101
  async estimateRelayerFee(sourceChainId, destChainId) {
17109
17102
  const feeInSourceFeeToken = await convertGasToFeeToken(
17110
17103
  this.ctx,
17111
- _OrderCanceller.CANCEL_MESSAGE_GAS,
17104
+ _OrderCanceller.REFUND_POST_GAS,
17112
17105
  "source",
17113
17106
  sourceChainId
17114
17107
  );
@@ -17390,8 +17383,7 @@ var BidManager = class {
17390
17383
  );
17391
17384
  }
17392
17385
  const solverSignature = await solverSigner.signTypedData(
17393
- CryptoUtils.packedUserOpTypedData(userOp, entryPointAddress, chainId),
17394
- Number(chainId)
17386
+ CryptoUtils.packedUserOpTypedData(userOp, entryPointAddress, chainId)
17395
17387
  );
17396
17388
  const signature = concat([order.id, solverSignature]);
17397
17389
  return { ...userOp, signature };