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.
dAppwill needweb3.jsandtx_buildercode 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):
dAppcan still useweb3.wasmas 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):
dAppcan useweb3.wasmon 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:
dAppuse 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)
dAppcan make a 1 liner code paymentButtonfor some specified token amount from user without anyweb3.jslib required on both mobile app withsolana pay's deeplink (existing solution) and on web with browser/edge (our solution).dAppcan ensure that built transaction is not compromise by doing cross check between browser and on-edge.
- Can be use with
Continue with Web3button (sign to login). - Can be use with
NFTpaywall link (verify and redirect).