Documentation ¶
Index ¶
- Constants
- func APIAddError(ww http.ResponseWriter, errorString string)
- func AddHeaders(inner http.Handler, allowedOrigins []string) http.Handler
- func CalcMedian(numbers []float64) float64
- func GetBalanceForPublicKeyUsingUtxoView(publicKeyBytes []byte, utxoView *lib.UtxoView) (_balance uint64, _err error)
- func GetFilterLogsKey(username string, filterType FilterType) (_filterLogsKey []byte, _err error)
- func GetPostHashFromPostHashHex(postHashHex string) (*lib.BlockHash, error)
- func GetUSDToBTCPrice() (float64, error)
- func GlobalStateKeyForBlacklistAuditLogs(username string) []byte
- func GlobalStateKeyForBlacklistedProfile(profilePubKey []byte) []byte
- func GlobalStateKeyForBuyBitCloutFeeBasisPoints() []byte
- func GlobalStateKeyForCountryIDDocumentTypeSubTypeDocumentNumber(countryID string, documentType string, subType string, documentNumber string) []byte
- func GlobalStateKeyForGraylistAuditLogs(username string) []byte
- func GlobalStateKeyForGraylistedProfile(profilePubKey []byte) []byte
- func GlobalStateKeyForJumioBitCloutNanos() []byte
- func GlobalStateKeyForNFTDropEntry(dropNumber uint64) []byte
- func GlobalStateKeyForPKIDTstampnanosToJumioTransaction(pkid *lib.PKID, timestampNanos uint64) []byte
- func GlobalStateKeyForPhoneNumberStringToPhoneNumberMetadata(phoneNumber string) (_key []byte, _err error)
- func GlobalStateKeyForPublicKeyToUserMetadata(profilePubKey []byte) []byte
- func GlobalStateKeyForTstampPinnedPostHash(tstampNanos uint64, postHash *lib.BlockHash) []byte
- func GlobalStateKeyForTstampPostHash(tstampNanos uint64, postHash *lib.BlockHash) []byte
- func GlobalStateKeyForUSDCentsToBitCloutReserveExchangeRate() []byte
- func GlobalStateKeyForUserPkContactPkToMostRecentReadTstampNanos(userPubKey []byte, contactPubKey []byte) []byte
- func GlobalStateKeyForUserPublicKeyTstampNanosToWyreOrderMetadata(userPublicKeyBytes []byte, timestampNanos uint64) []byte
- func GlobalStateKeyForUsernameVerificationAuditLogs(username string) []byte
- func GlobalStateKeyForWhitelistAuditLogs(username string) []byte
- func GlobalStateKeyForWyreOrderID(orderIdBytes []byte) []byte
- func GlobalStateKeyForWyreOrderIDProcessed(orderIdBytes []byte) []byte
- func GlobalStatePrefixforPKIDTstampnanosToJumioTransaction(pkid *lib.PKID) []byte
- func Logger(inner http.Handler, name string) http.Handler
- func ReprocessBitcoinBlockUsingAPI(blockHeightOrHash string, bitcoinManager *lib.BitcoinManager, ...) error
- func TxnIsAssociatedWithPublicKey(txnMeta *lib.TransactionMetadata, publicKeyBase58Check string) bool
- func TxnMetaIsNotification(txnMeta *lib.TransactionMetadata, publicKeyBase58Check string, ...) bool
- type APIBalanceRequest
- type APIBalanceResponse
- type APIBaseResponse
- type APIBlockRequest
- type APIBlockResponse
- type APIKeyPairRequest
- type APIKeyPairResponse
- type APINodeInfoRequest
- type APINodeInfoResponse
- type APIServer
- func (fes *APIServer) APIBalance(ww http.ResponseWriter, rr *http.Request)
- func (fes *APIServer) APIBase(ww http.ResponseWriter, rr *http.Request)
- func (fes *APIServer) APIBlock(ww http.ResponseWriter, rr *http.Request)
- func (fes *APIServer) APIKeyPair(ww http.ResponseWriter, rr *http.Request)
- func (fes *APIServer) APINodeInfo(ww http.ResponseWriter, rr *http.Request)
- func (fes *APIServer) APIRoutes() []Route
- func (fes *APIServer) APITransactionInfo(ww http.ResponseWriter, rr *http.Request)
- func (fes *APIServer) APITransferBitClout(ww http.ResponseWriter, rr *http.Request)
- func (fes *APIServer) AcceptNFTBid(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AdminGetAllUserGlobalMetadata(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AdminGetMempoolStats(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AdminGetNFTDrop(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AdminGetUserAdminData(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AdminGetUserGlobalMetadata(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AdminGetUsernameVerificationAuditLogs(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AdminGetVerifiedUsers(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AdminGrantVerificationBadge(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AdminPinPost(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AdminRemoveNilPosts(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AdminRemoveVerificationBadge(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AdminResetJumioForPublicKey(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AdminUpdateGlobalFeed(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AdminUpdateJumioBitClout(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AdminUpdateNFTDrop(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AdminUpdateUserGlobalMetadata(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) BlockPublicKey(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) BuyOrSellCreatorCoin(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) CheckAdminPublicKey(inner http.Handler, AccessLevel AccessLevel) http.Handler
- func (fes *APIServer) CompProfileCreation(profilePublicKey []byte, userMetadata *UserMetadata, utxoView *lib.UtxoView) (_additionalFee uint64, _err error)
- func (fes *APIServer) CreateFollowTxnStateless(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) CreateGlobalStateBatchGetRequest(keyList [][]byte) (_url string, _json_data []byte, _err error)
- func (fes *APIServer) CreateGlobalStateDeleteRequest(key []byte) (_url string, _json_data []byte, _err error)
- func (fes *APIServer) CreateGlobalStateGetRequest(key []byte) (_url string, _json_data []byte, _err error)
- func (fes *APIServer) CreateGlobalStatePutRequest(key []byte, value []byte) (_url string, _json_data []byte, _err error)
- func (fes *APIServer) CreateGlobalStateSeekRequest(startPrefix []byte, validForPrefix []byte, maxKeyLen int, numToFetch int, ...) (_url string, _json_data []byte, _err error)
- func (fes *APIServer) CreateLikeStateless(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) CreateNFT(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) CreateNFTBid(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) DeleteIdentities(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) EvictUnminedBitcoinTxns(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) ExceedsBitCloutBalance(nanosPurchased uint64, seed string) (bool, error)
- func (fes *APIServer) ExchangeBitcoinStateless(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) FilterOutRestrictedPubKeysFromList(profilePubKeys [][]byte, readerPK []byte, moderationType string) (_filteredPubKeys [][]byte, _err error)
- func (fes *APIServer) FilterOutRestrictedPubKeysFromMap(profilePubKeyMap map[lib.PkMapKey][]byte, readerPK []byte, ...) (_filteredPubKeyMap map[lib.PkMapKey][]byte, _err error)
- func (fes *APIServer) GetAllPostEntries(readerPK []byte) (_postEntries []*lib.PostEntry, ...)
- func (fes *APIServer) GetAppState(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetBTCAddress() string
- func (fes *APIServer) GetBalanceForPublicKey(publicKeyBytes []byte) (_balanceNanos uint64, _err error)
- func (fes *APIServer) GetBlockTemplate(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetBlockedPubKeysForUser(userPubKey []byte) (_blockedPubKeyMap map[string]struct{}, _err error)
- func (fes *APIServer) GetBuyBitCloutFeeBasisPoints(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetBuyBitCloutFeeBasisPointsResponseFromGlobalState() (uint64, error)
- func (fes *APIServer) GetDiamondedPosts(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetDiamondsForPost(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetDiamondsForPublicKey(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetExchangeBitCloutPrice() uint64
- func (fes *APIServer) GetExchangeRate(ww http.ResponseWriter, rr *http.Request)
- func (fes *APIServer) GetFilterAuditLogs(username string, filterType FilterType) (_logs []FilterAuditLog, _err error)
- func (fes *APIServer) GetFollowsStateless(ww http.ResponseWriter, rr *http.Request)
- func (fes *APIServer) GetFullTikTokURL(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetFullWalletOrderDetails(client *http.Client, orderId string) (_wyreWalletOrderFullDetails *WyreWalletOrderFullDetails, _err error)
- func (fes *APIServer) GetGCSClient(ctx context.Context) (*storage.Client, error)
- func (fes *APIServer) GetGlobalParams(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetHodlYouMap(pkid *lib.PKIDEntry, fetchProfiles bool, utxoView *lib.UtxoView) (_youHodlMap map[string]*BalanceEntryResponse, _err error)
- func (fes *APIServer) GetHodlersForPublicKey(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetHodlingsForPublicKey(pkid *lib.PKIDEntry, fetchProfiles bool, referenceUtxoView *lib.UtxoView) (_youHodlMap map[string]*BalanceEntryResponse, ...)
- func (fes *APIServer) GetJumioBitCloutNanos() uint64
- func (fes *APIServer) GetJumioStatusForPublicKey(ww http.ResponseWriter, rr *http.Request)
- func (fes *APIServer) GetLatestNFTDropEntry() (_dropEntry *NFTDropEntry, _err error)
- func (fes *APIServer) GetLikesForPost(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetMessagesStateless(ww http.ResponseWriter, rr *http.Request)
- func (fes *APIServer) GetNFTBidsForNFTPost(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetNFTBidsForUser(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetNFTCollectionSummary(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetNFTDropEntry(nftDropNumber uint64) (_dropEntry *NFTDropEntry, _err error)
- func (fes *APIServer) GetNFTEntriesForPostHash(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetNFTShowcase(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetNFTsForUser(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetNanosFromSats(satoshis uint64, feeBasisPoints uint64) (uint64, error)
- func (fes *APIServer) GetNanosFromUSDCents(usdCents float64, feeBasisPoints uint64) (uint64, error)
- func (fes *APIServer) GetNextNFTShowcase(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetNotifications(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetPostEntriesByCloutAfterTimePaginated(readerPK []byte, minutesLookback uint64, numToFetch int) (_postEntries []*lib.PostEntry, ...)
- func (fes *APIServer) GetPostEntriesByTimePaginated(startPostHash *lib.BlockHash, readerPK []byte, numToFetch int, ...) (_postEntries []*lib.PostEntry, ...)
- func (fes *APIServer) GetPostEntriesForFollowFeed(startAfterPostHash *lib.BlockHash, readerPK []byte, numToFetch int, ...) (_postEntries []*lib.PostEntry, ...)
- func (fes *APIServer) GetPostEntriesForGlobalWhitelist(startPostHash *lib.BlockHash, readerPK []byte, numToFetch int, ...) (_postEntries []*lib.PostEntry, ...)
- func (fes *APIServer) GetPostsByTime(bav *lib.UtxoView, startPostHash *lib.BlockHash, readerPK []byte, ...) (_corePosts []*lib.PostEntry, ...)
- func (fes *APIServer) GetPostsForFollowFeedForPublicKey(bav *lib.UtxoView, startAfterPostHash *lib.BlockHash, publicKey []byte, ...) (_postEntries []*lib.PostEntry, _err error)
- func (fes *APIServer) GetPostsForNFTDropEntry(dropEntryToReturn *NFTDropEntry) (_posts []*PostEntryResponse, _err error)
- func (fes *APIServer) GetPostsForPublicKey(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetPostsStateless(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetProfiles(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetProfilesByCoinValue(bav *lib.UtxoView, readerPK []byte, startProfilePubKey []byte, numToFetch int, ...) (_profiles map[lib.PkMapKey]*lib.ProfileEntry, ...)
- func (fes *APIServer) GetProfilesByUsernamePrefixAndBitCloutLocked(db *badger.DB, usernamePrefix string, readerPK []byte, utxoView *lib.UtxoView) (_profileEntries []*lib.ProfileEntry, _err error)
- func (fes *APIServer) GetQuoteRecloutsForPost(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetRecloutsForPost(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetSinglePost(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetSingleProfile(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetSingleProfilePicture(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetTransferDetails(client *http.Client, transferId string) (_wyreTransferDetails *WyreTransferDetails, _err error)
- func (fes *APIServer) GetTxn(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetUSDCentsToBitCloutReserveExchangeRate(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetUSDCentsToBitCloutReserveExchangeRateFromGlobalState() (uint64, error)
- func (fes *APIServer) GetUserGlobalMetadata(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetUsersStateless(ww http.ResponseWriter, rr *http.Request)
- func (fes *APIServer) GetVerifiedUsernameToPKIDMap() (_verificationMap map[string]*lib.PKID, _err error)
- func (fes *APIServer) GetWyreWalletOrderMetadataFromGlobalState(publicKey string, timestamp uint64) (*WyreWalletOrderMetadata, error)
- func (fes *APIServer) GetWyreWalletOrderQuotation(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetWyreWalletOrderReservation(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetWyreWalletOrdersForPublicKey(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetYouHodlMap(pkid *lib.PKIDEntry, fetchProfiles bool, utxoView *lib.UtxoView) (_youHodlMap map[string]*BalanceEntryResponse, _err error)
- func (fes *APIServer) GlobalStateBatchGet(keyList [][]byte) (value [][]byte, _err error)
- func (fes *APIServer) GlobalStateBatchGetRemote(ww http.ResponseWriter, rr *http.Request)
- func (fes *APIServer) GlobalStateDelete(key []byte) error
- func (fes *APIServer) GlobalStateDeleteRemote(ww http.ResponseWriter, rr *http.Request)
- func (fes *APIServer) GlobalStateGet(key []byte) (value []byte, _err error)
- func (fes *APIServer) GlobalStateGetRemote(ww http.ResponseWriter, rr *http.Request)
- func (fes *APIServer) GlobalStatePut(key []byte, value []byte) error
- func (fes *APIServer) GlobalStatePutRemote(ww http.ResponseWriter, rr *http.Request)
- func (fes *APIServer) GlobalStateRoutes() []Route
- func (fes *APIServer) GlobalStateSeek(startPrefix []byte, validForPrefix []byte, maxKeyLen int, numToFetch int, ...) (_keysFound [][]byte, _valsFound [][]byte, _err error)
- func (fes *APIServer) GlobalStateSeekRemote(ww http.ResponseWriter, rr *http.Request)
- func (fes *APIServer) HealthCheck(ww http.ResponseWriter, rr *http.Request)
- func (fes *APIServer) Index(w http.ResponseWriter, r *http.Request)
- func (fes *APIServer) IsConfiguredForJumio() bool
- func (fes *APIServer) IsConfiguredForSendgrid() bool
- func (fes *APIServer) IsConfiguredForWyre() bool
- func (fes *APIServer) IsFollowingPublicKey(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) IsHodlingPublicKey(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) JumioBegin(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) JumioCallback(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) JumioFlowFinished(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) MakeWyreGetRequest(client *http.Client, url string) (_bodyBytes []byte, _err error)
- func (fes *APIServer) MakeWyrePostRequest(payload []byte, url string, ww http.ResponseWriter)
- func (fes *APIServer) MarkAllMessagesRead(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) MarkContactMessagesRead(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) NewRouter() *muxtrace.Router
- func (fes *APIServer) NodeControl(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) ReprocessBitcoinBlock(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) ResendVerifyEmail(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) SendBitClout(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) SendDiamonds(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) SendMessageStateless(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) SendPhoneNumberVerificationText(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) SendSeedBitClout(recipientPkBytes []byte, amountNanos uint64, useBuyBitCloutSeed bool) (txnHash *lib.BlockHash, _err error)
- func (fes *APIServer) SetBuyBitCloutFeeBasisPoints(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) SetUSDCentsToBitCloutReserveExchangeRate(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) SetWyreRequestHeaders(req *http.Request, dataBytes []byte) *http.Request
- func (fes *APIServer) Start()
- func (fes *APIServer) StartExchangePriceMonitoring()
- func (fes *APIServer) StartSeedBalancesMonitoring()
- func (fes *APIServer) Stop()
- func (fes *APIServer) SubmitBlock(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) SubmitPhoneNumberVerificationCode(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) SubmitPost(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) SubmitTransaction(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) SwapIdentity(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) TrackWalletOrder(client *http.Client, transferId string) (_wyreTrackOrderResponse *WyreTrackOrderResponse, _err error)
- func (fes *APIServer) TransferCreatorCoin(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) UpdateFilterAuditLogs(usernameToUpdate string, pkidEntryToUpdate *lib.PKIDEntry, ...) (_err error)
- func (fes *APIServer) UpdateGlobalParams(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) UpdateNFT(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) UpdateProfile(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) UpdateUSDCentsToBitCloutExchangeRate()
- func (fes *APIServer) UpdateUserGlobalMetadata(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) UpdateUsernameVerificationAuditLog(usernameToVerify string, pkidEntryToVerify *lib.PKIDEntry, isRemoval bool, ...) (_err error)
- func (fes *APIServer) UpdateWyreGlobalState(ww http.ResponseWriter, publicKeyBytes []byte, timestampNanos uint64, ...)
- func (fes *APIServer) UploadImage(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) ValidateJWT(publicKey string, jwtToken string) (bool, error)
- func (fes *APIServer) VerifyEmail(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) WyreWalletOrderSubscription(ww http.ResponseWriter, req *http.Request)
- type APITransactionInfoRequest
- type APITransactionInfoResponse
- type APITransferBitCloutRequest
- type APITransferBitCloutResponse
- type AcceptNFTBidRequest
- type AcceptNFTBidResponse
- type AccessLevel
- type AdminGetAllUserGlobalMetadataRequest
- type AdminGetAllUserGlobalMetadataResponse
- type AdminGetMempoolStatsRequest
- type AdminGetMempoolStatsResponse
- type AdminGetNFTDropRequest
- type AdminGetNFTDropResponse
- type AdminGetUserAdminDataRequest
- type AdminGetUserAdminDataResponse
- type AdminGetUserGlobalMetadataRequest
- type AdminGetUserGlobalMetadataResponse
- type AdminGetUsernameVerificationAuditLogsRequest
- type AdminGetUsernameVerificationAuditLogsResponse
- type AdminGetVerifiedUsersRequest
- type AdminGetVerifiedUsersResponse
- type AdminGrantVerificationBadgeRequest
- type AdminGrantVerificationBadgeResponse
- type AdminPinPostRequest
- type AdminPinPostResponse
- type AdminRemoveNilPostsRequest
- type AdminRemoveNilPostsResponse
- type AdminRemoveVerificationBadgeRequest
- type AdminRemoveVerificationBadgeResponse
- type AdminRequest
- type AdminResetJumioRequest
- type AdminUpdateGlobalFeedRequest
- type AdminUpdateGlobalFeedResponse
- type AdminUpdateJumioBitCloutRequest
- type AdminUpdateJumioBitCloutResponse
- type AdminUpdateNFTDropRequest
- type AdminUpdateNFTDropResponse
- type AdminUpdateUserGlobalMetadataRequest
- type AdminUpdateUserGlobalMetadataResponse
- type AmplitudeEvent
- type AmplitudeUploadRequestBody
- type BalanceEntryResponse
- type BitcoinExchangeResponseInfo
- type BlockPublicKeyRequest
- type BlockPublicKeyResponse
- type BlockchainBitCloutTickerResponse
- type BlockchainDotcomResponse
- type BuyOrSellCreatorCoinRequest
- type BuyOrSellCreatorCoinResponse
- type CoinbaseResponse
- type CoingeckoResponse
- type CreateFollowTxnStatelessRequest
- type CreateFollowTxnStatelessResponse
- type CreateLikeStatelessRequest
- type CreateLikeStatelessResponse
- type CreateNFTBidRequest
- type CreateNFTBidResponse
- type CreateNFTRequest
- type CreateNFTResponse
- type DeleteIdentityRequest
- type DeleteIdentityResponse
- type DiamondSenderResponse
- type DiamondSenderSummaryResponse
- type EvictUnminedBitcoinTxnsRequest
- type EvictUnminedBitcoinTxnsResponse
- type ExchangeBitcoinRequest
- type ExchangeBitcoinResponse
- type FilterAuditLog
- type FilterType
- type GeminiResponse
- type GetAppStateRequest
- type GetAppStateResponse
- type GetBlockTemplateRequest
- type GetBlockTemplateResponse
- type GetBuyBitCloutFeeBasisPointsResponse
- type GetDiamondsForPostRequest
- type GetDiamondsForPostResponse
- type GetDiamondsForPublicKeyRequest
- type GetDiamondsForPublicKeyResponse
- type GetExchangeRateResponse
- type GetFollowsResponse
- type GetFollowsStatelessRequest
- type GetFullTikTokURLRequest
- type GetFullTikTokURLResponse
- type GetGlobalParamsRequest
- type GetGlobalParamsResponse
- type GetHodlersForPublicKeyRequest
- type GetHodlersForPublicKeyResponse
- type GetJumioStatusForPublicKeyRequest
- type GetJumioStatusForPublicKeyResponse
- type GetLikesForPostRequest
- type GetLikesForPostResponse
- type GetMessagesResponse
- type GetMessagesStatelessRequest
- type GetNFTBidsForNFTPostRequest
- type GetNFTBidsForNFTPostResponse
- type GetNFTBidsForUserRequest
- type GetNFTBidsForUserResponse
- type GetNFTCollectionSummaryRequest
- type GetNFTCollectionSummaryResponse
- type GetNFTEntriesForPostHashRequest
- type GetNFTEntriesForPostHashResponse
- type GetNFTShowcaseRequest
- type GetNFTShowcaseResponse
- type GetNFTsForUserRequest
- type GetNFTsForUserResponse
- type GetNextNFTShowcaseRequest
- type GetNextNFTShowcaseResponse
- type GetNotificationsRequest
- type GetNotificationsResponse
- type GetPostsDiamondedBySenderForReceiverRequest
- type GetPostsDiamondedBySenderForReceiverResponse
- type GetPostsForPublicKeyRequest
- type GetPostsForPublicKeyResponse
- type GetPostsStatelessRequest
- type GetPostsStatelessResponse
- type GetProfilesRequest
- type GetProfilesResponse
- type GetQuoteRecloutsForPostRequest
- type GetQuoteRecloutsForPostResponse
- type GetRecloutsForPostRequest
- type GetRecloutsForPostResponse
- type GetSinglePostRequest
- type GetSinglePostResponse
- type GetSingleProfileRequest
- type GetSingleProfileResponse
- type GetTxnRequest
- type GetTxnResponse
- type GetUSDCentsToBitCloutExchangeRateResponse
- type GetUserGlobalMetadataRequest
- type GetUserGlobalMetadataResponse
- type GetUsersResponse
- type GetUsersStatelessRequest
- type GetWyreWalletOrderForPublicKeyRequest
- type GetWyreWalletOrderForPublicKeyResponse
- type GlobalStateBatchGetRemoteRequest
- type GlobalStateBatchGetRemoteResponse
- type GlobalStateDeleteRemoteRequest
- type GlobalStateDeleteRemoteResponse
- type GlobalStateGetRemoteRequest
- type GlobalStateGetRemoteResponse
- type GlobalStatePutRemoteRequest
- type GlobalStatePutRemoteResponse
- type GlobalStateSeekRemoteRequest
- type GlobalStateSeekRemoteResponse
- type HeaderResponse
- type InputResponse
- type IsFolllowingPublicKeyResponse
- type IsFollowingPublicKeyRequest
- type IsHodlingPublicKeyRequest
- type IsHodlingPublicKeyResponse
- type JumioBeginRequest
- type JumioBeginResponse
- type JumioFlowFinishedRequest
- type JumioIdentityVerification
- type JumioInitRequest
- type JumioInitResponse
- type KrakenResponse
- type LastTradePriceHistoryItem
- type MarkAllMessagesReadRequest
- type MarkContactMessagesReadRequest
- type MessageContactResponse
- type MessageEntryResponse
- type NFTBidEntryResponse
- type NFTCollectionResponse
- type NFTDropEntry
- type NFTEntryAndPostEntryResponse
- type NFTEntryResponse
- type NodeControlRequest
- type NodeControlResponse
- type NodeStatusResponse
- type OutputResponse
- type PeerResponse
- type PhoneNumberMetadata
- type PostEntryResponse
- type ProfileEntryResponse
- type ReprocessBitcoinBlockResponse
- type ResendVerifyEmailRequest
- type Route
- type SendBitCloutRequest
- type SendBitCloutResponse
- type SendDiamondsRequest
- type SendDiamondsResponse
- type SendMessageStatelessRequest
- type SendMessageStatelessResponse
- type SendPhoneNumberVerificationTextRequest
- type SendPhoneNumberVerificationTextResponse
- type SetBuyBitCloutFeeBasisPointsRequest
- type SetBuyBitCloutFeeBasisPointsResponse
- type SetUSDCentsToBitCloutExchangeRateRequest
- type SetUSDCentsToBitCloutExchangeRateResponse
- type SingleStakeResponse
- type StakeEntryResponse
- type SubmitBlockRequest
- type SubmitBlockResponse
- type SubmitPhoneNumberVerificationCodeRequest
- type SubmitPhoneNumberVerificationCodeResponse
- type SubmitPostRequest
- type SubmitPostResponse
- type SubmitTransactionRequest
- type SubmitTransactionResponse
- type SwapIdentityRequest
- type SwapIdentityResponse
- type TransactionInfo
- type TransactionInfoResponse
- type TransactionMetadataResponse
- type TransactionResponse
- type TransferCreatorCoinRequest
- type TransferCreatorCoinResponse
- type UTXOEntryResponse
- type UpdateGlobalParamsRequest
- type UpdateGlobalParamsResponse
- type UpdateNFTRequest
- type UpdateNFTResponse
- type UpdateProfileRequest
- type UpdateProfileResponse
- type UpdateUserGlobalMetadataRequest
- type UpdateUserGlobalMetadataResponse
- type UploadImageResponse
- type User
- type UserMetadata
- type VerificationUsernameAuditLog
- type VerificationUsernameAuditLogResponse
- type VerifiedUsernameToPKID
- type VerifyEmailRequest
- type WalletOrderQuotationRequest
- type WalletOrderReservationRequest
- type WyreTrackOrderResponse
- type WyreTransferDetails
- type WyreWalletOrderFullDetails
- type WyreWalletOrderMetadata
- type WyreWalletOrderMetadataResponse
- type WyreWalletOrderQuotationPayload
- type WyreWalletOrderReservationPayload
- type WyreWalletOrderWebhookPayload
Constants ¶
const ( // RoutePathAPIBase ... RoutePathAPIBase = "/api/v1" // RoutePathAPIKeyPair ... RoutePathAPIKeyPair = "/api/v1/key-pair" // RoutePathAPIBalance ... RoutePathAPIBalance = "/api/v1/balance" // RoutePathAPITransferBitClout ... RoutePathAPITransferBitClout = "/api/v1/transfer-bitclout" // RoutePathAPITransactionInfo ... RoutePathAPITransactionInfo = "/api/v1/transaction-info" // RoutePathAPINodeInfo ... RoutePathAPINodeInfo = "/api/v1/node-info" // RoutePathAPIBlock ... RoutePathAPIBlock = "/api/v1/block" )
const ( RoutePathGlobalStatePutRemote = "/api/v1/global-state/put" RoutePathGlobalStateGetRemote = "/api/v1/global-state/get" RoutePathGlobalStateBatchGetRemote = "/api/v1/global-state/batch-get" RoutePathGlobalStateDeleteRemote = "/api/v1/global-state/delete" RoutePathGlobalStateSeekRemote = "/api/v1/global-state/seek" )
const ( // MaxRequestBodySizeBytes is the maximum size of a request body we will // generally be willing to process. MaxRequestBodySizeBytes = 10 * 1e6 // 10M SeedInfoCookieKey = "seed_info_cookie_key" TwilioVoipCarrierType = "voip" TwilioCheckPhoneNumberApproved = "approved" SafeForLoggingKey = `safeForLogging` SafeForLoggingValue = "true" )
const ( // base.go RoutePathHealthCheck = "/api/v0/health-check" RoutePathGetExchangeRate = "/api/v0/get-exchange-rate" RoutePathGetAppState = "/api/v0/get-app-state" // transaction.go RoutePathGetTxn = "/api/v0/get-txn" RoutePathSubmitTransaction = "/api/v0/submit-transaction" RoutePathUpdateProfile = "/api/v0/update-profile" RoutePathExchangeBitcoin = "/api/v0/exchange-bitcoin" RoutePathSendBitClout = "/api/v0/send-bitclout" RoutePathSubmitPost = "/api/v0/submit-post" RoutePathCreateFollowTxnStateless = "/api/v0/create-follow-txn-stateless" RoutePathCreateLikeStateless = "/api/v0/create-like-stateless" RoutePathBuyOrSellCreatorCoin = "/api/v0/buy-or-sell-creator-coin" RoutePathTransferCreatorCoin = "/api/v0/transfer-creator-coin" RoutePathSendDiamonds = "/api/v0/send-diamonds" // user.go RoutePathGetUsersStateless = "/api/v0/get-users-stateless" RoutePathDeleteIdentities = "/api/v0/delete-identities" RoutePathGetProfiles = "/api/v0/get-profiles" RoutePathGetSingleProfile = "/api/v0/get-single-profile" RoutePathGetSingleProfilePicture = "/api/v0/get-single-profile-picture" RoutePathGetHodlersForPublicKey = "/api/v0/get-hodlers-for-public-key" RoutePathGetDiamondsForPublicKey = "/api/v0/get-diamonds-for-public-key" RoutePathGetFollowsStateless = "/api/v0/get-follows-stateless" RoutePathGetUserGlobalMetadata = "/api/v0/get-user-global-metadata" RoutePathUpdateUserGlobalMetadata = "/api/v0/update-user-global-metadata" RoutePathGetNotifications = "/api/v0/get-notifications" RoutePathBlockPublicKey = "/api/v0/block-public-key" RoutePathIsFollowingPublicKey = "/api/v0/is-following-public-key" RoutePathIsHodlingPublicKey = "/api/v0/is-hodling-public-key" // post.go RoutePathGetPostsStateless = "/api/v0/get-posts-stateless" RoutePathGetSinglePost = "/api/v0/get-single-post" RoutePathGetLikesForPost = "/api/v0/get-likes-for-post" RoutePathGetDiamondsForPost = "/api/v0/get-diamonds-for-post" RoutePathGetRecloutsForPost = "/api/v0/get-reclouts-for-post" RoutePathGetQuoteRecloutsForPost = "/api/v0/get-quote-reclouts-for-post" RoutePathGetPostsForPublicKey = "/api/v0/get-posts-for-public-key" RoutePathGetDiamondedPosts = "/api/v0/get-diamonded-posts" // nft.go RoutePathCreateNFT = "/api/v0/create-nft" RoutePathUpdateNFT = "/api/v0/update-nft" RoutePathGetNFTsForUser = "/api/v0/get-nfts-for-user" RoutePathGetNFTBidsForUser = "/api/v0/get-nft-bids-for-user" RoutePathCreateNFTBid = "/api/v0/create-nft-bid" RoutePathAcceptNFTBid = "/api/v0/accept-nft-bid" RoutePathGetNFTBidsForNFTPost = "/api/v0/get-nft-bids-for-nft-post" RoutePathGetNFTShowcase = "/api/v0/get-nft-showcase" RoutePathGetNextNFTShowcase = "/api/v0/get-next-nft-showcase" RoutePathGetNFTCollectionSummary = "/api/v0/get-nft-collection-summary" RoutePathGetNFTEntriesForPostHash = "/api/v0/get-nft-entries-for-nft-post" // media.go RoutePathUploadImage = "/api/v0/upload-image" RoutePathGetFullTikTokURL = "/api/v0/get-full-tiktok-url" // message.go RoutePathSendMessageStateless = "/api/v0/send-message-stateless" RoutePathGetMessagesStateless = "/api/v0/get-messages-stateless" RoutePathMarkContactMessagesRead = "/api/v0/mark-contact-messages-read" RoutePathMarkAllMessagesRead = "/api/v0/mark-all-messages-read" // verify.go RoutePathSendPhoneNumberVerificationText = "/api/v0/send-phone-number-verification-text" RoutePathSubmitPhoneNumberVerificationCode = "/api/v0/submit-phone-number-verification-code" RoutePathResendVerifyEmail = "/api/v0/resend-verify-email" RoutePathVerifyEmail = "/api/v0/verify-email" RoutePathJumioBegin = "/api/v0/jumio-begin" RoutePathJumioCallback = "/api/v0/jumio-callback" RoutePathJumioFlowFinished = "/api/v0/jumio-flow-finished" RoutePathGetJumioStatusForPublicKey = "/api/v0/get-jumio-status-for-public-key" // wyre.go RoutePathGetWyreWalletOrderQuotation = "/api/v0/get-wyre-wallet-order-quotation" RoutePathGetWyreWalletOrderReservation = "/api/v0/get-wyre-wallet-order-reservation" RoutePathWyreWalletOrderSubscription = "/api/v0/wyre-wallet-order-subscription" RoutePathGetWyreWalletOrdersForPublicKey = "/api/v0/admin/get-wyre-wallet-orders-for-public-key" // miner.go RoutePathGetBlockTemplate = "/api/v0/get-block-template" RoutePathSubmitBlock = "/api/v0/submit-block" // admin_node.go RoutePathNodeControl = "/api/v0/admin/node-control" RoutePathReprocessBitcoinBlock = "/api/v0/admin/reprocess-bitcoin-block" RoutePathAdminGetMempoolStats = "/api/v0/admin/get-mempool-stats" RoutePathEvictUnminedBitcoinTxns = "/api/v0/admin/evict-unmined-bitcoin-txns" // admin_buy_bitclout.go RoutePathSetUSDCentsToBitCloutReserveExchangeRate = "/api/v0/admin/set-usd-cents-to-bitclout-reserve-exchange-rate" RoutePathGetUSDCentsToBitCloutReserveExchangeRate = "/api/v0/admin/get-usd-cents-to-bitclout-reserve-exchange-rate" RoutePathSetBuyBitCloutFeeBasisPoints = "/api/v0/admin/set-buy-bitclout-fee-basis-points" RoutePathGetBuyBitCloutFeeBasisPoints = "/api/v0/admin/get-buy-bitclout-fee-basis-points" // admin_transaction.go RoutePathGetGlobalParams = "/api/v0/get-global-params" // Eventually we will deprecate the admin endpoint since it does not need to be protected. RoutePathAdminGetGlobalParams = "/api/v0/admin/get-global-params" RoutePathUpdateGlobalParams = "/api/v0/admin/update-global-params" RoutePathSwapIdentity = "/api/v0/admin/swap-identity" // admin_user.go RoutePathAdminUpdateUserGlobalMetadata = "/api/v0/admin/update-user-global-metadata" RoutePathAdminGetAllUserGlobalMetadata = "/api/v0/admin/get-all-user-global-metadata" RoutePathAdminGetUserGlobalMetadata = "/api/v0/admin/get-user-global-metadata" RoutePathAdminGrantVerificationBadge = "/api/v0/admin/grant-verification-badge" RoutePathAdminRemoveVerificationBadge = "/api/v0/admin/remove-verification-badge" RoutePathAdminGetVerifiedUsers = "/api/v0/admin/get-verified-users" RoutePathAdminGetUsernameVerificationAuditLogs = "/api/v0/admin/get-username-verification-audit-logs" RoutePathAdminGetUserAdminData = "/api/v0/admin/get-user-admin-data" // admin_feed.go RoutePathAdminUpdateGlobalFeed = "/api/v0/admin/update-global-feed" RoutePathAdminPinPost = "/api/v0/admin/pin-post" RoutePathAdminRemoveNilPosts = "/api/v0/admin/remove-nil-posts" // admin_nft.go RoutePathAdminGetNFTDrop = "/api/v0/admin/get-nft-drop" RoutePathAdminUpdateNFTDrop = "/api/v0/admin/update-nft-drop" // admin_jumio.go RoutePathAdminResetJumioForPublicKey = "/api/v0/admin/reset-jumio-for-public-key" RoutePathAdminUpdateJumioBitClout = "/api/v0/admin/update-jumio-bitclout" )
Variables ¶
This section is empty.
Functions ¶
func APIAddError ¶
func APIAddError(ww http.ResponseWriter, errorString string)
APIAddError sets an error response on the ResponseWriter passed in.
func AddHeaders ¶
AddHeaders ...
func CalcMedian ¶
func GetFilterLogsKey ¶
func GetFilterLogsKey(username string, filterType FilterType) (_filterLogsKey []byte, _err error)
Gives the filter logs key for a specific filter type and username.
func GetUSDToBTCPrice ¶
func GlobalStateKeyForBlacklistAuditLogs ¶
Key for accessing the blacklist audit logs associated with a user.
func GlobalStateKeyForBlacklistedProfile ¶
Key for accessing a blacklisted user.
func GlobalStateKeyForBuyBitCloutFeeBasisPoints ¶
func GlobalStateKeyForBuyBitCloutFeeBasisPoints() []byte
func GlobalStateKeyForGraylistAuditLogs ¶
Key for accessing the graylist audit logs associated with a user.
func GlobalStateKeyForGraylistedProfile ¶
Key for accessing a graylisted user.
func GlobalStateKeyForJumioBitCloutNanos ¶
func GlobalStateKeyForJumioBitCloutNanos() []byte
func GlobalStateKeyForPhoneNumberStringToPhoneNumberMetadata ¶
func GlobalStateKeyForPhoneNumberStringToPhoneNumberMetadata(phoneNumber string) (_key []byte, _err error)
countryCode is a string like 'US' (Note: the phonenumbers lib calls this a "region code")
func GlobalStateKeyForPublicKeyToUserMetadata ¶
Key for accessing a user's global metadata.
func GlobalStateKeyForTstampPinnedPostHash ¶
Key for accessing a pinned post.
func GlobalStateKeyForTstampPostHash ¶
Key for accessing a whitelised post in the global feed index.
func GlobalStateKeyForUSDCentsToBitCloutReserveExchangeRate ¶
func GlobalStateKeyForUSDCentsToBitCloutReserveExchangeRate() []byte
func GlobalStateKeyForUserPkContactPkToMostRecentReadTstampNanos ¶
func GlobalStateKeyForUserPkContactPkToMostRecentReadTstampNanos(userPubKey []byte, contactPubKey []byte) []byte
Key for accessing a user's global metadata.
func GlobalStateKeyForUserPublicKeyTstampNanosToWyreOrderMetadata ¶
func GlobalStateKeyForUserPublicKeyTstampNanosToWyreOrderMetadata(userPublicKeyBytes []byte, timestampNanos uint64) []byte
Key for accessing a public key's wyre order metadata.
func GlobalStateKeyForUsernameVerificationAuditLogs ¶
Key for accessing verification audit logs for a given username
func GlobalStateKeyForWhitelistAuditLogs ¶
Key for accessing the whitelist audit logs associated with a user.
func ReprocessBitcoinBlockUsingAPI ¶
func ReprocessBitcoinBlockUsingAPI(blockHeightOrHash string, bitcoinManager *lib.BitcoinManager, params *lib.BitCloutParams) error
func TxnIsAssociatedWithPublicKey ¶
func TxnIsAssociatedWithPublicKey(txnMeta *lib.TransactionMetadata, publicKeyBase58Check string) bool
func TxnMetaIsNotification ¶
Types ¶
type APIBalanceRequest ¶
APIBalanceRequest specifies the params for a call to the APIBalance endpoint.
type APIBalanceResponse ¶
type APIBalanceResponse struct { // Blank if successful. Otherwise, contains a description of the // error that occurred. Error string // The balance of the public key queried in “nanos.” Note // there are 1e9 “nanos” per BitClout, so if the balance were “1 BitClout” then // this value would be set to 1e9. ConfirmedBalanceNanos int64 // The unconfirmed balance of the public key queried in “nanos.” This field // is set to zero if Confirmations is set to a value greater than zero. UnconfirmedBalanceNanos int64 // BitClout uses a UTXO model similar to Bitcoin. As such, querying // the balance returns all of the UTXOs for a particular public key for // convenience. Note that a UTXO is simply a reference to a particular // output index in a previous transaction UTXOs []*UTXOEntryResponse }
APIBalanceResponse specifies the response for a call to the APIBalance endpoint.
type APIBaseResponse ¶
type APIBaseResponse struct { // Blank if successful. Otherwise, contains a description of the // error that occurred. Error string // The information contained in the block’s header. Header *HeaderResponse Transactions []*TransactionResponse }
APIBaseResponse ...
type APIBlockRequest ¶
type APIBlockRequest struct { // Block height. 0 corresponds to the genesis block. An error will be // returned if the height exceeds the tip. This field is ignored if HashHex is // set. Height int64 // Hash of the block to return. Height is ignored if this is set. HashHex string // When set to false, only returns the header of the block requested // not the full block. Otherwise, returns the full block. FullBlock bool }
APIBlockRequest specifies the params for a call to the APIBlock endpoint.
type APIBlockResponse ¶
type APIBlockResponse struct { // Blank if successful. Otherwise, contains a description of the // error that occurred. Error string // The information contained in the block’s header. Header *HeaderResponse Transactions []*TransactionResponse }
APIBlockResponse specifies the response for a call to the APIBlock endpoint.
type APIKeyPairRequest ¶
type APIKeyPairRequest struct { // A BIP39 mnemonic and extra text. Mnemonic can be 12 words or // 24 words. ExtraText is optional. Mnemonic string ExtraText string // The index of the public/private key pair to generate Index uint32 }
APIKeyPairRequest specifies the params for a call to the APIKeyPair endpoint.
type APIKeyPairResponse ¶
type APIKeyPairResponse struct { // Blank if successful. Otherwise, contains a description of the // error that occurred. Error string // The BitClout public key encoded using base58 check encoding with // prefix = [3]byte{0x9, 0x7f, 0x0} // This public key can be passed in subsequent API calls to check // balance, among other things. All encoded BitClout public keys start // with the characters “BC” PublicKeyBase58Check string // The BitClout public key encoded as a plain hex string. This should // match the public key with the corresponding index generated by this tool. // This should not be passed to subsequent API calls, it is only provided // as a reference, mainly as a sanity-check. PublicKeyHex string // The BitClout private key encoded using base58 check encoding with // prefix = [3]byte{0x50, 0xd5, 0x0} // This private key can be passed in subsequent API calls to spend BitClout, // among other things. All BitClout private keys start with // the characters “bc” PrivateKeyBase58Check string // The BitClout private key encoded as a plain hex string. Note that // this will not directly match what is produced by the tool because the // tool shows the private key encoded using Bitcoin’s WIF format rather // than as raw hex. To convert this raw hex into Bitcoin’s WIF format you can // use this simple Python script. This should not be passed to subsequent // API calls, it is only provided as a reference, mainly as a sanity-check. PrivateKeyHex string }
APIKeyPairResponse specifies the response for a call to the APIKeyPair endpoint.
type APINodeInfoRequest ¶
type APINodeInfoRequest struct { }
APINodeInfoRequest specifies the params for a call to the APINodeInfo endpoint.
type APINodeInfoResponse ¶
type APINodeInfoResponse struct { // Blank if successful. Otherwise, contains a description of the // error that occurred. Error string }
APINodeInfoResponse specifies the response for a call to the APINodeInfo endpoint.
type APIServer ¶
type APIServer struct { Params *lib.BitCloutParams Config *config.Config MinFeeRateNanosPerKB uint64 TXIndex *lib.TXIndex // Used for getting/setting the global state. Usually either a db is set OR // a remote node is set-- not both. When a remote node is set, global state // is set and fetched from that node. Otherwise, it is set/fetched from the // db. This makes it easy to run a local node in development. GlobalStateDB *badger.DB // Optional, may be empty. Used for Twilio integration Twilio *twilio.Client // When set, BlockCypher is used to add extra security to BitcoinExchange // transactions. BlockCypherAPIKey string UsdCentsPerBitCloutExchangeRate uint64 // List of prices retrieved. This is culled everytime we update the current price. LastTradeBitCloutPriceHistory []LastTradePriceHistoryItem // How far back do we consider trade prices when we set the current price of $CLOUT in nanoseconds LastTradePriceLookback uint64 // contains filtered or unexported fields }
APIServer provides the interface between the blockchain and things like the web UI. In particular, it exposes a JSON API that can be used to do everything the frontend cares about, from posts to profiles to purchasing BitClout with Bitcoin.
func NewAPIServer ¶
func NewAPIServer( _backendServer *lib.Server, _mempool *lib.BitCloutMempool, _blockchain *lib.Blockchain, _blockProducer *lib.BitCloutBlockProducer, txIndex *lib.TXIndex, params *lib.BitCloutParams, config *config.Config, minFeeRateNanosPerKB uint64, globalStateDB *badger.DB, twilio *twilio.Client, blockCypherAPIKey string, ) (*APIServer, error)
NewAPIServer ...
func (*APIServer) APIBalance ¶
func (fes *APIServer) APIBalance(ww http.ResponseWriter, rr *http.Request)
APIBalance allows one to check the balance of a particular public key by passing the public key.
Note that spent transaction outputs are not returned by this endpoint. To perform operations on spent transaction outputs, one must use the APITransactionInfo endpoint instead.
func (*APIServer) APIBase ¶
func (fes *APIServer) APIBase(ww http.ResponseWriter, rr *http.Request)
APIBase is an endpoint that simply confirms that the API is up and running.
func (*APIServer) APIBlock ¶
func (fes *APIServer) APIBlock(ww http.ResponseWriter, rr *http.Request)
APIBlock can be used to query a block's information using either the block hash or height.
To get all blocks in the chain, simply query this endpoint by enumerating the heights starting from zero and iterating up to the tip. The tip height and hash can be obtained using the /info endpoint.
func (*APIServer) APIKeyPair ¶
func (fes *APIServer) APIKeyPair(ww http.ResponseWriter, rr *http.Request)
APIKeyPair allows one to generate an arbitrary number of public/private BitClout keypairs.
Each public/private key pair corresponds to a particular index associated. This means that index “5”, for example, will always generate the same public/private key pair. An infinite number of public/private key pairs can thus be generated by iterating an index for a seed.
Note that all public/private keys are inter-operable as Bitcoin public/private keys. Meaning they represent a point on the secp256k1 curve (same as what is used by Bitcoin).
Note also that, under the hood, BitClout takes the BIP39 mnemonic and generates the public/private key pairs using the BIP32 derivation path m/44’/0’/0’/0/i, where “i” is the “index” of the public/private key being generated. This means that the BitClout public/private key pair generated by the node will always line up with the public/private key pairs generated by this tool (https://iancoleman.io/bip39/). An engineer can therefore “sanity check” that things are working by generating a mnemonic using the tool, creating seed with that mnemonic, and then verifying that the public/private key pairs generated line up with what is shown by the tool.
func (*APIServer) APINodeInfo ¶
func (fes *APIServer) APINodeInfo(ww http.ResponseWriter, rr *http.Request)
APINodeInfo returns general information about the state of the node's blockchain.
The blockchain does a “headers-first” sync, meaning it first downloads all BitClout headers and then downloads all blocks. This means that, when the node is first syncing, the tip of the best “header chain” may be ahead of the tip of its most recently downloaded block. In addition to syncing BitClout headers and BitClout blocks, an BitClout node will also sync all of the latest Bitcoin headers to power its built-in decentralized exchange. For this reason, the endpoint also returns information on the node's best Bitcoin header chain, which is distinct from its BitClout chain.
func (*APIServer) APITransactionInfo ¶
func (fes *APIServer) APITransactionInfo(ww http.ResponseWriter, rr *http.Request)
APITransactionInfo allows one to get information about a particular transaction given its transaction ID (in base58check encoding) OR using a public key.
If one has a TransactionIDBase58Check, e.g. from calling the “transfer-bitclout” endpoint, one can get the corresponding human-readable “TransactionInfo” by passing this transaction ID to a node. Note that BitClout nodes do not maintain a transaction index by default, so this endpoint will error if either --txindex is not passed when starting the node OR if the index is not yet up-to-date.
If one has a PublicKeyBase58Check (starts with “BC”), one can get all of the TransactionIDs associated with that public key sorted by oldest to newest (this will include transactions where the address is a sender and a receiver). One can optionally get the full TransactionInfos for all of the transactions in the same call. Note that BitClout nodes do not maintain a transaction index by default, so this endpoint will error if either --txindex is not passed when starting the node OR if the index is not yet up-to-date.
func (*APIServer) APITransferBitClout ¶
func (fes *APIServer) APITransferBitClout(ww http.ResponseWriter, rr *http.Request)
APITransferBitClout can be used to transfer BitClout from one public key to another programmatically. To transfer BitClout, one must provide a public/private key pair. BitClout uses a UTXO model like Bitcoin but BitClout transactions are generally simpler than Bitcoin transactions because BitClout always uses the “from public key” as the “change” public key (meaning that it does not “rotate” keys by default).
For example, if a transaction sends 10 BitClout from PubA to PubB with 5 BitClout in “change” and 1 BitClout as a “miner fee,” then the transaction would look as follows:
- Input: 16 BitClout (10 BitClout to send, 5 BitClout in change, and 1 BitClout as a fee)
- PubB: 10 BitClout (the amount being sent from A to B)
- PubA: 5 BitClout (change returned to A)
- Implicit 1 BitClout is paid as a fee to the miner. The miner fee is implicitly computed as (total input – total output) just like in Bitcoin.
TODO: This function is redundant with the APITransferBitClout function in frontend_utils
func (*APIServer) AcceptNFTBid ¶
func (fes *APIServer) AcceptNFTBid(ww http.ResponseWriter, req *http.Request)
func (*APIServer) AdminGetAllUserGlobalMetadata ¶
func (fes *APIServer) AdminGetAllUserGlobalMetadata(ww http.ResponseWriter, req *http.Request)
AdminGetAllUserGlobalMetadata ...
func (*APIServer) AdminGetMempoolStats ¶
func (fes *APIServer) AdminGetMempoolStats(ww http.ResponseWriter, req *http.Request)
AdminGetMempoolStats ...
func (*APIServer) AdminGetNFTDrop ¶
func (fes *APIServer) AdminGetNFTDrop(ww http.ResponseWriter, req *http.Request)
func (*APIServer) AdminGetUserAdminData ¶
func (fes *APIServer) AdminGetUserAdminData(ww http.ResponseWriter, req *http.Request)
Get the audit logs for a particular public key and their associated metadata
func (*APIServer) AdminGetUserGlobalMetadata ¶
func (fes *APIServer) AdminGetUserGlobalMetadata(ww http.ResponseWriter, req *http.Request)
AdminGetUserGlobalMetadata ...
func (*APIServer) AdminGetUsernameVerificationAuditLogs ¶
func (fes *APIServer) AdminGetUsernameVerificationAuditLogs(ww http.ResponseWriter, req *http.Request)
Get the verification audit logs for a given username
func (*APIServer) AdminGetVerifiedUsers ¶
func (fes *APIServer) AdminGetVerifiedUsers(ww http.ResponseWriter, req *http.Request)
AdminGetVerifiedUsers
Gets a list of all verified users.
func (*APIServer) AdminGrantVerificationBadge ¶
func (fes *APIServer) AdminGrantVerificationBadge(ww http.ResponseWriter, req *http.Request)
AdminGrantVerificationBadge
This endpoint enables anyone with access to a node's shared secret to grant a verifiaction badge to a particular username.
func (*APIServer) AdminPinPost ¶
func (fes *APIServer) AdminPinPost(ww http.ResponseWriter, req *http.Request)
AdminUpdateGlobalFeed ...
func (*APIServer) AdminRemoveNilPosts ¶
func (fes *APIServer) AdminRemoveNilPosts(ww http.ResponseWriter, req *http.Request)
func (*APIServer) AdminRemoveVerificationBadge ¶
func (fes *APIServer) AdminRemoveVerificationBadge(ww http.ResponseWriter, req *http.Request)
AdminRemoveVerificationBadge
A valid verification mapping will have an element where map[PKID] = username. If the public key still has the same username, the user is considered verified. In order to "delete" a user efficiently, we simply map their public key to an empty string. Since their public key can never have an underlying username of "", it will never show up as verified.
func (*APIServer) AdminResetJumioForPublicKey ¶
func (fes *APIServer) AdminResetJumioForPublicKey(ww http.ResponseWriter, req *http.Request)
func (*APIServer) AdminUpdateGlobalFeed ¶
func (fes *APIServer) AdminUpdateGlobalFeed(ww http.ResponseWriter, req *http.Request)
AdminUpdateGlobalFeed ...
func (*APIServer) AdminUpdateJumioBitClout ¶
func (fes *APIServer) AdminUpdateJumioBitClout(ww http.ResponseWriter, req *http.Request)
func (*APIServer) AdminUpdateNFTDrop ¶
func (fes *APIServer) AdminUpdateNFTDrop(ww http.ResponseWriter, req *http.Request)
func (*APIServer) AdminUpdateUserGlobalMetadata ¶
func (fes *APIServer) AdminUpdateUserGlobalMetadata(ww http.ResponseWriter, req *http.Request)
AdminUpdateUserGlobalMetadata ...
This endpoint differs from the standard "UpdateUserGlobalMetadata" in that it allows anyone with access to the node's shared_secret to update any part of a User's metadata.
func (*APIServer) BlockPublicKey ¶
func (fes *APIServer) BlockPublicKey(ww http.ResponseWriter, req *http.Request)
This endpoint is used for blocking and unblocking users. A boolean flag Unblock is passed to indicate whether a user should be blocked or unblocked.
func (*APIServer) BuyOrSellCreatorCoin ¶
func (fes *APIServer) BuyOrSellCreatorCoin(ww http.ResponseWriter, req *http.Request)
BuyOrSellCreatorCoin ...
func (*APIServer) CheckAdminPublicKey ¶
CheckSecret ...
func (*APIServer) CompProfileCreation ¶
func (*APIServer) CreateFollowTxnStateless ¶
func (fes *APIServer) CreateFollowTxnStateless(ww http.ResponseWriter, req *http.Request)
CreateFollowTxnStateless ...
func (*APIServer) CreateGlobalStateBatchGetRequest ¶
func (*APIServer) CreateGlobalStateDeleteRequest ¶
func (*APIServer) CreateGlobalStateGetRequest ¶
func (*APIServer) CreateGlobalStatePutRequest ¶
func (*APIServer) CreateGlobalStateSeekRequest ¶
func (*APIServer) CreateLikeStateless ¶
func (fes *APIServer) CreateLikeStateless(ww http.ResponseWriter, req *http.Request)
CreateLikeStateless ...
func (*APIServer) CreateNFT ¶
func (fes *APIServer) CreateNFT(ww http.ResponseWriter, req *http.Request)
func (*APIServer) CreateNFTBid ¶
func (fes *APIServer) CreateNFTBid(ww http.ResponseWriter, req *http.Request)
func (*APIServer) DeleteIdentities ¶
func (fes *APIServer) DeleteIdentities(ww http.ResponseWriter, req *http.Request)
func (*APIServer) EvictUnminedBitcoinTxns ¶
func (fes *APIServer) EvictUnminedBitcoinTxns(ww http.ResponseWriter, req *http.Request)
func (*APIServer) ExceedsBitCloutBalance ¶
ExceedsSendBitCloutBalance - Check if nanosPurchased is greater than the balance of the BuyBitClout wallet.
func (*APIServer) ExchangeBitcoinStateless ¶
func (fes *APIServer) ExchangeBitcoinStateless(ww http.ResponseWriter, req *http.Request)
ExchangeBitcoinStateless ...
func (*APIServer) FilterOutRestrictedPubKeysFromList ¶
func (fes *APIServer) FilterOutRestrictedPubKeysFromList(profilePubKeys [][]byte, readerPK []byte, moderationType string) (_filteredPubKeys [][]byte, _err error)
Accepts a list of profile public keys and returns a subset of those keys based on the moderationType specified. Passing an empty string will only filter out profiles that are "RemovedEverywhere."
func (*APIServer) FilterOutRestrictedPubKeysFromMap ¶
func (fes *APIServer) FilterOutRestrictedPubKeysFromMap(profilePubKeyMap map[lib.PkMapKey][]byte, readerPK []byte, moderationType string, ) (_filteredPubKeyMap map[lib.PkMapKey][]byte, _err error)
Accepts a PkMapKey <> PubKey map and returns a map with a subset of those keys based on the moderationType specified. Passing an empty string will only filter out profiles that are "RemovedEverywhere."
NOTE: If a readerPK is passed, it will always be returned in the new map.
func (*APIServer) GetAllPostEntries ¶
func (*APIServer) GetAppState ¶
func (fes *APIServer) GetAppState(ww http.ResponseWriter, req *http.Request)
func (*APIServer) GetBTCAddress ¶
func (*APIServer) GetBalanceForPublicKey ¶
func (*APIServer) GetBlockTemplate ¶
func (fes *APIServer) GetBlockTemplate(ww http.ResponseWriter, req *http.Request)
GetBlockTemplate ...
func (*APIServer) GetBlockedPubKeysForUser ¶
func (fes *APIServer) GetBlockedPubKeysForUser(userPubKey []byte) (_blockedPubKeyMap map[string]struct{}, _err error)
Get the map of public keys this user has blocked. The _blockedPubKeyMap operates as a hashset to speed up look up time while value are empty structs to keep memory usage down.
func (*APIServer) GetBuyBitCloutFeeBasisPoints ¶
func (fes *APIServer) GetBuyBitCloutFeeBasisPoints(ww http.ResponseWriter, req *http.Request)
GetBuyBitCloutFeeBasisPoints gets the current value of the buy BitClout fee.
func (*APIServer) GetBuyBitCloutFeeBasisPointsResponseFromGlobalState ¶
GetBuyBitCloutFeeBasisPointsResponseFromGlobalState is a utility to get the current buy BitClout fee from global state.
func (*APIServer) GetDiamondedPosts ¶
func (fes *APIServer) GetDiamondedPosts(ww http.ResponseWriter, req *http.Request)
func (*APIServer) GetDiamondsForPost ¶
func (fes *APIServer) GetDiamondsForPost(ww http.ResponseWriter, req *http.Request)
func (*APIServer) GetDiamondsForPublicKey ¶
func (fes *APIServer) GetDiamondsForPublicKey(ww http.ResponseWriter, req *http.Request)
func (*APIServer) GetExchangeBitCloutPrice ¶
func (*APIServer) GetExchangeRate ¶
func (fes *APIServer) GetExchangeRate(ww http.ResponseWriter, rr *http.Request)
func (*APIServer) GetFilterAuditLogs ¶
func (fes *APIServer) GetFilterAuditLogs(username string, filterType FilterType) (_logs []FilterAuditLog, _err error)
Fetch the filter audit logs for a given username and filter type.
func (*APIServer) GetFollowsStateless ¶
func (fes *APIServer) GetFollowsStateless(ww http.ResponseWriter, rr *http.Request)
GetFollowsStateless ... Equivalent to the following REST endpoints:
- GET /:username/followers
- GET /:username/following
func (*APIServer) GetFullTikTokURL ¶
func (fes *APIServer) GetFullTikTokURL(ww http.ResponseWriter, req *http.Request)
func (*APIServer) GetFullWalletOrderDetails ¶
func (*APIServer) GetGCSClient ¶
GetGCSClient ...
func (*APIServer) GetGlobalParams ¶
func (fes *APIServer) GetGlobalParams(ww http.ResponseWriter, req *http.Request)
func (*APIServer) GetHodlYouMap ¶
func (fes *APIServer) GetHodlYouMap(pkid *lib.PKIDEntry, fetchProfiles bool, utxoView *lib.UtxoView) ( _youHodlMap map[string]*BalanceEntryResponse, _err error)
Get map of public keys hodling your coin.
func (*APIServer) GetHodlersForPublicKey ¶
func (fes *APIServer) GetHodlersForPublicKey(ww http.ResponseWriter, req *http.Request)
GetHodlersForPublicKey... Get BalanceEntryResponses for hodlings.
func (*APIServer) GetHodlingsForPublicKey ¶
func (fes *APIServer) GetHodlingsForPublicKey(pkid *lib.PKIDEntry, fetchProfiles bool, referenceUtxoView *lib.UtxoView) ( _youHodlMap map[string]*BalanceEntryResponse, _hodlYouMap map[string]*BalanceEntryResponse, _err error)
GetHodlingsForPublicKey ...
func (*APIServer) GetJumioBitCloutNanos ¶
func (*APIServer) GetJumioStatusForPublicKey ¶
func (fes *APIServer) GetJumioStatusForPublicKey(ww http.ResponseWriter, rr *http.Request)
func (*APIServer) GetLatestNFTDropEntry ¶
func (fes *APIServer) GetLatestNFTDropEntry() (_dropEntry *NFTDropEntry, _err error)
Check global state and get the latest drop entry if available. If no drop entry is found in global state, returns a default-initialized NFTDropEntry.
func (*APIServer) GetLikesForPost ¶
func (fes *APIServer) GetLikesForPost(ww http.ResponseWriter, req *http.Request)
func (*APIServer) GetMessagesStateless ¶
func (fes *APIServer) GetMessagesStateless(ww http.ResponseWriter, rr *http.Request)
GetMessagesStateless ...
func (*APIServer) GetNFTBidsForNFTPost ¶
func (fes *APIServer) GetNFTBidsForNFTPost(ww http.ResponseWriter, req *http.Request)
func (*APIServer) GetNFTBidsForUser ¶
func (fes *APIServer) GetNFTBidsForUser(ww http.ResponseWriter, req *http.Request)
func (*APIServer) GetNFTCollectionSummary ¶
func (fes *APIServer) GetNFTCollectionSummary(ww http.ResponseWriter, req *http.Request)
func (*APIServer) GetNFTDropEntry ¶
func (fes *APIServer) GetNFTDropEntry(nftDropNumber uint64) (_dropEntry *NFTDropEntry, _err error)
func (*APIServer) GetNFTEntriesForPostHash ¶
func (fes *APIServer) GetNFTEntriesForPostHash(ww http.ResponseWriter, req *http.Request)
func (*APIServer) GetNFTShowcase ¶
func (fes *APIServer) GetNFTShowcase(ww http.ResponseWriter, req *http.Request)
func (*APIServer) GetNFTsForUser ¶
func (fes *APIServer) GetNFTsForUser(ww http.ResponseWriter, req *http.Request)
func (*APIServer) GetNanosFromSats ¶
GetNanosFromSats - convert Satoshis to BitClout nanos
func (*APIServer) GetNanosFromUSDCents ¶
GetNanosFromUSDCents - convert USD cents to BitClout nanos
func (*APIServer) GetNextNFTShowcase ¶
func (fes *APIServer) GetNextNFTShowcase(ww http.ResponseWriter, req *http.Request)
func (*APIServer) GetNotifications ¶
func (fes *APIServer) GetNotifications(ww http.ResponseWriter, req *http.Request)
func (*APIServer) GetPostEntriesByCloutAfterTimePaginated ¶
func (fes *APIServer) GetPostEntriesByCloutAfterTimePaginated(readerPK []byte, minutesLookback uint64, numToFetch int) ( _postEntries []*lib.PostEntry, _profilesByPublicKey map[lib.PkMapKey]*lib.ProfileEntry, err error)
Get the top numToFetch posts ordered by poster's coin price in the last number of minutes as defined by minutesLookback.
func (*APIServer) GetPostEntriesByTimePaginated ¶
func (fes *APIServer) GetPostEntriesByTimePaginated( startPostHash *lib.BlockHash, readerPK []byte, numToFetch int, utxoView *lib.UtxoView) ( _postEntries []*lib.PostEntry, _commentsByPostHash map[lib.BlockHash][]*lib.PostEntry, _profilesByPublicKey map[lib.PkMapKey]*lib.ProfileEntry, _postEntryReaderStates map[lib.BlockHash]*lib.PostEntryReaderState, err error)
func (*APIServer) GetPostEntriesForFollowFeed ¶
func (fes *APIServer) GetPostEntriesForFollowFeed( startAfterPostHash *lib.BlockHash, readerPK []byte, numToFetch int, utxoView *lib.UtxoView, mediaRequired bool) ( _postEntries []*lib.PostEntry, _profilesByPublicKey map[lib.PkMapKey]*lib.ProfileEntry, _postEntryReaderStates map[lib.BlockHash]*lib.PostEntryReaderState, err error)
func (*APIServer) GetPostEntriesForGlobalWhitelist ¶
func (fes *APIServer) GetPostEntriesForGlobalWhitelist( startPostHash *lib.BlockHash, readerPK []byte, numToFetch int, utxoView *lib.UtxoView, mediaRequired bool) ( _postEntries []*lib.PostEntry, _profilesByPublicKey map[lib.PkMapKey]*lib.ProfileEntry, _postEntryReaderStates map[lib.BlockHash]*lib.PostEntryReaderState, err error)
func (*APIServer) GetPostsByTime ¶
func (fes *APIServer) GetPostsByTime(bav *lib.UtxoView, startPostHash *lib.BlockHash, readerPK []byte, numToFetch int, skipHidden bool, skipVanillaReclout bool) ( _corePosts []*lib.PostEntry, _commentsByPostHash map[lib.BlockHash][]*lib.PostEntry, _err error)
Fetches all the posts from the db starting with a given postHash, up to numToFetch. This is then joined with mempool and all posts are returned. Because the mempool may contain post changes, the number of posts returned in the map is not guaranteed to be numToFetch.
func (*APIServer) GetPostsForFollowFeedForPublicKey ¶
func (*APIServer) GetPostsForNFTDropEntry ¶
func (fes *APIServer) GetPostsForNFTDropEntry(dropEntryToReturn *NFTDropEntry, ) (_posts []*PostEntryResponse, _err error)
func (*APIServer) GetPostsForPublicKey ¶
func (fes *APIServer) GetPostsForPublicKey(ww http.ResponseWriter, req *http.Request)
GetPostsForPublicKey... Get paginated posts for a public key or username.
func (*APIServer) GetPostsStateless ¶
func (fes *APIServer) GetPostsStateless(ww http.ResponseWriter, req *http.Request)
GetPostsStateless ...
func (*APIServer) GetProfiles ¶
func (fes *APIServer) GetProfiles(ww http.ResponseWriter, req *http.Request)
GetProfiles ...
func (*APIServer) GetProfilesByCoinValue ¶
func (fes *APIServer) GetProfilesByCoinValue( bav *lib.UtxoView, readerPK []byte, startProfilePubKey []byte, numToFetch int, getPosts bool, moderationType string, ) ( _profiles map[lib.PkMapKey]*lib.ProfileEntry, _postsByProfilePublicKey map[lib.PkMapKey][]*lib.PostEntry, _postEntryReaderStates map[lib.BlockHash]*lib.PostEntryReaderState, _err error, )
Fetches all the profiles from the db starting with a given profilePubKey, up to numToFetch. This is then joined with mempool and all profiles are returned. Because the mempool may contain profile changes, the number of profiles returned in the map is not guaranteed to be numEntries.
func (*APIServer) GetProfilesByUsernamePrefixAndBitCloutLocked ¶
func (*APIServer) GetQuoteRecloutsForPost ¶
func (fes *APIServer) GetQuoteRecloutsForPost(ww http.ResponseWriter, req *http.Request)
func (*APIServer) GetRecloutsForPost ¶
func (fes *APIServer) GetRecloutsForPost(ww http.ResponseWriter, req *http.Request)
func (*APIServer) GetSinglePost ¶
func (fes *APIServer) GetSinglePost(ww http.ResponseWriter, req *http.Request)
func (*APIServer) GetSingleProfile ¶
func (fes *APIServer) GetSingleProfile(ww http.ResponseWriter, req *http.Request)
GetSingleProfile...
func (*APIServer) GetSingleProfilePicture ¶
func (fes *APIServer) GetSingleProfilePicture(ww http.ResponseWriter, req *http.Request)
func (*APIServer) GetTransferDetails ¶
func (*APIServer) GetUSDCentsToBitCloutReserveExchangeRate ¶
func (fes *APIServer) GetUSDCentsToBitCloutReserveExchangeRate(ww http.ResponseWriter, req *http.Request)
GetUSDCentsToBitCloutReserveExchangeRate get the current reserve exchange rate
func (*APIServer) GetUSDCentsToBitCloutReserveExchangeRateFromGlobalState ¶
GetUSDCentsToBitCloutReserveExchangeRateFromGlobalState is a helper function to get the current USD cents to BitClout exchange rate
func (*APIServer) GetUserGlobalMetadata ¶
func (fes *APIServer) GetUserGlobalMetadata(ww http.ResponseWriter, req *http.Request)
GetUserGlobalMetadata ... Allows a user to change the global metadata for a public key, if they prove ownership.
func (*APIServer) GetUsersStateless ¶
func (fes *APIServer) GetUsersStateless(ww http.ResponseWriter, rr *http.Request)
GetUsersStateless ...
func (*APIServer) GetVerifiedUsernameToPKIDMap ¶
func (fes *APIServer) GetVerifiedUsernameToPKIDMap() (_verificationMap map[string]*lib.PKID, _err error)
GetVerifiedUsernameToPKIDMap
Acts as a helper function for dealing with the verified usernames map. If the map does not already exist, this function will create one in global state. Returns nil it encounters an error. Returning nil is not dangerous, as _profileEntryToResponse() will ignore the map entirely in that case.
func (*APIServer) GetWyreWalletOrderMetadataFromGlobalState ¶
func (fes *APIServer) GetWyreWalletOrderMetadataFromGlobalState(publicKey string, timestamp uint64) (*WyreWalletOrderMetadata, error)
func (*APIServer) GetWyreWalletOrderQuotation ¶
func (fes *APIServer) GetWyreWalletOrderQuotation(ww http.ResponseWriter, req *http.Request)
func (*APIServer) GetWyreWalletOrderReservation ¶
func (fes *APIServer) GetWyreWalletOrderReservation(ww http.ResponseWriter, req *http.Request)
func (*APIServer) GetWyreWalletOrdersForPublicKey ¶
func (fes *APIServer) GetWyreWalletOrdersForPublicKey(ww http.ResponseWriter, req *http.Request)
func (*APIServer) GetYouHodlMap ¶
func (fes *APIServer) GetYouHodlMap(pkid *lib.PKIDEntry, fetchProfiles bool, utxoView *lib.UtxoView) ( _youHodlMap map[string]*BalanceEntryResponse, _err error)
Get map of creators you hodl.
func (*APIServer) GlobalStateBatchGet ¶
func (*APIServer) GlobalStateBatchGetRemote ¶
func (fes *APIServer) GlobalStateBatchGetRemote(ww http.ResponseWriter, rr *http.Request)
func (*APIServer) GlobalStateDelete ¶
func (*APIServer) GlobalStateDeleteRemote ¶
func (fes *APIServer) GlobalStateDeleteRemote(ww http.ResponseWriter, rr *http.Request)
func (*APIServer) GlobalStateGet ¶
func (*APIServer) GlobalStateGetRemote ¶
func (fes *APIServer) GlobalStateGetRemote(ww http.ResponseWriter, rr *http.Request)
func (*APIServer) GlobalStatePut ¶
func (*APIServer) GlobalStatePutRemote ¶
func (fes *APIServer) GlobalStatePutRemote(ww http.ResponseWriter, rr *http.Request)
func (*APIServer) GlobalStateRoutes ¶
GlobalStateRoutes returns the routes for managing global state. Note that these routes are generally protected by a shared_secret
func (*APIServer) GlobalStateSeek ¶
func (*APIServer) GlobalStateSeekRemote ¶
func (fes *APIServer) GlobalStateSeekRemote(ww http.ResponseWriter, rr *http.Request)
func (*APIServer) HealthCheck ¶
func (fes *APIServer) HealthCheck(ww http.ResponseWriter, rr *http.Request)
NOTE: This is a readiness check not a health check
func (*APIServer) Index ¶
func (fes *APIServer) Index(w http.ResponseWriter, r *http.Request)
Index ...
func (*APIServer) IsConfiguredForJumio ¶
func (*APIServer) IsConfiguredForSendgrid ¶
func (*APIServer) IsConfiguredForWyre ¶
func (*APIServer) IsFollowingPublicKey ¶
func (fes *APIServer) IsFollowingPublicKey(ww http.ResponseWriter, req *http.Request)
func (*APIServer) IsHodlingPublicKey ¶
func (fes *APIServer) IsHodlingPublicKey(ww http.ResponseWriter, req *http.Request)
func (*APIServer) JumioBegin ¶
func (fes *APIServer) JumioBegin(ww http.ResponseWriter, req *http.Request)
func (*APIServer) JumioCallback ¶
func (fes *APIServer) JumioCallback(ww http.ResponseWriter, req *http.Request)
Jumio webhook - If Jumio verified user is a human that we haven't paid already, pay them some starter CLOUT. Make sure you only allow access to jumio IPs for this endpoint, otherwise anybody can take all the funds from the public key that sends BitClout. WHITELIST JUMIO IPs.
func (*APIServer) JumioFlowFinished ¶
func (fes *APIServer) JumioFlowFinished(ww http.ResponseWriter, req *http.Request)
func (*APIServer) MakeWyreGetRequest ¶
func (*APIServer) MakeWyrePostRequest ¶
func (fes *APIServer) MakeWyrePostRequest(payload []byte, url string, ww http.ResponseWriter)
func (*APIServer) MarkAllMessagesRead ¶
func (fes *APIServer) MarkAllMessagesRead(ww http.ResponseWriter, req *http.Request)
func (*APIServer) MarkContactMessagesRead ¶
func (fes *APIServer) MarkContactMessagesRead(ww http.ResponseWriter, req *http.Request)
func (*APIServer) NewRouter ¶
InitRoutes ... Note: Be very careful when editing existing routes in this list. This *must* be kept in-sync with the backend-api.service.ts file in the frontend code. If not, then requests will fail.
func (*APIServer) NodeControl ¶
func (fes *APIServer) NodeControl(ww http.ResponseWriter, req *http.Request)
NodeControl ...
func (*APIServer) ReprocessBitcoinBlock ¶
func (fes *APIServer) ReprocessBitcoinBlock(ww http.ResponseWriter, req *http.Request)
ReprocessBitcoinBlock ...
func (*APIServer) ResendVerifyEmail ¶
func (fes *APIServer) ResendVerifyEmail(ww http.ResponseWriter, req *http.Request)
func (*APIServer) SendBitClout ¶
func (fes *APIServer) SendBitClout(ww http.ResponseWriter, req *http.Request)
SendBitClout ...
func (*APIServer) SendDiamonds ¶
func (fes *APIServer) SendDiamonds(ww http.ResponseWriter, req *http.Request)
SendDiamonds ...
func (*APIServer) SendMessageStateless ¶
func (fes *APIServer) SendMessageStateless(ww http.ResponseWriter, req *http.Request)
SendMessageStateless ...
func (*APIServer) SendPhoneNumberVerificationText ¶
func (fes *APIServer) SendPhoneNumberVerificationText(ww http.ResponseWriter, req *http.Request)
************************************************************ How verification works:
1. User inputs phone number and hits submit
- Frontend hits SendPhoneNumberVerificationText. It uses Twilio to send a text to the user with a verification code. Before sending the text, it validates that the phone number isn't already in use by checking phoneNumberMetadata (explained below).
3. User inputs the code and hits submit
- Frontend hits SubmitPhoneNumberVerificationCode. This verifies the code and updates two mappings in global state. A. userMetadata is updated to include the user's phone number B. phoneNumberMetadata is created, which maps phone number => user's public key
************************************************************
func (*APIServer) SendSeedBitClout ¶
func (*APIServer) SetBuyBitCloutFeeBasisPoints ¶
func (fes *APIServer) SetBuyBitCloutFeeBasisPoints(ww http.ResponseWriter, req *http.Request)
SetBuyBitCloutFeeBasisPoints sets the percentage fee applied to all BitClout buys on this node.
func (*APIServer) SetUSDCentsToBitCloutReserveExchangeRate ¶
func (fes *APIServer) SetUSDCentsToBitCloutReserveExchangeRate(ww http.ResponseWriter, req *http.Request)
SetUSDCentsToBitCloutReserveExchangeRate sets the minimum price to buy BitClout from this node.
func (*APIServer) SetWyreRequestHeaders ¶
func (*APIServer) StartExchangePriceMonitoring ¶
func (fes *APIServer) StartExchangePriceMonitoring()
func (*APIServer) StartSeedBalancesMonitoring ¶
func (fes *APIServer) StartSeedBalancesMonitoring()
Monitor balances for starter bitclout seed and buy bitclout seed
func (*APIServer) SubmitBlock ¶
func (fes *APIServer) SubmitBlock(ww http.ResponseWriter, req *http.Request)
func (*APIServer) SubmitPhoneNumberVerificationCode ¶
func (fes *APIServer) SubmitPhoneNumberVerificationCode(ww http.ResponseWriter, req *http.Request)
func (*APIServer) SubmitPost ¶
func (fes *APIServer) SubmitPost(ww http.ResponseWriter, req *http.Request)
SubmitPost ...
func (*APIServer) SubmitTransaction ¶
func (fes *APIServer) SubmitTransaction(ww http.ResponseWriter, req *http.Request)
func (*APIServer) SwapIdentity ¶
func (fes *APIServer) SwapIdentity(ww http.ResponseWriter, req *http.Request)
SwapIdentity ...
func (*APIServer) TrackWalletOrder ¶
func (*APIServer) TransferCreatorCoin ¶
func (fes *APIServer) TransferCreatorCoin(ww http.ResponseWriter, req *http.Request)
TransferCreatorCoin ...
func (*APIServer) UpdateFilterAuditLogs ¶
func (fes *APIServer) UpdateFilterAuditLogs(usernameToUpdate string, pkidEntryToUpdate *lib.PKIDEntry, filterType FilterType, isRemoval bool, updaterPublicKeyBase58Check string, utxoView *lib.UtxoView) (_err error)
Add a new audit log record to the history of filter audit logs.
func (*APIServer) UpdateGlobalParams ¶
func (fes *APIServer) UpdateGlobalParams(ww http.ResponseWriter, req *http.Request)
func (*APIServer) UpdateNFT ¶
func (fes *APIServer) UpdateNFT(ww http.ResponseWriter, req *http.Request)
func (*APIServer) UpdateProfile ¶
func (fes *APIServer) UpdateProfile(ww http.ResponseWriter, req *http.Request)
UpdateProfile ...
func (*APIServer) UpdateUSDCentsToBitCloutExchangeRate ¶
func (fes *APIServer) UpdateUSDCentsToBitCloutExchangeRate()
UpdateUSDCentsToBitCloutExchangeRate updates app state's USD Cents per BitClout value
func (*APIServer) UpdateUserGlobalMetadata ¶
func (fes *APIServer) UpdateUserGlobalMetadata(ww http.ResponseWriter, req *http.Request)
UpdateUserGlobalMetadata ... Allows a user to change the global metadata for a public key, if they prove ownership.
func (*APIServer) UpdateUsernameVerificationAuditLog ¶
func (fes *APIServer) UpdateUsernameVerificationAuditLog(usernameToVerify string, pkidEntryToVerify *lib.PKIDEntry, isRemoval bool, verifierPublicKeyBase58Check string, utxoView *lib.UtxoView) (_err error)
Add a new audit log record to the history of username verification audit logs.
func (*APIServer) UpdateWyreGlobalState ¶
func (fes *APIServer) UpdateWyreGlobalState(ww http.ResponseWriter, publicKeyBytes []byte, timestampNanos uint64, wyreWalletOrderMetadata WyreWalletOrderMetadata)
func (*APIServer) UploadImage ¶
func (fes *APIServer) UploadImage(ww http.ResponseWriter, req *http.Request)
Upload image before submitting post ...
func (*APIServer) ValidateJWT ¶
func (*APIServer) VerifyEmail ¶
func (fes *APIServer) VerifyEmail(ww http.ResponseWriter, req *http.Request)
func (*APIServer) WyreWalletOrderSubscription ¶
func (fes *APIServer) WyreWalletOrderSubscription(ww http.ResponseWriter, req *http.Request)
Make sure you only allow access to Wyre IPs for this endpoint, otherwise anybody can take all the funds from the public key that sends BitClout. WHITELIST WYRE IPs.
type APITransactionInfoRequest ¶
type APITransactionInfoRequest struct { // When set to true, the response simply contains all transactions in the // mempool with no filtering. IsMempool bool // A string that uniquely identifies this transaction. E.g. from a previous // call to “transfer-bitclout”. Ignored when PublicKeyBase58Check is set. TransactionIDBase58Check string // An BitClout public key encoded using base58 check encoding (starts // with “BC”) to get transaction IDs for. When set, // TransactionIDBase58Check is ignored. PublicKeyBase58Check string IDsOnly bool }
APITransactionInfoRequest specifies the params for a call to the APITransactionInfo endpoint.
type APITransactionInfoResponse ¶
type APITransactionInfoResponse struct { // Blank if successful. Otherwise, contains a description of the // error that occurred. Error string // The info for all transactions this public key is associated with from oldest // to newest. Transactions []*TransactionResponse BalanceNanos uint64 }
APITransactionInfoResponse specifies the response for a call to the APITransactionInfo endpoint.
type APITransferBitCloutRequest ¶
type APITransferBitCloutRequest struct { // An BitClout private key encoded using base58 check encoding (starts // with "bc"). SenderPrivateKeyBase58Check string // An BitClout public key encoded using base58 check encoding (starts // with “BC”) that will receive the BitClout being sent. This field is required // whether sending using an explicit public/private key pair. RecipientPublicKeyBase58Check string // The amount of BitClout to send in “nanos.” Note that “1 BitClout” is equal to // 1e9 nanos, so to send 1 BitClout, this value would need to be set to 1e9. AmountNanos int64 // The fee rate to use for this transaction. If left unset, a default fee rate // will be used. This can be checked using the “DryRun” parameter below. MinFeeRateNanosPerKB int64 // When set to true, the transaction is returned in the response but not // actually broadcast to the network. Useful for testing. DryRun bool }
APITransferBitCloutRequest specifies the params for a call to the APITransferBitClout endpoint.
type APITransferBitCloutResponse ¶
type APITransferBitCloutResponse struct { // Blank if successful. Otherwise, contains a description of the // error that occurred. Error string // The transaction we assembled. Transaction *TransactionResponse // Information about the transaction that we compute for // convenience. TransactionInfo *TransactionInfoResponse }
APITransferBitCloutResponse specifies the response for a call to the APITransferBitClout endpoint.
type AcceptNFTBidRequest ¶
type AcceptNFTBidRequest struct { UpdaterPublicKeyBase58Check string `safeForLogging:"true"` NFTPostHashHex string `safeForLogging:"true"` SerialNumber int `safeForLogging:"true"` BidderPublicKeyBase58Check string `safeForLogging:"true"` BidAmountNanos int `safeForLogging:"true"` EncryptedUnlockableText string `safeForLogging:"true"` MinFeeRateNanosPerKB uint64 `safeForLogging:"true"` }
type AcceptNFTBidResponse ¶
type AcceptNFTBidResponse struct { BidderPublicKeyBase58Check string `safeForLogging:"true"` NFTPostHashHex string `safeForLogging:"true"` SerialNumber int `safeForLogging:"true"` BidAmountNanos int `safeForLogging:"true"` TotalInputNanos uint64 ChangeAmountNanos uint64 FeeNanos uint64 Transaction *lib.MsgBitCloutTxn TransactionHex string }
type AccessLevel ¶
type AccessLevel int
const ( PublicAccess AccessLevel = iota AdminAccess SuperAdminAccess )
type AdminGetAllUserGlobalMetadataRequest ¶
type AdminGetAllUserGlobalMetadataRequest struct {
NumToFetch int `safeForLogging:"true"`
}
AdminGetAllUserGlobalMetadataRequest...
type AdminGetAllUserGlobalMetadataResponse ¶
type AdminGetAllUserGlobalMetadataResponse struct { // A mapping between the PublicKeyBase58Check string and the user's global metadata. PubKeyToUserGlobalMetadata map[string]*UserMetadata PubKeyToUsername map[string]string }
AdminGetAllUserGlobalMetadataResponse ...
type AdminGetMempoolStatsRequest ¶
type AdminGetMempoolStatsRequest struct{}
AdminGetMempoolStatsRequest...
type AdminGetMempoolStatsResponse ¶
type AdminGetMempoolStatsResponse struct {
TransactionSummaryStats map[string]*lib.SummaryStats
}
AdminGetMempoolStatsResponse ...
type AdminGetNFTDropRequest ¶
type AdminGetNFTDropRequest struct { // "-1" is used to request the next planned drop. DropNumber int `safeForLogging:"true"` }
type AdminGetNFTDropResponse ¶
type AdminGetNFTDropResponse struct { DropEntry *NFTDropEntry Posts []*PostEntryResponse }
type AdminGetUserAdminDataRequest ¶
type AdminGetUserAdminDataRequest struct {
UserPublicKeyBase58Check string
}
AdminGetUserMetadataRequest...
type AdminGetUserAdminDataResponse ¶
type AdminGetUserAdminDataResponse struct { // Profile Data Username string // Verifiers IsVerified bool LastVerifierPublicKey string LastVerifyRemoverPublicKey string // White/Gray/Black list IsWhitelisted bool LastWhitelisterPublicKey string LastWhitelistRemoverPublicKey string IsGraylisted bool LastGraylisterPublicKey string LastGraylistRemoverPublicKey string IsBlacklisted bool LastBlacklisterPublicKey string LastBlacklistRemoverPublicKey string // Phone number verification PhoneNumber string Email string }
AdminGetUserMetadataResponse...
type AdminGetUserGlobalMetadataRequest ¶
type AdminGetUserGlobalMetadataRequest struct {
UserPublicKeyBase58Check string `safeForLogging:"true"`
}
AdminGetUserGlobalMetadataRequest...
type AdminGetUserGlobalMetadataResponse ¶
type AdminGetUserGlobalMetadataResponse struct { // the user's global metadata. UserMetadata UserMetadata // The User object UserProfileEntryResponse *ProfileEntryResponse }
AdminGetUserGlobalMetadataResponse ...
type AdminGetUsernameVerificationAuditLogsRequest ¶
type AdminGetUsernameVerificationAuditLogsRequest struct {
Username string
}
AdminGetUsernameVerificationAuditLogsRequest ...
type AdminGetUsernameVerificationAuditLogsResponse ¶
type AdminGetUsernameVerificationAuditLogsResponse struct {
VerificationAuditLogs []VerificationUsernameAuditLogResponse
}
AdminGetUsernameVerificationAuditLogsResponse ...
type AdminGetVerifiedUsersRequest ¶
type AdminGetVerifiedUsersRequest struct{}
AdminGetVerifiedUsersRequest ...
type AdminGetVerifiedUsersResponse ¶
type AdminGetVerifiedUsersResponse struct {
VerifiedUsers []string
}
AdminGetVerifiedUsersResponse ...
type AdminGrantVerificationBadgeRequest ¶
type AdminGrantVerificationBadgeRequest struct { UsernameToVerify string `safeForLogging:"true"` AdminPublicKey string }
AdminGrantVerificationBadgeRequest ...
type AdminGrantVerificationBadgeResponse ¶
type AdminGrantVerificationBadgeResponse struct {
Message string
}
AdminGrantVerificationBadgeResponse ...
type AdminPinPostRequest ¶
type AdminPinPostRequest struct { // The post hash of the post to pin or unpin from the global feed PostHashHex string `safeForLogging:"true"` // If true, remove the given post hash hex from the list of pinned posts UnpinPost bool `safeForLogging:"true"` }
AdminPinPostRequest...
type AdminRemoveNilPostsRequest ¶
type AdminRemoveNilPostsRequest struct { // Number of posts to try to fetch from global state, starting from the most recent post // added to the global feed. NumPostsToSearch int `safeForLogging:"true"` }
AdminRemoveNilPostsRequest...
type AdminRemoveNilPostsResponse ¶
type AdminRemoveNilPostsResponse struct{}
AdminUpdateGlobalFeedResponse ...
type AdminRemoveVerificationBadgeRequest ¶
type AdminRemoveVerificationBadgeRequest struct { UsernameForWhomToRemoveVerification string `safeForLogging:"true"` AdminPublicKey string }
AdminRemoveVerificationBadgeRequest ...
type AdminRemoveVerificationBadgeResponse ¶
type AdminRemoveVerificationBadgeResponse struct {
Message string
}
AdminGrantVerificationBadgeResponse ...
type AdminRequest ¶
type AdminResetJumioRequest ¶
type AdminUpdateGlobalFeedRequest ¶
type AdminUpdateGlobalFeedRequest struct { // The post hash of the post to add or remove from the global feed. PostHashHex string `safeForLogging:"true"` // If true, remove the given post hash hex from the global feed. RemoveFromGlobalFeed bool `safeForLogging:"true"` }
AdminUpdateGlobalFeedRequest...
type AdminUpdateGlobalFeedResponse ¶
type AdminUpdateGlobalFeedResponse struct{}
AdminUpdateGlobalFeedResponse ...
type AdminUpdateJumioBitCloutResponse ¶
type AdminUpdateJumioBitCloutResponse struct {
BitCloutNanos uint64
}
type AdminUpdateNFTDropResponse ¶
type AdminUpdateNFTDropResponse struct { DropEntry *NFTDropEntry Posts []*PostEntryResponse }
type AdminUpdateUserGlobalMetadataRequest ¶
type AdminUpdateUserGlobalMetadataRequest struct { // The public key of the user to update. This will trump 'Username' if both are provided. UserPublicKeyBase58Check string `safeForLogging:"true"` // The username associated with the public key to update. Username string `safeForLogging:"true"` // Whether this is a blacklist update or not. IsBlacklistUpdate bool `safeForLogging:"true"` // Set to true if this user's content should not show up anywhere on the site. // Only set if IsBlacklistUpdate == true. RemoveEverywhere bool `safeForLogging:"true"` // Should be set to true if this user should not show up on the creator leaderboard. // Only set if IsBlacklistUpdate == true. RemoveFromLeaderboard bool `safeForLogging:"true"` // Whether this is a whitelist update or not. IsWhitelistUpdate bool `safeForLogging:"true"` // Set to true to automatically show this users posts in the global feed (max 5 per day). WhitelistPosts bool `safeForLogging:"true"` // Remove PhoneNumberMetadata to allow re-registration RemovePhoneNumberMetadata bool `safeForLogging:"true"` AdminPublicKey string }
AdminUpdateUserGlobalMetadataRequest...
type AdminUpdateUserGlobalMetadataResponse ¶
type AdminUpdateUserGlobalMetadataResponse struct{}
AdminUpdateUserGlobalMetadataResponse ...
type AmplitudeEvent ¶
type AmplitudeUploadRequestBody ¶
type AmplitudeUploadRequestBody struct { ApiKey string `json:"api_key"` Events []AmplitudeEvent `json:"events"` }
Amplitude Logging
type BalanceEntryResponse ¶
type BalanceEntryResponse struct { // The public keys are provided for the frontend HODLerPublicKeyBase58Check string // The public keys are provided for the frontend CreatorPublicKeyBase58Check string // Has the hodler purchased this creator's coin HasPurchased bool // How much this HODLer owns of a particular creator coin. BalanceNanos uint64 // The net effect of transactions in the mempool on a given BalanceEntry's BalanceNanos. // This is used by the frontend to convey info about mining. NetBalanceInMempool int64 ProfileEntryResponse *ProfileEntryResponse }
type BlockPublicKeyRequest ¶
type BlockPublicKeyResponse ¶
type BlockPublicKeyResponse struct {
BlockedPublicKeys map[string]struct{}
}
type BlockchainDotcomResponse ¶
type BlockchainDotcomResponse struct { USD struct { FifteenMinutePrice float64 `json:"15m"` } `json:"USD"` }
type BuyOrSellCreatorCoinRequest ¶
type BuyOrSellCreatorCoinRequest struct { // The public key of the user who is making the buy/sell. UpdaterPublicKeyBase58Check string `safeForLogging:"true"` // The public key of the profile that the purchaser is trying // to buy. CreatorPublicKeyBase58Check string `safeForLogging:"true"` // Whether this is a "buy" or "sell" OperationType string `safeForLogging:"true"` // Generally, only one of these will be used depending on the OperationType // set. In a Buy transaction, BitCloutToSellNanos will be converted into // creator coin on behalf of the user. In a Sell transaction, // CreatorCoinToSellNanos will be converted into BitClout. In an AddBitClout // operation, BitCloutToAddNanos will be aded for the user. This allows us to // support multiple transaction types with same meta field. BitCloutToSellNanos uint64 `safeForLogging:"true"` CreatorCoinToSellNanos uint64 `safeForLogging:"true"` BitCloutToAddNanos uint64 `safeForLogging:"true"` // When a user converts BitClout into CreatorCoin, MinCreatorCoinExpectedNanos // specifies the minimum amount of creator coin that the user expects from their // transaction. And vice versa when a user is converting CreatorCoin for BitClout. // Specifying these fields prevents the front-running of users' buy/sell. Setting // them to zero turns off the check. Give it your best shot, Ivan. MinBitCloutExpectedNanos uint64 `safeForLogging:"true"` MinCreatorCoinExpectedNanos uint64 `safeForLogging:"true"` MinFeeRateNanosPerKB uint64 `safeForLogging:"true"` }
BuyOrSellCreatorCoinRequest ...
type BuyOrSellCreatorCoinResponse ¶
type BuyOrSellCreatorCoinResponse struct { // The amount of BitClout ExpectedBitCloutReturnedNanos uint64 ExpectedCreatorCoinReturnedNanos uint64 FounderRewardGeneratedNanos uint64 // Spend is defined as BitClout that's specified as input that winds up as "output not // belonging to you." In the case of a creator coin sell, your input is creator coin (not // BitClout), so this ends up being 0. In the case of a creator coin buy, // it should equal the amount of BitClout you put in to buy the creator coin SpendAmountNanos uint64 TotalInputNanos uint64 ChangeAmountNanos uint64 FeeNanos uint64 Transaction *lib.MsgBitCloutTxn TransactionHex string TxnHashHex string }
BuyOrSellCreatorCoinResponse ...
type CoinbaseResponse ¶
type CoinbaseResponse struct { Data struct { Amount string `json:"amount"` } `json:"data"` }
type CoingeckoResponse ¶
type CoingeckoResponse struct { Bitcoin struct { USD float64 `json:"usd"` } `json:"bitcoin"` }
type CreateFollowTxnStatelessRequest ¶
type CreateFollowTxnStatelessRequest struct { FollowerPublicKeyBase58Check string `safeForLogging:"true"` FollowedPublicKeyBase58Check string `safeForLogging:"true"` IsUnfollow bool `safeForLogging:"true"` MinFeeRateNanosPerKB uint64 `safeForLogging:"true"` }
CreateFollowTxnStatelessRequest ...
type CreateFollowTxnStatelessResponse ¶
type CreateFollowTxnStatelessResponse struct { TotalInputNanos uint64 ChangeAmountNanos uint64 FeeNanos uint64 Transaction *lib.MsgBitCloutTxn TransactionHex string }
CreateFollowTxnStatelessResponse ...
type CreateLikeStatelessRequest ¶
type CreateLikeStatelessRequest struct { ReaderPublicKeyBase58Check string `safeForLogging:"true"` LikedPostHashHex string `safeForLogging:"true"` IsUnlike bool `safeForLogging:"true"` MinFeeRateNanosPerKB uint64 `safeForLogging:"true"` }
CreateLikeStatelessRequest ...
type CreateLikeStatelessResponse ¶
type CreateLikeStatelessResponse struct { TotalInputNanos uint64 ChangeAmountNanos uint64 FeeNanos uint64 Transaction *lib.MsgBitCloutTxn TransactionHex string }
CreateLikeStatelessResponse ...
type CreateNFTBidRequest ¶
type CreateNFTBidResponse ¶
type CreateNFTBidResponse struct { UpdaterPublicKeyBase58Check string `safeForLogging:"true"` NFTPostHashHex string `safeForLogging:"true"` SerialNumber int `safeForLogging:"true"` BidAmountNanos int `safeForLogging:"true"` TotalInputNanos uint64 ChangeAmountNanos uint64 FeeNanos uint64 Transaction *lib.MsgBitCloutTxn TransactionHex string }
type CreateNFTRequest ¶
type CreateNFTRequest struct { UpdaterPublicKeyBase58Check string `safeForLogging:"true"` NFTPostHashHex string `safeForLogging:"true"` NumCopies int `safeForLogging:"true"` NFTRoyaltyToCreatorBasisPoints int `safeForLogging:"true"` NFTRoyaltyToCoinBasisPoints int `safeForLogging:"true"` HasUnlockable bool `safeForLogging:"true"` IsForSale bool `safeForLogging:"true"` MinBidAmountNanos int `safeForLogging:"true"` MinFeeRateNanosPerKB uint64 `safeForLogging:"true"` }
type CreateNFTResponse ¶
type DeleteIdentityRequest ¶
type DeleteIdentityRequest struct{}
type DeleteIdentityResponse ¶
type DeleteIdentityResponse struct{}
type DiamondSenderResponse ¶
type DiamondSenderResponse struct { DiamondSenderProfile *ProfileEntryResponse DiamondLevel int64 }
type DiamondSenderSummaryResponse ¶
type DiamondSenderSummaryResponse struct { SenderPublicKeyBase58Check string ReceiverPublicKeyBase58Check string TotalDiamonds uint64 HighestDiamondLevel uint64 DiamondLevelMap map[uint64]uint64 ProfileEntryResponse *ProfileEntryResponse }
A DiamondSenderSummaryResponse is a response struct that rolls up all diamonds received by a user from a single sender into a nice, simple summary struct.
type ExchangeBitcoinRequest ¶
type ExchangeBitcoinRequest struct { // The public key of the user who we're creating the burn for. PublicKeyBase58Check string `safeForLogging:"true"` // Note: When BurnAmountSatoshis is negative, we assume that the user wants // to burn the maximum amount of satoshi she has available. BurnAmountSatoshis int64 `safeForLogging:"true"` FeeRateSatoshisPerKB int64 `safeForLogging:"true"` // We rely on the frontend to query the API and give us the response. // Doing it this way makes it so that we don't exhaust our quota on the // free tier. LatestBitcionAPIResponse *lib.BlockCypherAPIFullAddressResponse // The Bitcoin address we will be processing this transaction for. BTCDepositAddress string `safeForLogging:"true"` // Whether or not we should broadcast the transaction after constructing // it. This will also validate the transaction if it's set. // The client must provide SignedHashes which it calculates by signing // all the UnsignedHashes in the identity service Broadcast bool `safeForLogging:"true"` // Signed hashes from the identity service // One for each transaction input SignedHashes []string }
ExchangeBitcoinRequest ...
type ExchangeBitcoinResponse ¶
type ExchangeBitcoinResponse struct { TotalInputSatoshis uint64 BurnAmountSatoshis uint64 ChangeAmountSatoshis uint64 FeeSatoshis uint64 BitcoinTransaction *wire.MsgTx SerializedTxnHex string TxnHashHex string BitCloutTxnHashHex string UnsignedHashes []string }
ExchangeBitcoinResponse ...
type FilterAuditLog ¶
type FilterAuditLog struct { // Time at which the filter status was granted or removed. TimestampNanos uint64 // The filter type being updated Filter FilterType // Username and PKID of the admin who filtered the user. UpdaterUsername string UpdaterPKID *lib.PKID // The user who was filtered or had their filter removed. UpdatedUsername string UpdatedPKID *lib.PKID // Indicator of whether this request granted the filter status or removed it. IsRemoval bool }
type FilterType ¶
type FilterType uint32
const ( // The filter type associated with a filter audit log Whitelist FilterType = iota Graylist Blacklist )
type GeminiResponse ¶
type GeminiResponse struct {
Last string `json:"last"`
}
type GetAppStateRequest ¶
type GetAppStateRequest struct {
PublicKeyBase58Check string
}
type GetAppStateResponse ¶
type GetAppStateResponse struct { AmplitudeKey string AmplitudeDomain string MinSatoshisBurnedForProfileCreation uint64 IsTestnet bool SupportEmail string ShowProcessingSpinners bool HasStarterBitCloutSeed bool HasTwilioAPIKey bool CreateProfileFeeNanos uint64 CompProfileCreation bool DiamondLevelMap map[int64]uint64 HasWyreIntegration bool HasJumioIntegration bool USDCentsPerBitCloutExchangeRate uint64 JumioBitCloutNanos uint64 // Send back the password stored in our HTTPOnly cookie // so amplitude can track which passwords people are using Password string }
type GetBlockTemplateRequest ¶
type GetBlockTemplateRequest struct { PublicKeyBase58Check string // The number of headers the miner wants to receive. Each header will have a // random ExtraData associated with it, which gives it a unique MerkleRoot. // This ensures that different miners don't accidentally run through the same // search space. NumHeaders int64 // Defaults to zero, which allows it to remain backwards-compatible with miners // that use an older version. Setting version=1 allows miners to hash using 128-bit // nonces, which may be advantageous. HeaderVersion uint32 }
type GetBlockTemplateResponse ¶
type GetBlockTemplateResponse struct { Headers [][]byte // Each header returned has an ExtraData associated with it that was embedded // in the block reward and which must be returned when SubmitBlock is called. // // TODO: This field should really be renamed ExtraDatas in JSON, but doing so // would break miners that are still running with v0 headers, so we will wait // to change this until v0 headers are fully deprecated. ExtraDatas []uint64 `json:"ExtraNonces"` // An identifier that the node uses to map a call to SubmitBlock back to the // block that was used to generate the headers. BlockID string // The difficulty target expressed in hex DifficultyTargetHex string // These fields provide metadata for the admin tab. LatestBlockTemplateStats *lib.BlockTemplateStats }
type GetBuyBitCloutFeeBasisPointsResponse ¶
type GetBuyBitCloutFeeBasisPointsResponse struct {
BuyBitCloutFeeBasisPoints uint64
}
type GetDiamondsForPostResponse ¶
type GetDiamondsForPostResponse struct {
DiamondSenders []*DiamondSenderResponse
}
type GetDiamondsForPublicKeyResponse ¶
type GetDiamondsForPublicKeyResponse struct { DiamondSenderSummaryResponses []*DiamondSenderSummaryResponse TotalDiamonds uint64 }
type GetExchangeRateResponse ¶
type GetFollowsResponse ¶
type GetFollowsResponse struct { PublicKeyToProfileEntry map[string]*ProfileEntryResponse `safeForLogging:"true"` NumFollowers uint64 }
GetFollowsResponse ...
type GetFollowsStatelessRequest ¶
type GetFollowsStatelessRequest struct { // Either PublicKeyBase58Check or Username can be set by the client to specify // which user we're obtaining follows for // If both are specified, PublicKeyBase58Check will supercede PublicKeyBase58Check string `safeForLogging:"true"` Username string `safeForLogging:"true"` GetEntriesFollowingUsername bool `safeForLogging:"true"` // Public Key of the last follower / followee from the previous page LastPublicKeyBase58Check string `safeForLogging:"true"` // Number of records to fetch NumToFetch uint64 `safeForLogging:"true"` }
GetFollowsStatelessRequest ...
type GetFullTikTokURLRequest ¶
type GetFullTikTokURLRequest struct {
TikTokShortVideoID string
}
type GetFullTikTokURLResponse ¶
type GetFullTikTokURLResponse struct {
FullTikTokURL string
}
type GetGlobalParamsRequest ¶
type GetGlobalParamsRequest struct { }
type GetGlobalParamsResponse ¶
type GetGlobalParamsResponse struct { // The current exchange rate. USDCentsPerBitcoin uint64 `safeForLogging:"true"` // The current create profile fee CreateProfileFeeNanos uint64 `safeForLogging:"true"` // The current minimum fee the network will accept MinimumNetworkFeeNanosPerKB uint64 `safeForLogging:"true"` // The fee per copy of an NFT minted. CreateNFTFeeNanos uint64 `safeForLogging:"true"` // The maximum number of copies a single NFT can have. MaxCopiesPerNFT uint64 `safeForLogging:"true"` }
type GetHodlersForPublicKeyRequest ¶
type GetHodlersForPublicKeyRequest struct { // Either PublicKeyBase58Check or Username can be set by the client to specify // which user we're obtaining posts for // If both are specified, PublicKeyBase58Check will supercede PublicKeyBase58Check string `safeForLogging:"true"` Username string `safeForLogging:"true"` // Public Key of the last post from the previous page LastPublicKeyBase58Check string `safeForLogging:"true"` // Number of records to fetch NumToFetch uint64 `safeForLogging:"true"` // If true, fetch balance entries for your hodlings instead of balance entries for hodler's of your coin FetchHodlings bool // If true, fetch all hodlers/hodlings -- supercedes NumToFetch FetchAll bool }
type GetHodlersForPublicKeyResponse ¶
type GetHodlersForPublicKeyResponse struct { Hodlers []*BalanceEntryResponse LastPublicKeyBase58Check string }
type GetLikesForPostRequest ¶
type GetLikesForPostResponse ¶
type GetLikesForPostResponse struct {
Likers []*ProfileEntryResponse
}
type GetMessagesResponse ¶
type GetMessagesResponse struct { PublicKeyToProfileEntry map[string]*ProfileEntryResponse OrderedContactsWithMessages []*MessageContactResponse UnreadStateByContact map[string]bool NumberOfUnreadThreads int }
GetMessagesResponse ...
type GetMessagesStatelessRequest ¶
type GetMessagesStatelessRequest struct { PublicKeyBase58Check string `safeForLogging:"true"` // FetchAfterPublicKeyBase58Check specifies where to start // in the messages to begin fetching new messages. If set empty, // we start fetching threads from the most recent message. FetchAfterPublicKeyBase58Check string `safeForLogging:"true"` // NumToFetch specifies the number of message threads to return. Defaults to 20 // unless otherwise specified. NumToFetch uint64 `safeForLogging:"true"` // HoldersOnly when set true includes messages from holders. HoldersOnly bool `safeForLogging:"true"` // HoldingsOnly when set true includes messages from the user's holdings. HoldingsOnly bool `safeForLogging:"true"` // FollowersOnly when set true includes messages from the user's followers. FollowersOnly bool `safeForLogging:"true"` // FollowedOnly when set true includes messages from who the user follows. FollowingOnly bool `safeForLogging:"true"` // SortAlgorithm determines how the messages should be returned. Currently // it support time, clout, and followers based sorting. SortAlgorithm string `safeForLogging:"true"` }
GetMessagesStatelessRequest ...
type GetNFTBidsForNFTPostResponse ¶
type GetNFTBidsForNFTPostResponse struct { PostEntryResponse *PostEntryResponse NFTEntryResponses []*NFTEntryResponse BidEntryResponses []*NFTBidEntryResponse }
type GetNFTBidsForUserResponse ¶
type GetNFTBidsForUserResponse struct { NFTBidEntries []*NFTBidEntryResponse PublicKeyBase58CheckToProfileEntryResponse map[string]*ProfileEntryResponse PostHashHexToPostEntryResponse map[string]*PostEntryResponse }
type GetNFTCollectionSummaryResponse ¶
type GetNFTCollectionSummaryResponse struct { NFTCollectionResponse *NFTCollectionResponse SerialNumberToNFTEntryResponse map[uint64]*NFTEntryResponse }
type GetNFTEntriesForPostHashResponse ¶
type GetNFTEntriesForPostHashResponse struct {
NFTEntryResponses []*NFTEntryResponse
}
type GetNFTShowcaseRequest ¶
type GetNFTShowcaseRequest struct {
ReaderPublicKeyBase58Check string `safeForLogging:"true"`
}
type GetNFTShowcaseResponse ¶
type GetNFTShowcaseResponse struct {
NFTCollections []*NFTCollectionResponse
}
type GetNFTsForUserRequest ¶
type GetNFTsForUserResponse ¶
type GetNFTsForUserResponse struct {
NFTsMap map[string]*NFTEntryAndPostEntryResponse
}
type GetNextNFTShowcaseRequest ¶
type GetNextNFTShowcaseRequest struct{}
type GetNextNFTShowcaseResponse ¶
type GetNextNFTShowcaseResponse struct {
NextNFTShowcaseTstamp uint64
}
type GetNotificationsRequest ¶
type GetNotificationsRequest struct { // This is the index of the notification we want to start our paginated lookup at. We // will fetch up to "NumToFetch" notifications after it, ordered by index. If no // index is provided we will return the most recent posts. PublicKeyBase58Check string FetchStartIndex int64 NumToFetch int64 }
type GetNotificationsResponse ¶
type GetNotificationsResponse struct { Notifications []*TransactionMetadataResponse ProfilesByPublicKey map[string]*ProfileEntryResponse PostsByHash map[string]*PostEntryResponse }
type GetPostsDiamondedBySenderForReceiverRequest ¶
type GetPostsDiamondedBySenderForReceiverRequest struct { // Public key of the poster who received diamonds from the sender ReceiverPublicKeyBase58Check string // Username of Receiver ReceiverUsername string // Public key of the sender who gave diamonds to receiver SenderPublicKeyBase58Check string // Username of Sender SenderUsername string // Public key of the reader to get the post entry reader state ReaderPublicKeyBase58Check string // Start Post Hash Hex StartPostHashHex string // NumToFetch NumToFetch uint64 }
type GetPostsDiamondedBySenderForReceiverResponse ¶
type GetPostsDiamondedBySenderForReceiverResponse struct { // Map of diamond level to a list of post entry responses ordered by timestamp DiamondedPosts []*PostEntryResponse // Sum of all diamonds sender gave to receiver TotalDiamondsGiven uint64 ReceiverProfileEntryResponse *ProfileEntryResponse SenderProfileEntryResponse *ProfileEntryResponse }
type GetPostsForPublicKeyRequest ¶
type GetPostsForPublicKeyRequest struct { // Either PublicKeyBase58Check or Username can be set by the client to specify // which user we're obtaining posts for // If both are specified, PublicKeyBase58Check will supercede PublicKeyBase58Check string `safeForLogging:"true"` Username string `safeForLogging:"true"` ReaderPublicKeyBase58Check string `safeForLogging:"true"` // PostHashHex of the last post from the previous page LastPostHashHex string `safeForLogging:"true"` // Number of records to fetch NumToFetch uint64 `safeForLogging:"true"` MediaRequired bool `safeForLogging:"true"` }
GetPostsForPublicKeyRequest ...
type GetPostsForPublicKeyResponse ¶
type GetPostsForPublicKeyResponse struct { Posts []*PostEntryResponse `safeForLogging:"true"` LastPostHashHex string `safeForLogging:"true"` }
GetPostsForPublicKeyResponse ...
type GetPostsStatelessRequest ¶
type GetPostsStatelessRequest struct { // This is the PostHashHex of the post we want to start our paginated lookup at. We // will fetch up to "NumToFetch" posts after it, ordered by time stamp. If no // PostHashHex is provided we will return the most recent posts. PostHashHex string `safeForLogging:"true"` ReaderPublicKeyBase58Check string `safeForLogging:"true"` OrderBy string `safeForLogging:"true"` StartTstampSecs uint64 `safeForLogging:"true"` PostContent string `safeForLogging:"true"` NumToFetch int `safeForLogging:"true"` // Note: if the GetPostsForFollowFeed option is passed, FetchSubcomments is currently ignored // (fetching comments / subcomments for the follow feed is currently unimplemented) FetchSubcomments bool `safeForLogging:"true"` // This gets posts by people that ReaderPublicKeyBase58Check follows. GetPostsForFollowFeed bool `safeForLogging:"true"` // This gets posts by people that ReaderPublicKeyBase58Check follows. GetPostsForGlobalWhitelist bool `safeForLogging:"true"` // This gets posts sorted by clout GetPostsByClout bool `safeForLogging:"true"` // This only gets posts that include media, like photos and videos MediaRequired bool `safeForLogging:"true"` PostsByCloutMinutesLookback uint64 `safeForLogging:"true"` // If set to true, then the posts in the response will contain a boolean about whether they're in the global feed AddGlobalFeedBool bool `safeForLogging:"true"` }
GetPostsStatelessRequest ...
type GetPostsStatelessResponse ¶
type GetPostsStatelessResponse struct {
PostsFound []*PostEntryResponse
}
GetPostsStatelessResponse ...
type GetProfilesRequest ¶
type GetProfilesRequest struct { // When set, we return profiles starting at the given pubkey up to numEntriesToReturn. PublicKeyBase58Check string `safeForLogging:"true"` // When set, we return profiles starting at the given username up to numEntriesToReturn. Username string `safeForLogging:"true"` // When specified, we filter out all profiles that don't have this // string as a prefix on their username. UsernamePrefix string `safeForLogging:"true"` // When set, we filter out profiles that don't contain this string // in their Description field. Description string `safeForLogging:"true"` OrderBy string `safeForLogging:"true"` NumToFetch uint32 `safeForLogging:"true"` // Public key of the user viewing the profile (affects post entry reader state). ReaderPublicKeyBase58Check string `safeForLogging:"true"` // Moderation type (currently empty string or 'leaderboard'). Empty string is for default // moderation. 'Leaderboard' is a special subset of profiles only removed from the leaderboards. ModerationType string `safeForLogging:"true"` // If a single profile is requested, return a list of HODLers and amount they HODL. FetchUsersThatHODL bool `safeForLogging:"true"` // If set to true, then the posts in the response will contain a boolean about whether they're in the global feed AddGlobalFeedBool bool `safeForLogging:"true"` }
GetProfilesStatelessRequest ...
type GetProfilesResponse ¶
type GetProfilesResponse struct { ProfilesFound []*ProfileEntryResponse NextPublicKey *string }
GetProfilesResponse ...
type GetQuoteRecloutsForPostResponse ¶
type GetQuoteRecloutsForPostResponse struct {
QuoteReclouts []*PostEntryResponse
}
type GetRecloutsForPostResponse ¶
type GetRecloutsForPostResponse struct {
Reclouters []*ProfileEntryResponse
}
type GetSinglePostRequest ¶
type GetSinglePostRequest struct { // PostHashHex to fetch. PostHashHex string `safeForLogging:"true"` FetchParents bool `safeForLogging:"true"` CommentOffset uint32 `safeForLogging:"true"` CommentLimit uint32 `safeForLogging:"true"` ReaderPublicKeyBase58Check string `safeForLogging:"true"` // If set to true, then the posts in the response will contain a boolean about whether they're in the global feed AddGlobalFeedBool bool `safeForLogging:"true"` }
type GetSinglePostResponse ¶
type GetSinglePostResponse struct {
PostFound *PostEntryResponse
}
type GetSingleProfileRequest ¶
type GetSingleProfileRequest struct { // When set, we return profiles starting at the given pubkey up to numEntriesToReturn. PublicKeyBase58Check string `safeForLogging:"true"` // When set, we return profiles starting at the given username up to numEntriesToReturn. Username string `safeForLogging:"true"` }
type GetSingleProfileResponse ¶
type GetSingleProfileResponse struct { Profile *ProfileEntryResponse IsBlacklisted bool IsGraylisted bool }
type GetTxnRequest ¶
type GetTxnRequest struct { // TxnHash to fetch. TxnHashHex string `safeForLogging:"true"` }
type GetTxnResponse ¶
type GetTxnResponse struct {
TxnFound bool
}
type GetUSDCentsToBitCloutExchangeRateResponse ¶
type GetUSDCentsToBitCloutExchangeRateResponse struct {
USDCentsPerBitClout uint64
}
type GetUserGlobalMetadataRequest ¶
type GetUserGlobalMetadataRequest struct { // The public key of the user who is trying to update their metadata. UserPublicKeyBase58Check string `safeForLogging:"true"` // JWT token authenticates the user JWT string }
GetUserGlobalMetadataRequest...
type GetUserGlobalMetadataResponse ¶
GetUserGlobalMetadataResponse ...
type GetUsersResponse ¶
type GetUsersResponse struct { UserList []*User DefaultFeeRateNanosPerKB uint64 ParamUpdaters map[string]bool }
GetUsersResponse ...
type GetUsersStatelessRequest ¶
type GetUsersStatelessRequest struct { PublicKeysBase58Check []string `safeForLogging:"true"` SkipForLeaderboard bool `safeForLogging:"true"` }
GetUsersRequest ...
type GetWyreWalletOrderForPublicKeyResponse ¶
type GetWyreWalletOrderForPublicKeyResponse struct {
WyreWalletOrderMetadataResponses []*WyreWalletOrderMetadataResponse
}
type GlobalStateBatchGetRemoteRequest ¶
type GlobalStateBatchGetRemoteRequest struct {
KeyList [][]byte
}
type GlobalStateBatchGetRemoteResponse ¶
type GlobalStateBatchGetRemoteResponse struct {
ValueList [][]byte
}
type GlobalStateDeleteRemoteRequest ¶
type GlobalStateDeleteRemoteRequest struct {
Key []byte
}
type GlobalStateDeleteRemoteResponse ¶
type GlobalStateDeleteRemoteResponse struct { }
type GlobalStateGetRemoteRequest ¶
type GlobalStateGetRemoteRequest struct {
Key []byte
}
type GlobalStateGetRemoteResponse ¶
type GlobalStateGetRemoteResponse struct {
Value []byte
}
type GlobalStatePutRemoteResponse ¶
type GlobalStatePutRemoteResponse struct { }
type HeaderResponse ¶
type HeaderResponse struct { // The hash of the block that was queried. BlockHashHex string // Generally set to zero Version uint32 // Hash of the previous block in the chain. PrevBlockHashHex string // The merkle root of all the transactions contained within the block. TransactionMerkleRootHex string // The unix timestamp (in seconds) specifying when this block was // mined. TstampSecs uint64 // The height of the block this header corresponds to. Height uint64 // The Nonce and ExtraNonce combine to give miners 128 bits of entropy Nonce uint64 ExtraNonce uint64 }
HeaderResponse ...
type InputResponse ¶
InputResponse ...
type IsFolllowingPublicKeyResponse ¶
type IsFolllowingPublicKeyResponse struct {
IsFollowing bool
}
type IsHodlingPublicKeyResponse ¶
type IsHodlingPublicKeyResponse struct { IsHodling bool BalanceEntry *BalanceEntryResponse }
type JumioBeginRequest ¶
type JumioBeginResponse ¶
type JumioBeginResponse struct {
URL string
}
type JumioInitRequest ¶
type JumioInitResponse ¶
type KrakenResponse ¶
type KrakenResponse struct { Result struct { Ticker struct { LastPriceList []string `json:"c"` } `json:"XXBTZUSD"` } `json:"result"` }
type MessageContactResponse ¶
type MessageContactResponse struct { PublicKeyBase58Check string Messages []*MessageEntryResponse ProfileEntryResponse *ProfileEntryResponse // The number of messages this user has read from this contact. This is // used to show a notification badge for unread messages. NumMessagesRead int64 }
type MessageEntryResponse ¶
type NFTBidEntryResponse ¶
type NFTBidEntryResponse struct { PublicKeyBase58Check string ProfileEntryResponse *ProfileEntryResponse `json:",omitempty"` PostHashHex *string `json:",omitempty"` // likely nil if included in a list of NFTBidEntryResponses for a single NFT PostEntryResponse *PostEntryResponse `json:",omitempty"` SerialNumber uint64 `safeForLogging:"true"` BidAmountNanos uint64 `safeForLogging:"true"` // What is the highest bid and the lowest bid on this serial number HighestBidAmountNanos *uint64 `json:",omitempty"` LowestBidAmountNanos *uint64 `json:",omitempty"` // Current balance of this bidder. BidderBalanceNanos uint64 }
type NFTCollectionResponse ¶
type NFTCollectionResponse struct { ProfileEntryResponse *ProfileEntryResponse `json:",omitempty"` PostEntryResponse *PostEntryResponse `json:",omitempty"` HighestBidAmountNanos uint64 `safeForLogging:"true"` LowestBidAmountNanos uint64 `safeForLogging:"true"` NumCopiesForSale uint64 `safeForLogging:"true"` AvailableSerialNumbers []uint64 `safeForLogging:"true"` }
type NFTDropEntry ¶
type NFTEntryAndPostEntryResponse ¶
type NFTEntryAndPostEntryResponse struct { PostEntryResponse *PostEntryResponse NFTEntryResponses []*NFTEntryResponse }
type NFTEntryResponse ¶
type NFTEntryResponse struct { OwnerPublicKeyBase58Check string `safeForLogging:"true"` ProfileEntryResponse *ProfileEntryResponse `json:",omitempty"` PostEntryResponse *PostEntryResponse `json:",omitempty"` SerialNumber uint64 `safeForLogging:"true"` IsForSale bool `safeForLogging:"true"` MinBidAmountNanos uint64 `safeForLogging:"true"` LastAcceptedBidAmountNanos uint64 `safeForLogging:"true"` HighestBidAmountNanos uint64 `safeForLogging:"true"` LowestBidAmountNanos uint64 `safeForLogging:"true"` // These fields are only populated when the reader is the owner. LastOwnerPublicKeyBase58Check *string `json:",omitempty"` EncryptedUnlockableText *string `json:",omitempty"` }
type NodeControlRequest ¶
type NodeControlRequest struct { // An address in <IP>:<Port> format. Address string `safeForLogging:"true"` // A comma-separated list of miner public keys to use. MinerPublicKeys string `safeForLogging:"true"` // The type of operation to perform on the node. OperationType string `safeForLogging:"true"` JWT string AdminPublicKey string }
NodeControlRequest ...
type NodeControlResponse ¶
type NodeControlResponse struct { // The current status the BitClout node is at in terms of syncing the BitClout // chain. BitCloutStatus *NodeStatusResponse BitcoinStatus *NodeStatusResponse BitCloutOutboundPeers []*PeerResponse BitCloutInboundPeers []*PeerResponse BitCloutUnconnectedPeers []*PeerResponse BitcoinSyncPeer *PeerResponse BitcoinUnconnectedPeers []*PeerResponse BitcoinExchangeTxns []*BitcoinExchangeResponseInfo `safeForLogging:"true"` MinerPublicKeys []string }
NodeControlResponse ...
type NodeStatusResponse ¶
type NodeStatusResponse struct { // A summary of what the node is currently doing. State string `safeForLogging:"true"` // We generally track the latest header we have and the latest block we have // separately since headers-first synchronization can cause the latest header // to diverge slightly from the latest block. LatestHeaderHeight uint32 `safeForLogging:"true"` LatestHeaderHash string `safeForLogging:"true"` LatestHeaderTstampSecs uint32 `safeForLogging:"true"` LatestBlockHeight uint32 `safeForLogging:"true"` LatestBlockHash string `safeForLogging:"true"` LatestBlockTstampSecs uint32 `safeForLogging:"true"` LatestTxIndexHeight uint32 `safeForLogging:"true"` // This is non-zero unless the main header chain is fully current. It can be // an estimate in cases where we don't know exactly what the tstamp of the // current main chain is. HeadersRemaining uint32 `safeForLogging:"true"` // This is non-zero unless the main header chain is fully current and all // the corresponding blocks have been downloaded. BlocksRemaining uint32 `safeForLogging:"true"` }
type OutputResponse ¶
OutputResponse ...
type PeerResponse ¶
type PhoneNumberMetadata ¶
type PhoneNumberMetadata struct { // The PublicKey of the user that this phone number belongs to. PublicKey []byte // E.164 format phone number for a user to receive text notifications at. PhoneNumber string // Country code associated with the user's phone number. PhoneNumberCountryCode string // if true, when the public key associated with this metadata tries to create a profile, we will comp their fee. ShouldCompProfileCreation bool }
This struct contains all the metadata associated with a user's phone number.
type PostEntryResponse ¶
type PostEntryResponse struct { PostHashHex string PosterPublicKeyBase58Check string ParentStakeID string Body string ImageURLs []string RecloutedPostEntryResponse *PostEntryResponse CreatorBasisPoints uint64 StakeMultipleBasisPoints uint64 TimestampNanos uint64 IsHidden bool ConfirmationBlockHeight uint32 InMempool bool StakeEntry *StakeEntryResponse StakeEntryStats *lib.StakeEntryStats // The profile associated with this post. ProfileEntryResponse *ProfileEntryResponse // The comments associated with this post. Comments []*PostEntryResponse LikeCount uint64 DiamondCount uint64 // Information about the reader's state w/regard to this post (e.g. if they liked it). PostEntryReaderState *lib.PostEntryReaderState // True if this post hash hex is in the global feed. InGlobalFeed *bool `json:",omitempty"` // True if this post hash hex is pinned to the global feed. IsPinned *bool `json:",omitempty"` // PostExtraData stores an arbitrary map of attributes of a PostEntry PostExtraData map[string]string CommentCount uint64 RecloutCount uint64 QuoteRecloutCount uint64 // A list of parent posts for this post (ordered: root -> closest parent post). ParentPosts []*PostEntryResponse // NFT info. IsNFT bool NumNFTCopies uint64 NumNFTCopiesForSale uint64 HasUnlockable bool NFTRoyaltyToCreatorBasisPoints uint64 NFTRoyaltyToCoinBasisPoints uint64 // Number of diamonds the sender gave this post. Only set when getting diamond posts. DiamondsFromSender uint64 }
type ProfileEntryResponse ¶
type ProfileEntryResponse struct { // PublicKey is the key used by the user to sign for things and generally // verify her identity. PublicKeyBase58Check string Username string Description string IsHidden bool IsReserved bool IsVerified bool Comments []*PostEntryResponse Posts []*PostEntryResponse // Creator coin fields CoinEntry lib.CoinEntry // Include current price for the frontend to display. CoinPriceBitCloutNanos uint64 // TODO(DELETEME): Delete this field StakeMultipleBasisPoints uint64 // TODO(DELETEME): Delete this field StakeEntryStats *lib.StakeEntryStats // Profiles of users that hold the coin + their balances. UsersThatHODL []*BalanceEntryResponse }
type ReprocessBitcoinBlockResponse ¶
type ReprocessBitcoinBlockResponse struct {
Message string
}
type Route ¶
type Route struct { Name string Method []string Pattern string HandlerFunc http.HandlerFunc AccessLevel AccessLevel }
Route ...
type SendBitCloutRequest ¶
type SendBitCloutRequest struct { SenderPublicKeyBase58Check string `safeForLogging:"true"` RecipientPublicKeyOrUsername string `safeForLogging:"true"` AmountNanos int64 `safeForLogging:"true"` MinFeeRateNanosPerKB uint64 `safeForLogging:"true"` }
SendBitCloutRequest ...
type SendBitCloutResponse ¶
type SendBitCloutResponse struct { TotalInputNanos uint64 SpendAmountNanos uint64 ChangeAmountNanos uint64 FeeNanos uint64 TransactionIDBase58Check string Transaction *lib.MsgBitCloutTxn TransactionHex string TxnHashHex string }
SendBitCloutResponse ...
type SendDiamondsRequest ¶
type SendDiamondsRequest struct { // The public key of the user who is making the transfer. SenderPublicKeyBase58Check string `safeForLogging:"true"` // The public key or username of the user receiving the transferred creator coin. ReceiverPublicKeyBase58Check string `safeForLogging:"true"` // The number of diamonds to give the post. DiamondPostHashHex string `safeForLogging:"true"` // The number of diamonds to give the post. DiamondLevel int64 `safeForLogging:"true"` MinFeeRateNanosPerKB uint64 `safeForLogging:"true"` }
SendDiamondsRequest ...
type SendDiamondsResponse ¶
type SendDiamondsResponse struct { SpendAmountNanos uint64 TotalInputNanos uint64 ChangeAmountNanos uint64 FeeNanos uint64 Transaction *lib.MsgBitCloutTxn TransactionHex string TxnHashHex string }
SendDiamondsResponse ...
type SendMessageStatelessRequest ¶
type SendMessageStatelessRequest struct { SenderPublicKeyBase58Check string `safeForLogging:"true"` RecipientPublicKeyBase58Check string `safeForLogging:"true"` MessageText string EncryptedMessageText string MinFeeRateNanosPerKB uint64 `safeForLogging:"true"` }
SendMessageStatelessRequest ...
type SendMessageStatelessResponse ¶
type SendMessageStatelessResponse struct { TstampNanos uint64 TotalInputNanos uint64 ChangeAmountNanos uint64 FeeNanos uint64 Transaction *lib.MsgBitCloutTxn TransactionHex string }
SendMessageStatelessResponse ...
type SendPhoneNumberVerificationTextResponse ¶
type SendPhoneNumberVerificationTextResponse struct { }
type SetBuyBitCloutFeeBasisPointsResponse ¶
type SetBuyBitCloutFeeBasisPointsResponse struct {
BuyBitCloutFeeBasisPoints uint64
}
type SetUSDCentsToBitCloutExchangeRateResponse ¶
type SetUSDCentsToBitCloutExchangeRateResponse struct {
USDCentsPerBitClout uint64
}
type SingleStakeResponse ¶
type StakeEntryResponse ¶
type StakeEntryResponse struct { TotalPostStake uint64 StakeList []*SingleStakeResponse }
type SubmitBlockRequest ¶
type SubmitBlockResponse ¶
SubmitBlockResponse ...
type SubmitPhoneNumberVerificationCodeResponse ¶
type SubmitPhoneNumberVerificationCodeResponse struct {
TxnHashHex string
}
type SubmitPostRequest ¶
type SubmitPostRequest struct { // The public key of the user who made the post or the user // who is subsequently is modifying the post. UpdaterPublicKeyBase58Check string `safeForLogging:"true"` // Optional. Set when modifying a post as opposed to creating one // from scratch. PostHashHexToModify string `safeForLogging:"true"` // The parent post or profile. This is used for comments. ParentStakeID string `safeForLogging:"true"` // The body of this post. BodyObj *lib.BitCloutBodySchema // The PostHashHex of the post being reclouted RecloutedPostHashHex string `safeForLogging:"true"` // ExtraData object to hold arbitrary attributes of a post. PostExtraData map[string]string `safeForLogging:"true"` // When set to true the post will be hidden. IsHidden bool `safeForLogging:"true"` MinFeeRateNanosPerKB uint64 `safeForLogging:"true"` }
SubmitPostRequest ...
type SubmitPostResponse ¶
type SubmitPostResponse struct { TstampNanos uint64 `safeForLogging:"true"` PostHashHex string `safeForLogging:"true"` TotalInputNanos uint64 ChangeAmountNanos uint64 FeeNanos uint64 Transaction *lib.MsgBitCloutTxn TransactionHex string }
SubmitPostResponse ...
type SubmitTransactionRequest ¶
type SubmitTransactionRequest struct {
TransactionHex string `safeForLogging:"true"`
}
type SubmitTransactionResponse ¶
type SubmitTransactionResponse struct { Transaction *lib.MsgBitCloutTxn TxnHashHex string // include the PostEntryResponse if a post was submitted PostEntryResponse *PostEntryResponse }
type SwapIdentityRequest ¶
type SwapIdentityRequest struct { // This is currently paramUpdater only UpdaterPublicKeyBase58Check string `safeForLogging:"true"` // Either a username or a public key works. If it starts with BC and // is over the username limit it will be interpreted as a username. FromUsernameOrPublicKeyBase58Check string `safeForLogging:"true"` // Either a username or a public key works. If it starts with BC and // // is over the username limit it will be interpreted as a username. ToUsernameOrPublicKeyBase58Check string `safeForLogging:"true"` MinFeeRateNanosPerKB uint64 `safeForLogging:"true"` }
SwapIdentityRequest ...
type SwapIdentityResponse ¶
type SwapIdentityResponse struct { TotalInputNanos uint64 ChangeAmountNanos uint64 FeeNanos uint64 Transaction *lib.MsgBitCloutTxn TransactionHex string }
SwapIdentityResponse ...
type TransactionInfo ¶
type TransactionInfo struct { TotalInputNanos uint64 SpendAmountNanos uint64 ChangeAmountNanos uint64 FeeNanos uint64 TransactionIDBase58Check string // These are Base58Check encoded RecipientPublicKeys []string RecipientAmountsNanos []uint64 TransactionHex string // Unix timestamp (seconds since epoch). TimeAdded int64 }
type TransactionInfoResponse ¶
type TransactionInfoResponse struct { // The sum of the inputs TotalInputNanos uint64 // The amount being sent to the “RecipientPublicKeyBase58Check” SpendAmountNanos uint64 // The amount being returned to the “SenderPublicKeyBase58Check” ChangeAmountNanos uint64 // The total fee and the fee rate (in nanos per KB) that was used for this // transaction. FeeNanos uint64 FeeRateNanosPerKB uint64 // Will match the public keys passed as params. Note that // SenderPublicKeyBase58Check receives the change from this transaction. SenderPublicKeyBase58Check string RecipientPublicKeyBase58Check string }
TransactionInfoResponse contains information about the transaction that is computed for convenience.
type TransactionMetadataResponse ¶
type TransactionMetadataResponse struct { Metadata *lib.TransactionMetadata TxnOutputResponses []*OutputResponse Txn *TransactionResponse Index int64 }
type TransactionResponse ¶
type TransactionResponse struct { // A string that uniquely identifies this transaction. This is a sha256 hash // of the transaction’s data encoded using base58 check encoding. TransactionIDBase58Check string // The raw hex of the transaction data. This can be fully-constructed from // the human-readable portions of this object. RawTransactionHex string `json:",omitempty"` // The inputs and outputs for this transaction. Inputs []*InputResponse `json:",omitempty"` Outputs []*OutputResponse `json:",omitempty"` // The signature of the transaction in hex format. SignatureHex string `json:",omitempty"` // Will always be “0” for basic transfers TransactionType string `json:",omitempty"` // The hash of the block in which this transaction was mined. If the // transaction is unconfirmed, this field will be empty. To look up // how many confirmations a transaction has, simply plug this value // into the "block" endpoint. BlockHashHex string `json:",omitempty"` TransactionMetadata *lib.TransactionMetadata `json:",omitempty"` }
TransactionResponse ... TODO: This is redundant with TransactionInfo in frontend_utils.
func APITransactionToResponse ¶
func APITransactionToResponse( txnn *lib.MsgBitCloutTxn, txnMeta *lib.TransactionMetadata, params *lib.BitCloutParams) *TransactionResponse
APITransactionToResponse converts a raw BitClout transaction message to an object that can be easily JSON serialized.
type TransferCreatorCoinRequest ¶
type TransferCreatorCoinRequest struct { // The public key of the user who is making the transfer. SenderPublicKeyBase58Check string `safeForLogging:"true"` // The public key of the profile for the creator coin that the user is transferring. CreatorPublicKeyBase58Check string `safeForLogging:"true"` // The public key or username of the user receiving the transferred creator coin. ReceiverUsernameOrPublicKeyBase58Check string `safeForLogging:"true"` // The amount of creator coins to transfer in nanos. CreatorCoinToTransferNanos uint64 `safeForLogging:"true"` MinFeeRateNanosPerKB uint64 `safeForLogging:"true"` }
TransferCreatorCoinRequest ...
type TransferCreatorCoinResponse ¶
type TransferCreatorCoinResponse struct { SpendAmountNanos uint64 TotalInputNanos uint64 ChangeAmountNanos uint64 FeeNanos uint64 Transaction *lib.MsgBitCloutTxn TransactionHex string TxnHashHex string }
TransferCreatorCoinResponse ...
type UTXOEntryResponse ¶
type UTXOEntryResponse struct { // A string that uniquely identifies a previous transaction. This is // a sha256 hash of the transaction’s information encoded using // base58 check encoding. TransactionIDBase58Check string // The index within this transaction that corresponds to an output // spendable by the passed-in public key. Index int64 // The amount that is spendable by this UTXO in “nanos”. AmountNanos uint64 // The pulic key entitled to spend the amount stored in this UTXO. PublicKeyBase58Check string // The number of confirmations this UTXO has. Set to zero if the // UTXO is unconfirmed. Confirmations int64 // Whether or not this UTXO was a block reward. UtxoType string BlockHeight int64 }
UTXOEntryResponse ... TODO: There is a slightly different but redundant definition of this in frontend_utils.go
type UpdateGlobalParamsRequest ¶
type UpdateGlobalParamsRequest struct { UpdaterPublicKeyBase58Check string `safeForLogging:"true"` // The new exchange rate to set. USDCentsPerBitcoin int64 `safeForLogging:"true"` // The fee to create a profile. CreateProfileFeeNanos int64 `safeForLogging:"true"` // The fee per copy of an NFT minted. CreateNFTFeeNanos int64 `safeForLogging:"true"` // The maximum number of copies a single NFT can have. MaxCopiesPerNFT int64 `safeForLogging:"true"` // The new minimum fee the network will accept MinimumNetworkFeeNanosPerKB int64 `safeForLogging:"true"` MinFeeRateNanosPerKB uint64 `safeForLogging:"true"` // Can be left unset when Signature is false or if the user legitimately // doesn't have a password. Can also be left unset if the user has logged // in recently as the password will be stored in memory. Password string // Whether or not we should sign the transaction after constructing it. // Setting this flag to false is useful in // cases where the caller just wants to construct the transaction // to see what the fees will be, for example. Sign bool `safeForLogging:"true"` // Whether or not we should fully validate the transaction. Validate bool `safeForLogging:"true"` // Whether or not we should broadcast the transaction after constructing // it. This will also validate the transaction if it's set. Broadcast bool `safeForLogging:"true"` }
UpdateGlobalParamsRequest ...
type UpdateGlobalParamsResponse ¶
type UpdateGlobalParamsResponse struct { TotalInputNanos uint64 ChangeAmountNanos uint64 FeeNanos uint64 Transaction *lib.MsgBitCloutTxn TransactionHex string }
UpdateGlobalParamsResponse ...
type UpdateNFTRequest ¶
type UpdateNFTRequest struct { UpdaterPublicKeyBase58Check string `safeForLogging:"true"` NFTPostHashHex string `safeForLogging:"true"` SerialNumber int `safeForLogging:"true"` IsForSale bool `safeForLogging:"true"` MinBidAmountNanos int `safeForLogging:"true"` MinFeeRateNanosPerKB uint64 `safeForLogging:"true"` }
type UpdateNFTResponse ¶
type UpdateProfileRequest ¶
type UpdateProfileRequest struct { // The public key of the user who is trying to update their profile. UpdaterPublicKeyBase58Check string `safeForLogging:"true"` // This is only set when the user wants to modify a profile // that isn't theirs. Otherwise, the UpdaterPublicKeyBase58Check is // assumed to own the profile being updated. ProfilePublicKeyBase58Check string `safeForLogging:"true"` NewUsername string `safeForLogging:"true"` NewDescription string `safeForLogging:"true"` // The profile pic string encoded as a link e.g. // data:image/png;base64,<data in base64> NewProfilePic string NewCreatorBasisPoints uint64 `safeForLogging:"true"` NewStakeMultipleBasisPoints uint64 `safeForLogging:"true"` IsHidden bool `safeForLogging:"true"` MinFeeRateNanosPerKB uint64 `safeForLogging:"true"` }
UpdateProfileRequest ...
type UpdateProfileResponse ¶
type UpdateProfileResponse struct { TotalInputNanos uint64 ChangeAmountNanos uint64 FeeNanos uint64 Transaction *lib.MsgBitCloutTxn TransactionHex string TxnHashHex string }
UpdateProfileResponse ...
type UpdateUserGlobalMetadataRequest ¶
type UpdateUserGlobalMetadataRequest struct { // The public key of the user who is trying to update their metadata. UserPublicKeyBase58Check string `safeForLogging:"true"` // JWT token authenticates the user JWT string // User's email for receiving notifications. Email string // A map of ContactPublicKeyBase58Check keys and number of read messages int values. MessageReadStateUpdatesByContact map[string]int }
UpdateUserGlobalMetadataRequest...
type UpdateUserGlobalMetadataResponse ¶
type UpdateUserGlobalMetadataResponse struct{}
UpdateUserGlobalMetadataResponse ...
type UploadImageResponse ¶
type UploadImageResponse struct { // Location of the image after upload ImageURL string }
type User ¶
type User struct { // The public key for the user is computed from the seed using the exact // parameters used to generate the BTC deposit address below. Because // of this, the BitClout private and public key pair is also the key // pair corresponding to the BTC address above. We store this same // key in base58 format above for convenience in communicating with // the FE. PublicKeyBase58Check string ProfileEntryResponse *ProfileEntryResponse Utxos []*UTXOEntryResponse BalanceNanos uint64 UnminedBalanceNanos uint64 PublicKeysBase58CheckFollowedByUser []string UsersYouHODL []*BalanceEntryResponse UsersWhoHODLYouCount int // HasPhoneNumber is a computed boolean so we can avoid returning the phone number in the // API response, since phone numbers are sensitive PII. HasPhoneNumber bool CanCreateProfile bool BlockedPubKeys map[string]struct{} HasEmail bool EmailVerified bool // JumioStartTime = Time user requested to initiate Jumio flow JumioStartTime uint64 // JumioFinishedTime = Time user completed flow in Jumio JumioFinishedTime uint64 // JumioVerified = user was verified from Jumio flow JumioVerified bool // JumioReturned = jumio webhook called JumioReturned bool // Is this user an admin IsAdmin bool // Is th user a super admin IsSuperAdmin bool // Is this user blacklisted/graylisted IsBlacklisted bool IsGraylisted bool }
User ...
type UserMetadata ¶
type UserMetadata struct { // The PublicKey of the user this metadata is associated with. PublicKey []byte // True if this user should be hidden from all data returned to the app. RemoveEverywhere bool // True if this user should be hidden from the creator leaderboard. RemoveFromLeaderboard bool // Email address for a user to receive email notifications at. Email string // Has the email been verified EmailVerified bool // E.164 format phone number for a user to receive text notifications at. PhoneNumber string // Country code associated with the user's phone number. This is a string like "US" PhoneNumberCountryCode string // This map stores the number of messages that a user has read from a specific contact. // The map is indexed with the contact's PublicKeyBase58Check and maps to an integer // number of messages that the user has read. MessageReadStateByContact map[string]int // Store the index of the last notification that the user saw NotificationLastSeenIndex int64 // Amount of Bitcoin that users have burned so far via the Buy BitClout UI // // We track this so that, if the user does multiple burns, // we can set HasBurnedEnoughSatoshisToCreateProfile based on the total // // This tracks the "total input satoshis" (i.e. it includes fees the user spends). // Including fees makes it less expensive for a user to make a profile. We're cutting // users a break, but we could change this later. SatoshisBurnedSoFar uint64 // True if the user has burned enough satoshis to create a profile. This can be // set to true from the BurnBitcoinStateless endpoint or canUserCreateProfile. // // We store this (instead of computing it when the user loads the page) to avoid issues // where the user burns the required amount, and then we reboot the node and change the min // satoshis required, and then the user hasn't burned enough. Once a user has burned enough, // we want him to be allowed to create a profile forever. HasBurnedEnoughSatoshisToCreateProfile bool // Map of public keys of profiles this user has blocked. The map here functions as a hashset to make look ups more // efficient. Values are empty structs to keep memory usage down. BlockedPublicKeys map[string]struct{} // If true, this user's posts will automatically be added to the global whitelist (max 5 per day). WhitelistPosts bool // JumioInternalReference = internal tracking reference for user's experience in Jumio JumioInternalReference string // JumioFinishedTime = has user completed flow in Jumio JumioFinishedTime uint64 // JumioVerified = user was verified from Jumio flow JumioVerified bool // JumioReturned = jumio webhook called JumioReturned bool // JumioTransactionID = jumio's tracking number for the transaction in which this user was verified. JumioTransactionID string // JumioDocumentKey = Country - Document Type - Document SubType - Document Number. Helps uniquely identify users // and allows us to reset Jumio for a given user. // DEPRECATED JumioDocumentKey []byte // RedoJumio = boolean which allows user to skip the duplicate ID check in JumioCallback RedoJumio bool // JumioStarterBitCloutTxnHashHex = Txn hash hex of the transaction in which the user was paid for // going through the Jumio flow JumioStarterBitCloutTxnHashHex string // JumioShouldCompProfileCreation = True if we should comp the create profile fee because the user went through the // Jumio flow. JumioShouldCompProfileCreation bool // MustPurchaseCreatorCoin = set to true if a user gets money from Jumio or Twilio flow and prevents user from // performing a basic transfer before purchasing a creator coin. MustPurchaseCreatorCoin bool // HasPurchasedCreatorCoin = set to true if user has purchased a creator coin, allows them to perform basic transfer // after getting free CLOUT. HasPurchasedCreatorCoin bool }
This struct contains all the metadata associated with a user's public key.
type VerificationUsernameAuditLog ¶
type VerificationUsernameAuditLog struct { // Time at which the verification was granted or removed. TimestampNanos uint64 // Username and PKID of the admin who verified the user. VerifierUsername string VerifierPKID *lib.PKID // The user who was verified or had their verification removed. VerifiedUsername string VerifiedPKID *lib.PKID // Indicator of whether this request granted verification or removed verification. IsRemoval bool }
type VerificationUsernameAuditLogResponse ¶
type VerificationUsernameAuditLogResponse struct { TimestampNanos uint64 VerifierUsername string VerifierPublicKeyBase58Check string VerifiedUsername string VerifiedPublicKeyBase58Check string IsRemoval bool }
VerificationUsernameAuditLogResponse format
type VerifiedUsernameToPKID ¶
Type used for gob decoding and encoding verification mapping
type VerifyEmailRequest ¶
type WyreTrackOrderResponse ¶
type WyreTrackOrderResponse struct { TransferId string `json:"transferId"` FeeCurrency string `json:"feeCurrency"` Fee float64 `json:"fee"` Fees struct { BTC float64 `json:"BTC"` USD float64 `json:"USD"` } `json:"fees"` SourceCurrency string `json:"sourceCurrency"` DestCurrency string `json:"destCurrency"` SourceAmount float64 `json:"sourceAmount"` DestAmount float64 `json:"destAmount"` DestSrn string `json:"destSrn"` From string `json:"from"` To interface{} `json:"to"` Rate float64 `json:"rate"` CustomId interface{} `json:"customId"` Status interface{} `json:"status"` BlockchainNetworkTx interface{} `json:"blockchainNetworkTx"` Message interface{} `json:"message"` TransferHistoryEntryType string `json:"transferHistoryEntryType"` SuccessTimeline []struct { StatusDetails string `json:"statusDetails"` State string `json:"state"` CreatedAt int64 `json:"createdAt"` } `json:"successTimeline"` FailedTimeline []interface{} `json:"failedTimeline"` FailureReason interface{} `json:"failureReason"` ReversalReason interface{} `json:"reversalReason"` }
type WyreTransferDetails ¶
type WyreTransferDetails struct { Owner string `json:"owner"` ReversingSubStatus interface{} `json:"reversingSubStatus"` Source string `json:"source"` PendingSubStatus interface{} `json:"pendingSubStatus"` Status string `json:"status"` ReversalReason interface{} `json:"reversalReason"` CreatedAt int64 `json:"createdAt"` SourceAmount float64 `json:"sourceAmount"` DestCurrency string `json:"destCurrency"` SourceCurrency string `json:"sourceCurrency"` StatusHistories []struct { Id string `json:"id"` TransferId string `json:"transferId"` CreatedAt int64 `json:"createdAt"` Type string `json:"type"` StatusOrder int `json:"statusOrder"` StatusDetail string `json:"statusDetail"` State string `json:"state"` FailedState interface{} `json:"failedState"` } `json:"statusHistories"` BlockchainTx struct { Id string `json:"id"` NetworkTxId string `json:"networkTxId"` CreatedAt int64 `json:"createdAt"` Confirmations int `json:"confirmations"` TimeObserved int64 `json:"timeObserved"` BlockTime int64 `json:"blockTime"` Blockhash string `json:"blockhash"` Amount float64 `json:"amount"` Direction string `json:"direction"` NetworkFee float64 `json:"networkFee"` Address string `json:"address"` SourceAddress interface{} `json:"sourceAddress"` Currency string `json:"currency"` TwinTxId interface{} `json:"twinTxId"` } `json:"blockchainTx"` ExpiresAt int64 `json:"expiresAt"` CompletedAt int64 `json:"completedAt"` CancelledAt interface{} `json:"cancelledAt"` FailureReason interface{} `json:"failureReason"` UpdatedAt int64 `json:"updatedAt"` ExchangeRate float64 `json:"exchangeRate"` DestAmount float64 `json:"destAmount"` Fees struct { BTC int `json:"BTC"` USD float64 `json:"USD"` } `json:"fees"` TotalFees float64 `json:"totalFees"` CustomId string `json:"customId"` Dest string `json:"dest"` Message interface{} `json:"message"` Id string `json:"id"` }
type WyreWalletOrderFullDetails ¶
type WyreWalletOrderFullDetails struct { Id string `json:"id"` CreatedAt uint64 `json:"createdAt"` Owner string `json:"owner"` Status string `json:"status"` OrderType string `json:"orderType"` SourceAmount float64 `json:"sourceAmount"` PurchaseAmount float64 `json:"purchaseAmount"` SourceCurrency string `json:"sourceCurrency"` DestCurrency string `json:"destCurrency"` TransferId string `json:"transferId"` Dest string `json:"dest"` AuthCodesRequested bool `json:"authCodesRequested"` ErrorCategory string `json:"errorCategory"` ErrorCode string `json:"errorCode"` ErrorMessage string `json:"errorMessage"` FailureReason string `json:"failureReason"` AccountId string `json:"accountId"` PaymentNetworkErrorCode string `json:"paymentNetworkErrorCode"` InternalErrorCode string `json:"internalErrorCode"` }
type WyreWalletOrderMetadata ¶
type WyreWalletOrderMetadata struct { // Last payload received from Wyre webhook LatestWyreWalletOrderWebhookPayload WyreWalletOrderWebhookPayload // Track Wallet Order response received based on the last payload received from Wyre Webhook LatestWyreTrackWalletOrderResponse *WyreTrackOrderResponse // Amount of BitClout that was sent for this WyreWalletOrder BitCloutPurchasedNanos uint64 // BlockHash of the transaction for sending the BitClout BasicTransferTxnBlockHash *lib.BlockHash }
type WyreWalletOrderMetadataResponse ¶
type WyreWalletOrderMetadataResponse struct { // Last payload received from Wyre webhook LatestWyreWalletOrderWebhookPayload WyreWalletOrderWebhookPayload // Track Wallet Order response received based on the last payload received from Wyre Webhook LatestWyreTrackWalletOrderResponse *WyreTrackOrderResponse // Amount of BitClout that was sent for this WyreWalletOrder BitCloutPurchasedNanos uint64 // BlockHash of the transaction for sending the BitClout BasicTransferTxnHash string Timestamp *time.Time }
func WyreWalletOrderMetadataToResponse ¶
func WyreWalletOrderMetadataToResponse(metadata *WyreWalletOrderMetadata) *WyreWalletOrderMetadataResponse
type WyreWalletOrderQuotationPayload ¶
type WyreWalletOrderQuotationPayload struct { SourceCurrency string `json:"sourceCurrency"` Dest string `json:"dest"` DestCurrency string `json:"destCurrency"` AmountIncludeFees bool `json:"amountIncludeFees"` Country string `json:"country"` SourceAmount string `json:"sourceAmount"` WalletType string `json:"walletType"` AccountId string `json:"accountId"` }
type WyreWalletOrderReservationPayload ¶
type WyreWalletOrderReservationPayload struct { SourceCurrency string `json:"sourceCurrency"` Dest string `json:"dest"` DestCurrency string `json:"destCurrency"` AmountIncludeFees bool `json:"amountIncludeFees"` Country string `json:"country"` SourceAmount string `json:"sourceAmount"` PaymentMethod string `json:"paymentMethod"` ReferrerAccountId string `json:"referrerAccountId"` LockFields []string `json:"lockFields"` RedirectUrl string `json:"redirectUrl"` ReferenceId string `json:"referenceId"` }
type WyreWalletOrderWebhookPayload ¶
type WyreWalletOrderWebhookPayload struct { // referenceId holds the public key of the user who made initiated the wallet order ReferenceId string `json:"referenceId"` AccountId string `json:"accountId"` OrderId string `json:"orderId"` OrderStatus string `json:"orderStatus"` TransferId string `json:"transferId"` FailedReason string `json:"failedReason"` }