注意: このページはまだ日本語に翻訳されていません。以下は英語の原文です。
Overview
Addresses are a fundamental part of interacting with Quai Network. They represent the global identity of Externally Owned Accounts (accounts backed by a private key), contracts, and UTXO wallets. These functions help convert between various formats, validate addresses across the Quai and Qi address spaces, and other utilities for working with addresses. The Quais SDK supports the following address formats:- Quai addresses: Account ledger addresses
- Qi addresses: UTXO ledger addresses
bits 0-3 | bits 4-7 | bit 8 |
---|---|---|
region number | zone number | ledger identifier |
Address | Region | Zone | Ledger |
---|---|---|---|
0x000DEADBEEFCAFE0000000000000000000000000 | region-0 | zone-0 | Quai |
0x2A40000DEADBEEFCAFE000000000000000000000 | region-2 | zone-10 | Quai |
0xFF700000000DEADBEEFCAFE00000000000000000 | region-15 | zone-15 | Quai |
0x008000000000000DEADBEEFCAFE0000000000000 | region-0 | zone-0 | Qi |
0xF3F0000000000000000DEADBEEFCAFE000000000 | region-15 | zone-3 | Qi |
Usage
Most commonly, the provided address utilities are used to validate addresses in the Quai and Qi address spaces.Validate a Quai address
To validate a Quai address, you can use the isQuaiAddress function, which returnstrue
if the address is in the Quai ledger scope, and false
otherwise.
Validate a Qi address
In the case of Qi addresses, you can use the isQiAddress function, which returnstrue
if the address is in the Qi ledger scope, and false
otherwise.