-
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
9c07179
commit 3dcae36
Showing
44 changed files
with
6,257 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: "Stellar" | ||
slug: "rpc-stellar" | ||
excerpt: "" | ||
hidden: false | ||
createdAt: "Wed Mar 06 2024 10:35:18 GMT+0000 (Coordinated Universal Time)" | ||
updatedAt: "Wed Mar 06 2024 13:09:53 GMT+0000 (Coordinated Universal Time)" | ||
--- |
159 changes: 159 additions & 0 deletions
159
v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccount.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,159 @@ | ||
--- | ||
title: "getAccount" | ||
slug: "rpc-stellar-getaccount" | ||
excerpt: "Stellar RPC" | ||
hidden: false | ||
metadata: | ||
description: "Stellar RPC" | ||
image: [] | ||
keywords: "stellar, rpc" | ||
robots: "index" | ||
createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" | ||
updatedAt: "Sat Apr 06 2024 12:59:44 GMT+0000 (Coordinated Universal Time)" | ||
--- | ||
[block:html] | ||
{ | ||
"html": "<div style=\"padding: 10px 20px; border-radius: 5px; background-color: #e6e2ff; margin: 0 0 30px 0;\">\n <h5>Archive Method</h5>\n <p>Only on the full archive nodes. Complex queries might take longer and incur additional cost</p>\n</div>" | ||
} | ||
[/block] | ||
|
||
|
||
### How to use it | ||
|
||
```typescript | ||
// Import required libraries and modules from Tatum SDK | ||
import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; | ||
|
||
// Initialize the Tatum SDK for Stellar | ||
const tatum = await TatumSDK.init<Stellar>({ network: Network.STELLAR }); | ||
|
||
// Define the account ID (Replace placeholder with the actual account ID) | ||
const accountId = "YOUR_ACCOUNT_ID"; | ||
|
||
// Retrieve details of a specific account | ||
const accountDetails = await tatum.rpc.getAccount(accountId); | ||
|
||
// Log the account details | ||
console.log("Account Details:", accountDetails); | ||
|
||
// Always destroy the Tatum SDK instance when done to stop any background processes | ||
await tatum.destroy(); | ||
``` | ||
|
||
### Overview | ||
|
||
The `getAccount` method allows you to retrieve detailed information about a specific account. This includes information about balances and trustlines, including those that haven't been authorized yet. | ||
|
||
### Example use cases: | ||
|
||
1. **Account Information:** | ||
Developers and applications can use this method to access detailed information about a specific account, including its balances and trustlines. | ||
|
||
2. **Trustline Analysis:** | ||
You can use the response to analyze the trustlines established by the account, including those that haven't been authorized yet. | ||
|
||
### Request Parameters | ||
|
||
The `getAccount` method requires the following parameter: | ||
|
||
- `accountId` (string, required): | ||
The unique identifier (account ID) of the account for which you want to retrieve details. | ||
|
||
### Return Object | ||
|
||
The `getAccount` method returns a JSON object containing details about the specified account, including balances, sponsorships, and other relevant information. | ||
|
||
(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) | ||
|
||
```json | ||
{ | ||
"_links": { | ||
"self": { | ||
"href": "https://horizon.stellar.org/accounts/GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U" | ||
}, | ||
"transactions": { | ||
"href": "https://horizon.stellar.org/accounts/GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U/transactions{?cursor,limit,order}", | ||
"templated": true | ||
}, | ||
"operations": { | ||
"href": "https://horizon.stellar.org/accounts/GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U/operations{?cursor,limit,order}", | ||
"templated": true | ||
}, | ||
"payments": { | ||
"href": "https://horizon.stellar.org/accounts/GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U/payments{?cursor,limit,order}", | ||
"templated": true | ||
}, | ||
"effects": { | ||
"href": "https://horizon.stellar.org/accounts/GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U/effects{?cursor,limit,order}", | ||
"templated": true | ||
}, | ||
"offers": { | ||
"href": "https://horizon.stellar.org/accounts/GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U/offers{?cursor,limit,order}", | ||
"templated": true | ||
}, | ||
"trades": { | ||
"href": "https://horizon.stellar.org/accounts/GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U/trades{?cursor,limit,order}", | ||
"templated": true | ||
}, | ||
"data": { | ||
"href": "https://horizon.stellar.org/accounts/GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U/data/{key}", | ||
"templated": true | ||
} | ||
}, | ||
"id": "GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U", | ||
"account_id": "GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U", | ||
"sequence": "24739097524306468", | ||
"subentry_count": 3, | ||
"inflation_destination": "GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U", | ||
"home_domain": "tempo.eu.com", | ||
"last_modified_ledger": 23569316, | ||
"num_sponsoring": 0, | ||
"num_sponsored": 0, | ||
"thresholds": { | ||
"low_threshold": 5, | ||
"med_threshold": 0, | ||
"high_threshold": 0 | ||
}, | ||
"flags": { | ||
"auth_required": false, | ||
"auth_revocable": true, | ||
"auth_immutable": false, | ||
"auth_clawback_enabled": true | ||
}, | ||
"balances": [ | ||
{ | ||
"balance": "1.0000005", | ||
"limit": "922337203685.4775807", | ||
"buying_liabilities": "0.0000000", | ||
"selling_liabilities": "0.0000000", | ||
"last_modified_ledger": 22651481, | ||
"is_authorized": true, | ||
"is_clawback_enabled": false, | ||
"asset_type": "credit_alphanum4", | ||
"asset_code": "EURT", | ||
"asset_issuer": "GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S" | ||
}, | ||
{ | ||
"balance": "0.0000000", | ||
"limit": "922337203685.4775807", | ||
"buying_liabilities": "0.0000000", | ||
"selling_liabilities": "0.0000000", | ||
"last_modified_ledger": 7877447, | ||
"is_authorized": false, | ||
"is_clawback_enabled": false, | ||
"asset_type": "credit_alphanum4", | ||
"asset_code": "PHP", | ||
"asset_issuer": "GBUQWP3BOUZX34TOND2QV7QQ7K7VJTG6VSE7WMLBTMDJLLAW7YKGU6EP" | ||
} | ||
], | ||
"signers": [ | ||
{ | ||
"weight": 10, | ||
"key": "GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U", | ||
"type": "ed25519_public_key" | ||
} | ||
], | ||
"data": {}, | ||
"paging_token": "" | ||
} | ||
``` |
65 changes: 65 additions & 0 deletions
65
v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccountdata.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,65 @@ | ||
--- | ||
title: "getAccountData" | ||
slug: "rpc-stellar-getaccountdata" | ||
excerpt: "Stellar RPC" | ||
hidden: false | ||
metadata: | ||
description: "Stellar RPC" | ||
image: [] | ||
keywords: "stellar, 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)" | ||
--- | ||
[block:html] | ||
{ | ||
"html": "<div style=\"padding: 10px 20px; border-radius: 5px; background-color: #e6e2ff; margin: 0 0 30px 0;\">\n <h5>Archive Method</h5>\n <p>Only on the full archive nodes. Complex queries might take longer and incur additional cost</p>\n</div>" | ||
} | ||
[/block] | ||
|
||
|
||
### How to use it | ||
|
||
```typescript | ||
// Import required libraries and modules from Tatum SDK | ||
import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; | ||
|
||
// Initialize the Tatum SDK for Stellar | ||
const tatum = await TatumSDK.init<Stellar>({ network: Network.STELLAR }); | ||
|
||
// Define input parameters as an object (Replace placeholders with actual values and remove redundant) | ||
const params = { | ||
accountId: "YOUR_ACCOUNT_ID", | ||
key: "YOUR_DATA_KEY", | ||
}; | ||
|
||
// Retrieve data for a specific key of a given account | ||
const data = await tatum.rpc.getAccountData(params); | ||
|
||
// Log the data value | ||
console.log("Account Data:", data.value); | ||
|
||
// Always destroy the Tatum SDK instance when done to stop any background processes | ||
await tatum.destroy(); | ||
``` | ||
|
||
### Overview | ||
|
||
The `getAccountData` method allows you to retrieve a single data value for a specific key of a given account on the Stellar blockchain. Please note that the content and structure of the data returned can vary based on the specific use case and applications interacting with the Stellar blockchain. | ||
|
||
### Request Parameters | ||
|
||
The `getAccountData` method accepts the following request parameters: | ||
|
||
- `accountId` (string, required): | ||
The unique identifier (account ID) of the account for which you want to retrieve data. | ||
|
||
- `key` (string, required): | ||
The data key for which you want to retrieve the corresponding value. | ||
|
||
### Return Object | ||
|
||
The `getAccountData` method returns a JSON object with account data: | ||
|
||
`value` (string): | ||
The value associated with the specified data key for the given account. |
117 changes: 117 additions & 0 deletions
117
v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccounteffects.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,117 @@ | ||
--- | ||
title: "getAccountEffects" | ||
slug: "rpc-stellar-getaccounteffects" | ||
excerpt: "Stellar RPC" | ||
hidden: false | ||
metadata: | ||
description: "Stellar RPC" | ||
image: [] | ||
keywords: "stellar, rpc" | ||
robots: "index" | ||
createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" | ||
updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" | ||
--- | ||
[block:html] | ||
{ | ||
"html": "<div style=\"padding: 10px 20px; border-radius: 5px; background-color: #e6e2ff; margin: 0 0 30px 0;\">\n <h5>Archive Method</h5>\n <p>Only on the full archive nodes. Complex queries might take longer and incur additional cost</p>\n</div>" | ||
} | ||
[/block] | ||
|
||
|
||
### How to use it | ||
|
||
```typescript | ||
// Import required libraries and modules from Tatum SDK | ||
import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; | ||
|
||
// Initialize the Tatum SDK for Stellar | ||
const tatum = await TatumSDK.init<Stellar>({ network: Network.STELLAR }); | ||
|
||
// Define input parameters as an object (Replace placeholders with actual values and remove redundant) | ||
const inputParams = { | ||
accountId: "YOUR_ACCOUNT_ID", | ||
cursor: "now", | ||
order: "asc", | ||
limit: 10, | ||
}; | ||
|
||
// Retrieve effects of a specific account | ||
const effects = await tatum.rpc.getAccountEffects(inputParams); | ||
|
||
// Log the list of effects | ||
console.log("Account Effects:", effects); | ||
|
||
// Always destroy the Tatum SDK instance when done to stop any background processes | ||
await tatum.destroy(); | ||
``` | ||
|
||
### Overview | ||
|
||
The `getAccountEffects` method allows you to retrieve the effects of a specific account on the Stellar blockchain. You can use this endpoint in streaming mode to listen for new effects for the specified account as they are added to the Stellar ledger. When called in streaming mode, Horizon will start at the earliest known effect unless a cursor is set, in which case it will start from that cursor. Setting the cursor value to 'now' allows you to stream effects created since your request time. | ||
|
||
### Request Parameters | ||
|
||
The `getAccountEffects` method accepts the following request parameters: | ||
|
||
- `accountId` (string, required): | ||
The unique identifier (account ID) of the account for which you want to retrieve effects. | ||
|
||
- `cursor` (string, optional): | ||
A cursor value that determines the starting point for retrieving effects. Set it to 'now' to stream effects created since your request time. | ||
|
||
- `order` (string, optional): | ||
A designation of the order in which records should appear. Options include 'asc' (ascending) or 'desc' (descending). If this argument isn’t set, it defaults to 'asc'. | ||
|
||
- `limit` (number, optional): | ||
The maximum number of records returned. It defines the number of effects to fetch in a single request. | ||
|
||
### Return Object | ||
|
||
The `getAccountEffects` method returns a JSON object containing the list of effects associated with the specified account. Each effect represents an event that has occurred on the Stellar blockchain, such as the creation of an account, a payment, or other actions. | ||
|
||
(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) | ||
|
||
```json | ||
{ | ||
"_links": { | ||
"self": { | ||
"href": "https://.." | ||
}, | ||
"next": { | ||
"href": "https://.." | ||
}, | ||
"prev": { | ||
"href": "https://.." | ||
} | ||
}, | ||
"_embedded": { | ||
"records": [ | ||
{ | ||
"_links": { | ||
"operation": { | ||
"href": "https://..." | ||
}, | ||
"succeeds": { | ||
"href": "https://..." | ||
}, | ||
"precedes": { | ||
"href": "https://..." | ||
} | ||
}, | ||
"id": "0216517620744060929-0000000002", | ||
"paging_token": "216517620744060929-2", | ||
"account": "GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6", | ||
"type": "claimable_balance_claimant_created", | ||
"type_i": 51, | ||
"created_at": "2024-02-17T14:03:50Z", | ||
"asset": "ENIZ:GDLMUA4ZQSU3LMKEW7LETSIYLYMATTGVPXCHFRRTGQTF6K55XOQIENIZ", | ||
"balance_id": "000000004c56a7b5e98e7d5225f37d27fbd93c4fe2f03b00d2c80d23771ae97e66f599c7", | ||
"amount": "5000.0000000", | ||
"predicate": { | ||
"unconditional": true | ||
} | ||
} | ||
] | ||
} | ||
} | ||
``` |
Oops, something went wrong.