Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jawn/register return #262

Closed
wants to merge 6 commits into from
Closed
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
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,23 @@ npm i @entropyxyz/entropy-js --save

### Usage

NOTICE
`endpoint ` defaults to 'ws://127.0.0.1:9944' if no value is provided.

```js
import Entropy from '@entropyxyz/entropy-js'

// initialize entropy

const seed = "SEED"
const endpoint = "endpoint"
const signer = await getWallet(charlieStashSeed)

const entropyAccount: EntropyAccount = {
sigRequestKey: signer.pair,
programModKey: signer.pair
}

const entropy = new Entropy({ seed, endpoint })
await entropy.ready
entropy = new Entropy({ account: entropyAccount})
await entropy.ready

```

Expand Down Expand Up @@ -78,7 +85,7 @@ Throws if the address being registered is already in use.

#### Example(s)
```js
const address = entropy.keys?.wallet.address
const address = entropy.account?.wallet.address
console.log({ address })

// Can do a pre-check to see if the address is registered
Expand Down Expand Up @@ -206,7 +213,7 @@ The response is then processed and converted to an ArrayBuffer before being retu
#### Example(s)
```js
// get program
const fetchedProgram: ArrayBuffer = await entropy.programs.get(entropy.keys?.wallet.address)
const fetchedProgram: ArrayBuffer = await entropy.programs.get(entropy.account?.wallet.address)
```
#### Defined in

Expand Down
3 changes: 3 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ npm i @entropyxyz/entropy-js --save

### Usage

NOTICE
`endpoint ` defaults to 'ws://127.0.0.1:9944' if no value is provided.

```js
import Entropy from '@entropyxyz/entropy-js'

Expand Down
10 changes: 5 additions & 5 deletions docs/classes/extrinsic.default.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Initializes a new instance of the `ExtrinsicBaseClass`.

#### Defined in

[extrinsic/index.ts:30](https://github.com/entropyxyz/entropy-js/blob/a7aaa0c/src/extrinsic/index.ts#L30)
[extrinsic/index.ts:30](https://github.com/entropyxyz/entropy-js/blob/7732646/src/extrinsic/index.ts#L30)

## Properties

Expand All @@ -63,7 +63,7 @@ Initializes a new instance of the `ExtrinsicBaseClass`.

#### Defined in

[extrinsic/index.ts:21](https://github.com/entropyxyz/entropy-js/blob/a7aaa0c/src/extrinsic/index.ts#L21)
[extrinsic/index.ts:21](https://github.com/entropyxyz/entropy-js/blob/7732646/src/extrinsic/index.ts#L21)

___

Expand All @@ -73,7 +73,7 @@ ___

#### Defined in

[extrinsic/index.ts:20](https://github.com/entropyxyz/entropy-js/blob/a7aaa0c/src/extrinsic/index.ts#L20)
[extrinsic/index.ts:20](https://github.com/entropyxyz/entropy-js/blob/7732646/src/extrinsic/index.ts#L20)

## Methods

Expand Down Expand Up @@ -109,7 +109,7 @@ If the dry run fails or there's insufficient electricity (zaps).

#### Defined in

[extrinsic/index.ts:99](https://github.com/entropyxyz/entropy-js/blob/a7aaa0c/src/extrinsic/index.ts#L99)
[extrinsic/index.ts:99](https://github.com/entropyxyz/entropy-js/blob/7732646/src/extrinsic/index.ts#L99)

___

Expand Down Expand Up @@ -139,4 +139,4 @@ Will reject the promise if a dispatch error occurs or the filtered event is not

#### Defined in

[extrinsic/index.ts:45](https://github.com/entropyxyz/entropy-js/blob/a7aaa0c/src/extrinsic/index.ts#L45)
[extrinsic/index.ts:45](https://github.com/entropyxyz/entropy-js/blob/7732646/src/extrinsic/index.ts#L45)
Loading
Loading