Appearance
Starter kit
Copy-paste building blocks for signing requests, binding transactions and verifying webhooks.
| File | What it is |
|---|---|
typescript/neo-wallet-signing.ts | Signing, write headers, transaction binding, webhook verification. node:crypto only. |
python/neo_wallet_signing.py | The same for Python ≥ 3.9 (pip install cryptography). Run it to self-test. |
postman/ | A Postman collection that signs every request. |
webhook-receiver/receiver.ts | Minimal webhook endpoint: raw body, signature, dedup, fast 2xx. |
test-vectors.json | Fixed inputs and outputs for signing, binding and webhooks. |
Helpers
ts
import {
buildRequest,
loadSigningKey,
transactionBinding,
ulid,
verifyWebhook,
} from "./neo-wallet-signing.ts";| Function | Use |
|---|---|
loadSigningKey | PKCS#8 PEM (or base64 32-byte seed) → key object |
buildRequest | { method, headers, body } for one attempt — call again for each retry |
ulid | For Idempotency-Key and X-Request-Id |
transactionBinding | The assertion.transactionBinding object |
verifyWebhook | Webhook signature + timestamp check |
Postman collection
| File | What it is |
|---|---|
neo-wallet.postman_collection.json | The requests, their tests and the signing script |
neo-wallet.test.postman_environment.json | The variables to fill in |
- Import both files into Postman and select the Neo Wallet (test) environment.
- Fill in
baseUrl,keyId,apiKeyandsigningKey(the content ofkey.pem, pasted as it is), then save.apiKeyandsigningKeyare secret variables: keep them as local values. - Run the folders top to bottom. Each request documents itself and saves what the next one needs.
| Step | Requests |
|---|---|
| 1 · Check the connection | Health. No credentials needed |
| 2 · Customers and wallets | Onboard a customer, Customer summary, identifiers, agreements, KYC versions, Wallet balance |
| 3 · Move money | Fee quote, Wallet credit, Wallet credit (safe retry), Operation detail, Operation receipt |
| 4 · Top up and pay out | Top-up intent, Payout. Need railCode |
| 5 · Mandates and debits | Register a mandate, Mandate detail, Wallet debit, Mandate debit, Revoke a mandate. Need beneficiaryEntityCode |
| 6 · Transfer between wallets | Onboard the receiving customer, Wallet transfer |
The collection holds every route of the API reference.
The collection script adds all auth headers, X-Request-Id, and a fresh Idempotency-Key on writes. Wallet credit (safe retry) resends the last credit under the same key and gets the stored response back. On a payout, a mandate, a debit and a transfer it also fills in the customer assertion: its timestamps and the transaction binding hash. The full walkthrough, the variables and a 401 checklist are in the collection's Overview tab in Postman.
bash
npx newman run neo-wallet.postman_collection.json \
-e neo-wallet.test.postman_environment.json \
--env-var baseUrl="$NEO_BASE_URL" --env-var keyId="$NEO_KEY_ID" \
--env-var apiKey="$NEO_API_KEY" --env-var signingKey="$NEO_SIGNING_KEY"Webhook receiver
bash
NEO_WEBHOOK_SECRETS='{"whk_2026_09":"nwhs_…"}' PORT=8080 \
node --experimental-strip-types webhook-receiver/receiver.tsIt verifies against the raw body, answers 204 before doing work, and drops repeated dedupKeys. Keep those three properties when you port it to your framework.
Test vectors
Ed25519 is deterministic: a correct implementation in any language reproduces every signature in test-vectors.json exactly. Wire it into your unit tests before you call the API.