-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
372 additions
and
44 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 |
---|---|---|
@@ -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) |
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,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", | ||
|
@@ -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", | ||
|
@@ -25,8 +35,6 @@ | |
"warp", | ||
"contracts" | ||
], | ||
"author": "Vedant Chainani", | ||
"license": "MIT", | ||
"exports": { | ||
".": { | ||
"types": "./dist/index.d.ts", | ||
|
@@ -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", | ||
|
Oops, something went wrong.