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';

v0.9.0 change: Registration no longer writes a Solana SPL Memo. The response no longer includes signature or explorer_url. Agent birth records are stored in the database only.

No-wallet registration (default)

const creds = await register('my-agent', { registryUrl: 'https://provenonce.io', // registrationSecret: 'xxx', // Required on mainnet, optional on devnet }); console.log(creds.hash); // Agent identity console.log(creds.api_key); // For API calls // No wallet — identity only. Agent is registered and verifiable.

Solana self-custody wallet (opt-in)

const creds = await register('my-org', { registryUrl: 'https://provenonce.io', walletModel: 'self-custody', }); console.log(creds.wallet?.address); // Solana address console.log(creds.wallet?.secret_key); // SAVE — cannot be recovered console.log(creds.wallet?.chain); // "solana"

Ethereum bring-your-own wallet

import { ethers } from 'ethers'; const wallet = new ethers.Wallet('<your-private-key>'); const creds = await register('my-org', { registryUrl: 'https://provenonce.io', walletChain: 'ethereum', walletAddress: wallet.address, walletSignFn: (msg) => wallet.signMessage(msg), }); console.log(creds.wallet?.address); // Ethereum address console.log(creds.wallet?.chain); // "ethereum"

Operator wallet (Model B)

const creds = await register('my-agent', { registryUrl: 'https://provenonce.io', walletModel: 'operator', operatorWalletAddress: 'BASE58_ADDRESS', operatorSignFn: async (message) => { // Sign `message` with your Solana keypair and return hex-encoded signature const signature = nacl.sign.detached(Buffer.from(message), yourKeypair.secretKey); return Buffer.from(signature).toString('hex'); }, });

Child registration

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

Options

PropertyTypeDescription
registryUrlstringRegistry URL
parentHashstringParent hash (child registration)
parentApiKeystringParent’s API key (child registration)
registrationSecretstringRegistration gate (mainnet)
walletModelstring'self-custody' or 'operator' (opt-in wallet)
walletChainstring'solana' or 'ethereum'
walletAddressstringExisting wallet address (Ethereum BYO)
walletSignFnfunctionSigning function for BYO wallets
walletSecretKeystringBring-your-own Ed25519 seed (hex)
operatorWalletAddressstringOperator’s Solana address
operatorSignFnfunctionOperator’s signing function
Last updated on