Skip to content

Commit

Permalink
Merge pull request #5 from Rakshak1344/master
Browse files Browse the repository at this point in the history
Release 1.0.1 - Hotfix.
  • Loading branch information
yoyodefi authored Dec 1, 2020
2 parents 0a25905 + 933011a commit f03d51d
Show file tree
Hide file tree
Showing 10 changed files with 274 additions and 279 deletions.
13 changes: 13 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# [1.0.1]

* Dependencies update.

# [1.0.0]

Initial version of library.
Expand Down
1 change: 1 addition & 0 deletions example/android/settings_aar.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include ':app'
52 changes: 28 additions & 24 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,56 +17,60 @@ class MyApp extends StatefulWidget {
}

class _MyAppState extends State<MyApp> {

example() async {
//Generate mnemonic
String mnemonic = TezsterDart.generateMnemonic(); // strength is optional, by default it's 256 ==> Generates 24 words.
tezosWalletUtil() async {
//Generate mnemonic
String mnemonic = TezsterDart
.generateMnemonic(); // strength is optional, by default it's 256 ==> Generates 24 words.
print("mnemonic ===> $mnemonic");
//mnemonic ===> 24 random words, [If strength parameter is changed the words length differs.]
//Generate keys from mnemonic
//mnemonic ===> 24 random words, [If strength parameter is changed the words length differs.]

//Generate keys from mnemonic
List<String> keys = await TezsterDart.getKeysFromMnemonic(
mnemonic: "luxury bulb roast timber sense stove sugar sketch goddess host meadow decorate gather salmon funny person canoe daring machine network camp moment wrong dice",
mnemonic:
"luxury bulb roast timber sense stove sugar sketch goddess host meadow decorate gather salmon funny person canoe daring machine network camp moment wrong dice",
);
print("keys ===> $keys");
//keys ===> [privateKey, publicKey, publicKeyHash]
//Accessing: private key ===> keys[0] | public key ===> keys[1] | public Key Hash ===> identity[2] all of type string
//Create / Unlock identity from mnemonic and passphrase.
//keys ===> [privateKey, publicKey, publicKeyHash]
//Accessing: private key ===> keys[0] | public key ===> keys[1] | public Key Hash ===> identity[2] all of type string

//Create / Unlock identity from mnemonic and passphrase.
List<String> identity = await TezsterDart.getKeysFromMnemonicAndPassphrase(
mnemonic:
"cannon rabbit obvious drama slogan net acoustic donor core acoustic clinic poem travel plunge winter",
passphrase: "5tjpU0cimq",
);
print("identity ===> $identity");
// identityWithMnemonic ===> [privateKey, publicKey, publicKeyHash]
// Accessing: private key ===> identity[0] | public key ===> identity[1] | public Key Hash ===> identity[2] all of type string.
// identityWithMnemonic ===> [privateKey, publicKey, publicKeyHash]
// Accessing: private key ===> identity[0] | public key ===> identity[1] | public Key Hash ===> identity[2] all of type string.

//Sign operation with public-Key and forged operation
//Sign operation with public-Key and forged operation
List<String> signOpGrp = await TezsterDart.signOperationGroup(
privateKey: "edskRdVS5H9YCRAG8yqZkX2nUTbGcaDqjYgopkJwRuPUnYzCn3t9ZGksncTLYe33bFjq29pRhpvjQizCCzmugMGhJiXezixvdC",
forgedOperation: "713cb068fe3ac078351727eb5c34279e22b75b0cf4dc0a8d3d599e27031db136040cb9f9da085607c05cac1ca4c62a3f3cfb8146aa9b7f631e52f877a1d363474404da8130b0b940ee",
privateKey:
"edskRdVS5H9YCRAG8yqZkX2nUTbGcaDqjYgopkJwRuPUnYzCn3t9ZGksncTLYe33bFjq29pRhpvjQizCCzmugMGhJiXezixvdC",
forgedOperation:
"713cb068fe3ac078351727eb5c34279e22b75b0cf4dc0a8d3d599e27031db136040cb9f9da085607c05cac1ca4c62a3f3cfb8146aa9b7f631e52f877a1d363474404da8130b0b940ee",
);
print("signOperationGroup ===> $signOpGrp");
//signOperationGroup ===> [hexSignature, signedOpBytes]
//Accessing: hex signature ===> signOpGrp[0] | signed Operation bytes ===> signOpGrp[1] all of type string
//signOperationGroup ===> [hexSignature, signedOpBytes]
//Accessing: hex signature ===> signOpGrp[0] | signed Operation bytes ===> signOpGrp[1] all of type string

//Unlock fundraiser identity.
List<String> identityFundraiser = await TezsterDart.unlockFundraiserIdentity(
//Unlock fundraiser identity.
List<String> identityFundraiser =
await TezsterDart.unlockFundraiserIdentity(
mnemonic:
"cannon rabbit obvious drama slogan net acoustic donor core acoustic clinic poem travel plunge winter",
email: "[email protected]",
passphrase: "5tjpU0cimq",
);
print("identityFundraiser ===> $identityFundraiser");
//identityFundraiser ===> [privateKey, publicKey, publicKeyHash]
//Accessing: private key ===> identityFundraiser[0] | public key ===> identityFundraiser[1] | public Key Hash ===> identityFundraiser[2] all of type string.
//identityFundraiser ===> [privateKey, publicKey, publicKeyHash]
//Accessing: private key ===> identityFundraiser[0] | public key ===> identityFundraiser[1] | public Key Hash ===> identityFundraiser[2] all of type string.
}

@override
void initState() {
super.initState();
example();
tezosWalletUtil();
}

@override
Expand Down
109 changes: 48 additions & 61 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -42,28 +28,42 @@ 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:
name: bs58check
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:
Expand All @@ -77,14 +77,28 @@ packages:
name: crypto
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.4"
version: "2.1.5"
cupertino_icons:
dependency: "direct main"
description:
name: cupertino_icons
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:
Expand All @@ -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
Expand All @@ -116,27 +130,20 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.2"
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:
Expand All @@ -150,28 +157,14 @@ packages:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.6.4"
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:
name: pointycastle
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
Expand All @@ -183,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:
Expand All @@ -246,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"
Loading

0 comments on commit f03d51d

Please sign in to comment.