├── .github ├── ISSUE_TEMPLATE │ └── endpoint-request.md ├── CONTRIBUTING.md └── CODE_OF_CONDUCT.md ├── docs ├── endpoints │ ├── get-exchange-rate.md │ └── explorer │ │ ├── transaction-info.md │ │ └── current-block.md └── reference.md ├── README.md └── projects.md /.github/ISSUE_TEMPLATE/endpoint-request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Endpoint Request 3 | about: Suggest an endpoint to be documented 4 | title: "[Endpoint Request]" 5 | labels: '' 6 | assignees: HPaulson 7 | 8 | --- 9 | 10 | **What endpoint would you like documented & When is it used?** 11 | The route of the endpoint which you'd like to document. Ex. The `/submit-post` endpoint is used when creating a new post 12 | 13 | **What is this endpoint's purpose?** 14 | A clear and concise description of what this endpoint archives. Ex. Creates a new post 15 | 16 | **How will you make effective use of the endpoint?** 17 | A clear and concise description of how this documentation will be useful to you. Ex. It will be useful to create a CLI for making posts 18 | -------------------------------------------------------------------------------- /docs/endpoints/get-exchange-rate.md: -------------------------------------------------------------------------------- 1 | ## Getting Transactions on the chain 2 | 3 | ### Request 4 | \* = Requiered 5 | | Property | Value | 6 | |-----------|-------------------------------------| 7 | | *Endpoint | GET `https://api.bitclout.com/get-exchange-rate` | 8 | 9 | ### Response 10 |
11 | {
12 | "SatoshisPerBitCloutExchangeRate": Integer,
13 | "NanosSold": Integer,
14 | "USDCentsPerBitcoinExchangeRate": Integer
15 | }
16 |
17 |
18 | | Type | Description |
19 | |-----------|-------------------------------------|
20 | | "SatoshisPerBitCloutExchangeRate" | The exchange rate of Satoshis per 1 BitClout |
21 | | "NanosSold" | Total Bitclout sold in nanos |
22 | | "USDCentsPerBitcoinExchangeRate" | The exchage rate of USD Cents per 1 Bitcoin |
23 |
--------------------------------------------------------------------------------
/.github/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | ## Contributing
2 | #### All contributions to HPaulson/BitClout are greatly appreciated! When contributing, please follow these guidelines, and make sure you have read and accept the [Code of Conduct](https://github.com/HPaulson/BitClout/blob/master/.github/CODE_OF_CONDUCT.md)!
3 |
4 | ### Issues
5 | * Please follow the Issue Template when submitting issues! When updating this repo, it's vital that we have all information in the template!
6 | * Please respond to issues in a timely manner, and do not open spam issues.
7 | * Please comment on other's issues if you are experiencing the same issue, or support their feature request!
8 | ### Pull Requests
9 | * When submitting a PR, please follow the general style of the code &/ documentation in the surrounding file(s)
10 | * Please add files to the correct folder
11 | * Any file/folder additions should be noted on the [Tree of Contents](https://github.com/HPaulson/BitClout#tree-of-contents)
12 | * Please leave your name and email/website in the [Contributors](https://github.com/HPaulson/BitClout/blob/master/README.md#contributors) list!
13 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # HPaulson/BitClout
2 | This repo consists of tools and documentation of the BitClout.com node API which was reverse-engineered prior to the release of such source code. The documentation here can also be found on the [Wiki](https://github.com/HPaulson/BitClout/wiki) page for an easier viewing experience.
3 |
4 | ## Tree of Contents
5 | [BitClout](https://github.com/HPaulson/BitClout)
6 | - [Docs](/docs)
7 | - [Endpoints](/docs/endpoints)
8 | - [Explorer](/docs/explorer)
9 | - [Current Block](/docs/endpoints/explorer/current-block.md)
10 | - [Transaction Info](/docs/endpoints/explorer/transaction-info.md)
11 | - [Exchange Rate](/docs/endpoints/get-exchange-rate.md)
12 | - [Reference](/docs/reference.md)
13 | - [Projects List](/projects.md)
14 | - [README.md](/README.md)
15 | ```
16 | BitClout
17 | ├── docs
18 | │ ├── endpoints
19 | │ │ ├── explorer
20 | │ │ │ ├── current-block.md
21 | │ │ │ └── transaction-info.md
22 | │ │ └── get-exchange-rate.md
23 | │ └── reference.md
24 | ├── projects.md
25 | └── README.md
26 | ```
27 |
28 |
29 | ## Contributors
30 | - Listed below are all contributors who have assisted in the creation of this repo's contents:
31 | - [Hunter Paulson](https://github.com/HPaulson)
32 | - [Joe Rawlings](https://github.com/jrawlings)
33 | - [Sakib Rasul](https://github.com/rhythms06)
34 | - [Suketu Patel](https://github.com/Suketu-Patel)
35 |
--------------------------------------------------------------------------------
/projects.md:
--------------------------------------------------------------------------------
1 | # BitClout API Projects
2 |
3 | Below is a list of projects and tools which integrate with BitClout using its development node API! Please create a PR to add your project here.
4 |
5 | ## List
6 | - [BitClout API Documentation](https://github.com/HPaulson/BitClout/tree/master/docs)
7 | - Documentation of the BitClout Development Node API. Outlines request and response types and information for API endpoints which were reverse engineered, making development with the API easier for engineers.
8 | - [ImgClout](https://ImgClout.com)
9 | - Bringing modern social media to the BitClout Blockchain with off-chain data such as exclusive content, personalized feeds, Better searching queries, Post Promotion, and providing a media-only content filter to assist communities, such as NFT artists, in sharing, discovering, and monetizing their quality content!
10 | - [BitSwap](https://bitswap.network/)
11 | - BitSwap allows users to create buy/sell listings for a specified amount of BitClout & price per BitClout, allowing them to find counterparties to conduct a trusted, verifiable exchange.
12 | - [BitClout Wiki](https://bitcloutwiki.org/)
13 | - BitCloutWiki is a collaborative documentation of BitClout.
14 | - [SubClout](https://www.subclout.com/)
15 | - Subscription newsletters for your BitClout coinholders - Monetize your content, stabilize your coin price, track BitClout analytics, and add massive value to your supporters.
16 | - [JobClout](https://jobclout.me/)
17 | - JobClout is the 1st BitClout job board.
18 | - [CloutFeed](https://clouttechnologies.com/)
19 | - CloutFeed is the first decentralized social network mobile App based on BitClout.
20 | - [Moonbounce](https://getmoonbounce.com)
21 | - Reward your biggest supporters with exclusive content, benefits, and experiences.
22 | - [RemindMe](https://bitclout.com/u/remindme)
23 | - Get reminded of a post within BitClout!
24 | - [OneClout](http://oneclout.net)
25 | - Connect BitClout with your social networks
26 |
--------------------------------------------------------------------------------
/docs/reference.md:
--------------------------------------------------------------------------------
1 | # BitClout API Documentation
2 |
3 | ## Reference
4 | - This repo includes unofficial and community-currated documentation of the BitClout Node REST API, based on reverse-engineered and open source code. Such API is currently shipped with all running nodes, and thus can be accessed from any node's Base URL. For the purposes of this documentation, all endpoints use the Base URL of BitClout's development node, which resides at [api.bitclout.com](https://api.bitclout.com).
5 |
6 | - Anyone can, and is encuraged to, run an instance of the API themselves by [running a node](https://github.com/bitclout/run)!
7 |
8 | ## Discovered Endpoints
9 | - [`GET api/v1`](https://github.com/HPaulson/BitClout/blob/master/docs/endpoints/explorer/current-block.md)
10 | - [`GET get-exchange-rate`](https://github.com/HPaulson/BitClout/blob/master/docs/endpoints/get-exchange-rate.md)
11 | - `POST admin/get-all-user-global-metadata`
12 | - `POST admin/get-global-params`
13 | - `POST admin/get-mempool-stats`
14 | - `POST admin/get-user-global-metadata`
15 | - `POST admin/get-username-verification-audit-logs`
16 | - `POST admin/get-verified-users`
17 | - `POST admin/grant-verification-badge`
18 | - `POST admin/node-control`
19 | - `POST admin/pin-post`
20 | - `POST admin/remove-nil-posts`
21 | - `POST admin/remove-verification-badge`
22 | - `POST admin/reprocess-bitcoin-block`
23 | - `POST admin/swap-identity`
24 | - `POST admin/update-bitcoin-usd-exchange-rate`
25 | - `POST admin/update-global-feed`
26 | - `POST admin/update-global-params`
27 | - `POST admin/update-user-global-metadata`
28 | - `POST api/v1/block`
29 | - [`POST api/v1/transaction-info`](https://github.com/HPaulson/BitClout/blob/master/docs/endpoints/explorer/transaction-info.md)
30 | - `POST block-public-key`
31 | - `POST burn-bitcoin`
32 | - `POST buy-or-sell-creator-coin-preview-WVAzTWpGOFFnMlBvWXZhTFA4NjNSZGNW`
33 | - `POST buy-or-sell-creator-coin-WVAzTWpGOFFnMlBvWXZhTFA4NjNSZGNW`
34 | - `POST create-follow-txn-stateless`
35 | - `POST create-like-stateless`
36 | - `POST delete-identities`
37 | - `POST get-app-state`
38 | - `POST get-block-template`
39 | - `POST get-follows-stateless`
40 | - `POST get-hodlers-for-public-key`
41 | - `POST get-identities`
42 | - `POST get-messages-stateless`
43 | - `POST get-notifications`
44 | - `POST get-posts-for-public-key`
45 | - `POST get-posts-stateless`
46 | - `POST get-profiles`
47 | - `POST get-single-post`
48 | - `POST get-single-profile`
49 | - `POST get-txn`
50 | - `POST get-user-global-metadata`
51 | - `POST get-users-stateless`
52 | - `POST miner-control`
53 | - `POST send-diamonds`
54 | - `POST send-bitclout`
55 | - `POST send-message-stateless`
56 | - `POST send-phone-number-verification-text`
57 | - `POST submit-phone-number-verification-code`
58 | - `POST submit-post`
59 | - `POST submit-transaction`
60 | - `POST transfer-creator-coin`
61 | - `POST update-profile`
62 | - `POST update-user-global-metadata`
63 |
--------------------------------------------------------------------------------
/.github/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | We as members, contributors, and leaders pledge to make participation in our
6 | community a harassment-free experience for everyone, regardless of age, body
7 | size, visible or invisible disability, ethnicity, sex characteristics, gender
8 | identity and expression, level of experience, education, socio-economic status,
9 | nationality, personal appearance, race, religion, or sexual identity
10 | and orientation.
11 |
12 | We pledge to act and interact in ways that contribute to an open, welcoming,
13 | diverse, inclusive, and healthy community.
14 |
15 | ## Our Standards
16 |
17 | Examples of behavior that contributes to a positive environment for our
18 | community include:
19 |
20 | * Demonstrating empathy and kindness toward other people
21 | * Being respectful of differing opinions, viewpoints, and experiences
22 | * Giving and gracefully accepting constructive feedback
23 | * Accepting responsibility and apologizing to those affected by our mistakes,
24 | and learning from the experience
25 | * Focusing on what is best not just for us as individuals, but for the
26 | overall community
27 |
28 | Examples of unacceptable behavior include:
29 |
30 | * The use of sexualized language or imagery, and sexual attention or
31 | advances of any kind
32 | * Trolling, insulting or derogatory comments, and personal or political attacks
33 | * Public or private harassment
34 | * Publishing others' private information, such as a physical or email
35 | address, without their explicit permission
36 | * Other conduct which could reasonably be considered inappropriate in a
37 | professional setting
38 |
39 | ## Enforcement Responsibilities
40 |
41 | Community leaders are responsible for clarifying and enforcing our standards of
42 | acceptable behavior and will take appropriate and fair corrective action in
43 | response to any behavior that they deem inappropriate, threatening, offensive,
44 | or harmful.
45 |
46 | Community leaders have the right and responsibility to remove, edit, or reject
47 | comments, commits, code, wiki edits, issues, and other contributions that are
48 | not aligned to this Code of Conduct, and will communicate reasons for moderation
49 | decisions when appropriate.
50 |
51 | ## Scope
52 |
53 | This Code of Conduct applies within all community spaces, and also applies when
54 | an individual is officially representing the community in public spaces.
55 | Examples of representing our community include using an official e-mail address,
56 | posting via an official social media account, or acting as an appointed
57 | representative at an online or offline event.
58 |
59 | ## Enforcement
60 |
61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be
62 | reported to the community leaders responsible for enforcement at
63 | HPaulson@SeismicCore.com.
64 | All complaints will be reviewed and investigated promptly and fairly.
65 |
66 | All community leaders are obligated to respect the privacy and security of the
67 | reporter of any incident.
68 |
69 | ## Enforcement Guidelines
70 |
71 | Community leaders will follow these Community Impact Guidelines in determining
72 | the consequences for any action they deem in violation of this Code of Conduct:
73 |
74 | ### 1. Correction
75 |
76 | **Community Impact**: Use of inappropriate language or other behavior deemed
77 | unprofessional or unwelcome in the community.
78 |
79 | **Consequence**: A private, written warning from community leaders, providing
80 | clarity around the nature of the violation and an explanation of why the
81 | behavior was inappropriate. A public apology may be requested.
82 |
83 | ### 2. Warning
84 |
85 | **Community Impact**: A violation through a single incident or series
86 | of actions.
87 |
88 | **Consequence**: A warning with consequences for continued behavior. No
89 | interaction with the people involved, including unsolicited interaction with
90 | those enforcing the Code of Conduct, for a specified period of time. This
91 | includes avoiding interactions in community spaces as well as external channels
92 | like social media. Violating these terms may lead to a temporary or
93 | permanent ban.
94 |
95 | ### 3. Temporary Ban
96 |
97 | **Community Impact**: A serious violation of community standards, including
98 | sustained inappropriate behavior.
99 |
100 | **Consequence**: A temporary ban from any sort of interaction or public
101 | communication with the community for a specified period of time. No public or
102 | private interaction with the people involved, including unsolicited interaction
103 | with those enforcing the Code of Conduct, is allowed during this period.
104 | Violating these terms may lead to a permanent ban.
105 |
106 | ### 4. Permanent Ban
107 |
108 | **Community Impact**: Demonstrating a pattern of violation of community
109 | standards, including sustained inappropriate behavior, harassment of an
110 | individual, or aggression toward or disparagement of classes of individuals.
111 |
112 | **Consequence**: A permanent ban from any sort of public interaction within
113 | the community.
114 |
115 | ## Attribution
116 |
117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118 | version 2.0, available at
119 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120 |
121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct
122 | enforcement ladder](https://github.com/mozilla/diversity).
123 |
124 | [homepage]: https://www.contributor-covenant.org
125 |
126 | For answers to common questions about this code of conduct, see the FAQ at
127 | https://www.contributor-covenant.org/faq. Translations are available at
128 | https://www.contributor-covenant.org/translations.
129 |
--------------------------------------------------------------------------------
/docs/endpoints/explorer/transaction-info.md:
--------------------------------------------------------------------------------
1 | ## Getting Transactions on the chain
2 |
3 | ### Request
4 | \* = Requiered
5 | | Property | Value |
6 | |-----------|-------------------------------------|
7 | | *Endpoint | POST `https://api.bitclout.com/api/v1/transaction-info` |
8 | | *Headers | `content-type: application/json` |
9 | | *Body | `{"PublicKeyBase58Check"?: String PUBLIC_KEY, "IsMempool"?: Boolean}`
10 | > If you'd like to search only for mempool transactions, include `IsMempool`. Requesting `IsMempool: true` with no `PublicKeyBase58Check` will return the entire mempool.
11 |
12 | ### Response
13 |
14 | {
15 | "Error": String,
16 | "Transactions": [
17 | {
18 | "TransactionIDBase58Check": String,
19 | "RawTransactionHex": String,
20 | "Inputs": [
21 | {
22 | "TransactionIDBase58Check": String,
23 | "Index": Integer
24 | }
25 | ]
26 | "Outputs": [
27 | {
28 | "PublicKeyBase58Check": String,
29 | "AmountNanos": Integer
30 | ]
31 | "SignatureHex": String,
32 | "TransactionType": TransactionType
33 | "BlockHashHex": String,
34 | "TransactionMetadata": {
35 | "BlockHashHex": String,
36 | "TxnIndexInBlock": String,
37 | "TxnType": TransactionType,
38 | "TransactorPublicKeyBase58Check": String,
39 | "AffectedPublicKeys": [
40 | {
41 | "PublicKeyBase58Check": String,
42 | "Metadata": PublicKeyType,
43 | }
44 | ],
45 | "BasicTransferTxindexMetadata": {
46 | "TotalInputNanos": Integer,
47 | "TotalOutputNanos" Integer,
48 | "FeeNanos": Integer,
49 | "UtxoOpsDump": String
50 | },
51 | "BitcoinExchangeTxindexMetadata": {
52 | "BitcoinSpendAddress": String,
53 | "SatoshisBurned": Integer,
54 | "NanosCreated": Integer,
55 | "TotalNanosPurchasedBefore": Long,
56 | "TotalNanosPurchasedAfter": Long,
57 | "BitcoinTxnHash": String
58 | },
59 | "CreatorCoinTxindexMetadata": {
60 | "OperationType": "buy" | "sell",
61 | "BitCloutToSellNanos": Integer,
62 | "CreatorCoinToSellNanos": Integer,
63 | "BitCloutToAddNanos": Integer
64 | },
65 | "UpdateProfileTxindexMetadata": {
66 | "ProfilePublicKeyBase58Check": String,
67 | "NewUsername": String,
68 | "NewDescription": String,
69 | "NewProfilePic": String,
70 | "NewCreatorBasisPoints": Integer,
71 | "NewStakeMultipleBasisPoints": Integer,
72 | "IsHidden": Boolean
73 | },
74 | "SubmitPostTxindexMetadata": {
75 | "PostHashBeingModifiedHex": String,
76 | "ParentPostHashHex": String,
77 | "LikeTxindexMetadata": {
78 | "IsUnlike": Boolean,
79 | "PostHashHex": String
80 | },
81 | "FollowTxindexMetadata": {
82 | "IsUnfollow": Boolean
83 | },
84 | "PrivateMessageTxindexMetadata": {
85 | "TimestampNanos": Long
86 | },
87 | "SwapIdentityTxindexMetadata": {
88 | < UNKNOWN TYPES >
89 | }
90 | }
91 | }
92 | }
93 | ],
94 | "BalanceNanos": Integer
95 | }
96 |
97 | ---
98 |
99 | ### Types
100 |
101 | ## TxnType
102 | | Type | Description |
103 | |-----------|-------------------------------------|
104 | | "BASIC_TRANSFER" | Transfer of BitClout |
105 | | "UPDATE_PROFILE" | Profile Update (Name, Bio, etc) |
106 | | "FOLLOW" | Follow (Or unfollow) a user |
107 | | "CREATOR_COIN" | Purchase (Or sell) a creator coin |
108 | | "SUBMIT_POST" | Create (Or hide) post |
109 | | "LIKE" | Like (Or unlike) post |
110 | | "BLOCK_REWARD" | Reward for mining a block |
111 | | "BITCOIN_EXCHANGE" | For Purchases of $BitClout using $BTC |
112 | | "PRIVATE_MESSAGE" | Private message between accounts |
113 |
114 | ## AffectedPublicKey Metadata
115 | | Type | Description |
116 | |-----------|-------------------------------------|
117 | | "BasicTransferOutput" | Public key of the user who engaged in an action |
118 | | "ProfilePublicKeyBase58Check" | ??? |
119 | | "FollowedPublicKeyBase58Check" | Public key of the user who received a follow (Or unfollow) |
120 | | "CreatorPublicKey" | Public key of the creator whose coin was purchased (Or sold) |
121 | | "PosterPublicKeyBase58Check" | Public key of the liked posts author |
122 |
123 | ## Transaction
124 | | Type | Description |
125 | |-----------|-------------------------------------|
126 | | "TransactionIDBase58Check" | Transaction ID in Base 58 |
127 | | "RawTransactionHex" | Raw Hex Transaction ID |
128 | | "Inputs" | Array of Transaction Inputs |
129 | | "Outputs" | Arrat of Transaction Outputs |
130 | | "SignatureHex" | Transaction Signature in Hex |
131 | | "TransactionMetadata" | Transaction Meta Data |
132 |
133 | ## Input
134 | | Type | Description |
135 | |-----------|-------------------------------------|
136 | | "TransactionIDBase58Check" | Transaction ID in Base 58 |
137 | | "Index" | < UNKNOWN > |
138 |
139 | ## Output
140 | | Type | Description |
141 | |-----------|-------------------------------------|
142 | | "PublicKeyBase58Check" | Author's Pulic Key in Base 58 |
143 | | "AmountNanos" | < UNKNOWN > |
144 |
145 | ## TransactionMetadata
146 | | Type | Description |
147 | |-----------|-------------------------------------|
148 | | "BlockHashHex" | Transaction's block in hex |
149 | | "TxnIndexInBlock" | Transaction's index in it's block |
150 | | "TxnType" | Transaction Type |
151 | | "AffectedPublicKeys" | Array of users affected by the transaction |
152 | | "BasicTransferTxindexMetadata" | Nano metadata
153 | | "BitcoinExchangeTxindexMetadata" | Bitcoin exchange metadata |
154 | | "CreatorCoinTxindexMetadata" | Creator Coin transaction metadata |
155 | | "UpdateProfileTxindexMetadata" | Profile Update meta data |
156 | | "SubmitPostTxindexMetadata" | Created (Or hidden) post's metadata |
157 | | "LikeTxindexMetadata" | Meta data of liked (Or unliked) post |
158 | | "FollowTxindexMetadata" | Meta data of follow (Or Unfollow) |
159 | | "SwapIdentityTxindexMetadata" | < UNKNOWN > |
160 |
161 | ## BasicTransferTxindexMetadata
162 | | Type | Description |
163 | |-----------|-------------------------------------|
164 | | "TotalInputNanos" | Nano's inputed into the transaction |
165 | | "TotalOutputNanos" | Nano's outputted into the transaction |
166 | | "FeeNanos" | Nano fee paid for the transaction (Input - Output) |
167 | | "UtxoOpsDump" | < UNKNOWN > |
168 |
169 | ## BitcoinExchangeTxindexMetadata
170 | | Type | Description |
171 | |-----------|-------------------------------------|
172 | | "BitcoinSpendAddress" | Public key address of incoming satoshis|
173 | | "SatoshisBurned" | $BTC spent on $BitClout|
174 | | "NanosCreated" | < UNKNOWN >|
175 | | "TotalNanosPurchasedBefore" | < UNKNOWN >|
176 | | "TotalNanosPurchasedAfter" | < UNKNOWN >|
177 | | "BitcoinTxnHash" | Tx Hash of $BTC transaction|
178 |
179 | ## CreatorCoinTxindexMetadata
180 | | Type | Description |
181 | |-----------|-------------------------------------|
182 | | "OperationType" | Transaction Type, `"buy"` or `"sell"` |
183 | | "BitCloutToSellNanos" | BitClout paid for creator coin |
184 | | "CreatorCoinToSellNanos" | Creator Coin sold for BitClout |
185 | | "BitCloutToAddNanos" | < UNKNOWN > |
186 |
187 | ## UpdateProfileTxindexMetadata
188 | | Type | Description |
189 | |-----------|-------------------------------------|
190 | | "ProfilePublicKeyBase58Check" | User's public key in Base 58 |
191 | | "NewUsername" | User's new username |
192 | | "NewDescription" | User's new bio |
193 | | "NewProfilePic" | User's new profile image |
194 | | "NewCreatorBasisPoints" | < UNKNOWN > |
195 | | "NewStakeMultipleBasisPoints" | < UNKNOWN > |
196 | | "IsHidden" | < UNKNOWN > |
197 |
198 | ## SubmitPostTxindexMetadata
199 | | Type | Description |
200 | |-----------|-------------------------------------|
201 | | "PostHashBeingModifiedHex" | Transaction ID of the modified post |
202 | | "ParentPostHashHex" | Transaction ID of the parent post (When the modified post is a reply) |
203 |
204 | ## LikeTxindexMetadata
205 | | Type | Description |
206 | |-----------|-------------------------------------|
207 | | "IsUnlike" | Whether the transaction was an unlike (rather than a like) |
208 | | "PostHashHex" | Transaction ID of the liked post |
209 |
210 | ## FollowTxindexMetadata
211 | | Type | Description |
212 | |-----------|-------------------------------------|
213 | | "IsUnfollow" | Whether the transaction was an unfollow (rather than a follow) |
214 |
215 | ## PrivateMessageTxindexMetadata
216 | | Type | Description |
217 | |-----------|-------------------------------------|
218 | | "TimestampNanos" | < UNKNOWN > |
219 |
220 | ## SwapIdentityTxindexMetadata
221 | | Type | Description |
222 | |-----------|-------------------------------------|
223 | | "< UNKNOWN TYPES >" | < UNKNOWN > |
224 |
225 |
--------------------------------------------------------------------------------
/docs/endpoints/explorer/current-block.md:
--------------------------------------------------------------------------------
1 | ## Get the current block
2 |
3 | ### Request
4 | \* = Requiered
5 | | Property | Value |
6 | |-----------|-------------------------------------|
7 | | *Endpoint | GET `https://api.bitclout.com/api/v1/` |
8 | | *Headers | `content-type: application/json` |
9 |
10 | ### Response
11 |
12 | {
13 | "Error": String,
14 | "Header": {
15 | "BlockHashHex": String,
16 | "Version": Integer,
17 | "PrevBlockHashHex": String,
18 | "TransactionMerkleRootHex": String,
19 | "TstampSecs": Integer,
20 | "Height": Integer,
21 | "Nonce": Integer
22 | },
23 | "Transactions": [
24 | {
25 | "TransactionIDBase58Check": String,
26 | "RawTransactionHex": String,
27 | "Inputs": [
28 | {
29 | "TransactionIDBase58Check": String,
30 | "Index": Integer
31 | }
32 | ]
33 | "Outputs": [
34 | {
35 | "PublicKeyBase58Check": String,
36 | "AmountNanos": Integer
37 | ]
38 | "SignatureHex": String,
39 | "TransactionType": TransactionType
40 | "BlockHashHex": String,
41 | "TransactionMetadata": {
42 | "BlockHashHex": String,
43 | "TxnIndexInBlock": String,
44 | "TxnType": TransactionType,
45 | "TransactorPublicKeyBase58Check": String,
46 | "AffectedPublicKeys": [
47 | {
48 | "PublicKeyBase58Check": String,
49 | "Metadata": PublicKeyType,
50 | }
51 | ],
52 | "BasicTransferTxindexMetadata": {
53 | "TotalInputNanos": Integer,
54 | "TotalOutputNanos" Integer,
55 | "FeeNanos": Integer,
56 | "UtxoOpsDump": String
57 | },
58 | "BitcoinExchangeTxindexMetadata": {
59 | "BitcoinSpendAddress": String,
60 | "SatoshisBurned": Integer,
61 | "NanosCreated": Integer,
62 | "TotalNanosPurchasedBefore": Long,
63 | "TotalNanosPurchasedAfter": Long,
64 | "BitcoinTxnHash": String
65 | },
66 | "CreatorCoinTxindexMetadata": {
67 | "OperationType": "buy" | "sell",
68 | "BitCloutToSellNanos": Integer,
69 | "CreatorCoinToSellNanos": Integer,
70 | "BitCloutToAddNanos": Integer
71 | },
72 | "UpdateProfileTxindexMetadata": {
73 | "ProfilePublicKeyBase58Check": String,
74 | "NewUsername": String,
75 | "NewDescription": String,
76 | "NewProfilePic": String,
77 | "NewCreatorBasisPoints": Integer,
78 | "NewStakeMultipleBasisPoints": Integer,
79 | "IsHidden": Boolean
80 | },
81 | "SubmitPostTxindexMetadata": {
82 | "PostHashBeingModifiedHex": String,
83 | "ParentPostHashHex": String,
84 | "LikeTxindexMetadata": {
85 | "IsUnlike": Boolean,
86 | "PostHashHex": String
87 | },
88 | "FollowTxindexMetadata": {
89 | "IsUnfollow": Boolean
90 | },
91 | "PrivateMessageTxindexMetadata": {
92 | "TimestampNanos": Long
93 | },
94 | "SwapIdentityTxindexMetadata": {
95 | < UNKNOWN TYPES >
96 | }
97 | }
98 | }
99 | }
100 | ]
101 | }
102 |
103 | ---
104 |
105 | ### Types
106 |
107 | ## Header
108 | | Type | Description |
109 | |-----------|-------------------------------------|
110 | | "BlockHashHex" | Hash of the current block in hex |
111 | | "Version" | Version of the current block |
112 | | "PrevBlockHashHex" | Hash of the previous block in hex |
113 | | "TransactionMerkleRootHex" | < UNKNOWN > |
114 | | "TstampSecs" | UNIX timestamp of the block |
115 | | "Height" | The current block's height |
116 | | "Nonce" | < UNKNOWN > |
117 |
118 | ## TxnType
119 | | Type | Description |
120 | |-----------|-------------------------------------|
121 | | "BASIC_TRANSFER" | Transfer of BitClout |
122 | | "UPDATE_PROFILE" | Profile Update (Name, Bio, etc) |
123 | | "FOLLOW" | Follow (Or unfollow) a user |
124 | | "CREATOR_COIN" | Purchase (Or sell) a creator coin |
125 | | "SUBMIT_POST" | Create (Or hide) post |
126 | | "LIKE" | Like (Or unlike) post |
127 | | "BLOCK_REWARD" | Reward for mining a block |
128 | | "BITCOIN_EXCHANGE" | For Purchases of $BitClout using $BTC |
129 | | "PRIVATE_MESSAGE" | Private message between accounts |
130 |
131 | ## AffectedPublicKey Metadata
132 | | Type | Description |
133 | |-----------|-------------------------------------|
134 | | "BasicTransferOutput" | Public key of the user who engaged in an action |
135 | | "ProfilePublicKeyBase58Check" | ??? |
136 | | "FollowedPublicKeyBase58Check" | Public key of the user who received a follow (Or unfollow) |
137 | | "CreatorPublicKey" | Public key of the creator whose coin was purchased (Or sold) |
138 | | "PosterPublicKeyBase58Check" | Public key of the liked posts author |
139 |
140 | ## Transaction
141 | | Type | Description |
142 | |-----------|-------------------------------------|
143 | | "TransactionIDBase58Check" | Transaction ID in Base 58 |
144 | | "RawTransactionHex" | Raw Hex Transaction ID |
145 | | "Inputs" | Array of Transaction Inputs |
146 | | "Outputs" | Arrat of Transaction Outputs |
147 | | "SignatureHex" | Transaction Signature in Hex |
148 | | "TransactionMetadata" | Transaction Meta Data |
149 |
150 | ## Input
151 | | Type | Description |
152 | |-----------|-------------------------------------|
153 | | "TransactionIDBase58Check" | Transaction ID in Base 58 |
154 | | "Index" | < UNKNOWN > |
155 |
156 | ## Output
157 | | Type | Description |
158 | |-----------|-------------------------------------|
159 | | "PublicKeyBase58Check" | Author's Pulic Key in Base 58 |
160 | | "AmountNanos" | < UNKNOWN > |
161 |
162 | ## TransactionMetadata
163 | | Type | Description |
164 | |-----------|-------------------------------------|
165 | | "BlockHashHex" | Transaction's block in hex |
166 | | "TxnIndexInBlock" | Transaction's index in it's block |
167 | | "TxnType" | Transaction Type |
168 | | "AffectedPublicKeys" | Array of users affected by the transaction |
169 | | "BasicTransferTxindexMetadata" | Nano metadata
170 | | "BitcoinExchangeTxindexMetadata" | Bitcoin exchange metadata |
171 | | "CreatorCoinTxindexMetadata" | Creator Coin transaction metadata |
172 | | "UpdateProfileTxindexMetadata" | Profile Update meta data |
173 | | "SubmitPostTxindexMetadata" | Created (Or hidden) post's metadata |
174 | | "LikeTxindexMetadata" | Meta data of liked (Or unliked) post |
175 | | "FollowTxindexMetadata" | Meta data of follow (Or Unfollow) |
176 | | "SwapIdentityTxindexMetadata" | < UNKNOWN > |
177 |
178 | ## BasicTransferTxindexMetadata
179 | | Type | Description |
180 | |-----------|-------------------------------------|
181 | | "TotalInputNanos" | Nano's inputed into the transaction |
182 | | "TotalOutputNanos" | Nano's outputted into the transaction |
183 | | "FeeNanos" | Nano fee paid for the transaction (Input - Output) |
184 | | "UtxoOpsDump" | < UNKNOWN > |
185 |
186 | ## BitcoinExchangeTxindexMetadata
187 | | Type | Description |
188 | |-----------|-------------------------------------|
189 | | "BitcoinSpendAddress" | Public key address of incoming satoshis|
190 | | "SatoshisBurned" | $BTC spent on $BitClout|
191 | | "NanosCreated" | < UNKNOWN >|
192 | | "TotalNanosPurchasedBefore" | < UNKNOWN >|
193 | | "TotalNanosPurchasedAfter" | < UNKNOWN >|
194 | | "BitcoinTxnHash" | Tx Hash of $BTC transaction|
195 |
196 | ## CreatorCoinTxindexMetadata
197 | | Type | Description |
198 | |-----------|-------------------------------------|
199 | | "OperationType" | Transaction Type, `"buy"` or `"sell"` |
200 | | "BitCloutToSellNanos" | BitClout paid for creator coin |
201 | | "CreatorCoinToSellNanos" | Creator Coin sold for BitClout |
202 | | "BitCloutToAddNanos" | < UNKNOWN > |
203 |
204 | ## UpdateProfileTxindexMetadata
205 | | Type | Description |
206 | |-----------|-------------------------------------|
207 | | "ProfilePublicKeyBase58Check" | User's public key in Base 58 |
208 | | "NewUsername" | User's new username |
209 | | "NewDescription" | User's new bio |
210 | | "NewProfilePic" | User's new profile image |
211 | | "NewCreatorBasisPoints" | < UNKNOWN > |
212 | | "NewStakeMultipleBasisPoints" | < UNKNOWN > |
213 | | "IsHidden" | < UNKNOWN > |
214 |
215 | ## SubmitPostTxindexMetadata
216 | | Type | Description |
217 | |-----------|-------------------------------------|
218 | | "PostHashBeingModifiedHex" | Transaction ID of the modified post |
219 | | "ParentPostHashHex" | Transaction ID of the parent post (When the modified post is a reply) |
220 |
221 | ## LikeTxindexMetadata
222 | | Type | Description |
223 | |-----------|-------------------------------------|
224 | | "IsUnlike" | Whether the transaction was an unlike (rather than a like) |
225 | | "PostHashHex" | Transaction ID of the liked post |
226 |
227 | ## FollowTxindexMetadata
228 | | Type | Description |
229 | |-----------|-------------------------------------|
230 | | "IsUnfollow" | Whether the transaction was an unfollow (rather than a follow) |
231 |
232 | ## PrivateMessageTxindexMetadata
233 | | Type | Description |
234 | |-----------|-------------------------------------|
235 | | "TimestampNanos" | < UNKNOWN > |
236 |
237 | ## SwapIdentityTxindexMetadata
238 | | Type | Description |
239 | |-----------|-------------------------------------|
240 | | "< UNKNOWN TYPES >" | < UNKNOWN > |
241 |
242 |
--------------------------------------------------------------------------------