Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
An example of how to use the new @solana/web3.js to deserialize and…
Browse files Browse the repository at this point in the history
… parse a transaction (#2974)

* Add deserialize-transaction example

This demonstrates how to use web3js to decode and parse a transaction

* Fix type in `compressTransactionMessageUsingAddressLookupTables`
  • Loading branch information
mcintyre94 authored Jul 25, 2024
1 parent 4439079 commit e5e8c4a
Show file tree
Hide file tree
Showing 5 changed files with 486 additions and 1 deletion.
25 changes: 25 additions & 0 deletions examples/deserialize-transaction/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "@solana/example-deserialize-transaction",
"private": true,
"type": "module",
"scripts": {
"prestart": "turbo --output-logs=errors-only compile:js compile:typedefs",
"run:example": "tsx src/example.ts",
"start": "start-server-and-test '../../scripts/start-shared-test-validator.sh' http://127.0.0.1:8899/health run:example",
"style:fix": "pnpm eslint --fix src/* && pnpm prettier --log-level warn --ignore-unknown --write ./*",
"test:lint": "TERM_OVERRIDE=\"${TURBO_HASH:+dumb}\" TERM=${TERM_OVERRIDE:-$TERM} jest -c ../../node_modules/@solana/test-config/jest-lint.config.ts --rootDir . --silent --testMatch '<rootDir>src/**/*.{ts,tsx}'",
"test:prettier": "TERM_OVERRIDE=\"${TURBO_HASH:+dumb}\" TERM=${TERM_OVERRIDE:-$TERM} jest -c ../../node_modules/@solana/test-config/jest-prettier.config.ts --rootDir . --silent",
"test:typecheck": "tsc"
},
"dependencies": {
"@solana-program/memo": "^0.4.0",
"@solana-program/system": "^0.4.0",
"@solana/example-utils": "workspace:*",
"@solana/web3.js": "workspace:@solana/web3.js-experimental@*"
},
"devDependencies": {
"@types/prompts": "^2.4.9",
"start-server-and-test": "^2.0.4",
"tsx": "^4.16.2"
}
}
Loading

0 comments on commit e5e8c4a

Please sign in to comment.