Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Quantova/Qweb3.rs
/ functions
Functions
78 in github.com/Quantova/Qweb3.rs
⨍
Functions
78
◇
Types & classes
8
↓ 9 callers
Method
call
Make a raw JSON-RPC call and deserialize the `result` field.
src/rpc.rs:57
↓ 6 callers
Function
address_from_public_key
Derive the canonical Quantova account address (`Q1...`) from a public key. Low-level primitive: performs NO scheme/length validation on `public_key`.
src/address.rs:47
↓ 4 callers
Function
decode
Decode a Bech32m string, verifying prefix + checksum. Accepts upper- or lower-case.
src/bech32m.rs:92
↓ 4 callers
Function
keccak256
keccak-256 of `data`.
src/abi.rs:11
↓ 3 callers
Function
decode_address
Decode a `Q1...` address back to its 20-byte account body, validating it.
src/address.rs:57
↓ 3 callers
Function
encode
Encode raw bytes as a Bech32m string with the given prefix (lowercase canonical form).
src/bech32m.rs:78
↓ 3 callers
Function
parse_u64_hex
(s: &str)
src/rpc.rs:188
↓ 3 callers
Method
rpc
Access the JSON-RPC client (`q_*`, `state_*`, `chain_*`, `system_*`).
src/lib.rs:93
↓ 3 callers
Function
sphincs_component
SPHINCS+ per-component seed: `blake2_256(SCALE(seed, label))[..16]` (matches sp-core).
src/wallet.rs:118
↓ 3 callers
Method
verify
Verify `signature` over `message` against this wallet's public key.
src/wallet.rs:301
↓ 2 callers
Function
body_to_address
Encode a 20-byte account body as a canonical `Q1...` address (Bech32m, upper-case).
src/address.rs:39
↓ 2 callers
Function
convert_bits
(data: &[u8], from: u32, to: u32, pad: bool)
src/bech32m.rs:50
↓ 2 callers
Function
hrp_expand
(hrp: &str)
src/bech32m.rs:24
↓ 2 callers
Function
mnemonic_to_mini_secret
Substrate mini-secret: `PBKDF2-HMAC-SHA512(BIP-39 entropy, "mnemonic", 2048)[..32]`. Identical to `mnemonicToMiniSecret` in qweb3.js.
src/wallet.rs:100
↓ 2 callers
Function
parse_u128_hex
(s: &str)
src/rpc.rs:193
↓ 2 callers
Function
polymod
(values: &[u8])
src/bech32m.rs:10
↓ 2 callers
Method
sign
Post-quantum-sign `message`, returning the raw signature bytes (verifiable on-chain).
src/wallet.rs:243
↓ 1 callers
Function
account_id_from_public_key
Derive the 20-byte Quantova account body (H160) from a post-quantum public key. `account_id = SHA3-256(public_key)[..20]` with `account_id[0] = 0x40`
src/address.rs:30
↓ 1 callers
Method
address
The canonical `Q` address for this wallet.
src/wallet.rs:223
↓ 1 callers
Method
as_str
The lowercase scheme name used across the SDKs (`"falcon"`, `"dilithium"`, `"sphincsp"`).
src/wallet.rs:44
↓ 1 callers
Function
create_checksum
(hrp: &str, data: &[u8])
src/bech32m.rs:36
↓ 1 callers
Function
estimate
Estimate fee tiers from the node's current gas price.
src/fees.rs:20
↓ 1 callers
Method
eth_call
`q_call` -> read-only QVM contract call, returning the raw `0x` return data.
src/rpc.rs:144
↓ 1 callers
Method
fees
Estimate fee tiers from the node's current gas price.
src/lib.rs:98
↓ 1 callers
Function
function_selector_hex
The function selector as a `0x`-prefixed hex string, e.g. `"0xa9059cbb"`.
src/abi.rs:27
↓ 1 callers
Method
gas_price
`q_gasPrice` -> current gas price in planck.
src/rpc.rs:122
↓ 1 callers
Method
get_balance
`q_getBalance` -> free balance in planck (1 QTOV = 10^18 planck).
src/rpc.rs:110
↓ 1 callers
Method
get_transaction_count
`q_getTransactionCount` -> account nonce.
src/rpc.rs:116
↓ 1 callers
Function
keygen
(scheme: Scheme, seed: &[u8; 32])
src/wallet.rs:132
↓ 1 callers
Function
namehash
EIP-137 namehash of `name`. `namehash("")` is 32 zero bytes; otherwise, for each label right-to-left: `node = keccak256(node || keccak256(label))`.
src/qns.rs:13
↓ 1 callers
Method
public_key_bytes
Serialized public-key size in bytes.
src/wallet.rs:35
↓ 1 callers
Function
public_key_to_q
Encode a public key as `QPUB1...` (Bech32m, upper-case).
src/address.rs:52
↓ 1 callers
Method
runtime_version
`state_getRuntimeVersion` -> runtime identity (spec name, versions).
src/rpc.rs:134
↓ 1 callers
Function
sanitize_node_message
QWEB3RS-RPC-007: sanitize an untrusted node-supplied error message. Removes ASCII control characters (including the `ESC` used to start ANSI/VT escap
src/rpc.rs:170
↓ 1 callers
Method
sign_rng
A deterministic per-signature RNG seed = `blake2_256(seed ++ msg)`. Keeps signing reproducible and free of any OS RNG dependency, while still producin
src/wallet.rs:229
↓ 1 callers
Function
to_node_address
Translate a `Q1...` account address to the `0x`-hex form the node RPC expects; any other value (e.g. a `0x` contract address) is returned unchanged.
src/address.rs:80
↓ 1 callers
Function
verify
Verify a post-quantum signature against a public key (no secret key needed).
src/wallet.rs:307
↓ 1 callers
Function
verify_checksum
(hrp: &str, data: &[u8])
src/bech32m.rs:44
Method
account
The account view (scheme, public key, canonical `Q` address).
src/wallet.rs:218
Function
addresses_match_js_for_all_schemes
()
src/wallet.rs:369
Method
block_number
`q_blockNumber` -> current best block number.
src/rpc.rs:104
Method
chain_id
`q_chainId` -> chain id.
src/rpc.rs:128
Method
create
Generate a fresh 24-word wallet, returning the wallet and its mnemonic phrase.
src/wallet.rs:195
Function
derives_known_address
()
src/address.rs:96
Method
drop
(&mut self)
src/wallet.rs:175
Function
empty_is_zero
()
src/qns.rs:38
Function
event_topic
The 32-byte event topic for a Solidity event signature, e.g. `event_topic("Transfer(address,address,uint256)")`.
src/abi.rs:33
Function
event_topic_hex
The event topic as a `0x`-prefixed hex string.
src/abi.rs:38
Method
finalized_head
`chain_getFinalizedHead` -> hash of the finalized head.
src/rpc.rs:139
Method
from_public_key
Build an account view from a public key (no secret key held). Low-level: does NOT validate the key length against the scheme — use [`Account::try_from
src/wallet.rs:91
Method
from_seed
Derive a wallet deterministically from a 32-byte seed.
src/wallet.rs:183
Function
function_selector
The 4-byte function selector for a Solidity signature, e.g. `function_selector("transfer(address,uint256)") == [0xa9, 0x05, 0x9c, 0xbb]`.
src/abi.rs:21
Method
import_mnemonic
Derive a wallet from a BIP-39 mnemonic (same derivation as qweb3.js/py).
src/wallet.rs:189
Function
is_valid_address
Return `true` if `address` is a well-formed canonical Quantova account address.
src/address.rs:74
Function
known_event_topic
()
src/abi.rs:54
Function
known_selectors
()
src/abi.rs:47
Function
main
()
examples/qns_resolve.rs:14
Function
main
()
examples/abi_selectors.rs:14
Function
main
()
examples/address.rs:12
Function
main
()
examples/connect.rs:15
Function
main
()
examples/transfer.rs:24
Function
matches_eip137_vector
()
src/qns.rs:44
Function
mini_secret_matches_js
()
src/wallet.rs:360
Function
namehash_hex
The namehash as a `0x`-prefixed hex string.
src/qns.rs:29
Method
new
Create a client for an endpoint, e.g. `https://testnet.quantova.io`, `https://mainnet.quantova.io`, or `http://127.0.0.1:9933`.
src/lib.rs:86
Method
new
Create a client for an endpoint such as `https://testnet.quantova.io` or `http://127.0.0.1:9933`.
src/rpc.rs:36
Method
next_id
(&self)
src/rpc.rs:50
Function
node_address_is_hex_body
()
src/address.rs:117
Method
parse
Parse a scheme name (`"falcon"`, `"dilithium"`, `"sphincsp"`/`"sphincs+"`).
src/wallet.rs:53
Method
public_key
The serialized public key.
src/wallet.rs:213
Function
qtov_name
()
src/qns.rs:52
Method
resolve_name
Resolve a `.qtov` name to a canonical `Q` address via the QVM registry. `registry` is the QNS registry contract address (H160 hex). Returns the resol
src/lib.rs:106
Function
roundtrips_address
()
src/address.rs:105
Method
scheme
The scheme this wallet uses.
src/wallet.rs:208
Function
scheme_parse
()
src/wallet.rs:393
Method
send_raw_transaction
`q_sendRawTransaction` -> submit a signed transaction, returning its hash.
src/rpc.rs:149
Function
sign_verify_roundtrip_all_schemes
()
src/wallet.rs:383
Method
try_from_public_key
Build an account view from a public key, validating its length against the scheme. Prefer this over [`Account::from_public_key`] for any externally-su
src/wallet.rs:77