← Back to Home

API Documentation

Functions available for registered users and delegated canisters

Canister ID: 7jsss-6qaaa-aaaad-aegpq-cai

Network: Internet Computer Mainnet

Bug Reports: Discord

Timestamps: All timestamp fields (created_at, expires_at, last_used, etc.) are in nanoseconds since Unix epoch (1970-01-01 00:00:00 UTC).

Nano Amounts: Returned as text strings because they exceed nat64 max value. Format: raw units (1 NANO = 1030 raw).

Node Parameter: Accepts public node alias (e.g. nanogate1). Use null for automatic node selection.

Version 1.4.2 — October 17, 2026

Public No authentication
Standard User or delegated canister
User Caller's own account and resources only

Quick Start

Before your first call: get registered

Almost every function below requires a registered principal. Without one the canister answers Err with Auth: NotRegistered or Credit: NotRegistered — the command itself is fine, the caller is not known. To register, visit nanogate.run and make a donation; you receive credits in the same step.

Call with the identity whose principal was registered. Check it with dfx identity get-principal, and select it per call with --identity <name> or globally with dfx identity use <name>. A different identity — or anonymous — fails even when the command is correct.

These seven work without registration: get_canister_version, get_canister_cycles, get_governance_principal, get_key_operators, get_pow_difficulty_send, get_pow_difficulty_receive, get_pow_challenge_info.

All functions are called via dfx canister call. Here are some examples:

About the dfx deprecation warning

Set this once per shell before you start:

export DFX_WARNING=-mainnet_plaintext_identity,-deprecation

Both values are needed, comma-separated. The second one silences a notice that dfx 0.32 prints on almost every command, beginning WARNING: dfx is deprecated, use icp-cli. That notice goes to stderr, never appears in the result, and changes nothing about what a command does — dfx 0.32 is fully compatible with the functions documented here. The first value matters more: if your identity is stored unencrypted — which includes the default identity dfx creates for you — dfx refuses mainnet commands outright until that risk is acknowledged.

DFINITY has published icp-cli as the successor to dfx but has not announced an end-of-life date. Verified with dfx 0.32 on October 17, 2026: these calls need no dfx.json, so any directory works.

Check your credits:

dfx canister call 7jsss-6qaaa-aaaad-aegpq-cai get_my_user_credits --network ic

Get Nano account balance:

dfx canister call 7jsss-6qaaa-aaaad-aegpq-cai get_account_balance \ '("nano_1gatexyacr8fa7gerjz78yunsjzuid9p8a566k4prxcu68fcw3h9oi7619zu", null)' \ --network ic

Generic RPC call (any Nano action):

dfx canister call 7jsss-6qaaa-aaaad-aegpq-cai send_simple_nano_request \ '(record { action = "block_count"; node = null })' \ --network ic

For all Nano RPC actions and their parameters, see the Nano RPC Protocol Documentation.

For type definitions, see also the Candid UI. Note: The Candid UI appears cluttered because all error variants are fully expanded inline and cannot be collapsed. Every function shows the complete NanoError type with all 15 error categories, making signatures harder to read.

Nano RPC ↑

Core blockchain queries. All functions require credits unless marked free. Base cost: 10 credits, rising with data volume in bulk calls (max 50 items per request).

Note: The generic send_simple_nano_request returns a NanoResponse with raw JSON data that you need to parse yourself. For common operations, prefer the typed wrapper functions below (e.g., get_account_balance, get_version) which return structured responses.

Transactions ↑

Build, sign and broadcast Nano transactions yourself. You sign locally; the gateway only relays the signed blocks.

Proof of Work ↑

PoW helpers: get difficulties, validate work locally, or configure your private PoW source.

Nodes ↑

View available nodes and register your private node.

Utilities ↑

Helper functions for address validation and unit conversion. Most are free query calls.

Pricing ↑

Query credit costs and crypto prices.

Note: Credits are charged per node outcall, regardless of the result. If the node returns an error (e.g. "Block not found"), credits are still deducted because the HTTP outcall was made. Validation errors (e.g. invalid address, missing parameter) are caught before the outcall and cost nothing.

User Account ↑

Manage your credits and view transaction history.

Canister Delegation ↑

Delegate your credits to other canisters you control.

Donations ↑

Donate Nano to support the project and receive bonus credits. Credit purchases will be available after beta.

← Back to Home