Skip to content

Commit

Permalink
fix: ethereum account initialization (#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
gmolki authored Nov 16, 2024
1 parent 7a488d1 commit 9291777
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/libraries/typescript-sdk/accounts.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Chains provide a `newAccount` function for testing purposes. Example using Ether
```typescript
import { newAccount } from '@aleph-sdk/ethereum';

const account = newAccount();
const { account } = newAccount();
```

### Browser wallets
Expand Down
2 changes: 1 addition & 1 deletion docs/libraries/typescript-sdk/aggregates.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ You need a valid account and instantiate an authenticated client:
import { AuthenticatedAlephHttpClient } from '@aleph-sdk/client';
import * as ethereum from '@aleph-sdk/ethereum';

const account = ethereum.newAccount();
const { account } = ethereum.newAccount();
const client = new AuthenticatedAlephHttpClient(account);
```

Expand Down
2 changes: 1 addition & 1 deletion docs/libraries/typescript-sdk/instances.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ In this example, we will reserve ALEPH tokens by signing an aleph.im message.
import { newAccount } from '@aleph-sdk/ethereum';
import { authenticatedAlephHttpClient } from '@aleph-sdk/client';

const account = newAccount();
const { account } = newAccount();
const client = authenticatedAlephHttpClient(account);
// You need an SSH key to connect to the instance
const sshKey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC3...";
Expand Down
6 changes: 3 additions & 3 deletions docs/libraries/typescript-sdk/posts.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Creating a post is as simple as calling the `createPost` function on the client.
import { newAccount } from '@aleph-sdk/ethereum';
import { AuthenticatedAlephHttpClient } from '@aleph-sdk/client';

const account = newAccount();
const { account } = newAccount();
const client = new AuthenticatedAlephHttpClient(account);
const message = await client.createPost({
content: { hello: "world" },
Expand Down Expand Up @@ -86,7 +86,7 @@ Example:
import { newAccount } from '@aleph-sdk/ethereum';
import { AuthenticatedAlephHttpClient } from '@aleph-sdk/client';

const account = newAccount();
const { account } = newAccount();
const client = new AuthenticatedAlephHttpClient(account);
const message = await client.createPost({
content: { hello: "aleph" },
Expand Down Expand Up @@ -122,7 +122,7 @@ of the post you want to delete. You may also forget multiple posts at a time.
import { newAccount } from '@aleph-sdk/ethereum';
import { AuthenticatedAlephHttpClient } from '@aleph-sdk/client';

const account = newAccount();
const { account } = newAccount();
const client = new AuthenticatedAlephHttpClient(account);
const message = await client.forget({
hashes: ["02afdbf33ff2c6ddb46349298a4598a8801cec61dbaa8f3a17ba9d1ad6dd8cb1"],
Expand Down

0 comments on commit 9291777

Please sign in to comment.