Skip to content
Merged
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
15 changes: 11 additions & 4 deletions .github/workflows/release_github.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
# On each new commit to `main`, create/update a release PR that bumps the
# version and updates the changelog from conventional commits. Merging that
# PR cuts a GitHub Release, which triggers publish_npmjs.yml.
#
# Release behaviour (package name, release-type, bump-minor-pre-major) lives in
# release-please-config.json, NOT in `with:` here. The v5 action silently
# ignores `package-name` and `bump-minor-pre-major` as inputs -- it warns and
# carries on -- so setting them here has no effect. Current version is tracked
# in .release-please-manifest.json.
name: Release Github

on:
push:
branches:
- main

permissions:
contents: write
pull-requests: write

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: GoogleCloudPlatform/release-please-action@v5
id: release
with:
token: ${{ secrets.REPO_GHA_PAT }}
release-type: node
package-name: swarm-core
bump-minor-pre-major: true
token: ${{ secrets.GHA_PAT_BASIC }}
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.0.1"
}
29 changes: 29 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
BSD 3-Clause License

Copyright (c) 2026, The Swarm Authors
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ No network I/O — this library only builds and parses Swarm's on-disk/on-wire d
## Install

```sh
npm install @ethersphere/swarm-core
npm install @ethersphere/core-sdk
```

Ships as both ESM and CommonJS, with full TypeScript types. Import from the subpath you need:

```ts
import { Bytes, Reference } from 'swarm-core/bytes'
import { makeContentAddressedChunk } from 'swarm-core/chunk'
import { Bytes, Reference } from '@ethersphere/core-sdk/bytes'
import { makeContentAddressedChunk } from '@ethersphere/core-sdk/chunk'
```

## Quick example

```ts
import { makeContentAddressedChunk } from 'swarm-core/chunk'
import { makeContentAddressedChunk } from '@ethersphere/core-sdk/chunk'

const chunk = makeContentAddressedChunk('Hello, Swarm!')
console.log(chunk.address.toHex())
Expand All @@ -30,15 +30,15 @@ console.log(chunk.address.toHex())

| Subpath | Contents |
|---|---|
| `swarm-core/bytes` | `Bytes` and typed wrappers (`Reference`, `BatchId`, `EthAddress`, `PrivateKey`, `PublicKey`, `Signature`, `Span`, `Topic`, `Identifier`, `FeedIndex`, `PeerAddress`, `TransactionId`) plus low-level encoding helpers (hex/base32/base64, concat, slice, integer packing) |
| `swarm-core/crypto` | Keccak-256, ECDSA sign/recover/verify, public/private key derivation |
| `swarm-core/chunk` | Content Addressed Chunks (CAC), Single Owner Chunks (SOC/SOC replicas), the BMT chunk hash, and `ChunkSplitter`/`ChunkJoiner` for building and reconstructing chunk trees |
| `swarm-core/mantaray` | `MantarayNode` — the manifest trie used for directory/collection uploads |
| `swarm-core/erasure-coding` | Reed-Solomon parity, redundancy-level tables, and the batching logic used to add parity chunks to a stream |
| `swarm-core/encryption` | Chunk-level stream cipher and XOR helpers |
| `swarm-core/stamper` | Postage stamp signing (`Stamper`, `stamp()`) and effective-capacity math |

Every subpath is also re-exported from the package root (`swarm-core`), so `import { Bytes } from 'swarm-core'` works too.
| `@ethersphere/core-sdk/bytes` | `Bytes` and typed wrappers (`Reference`, `BatchId`, `EthAddress`, `PrivateKey`, `PublicKey`, `Signature`, `Span`, `Topic`, `Identifier`, `FeedIndex`, `PeerAddress`, `TransactionId`) plus low-level encoding helpers (hex/base32/base64, concat, slice, integer packing) |
| `@ethersphere/core-sdk/crypto` | Keccak-256, ECDSA sign/recover/verify, public/private key derivation |
| `@ethersphere/core-sdk/chunk` | Content Addressed Chunks (CAC), Single Owner Chunks (SOC/SOC replicas), the BMT chunk hash, and `ChunkSplitter`/`ChunkJoiner` for building and reconstructing chunk trees |
| `@ethersphere/core-sdk/mantaray` | `MantarayNode` — the manifest trie used for directory/collection uploads |
| `@ethersphere/core-sdk/erasure-coding` | Reed-Solomon parity, redundancy-level tables, and the batching logic used to add parity chunks to a stream |
| `@ethersphere/core-sdk/encryption` | Chunk-level stream cipher and XOR helpers |
| `@ethersphere/core-sdk/stamper` | Postage stamp signing (`Stamper`, `stamp()`) and effective-capacity math |

Every subpath is also re-exported from the package root (`@ethersphere/core-sdk`), so `import { Bytes } from '@ethersphere/core-sdk'` works too.

## Development

Expand Down
10 changes: 10 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
{
"name": "@ethersphere/core-sdk",
"version": "0.0.1",
"description": "Framework-agnostic TypeScript primitives for the Swarm decentralised storage network",
"repository": {
"type": "git",
"url": "https://github.com/ethersphere/core-sdk.git"
},
"homepage": "https://github.com/ethersphere/core-sdk",
"bugs": {
"url": "https://github.com/ethersphere/core-sdk/issues/"
},
"license": "BSD-3-Clause",
"type": "module",
"packageManager": "pnpm@10.29.2",
"engines": {
Expand Down
11 changes: 11 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"packages": {
".": {
"release-type": "node",
"package-name": "@ethersphere/core-sdk",
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": false
}
}
}
Loading