Skip to content

Commit

Permalink
Update dosc
Browse files Browse the repository at this point in the history
  • Loading branch information
michalsmiarowski committed Nov 14, 2023
1 parent 4003943 commit b30a8f0
Show file tree
Hide file tree
Showing 2 changed files with 123 additions and 84 deletions.
38 changes: 1 addition & 37 deletions typescript/api-reference/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
- [EthereumTBTCVault](classes/EthereumTBTCVault.md)
- [EthereumWalletRegistry](classes/EthereumWalletRegistry.md)
- [Hex](classes/Hex.md)
- [LedgerLiveAppEthereumSigner](classes/LedgerLiveAppEthereumSigner.md)
- [LedgerLiveEthereumSigner](classes/LedgerLiveEthereumSigner.md)
- [MaintenanceService](classes/MaintenanceService.md)
- [OptimisticMinting](classes/OptimisticMinting.md)
- [RedemptionsService](classes/RedemptionsService.md)
Expand Down Expand Up @@ -102,8 +102,6 @@
- [ethereumAddressFromSigner](README.md#ethereumaddressfromsigner)
- [ethereumNetworkFromSigner](README.md#ethereumnetworkfromsigner)
- [extractBitcoinRawTxVectors](README.md#extractbitcoinrawtxvectors)
- [getWalletAPIClient](README.md#getwalletapiclient)
- [getWindowMessageTransport](README.md#getwindowmessagetransport)
- [loadEthereumContracts](README.md#loadethereumcontracts)
- [retryAll](README.md#retryall)
- [skipRetryWhenMatched](README.md#skipretrywhenmatched)
Expand Down Expand Up @@ -771,40 +769,6 @@ Transaction data with fields represented as un-prefixed hex strings.

___

### getWalletAPIClient

**getWalletAPIClient**(`windowMessageTransport`): `WalletAPIClient`\<`CustomModule`, (`client`: `WalletAPIClient`\<`CustomModule`, (client: WalletAPIClient\<CustomModule, ...\>) =\> CustomModule \| Record\<string, CustomModule\>\>) => `CustomModule` \| `Record`\<`string`, `CustomModule`\>\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `windowMessageTransport` | `default` |

#### Returns

`WalletAPIClient`\<`CustomModule`, (`client`: `WalletAPIClient`\<`CustomModule`, (client: WalletAPIClient\<CustomModule, ...\>) =\> CustomModule \| Record\<string, CustomModule\>\>) => `CustomModule` \| `Record`\<`string`, `CustomModule`\>\>

#### Defined in

[src/lib/utils/ledger.ts:171](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L171)

___

### getWindowMessageTransport

**getWindowMessageTransport**(): `default`

#### Returns

`default`

#### Defined in

[src/lib/utils/ledger.ts:167](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L167)

___

### loadEthereumContracts

**loadEthereumContracts**(`signer`, `network`): `Promise`\<[`TBTCContracts`](README.md#tbtccontracts)\>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,77 +1,83 @@
# Class: LedgerLiveAppEthereumSigner
# Class: LedgerLiveEthereumSigner

Ethereum signer extended from `ethers` Signer class. The main purpose of it
is to allow the user to communicate with eth contracts through our tBTC SDK
inside Ledger Live application, when the app is used there as a Live App.

## Hierarchy

- `Signer`

**`LedgerLiveAppEthereumSigner`**
**`LedgerLiveEthereumSigner`**

## Table of contents

### Constructors

- [constructor](LedgerLiveAppEthereumSigner.md#constructor)
- [constructor](LedgerLiveEthereumSigner.md#constructor)

### Properties

- [\_account](LedgerLiveAppEthereumSigner.md#_account)
- [\_isSigner](LedgerLiveAppEthereumSigner.md#_issigner)
- [\_walletApiClient](LedgerLiveAppEthereumSigner.md#_walletapiclient)
- [\_windowMessageTransport](LedgerLiveAppEthereumSigner.md#_windowmessagetransport)
- [provider](LedgerLiveAppEthereumSigner.md#provider)
- [\_account](LedgerLiveEthereumSigner.md#_account)
- [\_isSigner](LedgerLiveEthereumSigner.md#_issigner)
- [\_walletApiClient](LedgerLiveEthereumSigner.md#_walletapiclient)
- [\_windowMessageTransport](LedgerLiveEthereumSigner.md#_windowmessagetransport)
- [provider](LedgerLiveEthereumSigner.md#provider)

### Accessors

- [account](LedgerLiveAppEthereumSigner.md#account)
- [account](LedgerLiveEthereumSigner.md#account)

### Methods

- [\_checkProvider](LedgerLiveAppEthereumSigner.md#_checkprovider)
- [call](LedgerLiveAppEthereumSigner.md#call)
- [checkTransaction](LedgerLiveAppEthereumSigner.md#checktransaction)
- [connect](LedgerLiveAppEthereumSigner.md#connect)
- [estimateGas](LedgerLiveAppEthereumSigner.md#estimategas)
- [getAccountId](LedgerLiveAppEthereumSigner.md#getaccountid)
- [getAddress](LedgerLiveAppEthereumSigner.md#getaddress)
- [getBalance](LedgerLiveAppEthereumSigner.md#getbalance)
- [getChainId](LedgerLiveAppEthereumSigner.md#getchainid)
- [getFeeData](LedgerLiveAppEthereumSigner.md#getfeedata)
- [getGasPrice](LedgerLiveAppEthereumSigner.md#getgasprice)
- [getTransactionCount](LedgerLiveAppEthereumSigner.md#gettransactioncount)
- [populateTransaction](LedgerLiveAppEthereumSigner.md#populatetransaction)
- [requestAccount](LedgerLiveAppEthereumSigner.md#requestaccount)
- [resolveName](LedgerLiveAppEthereumSigner.md#resolvename)
- [sendTransaction](LedgerLiveAppEthereumSigner.md#sendtransaction)
- [setAccount](LedgerLiveAppEthereumSigner.md#setaccount)
- [signMessage](LedgerLiveAppEthereumSigner.md#signmessage)
- [signTransaction](LedgerLiveAppEthereumSigner.md#signtransaction)
- [isSigner](LedgerLiveAppEthereumSigner.md#issigner)
- [\_catchWalletApiError](LedgerLiveEthereumSigner.md#_catchwalletapierror)
- [\_checkAccount](LedgerLiveEthereumSigner.md#_checkaccount)
- [\_checkProvider](LedgerLiveEthereumSigner.md#_checkprovider)
- [\_checkProviderAndAccount](LedgerLiveEthereumSigner.md#_checkproviderandaccount)
- [\_getWalletApiEthereumTransaction](LedgerLiveEthereumSigner.md#_getwalletapiethereumtransaction)
- [call](LedgerLiveEthereumSigner.md#call)
- [checkTransaction](LedgerLiveEthereumSigner.md#checktransaction)
- [connect](LedgerLiveEthereumSigner.md#connect)
- [estimateGas](LedgerLiveEthereumSigner.md#estimategas)
- [getAccountId](LedgerLiveEthereumSigner.md#getaccountid)
- [getAddress](LedgerLiveEthereumSigner.md#getaddress)
- [getBalance](LedgerLiveEthereumSigner.md#getbalance)
- [getChainId](LedgerLiveEthereumSigner.md#getchainid)
- [getFeeData](LedgerLiveEthereumSigner.md#getfeedata)
- [getGasPrice](LedgerLiveEthereumSigner.md#getgasprice)
- [getTransactionCount](LedgerLiveEthereumSigner.md#gettransactioncount)
- [populateTransaction](LedgerLiveEthereumSigner.md#populatetransaction)
- [requestAccount](LedgerLiveEthereumSigner.md#requestaccount)
- [resolveName](LedgerLiveEthereumSigner.md#resolvename)
- [sendTransaction](LedgerLiveEthereumSigner.md#sendtransaction)
- [setAccount](LedgerLiveEthereumSigner.md#setaccount)
- [signMessage](LedgerLiveEthereumSigner.md#signmessage)
- [signTransaction](LedgerLiveEthereumSigner.md#signtransaction)
- [isSigner](LedgerLiveEthereumSigner.md#issigner)

## Constructors

### constructor

**new LedgerLiveAppEthereumSigner**(`provider`, `windowMessageTransport?`, `walletApiClient?`): [`LedgerLiveAppEthereumSigner`](LedgerLiveAppEthereumSigner.md)
**new LedgerLiveEthereumSigner**(`provider?`): [`LedgerLiveEthereumSigner`](LedgerLiveEthereumSigner.md)

#### Parameters

| Name | Type |
| :------ | :------ |
| `provider` | `Provider` |
| `windowMessageTransport?` | `default` |
| `walletApiClient?` | `WalletAPIClient`\<`CustomModule`, (`client`: `WalletAPIClient`\<`CustomModule`, (client: WalletAPIClient\<CustomModule, ...\>) =\> CustomModule \| Record\<string, CustomModule\>\>) => `CustomModule` \| `Record`\<`string`, `CustomModule`\>\> |
| `provider?` | `Provider` |

#### Returns

[`LedgerLiveAppEthereumSigner`](LedgerLiveAppEthereumSigner.md)
[`LedgerLiveEthereumSigner`](LedgerLiveEthereumSigner.md)

#### Overrides

Signer.constructor

#### Defined in

[src/lib/utils/ledger.ts:24](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L24)
[src/lib/utils/ledger.ts:31](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L31)

## Properties

Expand All @@ -81,7 +87,7 @@ Signer.constructor

#### Defined in

[src/lib/utils/ledger.ts:22](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L22)
[src/lib/utils/ledger.ts:29](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L29)

___

Expand All @@ -105,7 +111,7 @@ ___

#### Defined in

[src/lib/utils/ledger.ts:20](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L20)
[src/lib/utils/ledger.ts:27](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L27)

___

Expand All @@ -115,7 +121,7 @@ ___

#### Defined in

[src/lib/utils/ledger.ts:21](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L21)
[src/lib/utils/ledger.ts:28](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L28)

___

Expand Down Expand Up @@ -143,10 +149,45 @@ node_modules/@ethersproject/contracts/node_modules/@ethersproject/abstract-signe

#### Defined in

[src/lib/utils/ledger.ts:37](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L37)
[src/lib/utils/ledger.ts:61](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L61)

## Methods

### \_catchWalletApiError

**_catchWalletApiError**(`error?`, `defaultErrorMessage?`): `void`

#### Parameters

| Name | Type |
| :------ | :------ |
| `error?` | `any` |
| `defaultErrorMessage?` | `string` |

#### Returns

`void`

#### Defined in

[src/lib/utils/ledger.ts:49](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L49)

___

### \_checkAccount

**_checkAccount**(): `void`

#### Returns

`void`

#### Defined in

[src/lib/utils/ledger.ts:38](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L38)

___

### \_checkProvider

**_checkProvider**(`operation?`): `void`
Expand All @@ -171,6 +212,40 @@ node_modules/@ethersproject/contracts/node_modules/@ethersproject/abstract-signe

___

### \_checkProviderAndAccount

**_checkProviderAndAccount**(): `void`

#### Returns

`void`

#### Defined in

[src/lib/utils/ledger.ts:44](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L44)

___

### \_getWalletApiEthereumTransaction

**_getWalletApiEthereumTransaction**(`transaction`): `EthereumTransaction`

#### Parameters

| Name | Type |
| :------ | :------ |
| `transaction` | `TransactionRequest` |

#### Returns

`EthereumTransaction`

#### Defined in

[src/lib/utils/ledger.ts:98](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L98)

___

### call

**call**(`transaction`, `blockTag?`): `Promise`\<`string`\>
Expand Down Expand Up @@ -240,7 +315,7 @@ Signer.connect

#### Defined in

[src/lib/utils/ledger.ts:162](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L162)
[src/lib/utils/ledger.ts:221](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L221)

___

Expand Down Expand Up @@ -278,7 +353,7 @@ ___

#### Defined in

[src/lib/utils/ledger.ts:55](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L55)
[src/lib/utils/ledger.ts:88](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L88)

___

Expand All @@ -296,7 +371,7 @@ Signer.getAddress

#### Defined in

[src/lib/utils/ledger.ts:62](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L62)
[src/lib/utils/ledger.ts:93](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L93)

___

Expand Down Expand Up @@ -442,7 +517,7 @@ ___

#### Defined in

[src/lib/utils/ledger.ts:45](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L45)
[src/lib/utils/ledger.ts:69](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L69)

___

Expand Down Expand Up @@ -490,7 +565,7 @@ Signer.sendTransaction

#### Defined in

[src/lib/utils/ledger.ts:117](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L117)
[src/lib/utils/ledger.ts:185](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L185)

___

Expand All @@ -510,7 +585,7 @@ ___

#### Defined in

[src/lib/utils/ledger.ts:41](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L41)
[src/lib/utils/ledger.ts:65](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L65)

___

Expand All @@ -534,7 +609,7 @@ Signer.signMessage

#### Defined in

[src/lib/utils/ledger.ts:69](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L69)
[src/lib/utils/ledger.ts:138](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L138)

___

Expand All @@ -558,7 +633,7 @@ Signer.signTransaction

#### Defined in

[src/lib/utils/ledger.ts:82](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L82)
[src/lib/utils/ledger.ts:159](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L159)

___

Expand Down

0 comments on commit b30a8f0

Please sign in to comment.