From 2992c70193f5158c267dfc4f26c37366cae81b0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renaud?= Date: Mon, 22 Dec 2025 13:05:52 +0100 Subject: [PATCH 1/5] use withdrawer alias --- src/messages/v2.2/withdrawal-execution.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/messages/v2.2/withdrawal-execution.ts b/src/messages/v2.2/withdrawal-execution.ts index 1a6423e..e3afd7d 100644 --- a/src/messages/v2.2/withdrawal-execution.ts +++ b/src/messages/v2.2/withdrawal-execution.ts @@ -56,8 +56,7 @@ export type WithdrawalAddressParams = { depositoryChainId: bigint; currency: string; recipientAddress: string; - owner: string; - ownerChainId: string; + withdrawerAlias: string; amount: bigint; withdrawalNonce: string; }; @@ -69,7 +68,7 @@ export type WithdrawalAddressParams = { * @param depositoryChainId the chain id of the depository contract currently holding the funds * @param currency the id of the currency as expressed on origin chain (string) * @param recipientAddress the address that will receive the withdrawn funds on destination chain - * @param owner the address that owns the balance before the withdrawal is initiated + * @param withdrawerAlias the address that owns the balance before the withdrawal is initiated * @param amount the balance to withdraw * @param withdrawalNonce nonce to prevent collisions for similar withdrawals * @returns withdrawal address (in lower case) @@ -97,7 +96,7 @@ export function getWithdrawalAddress( withdrawalParams.depositoryChainId, withdrawalParams.currency, withdrawalParams.recipientAddress as `0x${string}`, - withdrawalParams.owner as `0x${string}`, + withdrawalParams.withdrawerAlias as `0x${string}`, withdrawalParams.amount, nonce, ] From 538e2d310512ba6ad2ec3eecb950c4fac6103651 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renaud?= Date: Mon, 22 Dec 2025 13:06:04 +0100 Subject: [PATCH 2/5] bump package --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 10c9d7d..ae2977c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@reservoir0x/relay-protocol-sdk", - "version": "0.0.63", + "version": "0.0.64", "description": "Relay protocol SDK", "main": "dist/index.js", "types": "dist/index.d.ts", From 5bd2549346b5c6816dc07af0bac34cb4a47430a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renaud?= Date: Mon, 22 Dec 2025 13:07:55 +0100 Subject: [PATCH 3/5] comment --- src/messages/v2.2/withdrawal-execution.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/messages/v2.2/withdrawal-execution.ts b/src/messages/v2.2/withdrawal-execution.ts index e3afd7d..2b8a61b 100644 --- a/src/messages/v2.2/withdrawal-execution.ts +++ b/src/messages/v2.2/withdrawal-execution.ts @@ -68,7 +68,8 @@ export type WithdrawalAddressParams = { * @param depositoryChainId the chain id of the depository contract currently holding the funds * @param currency the id of the currency as expressed on origin chain (string) * @param recipientAddress the address that will receive the withdrawn funds on destination chain - * @param withdrawerAlias the address that owns the balance before the withdrawal is initiated + * @param withdrawerAlias the address that owns the balance on the settlement chain + * before the withdrawal is initiated * @param amount the balance to withdraw * @param withdrawalNonce nonce to prevent collisions for similar withdrawals * @returns withdrawal address (in lower case) From 050714de0ce95ce791f05ed148bccae8a3f2c212 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renaud?= Date: Mon, 22 Dec 2025 13:12:54 +0100 Subject: [PATCH 4/5] fix test --- test/withdrawal-execution.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/withdrawal-execution.test.ts b/test/withdrawal-execution.test.ts index 93f9fde..faf946d 100644 --- a/test/withdrawal-execution.test.ts +++ b/test/withdrawal-execution.test.ts @@ -9,7 +9,7 @@ describe("getWithdrawalAddress", () => { depositoryChainId: 1n, currency: "10340230", recipientAddress: "0x9876543210987654321098765432109876543210", - owner: "0x9876543210987654321098765432109876543210", + withdrawerAlias: "0x9876543210987654321098765432109876543210", amount: 1000n, withdrawalNonce: "haha", }; From cef9eb86f3ea3990c611c728d6faebef83db57f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renaud?= Date: Mon, 22 Dec 2025 13:13:27 +0100 Subject: [PATCH 5/5] precompute test address --- test/withdrawal-execution.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/withdrawal-execution.test.ts b/test/withdrawal-execution.test.ts index faf946d..50f577c 100644 --- a/test/withdrawal-execution.test.ts +++ b/test/withdrawal-execution.test.ts @@ -16,7 +16,7 @@ describe("getWithdrawalAddress", () => { const address = getWithdrawalAddress(params); expect(address).toMatch(/^0x[0-9a-f]{40}$/i); - expect(address).toBeTruthy(); + expect(address).toBe("0xb73fed6628648bfac09347a115ded54ca2bc58d3"); expect(getAddress(address).toLowerCase()).toMatch(address); }); });