Hinkal Private Payments
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 shielded addresses to facilitate compliant and private transactions.
Each public address has exactly one Hinkal shielded address.
The @requestnetwork/payment-processor
package provides functions to:
Pay a request from a Hinkal shielded address to a public address: such that the payment sender's public address never appears on-chain.
Deposit to a Hinkal shielded 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 shielded address or someone else's shielded address.
Paying a request where the payment recipient address is a Hinkal shielded address is not supported because the Request Network payment proxy smart contracts can only send funds to public addresses. Consider using Declarative Payment instead.
Benefits
Privacy: Obfuscates payer address when paying a request.
Compliance: Ensures transactions adhere to regulatory requirements. See Hinkal Compliance for details
Supported Chains
See Hinkal Supported Chains for a list of chains on which Hinkal Private Payments are supported.
Installation
To use Hinkal Private Payments, install the necessary package:
Usage
Pay a request from a Hinkal shielded address
To pay a request from a Hinkal shielded address to a public address, where only the payment sender's address is obfuscated, use the `payErc20FeeProxyRequestFromHinkalShieldedAddress()`
function. Ensure the payment sender's Hinkal shielded address has a positive balance usingDeposit to a Hinkal shielded 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 shielded address. Revealing the payer and payee identity addresses increases the likelihood of un-shielding the payment sender's address via on-chain analysis.
See Quickstart - Browser for how to instantiate a RequestNetwork
and Signer
Deposit to a Hinkal shielded address
To deposit funds to a Hinkal shielded 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
argumentDeposit to someone else's Hinkal shielded address: set
recipientInfo
to the shielded address of the payment recipient.
Hinkal shielded addresses must be shared out-of-band. This SDK doesn't offer functions for sharing Hinkal shielded addresses.
See Quickstart - Browser for how to instantiate a Signer
Details
For more details, refer to the Pull Request #1482 on GitHub.
Last updated