界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
效率与协作 · SKILL.md

leo-wallet

leo-wallet

【效率与协作】Interact with Aleo blockchain - check balances, view transactions, and explore the privacy-focused network. Works with Leo Wallet addresses.

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: leo-wallet description: Interact with Aleo blockchain - check balances, view transactions, and explore the privacy-focused network. Works with Leo Wallet addresses. metadata: {"openclaw":{"requires":{"bins":["snarkos"]},"install":[{"id":"aleo","kind":"shell","command":"curl -sSf https://raw.githubusercontent.com/AleoHQ/snarkOS/mainnet/install.sh | bash","bins":["snarkos"],"label":"Install snarkOS CLI"}]}}

Leo Wallet CLI

Setup

Install snarkOS:

curl -sSf https://raw.githubusercontent.com/AleoHQ/snarkOS/mainnet/install.sh | bash

Install Leo (development):

curl -sSf https://raw.githubusercontent.com/AleoHQ/leo/mainnet/install.sh | bash

Check Balance via API

curl -s "https://api.explorer.aleo.org/v1/testnet3/program/credits.aleo/mapping/account/ADDRESS" | \
python3 -c "import sys; print(sys.stdin.read())"

Get Latest Block

curl -s "https://api.explorer.aleo.org/v1/testnet3/latest/block" | python3 -m json.tool

Block Height

curl -s "https://api.explorer.aleo.org/v1/testnet3/latest/height"

Get Transaction

curl -s "https://api.explorer.aleo.org/v1/testnet3/transaction/TX_ID" | python3 -m json.tool

Get Block by Height

curl -s "https://api.explorer.aleo.org/v1/testnet3/block/BLOCK_HEIGHT" | python3 -m json.tool

Program Info

curl -s "https://api.explorer.aleo.org/v1/testnet3/program/credits.aleo" | python3 -m json.tool

List Program Mappings

curl -s "https://api.explorer.aleo.org/v1/testnet3/program/credits.aleo/mappings" | python3 -m json.tool

Network Stats

python3 -c "
import urllib.request
import json

base = 'https://api.explorer.aleo.org/v1/testnet3'
height = urllib.request.urlopen(f'{base}/latest/height').read().decode()
print(f'Latest Block: {height}')
"

Using snarkOS

Start a client node:

snarkos start --client

Get peer info:

snarkos developer get-peer-count

Leo CLI (Development)

Create new project:

leo new my_program

Build program:

leo build

Run program:

leo run main

Address Format

  • Aleo addresses start with aleo1
  • Length: 63 characters
  • Example: aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9dx

View Key Types

TypePrefixPurpose
Addressaleo1Public identifier
View KeyAViewKey1Decrypt incoming
Private KeyAPrivateKey1Full control

Explorer APIs

NetworkBase URL
Testnet3https://api.explorer.aleo.org/v1/testnet3
Mainnethttps://api.explorer.aleo.org/v1/mainnet (when live)

API Endpoints

EndpointDescription
/latest/blockLatest block
/latest/heightCurrent height
/block/{height}Block by height
/transaction/{id}Transaction details
/program/{id}Program source
/program/{id}/mappingsProgram state

Notes

  • Aleo is privacy-focused; not all data is publicly visible
  • Testnet3 is current test network
  • Credits are the native currency
  • Programs are written in Leo language
  • Zero-knowledge proofs enable private transactions
  • Mainnet launch expected - check aleo.org for updates
我的收藏