Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
RUST_STABLE_VERSION=1.88.0
POLKADOT_SDK_VERSION=polkadot-stable2512
POLKADOT_SDK_VERSION=polkadot-stable2512-2
ZOMBIENET_VERSION=v1.3.138
568 changes: 266 additions & 302 deletions Cargo.lock

Large diffs are not rendered by default.

96 changes: 48 additions & 48 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,62 +44,62 @@ s3-client = { path = "storage-interfaces/s3/client" }
s3-primitives = { path = "storage-interfaces/s3/primitives", default-features = false }

# Substrate frame
frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false }
frame-executive = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false }
frame-support = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false }
frame-system = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false }
frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false }
frame-try-runtime = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false }
frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false }
frame-executive = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false }
frame-support = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false }
frame-system = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false }
frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false }
frame-try-runtime = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false }

# Substrate pallets
pallet-aura = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false }
pallet-authorship = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false }
pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false }
pallet-collator-selection = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false }
pallet-message-queue = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false }
pallet-session = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false }
pallet-sudo = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false }
pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false }
pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false }
pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false }
pallet-aura = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false }
pallet-authorship = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false }
pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false }
pallet-collator-selection = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false }
pallet-message-queue = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false }
pallet-session = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false }
pallet-sudo = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false }
pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false }
pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false }
pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false }

# Substrate primitives
sp-api = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false }
sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false }
sp-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false }
sp-core = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false }
sp-genesis-builder = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false }
sp-inherents = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false }
sp-io = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false }
sp-offchain = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false }
sp-session = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false }
sp-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false }
sp-version = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false }
sp-api = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false }
sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false }
sp-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false }
sp-core = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false }
sp-genesis-builder = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false }
sp-inherents = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false }
sp-io = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false }
sp-offchain = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false }
sp-session = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false }
sp-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false }
sp-version = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false }

# Polkadot
pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false }
polkadot-parachain-primitives = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false }
polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false }
xcm = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false, package = "staging-xcm" }
xcm-builder = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false, package = "staging-xcm-builder" }
xcm-executor = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false, package = "staging-xcm-executor" }
pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false }
polkadot-parachain-primitives = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false }
polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false }
xcm = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false, package = "staging-xcm" }
xcm-builder = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false, package = "staging-xcm-builder" }
xcm-executor = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false, package = "staging-xcm-executor" }

# Cumulus
cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false }
cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false }
cumulus-pallet-weight-reclaim = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false }
cumulus-pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false }
cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false }
cumulus-primitives-aura = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false }
cumulus-primitives-core = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false }
cumulus-primitives-storage-weight-reclaim = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false }
cumulus-primitives-utility = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false }
parachain-info = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false, package = "staging-parachain-info" }
parachains-common = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false }
cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false }
cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false }
cumulus-pallet-weight-reclaim = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false }
cumulus-pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false }
cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false }
cumulus-primitives-aura = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false }
cumulus-primitives-core = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false }
cumulus-primitives-storage-weight-reclaim = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false }
cumulus-primitives-utility = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false }
parachain-info = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false, package = "staging-parachain-info" }
parachains-common = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false }

# Build dependencies
substrate-wasm-builder = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2" }
substrate-wasm-builder = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4" }

# Codec
codec = { version = "3.7", default-features = false, features = ["derive", "max-encoded-len"], package = "parity-scale-codec" }
Expand All @@ -121,8 +121,8 @@ tower-http = { version = "0.6", features = ["cors", "trace"] }
blake2 = { version = "0.10", default-features = false }

# Testing
sp-keyring = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false }
sp-keystore = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c7b9c08825acc61f1adde54535a41855c04962a2", default-features = false }
sp-keyring = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false }
sp-keystore = { git = "https://github.com/paritytech/polkadot-sdk", rev = "00fbc91e415b563fd1b4f839628cdd392adcd0d4", default-features = false }

[profile.release]
panic = "unwind"
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# brew install just

# Polkadot SDK version (matches Cargo.toml tag)
polkadot_version := "polkadot-stable2512"
polkadot_version := "polkadot-stable2512-2"

