polkawallet_sdk_test.dart 1.4 KB

123456789101112131415161718192021222324252627
  1. import 'package:flutter_test/flutter_test.dart';
  2. import 'package:polkawallet_sdk/polkawallet_sdk.dart';
  3. // import 'package:polkawallet_sdk/service/account.dart';
  4. // import 'package:polkawallet_sdk/service/index.dart';
  5. // import 'package:polkawallet_sdk/storage/keyring.dart';
  6. // import 'package:polkawallet_sdk/storage/types/keyPairData.dart';
  7. void main() {
  8. // const testKeystore =
  9. // '{"pubKey":"0xcc597bd2e7eda5094d6aa462523b629a502db6cc71a6ae0e9b158d9e42c6c462","mnemonic":"welcome clinic duck mom connect heart poet admit vendor robot group vacuum","rawSeed":"","address":"15cwMLiH57HvrqBfMYpt5AgGrb5SAUKx7XQUcHnBSs2DAsGt","encoded":"taoH2SolrO8UhraK1JxuNW9AcMMPY5UXMTJjlcpuyEEAgAAAAQAAAAgAAADdvrSwzB9yIFQ7ZCHQoQQV93zLhlAiZlits1CX2hFNm3/zPjYW63U7NzoF76UU4hUvyUTmrvT/K37v0zQ1eFrXwXvc2fmKFJ17qSR2oDvHfuCb+ruCsSrx/UsGtNLbzyCiomVYGMvRh/EzHEfBQO4jGaDi4Sq5++8QE2vuDUTePF8WsVSb5L9N30SFuNQ1YiTH7XBRG9zQhQTofLl0","encoding":{"content":["pkcs8","sr25519"],"type":["scrypt","xsalsa20-poly1305"],"version":"3"},"meta":{}}';
  10. group('sdk test', () {
  11. test('init sdk', () async {
  12. final sdk = WalletSDK();
  13. expect(sdk.api, null);
  14. });
  15. // test('account test', () async {
  16. // KeyPairData kdydata = KeyPairData.fromJson(jsonDecode(testKeystore));
  17. // final account = ServiceAccount(SubstrateService());
  18. // var decoded = await account.decodeAddress([kdydata.address]);
  19. // expect(decoded![kdydata.pubKey], kdydata.address);
  20. // });
  21. });
  22. }