Skip to content

Commit

Permalink
Adding Litecoin
Browse files Browse the repository at this point in the history
  • Loading branch information
productshiv committed Apr 6, 2024
1 parent a1ef09a commit cac5a59
Show file tree
Hide file tree
Showing 27 changed files with 348 additions and 212 deletions.
17 changes: 0 additions & 17 deletions v1.0/RPC Nodes/rpc-utxo/rpc-dogecoin/README.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Dogecoin"
slug: "rpc-degecoin"
title: "Litecoin"
slug: "rpc-litecoin"
excerpt: ""
category: 65c5e93c623cad004b45d505
hidden: false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
title: "createrawtransaction"
slug: "rpc-dogecoin-createrawtransaction"
excerpt: "Dogecoin RPC"
slug: "rpc-litecoin-createrawtransaction"
excerpt: "Litecoin RPC"
category: 65c5e93c623cad004b45d505
hidden: false
metadata:
description: "Dogecoin RPC"
description: "Litecoin RPC"
image: []
keywords: "dogecoin, rpc"
keywords: "litecoin, rpc"
robots: "index"
createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)"
updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)"
Expand All @@ -22,9 +22,9 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)"
```typescript
// yarn add @tatumio/tatum

import { TatumSDK, Dogecoin, Network } from '@tatumio/tatum'
import { TatumSDK, Litecoin, Network } from '@tatumio/tatum'

const tatum = await TatumSDK.init<Dogecoin>({network: Network.DOGECOIN})
const tatum = await TatumSDK.init<Litecoin>({network: Network.LITECOIN})

const result = await tatum.rpc.createRawTransaction([
{
Expand All @@ -35,7 +35,7 @@ const result = await tatum.rpc.createRawTransaction([
{
"1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa": 0.01
})

await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs
```
{% endcode %}
Expand All @@ -44,9 +44,9 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs

### 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 Litecoin network.

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.
{% embed url="https://codepen.io/tatum-devrel/pen/jOQJWpb" %}

### Parameters

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
title: "decoderawtransaction"
slug: "rpc-dogecoin-decoderawtransaction"
excerpt: "Dogecoin RPC"
slug: "rpc-litecoin-decoderawtransaction"
excerpt: "Litecoin RPC"
category: 65c5e93c623cad004b45d505
hidden: false
metadata:
description: "Dogecoin RPC"
description: "Litecoin RPC"
image: []
keywords: "dogecoin, rpc"
keywords: "litecoin, rpc"
robots: "index"
createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)"
updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)"
Expand All @@ -22,9 +22,9 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)"
```typescript
// yarn add @tatumio/tatum

import { TatumSDK, Dogecoin, Network } from '@tatumio/tatum'
import { TatumSDK, Litecoin, Network } from '@tatumio/tatum'

const tatum = await TatumSDK.init<Dogecoin>({network: Network.DOGECOIN})
const tatum = await TatumSDK.init<Litecoin>({network: Network.LITECOIN})

const result = await tatum.rpc.decodeRawTransaction("02000000013412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab0000000000fdffffff0140420f00000000001976a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac00000000")

Expand All @@ -36,9 +36,9 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs

### 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.
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 Litecoin network or for debugging purposes.

{% embed url="https://codepen.io/Martin-Zemanek/pen/YzRgZYv" %}
{% embed url="https://codepen.io/tatum-devrel/pen/ExOMPev" %}

### Parameters

Expand Down Expand Up @@ -70,7 +70,7 @@ An object containing the decoded raw transaction information:
* `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.
* `addresses`: (array) An array of Litecoin addresses associated with the output.

