fix(docs): Add proper descriptions to module READMEs (#2490)

This commit is contained in:
T145
2025-12-02 02:47:08 +01:00
committed by GitHub
parent a3774ae5c0
commit 3e4409d2ba
14 changed files with 475 additions and 244 deletions
+35 -9
View File
@@ -1,14 +1,40 @@
# cw_bitcoin
A new Flutter package project.
Bitcoin-family Electrum wallet implementation used by Cake Wallet (BTC, LTC and derivatives).
## Getting Started
## Features
This project is a starting point for a Dart
[package](https://flutter.dev/developing-packages/),
a library module containing code that can be shared easily across
multiple Flutter or Dart projects.
- Electrum client and wallet with address/UTXO management and snapshots.
- Derivation via BIP‑39; receive/change chains with per-coin configs.
- Create/sign/broadcast transactions; PSBT helpers and payjoin support.
- Transaction history, priorities, and size-based fee calculations.
- Hardware wallet support for BTC/LTC.
For help getting started with Flutter, view our
[online documentation](https://flutter.dev/docs), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
## Getting started
Use the module via app services (see `bitcoin_wallet_service.dart`, `litecoin_wallet_service.dart`). Ensure Electrum nodes are configured for the target coin.
```dart
final wallet = await BitcoinWallet.create(
mnemonic: '...',
password: 'secret',
walletInfo: walletInfo,
unspentCoinsInfo: unspentCoinsBox,
encryptionFileUtils: encryption,
);
```
## Usage
Send BTC with medium priority:
```dart
final feeRate = wallet.feeRate(BitcoinTransactionPriority.medium);
final pending = await wallet.createTransaction(
outputs: [BitcoinTransactionOutput(address: 'bc1...', amount: 50000)],
feeRate: feeRate,
);
final txHash = await pending.commit();
```
See `lib/` for wallet/services, PSBT, and payjoin utilities.
+39 -29
View File
@@ -1,39 +1,49 @@
<!--
This README describes the package. If you publish this package to pub.dev,
this README's contents appear on the landing page for your package.
## cw_bitcoin_cash
For information about how to write a good package README, see the guide for
[writing package pages](https://dart.dev/guides/libraries/writing-package-pages).
Bitcoin Cash wallet module using the shared Electrum implementation configured for BCH mainnet. Includes CashAddr handling and BCH-specific fee/priority presets.
For general information about developing packages, see the Dart guide for
[creating packages](https://dart.dev/guides/libraries/create-library-packages)
and the Flutter guide for
[developing packages and plugins](https://flutter.dev/developing-packages).
-->
### Features
TODO: Put a short description of the package here that helps potential users
know whether this package might be useful for them.
- Derive keys via BIP‑39; maintain receive/change address chains.
- Load/save snapshots of addresses, indices, and balances.
- Electrum connectivity and UTXO management.
- Create/sign/broadcast BCH transactions; calculate size-based fees by priority.
- CashAddr compatibility for addresses; migration of legacy snapshots.
- Message signing and verification.
## Features
### Getting started
TODO: List what your package can do. Maybe include images, gifs, or videos.
## Getting started
TODO: List prerequisites and provide or point to information on how to
start using the package.
## Usage
TODO: Include short and useful examples for package users. Add longer examples
to `/example` folder.
Create/open via the app’s wallet service using `WalletType.bitcoinCash`. Ensure BCH Electrum nodes are configured.
```dart
const like = 'sample';
final wallet = await BitcoinCashWallet.create(
mnemonic: '...',
password: 'secret',
walletInfo: walletInfo,
unspentCoinsInfo: unspentCoinsBox,
encryptionFileUtils: encryption,
);
```
## Additional information
### Usage
TODO: Tell users more about the package: where to find more information, how to
contribute to the package, how to file issues, what response they can expect
from the package authors, and more.
Fee calculation and send:
```dart
final feeRate = wallet.feeRate(BitcoinCashTransactionPriority.medium);
final pending = await wallet.createTransaction(
outputs: [
BitcoinTransactionOutput(
address: 'bitcoincash:qq...',
amount: 10000, // satoshis
),
],
feeRate: feeRate,
);
final txHash = await pending.commit();
```
### Additional information
- See `lib/src/` for: `BitcoinCashWallet`, `BitcoinCashWalletAddresses`, and helpers in `bitcoin_cash_base.dart`.
- Snapshot migration and CashAddr normalization are handled during open.
+17 -9
View File
@@ -1,14 +1,22 @@
# cw_core
A new Flutter package project.
Core abstractions and shared types for Cake Wallet modules.
## Getting Started
## Highlights
This project is a starting point for a Dart
[package](https://flutter.dev/developing-packages/),
a library module containing code that can be shared easily across
multiple Flutter or Dart projects.
- Wallet primitives: `WalletBase`, `WalletService`, `WalletInfo`, `WalletAddresses`.
- Transaction primitives: `TransactionInfo`, `TransactionHistoryBase`, directions/priorities.
- Currency models: `CryptoCurrency`, `Erc20Token`, SPL/TRON token types.
- Persistence helpers: Hive adapters, path helpers (`pathForWallet`), encrypted storage utils.
- Node representation (`Node`) and sync status types.
For help getting started with Flutter, view our
[online documentation](https://flutter.dev/docs), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
## Usage
Extend `WalletBase` for a new chain and provide a `WalletService` implementation to create/open/restore wallets.
```dart
class MyChainWallet extends WalletBase<MyBalance, MyHistory, MyTxInfo> { /* ... */ }
class MyChainWalletService extends WalletService<New, FromSeed, FromKeys, FromHardware> { /* ... */ }
```
See the chain modules (e.g., `cw_bitcoin`, `cw_evm`) for complete examples.
+45 -1
View File
@@ -1,3 +1,47 @@
# cw_decred
TODO: Fill this out.
Decred wallet module that bridges to the native `libdcrwallet` via FFI. Provides high‑level methods to create/load wallets, sync, query balances/transactions, build and broadcast transactions, and sign/verify messages.
## Features
- FFI bindings to `libdcrwallet` with an isolate‑based request/response model.
- Initialize, create, load, close wallets; watch‑only creation.
- Start sync with optional peer list; query sync status and best block.
- Query balances, list transactions and unspents, rescan from height.
- Create signed transactions and broadcast raw transactions.
- Export wallet seed; change wallet password.
- Address management (new external address, default pubkey, address lists).
- Message signing and verification.
## Getting started
Ensure the platform library is available:
- Android/Linux: `libdcrwallet.so`
- Apple: embedded `cw_decred.framework/cw_decred`
Initialize and load a wallet:
```dart
final lib = await Libwallet.spawn();
await lib.initLibdcrwallet('', 'info');
await lib.loadWallet(jsonEncode({ /* libdcrwallet config */ }));
await lib.startSync('wallet.db', '');
final status = await lib.syncStatus('wallet.db');
```
## Usage
Create, sign, and broadcast a transaction:
```dart
final signed = await lib.createSignedTransaction('wallet.db', jsonEncode({
// inputs/outputs and policy for libdcrwallet
}));
final txid = await lib.sendRawTransaction('wallet.db', signed);
```
## Additional information
- See `lib/api/` for the isolate wrapper (`libdcrwallet.dart`) and low‑level bindings.
- Errors are surfaced via the `PayloadResult` struct; some calls support `throwOnError` in higher‑level wrappers.
+38 -29
View File
@@ -1,39 +1,48 @@
<!--
This README describes the package. If you publish this package to pub.dev,
this README's contents appear on the landing page for your package.
## cw_dogecoin
For information about how to write a good package README, see the guide for
[writing package pages](https://dart.dev/tools/pub/writing-package-pages).
Dogecoin wallet module using the shared Bitcoin Electrum implementation (`cw_bitcoin`) configured for Dogecoin mainnet.
For general information about developing packages, see the Dart guide for
[creating packages](https://dart.dev/guides/libraries/create-packages)
and the Flutter guide for
[developing packages and plugins](https://flutter.dev/to/develop-packages).
-->
### Features
TODO: Put a short description of the package here that helps potential users
know whether this package might be useful for them.
- Derive keys via BIP‑39; Dogecoin HD paths using `bitcoin_base`.
- Connect to Electrum nodes; maintain address sets and UTXOs.
- Create/sign/broadcast DOGE transactions with configurable fee rate.
- Address book and index management (receive/change, auto-generate settings).
- Message signing and verification.
## Features
### Getting started
TODO: List what your package can do. Maybe include images, gifs, or videos.
## Getting started
TODO: List prerequisites and provide or point to information on how to
start using the package.
## Usage
TODO: Include short and useful examples for package users. Add longer examples
to `/example` folder.
Create/open via `DogecoinWalletService` in the app using `WalletType.dogecoin`. Ensure Electrum nodes are configured for Dogecoin.
```dart
const like = 'sample';
final wallet = await DogeCoinWallet.create(
mnemonic: '...',
password: 'secret',
walletInfo: walletInfo,
unspentCoinsInfo: unspentCoinsBox,
encryptionFileUtils: encryption,
);
```
## Additional information
### Usage
TODO: Tell users more about the package: where to find more information, how to
contribute to the package, how to file issues, what response they can expect
from the package authors, and more.
Estimate fee and send:
```dart
final feeRate = wallet.feeRate(BitcoinCashTransactionPriority.medium); // example priority mapping
final pending = await wallet.createTransaction(
outputs: [
BitcoinTransactionOutput(
address: 'D...',
amount: 1 * 100000000, // 1 DOGE in koinu
),
],
feeRate: feeRate,
);
final txHash = await pending.commit();
```
### Additional information
- See `lib/src/` for classes: `DogeCoinWallet`, `DogeCoinWalletAddresses`.
- Relies on core Electrum features in `cw_bitcoin` for UTXO selection and persistence.
+54 -29
View File
@@ -1,39 +1,64 @@
<!--
This README describes the package. If you publish this package to pub.dev,
this README's contents appear on the landing page for your package.
## cw_ethereum
For information about how to write a good package README, see the guide for
[writing package pages](https://dart.dev/guides/libraries/writing-package-pages).
Ethereum wallet module built on `cw_evm`. Supports native ETH and ERC‑20 tokens, with history fetched via Etherscan.
For general information about developing packages, see the Dart guide for
[creating packages](https://dart.dev/guides/libraries/create-library-packages)
and the Flutter guide for
[developing packages and plugins](https://flutter.dev/developing-packages).
-->
### Features
TODO: Put a short description of the package here that helps potential users
know whether this package might be useful for them.
- EVM client specialized for Ethereum mainnet (chainId 1).
- Default ERC‑20 token list and wallet‑scoped token storage/migration.
- History via Etherscan v2 API (external, internal, and token transfers).
- EIP‑1559 fee support; gas estimation per transaction intent.
- Create/sign native and ERC‑20 transfers; approvals; broadcast.
- Manage ERC‑20 tokens and balances; metadata lookup when needed.
- Message signing and verification.
- Node health checks for native and USDC token balance.
## Features
### Getting started
TODO: List what your package can do. Maybe include images, gifs, or videos.
## Getting started
TODO: List prerequisites and provide or point to information on how to
start using the package.
## Usage
TODO: Include short and useful examples for package users. Add longer examples
to `/example` folder.
Add shared EVM secrets (see `cw_evm` README):
```dart
const like = 'sample';
// cw_evm/lib/.secrets.g.dart (DO NOT COMMIT)
const String etherScanApiKey = 'YOUR_ETHERSCAN_KEY';
const String nowNodesApiKey = 'YOUR_NOWNODES_KEY'; // if using eth.nownodes.io
const String moralisApiKey = 'YOUR_MORALIS_KEY'; // optional
```
## Additional information
Connect and sync:
TODO: Tell users more about the package: where to find more information, how to
contribute to the package, how to file issues, what response they can expect
from the package authors, and more.
```dart
final service = EthereumWalletService(walletInfoBox, true, client: EthereumClient());
final wallet = await service.create(EVMChainNewWalletCredentials(name: 'My ETH', password: 'secret'));
await wallet.connectToNode(node: Node(uriRaw: 'eth.llamarpc.com', isSSL: true));
await wallet.startSync();
```
### Usage
Send ETH:
```dart
final pending = await wallet.createTransaction(
EVMChainTransactionCredentials.single(
address: '0x...',
cryptoAmount: '0.05',
currency: CryptoCurrency.eth,
priority: EVMChainTransactionPriority.medium,
),
);
final hash = await pending.commit();
```
Add an ERC‑20 token and refresh balance:
```dart
final token = await wallet.getErc20Token('0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', 'eth'); // USDC
if (token != null) {
await wallet.addErc20Token(token);
}
```
### Additional information
- Toggle Etherscan usage via shared preferences key `use_etherscan`.
- See `lib/` for APIs: `EthereumClient`, `EthereumWallet`, `EthereumWalletService`.
+42 -29
View File
@@ -1,39 +1,52 @@
<!--
This README describes the package. If you publish this package to pub.dev,
this README's contents appear on the landing page for your package.
## cw_evm
For information about how to write a good package README, see the guide for
[writing package pages](https://dart.dev/guides/libraries/writing-package-pages).
Shared EVM-chain wallet foundation for Cake Wallet. Provides common client/wallet abstractions used by `cw_ethereum`, `cw_polygon`, and other EVM chains.
For general information about developing packages, see the Dart guide for
[creating packages](https://dart.dev/guides/libraries/create-library-packages)
and the Flutter guide for
[developing packages and plugins](https://flutter.dev/developing-packages).
-->
### What it provides
TODO: Put a short description of the package here that helps potential users
know whether this package might be useful for them.
- `EVMChainClient` (Web3 + HTTP):
- Connect to RPC (supports NowNodes short hosts with API key).
- Read balance, gas price/base fee, estimate gas, send raw tx, watch tx.
- Sign native and ERC‑20 transactions; build approval calldata.
- Fetch ERC‑20 metadata (via Moralis) and balances.
- `EVMChainWallet`:
- Derive keys from BIP‑39 or use private key / Ledger (`EvmLedgerCredentials`).
- EIP‑1559 fee calculation with priority presets; Polygon-specific tuning.
- ERC‑20 token box per wallet; add/remove tokens and maintain balances.
- Transaction history assembly (external/internal + token transfers).
- Message sign/verify helpers.
- `EVMChainWalletService`: common create/open/restore/rename lifecycle.
## Features
### Secrets
TODO: List what your package can do. Maybe include images, gifs, or videos.
## Getting started
TODO: List prerequisites and provide or point to information on how to
start using the package.
## Usage
TODO: Include short and useful examples for package users. Add longer examples
to `/example` folder.
Create `cw_evm/lib/.secrets.g.dart` (do not commit):
```dart
const like = 'sample';
const String nowNodesApiKey = '...'; // used for eth.nownodes.io / matic.nownodes.io
const String etherScanApiKey = '...'; // Etherscan v2 API key (incl. Polygon)
const String moralisApiKey = '...'; // optional, ERC-20 metadata lookup
```
## Additional information
### Extending to a new EVM chain
TODO: Tell users more about the package: where to find more information, how to
contribute to the package, how to file issues, what response they can expect
from the package authors, and more.
Create a client and wallet subclass:
```dart
class MyChainClient extends EVMChainClient {
@override
int get chainId => 8453; // example
@override
Uint8List prepareSignedTransactionForSending(Uint8List tx) => tx;
@override
Future<List<EVMChainTransactionModel>> fetchTransactions(String address, {String? contractAddress}) async { /* ... */ }
@override
Future<List<EVMChainTransactionModel>> fetchInternalTransactions(String address) async { /* ... */ }
}
```
Then wire into a `WalletService` similar to `EthereumWalletService`/`PolygonWalletService`.
### Additional information
- Uses `web3dart` under the hood and integrates with Cake Wallet’s `cw_core` types.
- See `lib/` for the reference implementation details.
+11 -2
View File
@@ -1,5 +1,14 @@
# cw_monero
This project is part of Cake Wallet app.
Monero wallet module for Cake Wallet, backed by native bindings to Monero’s wallet library and high-level Dart wrappers.
Copyright (c) 2020 Cake Technologies LLC.
## Features
- Create/open/restore Monero wallets; manage accounts and subaddresses.
- Build/sign/broadcast transactions; track history and unspent outputs.
- Ledger hardware wallet support.
- Exception types for common wallet operations.
## Usage
See `lib/api/wallet.dart`, `wallet_manager.dart`, and high-level wrappers like `monero_wallet.dart` and `monero_wallet_service.dart` in the app for examples of creating and managing wallets.
+7 -9
View File
@@ -1,15 +1,13 @@
# cw_mweb
A new Flutter plugin project.
MimbleWimble Extension Blocks (MWEB) integration bridge for Cake Wallet modules that support MWEB-enabled chains.
## Getting Started
## Features
This project is a starting point for a Flutter
[plug-in package](https://flutter.dev/developing-packages/),
a specialized package that includes platform-specific implementation code for
Android and/or iOS.
- Dart platform interface and method-channel implementation.
- Protobuf stubs for `mwebd` interactions (`mwebd.pb*.dart`).
- Provides a uniform API surface for MWEB-capable coins.
For help getting started with Flutter development, view the
[online documentation](https://flutter.dev/docs), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
## Usage
Import `cw_mweb` and use the platform interface to interact with an MWEB daemon/binding. See the chain-specific modules for concrete usage.
+53 -29
View File
@@ -1,39 +1,63 @@
<!--
This README describes the package. If you publish this package to pub.dev,
this README's contents appear on the landing page for your package.
## cw_polygon
For information about how to write a good package README, see the guide for
[writing package pages](https://dart.dev/guides/libraries/writing-package-pages).
Polygon (PoS) wallet module built on the shared EVM base (`cw_evm`). Supports native MATIC and ERC‑20 tokens with PolygonScan-backed history.
For general information about developing packages, see the Dart guide for
[creating packages](https://dart.dev/guides/libraries/create-library-packages)
and the Flutter guide for
[developing packages and plugins](https://flutter.dev/developing-packages).
-->
### Features
TODO: Put a short description of the package here that helps potential users
know whether this package might be useful for them.
- EVM chain integration (chainId 137) with `web3dart`.
- Default ERC‑20 token list and per‑wallet token box.
- History via Etherscan v2 API (Polygon chain id) and internal tx support.
- Fee handling tuned for Polygon (priority fee floor, legacy gasPrice when needed).
- Create/sign native and ERC‑20 transfers; approvals; send/broadcast.
- Manage tokens (enable/disable, add/remove) and balances.
- Message signing and verification.
## Features
### Getting started
TODO: List what your package can do. Maybe include images, gifs, or videos.
## Getting started
TODO: List prerequisites and provide or point to information on how to
start using the package.
## Usage
TODO: Include short and useful examples for package users. Add longer examples
to `/example` folder.
Provide secrets used by the shared EVM layer in `cw_evm/lib/.secrets.g.dart`:
```dart
const like = 'sample';
// cw_evm/lib/.secrets.g.dart (DO NOT COMMIT)
const String etherScanApiKey = 'YOUR_ETHERSCAN_KEY';
const String nowNodesApiKey = 'YOUR_NOWNODES_KEY'; // if using matic.nownodes.io
const String moralisApiKey = 'YOUR_MORALIS_KEY'; // optional: ERC20 metadata
```
## Additional information
Connect and sync:
TODO: Tell users more about the package: where to find more information, how to
contribute to the package, how to file issues, what response they can expect
from the package authors, and more.
```dart
final service = PolygonWalletService(walletInfoBox, true, client: PolygonClient());
final wallet = await service.create(EVMChainNewWalletCredentials(name: 'My POL', password: 'secret'));
await wallet.connectToNode(node: Node(uriRaw: 'polygon-rpc.com', isSSL: true));
await wallet.startSync();
```
### Usage
Send MATIC:
```dart
final pending = await wallet.createTransaction(
EVMChainTransactionCredentials.single(
address: '0x...',
cryptoAmount: '0.2',
currency: CryptoCurrency.maticpoly,
priority: EVMChainTransactionPriority.medium,
),
);
final hash = await pending.commit();
```
Add an ERC‑20 token and refresh balance:
```dart
final token = await wallet.getErc20Token('0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174', 'polygon'); // USDC
if (token != null) {
await wallet.addErc20Token(token);
}
```
### Additional information
- Toggle PolygonScan usage via shared preferences key `use_polygonscan`.
- See `lib/` for APIs: `PolygonClient`, `PolygonWallet`, `PolygonWalletService`.
+53 -29
View File
@@ -1,39 +1,63 @@
<!--
This README describes the package. If you publish this package to pub.dev,
this README's contents appear on the landing page for your package.
## cw_solana
For information about how to write a good package README, see the guide for
[writing package pages](https://dart.dev/guides/libraries/writing-package-pages).
Solana wallet module for Cake Wallet. Provides native SOL and SPL token support built on `on_chain/solana` with high-throughput RPC usage and safe transaction parsing.
For general information about developing packages, see the Dart guide for
[creating packages](https://dart.dev/guides/libraries/create-library-packages)
and the Flutter guide for
[developing packages and plugins](https://flutter.dev/developing-packages).
-->
### Features
TODO: Put a short description of the package here that helps potential users
know whether this package might be useful for them.
- Connect to Solana RPC (Ankr/Chainstack/custom) via `SolanaRPC` over HTTP.
- Fetch SOL balances and aggregate SPL token balances across accounts.
- Parse and stream native and SPL token transactions (filters ATA-only and spam-like micro txs).
- Estimate fees per compiled message and enforce rent-exemption checks.
- Create/sign/broadcast SOL and SPL transfers; auto-create recipient ATA when necessary.
- Manage SPL tokens; fetch on-chain metadata (symbol/name) for unknown mints.
- Sign and verify messages.
- Node health checks for SOL and a known SPL token (USDC).
## Features
### Getting started
TODO: List what your package can do. Maybe include images, gifs, or videos.
## Getting started
TODO: List prerequisites and provide or point to information on how to
start using the package.
## Usage
TODO: Include short and useful examples for package users. Add longer examples
to `/example` folder.
If you use hosted RPC providers, add a secrets file for keys (optional unless using those hosts):
```dart
const like = 'sample';
// cw_solana/lib/.secrets.g.dart (DO NOT COMMIT)
const String ankrApiKey = 'YOUR_ANKR_KEY';
const String chainStackApiKey = 'YOUR_CHAINSTACK_KEY';
```
## Additional information
Connect and sync:
TODO: Tell users more about the package: where to find more information, how to
contribute to the package, how to file issues, what response they can expect
from the package authors, and more.
```dart
final service = SolanaWalletService(walletInfoBox, true);
final wallet = await service.create(SolanaNewWalletCredentials(name: 'My SOL', password: 'secret'));
await wallet.connectToNode(node: Node(uriRaw: 'api.mainnet-beta.solana.com', isSSL: true));
await wallet.startSync();
final sol = wallet.balance[CryptoCurrency.sol]?.balance;
```
### Usage
Send SOL:
```dart
final pending = await wallet.createTransaction(
SolanaTransactionCredentials.single(
address: 'SoL...',
cryptoAmount: '0.05',
currency: CryptoCurrency.sol,
),
);
final sig = await pending.commit();
```
Add an SPL token by mint:
```dart
final token = await wallet.getSPLToken('EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'); // USDC
if (token != null) {
await wallet.addSPLToken(token);
}
```
### Additional information
- When using `rpc.ankr.com` or `solana-mainnet.core.chainstack.com`, the client reads API keys from `.secrets.g.dart`.
- See `lib/` for APIs: `SolanaWalletClient`, `SolanaWallet`, `SolanaWalletService`, and credential types.
+53 -29
View File
@@ -1,39 +1,63 @@
<!--
This README describes the package. If you publish this package to pub.dev,
this README's contents appear on the landing page for your package.
## cw_tron
For information about how to write a good package README, see the guide for
[writing package pages](https://dart.dev/guides/libraries/writing-package-pages).
TRON wallet module for Cake Wallet. Implements TRX and TRC-20 token support on top of `on_chain` (Tron), with transaction history and fee estimation via TronGrid.
For general information about developing packages, see the Dart guide for
[creating packages](https://dart.dev/guides/libraries/create-library-packages)
and the Flutter guide for
[developing packages and plugins](https://flutter.dev/developing-packages).
-->
### Features
TODO: Put a short description of the package here that helps potential users
know whether this package might be useful for them.
- Connect to TRON nodes over HTTP(S) via `TronProvider`/`TronHTTPProvider`.
- Fetch TRX balance and TRC-20 token balances.
- Estimate fees using bandwidth/energy and memo fee; accounts for available account resources.
- Create and sign TRX and TRC-20 transfers (supports send-all and optional memo).
- Broadcast signed transactions.
- Load account history (TRX and TRC-20), filtering spam and TRC10-only events.
- Manage TRC-20 tokens: add/remove tokens and fetch token metadata.
- Sign/verify messages.
- Node health checks for both native and token balance endpoints.
## Features
### Getting started
TODO: List what your package can do. Maybe include images, gifs, or videos.
## Getting started
TODO: List prerequisites and provide or point to information on how to
start using the package.
## Usage
TODO: Include short and useful examples for package users. Add longer examples
to `/example` folder.
Provide a TRON RPC endpoint and a TronGrid API key. Add a secrets file:
```dart
const like = 'sample';
// cw_tron/lib/.secrets.g.dart (DO NOT COMMIT)
const String tronGridApiKey = 'YOUR_TRONGRID_API_KEY';
```
## Additional information
Basic connect and sync:
TODO: Tell users more about the package: where to find more information, how to
contribute to the package, how to file issues, what response they can expect
from the package authors, and more.
```dart
final service = TronWalletService(walletInfoBox, client: TronClient(), isDirect: true);
final wallet = await service.create(TronNewWalletCredentials(name: 'My TRON', password: 'secret'));
await wallet.connectToNode(node: Node(uriRaw: 'api.trongrid.io', isSSL: true));
await wallet.startSync();
final trxBalance = wallet.balance[CryptoCurrency.trx];
```
### Usage
Send TRX:
```dart
final pending = await wallet.createTransaction(
TronTransactionCredentials.single(
address: 'T...',
cryptoAmount: '1.5',
currency: CryptoCurrency.trx,
),
);
final txHash = await pending.commit();
```
Add USDT (TRC-20):
```dart
final usdt = await wallet.getTronToken('TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t');
if (usdt != null) {
await wallet.addTronToken(usdt);
}
```
### Additional information
- History and token queries use TronGrid; set `tronGridApiKey`.
- See `lib/` for APIs: `TronClient`, `TronWallet`, `TronWalletService`, and credential types.
+11 -2
View File
@@ -1,5 +1,14 @@
# cw_wownero
This project is part of Cake Wallet app.
Wownero wallet module for Cake Wallet, providing a Monero-family wallet with Wownero-specific APIs and bindings.
Copyright (c) 2020 Cake Technologies LLC.
## Features
- Create/open/restore Wownero wallets; accounts and subaddresses.
- Build/sign/broadcast transactions; history and unspent outputs.
- Platform interface and method channel for native bindings.
- Exception types for setup, creation, opening, and restore flows.
## Usage
See `lib/api/` and high-level wrappers like `wownero_wallet.dart` and `wownero_wallet_service.dart` for end-to-end wallet lifecycle and usage.
+17 -9
View File
@@ -1,15 +1,23 @@
# cw_zano
A new flutter plugin project.
Zano wallet module for Cake Wallet. Provides a Dart wrapper around the Zano wallet API with typed models and transaction helpers.
## Getting Started
## Features
This project is a starting point for a Flutter
[plug-in package](https://flutter.dev/developing-packages/),
a specialized package that includes platform-specific implementation code for
Android and/or iOS.
- Wallet lifecycle and status queries via `ZanoWalletApi`.
- Typed models for balances, transfers, recent history, and wallet info.
- Build and submit transfers; pending transaction modeling.
- Address and asset utilities, formatter helpers.
For help getting started with Flutter, view our
[online documentation](https://flutter.dev/docs), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
## Usage
See `lib/zano_wallet_api.dart` and `lib/zano_wallet.dart` for the high-level API. Typical flow:
```dart
final api = ZanoWalletApi();
final info = await api.getWalletInfo();
final balance = await api.getBalance();
// create transfer params and broadcast
```
Consult `lib/api/model/` for full set of supported request/response models.