Git Product home page Git Product logo

sargon's Introduction

Wallet Kit

codecov

Middleware that can power Radix Wallet clients (iOS/Android).

Status

LOGIC

[======--------------------------------------------]

Hierarchal Deterministic

  • BIP39
  • Derivation
    • Hierarchal Deterministic secp256k1
    • Hierarchal Deterministic Ed25519
  • Signing
    • Hierarchal Deterministic ECDSA (secp256k1)
    • Hierarchal Deterministic EdDSA (Ed25519)
  • CAP26
    • CAP26 AccountPath
    • CAP26 IdentityPath
    • CAP26 GetID

Profile Management

  • Create new Profile
  • Load active Profile
  • Import Profile

Account Management

  • Create new account
  • Update account

FactorSource Management

  • Create DeviceFactorSource
  • Save DeviceFactorSource
  • Create LedgerFactorSource
  • Save LedgerFactorSource (trivially done)

Dapp Interaction

  • Map AuthorizedPersonaSimple -> AuthorizedPersonaDetailed
  • Update AuthorizedPersonaSimple based on a Dapp request

MODELS

All models used by iOS/Android wallet is fully implemented in Sargon ๐ŸŽ‰

All models have JSON support and Placeholder with which "recursively" I've crafted two valid example Profiles.

All models have Swift/Kotlin bindings using UniFFI generating immutable values types that are Equatable and Hashable!

Hierarchal Deterministic

  • Mnemonic
  • MnemonicWithPassphrase
  • HDPath (BIP32)
  • BIP44 Like
  • CAP26
    • CAP26 AccountPath
    • CAP26 IdentityPath
    • CAP26 GetID
  • DerivationPath
  • HierarchicalDeterministicPrivateKey
  • HierarchicalDeterministicPublicKey

Profile Snapshot

  • Header
    • ContentHint
    • DeviceInfo
  • Keys
    • PrivateKey
      • PrivateKey (enum)
      • Ed25519PrivateKey
      • Secp256k1PrivateKey
    • PublicKey
      • PublicKey (enum)
      • Ed25519PublicKey
      • Secp256k1PublicKey
  • FactorInstance
    • HierarchicalDeterministicFactorInstance
  • Addresses
    • AccountAddress
    • IdentityAddress
    • ResourceAddress
  • FactorSource
    • FactorSource
    • HierarchicalDeterministicFactorSource
    • PrivateHierarchicalDeterministicFactorSource
    • FactorSourceKind
    • FactorSourceID
    • DeviceFactorSource
    • LedgerFactorSource
  • FactorSources
  • Entity
    • EntityKind
    • SecurityState
      • UnsecuredEntityControl
    • EntityFlags
    • OnLedgerSettings
      • ThirdPartyDeposits
  • Account
    • AppearanceID
    • DisplayName
  • Networks
  • AppPreferences
    • Display
    • P2PLinks
      • P2PLink
    • Security
    • Transaction
    • Gateways
      • Gateway
      • RadixNetwork
  • Persona
    • Persona
    • PersonaData
      • Name
      • Email
      • Phone
      • Credit Card (not used by Radix Wallet yet)
      • URL (not used by Radix Wallet yet)
      • Company name (not used by Radix Wallet yet)
      • Postal Address (not used by Radix Wallet yet)
  • Authorized Dapp
    • Shared Accounts
    • Shared PersonaData
  • Network
    • NetworkID
    • Accounts
    • Personas
    • Authorized Dapps
  • Profile

Development

Setup

Swift

xcode-select โ€” install

Or install Xcode from App Store

Kotlin

brew install kotlin

JNA

Important

To run tests in Kotlin you also need to download JNA (currently tested under version 5.13.0)

curl https://repo1.maven.org/maven2/net/java/dev/jna/jna/5.13.0/jna-5.13.0.jar

direnv

Install direnv in order to automatically load CLASSPATH and JAVA_OPTS in .envrc, so that you can run Kotlin bindgen tests from cli using the command in the bottom of this document - i.e. without having to export `CLASSPATH``.

pre-commit

Recommended to use pre-commit tool

brew install pre-commit

This repo contains a .pre-commit-config.yaml which uses the amazing typos tool, you MUST INSTALL the config, do it by:

pre-commit install

nextest

Nextest is a nice test runner for Rust!

cargo install cargo-nextest

Code coverage

Recommended to use tarpaulin tool for code coverage:

cargo install cargo-tarpaulin

And then run:

cargo tarpaulin --out Html

Run Tests

cargo nextest run --package profile --test uniffi && cargo nextest run

sargon's People

Contributors

sajjon avatar cyonalexrdx avatar micbakos-rdx avatar vinnstah avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.