diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..3287bb6 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,13 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Flutter", + "request": "launch", + "type": "dart" + } + ] +} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d7e892..be97b35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# [1.0.1] + +* Dependencies update. + # [1.0.0] Initial version of library. diff --git a/example/android/settings_aar.gradle b/example/android/settings_aar.gradle new file mode 100644 index 0000000..e7b4def --- /dev/null +++ b/example/android/settings_aar.gradle @@ -0,0 +1 @@ +include ':app' diff --git a/example/lib/main.dart b/example/lib/main.dart index d25f1e7..e5cb99d 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -17,7 +17,7 @@ class MyApp extends StatefulWidget { } class _MyAppState extends State { - example() async { + tezosWalletUtil() async { //Generate mnemonic String mnemonic = TezsterDart .generateMnemonic(); // strength is optional, by default it's 256 ==> Generates 24 words. @@ -67,111 +67,10 @@ class _MyAppState extends State { //Accessing: private key ===> identityFundraiser[0] | public key ===> identityFundraiser[1] | public Key Hash ===> identityFundraiser[2] all of type string. } - request() async { - String testNetServer = "https://testnet.tezster.tech"; - - dynamic response = await TezsterDart.performGetRequest( - server: testNetServer, - command: "chains/main/blocks", - ); - print("Response ===> $response"); - - dynamic getBlock = await TezsterDart.getBlock( - server: testNetServer, - hash: "", - chainid: "", - ); - print("GET-Block ===> $getBlock"); - - dynamic blockhead = await TezsterDart.getBlockHead( - server: testNetServer, - ); - print("Block-Head ===> $blockhead"); - - dynamic getAccForBlock = await TezsterDart.getAccountForBlock( - server: testNetServer, - accountHash: "", - blockHash: "", - chainid: "", - ); - print("GET-Acc-ForBlock ===> $getAccForBlock"); - - // dynamic getCounterForAccount = await TezsterDart.getCounterForAccount( - // server: testNetServer, - // accountHash: "", - // chainid: "", - // ); - // print("GET-Counter-ForAccount ===> $getCounterForAccount"); - - // dynamic getSpendableBalanceForAccount = - // await TezsterDart.getSpendableBalanceForAccount( - // server: testNetServer, - // accountHash: "", - // chainid: "", - // ); - // print( - // "GET-SpendableBalance-ForAccount ===> $getSpendableBalanceForAccount"); - - dynamic getAccountManagerForBlock = - await TezsterDart.getAccountManagerForBlock( - server: testNetServer, - chainid: "", - accountHash: "", - block: "", - ); - print("GET-Account-Manager-ForBlock ===> $getAccountManagerForBlock"); - - // dynamic isImplicitAndEmpty = await TezsterDart.isImplicitAndEmpty( - // server: testNetServer, - // accountHash: "", - // ); - // print("Is-ImplicitAndEmpty ===> $isImplicitAndEmpty"); - - dynamic isManagerKeyRevealedForAccount = - await TezsterDart.isManagerKeyRevealedForAccount( - server: testNetServer, - accountHash: "", - ); - print( - "Is-ManagerKey-Revealed-ForAccount ===> $isManagerKeyRevealedForAccount"); - - dynamic getContractStorage = await TezsterDart.getContractStorage( - server: testNetServer, - accountHash: "", - block: "", - chainid: "", - ); - print("GET-Contract-Storage ===> $getContractStorage"); - - dynamic getValueForBigMapKey = await TezsterDart.getValueForBigMapKey( - server: testNetServer, - key: "", - block: "", - chainid: "", - index: 1, - ); - print("GET-Value-ForBigMapKey ===> $getValueForBigMapKey"); - - dynamic getMempoolOperation = await TezsterDart.getMempoolOperation( - server: testNetServer, - chainid: "", - operationGroupId: "", - ); - print("GET-MempoolOperation ===> $getMempoolOperation"); - - dynamic getMempoolOperationsForAccount = - await TezsterDart.getMempoolOperationsForAccount( - server: testNetServer, - chainid: "", - ); - print("GET-MempoolOperations-ForAccount ===> $getMempoolOperationsForAccount"); - } - @override void initState() { super.initState(); - // example(); - request(); + tezosWalletUtil(); } @override diff --git a/example/pubspec.lock b/example/pubspec.lock index b991210..26dec30 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -1,27 +1,13 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: - archive: - dependency: transitive - description: - name: archive - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.13" - args: - dependency: transitive - description: - name: args - url: "https://pub.dartlang.org" - source: hosted - version: "1.6.0" async: dependency: transitive description: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.4.1" + version: "2.5.0-nullsafety.1" bip39: dependency: transitive description: @@ -42,7 +28,7 @@ packages: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.0-nullsafety.1" bs58check: dependency: transitive description: @@ -50,20 +36,34 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.0.1" + characters: + dependency: transitive + description: + name: characters + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0-nullsafety.3" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.1.3" + version: "1.2.0-nullsafety.1" + clock: + dependency: transitive + description: + name: clock + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0-nullsafety.1" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.14.12" + version: "1.15.0-nullsafety.3" convert: dependency: transitive description: @@ -77,7 +77,7 @@ packages: name: crypto url: "https://pub.dartlang.org" source: hosted - version: "2.1.4" + version: "2.1.5" cupertino_icons: dependency: "direct main" description: @@ -85,6 +85,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.1.3" + fake_async: + dependency: transitive + description: + name: fake_async + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0-nullsafety.1" + ffi: + dependency: transitive + description: + name: ffi + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.3" fixnum: dependency: transitive description: @@ -103,7 +117,7 @@ packages: name: flutter_sodium url: "https://pub.dartlang.org" source: hosted - version: "0.0.11" + version: "0.1.9" flutter_test: dependency: "direct dev" description: flutter @@ -116,41 +130,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.1.2" - http: - dependency: transitive - description: - name: http - url: "https://pub.dartlang.org" - source: hosted - version: "0.12.1" - http_parser: - dependency: transitive - description: - name: http_parser - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.4" - image: - dependency: transitive - description: - name: image - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.12" matcher: dependency: transitive description: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.6" + version: "0.12.10-nullsafety.1" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.1.8" + version: "1.3.0-nullsafety.3" password_hash: dependency: transitive description: @@ -164,21 +157,7 @@ packages: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.6.4" - pedantic: - dependency: transitive - description: - name: pedantic - url: "https://pub.dartlang.org" - source: hosted - version: "1.9.0" - petitparser: - dependency: transitive - description: - name: petitparser - url: "https://pub.dartlang.org" - source: hosted - version: "2.4.0" + version: "1.8.0-nullsafety.1" pointycastle: dependency: transitive description: @@ -186,13 +165,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.0.2" - quiver: - dependency: transitive - description: - name: quiver - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.3" sky_engine: dependency: transitive description: flutter @@ -204,56 +176,56 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.7.0" + version: "1.8.0-nullsafety.2" stack_trace: dependency: transitive description: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.9.3" + version: "1.10.0-nullsafety.1" stream_channel: dependency: transitive description: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.0-nullsafety.1" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.0.5" + version: "1.1.0-nullsafety.1" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.2.0-nullsafety.1" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.15" + version: "0.2.19-nullsafety.2" tezster_dart: dependency: "direct main" description: path: ".." relative: true source: path - version: "1.0.0" + version: "1.0.1" typed_data: dependency: transitive description: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.1.6" + version: "1.3.0-nullsafety.3" unorm_dart: dependency: transitive description: @@ -267,13 +239,7 @@ packages: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.0.8" - xml: - dependency: transitive - description: - name: xml - url: "https://pub.dartlang.org" - source: hosted - version: "3.6.1" + version: "2.1.0-nullsafety.3" sdks: - dart: ">=2.7.0 <3.0.0" + dart: ">=2.10.0-110 <2.11.0" + flutter: ">=1.10.0" diff --git a/example/pubspec.yaml b/example/pubspec.yaml index ec9c92a..a77bc68 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -3,7 +3,7 @@ description: A new Flutter project. # The following line prevents the package from being accidentally published to # pub.dev using `pub publish`. This is preferred for private packages. -publish_to: 'none' # Remove this line if you wish to publish to pub.dev +publish_to: "none" # Remove this line if you wish to publish to pub.dev # The following defines the version and build number for your application. # A version number is three numbers separated by dots, like 1.2.43 @@ -24,39 +24,37 @@ dependencies: flutter: sdk: flutter + # tezster_dart: + # git: + # url: git@github.com:TechSatya/Tezster_dart.git + # ref: dev tezster_dart: path: ../ # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^0.1.3 - + dev_dependencies: flutter_test: sdk: flutter # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec - # The following section is specific to Flutter. flutter: - # The following line ensures that the Material Icons font is # included with your application, so that you can use the icons in # the material Icons class. uses-material-design: true - # To add assets to your application, add an assets section, like this: # assets: # - images/a_dot_burr.jpeg # - images/a_dot_ham.jpeg - # An image asset can refer to one or more resolution-specific "variants", see # https://flutter.dev/assets-and-images/#resolution-aware. - # For details regarding adding assets from package dependencies, see # https://flutter.dev/assets-and-images/#from-packages - # To add custom fonts to your application, add a fonts section here, # in this "flutter" section. Each entry in this list should have a # "family" key with the font family name, and a "fonts" key with a diff --git a/lib/src/tezster_dart.dart b/lib/src/tezster_dart.dart new file mode 100644 index 0000000..ed978a8 --- /dev/null +++ b/lib/src/tezster_dart.dart @@ -0,0 +1,115 @@ +library tezster_dart; + +import 'dart:async'; +import 'dart:convert'; +import 'dart:typed_data'; +import 'dart:core'; +import 'package:convert/convert.dart'; +import 'package:blake2b/blake2b_hash.dart'; +import 'package:crypto/crypto.dart'; +import 'package:password_hash/password_hash.dart'; +import 'package:bip39/bip39.dart' as bip39; +import 'package:bs58check/bs58check.dart' as bs58check; +import "package:unorm_dart/unorm_dart.dart" as unorm; +import 'package:flutter_sodium/flutter_sodium.dart'; + +import 'package:tezster_dart/helper/generateKeys.dart'; + +class TezsterDart { + static String generateMnemonic({int strength = 256}) { + return bip39.generateMnemonic(strength: strength); + } + + static Future> getKeysFromMnemonic({ + String mnemonic, + }) async { + assert(mnemonic != null); + Uint8List seed = bip39.mnemonicToSeed(mnemonic); + Uint8List seedLength32 = seed.sublist(0, 32); + KeyPair keyPair = Sodium.cryptoSignSeedKeypair(seedLength32); + String skKey = GenerateKeys.readKeysWithHint(keyPair.sk, '2bf64e07'); + String pkKey = GenerateKeys.readKeysWithHint(keyPair.pk, '0d0f25d9'); + String pkKeyHash = GenerateKeys.computeKeyHash(keyPair.pk); + return [skKey, pkKey, pkKeyHash]; + } + + static Future> getKeysFromMnemonicAndPassphrase({ + String mnemonic, + String passphrase, + }) async { + assert(mnemonic != null); + assert(passphrase != null); + return await _unlockKeys( + passphrase: passphrase, + mnemonic: mnemonic, + ); + } + + static Future> unlockFundraiserIdentity({ + String mnemonic, + String email, + String passphrase = "", + }) async { + assert(mnemonic != null); + assert(email != null); + return await _unlockKeys( + email: email, + passphrase: passphrase, + mnemonic: mnemonic, + ); + } + + static Future> signOperationGroup({ + String privateKey, + String forgedOperation, + }) async { + assert(privateKey != null); + assert(forgedOperation != null); + String watermarkedForgedOperationBytesHex = '03' + forgedOperation; + List hexStringToListOfInt = + hex.decode(watermarkedForgedOperationBytesHex); + Uint8List hashedWatermarkedOpBytes = + Blake2bHash.hashWithDigestSize(256, hexStringToListOfInt); + Uint8List privateKeyBytes = bs58check.decode(privateKey); + List pkB = List.from(privateKeyBytes); + pkB.removeRange(0, 4); + Uint8List finalPKb = Uint8List.fromList(pkB); + Uint8List value = Sodium.cryptoSignDetached( + hashedWatermarkedOpBytes, + finalPKb, + ); + String opSignatureHex = hex.encode(value); + String hexStringToEncode = '09f5cd8612' + opSignatureHex; + Uint8List hexDeco = hex.decode(hexStringToEncode); + String hexSignature = bs58check.encode(hexDeco); + String signedOpBytes = forgedOperation + opSignatureHex; + return [hexSignature, signedOpBytes]; + } + + static Future> _unlockKeys({ + String mnemonic, + String passphrase = "", + String email = "", + }) async { + assert(mnemonic != null); + assert(passphrase != null); + + List stringNormalize(String stringToNormalize) { + String normalizedString = unorm.nfkd(stringToNormalize); + List stringToBuffer = utf8.encode(normalizedString); + return stringToBuffer; + } + + List mnemonicsBuffer = stringNormalize(mnemonic); + String m = String.fromCharCodes(mnemonicsBuffer); + List normalizedPassphrase = stringNormalize("$email" + "$passphrase"); + String normString = String.fromCharCodes(normalizedPassphrase); + String p = "mnemonic" + normString; + Uint8List seed = PBKDF2(hashAlgorithm: sha512).generateKey(m, p, 2048, 32); + KeyPair keyPair = Sodium.cryptoSignSeedKeypair(seed); + String skKey = GenerateKeys.readKeysWithHint(keyPair.sk, '2bf64e07'); + String pkKey = GenerateKeys.readKeysWithHint(keyPair.pk, '0d0f25d9'); + String pkKeyHash = GenerateKeys.computeKeyHash(keyPair.pk); + return [skKey, pkKey, pkKeyHash]; + } +} diff --git a/lib/tezster_dart.dart b/lib/tezster_dart.dart index 433ea32..2e4ec75 100644 --- a/lib/tezster_dart.dart +++ b/lib/tezster_dart.dart @@ -1,293 +1,3 @@ library tezster_dart; -import 'dart:convert'; -import 'dart:typed_data'; -import 'package:blake2b/blake2b_hash.dart'; -import 'package:crypto/crypto.dart'; -import 'package:password_hash/password_hash.dart'; -import 'helper/generateKeys.dart'; -import 'package:bip39/bip39.dart' as bip39; -import 'package:bs58check/bs58check.dart' as bs58check; -import "package:unorm_dart/unorm_dart.dart" as unorm; -import 'package:flutter_sodium/flutter_sodium.dart'; -import 'package:convert/convert.dart'; -import 'package:http/http.dart' as http; - -class TezsterDart { - static String generateMnemonic({int strength = 256}) { - return bip39.generateMnemonic(strength: strength); - } - - static Future> getKeysFromMnemonic({ - String mnemonic, - }) async { - assert(mnemonic != null); - Uint8List seed = bip39.mnemonicToSeed(mnemonic); - Uint8List seedLength32 = seed.sublist(0, 32); - Map keys = - await Sodium.cryptoSignSeedKeypair(seedLength32); - Uint8List sk = keys['sk']; - Uint8List pk = keys['pk']; - String skKey = GenerateKeys.readKeysWithHint(sk, '2bf64e07'); - String pkKey = GenerateKeys.readKeysWithHint(pk, '0d0f25d9'); - String pkKeyHash = GenerateKeys.computeKeyHash(pk); - return [skKey, pkKey, pkKeyHash]; - } - - static Future> getKeysFromMnemonicAndPassphrase({ - String mnemonic, - String passphrase, - }) async { - assert(mnemonic != null); - assert(passphrase != null); - return await _unlockKeys( - passphrase: passphrase, - mnemonic: mnemonic, - ); - } - - static Future> unlockFundraiserIdentity({ - String mnemonic, - String email, - String passphrase = "", - }) async { - assert(mnemonic != null); - assert(email != null); - return await _unlockKeys( - email: email, - passphrase: passphrase, - mnemonic: mnemonic, - ); - } - - static Future> signOperationGroup({ - String privateKey, - String forgedOperation, - }) async { - assert(privateKey != null); - assert(forgedOperation != null); - String watermarkedForgedOperationBytesHex = '03' + forgedOperation; - List hexStringToListOfInt = - hex.decode(watermarkedForgedOperationBytesHex); - Uint8List hashedWatermarkedOpBytes = - Blake2bHash.hashWithDigestSize(256, hexStringToListOfInt); - Uint8List privateKeyBytes = bs58check.decode(privateKey); - List pkB = List.from(privateKeyBytes); - pkB.removeRange(0, 4); - Uint8List finalPKb = Uint8List.fromList(pkB); - Uint8List value = await Sodium.cryptoSignDetached( - hashedWatermarkedOpBytes, - finalPKb, - useBackgroundThread: false, - ); - String opSignatureHex = hex.encode(value); - String hexStringToEncode = '09f5cd8612' + opSignatureHex; - Uint8List hexDeco = hex.decode(hexStringToEncode); - String hexSignature = bs58check.encode(hexDeco); - String signedOpBytes = forgedOperation + opSignatureHex; - return [hexSignature, signedOpBytes]; - } - - static Future> _unlockKeys({ - String mnemonic, - String passphrase = "", - String email = "", - }) async { - assert(mnemonic != null); - assert(passphrase != null); - - List stringNormalize(String stringToNormalize) { - String normalizedString = unorm.nfkd(stringToNormalize); - List stringToBuffer = utf8.encode(normalizedString); - return stringToBuffer; - } - - List mnemonicsBuffer = stringNormalize(mnemonic); - String m = String.fromCharCodes(mnemonicsBuffer); - List normalizedPassphrase = stringNormalize("$email" + "$passphrase"); - String normString = String.fromCharCodes(normalizedPassphrase); - String p = "mnemonic" + normString; - Uint8List seed = PBKDF2(hashAlgorithm: sha512).generateKey(m, p, 2048, 32); - Map keys = await Sodium.cryptoSignSeedKeypair(seed); - Uint8List sk = keys['sk']; - Uint8List pk = keys['pk']; - String skKey = GenerateKeys.readKeysWithHint(sk, '2bf64e07'); - String pkKey = GenerateKeys.readKeysWithHint(pk, '0d0f25d9'); - String pkKeyHash = GenerateKeys.computeKeyHash(pk); - return [skKey, pkKey, pkKeyHash]; - } - - static dynamic performGetRequest({ - String server, - String command = "", - }) async { - assert(server != null); - String url = "$server/$command"; - http.Response response = await http.get(url); - if (response.statusCode != 200) { - return "Invalid url"; - } - dynamic data = jsonDecode(response.body); - return data; - } - - static dynamic getBlock({ - String server, - String hash = "head", - String chainid = "main", - }) async { - assert(server != null); - dynamic response = await performGetRequest( - server: server, - command: "chains/$chainid/blocks/$hash", - ); - return response; - } - - static dynamic getBlockHead({ - String server, - }) async { - assert(server != null); - dynamic response = await getBlock(server: server); - return response; - } - - static dynamic getAccountForBlock({ - String server, - String blockHash, - String accountHash, - String chainid = "main", - }) async { - dynamic response = await performGetRequest( - server: server, - command: - "chains/$chainid/blocks/$blockHash/context/contracts/$accountHash}", - ); - return response; - } - - static dynamic getCounterForAccount({ - String server, - String accountHash, - String chainid = "main", - }) async { - dynamic counter = await performGetRequest( - server: server, - command: - "chains/$chainid/blocks/head/context/contracts/$accountHash/counter", - ); - return int.parse(counter, radix: 10); - } - - static dynamic getSpendableBalanceForAccount({ - String server, - String accountHash, - String chainid = "main", - }) async { - dynamic account = await performGetRequest( - server: server, - command: "chains/$chainid/blocks/head/context/contracts/$accountHash"); - return int.parse(account.toString(), radix: 10); - } - - static dynamic getAccountManagerForBlock({ - String server, - String block, - String accountHash, - String chainid = "main", - }) async { - try { - dynamic result = await performGetRequest( - server: server, - command: - "chains/$chainid/blocks/$block/context/contracts/$accountHash/manager_key", - ); - if (result.toString() == null) { - return ""; - } - return result.toString(); - } catch (e) { - throw (e); - } - } - - static dynamic isImplicitAndEmpty({ - String server, - String accountHash, - }) async { - dynamic account = await getAccountForBlock( - server: server, - blockHash: "head", - accountHash: accountHash, - ); - bool isImplicit = accountHash.toLowerCase().startsWith("tz"); - bool isEmpty = account.balance == 0; - return (isImplicit && isEmpty) ? true : false; - } - - static dynamic isManagerKeyRevealedForAccount({ - String server, - String accountHash, - }) async { - dynamic managerKey = await getAccountManagerForBlock( - server: server, - block: "head", - accountHash: accountHash, - ); - return managerKey.toString().length > 0 ? true : false; - } - - static dynamic getContractStorage({ - String server, - String accountHash, - String chainid = "main", - String block = "head", - }) async { - dynamic response = performGetRequest( - server: server, - command: - "chains/$chainid/blocks/$block/context/contracts/$accountHash/storage", - ); - return response; - } - - static dynamic getValueForBigMapKey({ - String server, - num index, - String key, - String block = "main", - String chainid = "head", - }) async { - dynamic response = performGetRequest( - server: server, - command: "chains/$chainid/blocks/$block/context/big_maps/$index/$key", - ); - return response; - } - - static dynamic getMempoolOperation({ - String server, - String operationGroupId, - String chainid = "main", - }) async { - dynamic mempoolContent = performGetRequest( - server: server, - command: "chains/$chainid/mempool/pending_operations", - ); - //TODO: mempoolContent - return mempoolContent; - } - - static dynamic getMempoolOperationsForAccount({ - String server, - String accountHash, - String chainid = "main", - }) async { - dynamic mempoolContent = await performGetRequest( - server: server, - command: "chains/$chainid/mempool/pending_operations", - ); - //TODO : Modification to be done. - return mempoolContent; - } -} +export 'src/tezster_dart.dart'; \ No newline at end of file diff --git a/pubspec.lock b/pubspec.lock index f844fe7..369c852 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,27 +1,13 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: - archive: - dependency: transitive - description: - name: archive - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.13" - args: - dependency: transitive - description: - name: args - url: "https://pub.dartlang.org" - source: hosted - version: "1.6.0" async: dependency: transitive description: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.4.1" + version: "2.5.0-nullsafety.1" bip39: dependency: "direct main" description: @@ -42,7 +28,7 @@ packages: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.0-nullsafety.1" bs58check: dependency: "direct main" description: @@ -50,20 +36,34 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.0.1" + characters: + dependency: transitive + description: + name: characters + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0-nullsafety.3" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.1.3" + version: "1.2.0-nullsafety.1" + clock: + dependency: transitive + description: + name: clock + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0-nullsafety.1" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.14.12" + version: "1.15.0-nullsafety.3" convert: dependency: "direct main" description: @@ -77,7 +77,21 @@ packages: name: crypto url: "https://pub.dartlang.org" source: hosted - version: "2.1.4" + version: "2.1.5" + fake_async: + dependency: transitive + description: + name: fake_async + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0-nullsafety.1" + ffi: + dependency: transitive + description: + name: ffi + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.3" fixnum: dependency: transitive description: @@ -96,7 +110,7 @@ packages: name: flutter_sodium url: "https://pub.dartlang.org" source: hosted - version: "0.0.11" + version: "0.1.9" flutter_test: dependency: "direct dev" description: flutter @@ -109,41 +123,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.1.2" - http: - dependency: "direct main" - description: - name: http - url: "https://pub.dartlang.org" - source: hosted - version: "0.12.1" - http_parser: - dependency: transitive - description: - name: http_parser - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.4" - image: - dependency: transitive - description: - name: image - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.12" matcher: dependency: transitive description: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.6" + version: "0.12.10-nullsafety.1" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.1.8" + version: "1.3.0-nullsafety.3" password_hash: dependency: "direct main" description: @@ -157,21 +150,7 @@ packages: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.6.4" - pedantic: - dependency: transitive - description: - name: pedantic - url: "https://pub.dartlang.org" - source: hosted - version: "1.9.0" - petitparser: - dependency: transitive - description: - name: petitparser - url: "https://pub.dartlang.org" - source: hosted - version: "2.4.0" + version: "1.8.0-nullsafety.1" pointycastle: dependency: transitive description: @@ -179,13 +158,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.0.2" - quiver: - dependency: transitive - description: - name: quiver - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.3" sky_engine: dependency: transitive description: flutter @@ -197,49 +169,49 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.7.0" + version: "1.8.0-nullsafety.2" stack_trace: dependency: transitive description: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.9.3" + version: "1.10.0-nullsafety.1" stream_channel: dependency: transitive description: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.0-nullsafety.1" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.0.5" + version: "1.1.0-nullsafety.1" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.2.0-nullsafety.1" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.15" + version: "0.2.19-nullsafety.2" typed_data: dependency: transitive description: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.1.6" + version: "1.3.0-nullsafety.3" unorm_dart: dependency: "direct main" description: @@ -253,13 +225,7 @@ packages: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.0.8" - xml: - dependency: transitive - description: - name: xml - url: "https://pub.dartlang.org" - source: hosted - version: "3.6.1" + version: "2.1.0-nullsafety.3" sdks: - dart: ">=2.6.0 <3.0.0" + dart: ">=2.10.0-110 <2.11.0" + flutter: ">=1.10.0" diff --git a/pubspec.yaml b/pubspec.yaml index cb7b477..423891d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,25 +1,25 @@ name: tezster_dart -description: A flutter package which provides the functionalities to play around with tezos dApps -version: 1.0.0 +description: A flutter package which provides the functionalities to play around + with tezos dApps +version: 1.0.1 homepage: https://github.com/Tezsure/tezster_dart repository: https://github.com/Tezsure/tezster_dart issue_tracker: https://github.com/Tezsure/tezster_dart/issues environment: - sdk: ">=2.6.0 <3.0.0" + sdk: ">=2.3.0 <3.0.0" dependencies: flutter: sdk: flutter - crypto: ^2.1.4 - bs58check: ^1.0.1 - blake2b: ^0.1.2 - flutter_sodium: ^0.0.11 bip39: ^1.0.3 - unorm_dart: ^0.1.2 - password_hash: ^2.0.0 + blake2b: ^0.1.2 + bs58check: ^1.0.1 convert: ^2.1.1 - http: ^0.12.1 + crypto: ^2.1.5 + flutter_sodium: ^0.1.9 + password_hash: ^2.0.0 + unorm_dart: ^0.1.2 dev_dependencies: flutter_test: