Hinkal Private Payments
Last updated
Was this helpful?
Last updated
Was this helpful?
The Request Network SDK supports Hinkal Private Payments using ERC-20 tokens. Hinkal is a middleware and suite of smart contracts on EVM-compatible chains that leverage zero-knowledge proofs and private addresses to facilitate compliant and private transactions.
Each public address has exactly one Hinkal private address.
The @requestnetwork/payment-processor
package provides functions to:
Pay a request from a Hinkal private address to a public address: such that the payment sender's public address never appears on-chain.
Deposit to a Hinkal private address from a public address: such that the payment recipient's public address never appears on-chain. Callers can choose to deposit to their own private address or someone else's private address.
Privacy: Obfuscates payer address when paying a request.
Compliance: Ensures transactions adhere to regulatory requirements. See for details
See for a list of chains on which Hinkal Private Payments are supported.
To use Hinkal Private Payments, install the necessary package:
To pay a request from a Hinkal private address to a public address, where only the payment sender's address is obfuscated, use the `payErc20FeeProxyRequestFromHinkalShieldedAddress()`
function. Ensure the payment sender's Hinkal private address has a positive balance using Deposit to a Hinkal private address
Strongly consider using Encryption and Decryption to keep the request contents private, including the payer and payee identity addresses, when paying requests from a Hinkal private address. Revealing the payer and payee identity addresses increases the likelihood of un-shielding the payment sender's address via on-chain analysis.
To deposit funds to a Hinkal private address from a public address, where only the payment recipient's address is obfuscated, use the sendToHinkalShieldedAddressFromPublic()
function.
Deposit to own Hinkal shielded address: omit the recipientInfo
argument
Deposit to someone else's Hinkal shielded address: set recipientInfo
to the shielded address of the payment recipient.
As a result, any client-side application integrating the Hinkal SDK must adjust its Content-Security-Policy to allow the wasm-unsafe-eval
directive under the script-src
setting. This configuration ensures that the cryptographic processes can execute properly.
The Hinkal SDK depends on , a powerful library that enables local zero-knowledge proving in browser and Node.js environments. Snarkjs leverages to perform complex cryptographic computations efficiently.
See for more details.
For more details about Hinkal Private Payments, refer to on GitHub.