Skip to content

Commit

Permalink
bump polkadart-dependencies and switch from path to pub dev deps for …
Browse files Browse the repository at this point in the history
…sr25519 & polkadart_keyring (#389)

* use pub dev as source for sr25519 package

* bump polkadart packages to latest version an fix warnings

* fmt
  • Loading branch information
clangenb authored Jan 9, 2024
1 parent a05a00e commit 900ecf8
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
10 changes: 5 additions & 5 deletions examples/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ environment:
dependencies:
convert: ^3.1.1
polkadart: ^0.2.0
polkadart_cli: ^0.2.0
polkadart_keyring: ^0.2.0
polkadart_scale_codec: ^1.1.0
ss58: ^1.1.0
polkadart_cli: ^0.3.0
polkadart_keyring: ^0.2.1
polkadart_scale_codec: ^1.1.2
ss58: ^1.1.2
substrate_bip39: ^0.2.0
substrate_metadata: ^1.1.0
substrate_metadata: ^1.1.2

# Generated files depend on quiver
quiver: ^3.2.1
Expand Down
7 changes: 3 additions & 4 deletions packages/polkadart/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@ dependencies:
http: ^1.1.0 # BSD-3-Clause
pointycastle: ^3.6.2 # MIT
web_socket_channel: ^2.3.0 # BSD-3-Clause
polkadart_scale_codec: ^1.1.0 # Apache 2.0
substrate_metadata: ^1.1.0 # Apache 2.0
polkadart_scale_codec: ^1.1.2 # Apache 2.0
substrate_metadata: ^1.1.2 # Apache 2.0
hashlib_codecs: ^2.2.0 # BSD-3-Clause
polkadart_keyring:
path: ../polkadart_keyring
polkadart_keyring: ^0.2.1

dev_dependencies:
lints: ^2.0.0
Expand Down
1 change: 1 addition & 0 deletions packages/polkadart_keyring/lib/src/keypair.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ abstract class KeyPair {
static Sr25519KeyPair get sr25519 => Sr25519KeyPair();
late int ss58Format;
final KeyPairType keyPairType;
// ignore: prefer_final_fields
bool _isLocked = false;

/// constructor
Expand Down
5 changes: 2 additions & 3 deletions packages/polkadart_keyring/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@ environment:
dependencies:
cryptography: ^2.5.0
flutter_curve25519: ^0.1.2
ss58: ^1.1.0
ss58: ^1.1.2
substrate_bip39: ^0.2.0
typed_data: ^1.3.1 # BSD-3-Clause
ed25519_edwards: ^0.3.1
convert: ^3.1.1
sr25519:
path: ../sr25519
sr25519: ^0.1.0
merlin: ^1.0.3
collection: ^1.18.0

Expand Down
5 changes: 3 additions & 2 deletions packages/polkadart_keyring/test/keypair_sr25519_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import 'package:test/test.dart';
void main() {
group('Sr25519 test cases', () {
late Keyring keyring;
late Uint8List seedOne;
late List<int> seedOne;
late List<int> seedTwo;
late List<int> publicKeyOne;
late List<int> publicKeyTwo;
Expand Down Expand Up @@ -112,7 +112,8 @@ void main() {
});

test('signs and verifies', () {
final Uint8List message = utf8.encode('this is a message');
final Uint8List message =
Uint8List.fromList(utf8.encode('this is a message'));
final pair = keyring.getByPublicKey(publicKeyOne);
final signature = pair.sign(message);
expect(pair.verify(message, signature), true);
Expand Down
2 changes: 1 addition & 1 deletion packages/substrate_bip39/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies:
collection: ^1.17.2
cryptography: ^2.5.0
pointycastle: ^3.6.2
polkadart_scale_codec: ^1.1.0
polkadart_scale_codec: ^1.1.2

dev_dependencies:
lints: ^2.0.0
Expand Down
2 changes: 1 addition & 1 deletion packages/substrate_metadata/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies:
equatable: ^2.0.5
json_schema2: ^2.0.2+9 # MIT
pointycastle: ^3.6.2 # BSD-3-Clause
polkadart_scale_codec: ^1.1.0
polkadart_scale_codec: ^1.1.2
utility: ^1.0.3

dev_dependencies:
Expand Down

0 comments on commit 900ecf8

Please sign in to comment.