Giter Site home page Giter Site logo

tesseract-one / tesseract.swift Goto Github PK

View Code? Open in Web Editor NEW
14.0 5.0 5.0 366 KB

Tesseract dApps Platform SDK for iOS and OSX

License: Apache License 2.0

Ruby 1.51% Swift 51.70% C 6.11% Shell 3.11% Rust 37.57%
swift ethereum dapps-development blockchain

tesseract.swift's Introduction

Tesseract

Tesseract Swift

Tesseract.swift provides Swift APIs for Tesseract, a dApp-Wallet bridge designed to make dApp/wallet communication on mobile devices simple and natural without compromising decentralization and security

If you are looking for Tesseract docs for another language/OS, please, consider one of the following:

Getting started

Tesseract provides two sets of APIs, one for a dApp that wants to connect to the wallets and one for the wallets that want to serve the dApps.

Here is how a typical Tesseract workflow looks like:

dApp Wallet
//initialize Tesseract with default config
let tesseract = Tesseract.default()

//indicate what blockchain are we gonna use
let substrateService = tesseract.service(SubstrateService.self)

//at this point Tesseract connects to the
//wallet and the wallet presents the user
//with its screen, asking if the user
//wants to share their public key to a dApp
let account = try await substrateService.getAccount(type: .sr25519)
//Inside the Wallet Tesseract serves requests
//from the dApps as long as the reference is kept alive
//save it somewhere in the Extension instance
let tesseract = Tesseract()
    .transport(IPCTransportIOS(self)) //add iOS IPC transport
    .service(MySubstrateService())
//MySubstrateService instance methods
//will be called when a dApp asks for something

Details

Because using Tesseract in Tesseract in a dApp and in a wallet is very different by nature (essentially communicating as a client and a service), the detailed documentation is split into two documents:

Examples

If you'd like to see examples of Tesseract integration, please, check:

More

Just in case, you'd like to use Tesseract on iOS via Rust APIs. It's also possible. Consider checking one of the following:

Roadmap

  • v0.1 - IPC transport for iOS - connect dApp/Wallet on the same device
  • v0.2 - demo dApp and Wallet
  • v0.3 - Susbtrate protocol support
  • v0.4 - dev-wallet.swift test implementation
  • v0.5 - first Swift libraries release version
  • v1.0 - support of everything mobile dApps need

License

Tesseract.swift can be used, distributed and modified under the Apache 2.0 license.

tesseract.swift's People

Contributors

dileping avatar odanylovych avatar ypopovych avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

tesseract.swift's Issues

Example - Build Error

DApp/AppCore.swift
No such module CApp

Was there a dependency setup I missed in Readme?

Also, can Tesseract.swift be used for MacOS?

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.