Giter VIP home page Giter VIP logo

star-manager's Introduction

Starname Manager

Docker Pulls

This is a manager for starnames. It will allow users to,

  • Create new starnames
  • Create names for given domains
  • Create names for *iov (or iovnames)
  • Manage addresses linked to given names

Building

Installing Dependencies

This project contains simultaneously the UI application which is a React application and a few firebase cloud functions. The whole project can be built with the following procedure,

npm run install:all

this will execute npm install in the current directory as well as install packages to the application/ and functions/ directories.

NOTE THAT YOU CANNOT USE npm install or yarn install BECAUSE THIS WOULD ONLY INSTALL PACAKGES IN THE LOCAL DIRECTORY AND NOT INSIDE THE OTHER PROJECTS

Compiling

To compile both projects run,

npm run build

this will compile the React application and the Cloud Functions from typescript to javascript.

Testing

To execute all tests we can run

npm test

Linter

To execute eslint with the project configuration and defaults just do

npm run lint

Starname for GDrive Users

The Starname manager includes the ability to create a new account from your google account. The procedure to do so is quite simple and completely transparent for the user and the code as well.

We use our own GDrive Custodian library.

This library uses two sandboxed iframes to securely access the private key.

Wallet Connect Integration

Wallet Connect lets us grab someones address from a mobile wallet into the starname manager for ease of use and to help avoid errors, it also greatly simplifies the process of editing starnames.

Wallet Connect however needs some special tricks to allow a multichain address to send all the addresses to the manager.

In order to do so, the wallet has to comply with 2 things.

  1. It must ensure that the application url (peerMeta.url) matches https://starname.me
  2. Given that (1) is satisfied, to send all the desired addresses your wallet has to send a json with the following structure
{
  "type": "starname",
  "addresses": [{
    "ticker": TICKER1,
    "address": address1
  }, {
    "ticker": [TICKER2],
    "address": address2
  },
	.
	.
	.
  {
    "ticker": [TICKERn],
    "address": addressN
  }],
}

As concrete example would look like this

{
 "type": "starname",
 "addresses": [{
    "ticker": "ETH",
    "address": "0x795997519227f64879977d1a53625707f29b25b2"
  }, {
    "ticker": "BTC",
    "address": "14AcAvkYz9eUP226NpGvTf62uP4Du2NnZJ"
  }]
}

This json must be sent as the first element of the array that makes the standard payload of a Wallet Connect session message. It needs to be converted to a string as with JSON.stringify() for example. This is required because Wallet Connect actually shares an array of strings.

You can also send regular Wallet Connect payloads.

star-manager's People

Contributors

stephiov avatar xpt1x avatar

Watchers

 avatar Davi Mello avatar

Forkers

jo-chainmasters

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.