-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from Rakshak1344/master
Release 1.0.1 - Hotfix.
- Loading branch information
Showing
10 changed files
with
274 additions
and
279 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include ':app' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.