### JSON Examples

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
title: "decodescript"
slug: "rpc-dogecoin-decodescript"
excerpt: "Dogecoin RPC"
slug: "rpc-litecoin-decodescript"
excerpt: "Litecoin RPC"
category: 65c5e93c623cad004b45d505
hidden: false
metadata:
description: "Dogecoin RPC"
description: "Litecoin RPC"
image: []
keywords: "dogecoin, rpc"
keywords: "litecoin, rpc"
robots: "index"
createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)"
updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)"
Expand All @@ -22,9 +22,9 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)"
```typescript
// yarn add @tatumio/tatum

import { TatumSDK, Dogecoin, Network } from '@tatumio/tatum'
import { TatumSDK, Litecoin, Network } from '@tatumio/tatum'

const tatum = await TatumSDK.init<Dogecoin>({network: Network.DOGECOIN})
const tatum = await TatumSDK.init<Litecoin>({network: Network.LITECOIN})

const result = await tatum.rpc.decodeScript("3044022070cc08500b2203b6ebe7c8285295bc1914a9d252504416e1cde4de4a7dc6c3c8022079af2be6db34efcf147e86a4cbf61cf9995106e5b5e95270d47c40b082052c8501")

Expand All @@ -38,7 +38,7 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs

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" %}
{% embed url="https://codepen.io/tatum-devrel/pen/BaGbjOg" %}

### Parameters

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
title: "estimatesmartfee"
slug: "rpc-dogecoin-estimatesmartfee"
excerpt: "Dogecoin RPC"
slug: "rpc-litecoin-estimatesmartfee"
excerpt: "Litecoin RPC"
category: 65c5e93c623cad004b45d505
hidden: false
metadata:
description: "Dogecoin RPC"
description: "Litecoin RPC"
image: []
keywords: "dogecoin, rpc"
keywords: "litecoin, rpc"
robots: "index"
createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)"
updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)"
Expand All @@ -22,9 +22,9 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)"
```typescript
// yarn add @tatumio/tatum

import { TatumSDK, Dogecoin, Network } from '@tatumio/tatum'
import { TatumSDK, Litecoin, Network } from '@tatumio/tatum'

const tatum = await TatumSDK.init<Dogecoin>({network: Network.DOGECOIN})
const tatum = await TatumSDK.init<Litecoin>({network: Network.LITECOIN})

const result = await tatum.rpc.estimateSmartFee(20)

Expand All @@ -36,11 +36,11 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs

### Overview

The `estimatesmartfee` method provides an estimated fee rate (in DOGE/kB) for a transaction to be confirmed within a certain number of blocks. The estimation is based on recent transactions in the Dogecoin network.
The `estimatesmartfee` method provides an estimated fee rate (in BTC/kB) for a transaction to be confirmed within a certain number of blocks. The estimation is based on recent transactions in the Litecoin network.

This method can be useful for users or applications trying to decide on an appropriate fee for their transactions, based on the desired confirmation speed.

{% embed url="https://codepen.io/Martin-Zemanek/pen/MWzxpEK" %}
{% embed url="https://codepen.io/tatum-devrel/pen/NWEJxLW" %}

### Parameters

Expand All @@ -53,7 +53,7 @@ The `estimatesmartfee` method accepts the following parameters:

The `estimatesmartfee` method returns an object containing the following fields:

* `feerate`: A decimal number representing the estimated fee rate in DOGE/kB.
* `feerate`: A decimal number representing the estimated fee rate/kB.
* `blocks`: An integer representing the number of blocks within which the transaction is expected to be confirmed.

### JSON Examples
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
title: "getbestblockhash"
slug: "rpc-dogecoin-getbestblockhash"
excerpt: "Dogecoin RPC"
slug: "rpc-litecoin-getbestblockhash"
excerpt: "Litecoin RPC"
category: 65c5e93c623cad004b45d505
hidden: false
metadata:
description: "Dogecoin RPC"
description: "Litecoin RPC"
image: []
keywords: "dogecoin, rpc"
keywords: "litecoin, rpc"
robots: "index"
createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)"
updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)"
Expand All @@ -22,9 +22,9 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)"
```typescript
// yarn add @tatumio/tatum

import { TatumSDK, Dogecoin, Network } from '@tatumio/tatum'
import { TatumSDK, Litecoin, Network } from '@tatumio/tatum'

const tatum = await TatumSDK.init<Dogecoin>({network: DOGECOIN})
const tatum = await TatumSDK.init<Litecoin>({network: Network.LITECOIN})

const result = await tatum.rpc.getBestBlockHash()

Expand All @@ -36,9 +36,9 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs

### Overview

`getbestblockhash` is a Dogecoin RPC method that returns the hash of the best (tip) block in the longest blockchain. This method is useful for obtaining the latest block hash, which can be used to fetch block details or confirmations for transactions.
`getbestblockhash` is a Litecoin RPC method that returns the hash of the best (tip) block in the longest blockchain. This method is useful for obtaining the latest block hash, which can be used to fetch block details or confirmations for transactions.

{% embed url="https://codepen.io/Jan-Musil-the-lessful/pen/zYMbowj" %}
{% embed url="https://codepen.io/tatum-devrel/pen/vYQPLOd" %}

### Parameters

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
title: "getblock"
slug: "rpc-dogecoin-getblock"
excerpt: "Dogecoin RPC"
slug: "rpc-litecoin-getblock"
excerpt: "Litecoin RPC"
category: 65c5e93c623cad004b45d505
hidden: false
metadata:
description: "Dogecoin RPC"
description: "Litecoin RPC"
image: []
keywords: "dogecoin, rpc"
keywords: "litecoin, rpc"
robots: "index"
createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)"
updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)"
Expand All @@ -22,9 +22,9 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)"
```typescript
// yarn add @tatumio/tatum

