noah-clarity
v0.3.8
Published
TypeScript SDK for Noah-v2 KYC system on Stacks
Maintainers
Readme
Noah-v2 SDK
TypeScript/JavaScript SDK for integrating Noah-v2 KYC system into Stacks protocols.
Installation
npm install noah-clarityUsage
Basic Setup
import { NoahSDK } from 'noah-clarity';
const sdk = new NoahSDK(
{
kycRegistryAddress: 'ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.kyc-registry',
attesterRegistryAddress: 'ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.attester-registry',
network: 'testnet',
},
{
appName: 'Your Protocol',
}
);Check KYC Status
const hasKYC = await sdk.contract.hasKYC(userAddress);
if (hasKYC.hasKYC) {
// User has KYC
}Require KYC for Protocol Access
const isValid = await sdk.contract.isKYCValid(userAddress);
if (!isValid) {
throw new Error('KYC required');
}Examples and integration patterns will be available when the SDK is fully implemented.
