Expand description
Zinc Core - Bitcoin + Ordinals wallet engine.
zinc-core provides reusable wallet primitives for native Rust and WASM hosts:
mnemonic handling, descriptor-backed account management, sync helpers, transaction
signing, and Ordinal Shield PSBT analysis.
Quick start:
use zinc_core::{Network, WalletBuilder, ZincMnemonic};
let mnemonic = ZincMnemonic::parse(
"abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about",
)
.expect("valid mnemonic");
let mut wallet = WalletBuilder::from_mnemonic(Network::Regtest, &mnemonic)
.build()
.expect("wallet");
let _address = wallet.next_taproot_address().expect("address");Additional examples are available in examples/:
wallet_setup, sync_and_balance, and psbt_sign_audit.
Re-exports§
pub use builder::Account;pub use builder::AddressScheme;pub use builder::CreatePsbtRequest;pub use builder::CreatePsbtTransportRequest;pub use builder::DiscoveryAccountPlan;pub use builder::DiscoveryContext;pub use builder::Seed64;pub use builder::SignOptions;pub use builder::SyncRequestType;pub use builder::SyncSleeper;pub use builder::WalletBuilder;pub use builder::ZincBalance;pub use builder::ZincPersistence;pub use builder::ZincSyncRequest;pub use builder::ZincWallet;pub use error::ZincError;pub use error::ZincResult;pub use history::TxItem;pub use keys::taproot_descriptors;pub use keys::DescriptorPair;pub use keys::ZincMnemonic;pub use offer::OfferEnvelopeV1;pub use offer_accept::prepare_offer_acceptance;pub use offer_accept::OfferAcceptancePlanV1;pub use offer_create::CreateOfferRequest;pub use offer_create::OfferCreateResultV1;pub use offer_nostr::NostrOfferEvent;pub use offer_nostr::OFFER_EVENT_KIND;pub use offer_relay::NostrRelayClient;pub use offer_relay::RelayPublishResult;pub use offer_relay::RelayQueryOptions;pub use ordinals::client::OrdClient;pub use ordinals::types::Inscription;pub use ordinals::types::Satpoint;
Modules§
- builder
- Core wallet construction and stateful operations.
- crypto
- Encryption module for wallet seed protection
- error
- Unified error types for Zinc wallet
- history
- Transaction history models and wallet history helpers.
- keys
- Keys module for mnemonic and descriptor handling
- offer
- Offer envelope models and deterministic offer hashing/signature helpers. Offer envelope primitives for decentralized offer publishing and discovery.
- offer_
accept - Offer acceptance safety checks and signing plan derivation. Offer acceptance validation helpers.
- offer_
create - Offer creation helpers for ord-compatible buyer offers. Offer creation helpers aligned with ord-style offer PSBT construction.
- offer_
nostr - Nostr event models and signing/verification helpers for decentralized offers. Nostr event primitives for decentralized offer publication and discovery.
- offer_
relay - Native Nostr relay publish/discovery transport for offer events. Nostr relay transport helpers for decentralized offer publication/discovery.
- ordinals
- Ordinals data models, HTTP client, and protection analysis.
Ordinals integration primitives for
zinc-core.
Structs§
- Decrypt
Response - WASM response payload for mnemonic decryption.
- Zinc
Wasm Wallet - WASM-safe stateful wallet handle wrapping the core
ZincWallet.
Enums§
- Network
- The cryptocurrency network to act on.
Functions§
- decrypt_
wallet - Decrypt an encrypted wallet blob.
- derive_
address - Derive a Taproot address from a mnemonic.
- encrypt_
wallet - Encrypt a mnemonic with a password.
- generate_
wallet - Generate a new wallet with a random mnemonic.
- get_
log_ level - Get current runtime log level.
- init
- Initialize WASM module (call once on load).
- set_
log_ level - Set runtime log level for zinc-core internals.
- set_
logging_ enabled - Enable or disable zinc-core logging at runtime.
- validate_
mnemonic - Validate a mnemonic phrase.