Skip to content

Commit 6417bd4

Browse files
committed
SDK Fix
1 parent 9059e81 commit 6417bd4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/services/railgun/operations.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,11 @@ export async function executeShield(
233233
message: 'Please sign the shield message...',
234234
});
235235

236-
// Sign the shield message
237-
const shieldPrivateKey = await signer.signMessage(shieldSignatureMessage);
236+
// Sign the shield message and derive a 32-byte private key
237+
const signature = await signer.signMessage(shieldSignatureMessage);
238+
// Hash the signature to get exactly 32 bytes (64 hex chars without 0x)
239+
// The SDK expects a hex string without "0x" prefix
240+
const shieldPrivateKey = ethers.keccak256(signature).slice(2);
238241

239242
// Get gas estimate
240243
const gasEstimate = await gasEstimateForShield(

0 commit comments

Comments
 (0)