ckb_sdk 0.6.4

ckb-sdk-dart #

Dart SDK for CKB.Nervos test network has not been released yet,so it is very early stage.Be careful when using this library.

Feature #

  • Connect to a JSON-RPC Api, call common methods
  • Send native token with always success wallet
  • Generate wallet


  • fellow Nervos test network

Usage #

api_client_example ckb_wallet_example


0.6.2 #

Support ckb release v0.6.0

  • change pub name to ckb_sdk

0.6.1 #

Support ckb release v0.6.0

  • fix dart pub warning

0.6.0 #

Support ckb release v0.6.0

  • RPC
  • asw account and transfer
  • generate wallet

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  ckb_sdk: ^0.6.4

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:ckb_sdk/ckb_sdk.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jul 10, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.4.0
  • pana: 0.12.19


Detected platforms: Flutter, other

Primary library: package:ckb_sdk/ckb_sdk.dart with components: io.

Health suggestions

Fix lib/ckb-utils/number.dart. (-1.99 points)

Analysis of lib/ckb-utils/number.dart reported 4 hints:

line 1 col 49: Use lowercase_with_underscores when specifying a library prefix.

line 14 col 7: DO use curly braces for all flow control structures.

line 16 col 7: DO use curly braces for all flow control structures.

line 18 col 7: DO use curly braces for all flow control structures.

Fix lib/ckb-types/item/unlock.dart. (-0.50 points)

Analysis of lib/ckb-types/item/unlock.dart reported 1 hint:

line 38 col 7: DO use curly braces for all flow control structures.

Fix lib/ckb-wallet/always_success_wallet.dart. (-0.50 points)

Analysis of lib/ckb-wallet/always_success_wallet.dart reported 1 hint:

line 42 col 11: Use isNotEmpty for Iterables and Maps.

Fix additional 8 files with analysis or formatting issues. (-1 points)

Additional issues in the following files:

  • lib/ckb-wallet/ckb_wallet.dart (1 hint)
  • lib/ckb-wallet/credential.dart (1 hint)
  • lib/ckb-types/item/cell_with_status.dart (Run dartfmt to format lib/ckb-types/item/cell_with_status.dart.)
  • lib/ckb-types/item/node_info.dart (Run dartfmt to format lib/ckb-types/item/node_info.dart.)
  • lib/ckb-types/response.dart (Run dartfmt to format lib/ckb-types/response.dart.)
  • lib/ckb-types/transaction_res.dart (Run dartfmt to format lib/ckb-types/transaction_res.dart.)
  • lib/ckb-utils/transaction_utils.dart (Run dartfmt to format lib/ckb-utils/transaction_utils.dart.)
  • lib/ckb_error/ckb_error.dart (Run dartfmt to format lib/ckb_error/ckb_error.dart.)

Maintenance issues and suggestions

Homepage URL doesn't exist. (-20 points)

At the time of the analysis the homepage field was unreachable.

Maintain an example.

None of the files in the package's example/ directory matches known example patterns.

Common filename patterns include main.dart, example.dart, and ckb_sdk.dart. Packages with multiple examples should provide example/

For more information see the pub package layout conventions.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
convert ^2.1.1 2.1.1
http ^0.12.0+1 0.12.0+2
pointycastle ^1.0.1 1.0.1
Transitive dependencies
async 2.2.0
charcode 1.1.2
collection 1.14.11
http_parser 3.1.3
meta 1.1.7
path 1.6.2
pedantic 1.8.0+1
source_span 1.5.5
string_scanner 1.0.4
term_glyph 1.1.0
typed_data 1.1.6
Dev dependencies
test ^1.5.1+1