import { TatumSDK, Dogecoin, Network } from '@tatumio/tatum'
import { TatumSDK, Litecoin, Network } from '@tatumio/tatum'

const tatum = await TatumSDK.init<Dogecoin>({network: Network.DOGECOIN})
const tatum = await TatumSDK.init<Litecoin>({network: Network.LITECOIN})

const result = await tatum.rpc.getBlock('000000000000000000013d0a85b72c591500abe074a7f9175c596a194f67b82d')

Expand All @@ -36,22 +36,26 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs

### Overview

`getblock` is a Dogecoin RPC method that returns information about a specified block. This method is useful for obtaining block details such as the hash, height, transactions, and other metadata. It can be used for various purposes, including validating transactions, monitoring the blockchain, and analyzing the network.
`getblock` is a Litecoin RPC method that returns information about a specified block. This method is useful for obtaining block details such as the hash, height, transactions, and other metadata. It can be used for various purposes, including validating transactions, monitoring the blockchain, and analyzing the network.

{% embed url="https://codepen.io/Martin-Zemanek/pen/QWJopve" %}
{% embed url="https://codepen.io/tatum-devrel/pen/xxQBZZg" %}

### Parameters

* `hashOrHeight` (required): The hash or height of the block to be retrieved.
* `blockhash` (required): The hash of the block to be retrieved.
* Example: `"0000000000000000000ef0e1f703b56f2b0d6724e4eeccf00e4f8d55b9c3c3f6e"`
* `verbose` - (boolean, optional, default=true) true for a json object, false for the hex encoded data
* `verbosity` (optional): Specifies the level of detail returned for the block.
* `0`: Returns a serialized block as a hex-encoded string (default).
* `1`: Returns a JSON object with block information.
* `2`: Returns a JSON object with block information and detailed transaction data.
* Example: `1`

### Return Object

The returned object varies depending on the `verbosity` parameter:

* If `verbose` is `false`, the return object is a hex-encoded string of the serialized block.
* If `verbose` is `true`, the return object is a JSON object containing the following fields:
* If `verbosity` is `0`, the return object is a hex-encoded string of the serialized block.
* If `verbosity` is `1` or `2`, the return object is a JSON object containing the following fields:
* `hash`: The block hash.
* `confirmations`: The number of confirmations for the block.
* `strippedsize`: The block size without witness data.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
title: "getblockchaininfo"
slug: "rpc-dogecoin-getblockchaininfo"
excerpt: "Dogecoin RPC"
slug: "rpc-litecoin-getblockchaininfo"
excerpt: "Litecoin RPC"
category: 65c5e93c623cad004b45d505
hidden: false
metadata:
description: "Dogecoin RPC"
description: "Litecoin RPC"
image: []
keywords: "dogecoin, rpc"
keywords: "litecoin, rpc"
robots: "index"
createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)"
updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)"
Expand All @@ -22,9 +22,9 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)"
```typescript
// yarn add @tatumio/tatum

import { TatumSDK, Dogecoin, Network } from '@tatumio/tatum'
import { TatumSDK, Litecoin, Network } from '@tatumio/tatum'

const tatum = await TatumSDK.init<Dogecoin>({network: Network.DOGECOIN})
const tatum = await TatumSDK.init<Litecoin>({network: Network.LITECOIN})

const result = await tatum.rpc.getBlockChainInfo()

Expand All @@ -36,9 +36,9 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs

### Overview

`getblockchaininfo` is a Dogecoin RPC method that provides general information about the current state of the blockchain. This method is useful for obtaining an overview of the blockchain, including the best block hash, chain height, difficulty, and network protocol version. It can be used for various purposes, such as monitoring the blockchain, tracking network upgrades, and assessing the current mining difficulty.
`getblockchaininfo` is a Litecoin RPC method that provides general information about the current state of the blockchain. This method is useful for obtaining an overview of the blockchain, including the best block hash, chain height, difficulty, and network protocol version. It can be used for various purposes, such as monitoring the blockchain, tracking network upgrades, and assessing the current mining difficulty.

{% embed url="https://codepen.io/Martin-Zemanek/pen/rNQRyje" %}
{% embed url="https://codepen.io/tatum-devrel/pen/gOQEPrd" %}

### Parameters

Expand Down
Loading

0 comments on commit cac5a59

Please sign in to comment.