A reference credential wallet built on Flutter and DIDKit.

Related tags

Templates credible
Overview

Credible header

Check out the Credible documentation here.

Credible

Credible is a native mobile wallet that supports W3C Verifiable Credentials and Decentralized Identifiers built on DIDKit and Flutter. We packaged the DIDKit library written in Rust into a Flutter application running on both Android and iOS, using C bindings and Dart’s FFI capabilities. This is the wallet counterpart to the rich, growing toolkit supplied by DIDKit, the two pillars of a reference architecture for creating trusted interactions at scale.

Maturity disclaimer

In the v0.1 release on February 10, 2021, Credible has not yet undergone a formal security audit and to desired levels of confidence for suitable use in production systems. This implementation is currently suitable for exploratory work and experimentation only. We welcome feedback on the usability, architecture, and security of this implementation and are committed to a conducting a formal audit with a reputable security firm before the v1.0 release. We are also working on large stability improvements through a continuous integration testing process across Android and iOS.

We are setting up a process to accept contributions. Please feel free to open issues or PRs in the interim, but we cannot merge external changes until this process is in place.

We are also in the process of listing Credible on the iOS TestFlight and Android Play Beta programs, and eventually their respective app marketplaces plus F-Droid.

Common Dependencies

To manually build Credible for either Android or iOS, you will need to install the following dependencies:

  • Rust
  • Java 7 or higher
  • Flutter (dev channel)
  • DIDKit/SSI
  • wasm-pack (WEB)
  • binaryen (WEB and targeting ASM.js)

Rust

It is recommended to use rustup to manage your Rust installation.

Java

On Ubuntu you could run:

# apt update
# apt install openjdk-8-jdk

For more information, please refer to the documentation of your favorite flavour of Java and your operating system/package manager.

Flutter

Please follow the official instalation instructions available here to install Flutter, don't forget to also install the build dependencies for the platform you will be building (Android SDK/NDK, Xcode, etc).

We currently only support build this project using the dev channel of Flutter.

To change your installation to the dev channel, please execute the following command:

$ flutter channel dev
$ flutter upgrade

To confirm that everything is setup correctly, please run the following command and resolve any issues that arise before proceeding to the next steps.

$ flutter doctor

wasm-pack (Required for both WEB targets)

To build the WASM target you will need wasm-pack, it can be obtained running:

$ curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh

binaryen

To build Credible for WEB using ASM.js you will need binaryen, which allows the conversion of DIDKit WASM to ASM.js. This is necessary when you don't have WASM support and need to run your page in pure Javascript. More detailed instructions on how to build binaryen can be found here.

If you are in a UNIX-like distribution you just have to clone the repo and build, we recommend cloning into your ${HOME}, to avoid having to specify the ${BINARYEN_ROOT} variable:

$ git clone https://github.com/WebAssembly/binaryen ~/binaryen
$ cd ~/binaryen
$ cmake . && make

DIDKit and SSI

This project also depends on two other Spruce projects, DIDKit and SSI.

These projects are all configured to work with relative paths by default, so it is recommended to clone them all under the same root directory, for example $HOME/spruceid/{didkit,ssi,credible}.

Target-Specific Dependencies

Android Dependencies

To build Credible for Android, you will require both the Android SDK and NDK.

These two dependencies can be easily obtained with Android Studio, which install further dependencies upon first being opened after installation. Installing the appropriate Android NDK (often not the newest) in Android Studio can be accomplished by going to Settings > Appearance & Behavior > System Settings > Android SDK and selecting to install the "NDK (Side by Side)". An alternative method of installing SDK and NDK without Android Studio can be found in the optional install_android_dependencies.sh script included here.

If your Android SDK doesn't live at $HOME/Android/Sdk you will need to set ANDROID_SDK_ROOT like so:

$ export ANDROID_SDK_ROOT=/path/to/Android/Sdk

:::note Some users have experienced difficulties with cross-compilation artefacts missing from the newest NDK, which is downloaded by default in the installation process. If you experience errors of this kind, you may have to manually downgrade or install multiple NDK versions as [shown here])(img/ndk_downgrade.png) in the Android Studio installer (screengrabbed from an Ubuntu installation). Alternately, running all or parts of the install_android_dependencies.sh script may be helpful.

If your build-tools and/or NDK live in different locations than the default ones inside /SDK/, or if you want to specify a specific NDK or build-tools version, you can manually configure the following two environment variables:

$ export ANDROID_TOOLS=/path/to/SDK/build-tools/XX.X.X/
$ export ANDROID_NDK_HOME=/path/to/SDK/ndk/XX.X.XXXXX/

:::

iOS Dependencies

To build Credible for iOS you will need to install CocoaPods, which can be done with Homebrew on MacOS.

$ brew install cocoapods

Building DIDKit for different targets

Android

To build DIDKit for the Android targets, you will go to the root of DIDKit and run:

$ make -C lib install-rustup-android
$ make -C lib ../target/test/java.stamp
$ make -C lib ../target/test/android.stamp
$ make -C lib ../target/test/flutter.stamp
$ cargo build

This may take some time as it compiles the entire project for multiple targets

Android APK

$ flutter build apk

Android App Bundle

$ flutter build appbundle

iOS

To build DIDKit for the iOS targets, you will go to the root of DIDKit and run :

$ make -C lib install-rustup-ios 
$ make -C lib ../target/test/ios.stamp
$ cargo build

Web using WASM

$ make -C lib ../target/test/wasm.stamp

Web using ASM.js

