Skip to main content
This page covers the SDK methods and contract functions used to register, link, and manage user identity data with Newton.

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:
Parameters: 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:
Parameters: Example:

unlinkApp

Removes a user’s identity link from your policy client contract. Signature:
Parameters: 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:
Parameters: The following are the output of the link SDK method.

Sample Policy Client

Your policy client contract must inherit both NewtonPolicyClient 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