HTTP API for a BitClout node

BitClout Logo

About BitClout

BitClout is a blockchain built from the ground up to support a fully-featured social network. Its architecture is similar to Bitcoin, only it supports complex social network data like profiles, posts, follows, creator coin transactions, and more.

Read about the vision

About This Repo

Documentation for this repo lives on docs.bitclout.com. Specifically, the following docs should give you everything you need to get started:

Comments
  • Feature get posts hashlist

    Feature get posts hashlist

    Added an endpoint get-posts-hashlist which can retrieve posts from an array of PostHashes.

    Sample payload:

    {
        "PostsHashList": ["bdebcb4b5ebf10bd20f8db3e8be55d5b618c7302ea7415967079c4ed58a746e6", "62ef62991f56d05f6cf55f06080d64e438a6529d58fae57822f1ab9cf34600f1","ba448a92b26a3aa4a2fb5e3f8d03e1956f87f26192503c6dd13031c34d9ea54a", "3a4d6f5b50512f36ed868c406e522775bba9637502cb9708ff3fbb451c70baf5" ],
        "ReaderPublicKeyBase58Check": "BC1YLhDaBCuTnctb44A9yV4hiQu2GV3g3672nHyDYxQoSQ3E7Jk2QHY",
        "OrderBy": ""
    }
    

    I have multiple projects waiting for this:

    • DeSocialWorld
    • Gemstori
    • Videso
  • How to use Bitclout in local?

    How to use Bitclout in local?

    Hello, I installed the Bitclout project in my local. But in the beginning I didn't know where to add money to my account. How can I do that? I want to test local bitclout.

  • Notifications do not always show legitimate mentions

    Notifications do not always show legitimate mentions

    Through extensive testing I am sure that the mentions are missed on notifications many times.

    Have not found a rhyme or reason as to why they are not indexed.

    Have confirmed with @maebeam that I am not Grey or Blacklisted.

    Can see the mentions on the blockchain data but they don't show on notifications on local node or Bitclout.com.

    This will surely effect user experience, so just trying to help by mentioning it.

  • Postgres DB sync stops at block 67217. Backend proces keeps restarting

    Postgres DB sync stops at block 67217. Backend proces keeps restarting

    Have 2 nodes stopped at Block height 67217.

    The backend process keeps restarting every so many seconds with below error.

    backend     | panic: runtime error: invalid memory address or nil pointer dereference
    backend     | [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xb5bdaa]
    backend     |
    backend     | goroutine 49 [running]:
    backend     | github.com/deso-protocol/core/lib.(*UtxoView).GetPublicKeyForPKID(0xc0004e2b60, 0xc0d0af05d0, 0xc001674690, 0x21, 0xc0006f70e0)
    backend     |   /deso/src/core/lib/block_view.go:4887 +0x1ca
    backend     | github.com/deso-protocol/core/lib.(*UtxoView)._connectAcceptNFTBid(0xc0004e2b60, 0xc00047a700, 0xc000da54a0, 0x10691, 0x1c0, 0x0, 0x0, 0x3, 0x4, 0x0, ...)
    backend     |   /deso/src/core/lib/block_view.go:7025 +0x999
    backend     | github.com/deso-protocol/core/lib.(*UtxoView)._connectTransaction(0xc0004e2b60, 0xc00047a700, 0xc000da54a0, 0x0, 0x10691, 0xc00458a780, 0x3, 0x4, 0x966c, 0x958f, ...)
    backend     |   /deso/src/core/lib/block_view.go:9414 +0xc28
    backend     | github.com/deso-protocol/core/lib.(*UtxoView).ConnectTransaction(0xc0004e2b60, 0xc00047a700, 0xc000da54a0, 0x0, 0x10691, 0xc00458a780, 0x3, 0x4, 0x966c, 0x958f, ...)
    backend     |   /deso/src/core/lib/block_view.go:9314 +0x79
    backend     | github.com/deso-protocol/core/lib.(*UtxoView).ConnectBlock(0xc0004e2b60, 0xc0013aa480, 0xc0d0b74800, 0x43, 0x80, 0x0, 0x80, 0x0, 0x0, 0xc0ca468900, ...)
    backend     |   /deso/src/core/lib/block_view.go:9509 +0x213
    backend     | github.com/deso-protocol/core/lib.(*Blockchain).ProcessBlock(0xc000164f20, 0xc0013aa480, 0xc001443e00, 0x0, 0x0, 0x0)
    backend     |   /deso/src/core/lib/blockchain.go:1930 +0xd7b
    backend     | github.com/deso-protocol/core/lib.(*Server)._handleBlock(0xc0002d4600, 0xc0016c4fc0, 0xc0013aa480)
    backend     |   /deso/src/core/lib/server.go:1177 +0x3c6
    backend     | github.com/deso-protocol/core/lib.(*Server)._handlePeerMessages(0xc0002d4600, 0xc004572000)
    backend     |   /deso/src/core/lib/server.go:1480 +0x287
    backend     | github.com/deso-protocol/core/lib.(*Server).messageHandler(0xc0002d4600)
    backend     |   /deso/src/core/lib/server.go:1520 +0x1c5
    backend     | created by github.com/deso-protocol/core/lib.(*Server).Start
    backend     |   /deso/src/core/lib/server.go:1696 +0xbd
    backend exited with code 2
    

    Using stable version from 40 hours ago. Pulled the last stable version just now and issue still occurs. Backend restarting every x seconds Pulled the last latest version just now and issue still occurs. Backend restarting every x seconds

    Might be related with this issue somehow. Same result reported by @tijno

  • Incomplete transactions returned by /transaction-info and blocks 106179 and 106180  returned as corrupted by /v1/block API

    Incomplete transactions returned by /transaction-info and blocks 106179 and 106180 returned as corrupted by /v1/block API

    I just encountered the below transaction output - is it even possible a node processes/returns a transaction without data like transactor, or txn type?

    { "Error": "", "Transactions": [ { "TransactionIDBase58Check": "3JuEUX4qCPfGyTKnzVXwCJo21R4nCDaHtGakaNeYpqjYKectiqPs5z", "RawTransactionHex": "01ea9eb49e6749e77d93fabfb603f0e2ab5734d8ec2ab3f49cd15025dfdfccd0750001021161b9b84f8b25465b994e17da7cfc1e4396dafc74b232f0605a0b35680a85899711057420ea9eb49e6749e77d93fabfb603f0e2ab5734d8ec2ab3f49cd15025dfdfccd075208251371a91ef86155b1e20eeb194ded13e9f067437cc700313db208cec3b16fe237b22426f6479223a224e65772070726f64756374206166746572204368616e6765227de807d461b0a9ddeaeb8af6ea160121021161b9b84f8b25465b994e17da7cfc1e4396dafc74b232f0605a0b35680a8589041270726f647563744465736372697074696f6e04746573740b70726f647563744e616d650854657374203939390c70726f64756374507269636504323030300b70726f6475637454616773047465737446304402201b9542141a94b95f0643bd0c69defc90c6d42f8e3658ceda8fb22f8b67ae7e0a02207fbdfebd758cddb12c5e1301e873c74a4730965f95e5c74c6a36985639bf7487", "Inputs": [ { "TransactionIDBase58Check": "3JuEUX6mhtdwbKfhpjVM4kAZ34AFsNFnMhWD8KrbG3KCWrDTz4i34p", "Index": 0 }], "Outputs": [ { "PublicKeyBase58Check": "BC1YLfoXTvtJGBUnAGifCEstFyr8zAzw567EbBmfcTjGtJWJE8KfpSX", "AmountNanos": 2199 }], "SignatureHex": "304402201b9542141a94b95f0643bd0c69defc90c6d42f8e3658ceda8fb22f8b67ae7e0a02207fbdfebd758cddb12c5e1301e873c74a4730965f95e5c74c6a36985639bf7487", "TransactionType": "SUBMIT_POST", "TransactionMetadata": { "BlockHashHex": "", "TxnIndexInBlock": 0, "TxnType": "", "TransactorPublicKeyBase58Check": "", "AffectedPublicKeys": null, "TxnOutputs": null }, "ExtraData": { "productDescription": "test", "productName": "Test 999", "productPrice": "2000", "productTags": "test" } }], "LastTransactionIDBase58Check": "", "LastPublicKeyTransactionIndex": 0, "BalanceNanos": 0 }

  • After updating to new version node is not downloading blocks after block 25779

    After updating to new version node is not downloading blocks after block 25779

    Get error

    E0519 16:29:27.914707       1 Yfh0cFoF.go:1] AddBitCloutMessage: Not enqueueing message GET_HEADERS because peer is disconnecting
    E0519 16:29:32.966301       1 Yfh0cFoF.go:1] AddBitCloutMessage: Not enqueueing message GET_HEADERS because peer is disconnecting
    

    Tried to remove everything and relaunch. Anyway stuck same place and not load new blocks.

    Build from source of release 1.0.0

    backend run --data-dir=/data --txindex=1 --target-outbound-peers=16 --max-inbound-peers=64 --add-seeds=bitclout-seed-2.io,bitclout-seed-4.io
    

    How to debug this and find the reason? Ports are open, have outbound peers.

  • Change admin public key default behavior

    Change admin public key default behavior

    At the moment, if a node spins up without admin public keys, any user is able to access that nodes admin API. This has led to a security incident in the past and doesn't seem like the best default behavior.

    In this PR, I replace this behavior with a new flag, "force-ignore-admin-public-keys". This flag has to be explicitly set to true for nodes to behave in a way that allows public access to the admin API.

  • Not able to run testnode , issue with h2non/bimg vips package

    Not able to run testnode , issue with h2non/bimg vips package

    github.com/h2non/bimg

    /tmp/go-build459570334/b338/_x005.o: In function vips_reduce_bridge': ../../../go/pkg/mod/github.com/h2non/[email protected]/vips.h:132: undefined reference tovips_reduce' collect2: error: ld returned 1 exit status

    github.com/h2non/bimg

    In file included from ../../../go/pkg/mod/github.com/h2non/[email protected]/vips.go:5:0: ../../../go/pkg/mod/github.com/h2non/[email protected]/vips.h: In function ‘vips_reduce_bridge’: ../../../go/pkg/mod/github.com/h2non/[email protected]/vips.h:132:9: warning: implicit declaration of function ‘vips_reduce’ [-Wimplicit-function-declaration] return vips_reduce(in, out, xshrink, yshrink, NULL);

    Is this some comaptibility issue of libvips with go1.15.6? Please help

  • Failed Build

    Failed Build

    When I try building the image using docker build -t ubuntu-test:latest ., it says:

    Step 6/23 : COPY backend/go.mod backend/
    COPY failed: file not found in build context or excluded by .dockerignore: stat backend/go.mod: file does not exist
    

    See here and the run error here.

    Please offer advise on the correct build command, or an easy fix.

  • /api/v1/transaction-info error on node.deso.org ->

    /api/v1/transaction-info error on node.deso.org -> "Error": "APITransactionInfo: This function cannot be called without passing --txindex to the node on startup."

    Looks like a configuration error?

    Input/output below.

    https://node.deso.org/api/v1/transaction-info

    input: 2022-05-07 10:43:15.709 +02:00 [VRB] { "TransactionIDBase58Check": "", "PublicKeyBase58Check": "BC1YLhhyc93qkPusbYMXxfJaWGjEPrRgDvYAASha8WgyJtu77uYD8Rw", "Limit": 1000, "LastPublicKeyTransactionIndex": 0, "IsMempool": false, "IDsOnly": true } { }

    output: 2022-05-07 10:43:15.857 +02:00 [VRB] Response as json: { "Error": "APITransactionInfo: This function cannot be called without passing --txindex to the node on startup." } { }

  • Remove PII from 3rd party nodes with access to global state

    Remove PII from 3rd party nodes with access to global state

    Currently bitclout.com is sharing PII with DiamondApp without user consent.

    No doubt this was an oversight in getting DiamondApp launched.

    Can I suggest that email/phone/jumio data is excluded from requests from 3rd party nodes here:

    https://github.com/deso-protocol/backend/blob/5c64bbbeec9d9a22fc26ce4bcff380c6ece42848/routes/shared.go#L238

    See issue reported here: https://github.com/diamond-app/frontend/issues/20

  • Blacklist and graylist by username

    Blacklist and graylist by username

    Currently, nodes are only able to blacklist by profile. This means that if an account is using a deceptive username that should be blocked, once blacklisted it can simply switch the name to a new profile and continue on. This change creates a list of blocked usernames that will always be blocked, rather than tracking the profiles themselves.

  • New endpoint for enabling video download of Cloudfare videos

    New endpoint for enabling video download of Cloudfare videos

    Cloudflare does NOT allow uploaded videos to be downloaded (just streamed).

    This is enough for frontend apps (like Diamond or Desofy) but not for backend apps (like OneClout) which need to download the video to their servers before uploading it to a different platform (e.g. Twitter).

    Cloudflare includes an endpoint that enables an uploaded video to be downloaded.

    This PR adds a DeSo endpoint that calls said Cloudfare endpoint for a given video identifier.

    It's important to note that a Cloudflare download is billed in the same way as the streaming of the video, which means that DeSo nodes will NOT be charged extra if this endpoint is used.

    Note: I've created a new PR on the docs repo for the corresponding API documentation for when/if this PR is merged.

  • "get-posts-for-public-key" endpoint: Added "IncludeComments" flag to …

    …allow to also fetch comment posts.

    See: https://github.com/deso-protocol/dips/discussions/93#discussioncomment-4120746

    ⚠ Depends on twin PR (https://github.com/deso-protocol/core/pull/417) in core.

  • Backwards compatibility support for GetTransactionSpendingLimitResponseFromHex

    Backwards compatibility support for GetTransactionSpendingLimitResponseFromHex

    In order to support parsing of spending limit hexes from before the unlimited transaction spending limit migration, we need to be able to pass an optional query param to specify the block height at which we want to parse this spending limit hex.

collection of tools to gleam insights from a full bitclout node's data
collection of tools to gleam insights from a full bitclout node's data

bitcloutscripts collection of tools to gleam insights from a full bitclout node's data bitcloutscripts $ ./bcs bcs posts # print all posts

Jul 11, 2021
Dump BitClout chain data into MongoDB

mongodb-dumper mongodb-dumper runs a full BitClout node and dumps the chain data into a MongoDB database Build Running the following commands will cre

Nov 30, 2022
A full node Bitcoin (BSV) implementation written in Go

bsvd bsvd is a full node Bitcoin (BSV) implementation written in Go (golang). This project is a port of the bchd codebase to Bitcoin (BSV). It provide

Dec 25, 2022
CLI Tool to remove unwanted connections from your Chia Node based on Geo IP Location.

chia-bouncer Tiny CLI tool to remove unwanted connections from your Chia Node based on the Geo IP Location (Country). The Tool is written in golang an

Jun 25, 2021
Celer cBridge relay node implementation in Golang

cBridge Relay Node Official implementation of cBridge relay node in Golang. Prerequisites Prepare Machine To run a cBridge relay node, it is recommend

Sep 27, 2022
Go Implementation of the Spacemesh protocol full node. 💾⏰💪
Go Implementation of the Spacemesh protocol full node. 💾⏰💪

A Programmable Cryptocurrency go-spacemesh ?? ⏰ ?? Thanks for your interest in this open source project. This repo is the go implementation of the Spa

Dec 29, 2022
Ethereum 2.0 node multiplexer between consensus and execution

The Minority Client Run the minority client! ~Danny Ryan and/or Tim Beiko As of writing, Ethereum has multiple client implementations, but Geth / go-e

Dec 23, 2022
The go-to Bitcoin Node (BN) Go library.

go-bitcoin Go wrapper for bitcoin RPC RPC services Start by creating a connection to a bitcoin node b, err := New("rcp host", rpc port, "rpc usernam

Feb 13, 2022
A fully validating Bitcoin node with Utreexo support

btcd btcd is an alternative full node bitcoin implementation written in Go (golang). This project is currently under active development and is in a Be

Dec 21, 2022
An ATNA (Audit Trail and Node Authentication) Cloud Backup Utility
An ATNA (Audit Trail and Node Authentication) Cloud Backup Utility

ATNA Vault ATNA Vault allows you to maintain a secure long-term archive for all your IHE audit messages. IHE vendors who can provide "filter forward"

Mar 13, 2022
Btc-globe - Visualize Bitcoin node locations using golang
Btc-globe - Visualize Bitcoin node locations using golang

btc-globe Visualize Bitcoin nodes by location using Golang

Jan 19, 2022
Go-block-api - Golang implementation of Ethereum Block API

Go Ethereum Block API Golang implementation of Ethereum Block API This API can s

Jan 13, 2022
Simple Crypto API for Go

cryptogo Simple cryptography API in Go Hashes: hash.MD5Bytes, hash.MD5Base64, hash.MD5Hex calculates an MD5 chechsum of the input byte array as a byte

Nov 10, 2021
Merchant API reference implementation

mAPI More details available in the BRFC Spec for Merchant API. The old golang (v1.1) implementation is no longer being maintained and has been moved t

Dec 14, 2022
A command line Crypto-currency ticker made using golang and WazirX Api
A command line Crypto-currency ticker made using golang and WazirX Api

░█████╗░██████╗░██╗░░░██╗██████╗░████████╗███████╗██╗░░██╗ ██╔══██╗██╔══██╗╚██╗░██╔╝██╔══██╗╚══██╔══╝██╔════╝╚██╗██╔╝ ██║░░╚═╝██████╔╝░╚████╔╝░██████╔

Feb 6, 2022
Pure Go implementation of the NaCL set of API's

go-nacl This is a pure Go implementation of the API's available in NaCL: https://nacl.cr.yp.to. Compared with the implementation in golang.org/x/crypt

Dec 16, 2022
Ethereum Dapp Go API

Web3 Go Ethereum Dapp Go API, inspired by web3.js. Report Bug · Pull Request Introduction This is the Ethereum Golang API which connects to the Generi

Nov 29, 2022
A Golang cryptocurrency trading API & Library. Support Binance, BitMEX, Deribit, Bybit, Huobi DM, OKEX Futures and more.
A Golang cryptocurrency trading API & Library. Support Binance, BitMEX, Deribit, Bybit, Huobi DM, OKEX Futures and more.

CREX 中文 | English CREX 是一个用Golang语言开发的量化交易库。支持tick级别数字币期货平台的回测和实盘。实盘与回测无缝切换,无需更改代码。 回测 示例 @backtest 交易结果 开源策略 https://github.com/coinrust/trading-stra

Nov 18, 2022