-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from Irys-xyz/feat/bundles-v1
feat: change id encoding from base64url to base58, update package.json
- Loading branch information
Showing
14 changed files
with
43 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,26 @@ | ||
# ANS-104 Bundles | ||
|
||
**If you want to use Bundlr Network head over to [this repo](https://github.com/Bundlr-Network/js-client)** | ||
# Irys bundles | ||
**If you want to use the Irys Network, head over to [our SDK](https://github.com/Irys-xyz/js-sdk)** | ||
|
||
A low level library for creating, editing, reading and verifying bundles. | ||
|
||
See [ANS-104](https://github.com/ArweaveTeam/arweave-standards/blob/master/ans/ANS-104.md) for more details. | ||
|
||
## Installing the library | ||
|
||
Using npm: | ||
|
||
`npm install arbundles` | ||
`npm install @irys/bundles` | ||
|
||
Using yarn: | ||
|
||
`yarn add arbundles` | ||
`yarn add @irys/bundles` | ||
|
||
## Creating bundles | ||
|
||
```ts | ||
import { bundleAndSignData, createData } from "arbundles"; | ||
import { bundleAndSignData, createData, EthereumSigner } from "@irys/bundles"; | ||
|
||
const dataItems = [createData("some data"), createData("some other data")]; | ||
|
||
const signer = new ArweaveSigner(jwk); | ||
const signer = new EthereumSigner("privateKey") | ||
|
||
const bundle = await bundleAndSignData(dataItems, signer); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export type Base64URLString = string; | ||
export type Base58String = string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import * as arbundlesSrc from "./src"; | ||
import * as bundlesSrc from "./src"; | ||
import * as stream from "./src/stream"; | ||
const expObj = { ...arbundlesSrc, stream }; | ||
globalThis.arbundles ??= expObj; | ||
const expObj = { ...bundlesSrc, stream }; | ||
globalThis.bundles ??= expObj; | ||
export * from "./src/index"; | ||
export * from "./src/stream"; | ||
export default expObj; | ||
export const arbundles = expObj; | ||
export const bundles = expObj; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters