@relay-protocol/settlement-sdk 0.0.74 → 0.0.75

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/index.d.ts CHANGED
@@ -5,7 +5,7 @@ import { SolverRefundMessage, SolverRefundStatus, getSolverRefundMessageId } fro
5
5
  import { SolverFillMessage, SolverFillStatus, getSolverFillMessageId } from "./messages/v2.1/solver-fill";
6
6
  import { ActionType, ExecutionMessage, ExecutionMessageMetadata, getExecutionMessageId, encodeAction, decodeAction } from "./messages/v2.2/execution";
7
7
  import { VmType, decodeAddress, decodeTransactionId, encodeAddress, encodeBytes, encodeTransactionId, getVmTypeNativeCurrency } from "./utils";
8
- import { SubmitWithdrawRequest, getSubmitWithdrawRequestHash, getWithdrawalAddress, WithdrawalAddressParams, WithdrawalInitiationMessage, WithdrawalInitiatedMessage, WithdrawalAddressRequest, computeWithdrawerBalanceMessage } from "./messages/v2.2/withdrawal-execution";
8
+ import { SubmitWithdrawRequest, getSubmitWithdrawRequestHash, getWithdrawalAddress, WithdrawalAddressParams, WithdrawalInitiationMessage, WithdrawalInitiatedMessage, WithdrawalAddressRequest, computeWithdrawerBalanceMessage, OnChainWithdrawalQuery, OnchainWithdrawalSignatureRequest, OnchainWithdrawalRequest } from "./messages/v2.2/withdrawal-execution";
9
9
  import { TokenIdComponents, VirtualAddressComponents, TokenId, VirtualAddress, getCheckSummedAddress, generateAddress, generateTokenId } from "./hub/hub-utils";
10
10
  import type { NetworkConfig, NetworkConfigs, ProtocolContracts } from "./networks";
