-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathregistry.dart
More file actions
31 lines (29 loc) · 925 Bytes
/
registry.dart
File metadata and controls
31 lines (29 loc) · 925 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/// Provides access to registry functions like creating, signing, and verifying.
///
/// ```dart
/// // Assuming you have a CryptoImplementation instance named 'crypto'
/// final CryptoImplementation crypto = s5.crypto; // create s5 node earlier
///
/// // Generate a key pair
/// final keyPair = await crypto.newKeyPairEd25519();
///
/// // Data to store in the registry entry
/// final data = Uint8List.fromList([1, 2, 3, 4, 5]);
/// final revision = 1;
///
/// // Create and sign the registry entry
/// final entry = await SignedRegistryEntry.create(
/// kp: keyPair,
/// data: data,
/// revision: revision,
/// crypto: crypto,
/// );
///
/// // Verify the signed registry entry
/// final isValid = await entry.verify(crypto: crypto);
///
/// print('Registry entry is valid: $isValid');
library lib5.registry;
export 'src/registry/entry.dart';
export 'src/registry/sign.dart';
export 'src/registry/verify.dart';