From c55a7aa6f53cdb1707bf6951c267e9d5fda55df9 Mon Sep 17 00:00:00 2001 From: Tomasz Slabon Date: Mon, 6 Nov 2023 12:29:55 +0100 Subject: [PATCH] Regenerated docs --- typescript/api-reference/README.md | 2 +- .../api-reference/classes/ElectrumClient.md | 35 +++++++++++++++-- .../classes/RedemptionsService.md | 9 +---- .../api-reference/interfaces/BitcoinClient.md | 39 +++++++++++++++++-- 4 files changed, 69 insertions(+), 16 deletions(-) diff --git a/typescript/api-reference/README.md b/typescript/api-reference/README.md index 3184171aa..b5e639aa6 100644 --- a/typescript/api-reference/README.md +++ b/typescript/api-reference/README.md @@ -685,7 +685,7 @@ Electrum script hash as a hex string. #### Defined in -[lib/electrum/client.ts:591](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/electrum/client.ts#L591) +[lib/electrum/client.ts:649](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/electrum/client.ts#L649) ___ diff --git a/typescript/api-reference/classes/ElectrumClient.md b/typescript/api-reference/classes/ElectrumClient.md index f617ed98e..bef3ba335 100644 --- a/typescript/api-reference/classes/ElectrumClient.md +++ b/typescript/api-reference/classes/ElectrumClient.md @@ -31,6 +31,7 @@ Electrum-based implementation of the Bitcoin client. - [getTransactionConfirmations](ElectrumClient.md#gettransactionconfirmations) - [getTransactionHistory](ElectrumClient.md#gettransactionhistory) - [getTransactionMerkle](ElectrumClient.md#gettransactionmerkle) +- [getTxHashesForPublicKeyHash](ElectrumClient.md#gettxhashesforpublickeyhash) - [latestBlockHeight](ElectrumClient.md#latestblockheight) - [withBackoffRetrier](ElectrumClient.md#withbackoffretrier) - [withElectrum](ElectrumClient.md#withelectrum) @@ -136,7 +137,7 @@ ___ #### Defined in -[lib/electrum/client.ts:574](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/electrum/client.ts#L574) +[lib/electrum/client.ts:632](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/electrum/client.ts#L632) ___ @@ -189,7 +190,7 @@ ___ #### Defined in -[lib/electrum/client.ts:524](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/electrum/client.ts#L524) +[lib/electrum/client.ts:582](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/electrum/client.ts#L582) ___ @@ -341,7 +342,33 @@ ___ #### Defined in -[lib/electrum/client.ts:543](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/electrum/client.ts#L543) +[lib/electrum/client.ts:601](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/electrum/client.ts#L601) + +___ + +### getTxHashesForPublicKeyHash + +▸ **getTxHashesForPublicKeyHash**(`publicKeyHash`): `Promise`\<[`BitcoinTxHash`](BitcoinTxHash.md)[]\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `publicKeyHash` | [`Hex`](Hex.md) | + +#### Returns + +`Promise`\<[`BitcoinTxHash`](BitcoinTxHash.md)[]\> + +**`See`** + +#### Implementation of + +[BitcoinClient](../interfaces/BitcoinClient.md).[getTxHashesForPublicKeyHash](../interfaces/BitcoinClient.md#gettxhashesforpublickeyhash) + +#### Defined in + +[lib/electrum/client.ts:508](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/electrum/client.ts#L508) ___ @@ -361,7 +388,7 @@ ___ #### Defined in -[lib/electrum/client.ts:508](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/electrum/client.ts#L508) +[lib/electrum/client.ts:566](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/electrum/client.ts#L566) ___ diff --git a/typescript/api-reference/classes/RedemptionsService.md b/typescript/api-reference/classes/RedemptionsService.md index f92529d8a..5a65618a0 100644 --- a/typescript/api-reference/classes/RedemptionsService.md +++ b/typescript/api-reference/classes/RedemptionsService.md @@ -75,11 +75,6 @@ Determines the plain-text wallet main UTXO currently registered in the Bridge on-chain contract. The returned main UTXO can be undefined if the wallet does not have a main UTXO registered in the Bridge at the moment. -WARNING: THIS FUNCTION CANNOT DETERMINE THE MAIN UTXO IF IT COMES FROM A -BITCOIN TRANSACTION THAT IS NOT ONE OF THE LATEST FIVE TRANSACTIONS -TARGETING THE GIVEN WALLET PUBLIC KEY HASH. HOWEVER, SUCH A CASE IS -VERY UNLIKELY. - #### Parameters | Name | Type | Description | @@ -95,7 +90,7 @@ Promise holding the wallet main UTXO or undefined value. #### Defined in -[services/redemptions/redemptions-service.ts:221](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/redemptions/redemptions-service.ts#L221) +[services/redemptions/redemptions-service.ts:215](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/redemptions/redemptions-service.ts#L215) ___ @@ -152,7 +147,7 @@ Throws an error if no redemption request exists for the given #### Defined in -[services/redemptions/redemptions-service.ts:337](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/redemptions/redemptions-service.ts#L337) +[services/redemptions/redemptions-service.ts:327](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/redemptions/redemptions-service.ts#L327) ___ diff --git a/typescript/api-reference/interfaces/BitcoinClient.md b/typescript/api-reference/interfaces/BitcoinClient.md index 67e3358f1..3afac0bdd 100644 --- a/typescript/api-reference/interfaces/BitcoinClient.md +++ b/typescript/api-reference/interfaces/BitcoinClient.md @@ -19,6 +19,7 @@ Represents a Bitcoin client. - [getTransactionConfirmations](BitcoinClient.md#gettransactionconfirmations) - [getTransactionHistory](BitcoinClient.md#gettransactionhistory) - [getTransactionMerkle](BitcoinClient.md#gettransactionmerkle) +- [getTxHashesForPublicKeyHash](BitcoinClient.md#gettxhashesforpublickeyhash) - [latestBlockHeight](BitcoinClient.md#latestblockheight) ## Methods @@ -41,7 +42,7 @@ Broadcasts the given transaction over the network. #### Defined in -[lib/bitcoin/client.ts:87](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/client.ts#L87) +[lib/bitcoin/client.ts:101](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/client.ts#L101) ___ @@ -90,7 +91,7 @@ Concatenation of block headers in a hexadecimal format. #### Defined in -[lib/bitcoin/client.ts:70](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/client.ts#L70) +[lib/bitcoin/client.ts:84](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/client.ts#L84) ___ @@ -232,7 +233,37 @@ Merkle branch. #### Defined in -[lib/bitcoin/client.ts:78](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/client.ts#L78) +[lib/bitcoin/client.ts:92](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/client.ts#L92) + +___ + +### getTxHashesForPublicKeyHash + +▸ **getTxHashesForPublicKeyHash**(`publicKeyHash`): `Promise`\<[`BitcoinTxHash`](../classes/BitcoinTxHash.md)[]\> + +Gets hashes of confirmed transactions that pay the given public key hash +using either a P2PKH or P2WPKH script. The returned transactions hashes are +ordered by block height in the ascending order, i.e. the latest transaction +hash is at the end of the list. The returned list does not contain +unconfirmed transactions hashes living in the mempool at the moment of +request. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `publicKeyHash` | [`Hex`](../classes/Hex.md) | Hash of the public key for which to find corresponding transaction hashes. | + +#### Returns + +`Promise`\<[`BitcoinTxHash`](../classes/BitcoinTxHash.md)[]\> + +Array of confirmed transaction hashes related to the provided + public key hash. + +#### Defined in + +[lib/bitcoin/client.ts:69](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/client.ts#L69) ___ @@ -250,4 +281,4 @@ Height of the last mined block. #### Defined in -[lib/bitcoin/client.ts:61](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/client.ts#L61) +[lib/bitcoin/client.ts:75](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/client.ts#L75)