-
-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Yuki Kishimoto <[email protected]>
- Loading branch information
Showing
13 changed files
with
1,345 additions
and
37 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
bindings/nostr-sdk-flutter/lib/src/rust/api/protocol/key/secret_key.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// This file is automatically generated, so please do not edit it. | ||
// @generated by `flutter_rust_bridge`@ 2.5.1. | ||
|
||
// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import | ||
|
||
import '../../../frb_generated.dart'; | ||
import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; | ||
|
||
// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `from`, `from` | ||
// These functions have error during generation (see debug logs or enable `stop_on_error: true` for more details): `to_secret_bytes` | ||
|
||
// Rust type: RustOpaqueMoi<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<_SecretKey>> | ||
abstract class SecretKey implements RustOpaqueInterface { | ||
static SecretKey fromHex({required String secretKey}) => RustLib.instance.api | ||
.crateApiProtocolKeySecretKeySecretKeyFromHex(secretKey: secretKey); | ||
|
||
static SecretKey fromSlice({required List<int> secretKey}) => | ||
RustLib.instance.api | ||
.crateApiProtocolKeySecretKeySecretKeyFromSlice(secretKey: secretKey); | ||
|
||
/// Generate random secret key | ||
/// | ||
/// This constructor use a random number generator that retrieves randomness from the operating system. | ||
static SecretKey generate() => | ||
RustLib.instance.api.crateApiProtocolKeySecretKeySecretKeyGenerate(); | ||
|
||
/// Parse from `hex` or `bech32` | ||
static SecretKey parse({required String secretKey}) => RustLib.instance.api | ||
.crateApiProtocolKeySecretKeySecretKeyParse(secretKey: secretKey); | ||
|
||
Future<String> toBech32(); | ||
|
||
Future<String> toSecretHex(); | ||
} |
Oops, something went wrong.