Code Monkey home page Code Monkey logo

cyberconnect-swift-example's Introduction

cyberconnect-swift-example

cyberconnect-swift-example is a demo project based on cyberconnect-swift and WalletConnect

Here is the process of how cyberconnect work:

1. Get address of your wallet

2. Generate a pair of P256 keys and save it in keychain

3. Sign a message with you wallet(should be pair with the address in step 1) and get the signature

4. You can get right format message:

let cyberconnect = CyberConnect(address: WALLETADDRESS) //in step 1
let message = cyberconnect.getAuthorizeString(localPublicKeyPem: youPublicKeyPem) //key pairs in step 2

5. Sign this message with your wallet and get signature

let signature = signature //from step 3
cyberconnect.registerKey(signature: signature, network: .eth) { data in
    print(data) 
}

6. Now you can use cyberconnect to create your own connection with other people in web3.0 world if you get success feedback in step 5

Here is a demo Video:

RPReplay_Final1653638749.MP4

Want to know more APIs CyberConnect supported please refer to: cyberconnect-swift

About WalletConnect

WalletConnect is a tool to use your wallet function based on universal link or QR code, many mainstream wallets is supported for now.

⚠️ If you have your own wallet,of course you can sign your message with your own wallet, should be easier, and have better user experience. Cause WalletConnect use websocket to check the status of signature, not so stable for now and sometimes you may need to active wallet app back and forth to show the signature prompt(at least for metamask it behave like this, maybe it's a bug of metamask, but it works anyway)

⚠️ when you try to integrate WalletConnect to your project, make sure you implement LSApplicationQueriesSchemes, otherwise you can't active wallets to sign some particular message on your iPhone.

cyberconnect-swift-example's People

Contributors

santiago0412 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.