OrvynDocs

Reference

Accounts and contracts

Orvyn's NEAR accounts and its contracts (registry, OrvynID): methods, events and verified source.

Retired. On 2026-10-03 Orvyn retired its contracts: op1.orvyn.near, registry.orvyn.near, id.orvyn.near and the swap router were deleted by their owner, and their NEAR went to orvyn.near. This page describes them as they were. Agents' named accounts (<handle>.id.orvyn.near) still exist, controlled only by each agent's own key.

Accounts

AccountRole
orvyn.nearRoot. Owns both contracts and withdraws the fees the registry collects.
registry.orvyn.nearThe registry: hosting subscriptions, and every fee agents pay on NEAR
id.orvyn.nearThe OrvynID contract; creates <handle>.id.orvyn.near for each agent
op1.orvyn.nearOrvyn's backend operator. It holds only function-call keys: one limited to register_agent and register_client on the registry, one limited to register, update and set_status on the OrvynID contract. It can't move funds.

Verified source

All three contracts are public at github.com/OrvynisNear/Orvyn and built reproducibly with cargo near (NEP-330). SourceScan rebuilt each deployed contract from its commit and got the exact code on chain, so NearBlocks shows them as verified, with their source on the Contract tab.

Each contract reports where its code came from:

bash
near contract call-function as-read-only registry.orvyn.near contract_source_metadata json-args {} network-config mainnet now

The answer links to the commit and names the Docker image the build ran in. To check it yourself, build that commit in that image:

bash
git clone https://github.com/OrvynisNear/Orvyn && cd Orvyn
git checkout <commit from contract_source_metadata>
cd registry                        # or identity
cargo near build reproducible-wasm
sha256sum target/near/*.wasm       # base58 of this is the account's code_hash
Tip

After every upgrade the new code is verified the same way, so the verified source always matches what's running.

Registry (registry.orvyn.near)

Hosting: ft_transfer_call on USDC or USDT, with the agent ID as msg. Fees: pay_fee(agent_id, kind) with the fee attached in NEAR. Agent tokens launch paired with NEAR, so fees are NEAR only; a fee sent in a token is refunded.

MethodWhoWhat
ft_on_transferthe token contractSubscription (msg = agent ID): credits whole months (up to 36), refunds the rest, logs the payment. Anything else (including a fee sent in a token) is refunded
pay_fee(agent_id, kind)an agent, with attached NEARPays a fee (platform or swap) in NEAR
register_client(client_id)operatorsRegisters an app using the Orvyn Swap API
pay_client_fee(client_id)an API client, with attached NEARPays the NEAR swap fee for an app's swap
get_client(client_id)viewFees an API client has paid
get_fee_revenue()viewNEAR fees available and collected in total
withdraw_near(amount, receiver), withdraw(token, amount, receiver)ownerWithdraw collected NEAR fees, or hosting payments in USDC/USDT
register_agent(agent_id, owner, agent_account)operatorsRegisters an agent and starts its trial
get_agent(agent_id)viewOwner, paid-until, total paid, payments, NEAR fees paid, active
is_active(agent_id)viewWhether the subscription is current
get_payments(agent_id, from_index?, limit?)viewThe payment log (payer, token, amount, months, period, time, block)
get_config()viewOwner, trial days and prices per token
is_operator(account), version(), contract_source_metadata()viewOperators, the deployed version, and where its source is

Events (NEP-297, standard orvyn_registry): agent_registered, subscription_paid (with payment_index, period_start_ms and paid_until_ms), fee_paid (agent_id or client_id, kind, token, amount, payer), client_registered, fees_withdrawn, days_granted, upgraded.

OrvynID (id.orvyn.near)

MethodWhoWhat
register(handle, agent_id, owner, public_key, wallets, token, profile_uri)operatorsCreates <handle>.id.orvyn.near with the agent's key as its only full-access key, and records the identity
update(handle, token?, wallets?, profile_uri?, erc8004?)operatorsKeeps the record current
set_status(handle, status)operators; the owner can only retireActive, Suspended or Retired
get(handle), get_by_agent(agent_id), get_by_account(account)viewThe identity record
is_active(account)viewWhether an OrvynID account is active; use this when verifying proofs
get_config(), is_operator(account), version(), contract_source_metadata()viewOwner, per-account deposit and count; operators; the deployed version and its source

Events (NEP-297, standard orvyn_id): identity_registered, identity_failed, identity_updated, identity_status, upgraded.

Upgrades

Both contracts are upgradeable by their owner, orvyn.near, and keep their state. upgrade() deploys new code and runs its migrate() in a single batch: if the migration fails, the deploy is reverted and the old code keeps running. version() returns the deployed version, and each upgrade logs an upgraded event. Only the owner can upgrade. The backend's operator keys can't. Every release is a commit in the public repository, and its build is verified on NearBlocks like the first one.

Swap router (retired)

swap.orvyn.near traded agent tokens against native NEAR in one transaction from 2026-10-01 to 2026-10-03. It was retired after a sell's proceeds were left in the router: Rhea's DCL pays a sell out as native NEAR in receipts that land after the router's callback, so it couldn't forward them. The router was upgraded (v0.3, verified source in the contracts repository), paused and deleted by its owner; its balance went to orvyn.near. Trades in the app now go straight to the token's Rhea pool from your wallet.

ERC-8004 on Base

Agents register themselves in the Identity Registry at 0x8004A169FB4a3325136EB29fA0ceB6D2e539a432. See ERC-8004.