Skip to content

Commit

Permalink
fix: write all apis in alphabetical order
Browse files Browse the repository at this point in the history
  • Loading branch information
Ngozi-Txfusion committed Aug 4, 2024
1 parent 6b2edd6 commit ae265a4
Show file tree
Hide file tree
Showing 27 changed files with 6,602 additions and 6,609 deletions.
249 changes: 125 additions & 124 deletions content/sdk/10.js/00.ethers/05.api/10.v5/00.providers/01.provider.md

Large diffs are not rendered by default.

680 changes: 340 additions & 340 deletions content/sdk/10.js/00.ethers/05.api/10.v5/00.providers/02.web3provider.md

Large diffs are not rendered by default.

2,097 changes: 1,048 additions & 1,049 deletions content/sdk/10.js/00.ethers/05.api/10.v5/01.accounts/01.wallet.md

Large diffs are not rendered by default.

38 changes: 19 additions & 19 deletions content/sdk/10.js/00.ethers/05.api/10.v5/01.accounts/02.signer.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,25 @@ const browserProvider = new Web3Provider(window.ethereum);
const signer = Signer.from(browserProvider.getSigner(), Provider.getDefaultProvider(types.Network.Sepolia));
```

### `getAllBalances`

Returns all token balances of the account.

```ts
async getAllBalances(): Promise<BalancesMap>
```

#### Example

```ts
import { Web3Provider, Provider, types } from "zksync-ethers";

const browserProvider = new Web3Provider(window.ethereum);
const signer = Signer.from(browserProvider.getSigner(), Provider.getDefaultProvider(types.Network.Sepolia));

const allBalances = await signer.getAllBalances();
```

### `getBalance`

Returns the amount of the token the `Signer` has.
Expand Down Expand Up @@ -56,25 +75,6 @@ const token = "0x6a4Fb925583F7D4dF82de62d98107468aE846FD1";
console.log(`Token balance: ${await signer.getBalance(token)}`);
```

### `getAllBalances`

Returns all token balances of the account.

```ts
async getAllBalances(): Promise<BalancesMap>
```

#### Example

```ts
import { Web3Provider, Provider, types } from "zksync-ethers";

const browserProvider = new Web3Provider(window.ethereum);
const signer = Signer.from(browserProvider.getSigner(), Provider.getDefaultProvider(types.Network.Sepolia));

const allBalances = await signer.getAllBalances();
```

### `getDeploymentNonce`

Returns the deployment nonce of the account.
Expand Down
940 changes: 470 additions & 470 deletions content/sdk/10.js/00.ethers/05.api/10.v5/01.accounts/03.l1signer.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ tags: ["zksync", "ethers.js", "blockchain", "EIP712", "smart contracts"]

This class provides support for an EIP712 transaction. The methods of this class are mostly used internally.

### `getDomain`

Returns the EIP712 domain.

```ts
async getDomain(): Promise<ethers.TypedDataDomain>
```

### `getSignInput`

Generates the EIP-712 typed data from provided transaction. Optional fields are populated by zero values.
Expand Down Expand Up @@ -36,9 +44,9 @@ const tx = EIP712Signer.getSignInput({
});
```

### `sign`
### `getSignedDigest`

Signs an Ethereum transaction using EIP-712.
Generates the signed digest of an Ethereum transaction using EIP-712.

#### Inputs

Expand All @@ -47,12 +55,12 @@ Signs an Ethereum transaction using EIP-712.
| `transaction` | [`TransactionRequest`](/sdk/js/ethers/api/v5/types#transactionrequest) | Transaction request. |

```ts
async sign(transaction: TransactionRequest): Promise<Signature>
static getSignedDigest(transaction: TransactionRequest): ethers.BytesLike
```

### `getSignedDigest`
### `sign`

Generates the signed digest of an Ethereum transaction using EIP-712.
Signs an Ethereum transaction using EIP-712.

#### Inputs

Expand All @@ -61,13 +69,5 @@ Generates the signed digest of an Ethereum transaction using EIP-712.
| `transaction` | [`TransactionRequest`](/sdk/js/ethers/api/v5/types#transactionrequest) | Transaction request. |

```ts
static getSignedDigest(transaction: TransactionRequest): ethers.BytesLike
```

### `getDomain`

Returns the EIP712 domain.

```ts
async getDomain(): Promise<ethers.TypedDataDomain>
async sign(transaction: TransactionRequest): Promise<Signature>
```
Loading

0 comments on commit ae265a4

Please sign in to comment.