File tree Expand file tree Collapse file tree 2 files changed +8
-17
lines changed Expand file tree Collapse file tree 2 files changed +8
-17
lines changed Original file line number Diff line number Diff line change 11import 'package:tfchain_client/tfchain_client.dart' ;
22
3- // void main() async {
4- // final polkadot =
5- // WsProvider(Uri.parse('wss://tfchain.grid.tf'));
6- // final api = StateApi(polkadot);
7- // print("Attempting to connect (without waiting)...");
8- // final connectFuture = await polkadot.connect();
9- // print("Attempting to disconnect immediately...");
10- // await polkadot.disconnect();
11- // }
12-
133void main () async {
14- final client = Client (
15- "wss://tfchain.grid.tf/ws" ,
16- "0x7a0b1b8278a85a89640c65ad6f7373f4df203fe23da6b9a48f1c199fe1ed00da" ,
17- "sr25519" );
4+ final client =
5+ Client ("wss://tfchain.dev.grid.tf/ws" , "your-mnemonic" , "sr25519" );
186 await client.connect ();
197
20- print (client.keypair! .address);
8+ final twinId = await client.twins.create (relay: "" , pk: []);
9+
10+ print (twinId);
11+ // await client.kvStrore.list();
2112
22- await client.disconnect ();
13+ // await client.disconnect();
2314}
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ part of '../tfchain_client.dart';
33class QueryClient {
44 static Map <String , dynamic > connections = {};
55 final String url;
6- late Provider ? provider;
6+ late WsProvider ? provider;
77 late polkadot.Dev api;
88 QueryTwins ? _twins;
99 QueryContracts ? _contracts;
You can’t perform that action at this time.
0 commit comments