Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Rakshak1344 committed Nov 28, 2020
1 parent f5f23c4 commit aa95709
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 313 deletions.
275 changes: 0 additions & 275 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,285 +67,10 @@ class _MyAppState extends State<MyApp> {
//Accessing: private key ===> identityFundraiser[0] | public key ===> identityFundraiser[1] | public Key Hash ===> identityFundraiser[2] all of type string.
}

tezosNodeWriter() async {
String testNetServer = "https://testnet.tezster.tech";

//Working functions
dynamic response = await TezsterNodeReader.performGetRequest(
server: testNetServer,
command: "chains/main/blocks",
);
print("Response ===> $response");

dynamic getBlock = await TezsterNodeReader.getBlock(
server: testNetServer,
hash: "head",
chainid: "NetXjD3HPJJjmcd",
);
print("GET-Block ===> $getBlock");

dynamic blockhead = await TezsterNodeReader.getBlockHead(
server: testNetServer,
);
print("Block-Head ===> $blockhead");

dynamic getCounterForAccount = await TezsterNodeReader.getCounterForAccount(
server: testNetServer,
accountHash: "tz1ZfFASQvmmz47ru5nn9GhX5oswCRVX5z1r",
chainid: "NetXjD3HPJJjmcd",
);
print("GET-Counter-ForAccount ===> $getCounterForAccount");

dynamic getMempoolOperation = await TezsterNodeReader.getMempoolOperation(
server: testNetServer,
chainid: "NetXjD3HPJJjmcd",
operationGroupId: "opAPztkmYpEG754JGjkKi4snUTaa879fvgWfGFeDrdmTAbaoLNp",
);
print("GET-MempoolOperation ===> $getMempoolOperation");

dynamic getSpendableBalanceForAccount =
await TezsterNodeReader.getSpendableBalanceForAccount(
server: testNetServer,
accountHash: "tz1ZfFASQvmmz47ru5nn9GhX5oswCRVX5z1r",
chainid: "NetXjD3HPJJjmcd",
);
print(
"GET-SpendableBalance-ForAccount ===> $getSpendableBalanceForAccount");

dynamic getBalance = await TezsterNodeReader.getBalance(
accountHash: "tz1ZfFASQvmmz47ru5nn9GhX5oswCRVX5z1r",
server: testNetServer,
);
print("Get-Balance ===> $getBalance");

dynamic getMempoolOperationsForAccount =
await TezsterNodeReader.getMempoolOperationsForAccount(
server: testNetServer,
chainid: "NetXjD3HPJJjmcd",
accountHash: "tz1Y8zdtVe2wWe7QdNTnAdwBceqYBCdA3Jj8",
);
print(
"GET-MempoolOperations-ForAccount ===> $getMempoolOperationsForAccount");

bool isRevealed = await TezsterNodeReader.isManagerKeyRevealedForAccount(
server: "https://testnet.tezster.tech/",
accountHash: 'tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx',
);
print("isRevealed ===> $isRevealed");

//Yet to be tested
// dynamic getAccForBlock = await TezsterNodeReader.getAccountForBlock(
// server: testNetServer,
// accountHash: "tz1ZfFASQvmmz47ru5nn9GhX5oswCRVX5z1r",
// blockHash: "",
// chainid: "NetXjD3HPJJjmcd",
// );
// print("GET-Acc-ForBlock ===> $getAccForBlock");

// dynamic getAccountManagerForBlock =
// await TezsterNodeReader.getAccountManagerForBlock(
// server: testNetServer,
// chainid: "NetXjD3HPJJjmcd",
// accountHash: "tz1ZfFASQvmmz47ru5nn9GhX5oswCRVX5z1r",
// block: "",
// );
// print("GET-Account-Manager-ForBlock ===> $getAccountManagerForBlock");

// dynamic isImplicitAndEmpty = await TezsterNodeReader.isImplicitAndEmpty(
// server: testNetServer,
// accountHash: "tz1ZfFASQvmmz47ru5nn9GhX5oswCRVX5z1r",
// );
// print("Is-ImplicitAndEmpty ===> $isImplicitAndEmpty");

// dynamic getContractStorage = await TezsterNodeReader.getContractStorage(
// server: testNetServer,
// accountHash: "tz1ZfFASQvmmz47ru5nn9GhX5oswCRVX5z1r",
// block: "",
// chainid: "NetXjD3HPJJjmcd",
// );
// print("GET-Contract-Storage ===> $getContractStorage");

// dynamic getValueForBigMapKey = await TezsterNodeReader.getValueForBigMapKey(
// server: testNetServer,
// key: "",
// block: "",
// chainid: "NetXjD3HPJJjmcd",
// index: 1,
// );
// print("GET-Value-ForBigMapKey ===> $getValueForBigMapKey");
}

