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
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"@changesets/cli": "^2.27.0",
"@vitest/coverage-v8": "^3.2.4",
"lint-staged": "^16.4.0",
"tsup": "^8.5.1",
"typescript": "^5.7.0",
"vitest": "^3.0.0"
},
Expand Down
21 changes: 21 additions & 0 deletions packages/cli/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025-present Growae

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
70 changes: 70 additions & 0 deletions packages/cli/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<h1 align="center">@growae/reactive-cli</h1>

<p align="center">
CLI for generating typed Sophia contract bindings from ACI
</p>

<p align="center">
<a href="https://www.npmjs.com/package/@growae/reactive-cli"><img src="https://img.shields.io/npm/v/@growae/reactive-cli?colorA=21262d&colorB=3b82f6&style=flat" alt="Version"></a>
<a href="https://www.npmjs.com/package/@growae/reactive-cli"><img src="https://img.shields.io/npm/dm/@growae/reactive-cli?colorA=21262d&colorB=3b82f6&style=flat" alt="Downloads"></a>
<a href="https://github.com/growae/reactive/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/@growae/reactive-cli?colorA=21262d&colorB=3b82f6&style=flat" alt="MIT License"></a>
</p>

<br>

## Overview

CLI for `@growae/reactive` that generates fully typed TypeScript code from Sophia contract ACI files. Supports watch mode for development. Also exports `defineConfig`, `aci()` plugin, and `compiler()` plugin for programmatic use.

## Install

```bash
# npm
npm install -D @growae/reactive-cli

# yarn
yarn add -D @growae/reactive-cli

# pnpm
pnpm add -D @growae/reactive-cli
```

## Usage

### Scaffold a config

```bash
npx @growae/reactive-cli init
```

### Generate typed bindings

```bash
npx @growae/reactive-cli generate
```

### Watch mode

```bash
npx @growae/reactive-cli generate --watch
```

### Config file

```ts
// reactive.config.ts
import { defineConfig } from '@growae/reactive-cli'

export default defineConfig({
out: 'src/generated.ts',
contracts: [{ name: 'Token', aci: './contracts/Token.json' }],
})
```

## Documentation

Visit [reactive.growae.io/cli/getting-started](https://reactive.growae.io/cli/getting-started) for the full documentation.

## License

[MIT](https://github.com/growae/reactive/blob/main/LICENSE)
19 changes: 11 additions & 8 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,24 @@
"version": "0.0.2",
"type": "module",
"bin": {
"reactive": "./dist/esm/cli.js"
"reactive": "./dist/cli.js",
"@growae/reactive-cli": "./dist/cli.js"
},
"main": "dist/esm/cli.js",
"types": "dist/types/cli.d.ts",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/types/cli.d.ts",
"default": "./dist/esm/cli.js"
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"./package.json": "./package.json"
},
"files": ["dist"],
"scripts": {
"build": "tsc --project tsconfig.build.json --outDir ./dist/esm --declaration --declarationMap --declarationDir ./dist/types",
"build": "tsup",
"clean": "rm -rf dist",
"check:types": "tsc --noEmit",
"dev": "tsc --project tsconfig.build.json --outDir ./dist/esm --declaration --declarationMap --declarationDir ./dist/types --watch"
"dev": "tsup --watch"
},
"dependencies": {
"@growae/reactive": "workspace:*",
Expand All @@ -37,6 +39,7 @@
"access": "public"
},
"devDependencies": {
"@types/node": "^25.5.0"
"@types/node": "^25.5.0",
"tsup": "^8.5.0"
}
}
1 change: 0 additions & 1 deletion packages/cli/src/cli.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env node
import { cac } from 'cac'

import { generate } from './commands/generate'
Expand Down
13 changes: 13 additions & 0 deletions packages/cli/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export { defineConfig } from './config'
export type {
ReactiveConfig,
ContractConfig,
Plugin,
ResolvedContract,
} from './config'

export { aci } from './plugins/aci'
export type { AciConfig } from './plugins/aci'

export { compiler } from './plugins/compiler'
export type { CompilerConfig } from './plugins/compiler'
6 changes: 5 additions & 1 deletion packages/cli/src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
export const version = '0.0.1'
import { createRequire } from 'node:module'

const require = createRequire(import.meta.url)
const pkg = require('../package.json') as { version: string }
export const version = pkg.version
6 changes: 1 addition & 5 deletions packages/cli/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "dist/esm",
"declarationDir": "dist/types",
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"incremental": false,
"paths": {}
},
"include": ["src/**/*.ts"],
Expand Down
22 changes: 22 additions & 0 deletions packages/cli/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { defineConfig } from 'tsup'

