ckb_dart_sdk 0.6.1

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 49

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

TODO #

  • fellow Nervos test network

Usage #

api_client_example ckb_wallet_example

CHANGELOG #

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:


dependencies:
  ckb_dart_sdk: ^0.6.1

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_dart_sdk/ckb-rpc/api_client.dart';
import 'package:ckb_dart_sdk/ckb-rpc/api_request.dart';
import 'package:ckb_dart_sdk/ckb-rpc/service_url.dart';
import 'package:ckb_dart_sdk/ckb-types/blockhash_res.dart';
import 'package:ckb_dart_sdk/ckb-types/block_res.dart';
import 'package:ckb_dart_sdk/ckb-types/cells_by_type_hash_res.dart';
import 'package:ckb_dart_sdk/ckb-types/header_res.dart';
import 'package:ckb_dart_sdk/ckb-types/item/block.dart';
import 'package:ckb_dart_sdk/ckb-types/item/cell.dart';
import 'package:ckb_dart_sdk/ckb-types/item/cell_input.dart';
import 'package:ckb_dart_sdk/ckb-types/item/cell_output.dart';
import 'package:ckb_dart_sdk/ckb-types/item/cell_with_status.dart';
import 'package:ckb_dart_sdk/ckb-types/item/error.dart';
import 'package:ckb_dart_sdk/ckb-types/item/header.dart';
import 'package:ckb_dart_sdk/ckb-types/item/node_info.dart';
import 'package:ckb_dart_sdk/ckb-types/item/out_point.dart';
import 'package:ckb_dart_sdk/ckb-types/item/send_transaction.dart';
import 'package:ckb_dart_sdk/ckb-types/item/transaction.dart';
import 'package:ckb_dart_sdk/ckb-types/item/uncle_block.dart';
import 'package:ckb_dart_sdk/ckb-types/item/unlock.dart';
import 'package:ckb_dart_sdk/ckb-types/live_cell_res.dart';
import 'package:ckb_dart_sdk/ckb-types/local_node_info_res.dart';
import 'package:ckb_dart_sdk/ckb-types/response.dart';
import 'package:ckb_dart_sdk/ckb-types/res_export.dart';
import 'package:ckb_dart_sdk/ckb-types/send_transaction_res.dart';
import 'package:ckb_dart_sdk/ckb-types/tip_block_number_res.dart';
import 'package:ckb_dart_sdk/ckb-types/transaction_res.dart';
import 'package:ckb_dart_sdk/ckb-utils/crypto.dart';
import 'package:ckb_dart_sdk/ckb-utils/dartrandom.dart';
import 'package:ckb_dart_sdk/ckb-utils/file.dart';
import 'package:ckb_dart_sdk/ckb-utils/number.dart';
import 'package:ckb_dart_sdk/ckb-utils/sha3.dart';
import 'package:ckb_dart_sdk/ckb-utils/sign_utils.dart';
import 'package:ckb_dart_sdk/ckb-utils/transaction_utils.dart';
import 'package:ckb_dart_sdk/ckb-wallet/always_success_wallet.dart';
import 'package:ckb_dart_sdk/ckb-wallet/ckb_wallet.dart';
import 'package:ckb_dart_sdk/ckb-wallet/credential.dart';
import 'package:ckb_dart_sdk/ckb-wallet/wallet_constant.dart';
import 'package:ckb_dart_sdk/ckb-wallet/wallet_utils.dart';
import 'package:ckb_dart_sdk/ckb_error/ckb_error.dart';
import 'package:ckb_dart_sdk/ckb_sdk_dart.dart';
  
Version Uploaded Documentation Archive
0.6.1 Mar 1, 2019 Go to the documentation of ckb_dart_sdk 0.6.1 Download ckb_dart_sdk 0.6.1 archive
0.6.0 Mar 1, 2019 Go to the documentation of ckb_dart_sdk 0.6.0 Download ckb_dart_sdk 0.6.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
97
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
49
Learn more about scoring.

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

  • Dart: 2.3.1
  • pana: 0.12.17

Platforms

Detected platforms: Flutter, other

Platform components identified in package: io.

Health suggestions

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

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

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

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 39 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 40 col 11: Use isNotEmpty for Iterables and Maps.

Fix additional 9 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/sign_utils.dart (Run dartfmt to format lib/ckb-utils/sign_utils.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 suggestions

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_dart_sdk.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.2.0 <3.0.0
convert ^2.1.1 2.1.1
http ^0.12.0+1 0.12.0+2
pointycastle ^1.0.0 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.7.0
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