Skip to content

A scaffolding project for Solana dApps built with Blazor WebAssembly.

License

Notifications You must be signed in to change notification settings

bmresearch/blazor-wasm-dapp-scaffold

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🏗 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

About

A scaffolding project for Solana dApps built with Blazor WebAssembly.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published