If you have installed bynarien somewhere other than $HOME, you will have to set BYNARIEN_ROOT as shown below, otherwise, just run the make command.

$ export BINARYEN_ROOT=/path/to/binaryen
$ make -C lib ../target/test/asmjs.stamp

Building Credible

You are now ready to build or run Credible.

Run on emulator

If you want to run the project on your connected device, you can use:

$ flutter run

Run on browser

If you want to run the project on your browser, you can use:

$ flutter run -d chrome --csp --release

Otherwise, Flutter allows us to build many artifacts for Android, iOS and WEB, below you can find the most common and useful commands, all of which you should run from the root of Credible.

iOS .app for Simulator

$ flutter build ios --simulator

iOS .app for Devices

$ flutter build ios --no-codesign

iOS IPA

$ flutter build ipa

Web

$ flutter build web \
  --csp \
  --release

If you don't have support for WASM, you'll probably need to provide your own canvaskit dependency without WASM as well as DIDKit, to do that you need to specify the FLUTTER_WEB_CANVASKIT_URL in the build command like below.

$ flutter build web \
  --csp \
  --dart-define=FLUTTER_WEB_CANVASKIT_URL=vendor/ \
  --release

For more details about any of these commands you can run

$ flutter build $SUBCOMMAND --help

Note about canvaskit

Since by default canvaskit comes in a WASM build, in order to the ASM.js be fully supported canvaskit was manually built for this target.

A prebuilt canvaskit is already included in the Credible web folder. If you want to build it by yourself, however, follow these steps:

git clone https://skia.googlesource.com/skia.git --depth 1 --branch canvaskit/0.22.0
cd skia
python2 tools/git-sync-deps
  • Modify build script modules/canvaskit/compile.sh
diff --git a/modules/canvaskit/compile.sh b/modules/canvaskit/compile.sh
index 6ba58bfae9..51f0297eb6 100755
--- a/modules/canvaskit/compile.sh
+++ b/modules/canvaskit/compile.sh
@@ -397,6 +397,7 @@ EMCC_DEBUG=1 ${EMCXX} \
     -s MODULARIZE=1 \
     -s NO_EXIT_RUNTIME=1 \
     -s INITIAL_MEMORY=128MB \
-    -s WASM=1 \
+    -s WASM=0 \
+    -s NO_DYNAMIC_EXECUTION=1 \
     $STRICTNESS \
     -o $BUILD_DIR/canvaskit.js
  • Build canvaskit
$ cd modules/canvaskit
$ make debug
  • Replace this line on $SKIA/modules/canvaskit/canvaskit/bin/canvaskit.js
618c618
< var isNode = !(new Function('try {return this===window;}catch(e){ return false;}')());
---
> var isNode = false;
  • Copy $SKIA/modules/canvaskit/canvaskit/bin/canvaskit.js to $CREDIBLE/web/vendor/

  • Build Credible as described above.

Troubleshooting

If you encounter any errors in the build process described here, please first try clean builds of the projects listed.

For instance, on Flutter, you can delete build files to start over by running:

$ flutter clean

Also, reviewing the install_android_dependencies.sh script may be helpful.

Supported Protocols

All QRCode interactions start as listed below:

  • User scans a QRCode containing a URL;
  • User is presented the choice to trust the domain in the URL;
  • App makes a GET request to the URL;

Then, depending on the type of message, one of the following protocols will be executed.

CredentialOffer

After receiving a CredentialOffer from a trusted host, the app calls the API with subject_id in the form body, that value is the didKey obtained from the private key stored in the FlutterSecureStorage, which is backed by KeyStore on Android and Keychain on iOS.

The flow of events and actions is listed below:

  • User is presented a credential preview to review and make a decision;
  • App generates didKey from the stored private key using DIDKit.keyToDIDKey;
  • App makes a POST request to the initial URL with the subject set to the didKey;
  • App receives and stores the new credential;
  • User is redirect back to the wallet.

And below is another version of the step-by-step:

Wallet 1 Server
Scan QRCode 2
Trust Host ○ / ×
HTTP GET https://domain.tld/endpoint
CredentialOffer
Preview Credential
Choose DID ○ / ×
HTTP POST 3 https://domain.tld/endpoint
VerifiableCredential
Verify Credential
Store Credential

1 Whether this action requires user confirmation, exiting the flow early when the user denies.
2 The QRCode should contain the HTTP endpoint where the requests will be made.
3 The body of the request contains a field subject_id set to the chosen DID.

VerifiablePresentationRequest

After receiving a VerifiablePresentationRequest from a trusted host, the app calls the API with presentation the form body, that value is a JSON encoded string with the presentation obtained from the selected credential and signed with the credential's private key using DIDKit.issuePresentation.

Here are some of the parameters used to generate a presentation:

  • presentation
    • id is set to a random UUID.v4 string;
    • holder is set to the selected credential's didKey;
    • verifiableCredential is set to the credential value;
  • options
    • verificationMethod is set to the DID's verificationMethod id;
    • proofPurpose is set to 'authentication';
    • challenge is set to the request's `challenge';
    • domain is set to the request's `domain';
  • key is the credential's stored private key;

The flow of events and actions is listed below:

  • User is presented a presentation request to review and make a decision;
  • App generates didKey from the stored private key using DIDKit.keyToDIDKey;
  • App issues a presentation using DIDKit.issuePresentation;
  • App makes a POST request to the initial URL with the presentation;
  • User is redirect back to the wallet.

And below is another version of the step-by-step:

