Skip to content

Commit

Permalink
Merge pull request #10 from tatumio/cosmos-fix
Browse files Browse the repository at this point in the history
ALL-7154 - Cosmos methods update
  • Loading branch information
janmusil-tatum authored May 27, 2024
2 parents e50bc7d + e49f639 commit a0b85a5
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 145 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ The `constructionMetadata` method retrieves metadata necessary to construct tran
## Request Example

```json
curl --location 'https://api.tatum.io/v3/blockchain/node/cosmos/' \
curl --location 'https://api.tatum.io/v3/blockchain/node/cosmos-mainnet/construction/metadata' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {API_KEY}' \
--data '{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ The `constructionPayloads` contains the network, a slice of operations, and arbi
## Request Example

```json
curl --location 'https://api.tatum.io/v3/blockchain/node/cosmos/' \
curl --location 'https://api.tatum.io/v3/blockchain/node/cosmos-mainnet/construction/payloads' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {API_KEY}' \
--data '{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ curl --location 'https://api.tatum.io/v3/blockchain/node/cosmos-mainnet/construc
--data '{
"networkIdentifier": {
"blockchain": "cosmos",
"network": "cosmos-mainnet"
"network": "mainnet"
},
"publicKeys": {
"hexBytes": "PUBLIC_KEY_HEX_BYTES",
Expand All @@ -76,8 +76,8 @@ const cosmos = await TatumSDK.init<Cosmos>({
// Define the input parameters with only required fields
const params = {
networkIdentifier: {
blockchain: "COSMOS",
network: "COSMOS_MAINNET",
blockchain: "cosmos",
network: "mainnet",
},
publicKeys: {
hexBytes: "PUBLIC_KEY_HEX_BYTES", // Hexadecimal representation of the public key.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ curl --location 'https://api.tatum.io/v3/blockchain/node/cosmos-mainnet/account/
--data '{
"networkIdentifier": {
"blockchain": "cosmos",
"network": "cosmos-mainnet"
"network": "mainnet"
},
"accountIdentifier": {
"address": "{{address}}",
Expand All @@ -97,8 +97,8 @@ const cosmos = await TatumSDK.init<Cosmos>({
// Define the input parameters with only required fields
const params = {
networkIdentifier: {
blockchain: "COSMOS",
network: "COSMOS_MAINNET",
blockchain: "cosmos",
network: "mainnet",
},
accountIdentifier: {
address: "{{address}}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ curl --location 'https://api.tatum.io/v3/blockchain/node/cosmos-mainnet/account/
--header 'x-api-key: {API_KEY}' \
--data '{
"networkIdentifier": {
"blockchain": "{{blockchain}}",
"network": "{{network}}"
"blockchain": "cosmos",
"network": "mainnet"
},
"accountIdentifier": {
"address": "{{address}}",
"address": "cosmos1...",
},
"include_mempool": true
}'
Expand All @@ -99,11 +99,11 @@ const {{blockchain}} = await TatumSDK.init<Cosmos>({ network: Network.COSMOS_MAI

const accountCoins = await tatum.rpc.getAccountCoins({
networkIdentifier: {
blockchain: "{{blockchain}}",
network: "{{network}}"
blockchain: "cosmos",
network: "mainnet"
},
accountIdentifier: {
address: "{{address}}",
address: "cosmos1...",
},
include_mempool: true
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ This method is essential for obtaining a transaction hash from a signed transact
| Name | Type | Required | Description |
| ---------------------- | ---------------------------------- | -------- | ------------------------------------------------------------------- |
| `networkIdentifier` | object | Yes | Identifies the Cosmos blockchain and network details. |
| `blockchain` | string (from networkIdentifier) | Yes | The blockchain identifier, typically "Cosmos". |
| `network` | string (from networkIdentifier) | Yes | The network name, e.g., "cosmos-mainnet". |
| `blockchain` | string (from networkIdentifier) | Yes | The blockchain identifier, typically "cosmos". |
| `network` | string (from networkIdentifier) | Yes | The network name, e.g., "mainnet". |
| `subNetworkIdentifier` | object (from networkIdentifier) | No | Optional sub-network identifier object. |
| `network` | string (from subNetworkIdentifier) | Yes | The name of the sub-network within Cosmos. |
| `metadata` | object (from subNetworkIdentifier) | No | Metadata associated with the sub-network. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,12 @@ The method returns a comprehensive list of all supported networks, including ess
curl --location 'https://api.tatum.io/v3/blockchain/node/cosmos-mainnet/network/list' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {API_KEY}' \
--data '{}
--data '{
"network_identifier": {
"blockchain": "cosmos",
"network": "mainnet"
}
}'
```
```typescript
import { TatumSDK, Cosmos, Network } from "@tatumio/tatum";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The `getNetworkStatus` method provides real-time information about the operation
| ---------------------- | ---------------------------------- | -------- | --------------------------------------------------------------- |
| `networkIdentifier` | object | Yes | Identifies the Cosmos blockchain and network details. |
| `blockchain` | string (from networkIdentifier) | Yes | The blockchain identifier, typically "Cosmos". |
| `network` | string (from networkIdentifier) | Yes | The network name, e.g., "cosmos-mainnet". |
| `network` | string (from networkIdentifier) | Yes | The network name, e.g., "mainnet". |
| `subNetworkIdentifier` | object (from networkIdentifier) | No | Optional sub-network identifier object. |
| `network` | string (from subNetworkIdentifier) | Yes | The name of the sub-network within Cosmos. |
| `metadata` | object (from subNetworkIdentifier) | No | Metadata associated with the sub-network. |
Expand Down Expand Up @@ -108,7 +108,7 @@ const cosmos = await TatumSDK.init<Cosmos>({
const networkStatus = await tatum.rpc.getNetworkStatus({
networkIdentifier: {
blockchain: "cosmos",
network: "cosmos-mainnet",
network: "mainnet",
},
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ curl --location 'https://api.tatum.io/v3/blockchain/node/cosmos-mainnet/construc
--data '{
"network_identifier": {
"blockchain": "cosmos",
"network": "cosmos-mainnet"
"network": "mainnet"
},
"signed": true,
"transaction": "TRANSACTION_BLOB"
Expand Down
125 changes: 0 additions & 125 deletions v1.0/RPC Nodes/rpc-others/rpc-cosmos/rpc-cosmos-searchtransactions.md

This file was deleted.

0 comments on commit a0b85a5

Please sign in to comment.