export default defineConfig([
{
entry: { cli: 'src/cli.ts' },
format: 'esm',
target: 'node18',
splitting: false,
clean: true,
banner: { js: '#!/usr/bin/env node' },
tsconfig: 'tsconfig.build.json',
},
{
entry: { index: 'src/index.ts' },
format: 'esm',
target: 'node18',
dts: true,
splitting: false,
clean: false,
tsconfig: 'tsconfig.build.json',
},
])
21 changes: 21 additions & 0 deletions packages/connectors/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025-present Growae

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
64 changes: 64 additions & 0 deletions packages/connectors/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<h1 align="center">@growae/reactive-connectors</h1>

<p align="center">
Wallet connectors for Aeternity
</p>

<p align="center">
<a href="https://www.npmjs.com/package/@growae/reactive-connectors"><img src="https://img.shields.io/npm/v/@growae/reactive-connectors?colorA=21262d&colorB=3b82f6&style=flat" alt="Version"></a>
<a href="https://www.npmjs.com/package/@growae/reactive-connectors"><img src="https://img.shields.io/npm/dm/@growae/reactive-connectors?colorA=21262d&colorB=3b82f6&style=flat" alt="Downloads"></a>
<a href="https://github.com/growae/reactive/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/@growae/reactive-connectors?colorA=21262d&colorB=3b82f6&style=flat" alt="MIT License"></a>
</p>

<br>

## Overview

Wallet connectors for `@growae/reactive`. Includes `superhero()` (Superhero Wallet), `iframe()`, `webExtension()`, `ledger()`, `metamaskSnap()`, and `walletDetect()`, plus re-exports `mock()` and `memory()` from core.

## Install

```bash
# npm
npm install @growae/reactive-connectors @growae/reactive

# yarn
yarn add @growae/reactive-connectors @growae/reactive

# pnpm
pnpm add @growae/reactive-connectors @growae/reactive
```

## Usage

```ts
import { createConfig } from '@growae/reactive'
import { testnet } from '@growae/reactive/networks'
import {
superhero,
ledger,
walletDetect,
} from '@growae/reactive-connectors'

const config = createConfig({
networks: [testnet],
connectors: [
superhero(),
ledger(),
walletDetect(),
],
})
```

## Peer Dependencies

- `@aeternity/aepp-sdk >=14`
- Optional: `@ledgerhq/hw-transport >=6`

## Documentation

Visit [reactive.growae.io/core/getting-started](https://reactive.growae.io/core/getting-started) for the full documentation.

## License

[MIT](https://github.com/growae/reactive/blob/main/LICENSE)
21 changes: 21 additions & 0 deletions packages/core/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025-present Growae

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
61 changes: 61 additions & 0 deletions packages/core/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<h1 align="center">@growae/reactive</h1>

<p align="center">
Core vanilla TypeScript toolkit for Aeternity blockchain interactions
</p>

<p align="center">
<a href="https://www.npmjs.com/package/@growae/reactive"><img src="https://img.shields.io/npm/v/@growae/reactive?colorA=21262d&colorB=3b82f6&style=flat" alt="Version"></a>
<a href="https://www.npmjs.com/package/@growae/reactive"><img src="https://img.shields.io/npm/dm/@growae/reactive?colorA=21262d&colorB=3b82f6&style=flat" alt="Downloads"></a>
<a href="https://github.com/growae/reactive/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/@growae/reactive?colorA=21262d&colorB=3b82f6&style=flat" alt="MIT License"></a>
</p>

<br>

## Overview

Config-driven setup for Aeternity dApps. Provides actions (`spend`, `getBalance`, `signMessage`, `deployContract`, and more), network management, and a connector system. Use standalone or pair with a framework adapter.

## Install

```bash
# npm
npm install @growae/reactive

# yarn
yarn add @growae/reactive

# pnpm
pnpm add @growae/reactive
```

## Usage

```ts
import { createConfig } from '@growae/reactive'
import { getBalance, spend } from '@growae/reactive/actions'
import { testnet } from '@growae/reactive/networks'

const config = createConfig({ networks: [testnet] })

const balance = await getBalance(config, { address: 'ak_...' })

await spend(config, {
recipient: 'ak_...',
amount: '1.0',
})
```

## Dependencies

- [`@aeternity/aepp-sdk`](https://www.npmjs.com/package/@aeternity/aepp-sdk)
- [`zustand`](https://www.npmjs.com/package/zustand)
- Optional peer: [`@tanstack/query-core`](https://www.npmjs.com/package/@tanstack/query-core)

## Documentation

Visit [reactive.growae.io/core/getting-started](https://reactive.growae.io/core/getting-started) for the full documentation.

## License

[MIT](https://github.com/growae/reactive/blob/main/LICENSE)
21 changes: 21 additions & 0 deletions packages/create-reactive/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025-present Growae

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading
Loading