@relay-protocol/settlement-sdk 0.0.72 → 0.0.73

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.
@@ -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: {
@@ -36,7 +36,7 @@ exports.getSubmitWithdrawRequestHash = getSubmitWithdrawRequestHash;
36
36
  /**
37
37
  * Compute deterministic withdrawal address
38
38
  *
39
- * @param depository the depository contract holding the funds on origin chain
39
+ * @param depository the depository contract holding the funds on origin chain (as string)
40
40
  * @param depositoryChainId the chain id of the depository contract currently holding the funds
41
41
  * @param currency the id of the currency as expressed on origin chain (string)
42
42
  * @param recipient the address that will receive the withdrawn funds on destination chain
@@ -48,7 +48,7 @@ exports.getSubmitWithdrawRequestHash = getSubmitWithdrawRequestHash;
48
48
  function getWithdrawalAddress(withdrawalParams) {
49
49
  // pack and hash data
50
50
  const nonce = (0, viem_1.keccak256)((0, viem_1.encodePacked)(["string"], [withdrawalParams.withdrawalNonce]));
51
- const hash = (0, viem_1.keccak256)((0, viem_1.encodePacked)(["address", "uint256", "string", "address", "address", "bytes32"], [
51
+ const hash = (0, viem_1.keccak256)((0, viem_1.encodePacked)(["string", "uint256", "string", "address", "address", "bytes32"], [
52
52
  withdrawalParams.depository,
53
53
  withdrawalParams.depositoryChainId,
54
54
  withdrawalParams.currency,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@relay-protocol/settlement-sdk",
3
- "version": "0.0.72",
3
+ "version": "0.0.73",
4
4
  "description": "Relay protocol SDK",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",