The hash input is app-defined — pass whatever parameters the target
dApp needs to bind. The only requirement is that both the commit side
(mobile/CLI) and the verify side (browser/dApp) use the same inputs.
Parameters
buffers: Buffer[]
Returns number[]
Example
// For a swap intent: consthash = computeIntentHash([ jupiterProgramId.toBuffer(), userWallet.toBuffer(), inputMint.toBuffer(), outputMint.toBuffer(), amountIn.toArrayLike(Buffer, 'le', 8), minAmountOut.toArrayLike(Buffer, 'le', 8), ]);
Compute an intent hash using SHA-256.
The hash input is app-defined — pass whatever parameters the target dApp needs to bind. The only requirement is that both the commit side (mobile/CLI) and the verify side (browser/dApp) use the same inputs.