SDK Methods
The following methods are available on the wallet client actions extension (newtonWalletClientActions).
registerUserData
Registers KYC data for a user, scoped to your application’s identity domain. Opens the Newton identity popup to securely store the data.
Signature:
Example:
linkApp
Links a user’s registered identity to your policy client contract. The user must confirm the link in the Newton identity popup, which triggers a signed transaction from their wallet.
Signature:
Example:
unlinkApp
Removes a user’s identity link from your policy client contract.
Signature:
Example:
Contract Functions
linkIdentityAsUser
Called on the IdentityRegistry contract to link a user’s identity to a policy client. This is invoked under the hood when the user confirms the link via linkApp. See Contract Addresses for the IdentityRegistry address.
Signature:
Sample Policy Client
Your policy client contract must inherit bothNewtonPolicyClient and EIP712. Below is a complete example:
After deploying, register this contract with the
PolicyClientRegistry. See Smart Contract Integration for instructions.Next Steps
Identity Policy Reference
Rego built-in functions for writing identity-aware policies
Contract Addresses
IdentityRegistry and other deployed contract addresses