Wallet 1 Server
Scan QRCode 2
Trust Host ○ / ×
HTTP GET https://domain.tld/endpoint
VerifiablePresentationRequest
Preview Presentation
Choose Verifiable Credential ○ / ×
HTTP POST 3 https://domain.tld/endpoint
Result

1 Whether this action requires user confirmation, exiting the flow early when the user denies.
2 The QRCode should contain the HTTP endpoint where the requests will be made.
3 The body of the request contains a field presentation set to the verifiable presentation.

Comments
  • MVP-01

    MVP-01

    Changelog:

    • Incremented target and compile SDK versions
    • Add launcher_icon on Android platform
    • Add SVG files:
      • Splash screen logo
      • Onboard logo and text
      • Onboard illustration
      • Icons:
        • Wallet Menu Icon (Regular and Filled)
        • QRCode Menu Icon (Regular and Filled)
        • Profile Menu Icon (Regular and Filled)
        • Wallet ListItem Issuer (location-target)
        • Wallet ListItem Status (time-clock)
    • TextTheme configuration (subtitle1, subtitle2, bodyText1, bodyText2, button, overline, caption)
    • QRCode Scan BLoC (CredentialOffer, VerifiablePresentationRequest)
    • Wallet BLoC (CRUD operations)
    • Credential Repository (sambast, local NoSQL file-based DB)
    • Basic Themed Widgets
    • Pages:
      • Splash
      • Onboard
        • Terms of Service
        • Key Generation
        • Success Illustration
      • Wallet
      • QRCode Scan
      • QRCode Display
      • Credential Offer
      • Verifiable Presentation Request

    I will remove a couple of files before merging and maybe rename some stuff (I accept suggestions of naming conventions). I will also write a simple README with setup and build instructions before merging.

    opened by theosirian 8
  • Cannot build DIDKit for Android

    Cannot build DIDKit for Android

    I'm following the instructions to run the app. I've installed DIDKit, SSI. Cloned the Credible repository and put didkit, ssi and spruce into the same directory. I've been able to run the command make -C lib install-rustup-android and make -C lib ../target/test/java.stamp successfully but when I run make -C lib ../target/test/android.stamp, I get errors. Below is the full output of the command. What could be the issue here? As it says in the output, an error occurrs while building the dependency ring. I've checked out lots of issues and questions but I couldn't find an answer. I'm using Pop!_OS 21.10 which is based on Ubuntu 21.10.

    make: Entering directory '/home/sametsahin/work/spruceid/didkit/lib'
    jar -cf ../target/didkit.jar -C ../target/jvm com/spruceid/DIDKit.class -C ../target/jvm com/spruceid/DIDKitException.class
    PATH=/home/sametsahin/Android/Sdk/ndk/25.0.8775105/toolchains/llvm/prebuilt/linux-x86_64/bin:"/home/sametsahin/.nvm/versions/node/v16.15.1/bin:/home/sametsahin/.cargo/bin:/home/sametsahin/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/usr/local/go/bin:/home/sametsahin/work/android-studio/bin:/home/sametsahin/Android/Sdk/emulator:/home/sametsahin/Android/Sdk/platform-tools:/opt/idea-IC-203.7148.57/bin:/home/sametsahin/work/flutter/bin:/home/sametsahin/work/flutter/bin/cache/dart-sdk/bin:/home/sametsahin/.pub-cache/bin:/usr/share/code:/home/sametsahin/work/google-cloud-sdk/bin" \
    cargo build --lib --release --target i686-linux-android
    warning: /home/sametsahin/work/spruceid/didkit/http/Cargo.toml: only one of `license` or `license-file` is necessary
    `license` should be used if the package license can be expressed with a standard SPDX expression.
    `license-file` should be used if the package uses a non-standard license.
    See https://doc.rust-lang.org/cargo/reference/manifest.html#the-license-and-license-file-fields for more information.
    warning: /home/sametsahin/work/spruceid/didkit/lib/Cargo.toml: only one of `license` or `license-file` is necessary
    `license` should be used if the package license can be expressed with a standard SPDX expression.
    `license-file` should be used if the package uses a non-standard license.
    See https://doc.rust-lang.org/cargo/reference/manifest.html#the-license-and-license-file-fields for more information.
    warning: /home/sametsahin/work/spruceid/didkit/cli/Cargo.toml: only one of `license` or `license-file` is necessary
    `license` should be used if the package license can be expressed with a standard SPDX expression.
    `license-file` should be used if the package uses a non-standard license.
    See https://doc.rust-lang.org/cargo/reference/manifest.html#the-license-and-license-file-fields for more information.
       Compiling cfg-if v1.0.0
       Compiling once_cell v1.13.0
       Compiling subtle v2.4.1
       Compiling byteorder v1.4.3
       Compiling pin-project-lite v0.2.9
       Compiling opaque-debug v0.3.0
       Compiling cpufeatures v0.2.2
       Compiling futures-io v0.3.21
       Compiling bytes v1.2.1
       Compiling block-padding v0.2.1
       Compiling itoa v1.0.2
       Compiling constant_time_eq v0.1.5
       Compiling arrayref v0.3.6
       Compiling keccak v0.1.2
       Compiling futures-sink v0.3.21
       Compiling arrayvec v0.7.2
       Compiling data-encoding v2.3.2
       Compiling pin-utils v0.1.0
       Compiling base-x v0.2.11
       Compiling ppv-lite86 v0.2.16
       Compiling smallvec v1.9.0
       Compiling unsigned-varint v0.7.1
       Compiling ryu v1.0.10
       Compiling cache-padded v1.2.0
       Compiling adler v1.0.2
       Compiling const-oid v0.5.2
       Compiling fnv v1.0.7
       Compiling const-oid v0.6.2
       Compiling tap v1.0.1
       Compiling wyz v0.2.0
       Compiling funty v1.1.0
       Compiling foreign-types-shared v0.1.1
       Compiling tinyvec_macros v0.1.0
       Compiling matches v0.1.9
       Compiling parking v2.0.0
       Compiling waker-fn v1.1.0
       Compiling fastrand v1.8.0
       Compiling spin v0.5.2
       Compiling bitflags v1.3.2
       Compiling event-listener v2.5.3
       Compiling base64 v0.13.0
       Compiling hashbrown v0.12.3
       Compiling static_assertions v1.1.0
       Compiling byte-tools v0.3.1
       Compiling openssl-probe v0.1.5
       Compiling async-task v4.3.0
       Compiling try-lock v0.2.3
       Compiling unicode-bidi v0.3.8
       Compiling percent-encoding v2.1.0
       Compiling atomic-waker v1.0.0
       Compiling hex v0.4.3
       Compiling scopeguard v1.1.0
       Compiling tower-service v0.3.2
       Compiling httpdate v1.0.2
       Compiling subtle v1.0.0
       Compiling either v1.7.0
       Compiling fake-simd v0.1.2
       Compiling hashbrown v0.11.2
       Compiling opaque-debug v0.2.3
       Compiling pct-str v1.1.0
       Compiling langtag v0.2.0
       Compiling base64 v0.12.3
       Compiling ryu-js v0.2.2
       Compiling json v0.12.4
       Compiling arrayvec v0.5.2
       Compiling untrusted v0.7.1
       Compiling mown v0.2.1
       Compiling ucd-trie v0.1.4
       Compiling mime v0.3.16
       Compiling ipnet v2.5.0
       Compiling bech32 v0.8.1
       Compiling combination v0.1.5
       Compiling ssi-contexts v0.1.3 (/home/sametsahin/work/spruceid/ssi/contexts)
       Compiling regex-syntax v0.6.27
       Compiling gimli v0.26.2
       Compiling rustc-demangle v0.1.21
       Compiling dyn-clone v1.0.8
       Compiling lalrpop-util v0.19.8
       Compiling memsec v0.6.2
       Compiling xxhash-rust v0.8.5
       Compiling cesu8 v1.1.0
       Compiling jni-sys v0.3.0
       Compiling typenum v1.15.0
       Compiling libc v0.2.126
       Compiling memchr v2.5.0
       Compiling serde v1.0.141
       Compiling log v0.4.17
       Compiling futures-core v0.3.21
       Compiling anyhow v1.0.59
       Compiling getrandom v0.1.16
       Compiling crunchy v0.2.2
       Compiling parking_lot_core v0.9.3
       Compiling futures-channel v0.3.21
       Compiling futures-task v0.3.21
       Compiling futures-util v0.3.21
       Compiling radium v0.6.2
       Compiling tiny-keccak v2.0.2
       Compiling tracing-core v0.1.29
       Compiling serde_json v1.0.82
       Compiling blake2b_simd v1.0.0
       Compiling blake2s_simd v1.0.0
       Compiling concurrent-queue v1.2.4
       Compiling miniz_oxide v0.5.3
       Compiling http v0.2.8
       Compiling der v0.4.5
       Compiling foreign-types v0.3.2
       Compiling tinyvec v1.6.0
       Compiling crc32fast v1.3.2
       Compiling httparse v1.7.1
       Compiling lazy_static v1.4.0
       Compiling async-lock v2.5.0
       Compiling fixed-hash v0.7.0
       Compiling block-padding v0.1.5
       Compiling form_urlencoded v1.0.1
       Compiling crossbeam-utils v0.8.11
       Compiling encoding_rs v0.8.31
       Compiling iref v2.1.3
       Compiling blake2b_simd v0.5.11
       Compiling cached v0.30.0
       Compiling libm v0.2.3
       Compiling generic-array v0.14.5
       Compiling value-bag v1.0.0-alpha.9
       Compiling num-traits v0.2.15
       Compiling indexmap v1.9.1
       Compiling num-integer v0.1.45
       Compiling slab v0.4.7
       Compiling lock_api v0.4.7
       Compiling num-bigint v0.2.6
       Compiling blake3 v1.3.1
       Compiling tokio v1.20.1
       Compiling num-bigint v0.4.3
       Compiling clear_on_drop v0.2.5
       Compiling ring v0.16.20
       Compiling num-iter v0.1.43
    error: failed to run custom build command for `ring v0.16.20`
    
    Caused by:
      process didn't exit successfully: `/home/sametsahin/work/spruceid/didkit/target/release/build/ring-203a974efa355649/build-script-build` (exit status: 101)
      --- stdout
      OPT_LEVEL = Some("3")
      TARGET = Some("i686-linux-android")
      HOST = Some("x86_64-unknown-linux-gnu")
      CC_i686-linux-android = None
      CC_i686_linux_android = None
      TARGET_CC = None
      CC = None
      CFLAGS_i686-linux-android = None
      CFLAGS_i686_linux_android = None
      TARGET_CFLAGS = None
      CFLAGS = None
      CRATE_CC_NO_DEFAULTS = None
      DEBUG = Some("false")
    
      --- stderr
      running "i686-linux-android-clang" "-O3" "-DANDROID" "-ffunction-sections" "-fdata-sections" "-fPIC" "-I" "include" "-Wall" "-Wextra" "-pedantic" "-pedantic-errors" "-Wall" "-Wextra" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wenum-compare" "-Wfloat-equal" "-Wformat=2" "-Winline" "-Winvalid-pch" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wundef" "-Wuninitialized" "-Wwrite-strings" "-fno-strict-aliasing" "-fvisibility=hidden" "-fstack-protector" "-g3" "-DNDEBUG" "-c" "-o/home/sametsahin/work/spruceid/didkit/target/i686-linux-android/release/build/ring-bb955e14aaf4337f/out/aesni-x86-elf.o" "/home/sametsahin/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.20/pregenerated/aesni-x86-elf.S"
      thread 'main' panicked at 'failed to execute ["i686-linux-android-clang" "-O3" "-DANDROID" "-ffunction-sections" "-fdata-sections" "-fPIC" "-I" "include" "-Wall" "-Wextra" "-pedantic" "-pedantic-errors" "-Wall" "-Wextra" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wenum-compare" "-Wfloat-equal" "-Wformat=2" "-Winline" "-Winvalid-pch" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wundef" "-Wuninitialized" "-Wwrite-strings" "-fno-strict-aliasing" "-fvisibility=hidden" "-fstack-protector" "-g3" "-DNDEBUG" "-c" "-o/home/sametsahin/work/spruceid/didkit/target/i686-linux-android/release/build/ring-bb955e14aaf4337f/out/aesni-x86-elf.o" "/home/sametsahin/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.20/pregenerated/aesni-x86-elf.S"]: No such file or directory (os error 2)', /home/sametsahin/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.20/build.rs:653:9
      note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
    warning: build failed, waiting for other jobs to finish...
    make: *** [Makefile:99: ../target/i686-linux-android/release/libdidkit.so] Error 101
    make: Leaving directory '/home/sametsahin/work/spruceid/didkit/lib'
    
    opened by SametSahin10 5
  • Security/General Fixes

    Security/General Fixes

    Security:

    • [x] Update Dio Client Setup
      • Remove TLS self-signed test code
      • Timeout for connect/send/receive
      • Cancel request with response size over 4MB
    • [x] Change SecureStorage iOS accessibility option to passcode
    • [x] Change bip39 dep to fix/26/uniform-random
    • [x] Disallow Android Backups on AndroidManifest.xml
    • [x] Disallow third-party iOS keyboards
    • [x] Lock application behind phones' biometrics
    • [x] Hide sensitive information on application switcher
    • [x] Verify user saved their mnemonic
    • [x] Validate mnemonic word count generated by the app

    General:

    • [x] Remove old merge files
    • [x] Update Dart SDK Version

    Screenshots

    Mnemonic Save Confirmation Locked App

    opened by theosirian 5
  • Error: Expected a value of type 'FutureOr<JSObject<CryptoKey>>?', but got one of type 'CryptoKey'

    Error: Expected a value of type 'FutureOr>?', but got one of type 'CryptoKey'

    I'm getting the following exception on the Private Key Generation screen while running in Chrome:

    Uncaught (in promise) Error: Expected a value of type 'FutureOr<JSObject<CryptoKey>>?', but got one of type 'CryptoKey'
        at Object.throw_ [as throw] (errors.dart:251)
        at Object.castError (errors.dart:84)
        at Object.cast [as as] (operations.dart:442)
        at dart.NullableType.new.as (types.dart:417)
        at js_util.dart:183
    

    Output of flutter doctor: [✓] Flutter (Channel dev, 2.3.0-0.1.pre, on macOS 11.3 20E232 darwin-x64, locale en-CA) [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3) [✓] Xcode - develop for iOS and macOS [✓] Chrome - develop for the web [✓] Android Studio (version 4.1) [✓] VS Code (version 1.55.2) [✓] Connected device (1 available)

    I'm pretty sure this is a duplicate of https://github.com/dart-lang/sdk/issues/44499 but wondering if you have a workaround.

    bug dart-lang 
    opened by neilb14 5
  • Localization

    Localization

    Here's a proposition of localization based on current flutter team way of doing it (https://flutter.dev/docs/development/accessibility-and-localization/internationalization). I kept arb files.

    opened by hawkbee1 4
  • Dependency mismatch with DIDKit

    Dependency mismatch with DIDKit

    With https://github.com/spruceid/didkit/pull/60 and current Credible, there is a dependency conflict:

    credible$ flutter pub get
    Because path_provider >=1.6.17 <2.0.0-nullsafety depends on path_provider_windows ^0.0.4 which depends on ffi ^0.1.3, path_provider >=1.6.17 <2.0.0-nullsafety requires ffi ^0.1.3.
    And because every version of didkit from path depends on ffi ^0.3.0-nullsafety.1, path_provider >=1.6.17 <2.0.0-nullsafety is incompatible with didkit from path.
    So, because credible depends on both didkit from path and path_provider ^1.6.24, version solving failed.
    Running "flutter pub get" in credible...                                
    pub get failed (1; So, because credible depends on both didkit from path and path_provider ^1.6.24, version solving failed.)
    

    Should Credible have dependency updates corresponding to the updates in DIDKit?

    opened by clehner 3
  • Add Web Support

    Add Web Support

    Add web support by abstracting away functionality that depends on different libraries or backends for each platform into a provider that selects the correct way to access said functionality.

    • Add web support for DIDKit using a provider that knows whether to call the Dart API or the JS bindings.
    • Add web support for Storage using a provider that knows whether to call the FlutterSecureStorage or localStorage.
    • Add web support for sembast (sembast_web).
    • Add web support for Dio self-signed HTTPS workaround.
    • Add notice that QRCode scanning is not available on web.
    • Add DIDKit WASM symlinks to Flutter Web public folder.
    opened by theosirian 2
  • Support credentials without id

    Support credentials without id

    A Verifiable Credential without an id property is allowed in the VC Data Model. Currently Credible relies on the id property to identify credentials internally.

    opened by clehner 2
  • Build failure with mergeDebugJniLibFolders

    Build failure with mergeDebugJniLibFolders

    • #101
    • Flutter (Channel main, 3.1.0-0.0.pre.1066, on Debian GNU/Linux bookworm/sid 5.15.0-3-amd64, locale C.UTF-8)
    • Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    $ flutter run
    "fr": 5 untranslated message(s).
    To see a detailed report, use the untranslated-messages-file
    option in the l10n.yaml file:
    untranslated-messages-file: desiredFileName.txt
    <other option>: <other selection>
    
    
    This will generate a JSON format file containing all messages that
    need to be translated.
    Launching lib/main.dart on [...] in debug mode...
    Warning: The plugin qr_code_scanner requires Android SDK version 32.
    For more information about build configuration, see https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
    One or more plugins require a higher Android SDK version.
    Fix this issue by adding the following to /home/cel/src/credible/android/app/build.gradle:
    android {
      compileSdkVersion 32
      ...
    }
    
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':didkit:mergeDebugJniLibFolders'.
    > java.lang.NullPointerException (no error message)
    
    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
    
    * Get more help at https://help.gradle.org
    
    BUILD FAILED in 1s
    Running Gradle task 'assembleDebug'...                           2,110ms
    Exception: Gradle task assembleDebug failed with exit code 1
    

    didkit targets are built:

    $ ls -lL lib/android/didkit/src/main/jniLibs/*/libdidkit.so
    -rwxr-xr-x 1 cel cel 13237776 Jun  2 13:49 lib/android/didkit/src/main/jniLibs/arm64-v8a/libdidkit.so
    -rwxr-xr-x 1 cel cel  9391496 Jun  2 13:46 lib/android/didkit/src/main/jniLibs/armeabi-v7a/libdidkit.so
    -rwxr-xr-x 1 cel cel 16317080 Jun  2 13:44 lib/android/didkit/src/main/jniLibs/x86/libdidkit.so
    -rwxr-xr-x 1 cel cel 15621520 Jun  2 13:51 lib/android/didkit/src/main/jniLibs/x86_64/libdidkit.so
    
    $ ls -lL lib/flutter/android/src/main/jniLibs/*/libdidkit.so
    -rwxr-xr-x 1 cel cel 13237776 Jun  2 13:49 lib/flutter/android/src/main/jniLibs/arm64-v8a/libdidkit.so
    -rwxr-xr-x 1 cel cel  9391496 Jun  2 13:46 lib/flutter/android/src/main/jniLibs/armeabi-v7a/libdidkit.so
    -rwxr-xr-x 1 cel cel 15621520 Jun  2 13:51 lib/flutter/android/src/main/jniLibs/x86_64/libdidkit.so
    
    opened by clehner 1
  • can't find libdidkit.so on fresh android install

    can't find libdidkit.so on fresh android install

    Fresh install for ios is working fine.

    When building for android, I don't have any error message. The credible app is launching but when DynamicLibrary.open('libdidkit.so') occurs I have an error message : libdidkit.so. here's the list of libdidkit.so files I have in my spruceid folder : ./didkit/target/debug/libdidkit.so ./didkit/target/debug/deps/libdidkit.so ./didkit/target/release/libdidkit.so ./didkit/target/release/deps/libdidkit.so ./didkit/target/armv7-linux-androideabi/release/libdidkit.so ./didkit/target/armv7-linux-androideabi/release/deps/libdidkit.so ./didkit/target/aarch64-linux-android/release/libdidkit.so ./didkit/target/aarch64-linux-android/release/deps/libdidkit.so ./didkit/target/x86_64-linux-android/release/libdidkit.so ./didkit/target/x86_64-linux-android/release/deps/libdidkit.so ./didkit/target/i686-linux-android/release/libdidkit.so ./didkit/target/i686-linux-android/release/deps/libdidkit.so ./didkit/lib/android/didkit/src/main/jniLibs/x86/libdidkit.so ./didkit/lib/android/didkit/src/main/jniLibs/arm64-v8a/libdidkit.so ./didkit/lib/android/didkit/src/main/jniLibs/x86_64/libdidkit.so ./didkit/lib/android/didkit/src/main/jniLibs/armeabi-v7a/libdidkit.so ./didkit/lib/flutter/android/src/main/jniLibs/arm64-v8a/libdidkit.so ./didkit/lib/flutter/android/src/main/jniLibs/x86_64/libdidkit.so ./didkit/lib/flutter/android/src/main/jniLibs/armeabi-v7a/libdidkit.so ./didkit/lib/flutter/libdidkit.so ./didkit/lib/python/didkit/libdidkit.so

    So I don't have any libdidkit.so files in credible/build/ folders

    opened by hawkbee1 1
  • can not create a new install

    can not create a new install

    I tried to do a fresh android install but I'm struck at make -C lib ../target/test/aar.stamp which is failing with the following message :

    make: *** Aucune règle pour fabriquer la cible « ../target/test/aar.stamp ». Arrêt.`
    

    which mean something like : No rules to build the target « ../target/test/aar.stamp ». Stopping. If I try to revert to old DidKit version I have compilation errors like :

    error[E0061]: this function takes 3 arguments but 2 arguments were supplied
        --> lib/src/jni.rs:124:40
         |
    124  |     let proof = rt.block_on(credential.generate_proof(&key, &options))?;
         |                                        ^^^^^^^^^^^^^^ ----  -------- supplied 2 arguments
         |                                        |
         |                                        expected 3 arguments
    

    At the end of the installation process credible is "working" but there is no libdidkit.so library available. Same issue with stable or dev channel.

    opened by hawkbee1 1
  • didkit build error

    didkit build error

    while I was building credible, following the steps in README, I had some problem running

     make -C lib ../target/test/android.stamp
    

    error:

    // snip..
    "-Wl,-Bdynamic" "-ldl" "-llog" "-lunwind" "-ldl" "-lm" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "/home/uni01/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/i686-linux-android/lib" "-o" "/home/uni01/spruceid/didkit/target/i686-linux-android/release/deps/libdidkit.so" "-Wl,--gc-sections" "-shared" "-Wl,-zrelro,-znow" "-Wl,-O1" "-nodefaultlibs"
      = note: ld: error: unable to find library -lunwind
    

    however I have libunwind installed on my system

    libunwind.so
    libunwind.so.8
    libunwind.so.8.0.1
    libunwind-x86_64.a
    libunwind-x86_64.so
    libunwind-x86_64.so.8
    libunwind-x86_64.so.8.0.1
    

    and about LD_LIBRARY_PATH:

    /usr/lib/x86_64-linux-gnu
    

    so what is going on and what i have missed?

    opened by cgair 0
  • Scan qr error.

    Scan qr error.

    when ı scaned qr code for credential offer on https://demo.spruceid.com/scan.php ,
    on the first step ı can see credential and ı confirmed it but than nothing change on my app. waiting on the white page.

    opened by oksanassss 0
  • Implement changes for plugfest demo

    Implement changes for plugfest demo

    • Fix runtime error with workaround: https://github.com/spruceid/credible/issues/103#issuecomment-1146213076
    • Enable missing functionality (taking screenshots and screen recordings) on Android using workaround: https://github.com/spruceid/credible/issues/104#issuecomment-1146256311
    • Use did:key.
    opened by clehner 0
  • Stuck at Splash screen

    Stuck at Splash screen

    The app hands at the splash screen (blurry view of the app). In the log, below, there is a "Unhandled Exception: PlatformException".

    • Flutter (Channel main, 3.1.0-0.0.pre.1066, on Debian GNU/Linux bookworm/sid 5.15.0-3-amd64, locale C.UTF-8)
    • Android SDK version 30.0.3
    • Android version 11 (Linux 3.4.113-lineageos-ge89434a69fe), armv7l
    $ flutter run
    "fr": 5 untranslated message(s).
    To see a detailed report, use the untranslated-messages-file
    option in the l10n.yaml file:
    untranslated-messages-file: desiredFileName.txt
    <other option>: <other selection>
    
    
    This will generate a JSON format file containing all messages that
    need to be translated.
    Launching lib/main.dart on SM G900T in debug mode...
    Warning: The plugin qr_code_scanner requires Android SDK version 32.
    For more information about build configuration, see https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
    One or more plugins require a higher Android SDK version.
    Fix this issue by adding the following to /home/cel/src/credible/android/app/build.gradle:
    android {
      compileSdkVersion 32
      ...
    }
    
    Running Gradle task 'assembleDebug'...                           2,691ms
    ✓  Built build/app/outputs/flutter-apk/app-debug.apk.
    W/FlutterActivityAndFragmentDelegate( 4875): A splash screen was provided to Flutter, but this is deprecated. See flutter.dev/go/android-splash-migration for migration steps.
    Syncing files to device SM G900T...                                137ms
    
    Flutter run key commands.
    r Hot reload. 🔥🔥🔥
    R Hot restart.
    h List all available interactive commands.
    d Detach (terminate "flutter run" but leave application running).
    c Clear the screen
    q Quit (terminate the application on the device).
    
    💪 Running with sound null safety 💪
    
    An Observatory debugger and profiler on SM G900T is available at: http://127.0.0.1:41695/06rfaqJ1gng=/
    I/flutter ( 4875): AppModule started!
    I/flutter ( 4875): 0.4.0
    The Flutter DevTools debugger and profiler on SM G900T is available at: http://127.0.0.1:9100?uri=http://127.0.0.1:41695/06rfaqJ1gng=/
    E/flutter ( 4875): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(NotAvailable, Required security features not enabled, null, null)
    E/flutter ( 4875): #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:647:7)
    E/flutter ( 4875): #1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:294:18)
    E/flutter ( 4875): <asynchronous suspension>
    E/flutter ( 4875): #2      LocalAuthentication.authenticate (package:local_auth/local_auth.dart:124:13)
    E/flutter ( 4875): <asynchronous suspension>
    E/flutter ( 4875): #3      _AppWidgetState._authenticate (package:credible/app/app_widget.dart:48:12)
    E/flutter ( 4875): <asynchronous suspension>
    E/flutter ( 4875): #4      _AppWidgetState._unlockOnLoad (package:credible/app/app_widget.dart:57:9)
    E/flutter ( 4875): <asynchronous suspension>
    E/flutter ( 4875):
    I/flutter ( 4875): -- OnBoardingModule INITIALIZED
    W/Adreno-EGL( 4875): <qeglDrvAPI_eglGetConfigAttrib:607>: EGL_BAD_ATTRIBUTE
    W/Adreno-EGL( 4875): <qeglDrvAPI_eglGetConfigAttrib:607>: EGL_BAD_ATTRIBUTE
    
    opened by clehner 1
  • Misc build fixes

    Misc build fixes

    Renaming MenuItem is to avoid the following error:

    Error: 'MenuItem' is imported from both 'package:credible/app/pages/profile/widgets/menu_item.dart' and 'package:flutter/src/widgets/platform_menu_bar.dart'.
    

    Updating qr_code_scanner and flutter_modular is to fix various errors coming from those packages.

    opened by clehner 0
Flutter Wallet - Beautiful Wallet flutter 💳

wallet A new Flutter project Wallt UI Use this source code in your project with animation Rate me ⭐ Thank you ☺ Platform Android ✔️ Ios ✔️ Preview Dev

Amirziya 17 Dec 14, 2022
Shacoin-wallet - A flutter wallet app for shacoin

SHACOIN Mobile app for storing your shacoins · Report Bug · Request Feature Tabl

batuhan demircan 0 Jan 7, 2022
This is an on-chain(truffle) ETH wallet with traditional crypto wallet features

This is an on-chain(truffle) ETH wallet with traditional crypto wallet features (including live ETH price display). I enjoyed playing with emojis in this one ??

Chinyeaka Chinonso 15 Dec 7, 2022
A reference app in flutter using the BLoC pattern.

flutter_dice A sample Flutter app that shows how to manage responsive state using the provider pattern. Concepts Illustrated Provider pattern Using a

CodeGrue 74 Nov 18, 2022
The reference implementation of Sass, written in Dart.

A Dart implementation of Sass. Sass makes CSS fun again. Using Dart Sass From Chocolatey or Scoop (Windows) From Homebrew (macOS) Standalone From npm

Sass 3.4k Jan 5, 2023
A Dart package which simulates pass by reference feature

Reference Wrapper is a Dart package which simulates pass by reference feature us

null 0 Dec 19, 2021
An address search field which helps to autocomplete an address by a reference

Address Search Field Widget builders to create 'address search widgets' which helps to autocomplete an address using a reference. They can be used to

Jose Luna 13 Aug 14, 2022
Wallet app built in flutter

flutter_wallet_app Smart course app is a design implementaion of Wallet App designed by Muhammad Abdull Download App Android Screenshots HomePage Tran

Sonu Sharma 291 Dec 24, 2022
Wallet Application Built With Flutter

Wallet Application Flutter Wallet Page Contact Page Send Money Page Contact Page

Isaac Pitwa Nyonyintono 12 Nov 9, 2022
Zold wallet built in flutter.

Zold wallet built in flutter (Android and iOS platform). Use it to pay or receive zolds and view your wallet balance and transactions. Features Pull w

Ammar Hussein 24 Oct 8, 2022
Wallet for Peercoin and Peercoin Testnet written in Flutter

peercoin_flutter Wallet for Peercoin and Peercoin Testnet using Electrumx as backend. App in constant development Basic testing successfull on iOS 14.

Peercoin project 21 Oct 25, 2022
Naan is an easy to use and secure wallet for NFTs & DeFi on the Tezos blockchain.

Naan - A Tasty Tezos Wallet Naan is a fun, simple, and secure way to create a Tezos wallet, collect NFTs, and explore the new world of Web3 on Tezos.

Tezsure 3 Aug 26, 2022
Flutter Wallet APP UI Challenge

flutter_wallet_ui_challenge A new Flutter project. Project Demo Video : https://www.youtube.com/watch?v=Vyj65qh_QiA Getting Started Flutter Wallet UI

Yasin ilhan 489 Dec 18, 2022
A Flutter project created for test purposes based on the wallet settings screen of the polkadex mobile app.

polkadex_mobile_test A Flutter project created for test purposes based on the wallet settings screen of the polkadex mobile app. Getting Started This

null 0 Jan 10, 2022
A Flutter library for work with Apple Wallet passes.

pass-flutter A Flutter library for work with Apple Wallet passes. How use it Getting pass from URL to internal memory import 'package:pass_flutter/pas

Alexey Lepskii 16 Dec 30, 2022
This is a wallet application written in Flutter & Dart. Codebase could be shared effectively on other OS Platforms

Gwallet A Simple wallet application written in Flutter and Dart for Android and iOs. Getting Started For Android, Specifically. You can run iOS, by st

Gerald Maduabuchi 8 Dec 12, 2022
A sample app to showcase Crypto Wallet App UI demo in flutter.

Flutter-Crypto-Wallet-App A sample app to showcase Crypto Wallet App UI demo in flutter. Development Setup Clone the repository and run the following

Faiz Rhm 26 Dec 14, 2022
A 3rd party wallet for zenon.network

Notes Please don't use your main seed while testing until Cano is fully audited by the community Click Create Wallet to generate Prerequisites Flutter

Cano Wallet 10 Oct 26, 2022
Opensource Wallet & Explorer by joinseeds.com

seeds_light_wallet Opensource Wallet & Explorer by joinseeds.com A payment platform and financial ecosystem to empower humanity and heal our planet Ge

SEEDS - Conscious Currency | Regenerative Civilization 39 Dec 30, 2022