-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into v1.0.0-alpha.11
- Loading branch information
1 parent
2fbb172
commit 8f01157
Showing
59 changed files
with
73,327 additions
and
45,817 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
## [1.0.0-alpha.11] | ||
|
||
## [0.31.2] | ||
Updated `flutter_rust_bridge` to `2.0.0`. | ||
#### APIs added | ||
|
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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import 'package:bdk_flutter/bdk_flutter.dart'; | ||
import 'package:flutter/foundation.dart'; | ||
import 'package:flutter_test/flutter_test.dart'; | ||
import 'package:integration_test/integration_test.dart'; | ||
|
||
void main() { | ||
IntegrationTestWidgetsFlutterBinding.ensureInitialized(); | ||
group('Descriptor & Keys', () { | ||
setUp(() async {}); | ||
testWidgets('Muti-sig wallet generation', (_) async { | ||
final descriptor = await Descriptor.create( | ||
descriptor: | ||
"wsh(or_d(pk([24d87569/84'/1'/0'/0/0]tpubDHebJGZWZaZ3JkhwTx5DytaRpFhK9ffFaN9PMBm7m63bdkdxqKgXkSPMzYzfDAGStx8LWt4b2CgGm86BwtNuG6PdsxsLVmuf6EjREX3oHjL/0/0/*),and_v(v:older(12),pk([24d87569/84'/1'/0'/0/0]tpubDHebJGZWZaZ3JkhwTx5DytaRpFhK9ffFaN9PMBm7m63bdkdxqKgXkSPMzYzfDAGStx8LWt4b2CgGm86BwtNuG6PdsxsLVmuf6EjREX3oHjL/0/1/*))))", | ||
network: Network.testnet); | ||
final changeDescriptor = await Descriptor.create( | ||
descriptor: | ||
"wsh(or_d(pk([24d87569/84'/1'/0'/1/0]tpubDHebJGZWZaZ3JkhwTx5DytaRpFhK9ffFaN9PMBm7m63bdkdxqKgXkSPMzYzfDAGStx8LWt4b2CgGm86BwtNuG6PdsxsLVmuf6EjREX3oHjL/1/0/*),and_v(v:older(12),pk([24d87569/84'/1'/0'/1/0]tpubDHebJGZWZaZ3JkhwTx5DytaRpFhK9ffFaN9PMBm7m63bdkdxqKgXkSPMzYzfDAGStx8LWt4b2CgGm86BwtNuG6PdsxsLVmuf6EjREX3oHjL/1/1/*))))", | ||
network: Network.testnet); | ||
|
||
final wallet = await Wallet.create( | ||
descriptor: descriptor, | ||
changeDescriptor: changeDescriptor, | ||
network: Network.testnet, | ||
connection: await Connection.createInMemory()); | ||
debugPrint(wallet.network().toString()); | ||
}); | ||
testWidgets('Derive descriptorSecretKey Manually', (_) async { | ||
final mnemonic = await Mnemonic.create(WordCount.words12); | ||
final descriptorSecretKey = await DescriptorSecretKey.create( | ||
network: Network.testnet, mnemonic: mnemonic); | ||
debugPrint(descriptorSecretKey.toString()); | ||
|
||
for (var e in [0, 1]) { | ||
final derivationPath = | ||
await DerivationPath.create(path: "m/84'/1'/0'/$e"); | ||
final derivedDescriptorSecretKey = | ||
await descriptorSecretKey.derive(derivationPath); | ||
debugPrint(derivedDescriptorSecretKey.toString()); | ||
debugPrint(derivedDescriptorSecretKey.toPublic().toString()); | ||
final descriptor = await Descriptor.create( | ||
descriptor: "wpkh($derivedDescriptorSecretKey)", | ||
network: Network.testnet); | ||
|
||
debugPrint(descriptor.toString()); | ||
} | ||
}); | ||
}); | ||
} |
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,6 +1,6 @@ | ||
import 'package:bdk_flutter_example/simple_wallet.dart'; | ||
import 'package:bdk_flutter_example/wallet.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
void main() { | ||
runApp(const SimpleWallet()); | ||
runApp(const BdkWallet()); | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.