-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
378a0bc
commit 3841d23
Showing
25 changed files
with
2,701 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title: "Dogecoin" | ||
slug: "rpc-degecoin" | ||
excerpt: "" | ||
hidden: false | ||
createdAt: "Wed Mar 06 2024 10:39:28 GMT+0000 (Coordinated Universal Time)" | ||
updatedAt: "Sat Apr 06 2024 12:59:42 GMT+0000 (Coordinated Universal Time)" | ||
--- |
109 changes: 109 additions & 0 deletions
109
v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-createrawtransaction.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
--- | ||
title: "createrawtransaction" | ||
slug: "rpc-dogecoin-createrawtransaction" | ||
excerpt: "Dogecoin RPC" | ||
hidden: false | ||
metadata: | ||
description: "Dogecoin RPC" | ||
image: [] | ||
keywords: "dogecoin, rpc" | ||
robots: "index" | ||
createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" | ||
updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" | ||
--- | ||
|
||
|
||
|
||
### How to use it | ||
|
||
{% tabs %} | ||
{% tab title="TypeScript/JavaScript" %} | ||
{% code overflow="wrap" lineNumbers="true" %} | ||
|
||
```typescript | ||
// yarn add @tatumio/tatum | ||
|
||
import { TatumSDK, Dogecoin, Network } from '@tatumio/tatum' | ||
|
||
const tatum = await TatumSDK.init<Dogecoin>({network: Network.DOGECOIN}) | ||
|
||
const result = await tatum.rpc.createRawTransaction([ | ||
{ | ||
"txid": "abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234", | ||
"vout": 0 | ||
} | ||
], | ||
{ | ||
"1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa": 0.01 | ||
}) | ||
|
||
await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs | ||
``` | ||
|
||
{% endcode %} | ||
{% endtab %} | ||
{% endtabs %} | ||
|
||
### Overview | ||
|
||
{% embed url="<https://codepen.io/Jan-Musil-the-lessful/pen/RwqdKPR?editors=1111"> %} | ||
|
||
The `createrawtransaction` RPC method creates an unsigned raw transaction that spends a set of previous transaction outputs to a set of new addresses with specific amounts. The method can be used to create custom transactions, which can then be signed and broadcast to the Dogecoin network. | ||
|
||
### Parameters | ||
|
||
- `inputs`: (array, required) An array of objects, each specifying a previous transaction output to spend. | ||
- `txid`: (string, required) The transaction ID of the previous transaction output to spend. | ||
- `vout`: (numeric, required) The index of the output to spend from the previous transaction. | ||
- `sequence`: (numeric, optional) default=depends on the value of the 'replaceable' and 'locktime' arguments) The sequence number | ||
- `outputs`: (object, required) An object with the key-value pairs representing the receiving address and the amount to be sent (in BTC). | ||
- `locktime`: (numeric, optional, default=0) The lock time for the transaction. It can be used to specify the earliest time or block height at which the transaction can be included in a block. | ||
- `replaceable`: (boolean, optional, default=false) **Marks this transaction as BIP125-replaceable.** Allows this transaction to be replaced by a transaction with higher fees. If provided, it is an error if explicit sequence numbers are incompatible. | ||
|
||
### Return Object | ||
|
||
- (string) A hex-encoded raw transaction. | ||
|
||
### JSON Examples | ||
|
||
Request example: | ||
|
||
{% code overflow="wrap" lineNumbers="true" %} | ||
|
||
```json | ||
{ | ||
"jsonrpc": "2.0", | ||
"id": 1, | ||
"method": "createrawtransaction", | ||
"params": [ | ||
[ | ||
{ | ||
"txid": "abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234", | ||
"vout": 0 | ||
} | ||
], | ||
{ | ||
"1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa": 0.01 | ||
} | ||
] | ||
} | ||
``` | ||
|
||
{% endcode %} | ||
|
||
Response example: | ||
|
||
{% code overflow="wrap" lineNumbers="true" %} | ||
|
||
```json | ||
{ | ||
"result": "02000000013412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab0000000000fdffffff0140420f00000000001976a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac00000000", | ||
"error": null, | ||
"id": 1 | ||
} | ||
|
||
``` | ||
|
||
{% endcode %} | ||
|
||
\\ |
140 changes: 140 additions & 0 deletions
140
v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-decoderawtransaction.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,140 @@ | ||
--- | ||
title: "decoderawtransaction" | ||
slug: "rpc-dogecoin-decoderawtransaction" | ||
excerpt: "Dogecoin RPC" | ||
hidden: false | ||
metadata: | ||
description: "Dogecoin RPC" | ||
image: [] | ||
keywords: "dogecoin, rpc" | ||
robots: "index" | ||
createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" | ||
updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" | ||
--- | ||
|
||
|
||
|
||
### How to use it | ||
|
||
{% tabs %} | ||
{% tab title="TypeScript/JavaScript" %} | ||
{% code overflow="wrap" lineNumbers="true" %} | ||
|
||
```typescript | ||
// yarn add @tatumio/tatum | ||
|
||
import { TatumSDK, Dogecoin, Network } from '@tatumio/tatum' | ||
|
||
const tatum = await TatumSDK.init<Dogecoin>({network: Network.DOGECOIN}) | ||
|
||
const result = await tatum.rpc.decodeRawTransaction("02000000013412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab0000000000fdffffff0140420f00000000001976a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac00000000") | ||
|
||
await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs | ||
``` | ||
|
||
{% endcode %} | ||
{% endtab %} | ||
{% endtabs %} | ||
|
||
### Overview | ||
|
||
The `decoderawtransaction` RPC method decodes a serialized (hex-encoded) raw transaction and displays its information in a human-readable format. This method is useful for inspecting raw transactions before broadcasting them to the Dogecoin network or for debugging purposes. | ||
|
||
{% embed url="<https://codepen.io/Martin-Zemanek/pen/YzRgZYv"> %} | ||
|
||
### Parameters | ||
|
||
- `hex_string`: (string, required) The serialized raw transaction in hex format. | ||
|
||
### Return Object | ||
|
||
An object containing the decoded raw transaction information: | ||
|
||
- `txid`: (string) The transaction ID. | ||
- `hash`: (string) The transaction hash. | ||
- `version`: (numeric) The transaction version. | ||
- `size`: (numeric) The transaction size in bytes. | ||
- `vsize`: (numeric) The virtual transaction size in bytes. | ||
- `weight`: (numeric) The transaction weight. | ||
- `locktime`: (numeric) The lock time for the transaction. | ||
- `vin`: (array) An array of objects, each representing an input of the transaction. | ||
- `txid`: (string) The transaction ID of the previous transaction output to spend. | ||
- `vout`: (numeric) The index of the output to spend from the previous transaction. | ||
- `scriptSig`: (object) The script used to redeem the previous transaction output. | ||
- `asm`: (string) The assembly representation of the script. | ||
- `hex`: (string) The hex-encoded script. | ||
- `sequence`: (numeric) The sequence number. | ||
- `vout`: (array) An array of objects, each representing an output of the transaction. | ||
- `value`: (numeric) The amount sent to the output. | ||
- `n`: (numeric) The index of the output. | ||
- `scriptPubKey`: (object) The script used to lock the output. | ||
- `asm`: (string) The assembly representation of the script. | ||
- `hex`: (string) The hex-encoded script. | ||
- `reqSigs`: (numeric) The required number of signatures. | ||
- `type`: (string) The type of the script (e.g., 'pubkeyhash'). | ||
- `addresses`: (array) An array of Dogecoin addresses associated with the output. | ||
|
||
### JSON Examples | ||
|
||
Request example: | ||
|
||
{% code overflow="wrap" lineNumbers="true" %} | ||
|
||
```json | ||
{ | ||
"jsonrpc": "2.0", | ||
"method": "decoderawtransaction", | ||
"params": ["02000000013412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab0000000000fdffffff0140420f00000000001976a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac00000000"], | ||
"id": 1 | ||
} | ||
``` | ||
|
||
{% endcode %} | ||
|
||
Response example: | ||
|
||
{% code overflow="wrap" lineNumbers="true" %} | ||
|
||
```json | ||
{ | ||
"result": { | ||
"txid": "9f5f5e6d36b6a284f52626be505175e43900009e7aa1b88fce74fcd30f0dc258", | ||
"hash": "9f5f5e6d36b6a284f52626be505175e43900009e7aa1b88fce74fcd30f0dc258", | ||
"version": 2, | ||
"size": 85, | ||
"vsize": 85, | ||
"weight": 340, | ||
"locktime": 0, | ||
"vin": [ | ||
{ | ||
"txid": "abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234", | ||
"vout": 0, | ||
"scriptSig": { | ||
"asm": "", | ||
"hex": "" | ||
}, | ||
"sequence": 4294967293 | ||
} | ||
], | ||
"vout": [ | ||
{ | ||
"value": 0.01, | ||
"n": 0, | ||
"scriptPubKey": { | ||
"asm": "OP_DUP OP_HASH160 62e907b15cbf27d5425399ebf6f0fb50ebb88f18 OP_EQUALVERIFY OP_CHECKSIG", | ||
"desc": "addr(1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa)#632p52jr", | ||
"hex": "76a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac", | ||
"address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa", | ||
"type": "pubkeyhash" | ||
} | ||
} | ||
] | ||
}, | ||
"error": null, | ||
"id": 1 | ||
} | ||
``` | ||
|
||
{% endcode %} | ||
|
||
\\ |
95 changes: 95 additions & 0 deletions
95
v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-decodescript.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
--- | ||
title: "decodescript" | ||
slug: "rpc-dogecoin-decodescript" | ||
excerpt: "Dogecoin RPC" | ||
hidden: false | ||
metadata: | ||
description: "Dogecoin RPC" | ||
image: [] | ||
keywords: "dogecoin, rpc" | ||
robots: "index" | ||
createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" | ||
updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" | ||
--- | ||
|
||
|
||
|
||
### How to use it | ||
|
||
{% tabs %} | ||
{% tab title="TypeScript/JavaScript" %} | ||
{% code overflow="wrap" lineNumbers="true" %} | ||
|
||
```typescript | ||
// yarn add @tatumio/tatum | ||
|
||
import { TatumSDK, Dogecoin, Network } from '@tatumio/tatum' | ||
|
||
const tatum = await TatumSDK.init<Dogecoin>({network: Network.DOGECOIN}) | ||
|
||
const result = await tatum.rpc.decodeScript("3044022070cc08500b2203b6ebe7c8285295bc1914a9d252504416e1cde4de4a7dc6c3c8022079af2be6db34efcf147e86a4cbf61cf9995106e5b5e95270d47c40b082052c8501") | ||
|
||
await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs | ||
``` | ||
|
||
{% endcode %} | ||
{% endtab %} | ||
{% endtabs %} | ||
|
||
### Overview | ||
|
||
The `decodescript` RPC method decodes a serialized (hex-encoded) script and provides information about the script in a human-readable format. This method is useful for inspecting scripts for debugging purposes or for understanding their structure. | ||
|
||
{% embed url="<https://codepen.io/Martin-Zemanek/pen/dyQrvdm"> %} | ||
|
||
### Parameters | ||
|
||
- `hex_string`: (string, required) The serialized script in hex format. | ||
|
||
### Return Object | ||
|
||
An object containing the decoded script information: | ||
|
||
- `asm`: (string) The assembly representation of the script. | ||
- `hex`: (string) The hex-encoded script. | ||
- `type`: (string) The type of the script (e.g., 'pubkeyhash', 'multisig'). | ||
- `reqSigs`: (numeric, optional) The required number of signatures if the script is a multisig script. | ||
- `addresses`: (array, optional) An array of Litecoin addresses associated with the script if applicable. | ||
- `p2sh`: (string, optional) The P2SH address for this script if applicable. | ||
|
||
### JSON Examples | ||
|
||
Request example: | ||
|
||
{% code overflow="wrap" lineNumbers="true" %} | ||
|
||
```json | ||
{ | ||
"jsonrpc": "2.0", | ||
"method": "decodescript", | ||
"params": ["3044022070cc08500b2203b6ebe7c8285295bc1914a9d252504416e1cde4de4a7dc6c3c8022079af2be6db34efcf147e86a4cbf61cf9995106e5b5e95270d47c40b082052c8501"], | ||
"id": 1 | ||
} | ||
``` | ||
|
||
{% endcode %} | ||
|
||
Response example: | ||
|
||
{% code overflow="wrap" lineNumbers="true" %} | ||
|
||
```json | ||
{ | ||
"result": { | ||
"asm": "44022070cc08500b2203b6ebe7c8285295bc1914a9d252504416e1cde4de4a7dc6c3c8022079af2be6db34efcf147e86 OP_MAX OP_UNKNOWN OP_UNKNOWN [error]", | ||
"desc": "raw(3044022070cc08500b2203b6ebe7c8285295bc1914a9d252504416e1cde4de4a7dc6c3c8022079af2be6db34efcf147e86a4cbf61cf9995106e5b5e95270d47c40b082052c8501)#3x5hf724", | ||
"type": "nonstandard" | ||
}, | ||
"error": null, | ||
"id": 1 | ||
} | ||
``` | ||
|
||
{% endcode %} | ||
|
||
\\ |
Oops, something went wrong.