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

Commit

Permalink
sub0 docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tjjfvi committed Nov 27, 2022
1 parent 2a235c2 commit 7019dda
Show file tree
Hide file tree
Showing 18 changed files with 27 additions and 523 deletions.
35 changes: 19 additions & 16 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,36 @@
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"
```
// bind to the last inserted key
const key = System.Account.keys().first()

// bind to the corresponding value
const value = System.Account.entry(key)

> ... or use **the Node equivalent**––`npx capi`--with the same arguments.
console.log(await value.run())
```

Make use of those bindings.
> 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
> ```
```ts
import * as C from "capi"
import { system } from "./polkadot/frame.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))
```
deno task run <path-to-example>
```
## 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

0 comments on commit 7019dda

Please sign in to comment.