Giter VIP home page Giter VIP logo

blazor-wasm-dapp-scaffold's Introduction

๐Ÿ— Solana App Scaffold

Scaffolding for a dApp built on Solana using Blazor WebAssembly and Solnet + solana-web3.js interoperability

Quickstart

git clone https://github.com/bmresearch/blazor-wasm-dapp-scaffold.git

cd blazor-wasm-dapp-scaffold

Environment

  1. Install net5
  2. Install npm

Before being able to run the project you will need to go inside the src/Client/JsLib folder and do the following:

npm install

npm run build

Overview

This project currently features a bare bones skeleton to easily bootstrap dApps for Solana built using Blazor Wasm.

The list of adapters that were targeted with this:

It is currently able to (with much hacking around and probably a lot of errors/exceptions being thrown):

  • request a connection from the wallet adapter
  • fetch the address of the wallet selected in the wallet adapter
  • request the wallet adapter to sign a transaction

What should be done:

  • writing a class in the src/Client/JsLib which abstracts the Wallet Adapters instead of using them directly and which allows us to plug in an event from C# which has a property with the JSInvokable attribute so it can be directly invoked from the JS
  • in the class mentioned previously some QoL abstractions should be made in order to make it easier to do the JS Interop calls, out of the adapters mentioned previously only the Phantom one has signMessage(message: Uint8Array), and the others have signTransaction(transaction: Transaction) which is the solana-web3.js Transaction object, some compromise should be done in order to make this easier:
    • only do one InvokeAsync<byte[]>("signMessage") where you pass the compiled message from the Solnet TransactionBuilder and it could check if the adapter has signMessage or if it needs to deserialize the compiled message into a transaction object before calling signTransaction

blazor-wasm-dapp-scaffold's People

Contributors

hoakbuilds avatar martinwhitman 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.