# Detect OS and architecture
os := `uname -s | tr '[:upper:]' '[:lower:]'`
Expand Down
5 changes: 3 additions & 2 deletions runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ use sp_runtime::{
ApplyExtrinsicResult, MultiSignature, SaturatedConversion,
};
use sp_version::RuntimeVersion;
use codec::Encode;

#[cfg(feature = "std")]
use sp_version::NativeVersion;
Expand Down Expand Up @@ -663,8 +664,8 @@ impl_runtime_apis! {
}

impl sp_session::SessionKeys<Block> for Runtime {
fn generate_session_keys(owner: Vec<u8>, seed: Option<Vec<u8>>) -> sp_session::OpaqueGeneratedSessionKeys {
SessionKeys::generate(&owner, seed).into()
fn generate_session_keys(seed: Option<Vec<u8>>) -> Vec<u8> {
SessionKeys::generate(seed).encode()
}

fn decode_session_keys(
Expand Down
118 changes: 118 additions & 0 deletions user-interfaces/console-ui/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# Web3 Storage Console UI

A React-based web interface for managing Web3 Storage, providing both File System and S3-compatible storage interfaces.

## Features

- **Dashboard**: Overview of storage usage and network status
- **Drives**: Create and manage File System drives
- **S3 Buckets**: Create and manage S3-compatible buckets
- **Upload**: Upload files to drives or buckets
- **Download**: Download files by CID, path, or object key
- **Explorer**: Browse storage contents
- **Accounts**: Manage signing accounts

## Tech Stack

- **React 19** - UI framework
- **Vite 7** - Build tool
- **TypeScript** - Type safety
- **Tailwind CSS 4** - Styling
- **Radix UI** - Accessible components
- **polkadot-api** - Blockchain interaction
- **RxJS** - Reactive state management

## Getting Started

### Prerequisites

- Node.js 18+
- pnpm (recommended) or npm
- Running parachain and storage provider (see main project README)

### Installation

```bash
# Install dependencies
pnpm install

# Generate chain types (requires running chain)
pnpm papi:generate

# Start development server
pnpm dev
```

### Development

```bash
# Start dev server
pnpm dev

# Build for production
pnpm build

# Preview production build
pnpm preview

# Lint code
pnpm lint
```

## Project Structure

```
console-ui/
├── src/
│ ├── components/ # Reusable UI components
│ │ ├── ui/ # Base components (Button, Card, etc.)
│ │ ├── Layout.tsx # App layout with navigation
│ │ └── ConnectDialog.tsx # Network connection dialog
│ ├── hooks/ # React hooks
│ │ └── useChain.tsx # Chain connection state
│ ├── lib/ # Utilities
│ │ └── utils.ts # Helper functions
│ ├── pages/ # Page components
│ │ ├── Dashboard.tsx
│ │ ├── Drives.tsx
│ │ ├── Buckets.tsx
│ │ ├── Upload.tsx
│ │ ├── Download.tsx
│ │ ├── Explorer.tsx
│ │ └── Accounts.tsx
│ ├── styles/ # Global styles
│ │ └── index.css # Tailwind config
│ ├── App.tsx # Root component
│ └── main.tsx # Entry point
├── public/ # Static assets
├── index.html # HTML template
├── package.json
├── tsconfig.json
└── vite.config.ts
```

## Configuration

### Network Endpoints

By default, the UI connects to:
- Chain WebSocket: `ws://127.0.0.1:2222`
- Provider HTTP: `http://127.0.0.1:3333`

These can be configured via the Connect dialog in the UI.

### Theme

The UI uses a dark theme by default. Colors can be customized in `src/styles/index.css`.

## Integration with SDKs

This UI is designed to work with the TypeScript SDKs:
- `@web3-storage/file-system-sdk` - File System operations
- `@web3-storage/s3-sdk` - S3-compatible operations

See `../sdk/typescript/` for SDK documentation.

## License

MIT
13 changes: 13 additions & 0 deletions user-interfaces/console-ui/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Web3 Storage Console</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
Loading