Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[R2R] Add draft docs for sign_raw_transaction #161

Merged
merged 25 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
4ef9805
add draft docs for `sign_raw_transaction`
smk762 Oct 27, 2023
07fb278
update sign_raw_tx method
smk762 Nov 28, 2023
38a7b4a
Merge branch 'dev' into v2-signrawtx
smk762 Nov 28, 2023
0a8af0c
fix title and sidebar
smk762 Nov 28, 2023
67f8bc3
Merge branch 'v2-signrawtx' of https://github.com/KomodoPlatform/komo…
smk762 Nov 28, 2023
579496d
update metadata
smk762 Nov 28, 2023
e52c56b
fix example labels
smk762 Nov 28, 2023
e8c088d
add error responses
smk762 Dec 2, 2023
a199c15
lint recent changes
smk762 Dec 2, 2023
b885d07
[Bot] File and author data updated, validated and updated internal li…
smk762 Dec 2, 2023
5882581
Merge pull request #166 from KomodoPlatform/lint-fix-patches/v2-signr…
gcharang Dec 4, 2023
cd6ac7b
Merge branch 'dev' into v2-signrawtx
gcharang Dec 4, 2023
6533bac
Merge branch 'v2-signrawtx' of https://github.com/KomodoPlatform/komo…
gcharang Dec 4, 2023
976c3f4
[Bot] File and author data updated, validated and updated internal li…
gcharang Dec 4, 2023
e8ff43d
Merge pull request #170 from KomodoPlatform/lint-fix-patches/v2-signr…
gcharang Dec 4, 2023
1d3addf
Merge branch 'dev' into v2-signrawtx
smk762 Dec 22, 2023
7061521
linted
smk762 Dec 22, 2023
86d3dbb
[Bot] File and author data updated, validated and updated internal li…
smk762 Dec 22, 2023
906a3ab
Merge pull request #186 from KomodoPlatform/lint-fix-patches/v2-signr…
gcharang Jan 29, 2024
ea71660
Merge branch 'dev' into v2-signrawtx
smk762 Feb 20, 2024
04c2369
Merge branch 'dev' into v2-signrawtx
gcharang Feb 21, 2024
210cb54
[Bot] File and author data updated, validated and updated internal li…
gcharang Feb 21, 2024
82a333c
Merge pull request #194 from KomodoPlatform/lint-fix-patches/v2-signr…
gcharang Feb 21, 2024
dd9e042
resolve conflicts
gcharang Mar 4, 2024
dc73b29
Merge branch 'dev' into v2-signrawtx
gcharang Mar 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions filepathSlugs.json
Original file line number Diff line number Diff line change
Expand Up @@ -1701,6 +1701,11 @@
"taker-payment-refund-finished",
"finished"
],
"src/pages/atomicdex/api/common_structures/wallet/index.mdx": [
"wallet-operations-structures",
"raw-tx-info",
"input-txns"
],
"src/pages/atomicdex/api/index.mdx": [
"atomic-dex-rpc-methods"
],
Expand Down Expand Up @@ -2464,6 +2469,19 @@
"command",
"response-success"
],
"src/pages/atomicdex/api/v20/sign_raw_transaction/index.mdx": [
"sign-raw-transaction",
"request-parameters",
"response-parameters",
"sign-utxo-raw-transaction-hex",
"response-success",
"sign-utxo-raw-transaction-hex-with-inputs",
"response-success-2",
"signed-an-eth-evm-raw-transaction",
"response-success-3",
"errors",
"signing-error"
],
"src/pages/atomicdex/api/v20/start_simple_market_maker_bot/index.mdx": [
"start-simple-market-maker-bot",
"arguments",
Expand Down
4 changes: 4 additions & 0 deletions src/data/sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,10 @@
"title": "get_raw_transaction",
"href": "/atomicdex/api/v20/get_raw_transaction/"
},
{
"title": "sign_raw_transaction",
"href": "/atomicdex/api/v20/sign_raw_transaction/"
},
{
"title": "my_tx_history",
"href": "/atomicdex/api/v20/my_tx_history/"
Expand Down
36 changes: 18 additions & 18 deletions src/pages/atomicdex/api/common_structures/lightning/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -130,27 +130,27 @@ It is used for estimating the transaction fee rate (`feerate`) for different tra

### LightningPayment

| Parameter | Type | Description |
| ---------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| type | string | The payment type. Accepted values are `invoice` or [`keysend`](https://cdecker-lightning.readthedocs.io/lightning-keysend.7.html). |
| invoice | string | Only used if `type` is `invoice`. An identifying string which represents the invoice. |
| destination | string | Only used if `type` is `keysend`. A `node_pubkey` (which is also the node address in lightning context). Not to be confused with an onchain address. |
| amount\_in\_msat | string | Only used if `type` is `keysend`. Amount to be paid, in [millisatoshis](https://bitcoindata.science/bitcoin-units-converter.html) (A thousandth of a satoshi; the same as 0.00000000001 bitcoin). |
| expiry | string | Only used if `type` is `keysend`. Optional, defaults to `3600`. Seconds until the payment expires. |
| Parameter | Type | Description |
| ---------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| type | string | The payment type. Accepted values are `invoice` or [`keysend`](https://cdecker-lightning.readthedocs.io/lightning-keysend.7.html). |
| invoice | string | Only used if `type` is `invoice`. An identifying string which represents the invoice. |
| destination | string | Only used if `type` is `keysend`. A `node_pubkey` (which is also the node address in lightning context). Not to be confused with an onchain address. |
| amount\_in\_msat | string | Only used if `type` is `keysend`. Amount to be paid, in [millisatoshis](https://bitcoindata.science/bitcoin-units-converter) (A thousandth of a satoshi; the same as 0.00000000001 bitcoin). |
| expiry | string | Only used if `type` is `keysend`. Optional, defaults to `3600`. Seconds until the payment expires. |

### LightningPaymentFilter

| Parameter | Type | Description |
| --------------------- | ------- | ------------------------------------------------------------------------------------------------------------------- |
| payment\_type | object | A standard `LightningPaymentType` object. |
| description | string | Optional. A note to indicate the purpose of the invoice. |
| status | string | Optional. Accepted values: `pending`, `succeeded`, `failed`. |
| from\_amount\_msat | integer | Optional. Minimum amount sent in [millisatoshis](https://bitcoindata.science/bitcoin-units-converter.html) |
| to\_amount\_msat | integer | Optional. Maximum amount sent in [millisatoshis](https://bitcoindata.science/bitcoin-units-converter.html) |
| from\_fee\_paid\_msat | integer | Optional. Minimum transaction fee paid in [millisatoshis](https://bitcoindata.science/bitcoin-units-converter.html) |
| to\_fee\_paid\_msat | integer | Optional. Maximum transaction fee paid in [millisatoshis](https://bitcoindata.science/bitcoin-units-converter.html) |
| from\_timestamp | string | Optional. Minimum timestamp (in milliseconds) of payment results to return. |
| to\_timestamp | string | Optional. Maximum timestamp (in milliseconds) of payment results to return. |
| Parameter | Type | Description |
| --------------------- | ------- | -------------------------------------------------------------------------------------------------------------- |
| payment\_type | object | A standard `LightningPaymentType` object. |
| description | string | Optional. A note to indicate the purpose of the invoice. |
| status | string | Optional. Accepted values: `pending`, `succeeded`, `failed`. |
| from\_amount\_msat | integer | Optional. Minimum amount sent in [millisatoshis](https://bitcoindata.science/bitcoin-units-converter) |
| to\_amount\_msat | integer | Optional. Maximum amount sent in [millisatoshis](https://bitcoindata.science/bitcoin-units-converter) |
| from\_fee\_paid\_msat | integer | Optional. Minimum transaction fee paid in [millisatoshis](https://bitcoindata.science/bitcoin-units-converter) |
| to\_fee\_paid\_msat | integer | Optional. Maximum transaction fee paid in [millisatoshis](https://bitcoindata.science/bitcoin-units-converter) |
| from\_timestamp | string | Optional. Minimum timestamp (in milliseconds) of payment results to return. |
| to\_timestamp | string | Optional. Maximum timestamp (in milliseconds) of payment results to return. |

### LightningPaymentType

Expand Down
31 changes: 15 additions & 16 deletions src/pages/atomicdex/api/common_structures/wallet/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ export const description = "Starting with version beta-2.1.3434, the Komodo DeFi

The `RawTxInfo` object includes the following items:

| Parameter | Type | Description |
| ----------- | ------- | ------------------------------------------------------------------------------------------------------------- |
| tx_hex | string | UTXO only. The raw unsigned hex of a proposed transaction. |
| prev_txns | list | UTXO only. A list of standard [InputTxns objects](/atomicdex/api/common_structures/wallet/#input-txns). |
| to | string | ETH/EVM only. A destination address to send the funds to. |
| value | string | ETH/EVM only. The amount of funds to be sent as a string with a `0x` prefix, in [wei](https://ethereum.stackexchange.com/questions/253/the-ether-denominations-are-called-finney-szabo-and-wei-what-who-are-these-na) units. |
| gas_limit | string | ETH/EVM only. The maximum gas to be used for sending the transaction, in [gwei](https://eth-converter.com/) units. |
| Parameter | Type | Description |
| ---------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| tx\_hex | string | UTXO only. The raw unsigned hex of a proposed transaction. |
| prev\_txns | list | UTXO only. A list of standard [InputTxns objects](/atomicdex/api/common_structures/wallet/#input-txns). |
| to | string | ETH/EVM only. A destination address to send the funds to. |
| value | string | ETH/EVM only. The amount of funds to be sent as a string with a `0x` prefix, in [wei](https://ethereum.stackexchange.com/questions/253/the-ether-denominations-are-called-finney-szabo-and-wei-what-who-are-these-na) units. |
| gas\_limit | string | ETH/EVM only. The maximum gas to be used for sending the transaction, in [gwei](https://eth-converter.com/) units. |

<DevComment>
TODO: Confirm units used in ETH/EVM transactions.
TODO: Confirm units used in ETH/EVM transactions.
</DevComment>

<CollapsibleSection expandedText="Hide UTXO Example" collapsedText="Show UTXO Example">
Expand All @@ -40,18 +40,17 @@ The `RawTxInfo` object includes the following items:
```
</CollapsibleSection>


### InputTxns

The `InputTxns` object includes the following items:

| Parameter | Type | Description |
| --------------- | ------- | ----------------------------------------------------------------------------------------------------- |
| tx_hash | string | The transaction id of an unspent transaction from the same wallet output. |
| index | integer | The [output index(https://bitcoin.stackexchange.com/questions/100765/what-does-the-index-of-an-utxo-stand-for)] of this unspent transaction output. |
| script_pub_key | string | The [scriptpubkey](https://learnmeabitcoin.com/technical/scriptPubKey) of this unspent transaction output. |
| amount | float | The value of this unspent transaction output. |
amount
| Parameter | Type | Description |
| ---------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| tx\_hash | string | The transaction id of an unspent transaction from the same wallet output. |
| index | integer | The \[output index([https://bitcoin.stackexchange.com/questions/100765/what-does-the-index-of-an-utxo-stand-for](https://bitcoin.stackexchange.com/questions/100765/what-does-the-index-of-an-utxo-stand-for))] of this unspent transaction output. |
| script\_pub\_key | string | The [scriptpubkey](https://learnmeabitcoin.com/technical/scriptPubKey) of this unspent transaction output. |
| amount | float | The value of this unspent transaction output. |
| amount | | |

<CollapsibleSection expandedText="Hide Example" collapsedText="Show Example">
```json
Expand Down
12 changes: 6 additions & 6 deletions src/pages/atomicdex/api/v20-dev/lightning/payments/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ The `lightning::payments::generate_invoice` method generates an invoice to be pa

### Request Parameters

| Parameter | Type | Description |
| ---------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| coin | string | Ticker of coin to generate invoice for. |
| description | string | A note to indicate the purpose of the invoice. |
| amount\_in\_msat | integer | Amount to be paid, in [millisatoshis](https://bitcoindata.science/bitcoin-units-converter.html) (A thousandth of a satoshi; the same as 0.00000000001 bitcoin.) |
| expiry | integer | Optional, defaults to `3600`. Seconds until the invoice expires. |
| Parameter | Type | Description |
| ---------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| coin | string | Ticker of coin to generate invoice for. |
| description | string | A note to indicate the purpose of the invoice. |
| amount\_in\_msat | integer | Amount to be paid, in [millisatoshis](https://bitcoindata.science/bitcoin-units-converter) (A thousandth of a satoshi; the same as 0.00000000001 bitcoin.) |
| expiry | integer | Optional, defaults to `3600`. Seconds until the invoice expires. |

#### 📌 Example

Expand Down
Loading