Skip to content
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.

docs: update re sub0 #441

Merged
merged 1 commit into from
Nov 27, 2022
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
36 changes: 20 additions & 16 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,37 @@

Capi is a declarative, TypeScript-first toolkit for crafting interactions with Substrate-based chains. It consists of [FRAME](https://docs.substrate.io/v3/runtime/frame/) utilities and [a high-level functional effect system](https://github.com/paritytech/zones) and [effects](./effects), which facilitate multistep, multichain interactions without compromising either performance or safety.

- [Documentation &rarr;](./docs/Readme.md)<br />Materials for learning about Capi
- [Examples &rarr;](./examples)<br />SHOW ME THE CODE
- [API Reference &rarr;](https://deno.land/x/capi/mod.ts)<br />A generated API reference, based on type signatures and in-source comments.
- [Type Conversion Guide &rarr;](./docs/Types.md)<br />Guide for Capi's conversion of types from Rust to TypeScript

## At a Glance

Generate chain-specific bindings.
```ts
import { System } from "https://capi.dev/proxy/wss:rpc.polkadot.io/pallets/mod.ts"

```sh
deno run -A -r https://deno.land/x/capi/codegen.ts \
--src="wss://rpc.polkadot.io" \
--out="polkadot"
```
const key = System.Account.keys().first()

> ... or use **the Node equivalent**––`npx capi`--with the same arguments.
const value = System.Account.entry(key)

Make use of those bindings.
console.log(await value.run())
```

```ts
import * as C from "capi"
import { system } from "./polkadot/frame.ts"
> Note: although the codegen server is hosted on https://capi.dev, we encourage you to run it locally with
>
> ```sh
> deno run -A https://deno.land/x/capi/serve.ts
> ```

## Examples

// bind to the last inserted key
const key = system.account.keys.first
See [the `examples/` directory](./examples).

// bind to the corresponding value
const value = C.run(system.account.get(key))
```sh
git clone https://github.com/partitytech/capi
cd capi
deno task run codegen # host the server locally and cache all codegen
deno task run examples/<example-name>.ts
```

## The Thesis
Expand Down
70 changes: 0 additions & 70 deletions docs/Configs.md

This file was deleted.

1 change: 0 additions & 1 deletion docs/Derivations.md

This file was deleted.

1 change: 0 additions & 1 deletion docs/Dynamic_Targets.md

This file was deleted.

175 changes: 0 additions & 175 deletions docs/Effects.md

This file was deleted.

1 change: 0 additions & 1 deletion docs/Events.md

This file was deleted.

1 change: 0 additions & 1 deletion docs/Future_Direction.md

This file was deleted.

1 change: 0 additions & 1 deletion docs/Patterns.md

This file was deleted.

47 changes: 0 additions & 47 deletions docs/Principles.md

This file was deleted.

Loading