nodeWriter() async {
Activation activation = Activation(
pkh: "tz1hhkSbaocSWm3wawZUuUdX57L3maSH16Pv",
secret: "9802d2dcc227576700acf963979792d0abf53340",
);

Reveal reveal = Reveal(
gasLimit: "129",
storageLimit: "10",
counter: "213",
fee: "100",
publicKey: "edpkuLog552hecagkykJ3fTvop6grTMhfZY4TWbvchDWdYyxCHcrQL",
source: "tz1VwWdetdADCEMySCumYXWtvf9pZQV3CmE5",
);

Transaction transaction = Transaction(
contractParameters: ContractParameters(
entrypoint: "",
value: "",
),
amount: "",
counter: "",
destination: "",
fee: "",
gasLimit: "",
source: "",
storageLimit: "",
);

Ballot ballot = Ballot(
period: 1,
proposal: "",
source: "",
vote: 0,
);

var sendOP = TezsterSendOperation.sendTransactionOperation(
server: 'https://testnet.tezster.tech',
amount: 1000000,
fee: 100000,
to: 'tz1a4UNywaxaAfh2LRBP2UugQTeCVcLCn5Sa',
derivationPath: '',
keyStore: KeyStore(
publicKey: 'edpkvaUDxsbgxQwXKFph4SUz7HawNnKMG2ESHcTPkYkQXwKRdpz5tm',
privateKey:
'edskRoBCkDEhPzHHoXH5wtSf2LZGVe9z2AiLGNdvY7QFXVJxN62ZvW9LThG3vzMVgcuesDRDr5VSGPQqEW5ky3Te6eNfAbX8eh',
publicKeyHash: 'tz1Sr4tBA28P2QsEM7zpVUM41PSza5R1hFEz',
seed: '',
storeType: StoreType.fundraiser,
),
);
print("sendOP ===> $sendOP");

// {
// sk:
// 'edskRuR1azSfboG86YPTyxrQgosh5zChf5bVDmptqLTb5EuXAm9rsnDYfTKhq7rDQujdn5WWzwUMeV3agaZ6J2vPQT58jJAJPi',
// pk: 'edpkuBknW28nW72KG6RoHtYW7p12T6GKc7nAbwYX5m8Wd9sDVC9yav',
// pkh: 'tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx',
// label: 'bootstrap1',
// }

//Sign operation with public-Key and forged operation
// List<String> signOpGrp = await TezsterDart.signOperationGroup(
// privateKey:
// "edskRdVS5H9YCRAG8yqZkX2nUTbGcaDqjYgopkJwRuPUnYzCn3t9ZGksncTLYe33bFjq29pRhpvjQizCCzmugMGhJiXezixvdC",
// forgedOperation:
// "713cb068fe3ac078351727eb5c34279e22b75b0cf4dc0a8d3d599e27031db136040cb9f9da085607c05cac1ca4c62a3f3cfb8146aa9b7f631e52f877a1d363474404da8130b0b940ee",
// );
// print("signOpGrp ==> $signOpGrp");

// dynamic getBlock = await TezsterNodeReader.getBlock(
// server: 'https://testnet.tezster.tech/',
// hash: "head",
// chainid: "NetXjD3HPJJjmcd",
// );
// print("GET-Block ===> $getBlock");

// String activationData = TezsterNodeWriter.forgeOperations(
// branch: "BLjxPLCWUuFBewguqrojaHhgAcc8jLZneFkpnrVVcYn2zQz4pmW",
// operation: activation,
// );
// print("activationData => $activationData");

// String revealData = TezsterNodeWriter.forgeOperations(
// branch: "BLjxPLCWUuFBewguqrojaHhgAcc8jLZneFkpnrVVcYn2zQz4pmW",
// operation: reveal,
// );
// // print("revealData => $revealData");

// String transactionData = TezsterNodeWriter.forgeOperations(
// branch: "BLjxPLCWUuFBewguqrojaHhgAcc8jLZneFkpnrVVcYn2zQz4pmW",
// operation: transaction,
// );
// // print("transactionData ===> $transactionData");

// String ballotData = TezsterNodeWriter.forgeOperations(
// branch: "BLjxPLCWUuFBewguqrojaHhgAcc8jLZneFkpnrVVcYn2zQz4pmW",
// operation: ballot,
// );
// print("ballotData ===> $ballotData");

// String jsonDecod = jsonDecode(
// '{"name":{"first":"foo","last":"bar"}, "age":31, "city":"New York"}');
// print(jsonDecod);

// String jsonData = TezsterNodeWriter.normalizeMichelineWhiteSpace(jsonDecod);
// print("JSONDATA ===> $jsonData");

// var jsonData =
// '{"accounting":[{"firstName":"John","lastName":"Doe","age":23},{"firstName":"Mary","lastName":"Smith","age":32}],"sales":[{"firstName":"Sally","lastName":"Green","age":27},{"firstName":"Jim","lastName":"Galley","age":41}]}';

// String newJsonData =
// TezsterNodeWriter.normalizeMichelineWhiteSpace(jsonData);
// print("newJsonData ==> $newJsonData");
// // String prettyJson(Map<String, dynamic> json, {int indent = 4}) {
// // var spaces = ' ' * indent;
// // var encoder = JsonEncoder.withIndent(spaces);
// // return encoder.convert(json);
// // }

// print(TezsterNodeWriter.prettyJson({
// "prim": "Right",
// "args": [
// {
// "prim": "Left",
// "args": [
// {"prim": "Unit"}
// ]
// }
// ]
// }));

// print("newJsonData ===> $newJsonData");
// var pubkey = TezsterNodeWriter.writePublicKey(
// "edpkuLog552hecagkykJ3fTvop6grTMhfZY4TWbvchDWdYyxCHcrQL");
// print("pubkey ===> $pubkey");
// TezsterNodeWriter.writeBranch(
// "BKzEzxCwQcXBJNHCxGbnq9H8P3aV7EfFZaot54nShmF3YAgwHDj");

// {
// "destination": "KT1LRre6w4EgkCRLwUugQLEdRGPvJdTmx3Ae",
// "amount": "10",
// "storage_limit": "1000",
// "gas_limit": "100000",
// "counter": "606113",
// "fee": "100000",
// "source": "tz1NN5QooJWkW44KFfrXqLRaxEa5Wxw3f9FF",
// "kind": "transaction",
// "parameters": {
// "entrypoint": "default",
// "value": {
// "prim": "Right",
// "args": [
// {
// "prim": "Left",
// "args": [
// {"prim": "Unit"}
// ]
// }
// ]
// }
// }
// }
}

