API Endpoints
API endpoints act as gateways for communication between the wallet application and server systems. These endpoints facilitate the exchange of data, enabling developers to integrate the wallet's functionalities into their applications.
These endpoints provide information about the Activelink wallet user including creating an account, account balances, transaction history, and more.
/init
/init
The process configures “near-api-server.config.json” and establishes a master account to store credentials within this file.
This setup enables the use of "simple methods," reducing the need to pass multiple parameters, notably the master account ID and private key or seed phrase.
Note: Use near login to save your key pair to your local machine.
API Endpoint | /init |
API Method | POST |
API Parameters | master_account_id: The master account that has full access to the NFT contract below. seed_phrase OR private_key: Seed phrase OR private key of the account ID above. nft_contract: Contract account that has NFT contract deployed to it server_host: Public IP address for your API server (localhost is the default) Server_port: (Port your API server will listen on.) rpc_node: Network your server will be running on (testnet, mainnet, or betanet) |
API Example |
|
Response |
|
/create_user
/create_user
Creates a Near sub-account using an initialized master account and saves credentials to /storage directory. Requires /init configuration with the master account.
Note: Only letters, digits, and - or _ separators are allowed.
API Endpoint | /create_user |
API Method | POST |
API Parameters | None |
API Example |
|
Response |
|
/parse_seed_phrase
/parse_seed_phrase
Converts a seed phrase into a public/private key pair.
Note: Only letters, digits, and - or _ separators are allowed.
API Endpoint | /parse_seed_phrase |
API Method | POST |
API Parameters | None |
API Example |
|
Response |
|
/keypair
/keypair
Generates Ed25519 key pair.
Note: Only letters, digits, and - or _ separators are allowed.
API Endpoint | /keypair |
API Method | Get |
API Parameters | None |
API Example | http://localhost:3000/keypair |
Response |
|
/balance
/balance
Displays account balance in yoctoNEAR, which is the smallest unit of Near (10^-24 NEAR).
Note: Only letters, digits, and - or _ separators are allowed.
API Endpoint | /balance |
API Method | Get |
API Parameters | None |
API Example | http://localhost:3000/balance/name.testnet |
Response | 199999959035075000000000000 |
Last updated