File tree 2 files changed +8
-17
lines changed 2 files changed +8
-17
lines changed Original file line number Diff line number Diff line change 1
1
import 'package:tfchain_client/tfchain_client.dart' ;
2
2
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
-
13
3
void 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" );
18
6
await client.connect ();
19
7
20
- print (client.keypair! .address);
8
+ final twinId = await client.twins.create (relay: "" , pk: []);
9
+
10
+ print (twinId);
11
+ // await client.kvStrore.list();
21
12
22
- await client.disconnect ();
13
+ // await client.disconnect();
23
14
}
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ part of '../tfchain_client.dart';
3
3
class QueryClient {
4
4
static Map <String , dynamic > connections = {};
5
5
final String url;
6
- late Provider ? provider;
6
+ late WsProvider ? provider;
7
7
late polkadot.Dev api;
8
8
QueryTwins ? _twins;
9
9
QueryContracts ? _contracts;
You can’t perform that action at this time.
0 commit comments