@override
void initState() {
super.initState();
tezosWalletUtil();
// tezosNodeWriter();
// nodeWriter();
}

@override
Expand Down
41 changes: 3 additions & 38 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -77,21 +77,14 @@ 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"
ed25519:
dependency: transitive
description:
name: ed25519
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.1"
fake_async:
dependency: transitive
description:
Expand Down Expand Up @@ -124,7 +117,7 @@ packages:
name: flutter_sodium
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.8"
version: "0.1.9"
flutter_test:
dependency: "direct dev"
description: flutter
Expand All @@ -137,27 +130,6 @@ 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.2"
http_parser:
dependency: transitive
description:
name: http_parser
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.4"
js:
dependency: transitive
description:
name: js
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.2"
matcher:
dependency: transitive
description:
Expand Down Expand Up @@ -186,13 +158,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0-nullsafety.1"
pedantic:
dependency: transitive
description:
name: pedantic
url: "https://pub.dartlang.org"
source: hosted
version: "1.9.0"
pointycastle:
dependency: transitive
description:
Expand Down Expand Up @@ -253,7 +218,7 @@ packages:
path: ".."
relative: true
source: path
version: "1.0.0"
version: "1.0.1"
typed_data:
dependency: transitive
description:
Expand Down

0 comments on commit aa95709

Please sign in to comment.