# o1js-trgraph

> o1js transformation graph

Latest version **2.2.0** (published 2024-05-11) · (Apache-2.0 AND MIT) license · 0 weekly downloads

## Install

```sh
npm install o1js-trgraph
pnpm add o1js-trgraph
yarn add o1js-trgraph
bun add o1js-trgraph
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.2.0 |
| Published | 2024-05-11 |
| First published | 2023-12-08 |
| Weekly downloads | 0 |
| License | (Apache-2.0 AND MIT) |
| TypeScript types | none |
| Module format | ESM |
| Dependencies | 1 |
| Unpacked size | 27 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | pavelpal |
| Keywords | o1js-trgraph, o1js transformation graph, trgraph, transformation graph |

## Links

- npm: https://www.npmjs.com/package/o1js-trgraph
- Repository: https://github.com/zcred-org/o1js-trgraph
- Homepage: https://github.com/zcred-org/o1js-trgraph#readme
- Issues: https://github.com/zcred-org/o1js-trgraph/issues
- npm.io page: https://npm.io/package/o1js-trgraph

## Dependencies (1)

- [trgraph](https://npm.io/package/trgraph.md) ^1.1.2

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 2.2.0 (latest) — 2024-05-11
- 2.1.0 — 2024-01-24
- 2.0.2 — 2024-01-24
- 2.0.1 — 2024-01-24
- 2.0.0 — 2024-01-24
- 1.0.4 — 2023-12-22
- 1.0.3 — 2023-12-21
- 1.0.2 — 2023-12-16
- 1.0.1 — 2023-12-12
- 1.0.0 — 2023-12-08

## README

# O1JS Transformation Graph - O1JS TrGraph

## Usage

```typescript
import {O1TrGraph} from "o1js-trgraph";
import * as o1js from "o1js";

const trGraph = new O1TrGraph(o1js);
const result = trGraph.objectTransform({
  name: "Test",
  age: 18
}, {
  name: ["utf8-mina:string"],
  age: ["uin64-mina:field"]
});
assert.equal(result, {
  transformed: {
    name: CircuitString.fromString("Test"), 
    age: Field(18) 
  },
  linear: [CircuitString.fromString("Test"), Field(18)]
});

trGraph.transform(11, ["uin16-mina:uint64"]) // UInt.from(11)
```

## Extended Links

```typescript
  "mina:field",
  "mina:fields",
  "mina:bool",
  "mina:publickey",
  "mina:privatekey",
  "mina:signature",
  "mina:string",
  "mina:uint64",
  "uint16-mina:field",
  "uint32-mina:field",
  "uint64-mina:field",
  "uint128-mina:field",
  "uint256-mina:field",
  "uint-mina:field",
  "mina:field-uint256",
  "mina:field-uint",
  "uint16-mina:uint64",
  "uint32-mina:uint64",
  "uint64-mina:uint64",
  "uint-mina:uint64",
  "mina:uint64-uint64",
  "mina:uint64-uint128",
  "mina:uint64-uint256",
  "mina:uint64-uint",
  "utf8-mina:string",
  "ascii-mina:string",
  "mina:string-ascii",
  "mina:uint64-mina:fields",
  "mina:fields-mina:uint64",
  "mina:uint64-mina:field",
  "mina:field-mina:uint64",
  "base58-mina:signature",
  "mina:signature-base58",
  "mina:signature-mina:fields",
  "mina:fields-mina:signature",
  "base58-mina:publickey",
  "mina:publickey-base58",
  "mina:publickey-mina:fields",
  "mina:fields-mina:publickey",
  "base58-mina:privatekey",
  "mina:privatekey-base58",
  "mina:privatekey-mina:fields",
  "mina:fields-mina:privatekey",
  "boolean-mina:bool",
  "mina:bool-mina:field",
  "mina:bool-mina:fields",
  "mina:fields-mina:bool",
  "mina:bool-boolean",
  "mina:mod.order",
  "mina:string-mina:fields",
  "mina:fields-mina:string"
```

See default links [here](https://github.com/zcred-org/trgraph)

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