
Product
Introducing Repository Access Permissions and Custom Roles
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.
@simplepg/dservice
Advanced tools
A decentralized backend service for the SimplePage application that provides IPFS storage, blockchain indexing, and REST API endpoints for managing decentralized web pages.
SimplePage DService is a Node.js service that bridges the gap between the SimplePage smart contract and IPFS storage. It provides:
npm install -g @simplepg/dservice
The DService provides a CLI with various options and subcommands:
# Start the service with default settings
simplepage-dservice
# Start with custom configuration
simplepage-dservice \
--ipfs-api http://localhost:5001 \
--api-port 3000 \
--api-host localhost \
--rpc https://mainnet.infura.io/v3/YOUR_KEY \
--start-block 18000000 \
--chain-id 1
# Manage allow list
simplepage-dservice allow-list show
simplepage-dservice allow-list add example.eth
simplepage-dservice allow-list rm example.eth
# Manage block list
simplepage-dservice block-list show
simplepage-dservice block-list add spam.eth
simplepage-dservice block-list rm spam.eth
| Variable | Description | Default |
|---|---|---|
IPFS_API_URL | IPFS API endpoint | http://localhost:5001 |
API_PORT | HTTP API port | 3000 |
API_HOST | HTTP API host | localhost |
RPC_URL | Ethereum RPC URL | http://localhost:8545 |
START_BLOCK | Starting block for indexing | 1 |
CHAIN_ID | Ethereum chain ID | 1 |
| Option | Short | Description | Default |
|---|---|---|---|
--ipfs-api | -i | IPFS API URL | http://localhost:5001 |
--api-port | -p | API port | 3000 |
--api-host | -a | API host | localhost |
--rpc | -r | Ethereum RPC URL | http://localhost:8545 |
--start-block | -b | Starting block number | 1 |
--chain-id | -c | Chain ID | 1 |
http://localhost:3000
Retrieve a page by its CID. Returns a CAR-file containing only index.html and index.md files for each directory contained by the page.
Query Parameters:
cid (required): Content identifier of the pageResponse:
200: CAR file containing the page data400: Bad request (missing CID)404: Page not foundExample:
curl "http://localhost:3000/page?cid=bafybeieffej45qo3hqi3eggqoqwgjihscmij42hmhqy3u7se7vzgi7h2zm"
Upload a new page.
Query Parameters:
domain (required): ENS domain for the pageBody:
file (required): CAR file (application/vnd.ipld.car)Response:
{
"cid": "bafybeieffej45qo3hqi3eggqoqwgjihscmij42hmhqy3u7se7vzgi7h2zm"
}
Example:
curl -X POST \
-F "file=@page.car" \
"http://localhost:3000/page?domain=example.eth"
Get API version information.
Response:
{
"version": "0.1.0"
}
Interactive API documentation (Swagger UI).
OpenAPI specification in JSON format.
Handles all IPFS-related operations:
Manages blockchain indexing:
Provides HTTP endpoints:
# Run all tests
npm test
# Run specific test file
npm test -- tests/services/ipfs.test.js
# Start with auto-restart on file changes
npm run dev
# Run ESLint
npm run lint
MIT License - see LICENSE for details.
For questions and support:
FAQs
JavaScript implementation of the SimplePage backend service
The npm package @simplepg/dservice receives a total of 15 weekly downloads. As such, @simplepg/dservice popularity was classified as not popular.
We found that @simplepg/dservice demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.