Skip to content

Commit 6e341af

Browse files
committed
docs(rpc): add getislocks
Related to dashpay/dash#6455
1 parent 2091d0e commit 6e341af

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed

docs/core/api/remote-procedure-call-quick-reference.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ These RPCs are all Dash-specific and not found in Bitcoin Core
133133
* [DecodeScript](../api/remote-procedure-calls-raw-transactions.md#decodescript): decodes a hex-encoded P2SH redeem script. **_Updated in Dash Core 21.0.0_**
134134
* [FinalizePSBT](../api/remote-procedure-calls-raw-transactions.md#finalizepsbt): finalizes the inputs of a PSBT. The PSBT produces a network serialized transaction if the transaction is fully signed. _New in Dash Core 18.0.0_
135135
* [FundRawTransaction](../api/remote-procedure-calls-raw-transactions.md#fundrawtransaction): adds inputs to a transaction until it has enough in value to meet its out value. **_Updated in Dash Core 21.0.0_**
136+
* [GetISLocks](../api/remote-procedure-calls-raw-transactions.md#getislocks): returns the raw InstantSend lock data for each provided transaction ID. **New in Dash Core 22.1.0**
136137
* [GetRawTransaction](../api/remote-procedure-calls-raw-transactions.md#getrawtransaction): gets a hex-encoded serialized transaction or a JSON object describing the transaction. By default, Dash Core only stores complete transaction data for UTXOs and your own transactions, so the RPC may fail on historic transactions unless you use the non-default `txindex=1` in your Dash Core startup settings. **_Updated in Dash Core 21.0.0_**
137138
* [GetRawTransactionMulti](../api/remote-procedure-calls-raw-transactions.md#getrawtransactionmulti): gets hex-encoded serialized transactions or a JSON object describing the multiple transactions. _New in Dash Core 20.1.0_
138139
* [GetTxChainlocks](../api/remote-procedure-calls-raw-transactions.md#gettxchainlocks): returns the block height each transaction was mined at and whether it is ChainLocked or not. _Updated in Dash Core 20.1.0_

docs/core/api/remote-procedure-calls-raw-transactions.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -884,6 +884,66 @@ Result:
884884

885885
_See also: none_
886886

887+
## GetISLocks
888+
889+
Returns the raw InstantSend lock data for each provided transaction ID. Returns `"None"` if there is no known InstantSend lock for a transaction.
890+
891+
_Parameter #1—list of transaction IDs_
892+
893+
| Name | Type | Presence | Description |
894+
| ---- | ---------- | ---------------------- | ----------- |
895+
| txids | array | Required<br>(exactly 1) | An array of up to 100 transaction IDs (strings). Each element must be a valid transaction hash in hexadecimal form. |
896+
897+
_Result—execution result_
898+
899+
The RPC returns an array of the same size as the input array. Each element in the result array is either a JSON object with the following fields or the string `"None"` if no InstantSend lock is known for the corresponding transaction ID.
900+
901+
| Name | Type | Presence | Description |
902+
| ------------------- | --------------- | ----------------------- | ----------- |
903+
| Result | array | Required<br>(exactly 1) | An array of JSON objects with results for each requested TXID |
904+
| → <br>TXID data | object | Required | Data for a requested TXID. One object for each requested TXID |
905+
| → → <br>`txid` | string (hex) | Required<br>(exactly 1) | The transaction ID |
906+
| → → <br>`inputs` | array | Required<br>(exactly 1) | An array of JSON objects describing the transaction inputs in the InstantSend lock |
907+
| → → → <br> `txid` | string (hex) | Required<br>(exactly 1) | The transaction ID of the input |
908+
| → → → <br> `vout` | number (int) | Required<br>(exactly 1) | The output index of the referenced transaction |
909+
| → → <br>`cycleHash` | string (hex) | Required<br>(exactly 1) | The cycle hash associated with this InstantSend lock |
910+
| → → <br>`signature` | string (hex) | Required<br>(exactly 1) | The BLS signature associated with this InstantSend lock |
911+
| → → <br>`hex` | string (hex) | Required<br>(exactly 1) | The serialized, hex-encoded InstantSend lock data for the transaction |
912+
913+
_Example from Dash Core 22.1.0_
914+
915+
Query InstantSend lock information for two transaction IDs:
916+
917+
```bash
918+
dash-cli getislocks '["58cf87162f74e2ae72721184643bc320155ca8ad5068ea005d47cb0c516a0730", "b251095eef8efd3b6840f13b4d8ff714ddff3db5775dc799610989586dc47cca"]'
919+
```
920+
921+
Result:
922+
923+
```json
924+
[
925+
{
926+
"txid": "58cf87162f74e2ae72721184643bc320155ca8ad5068ea005d47cb0c516a0730",
927+
"inputs": [
928+
{
929+
"txid": "29a4f10cf3a9d169eb84579800db8625032cd27f5479ac2b5057de9242411de2",
930+
"vout": 10
931+
},
932+
{
933+
"txid": "c1a525857a91649e8f97ae4a4ad103c6992349b7616d2ab1f9e46278de17d29c",
934+
"vout": 0
935+
}
936+
],
937+
"cycleHash": "000000963cc2a39af8b4ab3f5f8651c5f704d3e5f258758a33f8e86edd6c01f0",
938+
"signature": "a20e74296fcd3fb73f938680bdbfa8fa313b8d8bdf3f76657d7efac568e847f5f73093fe41f4a086a99cebb54b4a077a101b680e4f73055fe3bde78ce620545444a4e5ef22a51bfd29cc456b52d08d04c9e0d60ded435713dcd2df0edfe62f6b",
939+
"hex": "0102e21d414292de57502bac79547fd22c032586db00985784eb69d1a9f30cf1a4290a0000009cd217de7862e4f9b12a6d61b7492399c603d14a4aae978f9e64917a8525a5c10000000030076a510ccb475d00ea6850ada85c1520c33b6484117272aee2742f1687cf58f0016cdd6ee8f8338a7558f2e5d304f7c551865f3fabb4f89aa3c23c96000000a20e74296fcd3fb73f938680bdbfa8fa313b8d8bdf3f76657d7efac568e847f5f73093fe41f4a086a99cebb54b4a077a101b680e4f73055fe3bde78ce620545444a4e5ef22a51bfd29cc456b52d08d04c9e0d60ded435713dcd2df0edfe62f6b"
940+
},
941+
"None"
942+
]
943+
```
944+
945+
_See also: none_
946+
887947
```{eval-rst}
888948
.. _api-rpc-raw-transactions-getrawtransaction:
889949
```

0 commit comments

Comments
 (0)