Skip to content

Commit

Permalink
chore: add readme for package
Browse files Browse the repository at this point in the history
  • Loading branch information
Envoy-VC committed Jan 31, 2024
1 parent a80575f commit 7e76255
Show file tree
Hide file tree
Showing 3 changed files with 372 additions and 44 deletions.
104 changes: 104 additions & 0 deletions packages/atomic-toolkit/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# Atomic Toolkit

Atomic Toolkit is your streamlined path to building on Atomic Standards. Craft rock-solid, spec-compliant assets with ease, thanks to robust type safety.

## Key Features

1. **Robust Type Safety**: Ensure accurate asset creation and adherence to Arweave specifications.
2. **Clear and Concise SDK**: Get up and running quickly with a developer-friendly experience.
3. **Comprehensive Function Coverage**: Create, fetch, and manage a variety of atomic assets, collections, and more.

## Getting Started

### Installation

```bash
npm install atomic-toolkit
```

### Setup

Import the SDK:

```ts
import AtomicToolkit from 'atomic-toolkit';
```

## Initialize with Arweave Wallet, Irys SDK, or Turbo SDK

Using Arweave Wallet

```ts
const key = JSON.parse(readFileSync('wallet.json').toString());

const toolkit = new AtomicToolkit({ key });
```

Using Irys:

```ts
import Irys from '@irys/sdk';

const irys = new Irys({
url: 'https://node2.irys.xyz',
token: 'matic',
key: 'your-private-key',
});

await irys.ready();

const toolkit = new AtomicToolkit({ irys });
```

Using Turbo Through Irys:

```ts
import Irys from '@irys/sdk';

const irys = new Irys({
url: 'https://turbo.ardrive.io',
token: 'matic',
key: 'your-private-key',
});

await irys.ready();

const toolkit = new AtomicToolkit({ irys });
```

Using Turbo:

```ts
const { TurboFactory } = require('@ardrive/turbo-sdk');
const AtomicToolkit = require('atomic-toolkit').default;
const fs = require('fs');

const jwk = JSON.parse(fs.readFileSync('./KeyFile.json').toString());
const turbo = TurboFactory.authenticated({ privateKey: jwk });

const toolkit = new AtomicToolkit({ turbo });
```

Using Turbo in the web:

```ts
import { ArconnectSigner } from 'arbundles/web';
import { TurboFactory } from '@ardrive/turbo-sdk/web';
import { AtomicToolkitWeb } from 'atomic-toolkit';

async function connectToolkit() {
await window.arweaveWallet.connect([
'ACCESS_PUBLIC_KEY',
'SIGNATURE',
'ACCESS_ADDRESS',
'SIGN_TRANSACTION',
]);
const arConnectSigner = new ArconnectSigner(window.arweaveWallet);
const turbo = await TurboFactory.authenticated({ signer: arConnectSigner });
const toolkit = new AtomicToolkitWeb({ turbo });
}
```

## Documentation

For a complete overview of available functions and usage examples, please refer to the official documentation: [https://atomictoolkit.mintlify.app](https://atomictoolkit.mintlify.app/introduction)
17 changes: 13 additions & 4 deletions packages/atomic-toolkit/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
{
"name": "atomic-toolkit",
"version": "0.2.0",
"description": "Toolkit for creating Atomic Assets on Arweave using Warp Contracts",
"description": "Toolkit for creating spec-compliant atomic assets on arweave.",
"repository": "https://github.com/Envoy-VC/atomic-toolkit/packages/atomic-toolkit",
"private": false,
"license": "MIT",
"bugs": {
"url": "https://github.com/Envoy-VC/atomic-toolkit/issues"
},
"author": "Vedant Chainani <[email protected]>",
"engines": {
"node": ">=18"
},
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
Expand All @@ -12,7 +21,8 @@
"scripts": {
"dev": "vitest",
"test": "vitest run",
"build": "tsup",
"build": "tsup && pnpm run postbuild",
"postbuild": "cp README.md dist/",
"lint": "tsc",
"ci": "pnpm run lint && pnpm run test && pnpm run build",
"release": "pnpm run lint && pnpm run test && pnpm run build && changeset publish",
Expand All @@ -25,8 +35,6 @@
"warp",
"contracts"
],
"author": "Vedant Chainani",
"license": "MIT",
"exports": {
".": {
"types": "./dist/index.d.ts",
Expand All @@ -43,6 +51,7 @@
"@types/node": "^18.19.3",
"@urql/core": "^4.2.2",
"bignumber.js": "^9.1.2",
"cpy-cli": "^5.0.0",
"dotenv": "^16.3.1",
"ethers": "v5",
"mime": "^4.0.0",
Expand Down
Loading

0 comments on commit 7e76255

Please sign in to comment.