Skip to main content
Start here when your code runs in Node.js. You will create a small TypeScript project, generate a disposable development key, and write and read back one record.

Prerequisites

  • Node.js 20 or newer
  • Network access to https://node.tinycloud.xyz
The generated key is for this tutorial only. Never put a production wallet key in source control, logs, frontend code, or a shared .env file.

Create the project

Generate a new key for the empty tutorial space and exclude it from Git:
Create index.ts:

Run and verify

Success prints the owner DID, a space ending in :tinycloud-quickstart, and the record read back from that space:
The exact chain, address, and timestamp will differ. A failed sign-in throws before the write. A failed KV call prints its SDK error code and exits without reporting success.

Use an existing secret safely

For a real service, replace the disposable .env key with your secret manager’s runtime injection. Keep .env for local development only, retain it in .gitignore, and use a wallet dedicated to the service rather than a personal wallet that holds assets.

Next steps

Verified against @tinycloud/node-sdk 2.7.0.