Transaction Builder made in Wasm to use on edge/browser/cli
Solana Pay transfer spec can be use only on mobile, and to accomplish the same thing on web wallet (Phantom
) we will need a lot of web3.js
dependency and builder/helper code for create simple transfer transaction.
dApp
will needweb3.js
andtx_builder
code to make a transfer transaction.
graph LR
A(dApp + tx_builder + web3.js) -- transfer tx --> Y(Web Wallet)
Use web3.wasm
= web3
+ tx-builder
on the edge and/or browser.
- Keep compatible (Fully trust browser):
dApp
can still useweb3.wasm
as usual; plus able to build transfer transaction.
graph LR
A(dApp) -- transfer prompt --> B1(browser + web3.wasm) -- transfer tx --> Y(Web Wallet)
- Lean dependency (Fully trust edge):
dApp
can useweb3.wasm
on the edge and build transfer with prompt as transfer spec.
graph LR
A(dApp) -- transfer prompt --> B(edge + web3.wasm) -- transfer tx --> Y(Web Wallet)
- Cross check:
dApp
use built tx from edge as a cross check (required sametx_bytes_hash
).
graph LR
A(dApp) -- transfer prompt --> B1(browser + web3.wasm) -- transfer tx1 --> C{Cross check}
A(dApp) -- transfer prompt --> B2(edge + web3.wasm) -- transfer tx2 --> C{tx1 == tx2} -- true\ntransfer tx --> Y(Web Wallet)
dApp
can make a 1 liner code paymentButton
for some specified token amount from user without anyweb3.js
lib required on both mobile app withsolana pay
's deeplink (existing solution) and on web with browser/edge (our solution).dApp
can ensure that built transaction is not compromise by doing cross check between browser and on-edge.
- Can be use with
Continue with Web3
button (sign to login). - Can be use with
NFT
paywall link (verify and redirect).