Skip to content

Platform REST API — Wallets

Create and import wallets, read balances, and transfer funds.

See Platform REST API for authentication and the response envelope.

Register

POST /api/wallet/register

Store an existing wallet against a user. Unauthenticated — this is where a password is first set.

InputType
user_idstring
user_pwdstring
addressstring
priv_keystring

Returns { success, data: { address } }.

Existing users must prove ownership

If the user_id already exists, the caller must supply that user's existing password. That stops anyone attaching a wallet to someone else's account.

POST /api/wallet/register_random

Generate a wallet and store it. Also unauthenticated, for the same reason.

Input { user_id, user_pwd }. Returns { success, result: { user_id, pub_key, created_at, updated_at } }.

Create and import

GET /api/wallet/create?user_id=

A random wallet, not stored. User-level auth.

Returns { address, privateKey, mnemonic }.

POST /api/wallet/from-mnemonic

Derive a wallet from a mnemonic. User-level auth.

Input { user_id, user_pwd, mnemonic }{ address, privateKey }. An invalid phrase returns 400.

POST /api/wallet/from-private-key

Derive the address from a key. User-level auth.

Input { user_id, user_pwd, privateKey }{ address }.

Balances

GET /api/wallet/balance/:address?user_id=

Native balance. User-level auth.

json
{ "success": true,
  "data": { "address": "0x…", "balance": "1000000000000000000", "balanceEth": "1.0" } }

balance is in aknyx; balanceEth is in KNYX. See KNYX and denominations.

GET /api/wallet/tokens?address=

All token balances for one of your wallets. Wallet-level auth.

Returns { tokens: [...] }.

Transfers

POST /api/wallet/send

POST /api/wallet/withdraw

Move funds out. Wallet-level auth on address_from — this spends funds.

InputMeaning
address_fromSource wallet; must be authenticated
user_pwdIts password
tokenToken address, or native
amountAmount to send
address_toRecipient

Returns { hash } — the transaction hash, which you can follow in the explorer.

KriptoNyx testnet — chain ID 3009 (kriptonyx_3009-1)