-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: lightning message + bip39 support (#6)
* doc: readme * doc: readme fix * feat: setup lightning_message dart and native package * feat: rust code for lightning_message package * feat: add lightning_message package to scripts * feat: separate bip39 out of unified_mnemonic package * feat: lightning message package + remove unified mnemonic package for bip39 and unified wallet packages * fix: analyzer errors and warnings * fix: build
- Loading branch information
Showing
380 changed files
with
9,552 additions
and
2,028 deletions.
There are no files selected for viewing
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
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
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 |
---|---|---|
@@ -1,3 +1,7 @@ | ||
{ | ||
"C_Cpp.errorSquiggles": "disabled" | ||
"C_Cpp.errorSquiggles": "disabled", | ||
"rust-analyzer.linkedProjects": [ | ||
"./packages/bip39/native/Cargo.toml", | ||
"./packages/bip39/native/Cargo.toml" | ||
] | ||
} |
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,14 @@ | ||
# Contributing to Fluttoshi packages | ||
|
||
## Communication channels | ||
|
||
- [GitHub Discussions](https://github.com/kumuly/fluttoshi_packages/discussions) | ||
- [Telegram](https://t.me/kumulydev) | ||
|
||
## Contribution workflow | ||
|
||
### Pull requests | ||
|
||
The repository uses a pull request template to make sure that all pull requests contain the necessary information to be reviewed and merged. | ||
Please make sure to fill in the template when creating a pull request. If you are not sure about some of the information, please ask in the pull request comments. | ||
It also has a code checklist, make sure that your pull request checks all the boxes before asking a review. |
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 |
---|---|---|
@@ -1,9 +1,7 @@ | ||
[workspace] | ||
members = [ | ||
"packages/unified_mnemonic/native", | ||
] | ||
members = ["packages/lightning_message/native", "packages/bip39/native"] | ||
|
||
[profile.release] | ||
lto = true | ||
codegen-units = 1 | ||
debug = true | ||
debug = true |
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,32 @@ | ||
import 'dart:ffi'; | ||
import 'dart:io'; | ||
|
||
import 'package:bip39/bip39.dart'; | ||
|
||
Future<void> main() async { | ||
final bip39 = createWrapper(useLibrary()); | ||
final mnemonic = await bip39.generateInStaticMethodMnemonic( | ||
language: Language.English, | ||
wordCount: WordCount.Words12, | ||
); | ||
|
||
assert(mnemonic.words.length == 12, 'Mnemonic should have 12 words'); | ||
} | ||
|
||
DynamicLibrary useLibrary() { | ||
// If you are running these tests locally, you will need to run | ||
// `cargo build -r` to generate the needed dylib. | ||
const libName = 'bip39'; | ||
final libPrefix = { | ||
Platform.isWindows: '', | ||
Platform.isMacOS: 'lib', | ||
Platform.isLinux: 'lib', | ||
}[true]!; | ||
final libSuffix = { | ||
Platform.isWindows: 'dll', | ||
Platform.isMacOS: 'dylib', | ||
Platform.isLinux: 'so', | ||
}[true]!; | ||
final dylibPath = '../../target/release/$libPrefix$libName.$libSuffix'; | ||
return DynamicLibrary.open(dylibPath); | ||
} |
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,8 @@ | ||
/// Document the library here. | ||
library; | ||
|
||
// Export any libraries intended for clients of this package. | ||
export 'package:flutter_rust_bridge/flutter_rust_bridge.dart' show WasmModule; | ||
|
||
export 'src/bridge_generated.dart'; | ||
export 'src/ffi.dart'; |
Oops, something went wrong.