Skip to content

Commit 5731374

Browse files
committed
feat: add Solana transaction parser component
Add interactive UI for parsing and inspecting Solana transactions: - Accepts base64-encoded transactions (standard Solana wire format) - Shows fee payer, blockhash, and signature count - Detects and displays durable nonce information - Decodes known instruction types with color-coded display - Supports URL param sharing for easy transaction sharing Issue: BTC-2929 Ticket: BTC-2929
1 parent dd88831 commit 5731374

File tree

6 files changed

+630
-27
lines changed

6 files changed

+630
-27
lines changed

package-lock.json

Lines changed: 3 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/webui/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"deploy": "gh-pages -d dist"
2323
},
2424
"dependencies": {
25+
"@bitgo/wasm-solana": "*",
2526
"@bitgo/wasm-utxo": "*",
2627
"fp-ts": "^2.16.8",
2728
"io-ts": "^2.2.21",

packages/webui/src/index.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { initRouter, type Route } from "./lib/router";
99

1010
// Import demo components (registers them as custom elements)
1111
import "./wasm-utxo/addresses";
12+
import "./wasm-solana/transaction";
1213

1314
// Common styles used across components
1415
export const commonStyles = `
@@ -136,6 +137,20 @@ class HomePage extends BaseComponent {
136137
),
137138
),
138139
),
140+
h(
141+
"li",
142+
{},
143+
h(
144+
"a",
145+
{ class: "demo-link", href: "#/wasm-solana/transaction" },
146+
h("div", { class: "demo-title" }, "Solana Transaction Parser"),
147+
h(
148+
"div",
149+
{ class: "demo-desc" },
150+
"Parse and decode Solana transaction instructions from base64",
151+
),
152+
),
153+
),
139154
),
140155
),
141156
);
@@ -148,6 +163,7 @@ defineComponent("home-page", HomePage);
148163
const routes: Route[] = [
149164
{ path: "/", component: "home-page" },
150165
{ path: "/wasm-utxo/addresses", component: "address-converter" },
166+
{ path: "/wasm-solana/transaction", component: "solana-transaction-parser" },
151167
];
152168

153169
// Initialize router when DOM is ready

0 commit comments

Comments
 (0)