11
- export { Order, encodeOrderCall, decodeOrderCall, encodeOrderExtraData, decodeOrderExtraData, getOrderId, VmType, decodeAddress, decodeTransactionId, encodeAddress, encodeBytes, encodeTransactionId, getVmTypeNativeCurrency, DepositoryDepositMessage, getDepositoryDepositMessageId, DecodedBitcoinVmWithdrawal, DecodedEthereumVmWithdrawal, DecodedSolanaVmWithdrawal, DecodedSuiVmWithdrawal, DecodedHyperliquidVmWithdrawal, DepositoryWithdrawalMessage, DepositoryWithdrawalStatus, getDepositoryWithdrawalMessageId, encodeWithdrawal, decodeWithdrawal, getDecodedWithdrawalId, getDecodedWithdrawalCurrency, getDecodedWithdrawalAmount, getDecodedWithdrawalRecipient, SolverRefundMessage, SolverRefundStatus, getSolverRefundMessageId, SolverFillMessage, SolverFillStatus, getSolverFillMessageId, ExecutionMessage, ExecutionMessageMetadata, ActionType, getExecutionMessageId, encodeAction, decodeAction, TokenIdComponents, VirtualAddressComponents, TokenId, VirtualAddress, getCheckSummedAddress, generateAddress, generateTokenId, SubmitWithdrawRequest, getSubmitWithdrawRequestHash, getWithdrawalAddress, WithdrawalAddressParams, WithdrawalInitiationMessage, WithdrawalInitiatedMessage, WithdrawalAddressRequest, computeWithdrawerBalanceMessage, NetworkConfigs, ProtocolContracts, NetworkConfig, };
11
+ export { Order, encodeOrderCall, decodeOrderCall, encodeOrderExtraData, decodeOrderExtraData, getOrderId, VmType, decodeAddress, decodeTransactionId, encodeAddress, encodeBytes, encodeTransactionId, getVmTypeNativeCurrency, DepositoryDepositMessage, getDepositoryDepositMessageId, DecodedBitcoinVmWithdrawal, DecodedEthereumVmWithdrawal, DecodedSolanaVmWithdrawal, DecodedSuiVmWithdrawal, DecodedHyperliquidVmWithdrawal, DepositoryWithdrawalMessage, DepositoryWithdrawalStatus, getDepositoryWithdrawalMessageId, encodeWithdrawal, decodeWithdrawal, getDecodedWithdrawalId, getDecodedWithdrawalCurrency, getDecodedWithdrawalAmount, getDecodedWithdrawalRecipient, SolverRefundMessage, SolverRefundStatus, getSolverRefundMessageId, SolverFillMessage, SolverFillStatus, getSolverFillMessageId, ExecutionMessage, ExecutionMessageMetadata, ActionType, getExecutionMessageId, encodeAction, decodeAction, TokenIdComponents, VirtualAddressComponents, TokenId, VirtualAddress, getCheckSummedAddress, generateAddress, generateTokenId, SubmitWithdrawRequest, getSubmitWithdrawRequestHash, getWithdrawalAddress, WithdrawalAddressParams, WithdrawalInitiationMessage, WithdrawalInitiatedMessage, WithdrawalAddressRequest, computeWithdrawerBalanceMessage, OnChainWithdrawalQuery, OnchainWithdrawalSignatureRequest, OnchainWithdrawalRequest, NetworkConfigs, ProtocolContracts, NetworkConfig, };
@@ -20,7 +20,7 @@ export type WithdrawalAddressParams = {
20
20
  /**
21
21
  * Compute deterministic withdrawal address
22
22
  *
23
- * @param depository the depository contract holding the funds on origin chain
23
+ * @param depository the depository contract holding the funds on origin chain (as string)
24
24
  * @param depositoryChainId the chain id of the depository contract currently holding the funds
25
25
  * @param currency the id of the currency as expressed on origin chain (string)
26
26
  * @param recipient the address that will receive the withdrawn funds on destination chain
@@ -38,6 +38,7 @@ export type WithdrawalAddressRequest = Omit<WithdrawalAddressParams, "depository
38
38
  };
39
39
  export type WithdrawalInitiationMessage = {
40
40
  data: WithdrawalAddressRequest & {
41
+ expectedAmount: string;
41
42
  settlementChainId: string;
42
43
  signature: string;
43
44
  };
@@ -47,6 +48,7 @@ export type WithdrawalInitiationMessage = {
47
48
  };
48
49
  export type WithdrawalInitiatedMessage = {
49
50
  data: WithdrawalAddressRequest & {
51
+ expectedAmount: string;
50
52
  settlementChainId: string;
51
53
  };
52
54
  result: {
@@ -25,7 +25,7 @@ exports.getSubmitWithdrawRequestHash = getSubmitWithdrawRequestHash;
25
25
  /**
26
26
  * Compute deterministic withdrawal address
27
27
  *
28
- * @param depository the depository contract holding the funds on origin chain
28
+ * @param depository the depository contract holding the funds on origin chain (as string)
29
29
  * @param depositoryChainId the chain id of the depository contract currently holding the funds
30
30
  * @param currency the id of the currency as expressed on origin chain (string)
31
31
  * @param recipient the address that will receive the withdrawn funds on destination chain
@@ -37,7 +37,7 @@ exports.getSubmitWithdrawRequestHash = getSubmitWithdrawRequestHash;
37
37
  function getWithdrawalAddress(withdrawalParams) {
38
38
  // pack and hash data
39
39
  const nonce = (0, viem_1.keccak256)((0, viem_1.encodePacked)(["string"], [withdrawalParams.withdrawalNonce]));
40
- const hash = (0, viem_1.keccak256)((0, viem_1.encodePacked)(["address", "uint256", "string", "address", "address", "bytes32"], [
40
+ const hash = (0, viem_1.keccak256)((0, viem_1.encodePacked)(["string", "uint256", "string", "address", "address", "bytes32"], [
41
41
  withdrawalParams.depository,
42
42
  withdrawalParams.depositoryChainId,
43
43
  withdrawalParams.currency,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@relay-protocol/settlement-sdk",
3
- "version": "0.0.74",
3
+ "version": "0.0.75",
4
4
  "description": "Relay protocol SDK",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",