# @smartweaver/core

> A collection of code intended to help you build your Steezy SmartWeave tooling and workflows

Latest version **0.0.2** (published 2023-11-07) · GPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install @smartweaver/core
pnpm add @smartweaver/core
yarn add @smartweaver/core
bun add @smartweaver/core
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2023-11-07 |
| First published | 2023-11-07 |
| Weekly downloads | 0 |
| License | GPL-3.0 |
| TypeScript types | none |
| Module format | ESM |
| Dependencies | 0 |
| Unpacked size | 63.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Eric Crooks |
| Maintainers | crookse |
| Keywords | arweave, blockchain, blockweave, contracts, crypto, dapps, drashland, framework, http, permanence, smart-contracts, smartweave, web3 |

## Links

- npm: https://www.npmjs.com/package/@smartweaver/core
- Repository: https://github.com/smartweaver/core
- npm.io page: https://npm.io/package/@smartweaver/core

## Alternatives

- [@sveltejs/kit](https://npm.io/package/@sveltejs/kit.md) — 2.2M weekly downloads
- [@atlaskit/theme](https://npm.io/package/@atlaskit/theme.md) — 402.0K weekly downloads
- [@tangle-network/brand](https://npm.io/package/@tangle-network/brand.md) — 10.0K weekly downloads
- [seneca](https://npm.io/package/seneca.md) — 7.4K weekly downloads
- [@bsb/base](https://npm.io/package/@bsb/base.md) — 7.2K weekly downloads

## Recent versions

- 0.0.2 (latest) — 2023-11-07
- 0.0.1 — 2023-11-07

## README

# SmartWeaver

A collection of code intended to help you build your steezy SmartWeave tooling and workflows

## Explore

View SmartWeaver projects at https://github.com/smartweaver.

## Codebases

The SmartWeaver ecosystem is made up of the following codebases:

- Core: All files/directories in the `src` directory (excluding `src/standard`)
- Standard: All files/directories in the `src/standard` directory
- Modules: All repositories at https://github.com/smartweaver excluding the `core` repository

These codebases are explained in further detail below.

### Core

This part of the codebase provides types, interfaces, and classes (with minimal implementation). It contains the lowest level APIs and is intended to help build the Standard and Modules codebases.

To separate concerns, Core does not import code from Standard or Modules.

### Standard

This part of the codebase is similar to Deno's Standard Library and Go's Standard Library, but smaller. Standard code is intended to be used as standalone code and code to help build modules in the Modules codebase (e.g., Slick Contract).

To separate concerns, Standard code only imports from Standard and Core. It does not import from Modules.

### Modules

This part of the codebase is:

- not included in this module;
- is a combination of multiple repositories (found at https://github.com/smartweaver); and
- can contain third-party code.

Modules import the most functionality for things like processing contract interactions, deploying contracts, bundling transactions, etc. Modules import from:

- Core
- Standard
- Third-party code (e.g., `smartweave`, `arweave`)

## Contributing

### Prerequisites

- Install Node (use the Node version in `nvmrc`)
- Install Deno (use the latest v1.x version)

### Tests

Tests are in the `tests` directory. The `tests` directory has a strict structure and naming convention as follows:

- The `tests` directory structure mimics the `src` directory structure:

    ```text
    ▾  src/
      ▾  standard/
        ▸  handlers/
    ▾  tests/
      ▸  core/
      ▾  standard/
        ▸  handlers/
    ```

- Test file names mimic the file they test, include the type of tests they contain, and end of `.test.ts`:

    ```text
    Format:    <file being tested>.<test type>.test.ts

    src file:  IsolatedHandlerChain.ts
    test file: IsolatedHandlerChain.unit.test.ts
    ```

Here is an example of the conventions mentioned above:

```text
▾  src/
  ▸  core/
  ▾  standard/
    ▾  chains/
         IsolatedHandlerChain.ts
    ▸  handlers/
▾  tests/
  ▸  core/
  ▾  standard/
    ▾  chains/
         IsolatedHandlerChain.unit.test.ts
         IsolatedHandlerChain.integration.test.ts
    ▸  handlers/
```

### Development Tips

1. Use Node version in `nvmrc`.

1. Do not add scripts to `package.json`. Add scripts to `deno.json`. This repo uses `deno task <script>`, not `yarn <script>`.

1. Add tests if you can. If you do, follow the conventions mentioned above in the [Tests](#tests) section.

1. Add a summary to your pull request and how to exercise your work. For example:

    ```text
    ## Summary
    
    - Added this
    - Changed that

    ## How to test

    1. Run this script.

    1. Run the tests.

    1. Import this module and check the typings.

    ... etc.
    ```

1. GitHub actions are in place to check pull requests for lint and formatting. Use `deno lint` and `deno fmt` to help you make fixes/changes.

---
_Source: https://npm.io/package/@smartweaver/core · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
