dart-tempo
March 20, 2026 · View on GitHub
dart-tempo
Dart SDK for building on Tempo — the blockchain for payments at scale.
Contents
Packages
| Package | Description | Status |
|---|---|---|
tempo_core | Transaction model, RLP encoding, secp256k1 signing, JSON-RPC client | ✅ 151 tests |
tempo_contracts | ABI encoding, TIP-20, DEX, Fee Manager, Nonce, Keychain helpers | ✅ 123 tests |
tempo_flutter | Secure key storage, passkey signing, payment UI widgets | ✅ 61 tests |
tempo_server | Fee payer handler, key management for backend services | ✅ 59 tests |
Examples
| Example | Description |
|---|---|
parallel_nonces | 2D nonce parallelism: 3 concurrent TIP-20 transfers |
flutter_wallet | Flutter app: onboarding, send, receive with PathUSD |
payment_terminal | HTTP payment terminal: create & poll payment requests |
fee_payer_service | Fee sponsorship server wrapping tempo_server |
Quick Start
import 'package:tempo_core/tempo_core.dart';
import 'package:tempo_contracts/tempo_contracts.dart';
// Create a signer and client
final signer = TempoSigner('0xac0974...');
final client = TempoClient('http://localhost:8545');
// Check PathUSD balance
final balCall = Tip20.balanceOf(
token: TempoAddresses.pathUsd,
account: signer.address,
);
final result = await client.call(
to: bytesToHexPrefixed(balCall.to!),
data: bytesToHexPrefixed(balCall.data),
);
final balance = Tip20.decodeBalanceOf(hexToBytes(result));
// Send PathUSD
final nonce = await client.getNonce(signer.addressHex);
final tx = TempoTransaction(
chainId: BigInt.from(1337),
nonce: nonce,
maxFeePerGas: BigInt.from(25000000000),
maxPriorityFeePerGas: BigInt.from(1000000),
gasLimit: 500000,
feeToken: TempoAddresses.pathUsd,
calls: [
Tip20.transfer(
token: TempoAddresses.pathUsd,
to: hexToBytes('0x70997970C51812dc3A010C7d01b50e0d17dc79C8'),
amount: BigInt.from(1000000),
),
],
);
final signed = signer.signTransaction(tx);
final receipt = await client.sendRawTransactionSync(serialize(signed));
print('TX: ${receipt['transactionHash']}');
Local Dev Node
Start a Tempo dev node for development and testing:
docker compose up -d
This starts a node at http://localhost:8545 with:
- Chain ID
1337(dev chain) - 1-second block time
- Faucet enabled (
tempo_fundAddressRPC method) - PathUSD at
0x20c0000000000000000000000000000000000000
Fund a test address:
curl -X POST http://localhost:8545 \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","method":"tempo_fundAddress","params":["0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"],"id":1}'
Pre-funded dev keys (Hardhat standard):
| Key | Address |
|---|---|
0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 | 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 |
0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d | 0x70997970C51812dc3A010C7d01b50e0d17dc79C8 |
Testing
# Unit tests (all packages)
cd packages/tempo_core && dart test
cd packages/tempo_contracts && dart test
cd packages/tempo_flutter && flutter test
cd packages/tempo_server && dart test
# Integration tests (requires running dev node)
cd packages/tempo_core && dart test test/integration/ --run-skipped
cd packages/tempo_contracts && dart test test/integration/ --run-skipped
# Flutter wallet test
cd examples/flutter_wallet && flutter test
Contributing
Our contributor guidelines can be found in CONTRIBUTING.md.
Security
See SECURITY.md. Note: Tempo is still undergoing audit and does not have an active bug bounty. Submissions will not be eligible for a bounty until audits have concluded.
License
Licensed under either of Apache License, Version 2.0 or MIT License at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in these packages by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.