@relay-protocol/settlement-sdk 0.0.71 → 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
|
|
@@ -35,10 +35,10 @@ export type WithdrawalAddressRequest = Omit<WithdrawalAddressParams, "depository
|
|
|
35
35
|
withdrawer: string;
|
|
36
36
|
withdrawerChainId: string;
|
|
37
37
|
chainId: string;
|
|
38
|
-
amount: string;
|
|
39
38
|
};
|
|
40
39
|
export type WithdrawalInitiationMessage = {
|
|
41
40
|
data: WithdrawalAddressRequest & {
|
|
41
|
+
expectedAmount: string;
|
|
42
42
|
settlementChainId: string;
|
|
43
43
|
signature: string;
|
|
44
44
|
};
|
|
@@ -48,6 +48,7 @@ export type WithdrawalInitiationMessage = {
|
|
|
48
48
|
};
|
|
49
49
|
export type WithdrawalInitiatedMessage = {
|
|
50
50
|
data: WithdrawalAddressRequest & {
|
|
51
|
+
expectedAmount: string;
|
|
51
52
|
settlementChainId: string;
|
|
52
53
|
};
|
|
53
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)(["
|
|
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,
|