File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 1
1
import 'dart:convert' ;
2
2
import 'dart:io' ;
3
+ import 'dart:typed_data' ;
3
4
4
5
import 'package:arweave/arweave.dart' ;
6
+ import 'package:arweave/utils.dart' ;
5
7
import 'package:test/test.dart' ;
6
8
7
9
import 'utils.dart' ;
@@ -55,5 +57,18 @@ void main() {
55
57
}, onPlatform: {
56
58
'browser' : Skip ('dart:io unavailable' ),
57
59
});
60
+
61
+ test ('sign message with wallet' , () async {
62
+ final wallet = await getTestWallet ();
63
+ final message = utf8.encode ('<test message>' );
64
+
65
+ final signature = await wallet.signMessage (message as Uint8List );
66
+ expect (
67
+ encodeBytesToBase64 (signature),
68
+ startsWith ('II5LxGnPt4WTSz9P__wMAdjzXWlZE-wGbKU7wm4DbGuPXB5Vifs' ),
69
+ );
70
+ }, onPlatform: {
71
+ 'browser' : Skip ('dart:io unavailable' ),
72
+ });
58
73
});
59
74
}
You can’t perform that action at this time.
0 commit comments