Skip to content

Starter kit ​

Copy-paste building blocks for signing requests, binding transactions and verifying webhooks.

Download the kit (.tar.gz)

FileWhat it is
typescript/neo-wallet-signing.tsSigning, write headers, transaction binding, webhook verification. node:crypto only.
python/neo_wallet_signing.pyThe same for Python ≥ 3.9 (pip install cryptography). Run it to self-test.
postman/A Postman collection that signs every request.
webhook-receiver/receiver.tsMinimal webhook endpoint: raw body, signature, dedup, fast 2xx.
test-vectors.jsonFixed inputs and outputs for signing, binding and webhooks.

Helpers ​

ts
import {
  buildRequest,
  loadSigningKey,
  transactionBinding,
  ulid,
  verifyWebhook,
} from "./neo-wallet-signing.ts";
FunctionUse
loadSigningKeyPKCS#8 PEM (or base64 32-byte seed) → key object
buildRequest{ method, headers, body } for one attempt — call again for each retry
ulidFor Idempotency-Key and X-Request-Id
transactionBindingThe assertion.transactionBinding object
verifyWebhookWebhook signature + timestamp check

Postman collection ​

FileWhat it is
neo-wallet.postman_collection.jsonThe requests, their tests and the signing script
neo-wallet.test.postman_environment.jsonThe variables to fill in
  1. Import both files into Postman and select the Neo Wallet (test) environment.
  2. Fill in baseUrl, keyId, apiKey and signingKey (the content of key.pem, pasted as it is), then save. apiKey and signingKey are secret variables: keep them as local values.
  3. Run the folders top to bottom. Each request documents itself and saves what the next one needs.
StepRequests
1 · Check the connectionHealth. No credentials needed
2 · Customers and walletsOnboard a customer, Customer summary, identifiers, agreements, KYC versions, Wallet balance
3 · Move moneyFee quote, Wallet credit, Wallet credit (safe retry), Operation detail, Operation receipt
4 · Top up and pay outTop-up intent, Payout. Need railCode
5 · Mandates and debitsRegister a mandate, Mandate detail, Wallet debit, Mandate debit, Revoke a mandate. Need beneficiaryEntityCode
6 · Transfer between walletsOnboard 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.ts

It 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.