Skip to Content
Provenonce is currently on Solana devnet. APIs may change.
SDK Referenceregister()

register()

Register a new agent on the Provenonce registry.

import { register } from '@provenonce/sdk';

Root registration (default)

const creds = await register('my-agent', { registryUrl: 'https://provenonce.io', registrationSecret: 'xxx', // Required on mainnet }); console.log(creds.hash); // Agent identity console.log(creds.api_key); // For API calls console.log(creds.wallet.secret_key); // SAVE — cannot be recovered console.log(creds.wallet.solana_address); // On-chain identity

Child registration

const childCreds = await register('child-agent', { registryUrl: 'https://provenonce.io', parentHash: parentCreds.hash, parentApiKey: parentCreds.api_key, });

Operator wallet (Model B)

const creds = await register('my-agent', { registryUrl: 'https://provenonce.io', walletModel: 'operator', operatorWalletAddress: 'BASE58_ADDRESS', operatorSignFn: async (message) => hexSignature, });

Options

PropertyTypeDescription
registryUrlstringRegistry URL
parentHashstringParent hash (child registration)
parentApiKeystringParent’s API key (child registration)
registrationSecretstringRegistration gate (mainnet)
walletSecretKeystringBring-your-own Ed25519 seed (hex)
walletModelstring'self-custody' or 'operator'
operatorWalletAddressstringOperator’s Solana address
operatorSignFnfunctionOperator’s signing function
Last updated on