├── .gitattributes
├── .github
└── workflows
│ └── dart.yml
├── .gitignore
├── .metadata
├── .vscode
└── launch.json
├── CHANGELOG.md
├── LICENSE
├── README.md
├── analysis_options.yaml
├── example
├── .gitignore
├── .metadata
├── README.md
├── analysis_options.yaml
├── android
│ ├── .gitignore
│ ├── app
│ │ ├── build.gradle
│ │ └── src
│ │ │ ├── debug
│ │ │ └── AndroidManifest.xml
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── kotlin
│ │ │ │ └── com
│ │ │ │ │ └── example
│ │ │ │ │ └── example
│ │ │ │ │ └── MainActivity.kt
│ │ │ └── res
│ │ │ │ ├── drawable-v21
│ │ │ │ └── launch_background.xml
│ │ │ │ ├── drawable
│ │ │ │ └── launch_background.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── values-night
│ │ │ │ └── styles.xml
│ │ │ │ └── values
│ │ │ │ └── styles.xml
│ │ │ └── profile
│ │ │ └── AndroidManifest.xml
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ └── gradle-wrapper.properties
│ └── settings.gradle
├── ios
│ ├── .gitignore
│ ├── Flutter
│ │ ├── AppFrameworkInfo.plist
│ │ ├── Debug.xcconfig
│ │ └── Release.xcconfig
│ ├── Runner.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ │ └── WorkspaceSettings.xcsettings
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ ├── Runner.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ ├── Runner
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ ├── AppIcon.appiconset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ │ ├── Icon-App-20x20@1x.png
│ │ │ │ ├── Icon-App-20x20@2x.png
│ │ │ │ ├── Icon-App-20x20@3x.png
│ │ │ │ ├── Icon-App-29x29@1x.png
│ │ │ │ ├── Icon-App-29x29@2x.png
│ │ │ │ ├── Icon-App-29x29@3x.png
│ │ │ │ ├── Icon-App-40x40@1x.png
│ │ │ │ ├── Icon-App-40x40@2x.png
│ │ │ │ ├── Icon-App-40x40@3x.png
│ │ │ │ ├── Icon-App-60x60@2x.png
│ │ │ │ ├── Icon-App-60x60@3x.png
│ │ │ │ ├── Icon-App-76x76@1x.png
│ │ │ │ ├── Icon-App-76x76@2x.png
│ │ │ │ └── Icon-App-83.5x83.5@2x.png
│ │ │ └── LaunchImage.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── LaunchImage.png
│ │ │ │ ├── LaunchImage@2x.png
│ │ │ │ ├── LaunchImage@3x.png
│ │ │ │ └── README.md
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── Runner-Bridging-Header.h
│ └── RunnerTests
│ │ └── RunnerTests.swift
├── lib
│ ├── bitcoin_cash
│ │ ├── burn_token_example.dart
│ │ ├── create_cash_token_example.dart
│ │ ├── create_nft_example.dart
│ │ ├── make_vout0_example.dart
│ │ ├── minting_nft_example.dart
│ │ ├── old_examples
│ │ │ └── old_example.dart
│ │ ├── p2sh32_spend_example.dart
│ │ ├── send_ft_token_example.dart
│ │ └── transfer_bch_example.dart
│ ├── global
│ │ ├── bch_example.dart
│ │ ├── btc_examples_multisig_taproot_legacy_uncomp.dart
│ │ ├── old_examples
│ │ │ ├── bitcoin_example.dart
│ │ │ ├── dash_example
│ │ │ │ └── dash.dart
│ │ │ ├── doge_example
│ │ │ │ └── doge_example.dart
│ │ │ ├── litecoin_example
│ │ │ │ └── litecoin_example.dart
│ │ │ ├── spending_with_scripts
│ │ │ │ ├── spending_builders.dart
│ │ │ │ └── spending_single_type.dart
│ │ │ └── spending_with_transaction_builder
│ │ │ │ ├── multi_sig_transactions.dart
│ │ │ │ └── transaction_builder_example.dart
│ │ ├── transfer_from_7_account_to_6_accout_example.dart
│ │ └── transfer_to_8_account_example.dart
│ ├── main.dart
│ ├── musig
│ │ ├── methods.dart
│ │ └── musig_example.dart
│ ├── psbt
│ │ ├── psbt_example.dart
│ │ └── psbt_musig2_example.dart
│ └── services_examples
│ │ ├── cross_platform_websocket
│ │ ├── core.dart
│ │ ├── cross.dart
│ │ ├── io.dart
│ │ └── web.dart
│ │ ├── electrum
│ │ ├── electrum_ssl_service.dart
│ │ ├── electrum_tcp_service.dart
│ │ ├── electrum_websocket_service.dart
│ │ └── request_completer.dart
│ │ └── explorer_service
│ │ └── explorer_service.dart
├── linux
│ ├── .gitignore
│ ├── CMakeLists.txt
│ ├── flutter
│ │ ├── CMakeLists.txt
│ │ ├── generated_plugin_registrant.cc
│ │ ├── generated_plugin_registrant.h
│ │ └── generated_plugins.cmake
│ ├── main.cc
│ ├── my_application.cc
│ └── my_application.h
├── macos
│ ├── .gitignore
│ ├── Flutter
│ │ ├── Flutter-Debug.xcconfig
│ │ ├── Flutter-Release.xcconfig
│ │ └── GeneratedPluginRegistrant.swift
│ ├── Runner.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ └── xcshareddata
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ ├── Runner.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ ├── Runner
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── app_icon_1024.png
│ │ │ │ ├── app_icon_128.png
│ │ │ │ ├── app_icon_16.png
│ │ │ │ ├── app_icon_256.png
│ │ │ │ ├── app_icon_32.png
│ │ │ │ ├── app_icon_512.png
│ │ │ │ └── app_icon_64.png
│ │ ├── Base.lproj
│ │ │ └── MainMenu.xib
│ │ ├── Configs
│ │ │ ├── AppInfo.xcconfig
│ │ │ ├── Debug.xcconfig
│ │ │ ├── Release.xcconfig
│ │ │ └── Warnings.xcconfig
│ │ ├── DebugProfile.entitlements
│ │ ├── Info.plist
│ │ ├── MainFlutterWindow.swift
│ │ └── Release.entitlements
│ └── RunnerTests
│ │ └── RunnerTests.swift
├── pubspec.lock
├── pubspec.yaml
├── web
│ ├── favicon.png
│ ├── icons
│ │ ├── Icon-192.png
│ │ ├── Icon-512.png
│ │ ├── Icon-maskable-192.png
│ │ └── Icon-maskable-512.png
│ ├── index.html
│ └── manifest.json
└── windows
│ ├── .gitignore
│ ├── CMakeLists.txt
│ ├── flutter
│ ├── CMakeLists.txt
│ ├── generated_plugin_registrant.cc
│ ├── generated_plugin_registrant.h
│ └── generated_plugins.cmake
│ └── runner
│ ├── CMakeLists.txt
│ ├── Runner.rc
│ ├── flutter_window.cpp
│ ├── flutter_window.h
│ ├── main.cpp
│ ├── resource.h
│ ├── resources
│ └── app_icon.ico
│ ├── runner.exe.manifest
│ ├── utils.cpp
│ ├── utils.h
│ ├── win32_window.cpp
│ └── win32_window.h
├── lib
├── bitcoin_base.dart
└── src
│ ├── bitcoin
│ ├── address
│ │ ├── address.dart
│ │ ├── core.dart
│ │ ├── legacy_address.dart
│ │ ├── network_address.dart
│ │ ├── segwit_address.dart
│ │ └── utils
│ │ │ └── address_utils.dart
│ ├── bitcoin.dart
│ ├── script
│ │ ├── input.dart
│ │ ├── op_code
│ │ │ └── constant.dart
│ │ ├── output.dart
│ │ ├── script.dart
│ │ ├── scripts.dart
│ │ ├── sequence.dart
│ │ ├── transaction.dart
│ │ ├── utils.dart
│ │ └── witness.dart
│ └── taproot
│ │ ├── constants
│ │ └── constants.dart
│ │ ├── taproot.dart
│ │ ├── types
│ │ └── types.dart
│ │ └── utils
│ │ └── utils.dart
│ ├── bitcoin_cash
│ ├── bcmr.dart
│ ├── bcmr_registery.dart
│ └── bitcoin_cash.dart
│ ├── cash_token
│ └── cash_token.dart
│ ├── crypto
│ ├── crypto.dart
│ ├── keypair
│ │ ├── ec_private.dart
│ │ └── ec_public.dart
│ └── musig
│ │ └── signer.dart
│ ├── exception
│ └── exception.dart
│ ├── models
│ └── network.dart
│ ├── provider
│ ├── api_provider.dart
│ ├── constant
│ │ └── constant.dart
│ ├── core
│ │ ├── methods.dart
│ │ └── params.dart
│ ├── electrum_methods
│ │ ├── methods.dart
│ │ └── methods
│ │ │ ├── add_peer.dart
│ │ │ ├── block_headers.dart
│ │ │ ├── broad_cast.dart
│ │ │ ├── donate_address.dart
│ │ │ ├── electrum_version.dart
│ │ │ ├── estimate_fee.dart
│ │ │ ├── get_balance.dart
│ │ │ ├── get_fee_histogram.dart
│ │ │ ├── get_history.dart
│ │ │ ├── get_mempool.dart
│ │ │ ├── get_merkle.dart
│ │ │ ├── get_raw_transaction.dart
│ │ │ ├── get_transaction.dart
│ │ │ ├── get_unspet.dart
│ │ │ ├── get_value_proof.dart
│ │ │ ├── get_verbose_transaction.dart
│ │ │ ├── header.dart
│ │ │ ├── headers_subscribe.dart
│ │ │ ├── id_from_pos.dart
│ │ │ ├── masternode_announce_broadcast.dart
│ │ │ ├── masternode_list.dart
│ │ │ ├── masternode_subscribe.dart
│ │ │ ├── ping.dart
│ │ │ ├── protx_diff.dart
│ │ │ ├── protx_info.dart
│ │ │ ├── relay_fee.dart
│ │ │ ├── script_hash_subscribe.dart
│ │ │ ├── scripthash_unsubscribe.dart
│ │ │ ├── server_banner.dart
│ │ │ ├── server_features.dart
│ │ │ └── server_peer_subscribe.dart
│ ├── models
│ │ ├── block_cypher
│ │ │ └── block_cypher_models.dart
│ │ ├── config.dart
│ │ ├── electrum
│ │ │ └── models.dart
│ │ ├── fee_rate
│ │ │ └── fee_rate.dart
│ │ ├── mempool
│ │ │ └── mempol_models.dart
│ │ ├── models.dart
│ │ ├── multisig_script.dart
│ │ └── utxo_details.dart
│ ├── providers
│ │ ├── electrum.dart
│ │ └── explorer.dart
│ └── services
│ │ ├── electrum.dart
│ │ └── explorer.dart
│ ├── psbt
│ ├── psbt.dart
│ ├── psbt_builder
│ │ ├── builder.dart
│ │ ├── core
│ │ │ └── psbt_builder.dart
│ │ ├── impl
│ │ │ ├── input.dart
│ │ │ ├── output.dart
│ │ │ └── signer.dart
│ │ ├── types
│ │ │ ├── internal_types.dart
│ │ │ └── types.dart
│ │ └── versiones
│ │ │ ├── v1.dart
│ │ │ └── v2.dart
│ ├── reader
│ │ └── byte_reader.dart
│ ├── signer
│ │ └── signer.dart
│ ├── types
│ │ ├── types.dart
│ │ └── types
│ │ │ ├── global.dart
│ │ │ ├── inputs.dart
│ │ │ ├── outputs.dart
│ │ │ ├── psbt.dart
│ │ │ └── types.dart
│ └── utils
│ │ └── utils.dart
│ ├── transaction_builder
│ ├── builder.dart
│ ├── core.dart
│ ├── forked_transaction_builder.dart
│ └── transaction_builder.dart
│ └── utils
│ ├── btc_utils.dart
│ ├── enumerate.dart
│ └── utils.dart
├── pubspec.yaml
└── test
├── bcmr
├── art_collection.dart
├── bcmr_test.dart
├── decentralized_application.dart
├── fungible_token.dart
└── payouts_or_dividends.dart
├── bitcoin_cash_address_test.dart
├── bitcoin_cash_token_encoding_test.dart
├── deserialize_test.dart
├── encode_decode_transaction_test.dart
├── keys_test.dart
├── p2kh_tr_test.dart
├── p2sh_test.dart
├── p2tr_test.dart
├── p2wpkh_test.dart
├── p2wsh_test.dart
└── psbt
├── bip_0174_test.dart
├── bip_0370_test.dart
├── bip_0371_test.dart
├── bip_0373_test.dart
└── builder
├── psbt_builder_sighash_none_test.dart
├── psbt_builder_sighash_single_test.dart
├── psbt_builder_update_input_test.dart
├── psbt_builder_v0_test.dart
├── psbt_update_output_test.dart
├── utxos_vector.dart
└── utxos_vector2.dart
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
--------------------------------------------------------------------------------
/.github/workflows/dart.yml:
--------------------------------------------------------------------------------
1 | # This workflow uses actions that are not certified by GitHub.
2 | # They are provided by a third-party and are governed by
3 | # separate terms of service, privacy policy, and support
4 | # documentation.
5 |
6 | name: Dart
7 |
8 | on:
9 | push:
10 | branches: [ "main" ]
11 | pull_request:
12 | branches: [ "main" ]
13 |
14 | jobs:
15 | build:
16 | runs-on: ubuntu-latest
17 |
18 | steps:
19 | - uses: actions/checkout@v3
20 |
21 | # Note: This workflow uses the latest stable version of the Dart SDK.
22 | # You can specify other versions if desired, see documentation here:
23 | # https://github.com/dart-lang/setup-dart/blob/main/README.md
24 | # - uses: dart-lang/setup-dart@v1
25 | - uses: dart-lang/setup-dart@9a04e6d73cca37bd455e0608d7e5092f881fd603
26 |
27 | # - name: Install dependencies
28 | # run: dart pub get --no-example
29 |
30 | # Uncomment this step to verify the use of 'dart format' on each commit.
31 | # - name: Verify formatting
32 | # run: dart format --output=none --set-exit-if-changed .
33 |
34 | # Consider passing '--fatal-infos' for slightly stricter analysis.
35 | # - name: Analyze project source
36 | # run: dart analyze
37 |
38 | # Your project will need to have tests in test/ and a dependency on
39 | # package:test for this step to succeed. Note that Flutter projects will
40 | # want to change this to 'flutter test'.
41 | - name: Run tests
42 | run: dart test ./test
43 |
44 | - name: Run tests web
45 | run: dart test -p chrome ./test --timeout=20m
46 |
47 | - name: Run tests web wasm
48 | run: dart test -p chrome ./test -c dart2wasm --timeout=20m
49 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 | migrate_working_dir/
12 |
13 | # IntelliJ related
14 | *.iml
15 | *.ipr
16 | *.iws
17 | .idea/
18 |
19 | # The .vscode folder contains launch configuration and tasks you configure in
20 | # VS Code which you may wish to be included in version control, so this line
21 | # is commented out by default.
22 | #.vscode/
23 |
24 | # Flutter/Dart/Pub related
25 | # Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
26 | /pubspec.lock
27 | **/doc/api/
28 | .dart_tool/
29 | .packages
30 | build/
31 | *.zip
32 | /example/test
33 |
--------------------------------------------------------------------------------
/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
8 | channel: stable
9 |
10 | project_type: package
11 |
--------------------------------------------------------------------------------
/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | // Use IntelliSense to learn about possible attributes.
3 | // Hover to view descriptions of existing attributes.
4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5 | "version": "0.2.0",
6 | "configurations": [
7 | {
8 | "name": "bitcoin_base",
9 | "request": "launch",
10 | "type": "dart"
11 | }
12 | ]
13 | }
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | BSD 3-Clause License
2 |
3 | Copyright 2023 MRTNETWORK
4 | All rights reserved.
5 |
6 | Redistribution and use in source and binary forms, with or without
7 | modification, are permitted provided that the following conditions are met:
8 |
9 | * Redistributions of source code must retain the above copyright notice, this
10 | list of conditions and the following disclaimer.
11 |
12 | * Redistributions in binary form must reproduce the above copyright notice,
13 | this list of conditions and the following disclaimer in the documentation
14 | and/or other materials provided with the distribution.
15 |
16 | * Neither the name of the copyright holder nor the names of its
17 | contributors may be used to endorse or promote products derived from
18 | this software without specific prior written permission.
19 |
20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | # This file configures the analyzer, which statically analyzes Dart code to
2 | # check for errors, warnings, and lints.
3 | #
4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6 | # invoked from the command line by running `flutter analyze`.
7 |
8 | # The following line activates a set of recommended lints for Flutter apps,
9 | # packages, and plugins designed to encourage good coding practices.
10 | include: package:flutter_lints/flutter.yaml
11 |
12 | linter:
13 | # The lint rules applied to this project can be customized in the
14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml`
15 | # included above or to enable additional rules. A list of all available lints
16 | # and their documentation is published at https://dart.dev/lints.
17 | #
18 | # Instead of disabling a lint rule for the entire project in the
19 | # section below, it can also be suppressed for a single line of code
20 | # or a specific dart file by using the `// ignore: name_of_lint` and
21 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file
22 | # producing the lint.
23 | rules:
24 | # avoid_print: false # Uncomment to disable the `avoid_print` rule
25 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
26 |
27 | # Additional information about this file can be found at
28 | # https://dart.dev/guides/language/analysis-options
29 |
30 |
--------------------------------------------------------------------------------
/example/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 | migrate_working_dir/
12 |
13 | # IntelliJ related
14 | *.iml
15 | *.ipr
16 | *.iws
17 | .idea/
18 |
19 | # The .vscode folder contains launch configuration and tasks you configure in
20 | # VS Code which you may wish to be included in version control, so this line
21 | # is commented out by default.
22 | #.vscode/
23 |
24 | # Flutter/Dart/Pub related
25 | **/doc/api/
26 | **/ios/Flutter/.last_build_id
27 | .dart_tool/
28 | .flutter-plugins
29 | .flutter-plugins-dependencies
30 | .pub-cache/
31 | .pub/
32 | /build/
33 |
34 | # Symbolication related
35 | app.*.symbols
36 |
37 | # Obfuscation related
38 | app.*.map.json
39 |
40 | # Android Studio will place build artifacts here
41 | /android/app/debug
42 | /android/app/profile
43 | /android/app/release
44 |
--------------------------------------------------------------------------------
/example/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: "78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9"
8 | channel: "stable"
9 |
10 | project_type: app
11 |
12 | # Tracks metadata for the flutter migrate command
13 | migration:
14 | platforms:
15 | - platform: root
16 | create_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
17 | base_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
18 | - platform: android
19 | create_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
20 | base_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
21 | - platform: ios
22 | create_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
23 | base_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
24 | - platform: linux
25 | create_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
26 | base_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
27 | - platform: macos
28 | create_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
29 | base_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
30 | - platform: web
31 | create_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
32 | base_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
33 | - platform: windows
34 | create_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
35 | base_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
36 |
37 | # User provided section
38 |
39 | # List of Local paths (relative to this file) that should be
40 | # ignored by the migrate tool.
41 | #
42 | # Files that are not part of the templates will be ignored by default.
43 | unmanaged_files:
44 | - 'lib/main.dart'
45 | - 'ios/Runner.xcodeproj/project.pbxproj'
46 |
--------------------------------------------------------------------------------
/example/README.md:
--------------------------------------------------------------------------------
1 | # example
2 |
3 | A new Flutter project.
4 |
5 | ## Getting Started
6 |
7 | This project is a starting point for a Flutter application.
8 |
9 | A few resources to get you started if this is your first Flutter project:
10 |
11 | - [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
12 | - [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
13 |
14 | For help getting started with Flutter development, view the
15 | [online documentation](https://docs.flutter.dev/), which offers tutorials,
16 | samples, guidance on mobile development, and a full API reference.
17 |
--------------------------------------------------------------------------------
/example/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | # This file configures the analyzer, which statically analyzes Dart code to
2 | # check for errors, warnings, and lints.
3 | #
4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6 | # invoked from the command line by running `flutter analyze`.
7 |
8 | # The following line activates a set of recommended lints for Flutter apps,
9 | # packages, and plugins designed to encourage good coding practices.
10 | include: package:flutter_lints/flutter.yaml
11 |
12 | linter:
13 | # The lint rules applied to this project can be customized in the
14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml`
15 | # included above or to enable additional rules. A list of all available lints
16 | # and their documentation is published at https://dart.dev/lints.
17 | #
18 | # Instead of disabling a lint rule for the entire project in the
19 | # section below, it can also be suppressed for a single line of code
20 | # or a specific dart file by using the `// ignore: name_of_lint` and
21 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file
22 | # producing the lint.
23 | rules:
24 | # avoid_print: false # Uncomment to disable the `avoid_print` rule
25 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
26 |
27 | # Additional information about this file can be found at
28 | # https://dart.dev/guides/language/analysis-options
29 |
--------------------------------------------------------------------------------
/example/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
9 | # Remember to never publicly share your keystore.
10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11 | key.properties
12 | **/*.keystore
13 | **/*.jks
14 |
--------------------------------------------------------------------------------
/example/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id "com.android.application"
3 | id "kotlin-android"
4 | id "dev.flutter.flutter-gradle-plugin"
5 | }
6 |
7 | def localProperties = new Properties()
8 | def localPropertiesFile = rootProject.file('local.properties')
9 | if (localPropertiesFile.exists()) {
10 | localPropertiesFile.withReader('UTF-8') { reader ->
11 | localProperties.load(reader)
12 | }
13 | }
14 |
15 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
16 | if (flutterVersionCode == null) {
17 | flutterVersionCode = '1'
18 | }
19 |
20 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
21 | if (flutterVersionName == null) {
22 | flutterVersionName = '1.0'
23 | }
24 |
25 | android {
26 | namespace "com.example.example"
27 | compileSdkVersion flutter.compileSdkVersion
28 | ndkVersion flutter.ndkVersion
29 |
30 | compileOptions {
31 | sourceCompatibility JavaVersion.VERSION_1_8
32 | targetCompatibility JavaVersion.VERSION_1_8
33 | }
34 |
35 | kotlinOptions {
36 | jvmTarget = '1.8'
37 | }
38 |
39 | sourceSets {
40 | main.java.srcDirs += 'src/main/kotlin'
41 | }
42 |
43 | defaultConfig {
44 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
45 | applicationId "com.example.example"
46 | // You can update the following values to match your application needs.
47 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
48 | minSdkVersion flutter.minSdkVersion
49 | targetSdkVersion flutter.targetSdkVersion
50 | versionCode flutterVersionCode.toInteger()
51 | versionName flutterVersionName
52 | }
53 |
54 | buildTypes {
55 | release {
56 | // TODO: Add your own signing config for the release build.
57 | // Signing with the debug keys for now, so `flutter run --release` works.
58 | signingConfig signingConfigs.debug
59 | }
60 | }
61 | }
62 |
63 | flutter {
64 | source '../..'
65 | }
66 |
67 | dependencies {}
68 |
--------------------------------------------------------------------------------
/example/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
14 |
18 |
22 |
23 |
24 |
25 |
26 |
27 |
29 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.example
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrtnetwork/bitcoin_base/01d00bbbd1770ac5ca15a246f4cd26bd88f46ae4/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrtnetwork/bitcoin_base/01d00bbbd1770ac5ca15a246f4cd26bd88f46ae4/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrtnetwork/bitcoin_base/01d00bbbd1770ac5ca15a246f4cd26bd88f46ae4/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrtnetwork/bitcoin_base/01d00bbbd1770ac5ca15a246f4cd26bd88f46ae4/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrtnetwork/bitcoin_base/01d00bbbd1770ac5ca15a246f4cd26bd88f46ae4/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/example/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.7.10'
3 | repositories {
4 | google()
5 | mavenCentral()
6 | }
7 |
8 | dependencies {
9 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
10 | }
11 | }
12 |
13 | allprojects {
14 | repositories {
15 | google()
16 | mavenCentral()
17 | }
18 | }
19 |
20 | rootProject.buildDir = '../build'
21 | subprojects {
22 | project.buildDir = "${rootProject.buildDir}/${project.name}"
23 | }
24 | subprojects {
25 | project.evaluationDependsOn(':app')
26 | }
27 |
28 | tasks.register("clean", Delete) {
29 | delete rootProject.buildDir
30 | }
31 |
--------------------------------------------------------------------------------
/example/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx4G
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/example/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | zipStoreBase=GRADLE_USER_HOME
4 | zipStorePath=wrapper/dists
5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
6 |
--------------------------------------------------------------------------------
/example/android/settings.gradle:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | def flutterSdkPath = {
3 | def properties = new Properties()
4 | file("local.properties").withInputStream { properties.load(it) }
5 | def flutterSdkPath = properties.getProperty("flutter.sdk")
6 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
7 | return flutterSdkPath
8 | }
9 | settings.ext.flutterSdkPath = flutterSdkPath()
10 |
11 | includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
12 |
13 | repositories {
14 | google()
15 | mavenCentral()
16 | gradlePluginPortal()
17 | }
18 |
19 | plugins {
20 | id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false
21 | }
22 | }
23 |
24 | plugins {
25 | id "dev.flutter.flutter-plugin-loader" version "1.0.0"
26 | id "com.android.application" version "7.3.0" apply false
27 | }
28 |
29 | include ":app"
30 |
--------------------------------------------------------------------------------
/example/ios/.gitignore:
--------------------------------------------------------------------------------
1 | **/dgph
2 | *.mode1v3
3 | *.mode2v3
4 | *.moved-aside
5 | *.pbxuser
6 | *.perspectivev3
7 | **/*sync/
8 | .sconsign.dblite
9 | .tags*
10 | **/.vagrant/
11 | **/DerivedData/
12 | Icon?
13 | **/Pods/
14 | **/.symlinks/
15 | profile
16 | xcuserdata
17 | **/.generated/
18 | Flutter/App.framework
19 | Flutter/Flutter.framework
20 | Flutter/Flutter.podspec
21 | Flutter/Generated.xcconfig
22 | Flutter/ephemeral/
23 | Flutter/app.flx
24 | Flutter/app.zip
25 | Flutter/flutter_assets/
26 | Flutter/flutter_export_environment.sh
27 | ServiceDefinitions.json
28 | Runner/GeneratedPluginRegistrant.*
29 |
30 | # Exceptions to above rules.
31 | !default.mode1v3
32 | !default.mode2v3
33 | !default.pbxuser
34 | !default.perspectivev3
35 |
--------------------------------------------------------------------------------
/example/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 11.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/example/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/example/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
37 |
38 |
39 |
40 |
43 |
49 |
50 |
51 |
52 |
53 |
63 |
65 |
71 |
72 |
73 |
74 |
80 |
82 |
88 |
89 |
90 |
91 |
93 |
94 |
97 |
98 |
99 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrtnetwork/bitcoin_base/01d00bbbd1770ac5ca15a246f4cd26bd88f46ae4/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrtnetwork/bitcoin_base/01d00bbbd1770ac5ca15a246f4cd26bd88f46ae4/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrtnetwork/bitcoin_base/01d00bbbd1770ac5ca15a246f4cd26bd88f46ae4/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrtnetwork/bitcoin_base/01d00bbbd1770ac5ca15a246f4cd26bd88f46ae4/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrtnetwork/bitcoin_base/01d00bbbd1770ac5ca15a246f4cd26bd88f46ae4/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrtnetwork/bitcoin_base/01d00bbbd1770ac5ca15a246f4cd26bd88f46ae4/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrtnetwork/bitcoin_base/01d00bbbd1770ac5ca15a246f4cd26bd88f46ae4/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrtnetwork/bitcoin_base/01d00bbbd1770ac5ca15a246f4cd26bd88f46ae4/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrtnetwork/bitcoin_base/01d00bbbd1770ac5ca15a246f4cd26bd88f46ae4/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrtnetwork/bitcoin_base/01d00bbbd1770ac5ca15a246f4cd26bd88f46ae4/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrtnetwork/bitcoin_base/01d00bbbd1770ac5ca15a246f4cd26bd88f46ae4/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrtnetwork/bitcoin_base/01d00bbbd1770ac5ca15a246f4cd26bd88f46ae4/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrtnetwork/bitcoin_base/01d00bbbd1770ac5ca15a246f4cd26bd88f46ae4/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrtnetwork/bitcoin_base/01d00bbbd1770ac5ca15a246f4cd26bd88f46ae4/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrtnetwork/bitcoin_base/01d00bbbd1770ac5ca15a246f4cd26bd88f46ae4/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrtnetwork/bitcoin_base/01d00bbbd1770ac5ca15a246f4cd26bd88f46ae4/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrtnetwork/bitcoin_base/01d00bbbd1770ac5ca15a246f4cd26bd88f46ae4/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrtnetwork/bitcoin_base/01d00bbbd1770ac5ca15a246f4cd26bd88f46ae4/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/example/ios/Runner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
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 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/example/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
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 |
--------------------------------------------------------------------------------
/example/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleDisplayName
8 | Example
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | example
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | $(FLUTTER_BUILD_NAME)
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | $(FLUTTER_BUILD_NUMBER)
25 | LSRequiresIPhoneOS
26 |
27 | UILaunchStoryboardName
28 | LaunchScreen
29 | UIMainStoryboardFile
30 | Main
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 | CADisableMinimumFrameDurationOnPhone
45 |
46 | UIApplicationSupportsIndirectInputEvents
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/example/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/example/ios/RunnerTests/RunnerTests.swift:
--------------------------------------------------------------------------------
1 | import Flutter
2 | import UIKit
3 | import XCTest
4 |
5 | class RunnerTests: XCTestCase {
6 |
7 | func testExample() {
8 | // If you add code to the Runner application, consider adding tests here.
9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest.
10 | }
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/example/lib/bitcoin_cash/make_vout0_example.dart:
--------------------------------------------------------------------------------
1 | import 'package:bitcoin_base/bitcoin_base.dart';
2 | import 'package:blockchain_utils/blockchain_utils.dart';
3 | import 'package:example/services_examples/electrum/electrum_ssl_service.dart';
4 |
5 | /// make vout 0 for account for create token hash
6 | /// estimate transaction to your self with input 0
7 |
8 | void main() async {
9 | /// connect to electrum service with ssl
10 | /// please see `services_examples` folder for how to create electrum ssl service
11 | final service =
12 | await ElectrumSSLService.connect("chipnet.imaginary.cash:50002");
13 |
14 | /// create provider with service
15 | final provider = ElectrumProvider(service);
16 |
17 | /// initialize private key
18 | final privateKey = ECPrivate.fromBytes(BytesUtils.fromHexString(
19 | "f9061c5cb343c6b6a73900ee29509bb0bd2213319eea46d2f2a431068c9da06b"));
20 |
21 | /// public key
22 | final publicKey = privateKey.getPublic();
23 |
24 | /// network
25 | const network = BitcoinCashNetwork.testnet;
26 |
27 | /// Derives a P2PKH address from the given public key and converts it to a Bitcoin Cash address
28 | /// for enhanced accessibility within the network.
29 | final p2pkhAddress = publicKey.toAddress();
30 |
31 | /// Reads all UTXOs (Unspent Transaction Outputs) associated with the account.
32 | /// We does not need tokens utxo and we set to false.
33 | final elctrumUtxos =
34 | await provider.request(ElectrumRequestScriptHashListUnspent(
35 | scriptHash: p2pkhAddress.pubKeyHash(),
36 | includeTokens: false,
37 | ));
38 |
39 | /// Converts all UTXOs to a list of UtxoWithAddress, containing UTXO information along with address details.
40 | final List utxos = elctrumUtxos
41 | .map((e) => UtxoWithAddress(
42 | utxo: e.toUtxo(p2pkhAddress.type),
43 | ownerDetails: UtxoAddressDetails(
44 | publicKey: publicKey.toHex(), address: p2pkhAddress)))
45 | .toList();
46 |
47 | /// som of utxos in satoshi
48 | final sumOfUtxo = utxos.sumOfUtxosValue();
49 |
50 | final bchTransaction = ForkedTransactionBuilder(
51 | outPuts: [
52 | BitcoinOutput(
53 | address: p2pkhAddress,
54 | value: sumOfUtxo - BtcUtils.toSatoshi("0.00003"),
55 | )
56 | ],
57 | fee: BtcUtils.toSatoshi("0.00003"),
58 | network: network,
59 |
60 | /// Bitcoin Cash Metadata Registries
61 | /// pleas see https://cashtokens.org/docs/bcmr/chip/ for how to create cash metadata
62 | /// we does not create metadata for this token
63 | memo: null,
64 | utxos: utxos,
65 | );
66 | final transaaction =
67 | bchTransaction.buildTransaction((trDigest, utxo, publicKey, sighash) {
68 | return privateKey.signECDSA(trDigest, sighash: sighash);
69 | });
70 |
71 | /// transaction ID
72 | final _ = transaaction.txId();
73 |
74 | /// for calculation fee (serialized transaction bytes length)
75 | transaaction.getSize();
76 |
77 | /// raw of encoded transaction in hex
78 | final transactionRaw = transaaction.toHex();
79 |
80 | /// send transaction to network
81 | await provider.request(
82 | ElectrumRequestBroadCastTransaction(transactionRaw: transactionRaw));
83 |
84 | /// done! check the transaction in block explorer
85 | /// https://chipnet.imaginary.cash/tx/b20d4c13fe67adc2f73aee0161eb51c7e813643ddc8eb655c6bd9ae72b7562cb
86 | }
87 |
--------------------------------------------------------------------------------
/example/lib/global/bch_example.dart:
--------------------------------------------------------------------------------
1 | import 'package:bitcoin_base/bitcoin_base.dart';
2 | import 'package:blockchain_utils/blockchain_utils.dart';
3 | import 'package:example/services_examples/electrum/electrum_websocket_service.dart';
4 |
5 | void main() async {
6 | /// connect to electrum service with websocket
7 | /// please see `services_examples` folder for how to create electrum websocket service
8 | final service = await ElectrumWebSocketService.connect(
9 | "wss://chipnet.imaginary.cash:50004");
10 |
11 | /// create provider with service
12 | final provider = ElectrumProvider(service);
13 |
14 | /// initialize private key
15 | final privateKey = ECPrivate.fromBytes(BytesUtils.fromHexString(
16 | "f9061c5cb343c6b6a73900ee29509bb0bd2213319eea46d2f2a431068c9da06b"));
17 |
18 | /// public key
19 | final publicKey = privateKey.getPublic();
20 |
21 | /// network
22 | const network = BitcoinCashNetwork.testnet;
23 |
24 | /// Derives a P2PKH address from the given public key and converts it to a Bitcoin Cash address
25 | /// for enhanced accessibility within the network.
26 | final p2pkhAddress =
27 | BitcoinCashAddress.fromBaseAddress(publicKey.toAddress());
28 |
29 | /// Initialize two P2SH32 addresses for receiving funds.
30 | final p2sh32Example1 = BitcoinCashAddress(
31 | "bchtest:pw054wtjjc70rrvx4ftl4p63gluedyt0qmpgz705f8x3gxygrzarzls7vp2sj",
32 | network: network);
33 | final p2sh32Example2 = BitcoinCashAddress(
34 | "bchtest:pvw39llgap0a4vm8jn9sjsvfsthah4wgemjlh6epdtzr3pl2fqtmsn3s4vcm7",
35 | network: network);
36 |
37 | /// Reads all UTXOs (Unspent Transaction Outputs) associated with the account.
38 | /// We does not need tokens utxo and we set to false.
39 | final elctrumUtxos =
40 | await provider.request(ElectrumRequestScriptHashListUnspent(
41 | scriptHash: p2pkhAddress.baseAddress.pubKeyHash(),
42 | includeTokens: false,
43 | ));
44 |
45 | /// Converts all UTXOs to a list of UtxoWithAddress, containing UTXO information along with address details.
46 | final List utxos = elctrumUtxos
47 | .map((e) => UtxoWithAddress(
48 | utxo: e.toUtxo(p2pkhAddress.type),
49 | ownerDetails: UtxoAddressDetails(
50 | publicKey: publicKey.toHex(), address: p2pkhAddress.baseAddress)))
51 | .toList();
52 |
53 | /// som of utxos in satoshi
54 | final sumOfUtxo = utxos.sumOfUtxosValue();
55 | if (sumOfUtxo == BigInt.zero) {
56 | return;
57 | }
58 |
59 | final bchTransaction = ForkedTransactionBuilder(
60 | outPuts: [
61 | /// change input (sumofutxos - spend)
62 | BitcoinOutput(
63 | address: p2pkhAddress.baseAddress,
64 | value: sumOfUtxo -
65 | (BtcUtils.toSatoshi("0.0001") +
66 | BtcUtils.toSatoshi("0.0001") +
67 | BtcUtils.toSatoshi("0.00003")),
68 | ),
69 | BitcoinOutput(
70 | address: p2sh32Example1.baseAddress,
71 | value: BtcUtils.toSatoshi("0.0001"),
72 | ),
73 | BitcoinOutput(
74 | address: p2sh32Example2.baseAddress,
75 | value: BtcUtils.toSatoshi("0.0001"),
76 | ),
77 | ],
78 | fee: BtcUtils.toSatoshi("0.00003"),
79 | network: network,
80 | utxos: utxos,
81 | );
82 | final transaaction =
83 | bchTransaction.buildTransaction((trDigest, utxo, publicKey, sighash) {
84 | return privateKey.signECDSA(trDigest, sighash: sighash);
85 | });
86 |
87 | /// transaction ID
88 | transaaction.txId();
89 |
90 | /// for calculation fee
91 | transaaction.getSize();
92 |
93 | /// raw of encoded transaction in hex
94 | final transactionRaw = transaaction.toHex();
95 |
96 | /// send transaction to network
97 | await provider.request(
98 | ElectrumRequestBroadCastTransaction(transactionRaw: transactionRaw));
99 |
100 | /// done! check the transaction in block explorer
101 | /// https://chipnet.imaginary.cash/tx/9e534f8a64f76b1af5ccf2522392697f2242fd215206a458cfe286bca4a3ec0a
102 | }
103 |
--------------------------------------------------------------------------------
/example/lib/musig/methods.dart:
--------------------------------------------------------------------------------
1 | import 'package:bitcoin_base/bitcoin_base.dart';
2 | import 'package:example/services_examples/electrum/electrum_ssl_service.dart';
3 |
4 | Future getProvider(
5 | {String url = "testnet4-electrumx.wakiyamap.dev:51002"}) async {
6 | // final service = await ElectrumSSLService.connect(
7 | // "testnet4-electrumx.wakiyamap.dev:51002");
8 |
9 | final service =
10 | await ElectrumSSLService.connect("testnet.aranguren.org:51002");
11 | return ElectrumProvider(service);
12 | }
13 |
14 | class PsbtUtxoRequest {
15 | final BitcoinBaseAddress address;
16 | final Script? p2shRedeemScript;
17 | final Script? witnessScript;
18 | final TapLeafMerkleProof? merkleProof;
19 | final TaprootTree? treeScript;
20 | final TaprootLeaf? leafScript;
21 | final List? xOnlyOrInternalPubKey;
22 | final List? merkleRoot;
23 | final List? leafScripts;
24 | final List privateKeys;
25 | final List? muSig2ParticipantPublicKeys;
26 | final List? ripemd160;
27 | final List? sha256;
28 | final List? hash160;
29 | final List? hash256;
30 | const PsbtUtxoRequest(
31 | {required this.address,
32 | this.p2shRedeemScript,
33 | this.witnessScript,
34 | this.leafScript,
35 | this.merkleProof,
36 | this.treeScript,
37 | this.xOnlyOrInternalPubKey,
38 | this.merkleRoot,
39 | this.leafScripts,
40 | this.privateKeys = const [],
41 | this.muSig2ParticipantPublicKeys,
42 | this.ripemd160,
43 | this.hash160,
44 | this.hash256,
45 | this.sha256});
46 | }
47 |
48 | Future> getPsbtUtxo(
49 | {required List addresses,
50 | bool local = true,
51 | List