Quickstart
By the end of this page you will have an API key from your pteri.org dashboard, a live connectivity check against the Litecoin blockchain, and a real wallet with a real address created through the LiaaS API. Every step is a single copy-pasteable command. Nothing here is a sandbox mock — these are the same routes you will call in production.
Five minutes, seven steps
Create an account
Sign up at pteri.org/register. Confirm your email and sign in. Free to create; you do not need to talk to anyone to reach the next step.
Generate an API key
From the account dashboard, generate an API key. Copy it somewhere safe as soon as it is shown, and note the base URL displayed with it — you need both in the next step.
Treat the key like a password: it belongs in an environment variable or a secret manager, never in source control, a browser bundle, or a URL query string.
Put the key and host in your shell
# The key you generated in step 2.export PTERI_API_KEY="paste-your-api-key-here"# The host that currently serves the API. Override it if your dashboard shows another.export BASE_URL="https://liaas-sdk-919521117286.europe-west1.run.app"Run these in the same terminal you will use for the rest of the page. Every command below reads
$PTERI_API_KEYand$BASE_URL, so you never have to paste the key again.Verify connectivity
This is the cheapest call in the whole spec: read-only, no body, no wallet, one header. If it works, your host is right and your key is accepted.
curl -i "$BASE_URL/api/Blocks/blockchain-info" \-H "nodeUrlOrApiAccessKey: $PTERI_API_KEY"nodeUrlOrApiAccessKeyis the authentication header, and it is required on 42 of the 43 operations in the spec. As the name suggests it carries either an API access key or a node URL. Whether the value should be the raw key, aBearer-prefixed string, or a node URL for your deployment is not settled in the spec. Needs verification Start with the raw key exactly as the dashboard shows it.A
200with a JSON body of Litecoin block information means you are through.200is the only status code the spec documents, so we will not tell you which code a failure returns. Needs verification Read the failure the waycurl -ishows it: a connection or DNS error means$BASE_URLis wrong, and a response that comes back but carries no block information means the host is reachable and the header value is the thing to fix. Fix it here — every later step uses the same two values.Create a wallet
The wallet is the thing that holds keys and, in the PTERI model, the thing that is the identity.
CreateWalletRequesttakes exactly one property,walletName.export WALLET_NAME="quickstart-wallet"curl -i -X POST "$BASE_URL/api/Wallet/create" \-H "nodeUrlOrApiAccessKey: $PTERI_API_KEY" \-H "Content-Type: application/json" \-d "{\"walletName\": \"$WALLET_NAME\"}"Per the spec,
/api/Wallet/createproduces a wallet that is not encrypted and cannot be imported into other wallets. That is fine for this walkthrough. For anything you intend to keep, use one of the siblings instead —/api/Wallet/create-encrypted-wallet,/api/Wallet/create-importable-wallet, or/api/Wallet/create-importable-encrypted-wallet— all of which take the sameCreateWalletRequestbody.Keep whatever the response returns. Wallet creation is the one step here you cannot repeat your way out of.
Create an address in that wallet
Addresses live inside a wallet, so this call identifies the wallet through headers rather than the body. The body is
CreateAddressdto, which has two optional properties:labelandtype.export ENCRYPTED_PASSPHRASE="{ENCRYPTED_PASSPHRASE}"curl -i -X POST "$BASE_URL/api/Address/create" \-H "nodeUrlOrApiAccessKey: $PTERI_API_KEY" \-H "walletName: $WALLET_NAME" \-H "encryptedPassphrase: $ENCRYPTED_PASSPHRASE" \-H "Content-Type: application/json" \-d '{"label": "quickstart"}'Two things the spec does not pin down. Needs verification
encryptedPassphraseis listed as a header on this route, but the wallet you created in step 5 is unencrypted, so what belongs in this header for that case is not documented. If you hit an error here, create the wallet with/api/Wallet/create-encrypted-walletand use the passphrase you set there.typeis an accepted body property, but the set of valid address-type values is not enumerated in the spec. This example omits it and takes the default.
Copy the address out of the response — you need it for the last step.
Check the balance
export LTC_ADDRESS="paste-the-address-from-step-6"curl -i "$BASE_URL/api/Address/address-balance?address=$LTC_ADDRESS" \-H "nodeUrlOrApiAccessKey: $PTERI_API_KEY"This route returns the confirmed and the unconfirmed balance. A brand-new address has never received anything, so both will be zero — that zero is the point. It came back from a real query against the Litecoin chain for an address that did not exist ten seconds ago.
Alternative: the same first two calls in Node
No dependencies — Node 18+ has fetch built in. Set PTERI_API_KEY and BASE_URL in the
environment first, exactly as in step 3.
const BASE_URL = process.env.BASE_URL;
const KEY = process.env.PTERI_API_KEY;
// 1. Connectivity check.
const info = await fetch(`${BASE_URL}/api/Blocks/blockchain-info`, {
headers: { nodeUrlOrApiAccessKey: KEY },
});
console.log("blockchain-info:", info.status);
// 2. Create a wallet.
const wallet = await fetch(`${BASE_URL}/api/Wallet/create`, {
method: "POST",
headers: {
nodeUrlOrApiAccessKey: KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({ walletName: "quickstart-wallet" }),
});
console.log("wallet/create:", wallet.status);
There is an official JavaScript client published on npm as
liaas-js. Needs verification
Its exact method names and signatures are not part of our verified facts, so this page will
not guess at them. Read the source in the liaas-js directory of the
LiaaS SDK monorepo — it also carries clients for
Python, Go, Java, C#, Ruby, PHP, TypeScript, Dart, Rust, and Kotlin.
What just happened
You did three different kinds of thing, and the order matters.
Step 4 proved the channel. One header, one read. Before you create anything, you confirm that the host is reachable and the key is accepted. Every failure after this point is about your request, not your setup.
Step 5 created the identity anchor. A wallet in PTERI is not a balance — it is a container for keys. The keys are what let you produce signatures later, which is the entire basis on which anything gets authorized.
Steps 6 and 7 made it addressable and observable. The address is the public half: a thing you can hand out, receive against, and query. The balance call is verification of the cheapest sort — anyone can check it, and nobody has to trust your word for it.
That shape is the whole platform in miniature: sign, then verify. Here the signing was
implicit, done for you by the wallet. The interesting version is explicit — you hold a
private key, you sign a message with /api/Address/sign-message, and anyone with the public
address checks it with /api/Address/verify-message without ever needing the secret. Same
primitive underneath login, admin approvals, machine-to-machine calls, and payment
authorization. Nothing shared, nothing to phish, nothing to replay.
Next
Wallet, signature, verification, authority, settlement — the five ideas the rest of the docs assume you have.
ReferenceAuthenticationWhat nodeUrlOrApiAccessKey is, where the key comes from, and how to handle it
safely in production.
Reading tracks by what you are building — login, payments, agents, or an enterprise review.