crp_sdk 1.0.2
crp_sdk: ^1.0.2 copied to clipboard
Non-custodial transaction lifecycle management SDK for BSC, Solana, and Sui with idempotency, retries, and foreground-only polling.
CRP SDK — Chain Relay Protocol (crp_sdk) #
CRP SDK is a Dart/Flutter SDK for secure local signing and transaction lifecycle handling. It is designed to work with the CRP API (relay) for transaction preparation, broadcasting, and finality tracking.
Mainnet Proof (Sui) #
- Tx Hash:
Atr8ZtnVLK3AoEoASvcLB8TmYpZu5t7gzBmFdy8ckrHS - Explorer: https://suiscan.xyz/mainnet/tx/Atr8ZtnVLK3AoEoASvcLB8TmYpZu5t7gzBmFdy8ckrHS
- Status: Success (mainnet)
Install #
dart pub add crp_sdk
10-Minute Quickstart (Sui) #
Goal: Prepare via CRP API → sign locally → broadcast → track finality.
final result = await sdk.sendTransfer(
chain: Chain.sui,
token: Token.usdt,
fromPrivateKey: "<SUI_PRIVATE_KEY>",
to: "<RECIPIENT_SUI_ADDRESS>",
amount: "1",
clientIdempotencyKey: DateTime.now().millisecondsSinceEpoch.toString(),
);
print("Tx Hash: ${result.txHash}");
Notes #
- Use a unique
clientIdempotencyKeyper request - Never hardcode private keys in production (use secure storage / wallet)
- Use HTTPS + API keys in production for CRP API
Examples #
Run the integration test:
dart run example/all_chains_usdt_test.dart
License #
MIT