Skip to content

Solana simple example#24

Closed
affinity-matrix wants to merge 1 commit intomainfrom
akasha/solana-simple-example
Closed

Solana simple example#24
affinity-matrix wants to merge 1 commit intomainfrom
akasha/solana-simple-example

Conversation

@affinity-matrix
Copy link
Member

@affinity-matrix affinity-matrix commented Jan 31, 2026

Created a simple 4-step example of uploading blobs to Shelby with solana-kit


Note

Medium Risk
Adds a new Next.js example with server API routes that accept Solana secret keys and perform on-chain/storage operations, plus changes monorepo app scanning logic; mistakes could lead to broken examples or unintended exposure/misuse in copied code.

Overview
Introduces a new Next.js app under apps/solana/simple-example that walks users through a 4-step Solana flow (connect wallet, derive/create a Shelby storage account, fund with ShelbyUSD/APT, then upload and delete blobs) via new API routes (/api/create-storage-account, /api/fund-account, /api/upload-blob, /api/delete-blob) and client hooks/components.

Updates the repo’s auto-generated apps table by making table-generator scan directories recursively when a folder lacks a package.json, and refreshes README.md entries accordingly. Minor housekeeping includes ignoring tsconfig.tsbuildinfo and adding @radix-ui/react-tooltip to @shelby-protocol/ui dependencies.

Written by Cursor Bugbot for commit 0eada5b. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

});

// Construct the blob URL
const blobUrl = `https://api.shelbynet.shelby.xyz/shelby/v1/blobs/${storageAccount.accountAddress.toString()}/${blobName}`;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blob URL constructed without encoding special characters

Medium Severity

The blob URL is constructed by directly interpolating blobName without URL encoding. If a user uploads a file with special characters (spaces, #, ?, &, %), the resulting URL will be malformed. For example, a file named my report#1.pdf produces a URL where #1.pdf is interpreted as a fragment identifier, causing the View link to fail or load the wrong resource.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant