Giter Club home page Giter Club logo

altheajs-example's Introduction

Example transaction submission to Althea-L1 using Metamask and altheajs

This site is a simple React page with the ability to query an account on Althea-L1 / submit a bank MsgSend or microtx MsgLiquify transaction signed by MetaMask to Althea-L1.

Message submission flow

The UI for message submission is nested under a simple tab-based interface and consists of one of two components: SubmitMsgSend or SubmitMsgLiquify. Any message to be submitted must have a @bufbuild-based protobuf definition (note that hosting using buf.build is optional, Althea-L1 currently uses both hosted and github-based proto definitions), see the microtx module's defintions here. Additionally, the message must implement the LegacyAmino LegacyMsg interface, so check that the Msgs have Type() and GetSignBytes() implemented.

The message generation starts after the user has verified their pubkey by signing a simple string "Verify Public Key" defined in the metamask service. One of the SubmitMsg* components will then present several simple text input fields which will be used to populate the associated Msg. Once the user clicks SubmitTx the parameters are collected, formatted, and packed for use by the SignEIP712CosmosTx() function and the result is then passed to BroadcastEIP712Tx() in the broadcast service.

Resources

See altheajs for more info about the javascript/typescript libraries used.

See Althea-L1 for proto source definitions, chain logic, solidity contracts, and more!

altheajs-example's People

Contributors

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