Documentation ¶
Index ¶
- Constants
- Variables
- func APIAddError(ww http.ResponseWriter, errorString string)
- func AddHeaders(inner http.Handler, allowedOrigins []string) http.Handler
- func CheckTransactionFeeForDuplicatePublicKeys(newTransactionFees []TransactionFee) error
- func CheckTxnForCreatePost(txn *lib.MsgDeSoTxn) (_isCreatePostTxn bool, _postHashCreated *lib.BlockHash)
- 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 GetPostHashToScoreForTxn(txn *lib.MsgDeSoTxn, utxoView *lib.UtxoView) (_postHashScored *lib.BlockHash, _posterPKID *lib.PKID)
- func GetUSDToBTCPrice() (float64, error)
- func GlobalStateKeyETHPurchases(txnHash string) []byte
- func GlobalStateKeyExemptPublicKey(publicKey []byte) []byte
- func GlobalStateKeyForBlacklistAuditLogs(username string) []byte
- func GlobalStateKeyForBlacklistedProfile(profilePubKey []byte) []byte
- func GlobalStateKeyForBuyDeSoFeeBasisPoints() []byte
- func GlobalStateKeyForCountryCodeToCountrySignUpBonus(countryCode string) []byte
- func GlobalStateKeyForCountryIDDocumentTypeSubTypeDocumentNumber(countryID string, documentType string, subType string, documentNumber string) []byte
- func GlobalStateKeyForGraylistAuditLogs(username string) []byte
- func GlobalStateKeyForGraylistedProfile(profilePubKey []byte) []byte
- func GlobalStateKeyForHotFeedApprovedPostOp(opTimestampNanos uint64, postHash *lib.BlockHash) []byte
- func GlobalStateKeyForHotFeedPKIDMultiplierOp(opTimestampNanos uint64, opPKID *lib.PKID) []byte
- func GlobalStateKeyForJumioDeSoNanos() []byte
- func GlobalStateKeyForJumioUSDCents() []byte
- func GlobalStateKeyForNFTDropEntry(dropNumber uint64) []byte
- func GlobalStateKeyForPKIDReferralHashRefereePKID(pkid *lib.PKID, referralHash []byte, refereePKID *lib.PKID) []byte
- func GlobalStateKeyForPKIDReferralHashToIsActive(pkid *lib.PKID, referralHashBytes []byte) []byte
- func GlobalStateKeyForPKIDTstampnanosToJumioTransaction(pkid *lib.PKID, timestampNanos uint64) []byte
- func GlobalStateKeyForPhoneNumberStringToPhoneNumberMetadata(phoneNumber string) (_key []byte, _err error)
- func GlobalStateKeyForPublicKeyToUserMetadata(profilePubKey []byte) []byte
- func GlobalStateKeyForReferralHashToReferralInfo(referralHashBytes []byte) []byte
- func GlobalStateKeyForTimestampPKIDReferralHashRefereePKID(tstampNanos uint64, pkid *lib.PKID, referralHash []byte, refereePKID *lib.PKID) []byte
- func GlobalStateKeyForTstampPinnedPostHash(tstampNanos uint64, postHash *lib.BlockHash) []byte
- func GlobalStateKeyForTstampPostHash(tstampNanos uint64, postHash *lib.BlockHash) []byte
- func GlobalStateKeyForUSDCentsToDeSoReserveExchangeRate() []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 GlobalStateKeyTransactionFeeOutputsFromTxnType(txnType lib.TxnType) []byte
- func GlobalStateKeyUpAndComingTutorialCreators(pkid *lib.PKID) []byte
- func GlobalStateKeyWellKnownTutorialCreators(pkid *lib.PKID) []byte
- func GlobalStatePrefixforPKIDTstampnanosToJumioTransaction(pkid *lib.PKID) []byte
- func GlobalStateSeekKeyForHotFeedApprovedPostOps(startTimestampNanos uint64) []byte
- func GlobalStateSeekKeyForHotFeedPKIDMultiplierOps(startTimestampNanos uint64) []byte
- func GlobalStateSeekKeyForPKIDReferralHashRefereePKIDs(pkid *lib.PKID, referralHash []byte) []byte
- func GlobalStateSeekKeyForPKIDReferralHashes(pkid *lib.PKID) []byte
- func GlobalStateSeekKeyForTstampPostHash(tstampNanos uint64) []byte
- func IsRestrictedPubKey(userGraylistState []byte, userBlacklistState []byte, moderationType string) bool
- func Logger(inner http.Handler, name string) http.Handler
- func NotificationTxnShouldBeIncluded(txnMeta *lib.TransactionMetadata, ...) bool
- func RefereeCSVHeaders() (_headers []string)
- func ReferralCSVHeaders() (_headers []string)
- func ShuffleKeys(records *[][]byte)
- func TransformAndEncodeTransactionFees(transactionFees []TransactionFee) (_outputs []*lib.DeSoOutput, _buf *bytes.Buffer, _err error)
- func TransformTransactionFeesToOutputs(transactionFees []TransactionFee) (_outputs []*lib.DeSoOutput, _err 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) APITransferDeSo(ww http.ResponseWriter, rr *http.Request)
- func (fes *APIServer) AcceptNFTBid(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AcceptNFTTransfer(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AdminAddExemptPublicKey(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AdminCreateReferralHash(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AdminDownloadRefereeCSV(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AdminDownloadReferralCSV(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AdminGetAllCountryLevelSignUpBonuses(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AdminGetAllReferralInfoForUser(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AdminGetAllUserGlobalMetadata(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AdminGetExemptPublicKeys(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AdminGetHotFeedAlgorithm(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AdminGetHotFeedUserMultiplier(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) AdminGetTransactionFeeMap(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AdminGetTutorialCreators(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AdminGetUnfilteredHotFeed(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) AdminJumioCallback(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AdminPinPost(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AdminProcessETHTx(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) AdminResetTutorialStatus(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AdminSetAllTransactionFees(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AdminSetTransactionFeeForTransactionType(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AdminUpdateGlobalFeed(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AdminUpdateHotFeedAlgorithm(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AdminUpdateHotFeedPostMultiplier(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AdminUpdateHotFeedUserMultiplier(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AdminUpdateJumioCountrySignUpBonus(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AdminUpdateJumioDeSo(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AdminUpdateJumioUSDCents(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AdminUpdateNFTDrop(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AdminUpdateReferralHash(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AdminUpdateTutorialCreator(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AdminUpdateUserGlobalMetadata(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AdminUploadReferralCSV(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AppendExtraData(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) AuthorizeDerivedKey(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) BlockPublicKey(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) BurnNFT(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) BuyOrSellCreatorCoin(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) CalculateNanosPurchasedFromWei(value string) (_nanosPurchased uint64, _err error)
- func (fes *APIServer) CheckAdminPublicKey(inner http.Handler, AccessLevel AccessLevel) http.Handler
- func (fes *APIServer) CompProfileCreation(profilePublicKey []byte, userMetadata *UserMetadata, utxoView *lib.UtxoView) (_additionalFee uint64, _txnHash *lib.BlockHash, _err error)
- func (fes *APIServer) CopyHotFeedApprovedPostsMap() map[lib.BlockHash]float64
- func (fes *APIServer) CopyHotFeedPKIDMultipliersMap() map[lib.PKID]*HotFeedPKIDMultiplier
- func (fes *APIServer) CreateFollowTxnStateless(ww http.ResponseWriter, req *http.Request)
- 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) DeletePII(ww http.ResponseWriter, rr *http.Request)
- func (fes *APIServer) ExceedsDeSoBalance(nanosPurchased uint64, seed string) (bool, error)
- func (fes *APIServer) ExchangeBitcoinStateless(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) ExecuteETHRPCRequest(method string, params []interface{}) (response *InfuraResponse, _err error)
- func (fes *APIServer) FetchFromExternalGlobalState(routePath string) (_body []byte, _err error)
- 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) GetBlacklist(utxoView *lib.UtxoView) (_blacklistedPKIDMap map[lib.PKID][]byte, _err error)
- func (fes *APIServer) GetBlacklistState(pkid *lib.PKID) []byte
- func (fes *APIServer) GetBlacklistedPublicKeys(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetBlockTemplate(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetBlockchainDotComExchangeRate() (_exchangeRate float64, _err error)
- func (fes *APIServer) GetBlockedPubKeysForUser(userPubKey []byte) (_blockedPubKeyMap map[string]struct{}, _err error)
- func (fes *APIServer) GetBuyDeSoFeeBasisPoints(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetBuyDeSoFeeBasisPointsResponseFromGlobalState() (uint64, error)
- func (fes *APIServer) GetCoinbaseExchangeRate() (_exchangeRate float64, _err error)
- func (fes *APIServer) GetCountryLevelSignUpBonusFromAlpha2(countryCodeAlpha2 string) (_signUpBonus CountryLevelSignUpBonus)
- func (fes *APIServer) GetCountryLevelSignUpBonusFromHeader(req *http.Request) (_signUpBonus CountryLevelSignUpBonus)
- func (fes *APIServer) GetDefaultJumioCountrySignUpBonus() CountryLevelSignUpBonus
- 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) GetETHTransactionByHash(hash string) (_tx *InfuraTx, _err error)
- func (fes *APIServer) GetExchangeDeSoPrice() uint64
- func (fes *APIServer) GetExchangeRate(ww http.ResponseWriter, rr *http.Request)
- func (fes *APIServer) GetExemptPublicKeyMapFromGlobalState() map[string]interface{}
- func (fes *APIServer) GetFeaturedCreators(utxoView *lib.UtxoView, responseLimit int, seekKey []byte, disregardFR bool) (_profileEntryResponses []ProfileEntryResponse, _err error)
- 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) GetGlobalFeed(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetGlobalFeedCache() (_postHashes []*lib.BlockHash, _err error)
- func (fes *APIServer) GetGlobalFeedPostHashesForLastWeek() (_postHashes []*lib.BlockHash, _err error)
- func (fes *APIServer) GetGlobalParams(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetGraylist(utxoView *lib.UtxoView) (_graylistedPKIDMap map[lib.PKID][]byte, _err error)
- func (fes *APIServer) GetGraylistState(pkid *lib.PKID) []byte
- func (fes *APIServer) GetGraylistedPublicKeys(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) GetHotFeed(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetHotFeedConstantsFromGlobalState() (_interactionCap uint64, _timeDecayBlocks uint64, _err error)
- func (fes *APIServer) GetHotnessScoreInfoForTxn(txn *lib.MsgDeSoTxn, blockAge int, ...) (_postHashScored *lib.BlockHash, _interactionPKID *lib.PKID, ...)
- func (fes *APIServer) GetJumioCountrySignUpBonus(countryCode string) (_signUpBonus CountryLevelSignUpBonus, _err error)
- func (fes *APIServer) GetJumioDeSoNanos() uint64
- func (fes *APIServer) GetJumioStatusForPublicKey(ww http.ResponseWriter, rr *http.Request)
- func (fes *APIServer) GetJumioUSDCents() uint64
- 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) GetNFTsCreatedByPublicKey(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetNFTsForUser(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetNanosFromETH(eth *big.Float, feeBasisPoints uint64) uint64
- func (fes *APIServer) GetNanosFromSats(satoshis uint64, feeBasisPoints uint64) uint64
- func (fes *APIServer) GetNanosFromUSDCents(usdCents float64, feeBasisPoints uint64) uint64
- func (fes *APIServer) GetNextNFTShowcase(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetNotifications(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetNotificationsCount(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetPostEntriesByDESOAfterTimePaginated(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) GetProfilesByUsernamePrefixAndDeSoLocked(db *badger.DB, usernamePrefix string, readerPK []byte, utxoView *lib.UtxoView) (_profileEntries []*lib.ProfileEntry, _err error)
- func (fes *APIServer) GetQuoteRepostsForPost(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetRefereeSignUpBonusAmount(signUpBonus CountryLevelSignUpBonus, referralCodeUSDCents uint64) uint64
- func (fes *APIServer) GetReferralInfoForReferralHash(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetReferralInfoForUser(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetReferrerSignUpBonusAmount(signUpBonus CountryLevelSignUpBonus, referralCodeUSDCents uint64) uint64
- func (fes *APIServer) GetRepostsForPost(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetRestrictedPublicKeys(prefix []byte, filterValue []byte, utxoView *lib.UtxoView, routePath string) (_pkidMap map[lib.PKID][]byte, _err error)
- func (fes *APIServer) GetRichList(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetSingleCountrySignUpBonus(countryCode string) CountryLevelSignUpBonus
- 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) GetTotalSupply(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetTransactionFeeMapFromGlobalState() map[lib.TxnType][]*lib.DeSoOutput
- func (fes *APIServer) GetTransactionSpending(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetTransferDetails(client *http.Client, transferId string) (_wyreTransferDetails *WyreTransferDetails, _err error)
- func (fes *APIServer) GetTutorialCreators(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetTutorialCreatorsByFR(ww http.ResponseWriter, req *http.Request, disregardFR bool)
- func (fes *APIServer) GetTxn(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetUSDCentsToDeSoReserveExchangeRate(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetUSDCentsToDeSoReserveExchangeRateFromGlobalState() (uint64, error)
- func (fes *APIServer) GetUSDFromNanos(nanos uint64) float64
- func (fes *APIServer) GetUserDerivedKeys(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetUserGlobalMetadata(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetUserMetadata(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetUsersStateless(ww http.ResponseWriter, rr *http.Request)
- func (fes *APIServer) GetVerifiedUsernameMap() (_verifiedUsernameToPKID map[string]*lib.PKID, _err error)
- func (fes *APIServer) GetVerifiedUsernameToPKIDMapFromGlobalState() (_verificationMap map[string]*lib.PKID, _err error)
- func (fes *APIServer) GetVerifiedUsernames(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) GetVideoStatus(ww http.ResponseWriter, req *http.Request)
- 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) HandleHotFeedPageRequest(ww http.ResponseWriter, req *http.Request, approvedPostsOnly bool, ...)
- func (fes *APIServer) HashHexToBase58Check(hashHex string) (base58Check string, _err error)
- func (fes *APIServer) HealthCheck(ww http.ResponseWriter, rr *http.Request)
- func (fes *APIServer) Index(w http.ResponseWriter, r *http.Request)
- func (fes *APIServer) IsConfiguredForETH() bool
- 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) IsUserBlacklisted(pkid *lib.PKID) bool
- func (fes *APIServer) IsUserGraylisted(pkid *lib.PKID) bool
- 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) JumioVerifiedHandler(userMetadata *UserMetadata, jumioTransactionId string, jumioCountryCode string, ...) (_userMetadata *UserMetadata, err error)
- func (fes *APIServer) LogFeeSet(txnType lib.TxnType, transactionFees []TransactionFee) (_err error)
- 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) PruneHotFeedApprovedPostsMap(hotFeedPosts map[lib.BlockHash]*HotnessPostInfo, ...)
- func (fes *APIServer) QueryETHRPC(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) ResendVerifyEmail(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) SendDeSo(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) SendSeedDeSo(recipientPkBytes []byte, amountNanos uint64, useBuyDeSoSeed bool) (txnHash *lib.BlockHash, _err error)
- func (fes *APIServer) SetAllCountrySignUpBonusMetadata()
- func (fes *APIServer) SetBlacklistedPKIDMap(utxoView *lib.UtxoView)
- func (fes *APIServer) SetBuyDeSoFeeBasisPoints(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) SetGlobalFeedPostHashes()
- func (fes *APIServer) SetGlobalStateCache()
- func (fes *APIServer) SetGraylistedPKIDMap(utxoView *lib.UtxoView)
- func (fes *APIServer) SetNotificationMetadata(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) SetSingleCountrySignUpBonus(countryDetails countries.Alpha3CountryCodeDetails, ...)
- func (fes *APIServer) SetUSDCentsToDeSoReserveExchangeRate(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) SetVerifiedUsernameMap()
- func (fes *APIServer) SetWyreRequestHeaders(req *http.Request, dataBytes []byte) *http.Request
- func (fes *APIServer) Start()
- func (fes *APIServer) StartExchangePriceMonitoring()
- func (fes *APIServer) StartGlobalStateMonitoring()
- func (fes *APIServer) StartHotFeedRoutine()
- func (fes *APIServer) StartOrSkipTutorial(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) StartSeedBalancesMonitoring()
- func (fes *APIServer) StartSupplyMonitoring()
- func (fes *APIServer) Stop()
- func (fes *APIServer) SubmitBlock(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) SubmitETHTx(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) TestSignTransactionWithDerivedKey(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) TransferNFT(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) TxnFeeMapToResponse(skipProfileEntryResponses bool) map[string][]TransactionFee
- func (fes *APIServer) UpdateFilterAuditLogs(usernameToUpdate string, pkidEntryToUpdate *lib.PKIDEntry, ...) (_err error)
- func (fes *APIServer) UpdateGlobalParams(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) UpdateHotFeed()
- func (fes *APIServer) UpdateHotFeedApprovedPostsMap(hotFeedApprovedPosts map[lib.BlockHash]float64)
- func (fes *APIServer) UpdateHotFeedOrderedList(postsToMultipliers map[lib.BlockHash]float64, ...) (_hotFeedPostsMap map[lib.BlockHash]*HotnessPostInfo)
- func (fes *APIServer) UpdateHotFeedPKIDMultipliersMap(hotFeedPKIDMultipliers map[lib.PKID]*HotFeedPKIDMultiplier)
- func (fes *APIServer) UpdateNFT(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) UpdateProfile(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) UpdateTutorialStatus(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) UpdateUSDCentsToDeSoExchangeRate()
- func (fes *APIServer) UpdateUSDToBTCPrice()
- func (fes *APIServer) UpdateUSDToETHPrice()
- 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) UploadVideo(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) UserAdminStatus(publicKeyBase58Check string) (_isAdmin bool, _isSuperAdmin bool)
- func (fes *APIServer) ValidateJWT(publicKey string, jwtToken string) (bool, error)
- func (fes *APIServer) VerifyEmail(ww http.ResponseWriter, req *http.Request)
- func (fes *APIServer) WriteGlobalStateDataToResponse(data interface{}, functionName string, ww http.ResponseWriter)
- func (fes *APIServer) WyreWalletOrderMetadataToResponse(metadata *WyreWalletOrderMetadata) *WyreWalletOrderMetadataResponse
- func (fes *APIServer) WyreWalletOrderSubscription(ww http.ResponseWriter, req *http.Request)
- type APITransactionInfoRequest
- type APITransactionInfoResponse
- type APITransferDeSoRequest
- type APITransferDeSoResponse
- type AcceptNFTBidRequest
- type AcceptNFTBidResponse
- type AcceptNFTTransferRequest
- type AcceptNFTTransferResponse
- type AccessLevel
- type AdminAddExemptPublicKey
- type AdminCreateReferralHashRequest
- type AdminCreateReferralHashResponse
- type AdminDownloadRefereeCSVRequest
- type AdminDownloadRefereeCSVResponse
- type AdminDownloadReferralCSVRequest
- type AdminDownloadReferralCSVResponse
- type AdminGetAllReferralInfoForUserRequest
- type AdminGetAllReferralInfoForUserResponse
- type AdminGetAllUserGlobalMetadataRequest
- type AdminGetAllUserGlobalMetadataResponse
- type AdminGetExemptPublicKeysResponse
- type AdminGetHotFeedAlgorithmRequest
- type AdminGetHotFeedAlgorithmResponse
- type AdminGetHotFeedUserMultiplierRequest
- type AdminGetHotFeedUserMultiplierResponse
- type AdminGetMempoolStatsRequest
- type AdminGetMempoolStatsResponse
- type AdminGetNFTDropRequest
- type AdminGetNFTDropResponse
- type AdminGetTransactionFeeMapResponse
- type AdminGetUserAdminDataRequest
- type AdminGetUserAdminDataResponse
- type AdminGetUserGlobalMetadataRequest
- type AdminGetUserGlobalMetadataResponse
- type AdminGetUsernameVerificationAuditLogsRequest
- type AdminGetUsernameVerificationAuditLogsResponse
- type AdminGetVerifiedUsersRequest
- type AdminGetVerifiedUsersResponse
- type AdminGrantVerificationBadgeRequest
- type AdminGrantVerificationBadgeResponse
- type AdminJumioCallback
- type AdminPinPostRequest
- type AdminPinPostResponse
- type AdminProcessETHTxRequest
- type AdminProcessETHTxResponse
- type AdminRemoveNilPostsRequest
- type AdminRemoveNilPostsResponse
- type AdminRemoveVerificationBadgeRequest
- type AdminRemoveVerificationBadgeResponse
- type AdminRequest
- type AdminResetJumioRequest
- type AdminResetTutorialStatusRequest
- type AdminSetAllTransactionFeesRequest
- type AdminSetAllTransactionFeesResponse
- type AdminSetJumioVerifiedRequest
- type AdminSetTransactionFeeForTransactionTypeRequest
- type AdminSetTransactionFeeForTransactionTypeResponse
- type AdminUpdateGlobalFeedRequest
- type AdminUpdateGlobalFeedResponse
- type AdminUpdateHotFeedAlgorithmRequest
- type AdminUpdateHotFeedAlgorithmResponse
- type AdminUpdateHotFeedPostMultiplierRequest
- type AdminUpdateHotFeedPostMultiplierResponse
- type AdminUpdateHotFeedUserMultiplierRequest
- type AdminUpdateHotFeedUserMultiplierResponse
- type AdminUpdateJumioCountrySignUpBonusRequest
- type AdminUpdateJumioDeSoRequest
- type AdminUpdateJumioDeSoResponse
- type AdminUpdateJumioUSDCentsRequest
- type AdminUpdateJumioUSDCentsResponse
- type AdminUpdateNFTDropRequest
- type AdminUpdateNFTDropResponse
- type AdminUpdateReferralHashRequest
- type AdminUpdateReferralHashResponse
- type AdminUpdateTutorialCreatorRequest
- type AdminUpdateUserGlobalMetadataRequest
- type AdminUpdateUserGlobalMetadataResponse
- type AdminUploadReferralCSVRequest
- type AdminUploadReferralCSVResponse
- type AmplitudeEvent
- type AmplitudeUploadRequestBody
- type AppendExtraDataRequest
- type AppendExtraDataResponse
- type AuthorizeDerivedKeyRequest
- type AuthorizeDerivedKeyResponse
- type BalanceEntryResponse
- type BatchGetRemoteRequest
- type BatchGetRemoteResponse
- type BlockPublicKeyRequest
- type BlockPublicKeyResponse
- type BlockchainDeSoTickerResponse
- type BlockchainDotcomResponse
- type BurnNFTRequest
- type BurnNFTResponse
- type BuyOrSellCreatorCoinRequest
- type BuyOrSellCreatorCoinResponse
- type CFVideoDetailsResponse
- type CoinEntryResponsedeprecated
- type CoinbaseDeSoTickerResponse
- type CoinbaseResponse
- type CoingeckoResponse
- type CountryLevelSignUpBonus
- type CountrySignUpBonusResponse
- type CreateFollowTxnStatelessRequest
- type CreateFollowTxnStatelessResponse
- type CreateLikeStatelessRequest
- type CreateLikeStatelessResponse
- type CreateNFTBidRequest
- type CreateNFTBidResponse
- type CreateNFTRequest
- type CreateNFTResponse
- type DeleteIdentityRequest
- type DeleteIdentityResponse
- type DeletePIIRequest
- type DeleteRemoteRequest
- type DeleteRemoteResponse
- type DiamondSenderResponse
- type DiamondSenderSummaryResponse
- type ETHTx
- type ETHTxLog
- type ExchangeBitcoinRequest
- type ExchangeBitcoinResponse
- type FilterAuditLog
- type FilterType
- type GeminiResponse
- type GetAllCountryLevelSignUpBonusResponse
- type GetAppStateRequest
- type GetAppStateResponse
- type GetBlockTemplateRequest
- type GetBlockTemplateResponse
- type GetBuyDeSoFeeBasisPointsResponse
- 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 GetNFTsCreatedByPublicKeyRequest
- type GetNFTsCreatedByPublicKeyResponse
- type GetNFTsForUserRequest
- type GetNFTsForUserResponse
- type GetNextNFTShowcaseRequest
- type GetNextNFTShowcaseResponse
- type GetNotificationsCountRequest
- type GetNotificationsCountResponse
- type GetNotificationsRequest
- type GetNotificationsResponse
- type GetPostsDiamondedBySenderForReceiverRequest
- type GetPostsDiamondedBySenderForReceiverResponse
- type GetPostsForPublicKeyRequest
- type GetPostsForPublicKeyResponse
- type GetPostsStatelessRequest
- type GetPostsStatelessResponse
- type GetProfilesRequest
- type GetProfilesResponse
- type GetQuoteRepostsForPostRequest
- type GetQuoteRepostsForPostResponse
- type GetReferralInfoForReferralHashRequest
- type GetReferralInfoForReferralHashResponse
- type GetReferralInfoForUserRequest
- type GetReferralInfoForUserResponse
- type GetRemoteRequest
- type GetRemoteResponse
- type GetRepostsForPostRequest
- type GetRepostsForPostResponse
- type GetSinglePostRequest
- type GetSinglePostResponse
- type GetSingleProfileRequest
- type GetSingleProfileResponse
- type GetTransactionSpendingRequest
- type GetTransactionSpendingResponse
- type GetTutorialCreatorResponse
- type GetTutorialCreatorsRequest
- type GetTxnRequest
- type GetTxnResponse
- type GetUSDCentsToDeSoExchangeRateResponse
- type GetUserDerivedKeysRequest
- type GetUserDerivedKeysResponse
- type GetUserGlobalMetadataRequest
- type GetUserGlobalMetadataResponse
- type GetUserMetadataRequest
- type GetUserMetadataResponse
- type GetUsersResponse
- type GetUsersStatelessRequest
- type GetVideoStatusResponse
- type GetWyreWalletOrderForPublicKeyRequest
- type GetWyreWalletOrderForPublicKeyResponse
- type GlobalState
- func (gs *GlobalState) BatchGet(keyList [][]byte) (value [][]byte, _err error)
- func (gs *GlobalState) BatchGetRemote(ww http.ResponseWriter, rr *http.Request)
- func (gs *GlobalState) CreateBatchGetRequest(keyList [][]byte) (_url string, _json_data []byte, _err error)
- func (gs *GlobalState) CreateDeleteRequest(key []byte) (_url string, _json_data []byte, _err error)
- func (gs *GlobalState) CreateGetRequest(key []byte) (_url string, _json_data []byte, _err error)
- func (gs *GlobalState) CreatePutRequest(key []byte, value []byte) (_url string, _json_data []byte, _err error)
- func (gs *GlobalState) CreateSeekRequest(startPrefix []byte, validForPrefix []byte, maxKeyLen int, numToFetch int, ...) (_url string, _json_data []byte, _err error)
- func (gs *GlobalState) Delete(key []byte) error
- func (gs *GlobalState) DeleteRemote(ww http.ResponseWriter, rr *http.Request)
- func (gs *GlobalState) Get(key []byte) (value []byte, _err error)
- func (gs *GlobalState) GetRemote(ww http.ResponseWriter, rr *http.Request)
- func (gs *GlobalState) GlobalStateRoutes() []Route
- func (gs *GlobalState) GlobalStateSeekRemote(ww http.ResponseWriter, rr *http.Request)
- func (gs *GlobalState) Put(key []byte, value []byte) error
- func (gs *GlobalState) PutRemote(ww http.ResponseWriter, rr *http.Request)
- func (gs *GlobalState) Seek(startPrefix []byte, validForPrefix []byte, maxKeyLen int, numToFetch int, ...) (_keysFound [][]byte, _valsFound [][]byte, _err error)
- type HeaderResponse
- type HotFeedApprovedPostOp
- type HotFeedEntry
- type HotFeedInteractionKey
- type HotFeedPKIDMultiplier
- type HotFeedPKIDMultiplierOp
- type HotFeedPageRequest
- type HotFeedPageResponse
- type HotnessPostInfo
- type InfuraRequest
- type InfuraResponse
- type InfuraTx
- type InputResponse
- type IsFolllowingPublicKeyResponse
- type IsFollowingPublicKeyRequest
- type IsHodlingPublicKeyRequest
- type IsHodlingPublicKeyResponse
- type JumioBeginRequest
- type JumioBeginResponse
- type JumioFlowFinishedRequest
- type JumioIdentityVerification
- type JumioInitRequest
- type JumioInitResponse
- type JumioRejectReason
- type KrakenResponse
- type LastTradePriceHistoryItem
- type MarkAllMessagesReadRequest
- type MarkContactMessagesReadRequest
- type MessageContactResponse
- type MessageEntryResponse
- type NFTBidEntryResponse
- type NFTCollectionResponse
- type NFTDetails
- type NFTDropEntry
- type NFTEntryAndPostEntryResponse
- type NFTEntryResponse
- type NodeControlRequest
- type NodeControlResponse
- type NodeStatusResponse
- type OutputResponse
- type PeerResponse
- type PhoneNumberMetadata
- type PostEntryResponse
- type ProfileEntryResponse
- type PutRemoteRequest
- type PutRemoteResponse
- type QueryETHRPCRequest
- type ReferralInfo
- type ReferralInfoResponse
- type ResendVerifyEmailRequest
- type RichListEntry
- type RichListEntryResponse
- type Route
- type SeekRemoteRequest
- type SeekRemoteResponse
- type SendDeSoRequest
- type SendDeSoResponse
- type SendDiamondsRequest
- type SendDiamondsResponse
- type SendMessageStatelessRequest
- type SendMessageStatelessResponse
- type SendPhoneNumberVerificationTextRequest
- type SendPhoneNumberVerificationTextResponse
- type SetBuyDeSoFeeBasisPointsRequest
- type SetBuyDeSoFeeBasisPointsResponse
- type SetNotificationMetadataRequest
- type SetUSDCentsToDeSoExchangeRateRequest
- type SetUSDCentsToDeSoExchangeRateResponse
- type SimpleReferralInfo
- type SimpleReferralInfoResponse
- type StartOrSkipTutorialRequest
- type SubmitBlockRequest
- type SubmitBlockResponse
- type SubmitETHTxRequest
- type SubmitETHTxResponse
- type SubmitPhoneNumberVerificationCodeRequest
- type SubmitPhoneNumberVerificationCodeResponse
- type SubmitPostRequest
- type SubmitPostResponse
- type SubmitTransactionRequest
- type SubmitTransactionResponse
- type SwapIdentityRequest
- type SwapIdentityResponse
- type TestSignTransactionWithDerivedKeyRequest
- type TestSignTransactionWithDerivedKeyResponse
- type TransactionFee
- type TransactionInfo
- type TransactionInfoResponse
- type TransactionMetadataResponse
- type TransactionResponse
- type TransferCreatorCoinRequest
- type TransferCreatorCoinResponse
- type TransferNFTRequest
- type TransferNFTResponse
- type TutorialStatus
- type UTXOEntryResponse
- type UpdateGlobalParamsRequest
- type UpdateGlobalParamsResponse
- type UpdateNFTRequest
- type UpdateNFTResponse
- type UpdateProfileRequest
- type UpdateProfileResponse
- type UpdateTutorialStatusRequest
- type UpdateUserGlobalMetadataRequest
- type UpdateUserGlobalMetadataResponse
- type UploadImageResponse
- type User
- type UserDerivedKey
- 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 ( // Columns that don't have an ID number are ignored. CSVColumnReferralHash = 0 CSVColumnPKID = 2 CSVColumnReferrerAmount = 3 CSVColumnRefereeAmount = 4 CSVColumnMaxReferrals = 5 CSVColumnRequiresJumio = 6 CSVColumnTstampNanos = 11 CSVColumnIsActive = 12 )
const ( // RoutePathAPIBase ... RoutePathAPIBase = "/api/v1" // RoutePathAPIKeyPair ... RoutePathAPIKeyPair = "/api/v1/key-pair" // RoutePathAPIBalance ... RoutePathAPIBalance = "/api/v1/balance" // RoutePathAPITransferDeSo ... RoutePathAPITransferDeSo = "/api/v1/transfer-deso" // 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 ( // Number of blocks per halving for the scoring time decay. DefaultHotFeedTimeDecayBlocks uint64 = 72 // Maximum score amount that any individual PKID can contribute before time decay. DefaultHotFeedInteractionCap uint64 = 4e12 )
HotnessFeed scoring algorithm knobs.
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 ( RoutePathSendBitClout = "/api/v0/send-bitclout" // Deprecated RoutePathGetRecloutsForPost = "/api/v0/get-reclouts-for-post" // Deprecated RoutePathGetQuoteRecloutsForPost = "/api/v0/get-quote-reclouts-for-post" // Deprecated // 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" RoutePathSendDeSo = "/api/v0/send-deso" 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" RoutePathAuthorizeDerivedKey = "/api/v0/authorize-derived-key" RoutePathAppendExtraData = "/api/v0/append-extra-data" RoutePathGetTransactionSpending = "/api/v0/get-transaction-spending" 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" RoutePathGetUnreadNotificationsCount = "/api/v0/get-unread-notifications-count" RoutePathSetNotificationMetadata = "/api/v0/set-notification-metadata" RoutePathBlockPublicKey = "/api/v0/block-public-key" RoutePathIsFollowingPublicKey = "/api/v0/is-following-public-key" RoutePathIsHodlingPublicKey = "/api/v0/is-hodling-public-key" RoutePathGetUserDerivedKeys = "/api/v0/get-user-derived-keys" RoutePathDeletePII = "/api/v0/delete-pii" RoutePathGetUserMetadata = "/api/v0/get-user-metadata" // 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" RoutePathGetRepostsForPost = "/api/v0/get-reposts-for-post" RoutePathGetQuoteRepostsForPost = "/api/v0/get-quote-reposts-for-post" RoutePathGetPostsForPublicKey = "/api/v0/get-posts-for-public-key" RoutePathGetDiamondedPosts = "/api/v0/get-diamonded-posts" // hot_feed.go RoutePathGetHotFeed = "/api/v0/get-hot-feed" // 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" RoutePathGetNFTsCreatedByPublicKey = "/api/v0/get-nfts-created-by-public-key" RoutePathTransferNFT = "/api/v0/transfer-nft" RoutePathAcceptNFTTransfer = "/api/v0/accept-nft-transfer" RoutePathBurnNFT = "/api/v0/burn-nft" // media.go RoutePathUploadImage = "/api/v0/upload-image" RoutePathGetFullTikTokURL = "/api/v0/get-full-tiktok-url" RoutePathUploadVideo = "/api/v0/upload-video" RoutePathGetVideoStatus = "/api/v0/get-video-status" // 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" // tutorial.go RoutePathGetTutorialCreators = "/api/v0/get-tutorial-creators" RoutePathStartOrSkipTutorial = "/api/v0/start-or-skip-tutorial" RoutePathUpdateTutorialStatus = "/api/v0/update-tutorial-status" // eth.go RoutePathSubmitETHTx = "/api/v0/submit-eth-tx" RoutePathQueryETHRPC = "/api/v0/query-eth-rpc" RoutePathAdminProcessETHTx = "/api/v0/admin/process-eth-tx" // 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" RoutePathAdminGetMempoolStats = "/api/v0/admin/get-mempool-stats" // admin_buy_deso.go RoutePathSetUSDCentsToDeSoReserveExchangeRate = "/api/v0/admin/set-usd-cents-to-deso-reserve-exchange-rate" RoutePathGetUSDCentsToDeSoReserveExchangeRate = "/api/v0/admin/get-usd-cents-to-deso-reserve-exchange-rate" RoutePathSetBuyDeSoFeeBasisPoints = "/api/v0/admin/set-buy-deso-fee-basis-points" RoutePathGetBuyDeSoFeeBasisPoints = "/api/v0/admin/get-buy-deso-fee-basis-points" // admin_transaction.go RoutePathGetGlobalParams = "/api/v0/get-global-params" RoutePathTestSignTransactionWithDerivedKey = "/api/v0/admin/test-sign-transaction-with-derived-key" // 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" // hot_feed.go RoutePathAdminGetUnfilteredHotFeed = "/api/v0/admin/get-unfiltered-hot-feed" RoutePathAdminGetHotFeedAlgorithm = "/api/v0/admin/get-hot-feed-algorithm" RoutePathAdminUpdateHotFeedAlgorithm = "/api/v0/admin/update-hot-feed-algorithm" RoutePathAdminUpdateHotFeedPostMultiplier = "/api/v0/admin/update-hot-feed-post-multiplier" RoutePathAdminUpdateHotFeedUserMultiplier = "/api/v0/admin/update-hot-feed-user-multiplier" RoutePathAdminGetHotFeedUserMultiplier = "/api/v0/admin/get-hot-feed-user-multiplier" // admin_fees.go RoutePathAdminSetTransactionFeeForTransactionType = "/api/v0/admin/set-txn-fee-for-txn-type" RoutePathAdminSetAllTransactionFees = "/api/v0/admin/set-all-txn-fees" RoutePathAdminGetTransactionFeeMap = "/api/v0/admin/get-transaction-fee-map" RoutePathAdminAddExemptPublicKey = "/api/v0/admin/add-exempt-public-key" RoutePathAdminGetExemptPublicKeys = "/api/v0/admin/get-exempt-public-keys" // 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" RoutePathAdminUpdateJumioDeSo = "/api/v0/admin/update-jumio-deso" RoutePathAdminUpdateJumioUSDCents = "/api/v0/admin/update-jumio-usd-cents" RoutePathAdminJumioCallback = "/api/v0/admin/jumio-callback" RoutePathAdminUpdateJumioCountrySignUpBonus = "/api/v0/admin/update-jumio-country-sign-up-bonus" RoutePathAdminGetAllCountryLevelSignUpBonuses = "/api/v0/admin/get-all-country-level-sign-up-bonuses" // admin_referrals.go RoutePathAdminCreateReferralHash = "/api/v0/admin/create-referral-hash" RoutePathAdminGetAllReferralInfoForUser = "/api/v0/admin/get-all-referral-info-for-user" RoutePathAdminUpdateReferralHash = "/api/v0/admin/update-referral-hash" RoutePathAdminUploadReferralCSV = "/api/v0/admin/upload-referral-csv" RoutePathAdminDownloadReferralCSV = "/api/v0/admin/download-referral-csv" RoutePathAdminDownloadRefereeCSV = "/api/v0/admin/download-referee-csv" // referrals.go RoutePathGetReferralInfoForUser = "/api/v0/get-referral-info-for-user" RoutePathGetReferralInfoForReferralHash = "/api/v0/get-referral-info-for-referral-hash" // admin_tutorial.go RoutePathAdminUpdateTutorialCreators = "/api/v0/admin/update-tutorial-creators" RoutePathAdminResetTutorialStatus = "/api/v0/admin/reset-tutorial-status" RoutePathAdminGetTutorialCreators = "/api/v0/admin/get-tutorial-creators" // expose_global_state.go RoutePathGetVerifiedUsernames = "/api/v0/get-verified-usernames" RoutePathGetBlacklistedPublicKeys = "/api/v0/get-blacklisted-public-keys" RoutePathGetGraylistedPublicKeys = "/api/v0/get-graylisted-public-keys" RoutePathGetGlobalFeed = "/api/v0/get-global-feed" // supply.go RoutePathGetTotalSupply = "/api/v0/total-supply" RoutePathGetRichList = "/api/v0/rich-list" )
Variables ¶
var ( IsGraylisted = []byte{1} IsBlacklisted = []byte{1} )
Functions ¶
func APIAddError ¶
func APIAddError(ww http.ResponseWriter, errorString string)
APIAddError sets an error response on the ResponseWriter passed in.
func AddHeaders ¶
AddHeaders ...
func CheckTransactionFeeForDuplicatePublicKeys ¶
func CheckTransactionFeeForDuplicatePublicKeys(newTransactionFees []TransactionFee) error
CheckTransactionFeeForDuplicatePublicKeys checks that a slice of TransactionFees does not contain a duplicate PublicKey
func CheckTxnForCreatePost ¶
func CheckTxnForCreatePost(txn *lib.MsgDeSoTxn) ( _isCreatePostTxn bool, _postHashCreated *lib.BlockHash)
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 GlobalStateKeyForBuyDeSoFeeBasisPoints ¶
func GlobalStateKeyForBuyDeSoFeeBasisPoints() []byte
func GlobalStateKeyForGraylistAuditLogs ¶
Key for accessing the graylist audit logs associated with a user.
func GlobalStateKeyForGraylistedProfile ¶
Key for accessing a graylisted user.
func GlobalStateKeyForJumioDeSoNanos ¶
func GlobalStateKeyForJumioDeSoNanos() []byte
func GlobalStateKeyForJumioUSDCents ¶
func GlobalStateKeyForJumioUSDCents() []byte
func GlobalStateKeyForPKIDReferralHashToIsActive ¶
Key for getting a pub key's referral hashes and "IsActive" status.
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 GlobalStateKeyForReferralHashToReferralInfo ¶
Key for accessing the referral info for a specific referral hash.
func GlobalStateKeyForTstampPinnedPostHash ¶
Key for accessing a pinned post.
func GlobalStateKeyForTstampPostHash ¶
Key for accessing a whitelised post in the global feed index.
func GlobalStateKeyForUSDCentsToDeSoReserveExchangeRate ¶
func GlobalStateKeyForUSDCentsToDeSoReserveExchangeRate() []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 GlobalStateSeekKeyForPKIDReferralHashes ¶
Key for seeking the DB for all referral hashes with a specific PKID.
func IsRestrictedPubKey ¶
func NotificationTxnShouldBeIncluded ¶
func NotificationTxnShouldBeIncluded(txnMeta *lib.TransactionMetadata, filteredOutCategoriesPointer *map[string]bool) bool
Determine if a transaction should be included in the notifications response based on filters
func RefereeCSVHeaders ¶
func RefereeCSVHeaders() (_headers []string)
func ReferralCSVHeaders ¶
func ReferralCSVHeaders() (_headers []string)
func ShuffleKeys ¶
func ShuffleKeys(records *[][]byte)
func TransformAndEncodeTransactionFees ¶
func TransformAndEncodeTransactionFees(transactionFees []TransactionFee) (_outputs []*lib.DeSoOutput, _buf *bytes.Buffer, _err error)
TransformAndEncodeTransactionFees checks transaction fees for duplicate public keys, transform TransactionFee structs to DeSoOutputs, and then encodes that slice of DeSoOutputs.
func TransformTransactionFeesToOutputs ¶
func TransformTransactionFeesToOutputs(transactionFees []TransactionFee) (_outputs []*lib.DeSoOutput, _err error)
TransformTransactionFeesToOutputs takes in a slice of TransactionFees and returns a slice of DeSoOutputs
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 DeSo, so if the balance were “1 DeSo” 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 // DeSo 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 DeSo 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 DeSo public keys start // with the characters “BC” PublicKeyBase58Check string // The DeSo 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 DeSo 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 DeSo, // among other things. All DeSo private keys start with // the characters “bc” PrivateKeyBase58Check string // The DeSo 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.DeSoParams 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. GlobalState *GlobalState // 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 UsdCentsPerDeSoExchangeRate uint64 UsdCentsPerBitCoinExchangeRate float64 UsdCentsPerETHExchangeRate uint64 // List of prices retrieved. This is culled everytime we update the current price. LastTradeDeSoPriceHistory []LastTradePriceHistoryItem // How far back do we consider trade prices when we set the current price of $DESO in nanoseconds LastTradePriceLookback uint64 // Base-58 prefix to check for to determine if a string could be a public key. PublicKeyBase58Prefix string // A list of posts from the last 24hrs ordered by hotness score. HotFeedOrderedList []*HotFeedEntry // The height of the last block evaluated by the hotness routine. HotFeedBlockHeight uint32 // Map of whitelisted post hashes used for serving the hot feed. // The float64 value is a multiplier than can be modified and used in scoring. HotFeedApprovedPostsToMultipliers map[lib.BlockHash]float64 LastHotFeedApprovedPostOpProcessedTstampNanos uint64 // Multipliers applied to individual PKIDs to help node operators better fit their // hot feed to the type of content they would like to display. HotFeedPKIDMultipliers map[lib.PKID]*HotFeedPKIDMultiplier LastHotFeedPKIDMultiplierOpProcessedTstampNanos uint64 // Constants for the hotness score algorithm. HotFeedInteractionCap uint64 HotFeedTimeDecayBlocks uint64 HotFeedPostMultiplierUpdated bool HotFeedPKIDMultiplierUpdated bool //Map of transaction type to []*lib.DeSoOutput that represent fees assessed on each transaction of that type. TransactionFeeMap map[lib.TxnType][]*lib.DeSoOutput // Map of public keys that are exempt from node fees ExemptPublicKeyMap map[string]interface{} // VerifiedUsernameToPKIDMap is a map of lowercase usernames to PKIDs representing the current state of // verifications this node is recognizing. VerifiedUsernameToPKIDMap map[string]*lib.PKID // BlacklistedPKIDMap is a map of PKID to a byte slice representing the PKID of a user as the key and the current // blacklist state of that user as the key. If a PKID is not present in this map, then the user is NOT blacklisted. BlacklistedPKIDMap map[lib.PKID][]byte // BlacklistedResponseMap is a map of PKIDs converted to base58-encoded string to a byte slice. This is computed // from the BlacklistedPKIDMap above and is a JSON-encodable version of that map. This map is only used when // responding to requests for this node's blacklist. A JSON-encoded response is easier for any language to digest // than a gob-encoded one. BlacklistedResponseMap map[string][]byte // GraylistedPKIDMap is a map of PKID to a byte slice representing the PKID of a user as the key and the current // graylist state of that user as the key. If a PKID is not present in this map, then the user is NOT graylisted. GraylistedPKIDMap map[lib.PKID][]byte // GraylistedResponseMap is a map of PKIDs converted to base58-encoded string to a byte slice. This is computed // from the GraylistedPKIDMap above and is a JSON-encodable version of that map. This map is only used when // responding to requests for this node's graylist. A JSON-encoded response is easier for any language to digest // than a gob-encoded one. GraylistedResponseMap map[string][]byte // GlobalFeedPostHashes is a slice of BlockHashes representing the state of posts on the global feed on this node. GlobalFeedPostHashes []*lib.BlockHash // Cache of Total Supply and Rich List TotalSupplyNanos uint64 TotalSupplyDESO float64 RichList []RichListEntryResponse // map of country name to sign up bonus data AllCountryLevelSignUpBonuses map[string]CountrySignUpBonusResponse // 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 DeSo with Bitcoin.
func NewAPIServer ¶
func NewAPIServer( _backendServer *lib.Server, _mempool *lib.DeSoMempool, _blockchain *lib.Blockchain, _blockProducer *lib.DeSoBlockProducer, txIndex *lib.TXIndex, params *lib.DeSoParams, 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 DeSo 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, DeSo 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 DeSo 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 DeSo 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 DeSo headers and DeSo blocks, an DeSo 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 DeSo 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-deso” endpoint, one can get the corresponding human-readable “TransactionInfo” by passing this transaction ID to a node. Note that DeSo 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 DeSo 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) APITransferDeSo ¶
func (fes *APIServer) APITransferDeSo(ww http.ResponseWriter, rr *http.Request)
APITransferDeSo can be used to transfer DeSo from one public key to another programmatically. To transfer DeSo, one must provide a public/private key pair. DeSo uses a UTXO model like Bitcoin but DeSo transactions are generally simpler than Bitcoin transactions because DeSo 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 DeSo from PubA to PubB with 5 DeSo in “change” and 1 DeSo as a “miner fee,” then the transaction would look as follows:
- Input: 16 DeSo (10 DeSo to send, 5 DeSo in change, and 1 DeSo as a fee)
- PubB: 10 DeSo (the amount being sent from A to B)
- PubA: 5 DeSo (change returned to A)
- Implicit 1 DeSo 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 APITransferDeSo function in frontend_utils
func (*APIServer) AcceptNFTBid ¶
func (fes *APIServer) AcceptNFTBid(ww http.ResponseWriter, req *http.Request)
func (*APIServer) AcceptNFTTransfer ¶
func (fes *APIServer) AcceptNFTTransfer(ww http.ResponseWriter, req *http.Request)
func (*APIServer) AdminAddExemptPublicKey ¶
func (fes *APIServer) AdminAddExemptPublicKey(ww http.ResponseWriter, req *http.Request)
AdminAddExemptPublicKey adds or removes a public key from the list of public keys exempt from node fees.
func (*APIServer) AdminCreateReferralHash ¶
func (fes *APIServer) AdminCreateReferralHash(ww http.ResponseWriter, req *http.Request)
func (*APIServer) AdminDownloadRefereeCSV ¶
func (fes *APIServer) AdminDownloadRefereeCSV(ww http.ResponseWriter, req *http.Request)
func (*APIServer) AdminDownloadReferralCSV ¶
func (fes *APIServer) AdminDownloadReferralCSV(ww http.ResponseWriter, req *http.Request)
func (*APIServer) AdminGetAllCountryLevelSignUpBonuses ¶
func (fes *APIServer) AdminGetAllCountryLevelSignUpBonuses(ww http.ResponseWriter, req *http.Request)
func (*APIServer) AdminGetAllReferralInfoForUser ¶
func (fes *APIServer) AdminGetAllReferralInfoForUser(ww http.ResponseWriter, req *http.Request)
func (*APIServer) AdminGetAllUserGlobalMetadata ¶
func (fes *APIServer) AdminGetAllUserGlobalMetadata(ww http.ResponseWriter, req *http.Request)
AdminGetAllUserGlobalMetadata ...
func (*APIServer) AdminGetExemptPublicKeys ¶
func (fes *APIServer) AdminGetExemptPublicKeys(ww http.ResponseWriter, req *http.Request)
AdminGetExemptPublicKeys gets a map of public key to ProfileEntryResponse that represents the public keys that are exempt from node fees.
func (*APIServer) AdminGetHotFeedAlgorithm ¶
func (fes *APIServer) AdminGetHotFeedAlgorithm(ww http.ResponseWriter, req *http.Request)
func (*APIServer) AdminGetHotFeedUserMultiplier ¶
func (fes *APIServer) AdminGetHotFeedUserMultiplier(ww http.ResponseWriter, req *http.Request)
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) AdminGetTransactionFeeMap ¶
func (fes *APIServer) AdminGetTransactionFeeMap(ww http.ResponseWriter, req *http.Request)
AdminGetTransactionFeeMap is an endpoint that returns the TransactionFeeMap with ProfileEntryResponses.
func (*APIServer) AdminGetTutorialCreators ¶
func (fes *APIServer) AdminGetTutorialCreators(ww http.ResponseWriter, req *http.Request)
func (*APIServer) AdminGetUnfilteredHotFeed ¶
func (fes *APIServer) AdminGetUnfilteredHotFeed(ww http.ResponseWriter, req *http.Request)
func (*APIServer) AdminGetUserAdminData ¶
func (fes *APIServer) AdminGetUserAdminData(ww http.ResponseWriter, req *http.Request)
AdminGetUserAdminData gets the audit logs for a particular public key and their associated metadata from this node's global state. This does not use verifications fetched from other APIs.
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)
AdminGetUsernameVerificationAuditLogs gets the verification audit logs for a given username from this node's global state. It does not look at the configured GlobalStateAPIUrl to fetch this information.
func (*APIServer) AdminGetVerifiedUsers ¶
func (fes *APIServer) AdminGetVerifiedUsers(ww http.ResponseWriter, req *http.Request)
AdminGetVerifiedUsers gets a list of all verified users from this node's global state.
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 verification badge to a particular username. This operates on this node's global state and does not interact with the configured GlobalStateAPIUrl.
func (*APIServer) AdminJumioCallback ¶
func (fes *APIServer) AdminJumioCallback(ww http.ResponseWriter, req *http.Request)
AdminJumioCallback Note: this endpoint is mainly for testing purposes.
func (*APIServer) AdminPinPost ¶
func (fes *APIServer) AdminPinPost(ww http.ResponseWriter, req *http.Request)
AdminPinPost ...
func (*APIServer) AdminProcessETHTx ¶
func (fes *APIServer) AdminProcessETHTx(ww http.ResponseWriter, req *http.Request)
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. This operates on this node's global state and does not interact with the configured GlobalStateAPIUrl.
func (*APIServer) AdminResetJumioForPublicKey ¶
func (fes *APIServer) AdminResetJumioForPublicKey(ww http.ResponseWriter, req *http.Request)
func (*APIServer) AdminResetTutorialStatus ¶
func (fes *APIServer) AdminResetTutorialStatus(ww http.ResponseWriter, req *http.Request)
func (*APIServer) AdminSetAllTransactionFees ¶
func (fes *APIServer) AdminSetAllTransactionFees(ww http.ResponseWriter, req *http.Request)
AdminSetAllTransactionFees overwrites transaction fees for all transaction types.
func (*APIServer) AdminSetTransactionFeeForTransactionType ¶
func (fes *APIServer) AdminSetTransactionFeeForTransactionType(ww http.ResponseWriter, req *http.Request)
AdminSetTransactionFeeForTransactionType sets the minimum price to buy DeSo from this node.
func (*APIServer) AdminUpdateGlobalFeed ¶
func (fes *APIServer) AdminUpdateGlobalFeed(ww http.ResponseWriter, req *http.Request)
AdminUpdateGlobalFeed ... NOTE: This function adds posts to the global feed as well as to the hot feed approved posts.
func (*APIServer) AdminUpdateHotFeedAlgorithm ¶
func (fes *APIServer) AdminUpdateHotFeedAlgorithm(ww http.ResponseWriter, req *http.Request)
func (*APIServer) AdminUpdateHotFeedPostMultiplier ¶
func (fes *APIServer) AdminUpdateHotFeedPostMultiplier(ww http.ResponseWriter, req *http.Request)
func (*APIServer) AdminUpdateHotFeedUserMultiplier ¶
func (fes *APIServer) AdminUpdateHotFeedUserMultiplier(ww http.ResponseWriter, req *http.Request)
func (*APIServer) AdminUpdateJumioCountrySignUpBonus ¶
func (fes *APIServer) AdminUpdateJumioCountrySignUpBonus(ww http.ResponseWriter, req *http.Request)
AdminUpdateJumioCountrySignUpBonus allows admins to adjust the configuration of sign up bonuses at a country level
func (*APIServer) AdminUpdateJumioDeSo ¶
func (fes *APIServer) AdminUpdateJumioDeSo(ww http.ResponseWriter, req *http.Request)
func (*APIServer) AdminUpdateJumioUSDCents ¶
func (fes *APIServer) AdminUpdateJumioUSDCents(ww http.ResponseWriter, req *http.Request)
func (*APIServer) AdminUpdateNFTDrop ¶
func (fes *APIServer) AdminUpdateNFTDrop(ww http.ResponseWriter, req *http.Request)
func (*APIServer) AdminUpdateReferralHash ¶
func (fes *APIServer) AdminUpdateReferralHash(ww http.ResponseWriter, req *http.Request)
func (*APIServer) AdminUpdateTutorialCreator ¶
func (fes *APIServer) AdminUpdateTutorialCreator(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) AdminUploadReferralCSV ¶
func (fes *APIServer) AdminUploadReferralCSV(ww http.ResponseWriter, req *http.Request)
func (*APIServer) AppendExtraData ¶
func (fes *APIServer) AppendExtraData(ww http.ResponseWriter, req *http.Request)
AppendExtraData ... This endpoint allows setting custom ExtraData for a given transaction hex.
func (*APIServer) AuthorizeDerivedKey ¶
func (fes *APIServer) AuthorizeDerivedKey(ww http.ResponseWriter, req *http.Request)
AuthorizeDerivedKey ...
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) BurnNFT ¶
func (fes *APIServer) BurnNFT(ww http.ResponseWriter, req *http.Request)
func (*APIServer) BuyOrSellCreatorCoin ¶
func (fes *APIServer) BuyOrSellCreatorCoin(ww http.ResponseWriter, req *http.Request)
BuyOrSellCreatorCoin ...
func (*APIServer) CalculateNanosPurchasedFromWei ¶
func (*APIServer) CheckAdminPublicKey ¶
CheckSecret ...
func (*APIServer) CompProfileCreation ¶
func (*APIServer) CopyHotFeedApprovedPostsMap ¶
func (*APIServer) CopyHotFeedPKIDMultipliersMap ¶
func (fes *APIServer) CopyHotFeedPKIDMultipliersMap() map[lib.PKID]*HotFeedPKIDMultiplier
func (*APIServer) CreateFollowTxnStateless ¶
func (fes *APIServer) CreateFollowTxnStateless(ww http.ResponseWriter, req *http.Request)
CreateFollowTxnStateless ...
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) DeletePII ¶
func (fes *APIServer) DeletePII(ww http.ResponseWriter, rr *http.Request)
func (*APIServer) ExceedsDeSoBalance ¶
ExceedsSendDeSoBalance - Check if nanosPurchased is greater than the balance of the BuyDESO wallet.
func (*APIServer) ExchangeBitcoinStateless ¶
func (fes *APIServer) ExchangeBitcoinStateless(ww http.ResponseWriter, req *http.Request)
ExchangeBitcoinStateless ...
func (*APIServer) ExecuteETHRPCRequest ¶
func (fes *APIServer) ExecuteETHRPCRequest(method string, params []interface{}) (response *InfuraResponse, _err error)
ExecuteETHRPCRequest makes a request to Infura to fetch information about the Ethereum blockchain
func (*APIServer) FetchFromExternalGlobalState ¶
FetchFromExternalGlobalState hits an endpoint at the configured GlobalStateAPIUrl and returns the bytes read from the response body.
func (*APIServer) FilterOutRestrictedPubKeysFromList ¶
func (fes *APIServer) FilterOutRestrictedPubKeysFromList(profilePubKeys [][]byte, readerPK []byte, moderationType string, utxoView *lib.UtxoView) (_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, utxoView *lib.UtxoView, ) (_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) GetBlacklist ¶
func (fes *APIServer) GetBlacklist(utxoView *lib.UtxoView) ( _blacklistedPKIDMap map[lib.PKID][]byte, _err error, )
GetBlacklist returns both a slice of strings and a map of PKID to []byte representing the current state of blacklisted users.
func (*APIServer) GetBlacklistState ¶
GetBlacklistState returns the blacklist state bytes based on the current Blacklist state.
func (*APIServer) GetBlacklistedPublicKeys ¶
func (fes *APIServer) GetBlacklistedPublicKeys(ww http.ResponseWriter, req *http.Request)
GetBlacklistedPublicKeys returns a map of PKID (as Base58 encoded string) to Blacklist state bytes if global state is exposed.
func (*APIServer) GetBlockTemplate ¶
func (fes *APIServer) GetBlockTemplate(ww http.ResponseWriter, req *http.Request)
GetBlockTemplate ...
func (*APIServer) GetBlockchainDotComExchangeRate ¶
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) GetBuyDeSoFeeBasisPoints ¶
func (fes *APIServer) GetBuyDeSoFeeBasisPoints(ww http.ResponseWriter, req *http.Request)
GetBuyDeSoFeeBasisPoints gets the current value of the buy DeSo fee.
func (*APIServer) GetBuyDeSoFeeBasisPointsResponseFromGlobalState ¶
GetBuyDeSoFeeBasisPointsResponseFromGlobalState is a utility to get the current buy DeSo fee from global state.
func (*APIServer) GetCoinbaseExchangeRate ¶
func (*APIServer) GetCountryLevelSignUpBonusFromAlpha2 ¶
func (fes *APIServer) GetCountryLevelSignUpBonusFromAlpha2(countryCodeAlpha2 string) (_signUpBonus CountryLevelSignUpBonus)
func (*APIServer) GetCountryLevelSignUpBonusFromHeader ¶
func (fes *APIServer) GetCountryLevelSignUpBonusFromHeader(req *http.Request) (_signUpBonus CountryLevelSignUpBonus)
func (*APIServer) GetDefaultJumioCountrySignUpBonus ¶
func (fes *APIServer) GetDefaultJumioCountrySignUpBonus() CountryLevelSignUpBonus
GetDefaultJumioCountrySignUpBonus returns the default sign-up bonus configuration.
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) GetETHTransactionByHash ¶
GetETHTransactionByHash is a helper function to fetch transaction details and parse it into an InfuraTx struct
func (*APIServer) GetExchangeDeSoPrice ¶
func (*APIServer) GetExchangeRate ¶
func (fes *APIServer) GetExchangeRate(ww http.ResponseWriter, rr *http.Request)
func (*APIServer) GetExemptPublicKeyMapFromGlobalState ¶
GetExemptPublicKeyMapFromGlobalState gets a map where the keys represent the list of public keys exempt from node fees
func (*APIServer) GetFeaturedCreators ¶
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) GetGlobalFeed ¶
func (fes *APIServer) GetGlobalFeed(ww http.ResponseWriter, req *http.Request)
GetGlobalFeed returns the post hashes in the global feed for the last 7 days
func (*APIServer) GetGlobalFeedCache ¶
func (*APIServer) GetGlobalFeedPostHashesForLastWeek ¶
func (*APIServer) GetGlobalParams ¶
func (fes *APIServer) GetGlobalParams(ww http.ResponseWriter, req *http.Request)
func (*APIServer) GetGraylist ¶
func (fes *APIServer) GetGraylist(utxoView *lib.UtxoView) ( _graylistedPKIDMap map[lib.PKID][]byte, _err error, )
GetGraylist returns both a slice of strings and a map of PKID to []byte representing the current state of graylisted users.
func (*APIServer) GetGraylistState ¶
GetGraylistState returns the graylist state bytes based on the current Graylist state.
func (*APIServer) GetGraylistedPublicKeys ¶
func (fes *APIServer) GetGraylistedPublicKeys(ww http.ResponseWriter, req *http.Request)
GetGraylistedPublicKeys returns a map of PKID (as Base58 encoded string) to Graylist state bytes if global state is exposed.
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) GetHotFeed ¶
func (fes *APIServer) GetHotFeed(ww http.ResponseWriter, req *http.Request)
func (*APIServer) GetHotFeedConstantsFromGlobalState ¶
func (*APIServer) GetHotnessScoreInfoForTxn ¶
func (fes *APIServer) GetHotnessScoreInfoForTxn( txn *lib.MsgDeSoTxn, blockAge int, postInteractionMap map[HotFeedInteractionKey][]byte, utxoView *lib.UtxoView, ) (_postHashScored *lib.BlockHash, _interactionPKID *lib.PKID, _hotnessScore uint64, )
Returns the post hash that a txn is relevant to and the amount that the txn should contribute to that post's hotness score. The postInteractionMap is used to ensure that each PKID only gets one interaction per post.
func (*APIServer) GetJumioCountrySignUpBonus ¶
func (fes *APIServer) GetJumioCountrySignUpBonus(countryCode string) (_signUpBonus CountryLevelSignUpBonus, _err error)
GetJumioCountrySignUpBonus gets the country level sign up bonus configuration for the provided country code. If there is an error or there is no sign up bonus configuration for a given country, return the default sign-up bonus configuration.
func (*APIServer) GetJumioDeSoNanos ¶
func (*APIServer) GetJumioStatusForPublicKey ¶
func (fes *APIServer) GetJumioStatusForPublicKey(ww http.ResponseWriter, rr *http.Request)
func (*APIServer) GetJumioUSDCents ¶
Get JumioUSDCents returns the default amount a user receives for verifying with Jumio without a referral code.
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) GetNFTsCreatedByPublicKey ¶
func (fes *APIServer) GetNFTsCreatedByPublicKey(ww http.ResponseWriter, req *http.Request)
GetNFTsCreatedByPublicKey gets paginated NFTs for a public key or username.
func (*APIServer) GetNFTsForUser ¶
func (fes *APIServer) GetNFTsForUser(ww http.ResponseWriter, req *http.Request)
func (*APIServer) GetNanosFromETH ¶
GetNanosFromETH - convert ETH to DESO nanos
func (*APIServer) GetNanosFromSats ¶
GetNanosFromSats - convert Satoshis to DeSo nanos
func (*APIServer) GetNanosFromUSDCents ¶
GetNanosFromUSDCents - convert USD cents to DeSo 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) GetNotificationsCount ¶
func (fes *APIServer) GetNotificationsCount(ww http.ResponseWriter, req *http.Request)
func (*APIServer) GetPostEntriesByDESOAfterTimePaginated ¶
func (fes *APIServer) GetPostEntriesByDESOAfterTimePaginated(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, skipVanillaRepost 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 gets 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) GetProfilesByUsernamePrefixAndDeSoLocked ¶
func (*APIServer) GetQuoteRepostsForPost ¶
func (fes *APIServer) GetQuoteRepostsForPost(ww http.ResponseWriter, req *http.Request)
func (*APIServer) GetRefereeSignUpBonusAmount ¶
func (fes *APIServer) GetRefereeSignUpBonusAmount(signUpBonus CountryLevelSignUpBonus, referralCodeUSDCents uint64) uint64
GetRefereeSignUpBonusAmount gets the amount the referee should get a sign-up bonus for verifying with Jumio based on the country of their ID.
func (*APIServer) GetReferralInfoForReferralHash ¶
func (fes *APIServer) GetReferralInfoForReferralHash(ww http.ResponseWriter, req *http.Request)
func (*APIServer) GetReferralInfoForUser ¶
func (fes *APIServer) GetReferralInfoForUser(ww http.ResponseWriter, req *http.Request)
func (*APIServer) GetReferrerSignUpBonusAmount ¶
func (fes *APIServer) GetReferrerSignUpBonusAmount(signUpBonus CountryLevelSignUpBonus, referralCodeUSDCents uint64) uint64
GetReferrerSignUpBonusAmount gets the amount the referrer should get as a kickback for referring the user based on the country from which the referee signed up.
func (*APIServer) GetRepostsForPost ¶
func (fes *APIServer) GetRepostsForPost(ww http.ResponseWriter, req *http.Request)
func (*APIServer) GetRestrictedPublicKeys ¶
func (fes *APIServer) GetRestrictedPublicKeys(prefix []byte, filterValue []byte, utxoView *lib.UtxoView, routePath string) ( _pkidMap map[lib.PKID][]byte, _err error, )
GetRestrictedPublicKeys fetches the blacklisted or graylisted public keys from this node's global state or the configured external global state. This returns both a slice of public keys (strings) and a map of PKID to restricted bytes.
func (*APIServer) GetRichList ¶
func (fes *APIServer) GetRichList(ww http.ResponseWriter, req *http.Request)
func (*APIServer) GetSingleCountrySignUpBonus ¶
func (fes *APIServer) GetSingleCountrySignUpBonus(countryCode string) CountryLevelSignUpBonus
GetSingleCountrySignUpBonus returns the current value of the sign-up bonus configuration stored in the cached map.
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) GetTotalSupply ¶
func (fes *APIServer) GetTotalSupply(ww http.ResponseWriter, req *http.Request)
func (*APIServer) GetTransactionFeeMapFromGlobalState ¶
func (fes *APIServer) GetTransactionFeeMapFromGlobalState() map[lib.TxnType][]*lib.DeSoOutput
GetTransactionFeeMapFromGlobalState extracts the transaction fee map from global state.
func (*APIServer) GetTransactionSpending ¶
func (fes *APIServer) GetTransactionSpending(ww http.ResponseWriter, req *http.Request)
GetTransactionSpending ... This endpoint allows you to calculate transaction total spending by subtracting transaction output to sender from transaction inputs. Note, this endpoint doesn't check if transaction is valid.
func (*APIServer) GetTransferDetails ¶
func (*APIServer) GetTutorialCreators ¶
func (fes *APIServer) GetTutorialCreators(ww http.ResponseWriter, req *http.Request)
func (*APIServer) GetTutorialCreatorsByFR ¶
func (*APIServer) GetUSDCentsToDeSoReserveExchangeRate ¶
func (fes *APIServer) GetUSDCentsToDeSoReserveExchangeRate(ww http.ResponseWriter, req *http.Request)
GetUSDCentsToDeSoReserveExchangeRate get the current reserve exchange rate
func (*APIServer) GetUSDCentsToDeSoReserveExchangeRateFromGlobalState ¶
GetUSDCentsToDeSoReserveExchangeRateFromGlobalState is a helper function to get the current USD cents to DeSo exchange rate
func (*APIServer) GetUSDFromNanos ¶
func (*APIServer) GetUserDerivedKeys ¶
func (fes *APIServer) GetUserDerivedKeys(ww http.ResponseWriter, req *http.Request)
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) GetUserMetadata ¶
func (fes *APIServer) GetUserMetadata(ww http.ResponseWriter, req *http.Request)
GetUserMetadata ...
func (*APIServer) GetUsersStateless ¶
func (fes *APIServer) GetUsersStateless(ww http.ResponseWriter, rr *http.Request)
GetUsersStateless ...
func (*APIServer) GetVerifiedUsernameMap ¶
func (fes *APIServer) GetVerifiedUsernameMap() ( _verifiedUsernameToPKID map[string]*lib.PKID, _err error, )
GetVerifiedUsernameMapResponse gets the verified username map (both map[string]string and map[string]*lib.PKID) from the configured GlobalStateAPIUrl or this node's global state.
func (*APIServer) GetVerifiedUsernameToPKIDMapFromGlobalState ¶
func (fes *APIServer) GetVerifiedUsernameToPKIDMapFromGlobalState() (_verificationMap map[string]*lib.PKID, _err error)
GetVerifiedUsernameToPKIDMapFromGlobalState
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) GetVerifiedUsernames ¶
func (fes *APIServer) GetVerifiedUsernames(ww http.ResponseWriter, req *http.Request)
GetVerifiedUsernames returns the VerifiedUsernameToPKID map if global state is exposed.
func (*APIServer) GetVideoStatus ¶
func (fes *APIServer) GetVideoStatus(ww http.ResponseWriter, req *http.Request)
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) HandleHotFeedPageRequest ¶
func (*APIServer) HashHexToBase58Check ¶
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) IsConfiguredForETH ¶
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) IsUserBlacklisted ¶
IsUserBlacklisted returns true if the user is blacklisted based on the current Blacklist state.
func (*APIServer) IsUserGraylisted ¶
IsUserGraylisted returns true if the user is graylisted based on the current Graylist state.
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 DESO. 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 DeSo. WHITELIST JUMIO IPs.
func (*APIServer) JumioFlowFinished ¶
func (fes *APIServer) JumioFlowFinished(ww http.ResponseWriter, req *http.Request)
func (*APIServer) JumioVerifiedHandler ¶
func (fes *APIServer) JumioVerifiedHandler(userMetadata *UserMetadata, jumioTransactionId string, jumioCountryCode string, publicKeyBytes []byte, utxoView *lib.UtxoView) (_userMetadata *UserMetadata, err error)
func (*APIServer) LogFeeSet ¶
func (fes *APIServer) LogFeeSet(txnType lib.TxnType, transactionFees []TransactionFee) (_err error)
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) PruneHotFeedApprovedPostsMap ¶
func (*APIServer) QueryETHRPC ¶
func (fes *APIServer) QueryETHRPC(ww http.ResponseWriter, req *http.Request)
QueryETHRPC is an endpoint used to execute queries through Infura
func (*APIServer) ResendVerifyEmail ¶
func (fes *APIServer) ResendVerifyEmail(ww http.ResponseWriter, req *http.Request)
func (*APIServer) SendDeSo ¶
func (fes *APIServer) SendDeSo(ww http.ResponseWriter, req *http.Request)
SendDeSo ...
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) SendSeedDeSo ¶
func (*APIServer) SetAllCountrySignUpBonusMetadata ¶
func (fes *APIServer) SetAllCountrySignUpBonusMetadata()
SetAllCountrySignUpBonusMetadata goes through all countries in map of CountryCodes in utils and sets the sign-up bonus config in cache.
func (*APIServer) SetBlacklistedPKIDMap ¶
func (*APIServer) SetBuyDeSoFeeBasisPoints ¶
func (fes *APIServer) SetBuyDeSoFeeBasisPoints(ww http.ResponseWriter, req *http.Request)
SetBuyDeSoFeeBasisPoints sets the percentage fee applied to all DeSo buys on this node.
func (*APIServer) SetGlobalFeedPostHashes ¶
func (fes *APIServer) SetGlobalFeedPostHashes()
func (*APIServer) SetGlobalStateCache ¶
func (fes *APIServer) SetGlobalStateCache()
func (*APIServer) SetGraylistedPKIDMap ¶
func (*APIServer) SetNotificationMetadata ¶
func (fes *APIServer) SetNotificationMetadata(ww http.ResponseWriter, req *http.Request)
func (*APIServer) SetSingleCountrySignUpBonus ¶
func (fes *APIServer) SetSingleCountrySignUpBonus(countryDetails countries.Alpha3CountryCodeDetails, signUpBonus CountryLevelSignUpBonus)
SetSingleCountrySignUpBonus sets the sign up bonus configuration for a given country in the cached map.
func (*APIServer) SetUSDCentsToDeSoReserveExchangeRate ¶
func (fes *APIServer) SetUSDCentsToDeSoReserveExchangeRate(ww http.ResponseWriter, req *http.Request)
SetUSDCentsToDeSoReserveExchangeRate sets the minimum price to buy DeSo from this node.
func (*APIServer) SetVerifiedUsernameMap ¶
func (fes *APIServer) SetVerifiedUsernameMap()
func (*APIServer) SetWyreRequestHeaders ¶
func (*APIServer) StartExchangePriceMonitoring ¶
func (fes *APIServer) StartExchangePriceMonitoring()
StartExchangePriceMonitoring gives every exchange rate update its own go routine so a blocked routine doesn't impede others
func (*APIServer) StartGlobalStateMonitoring ¶
func (fes *APIServer) StartGlobalStateMonitoring()
StartGlobalStateMonitoring begins monitoring Verified, Blacklisted, and Graylisted users and Global Feed Posts
func (*APIServer) StartHotFeedRoutine ¶
func (fes *APIServer) StartHotFeedRoutine()
A cached "HotFeedOrderedList" is stored on the server object and updated whenever a new block is found. In addition, a "HotFeedApprovedPostMap" is maintained using hot feed approval/removal operations stored in global state. Once started, the routine runs every second in order to make sure hot feed removals are processed quickly.
func (*APIServer) StartOrSkipTutorial ¶
func (fes *APIServer) StartOrSkipTutorial(ww http.ResponseWriter, req *http.Request)
func (*APIServer) StartSeedBalancesMonitoring ¶
func (fes *APIServer) StartSeedBalancesMonitoring()
Monitor balances for starter deso seed and buy deso seed
func (*APIServer) StartSupplyMonitoring ¶
func (fes *APIServer) StartSupplyMonitoring()
StartSupplyMonitoring begins monitoring the top 1000 public keys with the most DESO and the total supply
func (*APIServer) SubmitBlock ¶
func (fes *APIServer) SubmitBlock(ww http.ResponseWriter, req *http.Request)
func (*APIServer) SubmitETHTx ¶
func (fes *APIServer) SubmitETHTx(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) TestSignTransactionWithDerivedKey ¶
func (fes *APIServer) TestSignTransactionWithDerivedKey(ww http.ResponseWriter, req *http.Request)
TestSignTransactionWithDerivedKey ... This endpoint must not be used by a frontend in a production environment, instead it is meant to serve as a debugging tool as well as an example of how to properly sign transactions with a derived key.
func (*APIServer) TrackWalletOrder ¶
func (*APIServer) TransferCreatorCoin ¶
func (fes *APIServer) TransferCreatorCoin(ww http.ResponseWriter, req *http.Request)
TransferCreatorCoin ...
func (*APIServer) TransferNFT ¶
func (fes *APIServer) TransferNFT(ww http.ResponseWriter, req *http.Request)
func (*APIServer) TxnFeeMapToResponse ¶
func (fes *APIServer) TxnFeeMapToResponse(skipProfileEntryResponses bool) map[string][]TransactionFee
TxnFeeMapToResponse converts the transaction fee map to a format that is usable by the frontend.
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) UpdateHotFeedApprovedPostsMap ¶
func (*APIServer) UpdateHotFeedOrderedList ¶
func (fes *APIServer) UpdateHotFeedOrderedList( postsToMultipliers map[lib.BlockHash]float64, pkidsToMultipliers map[lib.PKID]*HotFeedPKIDMultiplier, ) (_hotFeedPostsMap map[lib.BlockHash]*HotnessPostInfo, )
func (*APIServer) UpdateHotFeedPKIDMultipliersMap ¶
func (fes *APIServer) UpdateHotFeedPKIDMultipliersMap( hotFeedPKIDMultipliers map[lib.PKID]*HotFeedPKIDMultiplier, )
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) UpdateTutorialStatus ¶
func (fes *APIServer) UpdateTutorialStatus(ww http.ResponseWriter, req *http.Request)
func (*APIServer) UpdateUSDCentsToDeSoExchangeRate ¶
func (fes *APIServer) UpdateUSDCentsToDeSoExchangeRate()
UpdateUSDCentsToDeSoExchangeRate updates app state's USD Cents per DeSo value
func (*APIServer) UpdateUSDToBTCPrice ¶
func (fes *APIServer) UpdateUSDToBTCPrice()
func (*APIServer) UpdateUSDToETHPrice ¶
func (fes *APIServer) UpdateUSDToETHPrice()
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) UploadVideo ¶
func (fes *APIServer) UploadVideo(ww http.ResponseWriter, req *http.Request)
UploadVideo creates a one-time tokenized URL that can be used to upload larger video files using the tus protocol. The client uses the Location header in the response from this function to upload the file. The client uses the Stream-Media-Id header in the response from cloudflare to understand how to access the file for streaming. See Cloudflare documentation here: https://developers.cloudflare.com/stream/uploading-videos/direct-creator-uploads#using-tus-recommended-for-videos-over-200mb
func (*APIServer) UserAdminStatus ¶
func (*APIServer) ValidateJWT ¶
func (*APIServer) VerifyEmail ¶
func (fes *APIServer) VerifyEmail(ww http.ResponseWriter, req *http.Request)
func (*APIServer) WriteGlobalStateDataToResponse ¶
func (fes *APIServer) WriteGlobalStateDataToResponse(data interface{}, functionName string, ww http.ResponseWriter)
WriteGlobalStateDataToResponse is a helper to encode the response.
func (*APIServer) WyreWalletOrderMetadataToResponse ¶
func (fes *APIServer) WyreWalletOrderMetadataToResponse(metadata *WyreWalletOrderMetadata) *WyreWalletOrderMetadataResponse
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 DeSo. 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-deso”. Ignored when PublicKeyBase58Check is set. TransactionIDBase58Check string // An DeSo public key encoded using base58 check encoding (starts // with “BC”) to get transaction IDs for. When set, // TransactionIDBase58Check is ignored. PublicKeyBase58Check string // Only return transaction IDs IDsOnly bool // Offset from which a page should be fetched LastTransactionIDBase58Check string // The last index of a transaction for a public key seen. If less than 0, it means we are not looking at // transactions in the database yet. LastPublicKeyTransactionIndex int64 // Number of transactions to be returned Limit uint64 }
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 // The hash of the last transaction LastTransactionIDBase58Check string // The last index of a transaction for a public key seen. LastPublicKeyTransactionIndex int64 BalanceNanos uint64 }
APITransactionInfoResponse specifies the response for a call to the APITransactionInfo endpoint.
type APITransferDeSoRequest ¶
type APITransferDeSoRequest struct { // An DeSo private key encoded using base58 check encoding (starts // with "bc"). SenderPrivateKeyBase58Check string // An DeSo public key encoded using base58 check encoding (starts // with “BC”) that will receive the DeSo being sent. This field is required // whether sending using an explicit public/private key pair. RecipientPublicKeyBase58Check string // The amount of DeSo to send in “nanos.” Note that “1 DeSo” is equal to // 1e9 nanos, so to send 1 DeSo, 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 // No need to specify ProfileEntryResponse in each TransactionFee TransactionFees []TransactionFee `safeForLogging:"true"` // When set to true, the transaction is returned in the response but not // actually broadcast to the network. Useful for testing. DryRun bool }
APITransferDeSoRequest specifies the params for a call to the APITransferDeSo endpoint.
type APITransferDeSoResponse ¶
type APITransferDeSoResponse 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 }
APITransferDeSoResponse specifies the response for a call to the APITransferDeSo 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"` // No need to specify ProfileEntryResponse in each TransactionFee TransactionFees []TransactionFee `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.MsgDeSoTxn TransactionHex string }
type AcceptNFTTransferRequest ¶
type AcceptNFTTransferRequest struct { UpdaterPublicKeyBase58Check string `safeForLogging:"true"` NFTPostHashHex string `safeForLogging:"true"` SerialNumber int `safeForLogging:"true"` MinFeeRateNanosPerKB uint64 `safeForLogging:"true"` // No need to specify ProfileEntryResponse in each TransactionFee TransactionFees []TransactionFee `safeForLogging:"true"` }
type AcceptNFTTransferResponse ¶
type AcceptNFTTransferResponse struct { UpdaterPublicKeyBase58Check string `safeForLogging:"true"` NFTPostHashHex string `safeForLogging:"true"` SerialNumber int `safeForLogging:"true"` TotalInputNanos uint64 ChangeAmountNanos uint64 FeeNanos uint64 Transaction *lib.MsgDeSoTxn TransactionHex string }
type AccessLevel ¶
type AccessLevel int
const ( PublicAccess AccessLevel = iota AdminAccess SuperAdminAccess )
type AdminAddExemptPublicKey ¶
type AdminAddExemptPublicKey struct { // PublicKeyBase58Check is the public key for which we are adding or removing an exemption from node fees. PublicKeyBase58Check string // IsRemoval is a boolean that when true means we should remove the exemption from a public key, when false means we // should add an exemption. IsRemoval bool }
type AdminCreateReferralHashRequest ¶
type AdminCreateReferralHashRequest struct { // A username or public name can be provided. If both are provided, public key is used. UserPublicKeyBase58Check string `safeForLogging:"true"` Username string `safeForLogging:"true"` // ReferralInfo to add for the new referral hash. ReferrerAmountUSDCents uint64 `safeForLogging:"true"` RefereeAmountUSDCents uint64 `safeForLogging:"true"` MaxReferrals uint64 `safeForLogging:"true"` RequiresJumio bool `safeForLogging:"true"` AdminPublicKey string `safeForLogging:"true"` }
type AdminCreateReferralHashResponse ¶
type AdminCreateReferralHashResponse struct {
ReferralInfoResponse ReferralInfoResponse `safeForLogging:"true"`
}
type AdminDownloadRefereeCSVRequest ¶
type AdminDownloadRefereeCSVRequest struct{}
type AdminDownloadRefereeCSVResponse ¶
type AdminDownloadRefereeCSVResponse struct {
CSVRows [][]string
}
type AdminDownloadReferralCSVRequest ¶
type AdminDownloadReferralCSVRequest struct{}
type AdminDownloadReferralCSVResponse ¶
type AdminDownloadReferralCSVResponse struct {
CSVRows [][]string
}
type AdminGetAllReferralInfoForUserResponse ¶
type AdminGetAllReferralInfoForUserResponse struct {
ReferralInfoResponses []ReferralInfoResponse `safeForLogging:"true"`
}
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 AdminGetExemptPublicKeysResponse ¶
type AdminGetExemptPublicKeysResponse struct { // ExemptPublicKeyMap is a map of PublicKeyBase58Check to ProfileEntryResponse. These public keys do not have to pay // node fees. ExemptPublicKeyMap map[string]*ProfileEntryResponse }
type AdminGetHotFeedAlgorithmRequest ¶
type AdminGetHotFeedAlgorithmRequest struct{}
type AdminGetHotFeedUserMultiplierRequest ¶
type AdminGetHotFeedUserMultiplierRequest struct {
Username string `safeforlogging:"true"`
}
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 AdminGetTransactionFeeMapResponse ¶
type AdminGetTransactionFeeMapResponse struct { // TransactionFeeMap is the current state of Transaction fees on this node. TransactionFeeMap map[string][]TransactionFee }
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 // Referral Code ReferralHashBase58Check string JumioStarterDeSoTxnHashBase58Check string ReferrerDeSoTxnHashBase58Check 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 AdminJumioCallback ¶
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 AdminProcessETHTxRequest ¶
type AdminProcessETHTxRequest struct {
ETHTxHash string
}
type AdminProcessETHTxResponse ¶
type AdminProcessETHTxResponse struct {
DESOTxHash string
}
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 AdminResetTutorialStatusRequest ¶
type AdminResetTutorialStatusRequest struct {
PublicKeyBase58Check string
}
type AdminSetAllTransactionFeesRequest ¶
type AdminSetAllTransactionFeesRequest struct { // NewTransactionFees is a slice of TransactionFees that should be applied to all transaction types. // This overwrites all transaction types. NewTransactionFees []TransactionFee }
AdminSetAllTransactionFeesRequest applies NewTransactionFees to each TransactionType.
type AdminSetAllTransactionFeesResponse ¶
type AdminSetAllTransactionFeesResponse struct { // TransactionFeeMap is the current state of Transaction fees on this node after the fees defined in // AdminSetAllTransactionFeesRequest have been set. TransactionFeeMap map[string][]TransactionFee }
type AdminSetTransactionFeeForTransactionTypeRequest ¶
type AdminSetTransactionFeeForTransactionTypeRequest struct { // TransactionType is the type of transaction for which we are setting the fees. TransactionType lib.TxnString // NewTransactionFees is a slice of TransactionFee structs that tells us who should receive a fee and how much // when a transaction of TransactionType is performed. NewTransactionFees []TransactionFee }
type AdminSetTransactionFeeForTransactionTypeResponse ¶
type AdminSetTransactionFeeForTransactionTypeResponse struct { // TransactionFeeMap is the current state of Transaction fees on this node after the fees defined in // AdminSetTransactionFeeForTransactionTypeRequest have been set. TransactionFeeMap map[string][]TransactionFee }
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 AdminUpdateHotFeedAlgorithmRequest ¶
type AdminUpdateHotFeedAlgorithmRequest struct { // Maximum score amount that any individual PKID can contribute to the hot feed score // before time decay. Ignored if set to zero. InteractionCap int // Number of blocks per halving for the hot feed score time decay. Ignored if set to zero. TimeDecayBlocks int }
type AdminUpdateHotFeedAlgorithmResponse ¶
type AdminUpdateHotFeedAlgorithmResponse struct{}
type AdminUpdateHotFeedPostMultiplierResponse ¶
type AdminUpdateHotFeedPostMultiplierResponse struct{}
type AdminUpdateHotFeedUserMultiplierResponse ¶
type AdminUpdateHotFeedUserMultiplierResponse struct{}
type AdminUpdateJumioCountrySignUpBonusRequest ¶
type AdminUpdateJumioCountrySignUpBonusRequest struct { CountryCode string CountryLevelSignUpBonus CountryLevelSignUpBonus }
type AdminUpdateJumioDeSoResponse ¶
type AdminUpdateJumioDeSoResponse struct {
DeSoNanos uint64
}
type AdminUpdateJumioUSDCentsResponse ¶
type AdminUpdateJumioUSDCentsResponse struct {
USDCents uint64
}
type AdminUpdateNFTDropResponse ¶
type AdminUpdateNFTDropResponse struct { DropEntry *NFTDropEntry Posts []*PostEntryResponse }
type AdminUpdateReferralHashRequest ¶
type AdminUpdateReferralHashRequest struct { // Referral hash to update. ReferralHashBase58 string `safeForLogging:"true"` // ReferralInfo to updatethe referral hash with. ReferrerAmountUSDCents uint64 `safeForLogging:"true"` RefereeAmountUSDCents uint64 `safeForLogging:"true"` MaxReferrals uint64 `safeForLogging:"true"` RequiresJumio bool `safeForLogging:"true"` IsActive bool `safeForLogging:"true"` AdminPublicKey string `safeForLogging:"true"` }
type AdminUpdateReferralHashResponse ¶
type AdminUpdateReferralHashResponse struct {
ReferralInfoResponse ReferralInfoResponse `safeForLogging:"true"`
}
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 AdminUploadReferralCSVRequest ¶
type AdminUploadReferralCSVRequest struct {
CSVRows [][]string
}
type AmplitudeEvent ¶
type AmplitudeUploadRequestBody ¶
type AmplitudeUploadRequestBody struct { ApiKey string `json:"api_key"` Events []AmplitudeEvent `json:"events"` }
Amplitude Logging
type AppendExtraDataRequest ¶
type AppendExtraDataRequest struct { // Transaction hex. TransactionHex string `safeForLogging:"true"` // ExtraData object. ExtraData map[string]string `safeForLogging:"true"` }
AppendExtraDataRequest ...
type AppendExtraDataResponse ¶
type AppendExtraDataResponse struct { // Final Transaction hex. TransactionHex string `safeForLogging:"true"` }
AppendExtraDataResponse ...
type AuthorizeDerivedKeyRequest ¶
type AuthorizeDerivedKeyRequest struct { // The original public key of the derived key owner. OwnerPublicKeyBase58Check string `safeForLogging:"true"` // The derived public key DerivedPublicKeyBase58Check string `safeForLogging:"true"` // The expiration block of the derived key pair. ExpirationBlock uint64 `safeForLogging:"true"` // The signature of hash(derived key + expiration block) made by the owner. AccessSignature string `safeForLogging:"true"` // The intended operation on the derived key. DeleteKey bool `safeForLogging:"true"` // If we intend to sign this transaction with a derived key. DerivedKeySignature bool `safeForLogging:"true"` // No need to specify ProfileEntryResponse in each TransactionFee TransactionFees []TransactionFee `safeForLogging:"true"` MinFeeRateNanosPerKB uint64 `safeForLogging:"true"` }
AuthorizeDerivedKeyRequest ...
type AuthorizeDerivedKeyResponse ¶
type AuthorizeDerivedKeyResponse struct { SpendAmountNanos uint64 TotalInputNanos uint64 ChangeAmountNanos uint64 FeeNanos uint64 Transaction *lib.MsgDeSoTxn TransactionHex string TxnHashHex string }
AuthorizeDerivedKeyResponse ...
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 `json:",omitempty"` }
type BatchGetRemoteRequest ¶
type BatchGetRemoteRequest struct {
KeyList [][]byte
}
type BatchGetRemoteResponse ¶
type BatchGetRemoteResponse struct {
ValueList [][]byte
}
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 BurnNFTRequest ¶
type BurnNFTRequest struct { UpdaterPublicKeyBase58Check string `safeForLogging:"true"` NFTPostHashHex string `safeForLogging:"true"` SerialNumber int `safeForLogging:"true"` MinFeeRateNanosPerKB uint64 `safeForLogging:"true"` // No need to specify ProfileEntryResponse in each TransactionFee TransactionFees []TransactionFee `safeForLogging:"true"` }
type BurnNFTResponse ¶
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, DeSoToSellNanos will be converted into // creator coin on behalf of the user. In a Sell transaction, // CreatorCoinToSellNanos will be converted into DeSo. In an AddDeSo // operation, DeSoToAddNanos will be aded for the user. This allows us to // support multiple transaction types with same meta field. DeSoToSellNanos uint64 `safeForLogging:"true"` CreatorCoinToSellNanos uint64 `safeForLogging:"true"` DeSoToAddNanos uint64 `safeForLogging:"true"` // When a user converts DeSo 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 DeSo. // 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. MinDeSoExpectedNanos uint64 `safeForLogging:"true"` MinCreatorCoinExpectedNanos uint64 `safeForLogging:"true"` MinFeeRateNanosPerKB uint64 `safeForLogging:"true"` // No need to specify ProfileEntryResponse in each TransactionFee TransactionFees []TransactionFee `safeForLogging:"true"` InTutorial bool `safeForLogging:"true"` BitCloutToSellNanos uint64 `safeForLogging:"true"` // Deprecated BitCloutToAddNanos uint64 `safeForLogging:"true"` // Deprecated MinBitCloutExpectedNanos uint64 `safeForLogging:"true"` // Deprecated }
BuyOrSellCreatorCoinRequest ...
type BuyOrSellCreatorCoinResponse ¶
type BuyOrSellCreatorCoinResponse struct { // The amount of DeSo ExpectedDeSoReturnedNanos uint64 ExpectedCreatorCoinReturnedNanos uint64 FounderRewardGeneratedNanos uint64 // Spend is defined as DeSo 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 // DeSo), so this ends up being 0. In the case of a creator coin buy, // it should equal the amount of DeSo you put in to buy the creator coin SpendAmountNanos uint64 TotalInputNanos uint64 ChangeAmountNanos uint64 FeeNanos uint64 Transaction *lib.MsgDeSoTxn TransactionHex string TxnHashHex string }
BuyOrSellCreatorCoinResponse ...
type CFVideoDetailsResponse ¶
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 CountryLevelSignUpBonus ¶
type CountryLevelSignUpBonus struct { // If true, referee amount specified in referral code will be paid to users who sign up with IDs from this country. // If false, ReferralAmountOverrideUSDCents will be paid to users who sign up with IDs from this country. AllowCustomReferralAmount bool // Amount all referees will be paid when signing up from this country if AllowCustomReferralAmount is false. ReferralAmountOverrideUSDCents uint64 // If true, referrer amount specified in referral code will be paid as a kickback to users who gave out referral // code that a user signed up with IDs from this country. // If false, KickbackAmountOverrideUSDCents will be paid as a kickback to referrers when a user signs up with an ID // from this country. AllowCustomKickbackAmount bool // Amount all referrers will be paid when a referee signs up from this country if AllowCustomKickbackAmount is // false. KickbackAmountOverrideUSDCents uint64 }
type CountrySignUpBonusResponse ¶
type CountrySignUpBonusResponse struct { CountryLevelSignUpBonus CountryLevelSignUpBonus CountryCodeDetails countries.Alpha3CountryCodeDetails }
type CreateFollowTxnStatelessRequest ¶
type CreateFollowTxnStatelessRequest struct { FollowerPublicKeyBase58Check string `safeForLogging:"true"` FollowedPublicKeyBase58Check string `safeForLogging:"true"` IsUnfollow bool `safeForLogging:"true"` MinFeeRateNanosPerKB uint64 `safeForLogging:"true"` // No need to specify ProfileEntryResponse in each TransactionFee TransactionFees []TransactionFee `safeForLogging:"true"` }
CreateFollowTxnStatelessRequest ...
type CreateFollowTxnStatelessResponse ¶
type CreateFollowTxnStatelessResponse struct { TotalInputNanos uint64 ChangeAmountNanos uint64 FeeNanos uint64 Transaction *lib.MsgDeSoTxn TransactionHex string }
CreateFollowTxnStatelessResponse ...
type CreateLikeStatelessRequest ¶
type CreateLikeStatelessRequest struct { ReaderPublicKeyBase58Check string `safeForLogging:"true"` LikedPostHashHex string `safeForLogging:"true"` IsUnlike bool `safeForLogging:"true"` MinFeeRateNanosPerKB uint64 `safeForLogging:"true"` // No need to specify ProfileEntryResponse in each TransactionFee TransactionFees []TransactionFee `safeForLogging:"true"` }
CreateLikeStatelessRequest ...
type CreateLikeStatelessResponse ¶
type CreateLikeStatelessResponse struct { TotalInputNanos uint64 ChangeAmountNanos uint64 FeeNanos uint64 Transaction *lib.MsgDeSoTxn TransactionHex string }
CreateLikeStatelessResponse ...
type CreateNFTBidRequest ¶
type CreateNFTBidRequest struct { UpdaterPublicKeyBase58Check string `safeForLogging:"true"` NFTPostHashHex string `safeForLogging:"true"` SerialNumber int `safeForLogging:"true"` BidAmountNanos int `safeForLogging:"true"` MinFeeRateNanosPerKB uint64 `safeForLogging:"true"` // No need to specify ProfileEntryResponse in each TransactionFee TransactionFees []TransactionFee `safeForLogging:"true"` }
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.MsgDeSoTxn 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"` // No need to specify ProfileEntryResponse in each TransactionFee TransactionFees []TransactionFee `safeForLogging:"true"` }
type CreateNFTResponse ¶
type DeleteIdentityRequest ¶
type DeleteIdentityRequest struct{}
type DeleteIdentityResponse ¶
type DeleteIdentityResponse struct{}
type DeletePIIRequest ¶
type DeleteRemoteRequest ¶
type DeleteRemoteRequest struct {
Key []byte
}
type DeleteRemoteResponse ¶
type DeleteRemoteResponse 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 DeSoTxnHashHex 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 GetAllCountryLevelSignUpBonusResponse ¶
type GetAllCountryLevelSignUpBonusResponse struct { SignUpBonusMetadata map[string]CountrySignUpBonusResponse DefaultSignUpBonusMetadata CountryLevelSignUpBonus }
type GetAppStateRequest ¶
type GetAppStateRequest struct {
PublicKeyBase58Check string
}
type GetAppStateResponse ¶
type GetAppStateResponse struct { MinSatoshisBurnedForProfileCreation uint64 BlockHeight uint32 IsTestnet bool HasStarterDeSoSeed bool HasTwilioAPIKey bool CreateProfileFeeNanos uint64 CompProfileCreation bool DiamondLevelMap map[int64]uint64 HasWyreIntegration bool HasJumioIntegration bool BuyWithETH bool USDCentsPerDeSoExchangeRate uint64 JumioDeSoNanos uint64 // Deprecated JumioUSDCents uint64 // CountrySignUpBonus is the sign-up bonus configuration for the country inferred from a request's IP address. CountrySignUpBonus CountryLevelSignUpBonus DefaultFeeRateNanosPerKB uint64 TransactionFeeMap map[string][]TransactionFee // Address to which we want to send ETH when used to buy DESO BuyETHAddress string Nodes map[uint64]lib.DeSoNode USDCentsPerBitCloutExchangeRate uint64 // Deprecated JumioBitCloutNanos uint64 // Deprecated }
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 GetBuyDeSoFeeBasisPointsResponse ¶
type GetBuyDeSoFeeBasisPointsResponse struct {
BuyDeSoFeeBasisPoints uint64
}
type GetDiamondsForPostResponse ¶
type GetDiamondsForPostResponse struct {
DiamondSenders []*DiamondSenderResponse
}
type GetDiamondsForPublicKeyResponse ¶
type GetDiamondsForPublicKeyResponse struct { DiamondSenderSummaryResponses []*DiamondSenderSummaryResponse TotalDiamonds uint64 }
type GetExchangeRateResponse ¶
type GetExchangeRateResponse struct { // BTC SatoshisPerDeSoExchangeRate uint64 USDCentsPerBitcoinExchangeRate uint64 // ETH NanosPerETHExchangeRate uint64 USDCentsPerETHExchangeRate uint64 // DESO NanosSold uint64 USDCentsPerDeSoExchangeRate uint64 USDCentsPerDeSoReserveExchangeRate uint64 BuyDeSoFeeBasisPoints uint64 SatoshisPerBitCloutExchangeRate uint64 // Deprecated USDCentsPerBitCloutExchangeRate uint64 // Deprecated USDCentsPerBitCloutReserveExchangeRate uint64 // Deprecated }
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, deso, 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 GetNFTsCreatedByPublicKeyRequest ¶
type GetNFTsCreatedByPublicKeyRequest struct { // Either PublicKeyBase58Check or Username can be set by the client to specify // which user we're obtaining NFTs for // If both are specified, PublicKeyBase58Check will supercede PublicKeyBase58Check string `safeForLogging:"true"` Username string `safeForLogging:"true"` ReaderPublicKeyBase58Check string `safeForLogging:"true"` // PostHashHex of the last NFT from the previous page LastPostHashHex string `safeForLogging:"true"` // Number of records to fetch NumToFetch uint64 `safeForLogging:"true"` }
GetNFTsCreatedByPublicKeyRequest ...
type GetNFTsCreatedByPublicKeyResponse ¶
type GetNFTsCreatedByPublicKeyResponse struct { NFTs []NFTDetails `safeForLogging:"true"` LastPostHashHex string `safeForLogging:"true"` }
GetNFTsCreatedByPublicKeyResponse ...
type GetNFTsForUserRequest ¶
type GetNFTsForUserResponse ¶
type GetNFTsForUserResponse struct {
NFTsMap map[string]*NFTEntryAndPostEntryResponse
}
type GetNextNFTShowcaseRequest ¶
type GetNextNFTShowcaseRequest struct{}
type GetNextNFTShowcaseResponse ¶
type GetNextNFTShowcaseResponse struct {
NextNFTShowcaseTstamp uint64
}
type GetNotificationsCountRequest ¶
type GetNotificationsCountRequest struct {
PublicKeyBase58Check string
}
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 // This defines notifications that should be filtered OUT of the response // If a field is missing from this struct, it should be included in the response // Accepted values are like, diamond, follow, transfer, nft, post FilteredOutNotificationCategories map[string]bool }
type GetNotificationsResponse ¶
type GetNotificationsResponse struct { Notifications []*TransactionMetadataResponse ProfilesByPublicKey map[string]*ProfileEntryResponse PostsByHash map[string]*PostEntryResponse LastSeenIndex int64 }
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 deso GetPostsByDESO bool `safeForLogging:"true"` GetPostsByClout bool // Deprecated // This only gets posts that include media, like photos and videos MediaRequired bool `safeForLogging:"true"` PostsByDESOMinutesLookback 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 GetQuoteRepostsForPostResponse ¶
type GetQuoteRepostsForPostResponse struct { QuoteReposts []*PostEntryResponse QuoteReclouts []*PostEntryResponse // Deprecated }
type GetReferralInfoForReferralHashRequest ¶
type GetReferralInfoForReferralHashRequest struct {
ReferralHash string
}
type GetReferralInfoForReferralHashResponse ¶
type GetReferralInfoForReferralHashResponse struct { ReferralInfoResponse *SimpleReferralInfoResponse CountrySignUpBonus CountryLevelSignUpBonus }
type GetReferralInfoForUserResponse ¶
type GetReferralInfoForUserResponse struct {
ReferralInfoResponses []ReferralInfoResponse `safeForLogging:"true"`
}
type GetRemoteRequest ¶
type GetRemoteRequest struct {
Key []byte
}
type GetRemoteResponse ¶
type GetRemoteResponse struct {
Value []byte
}
type GetRepostsForPostResponse ¶
type GetRepostsForPostResponse struct { Reposters []*ProfileEntryResponse Reclouters []*ProfileEntryResponse // Deprecated }
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"` // When true, we don't log a 404 for missing profiles NoErrorOnMissing bool `safeForLogging:"true"` }
type GetSingleProfileResponse ¶
type GetSingleProfileResponse struct { Profile *ProfileEntryResponse IsBlacklisted bool IsGraylisted bool }
type GetTransactionSpendingRequest ¶
type GetTransactionSpendingRequest struct { // Transaction hex. TransactionHex string `safeForLogging:"true"` }
GetTransactionSpendingRequest ...
type GetTransactionSpendingResponse ¶
type GetTransactionSpendingResponse struct { // Total transaction spending in nanos. TotalSpendingNanos uint64 `safeForLogging:"true"` }
GetTransactionSpendingResponse ...
type GetTutorialCreatorResponse ¶
type GetTutorialCreatorResponse struct { UpAndComingProfileEntryResponses []ProfileEntryResponse WellKnownProfileEntryResponses []ProfileEntryResponse }
type GetTutorialCreatorsRequest ¶
type GetTutorialCreatorsRequest struct {
ResponseLimit int
}
type GetTxnRequest ¶
type GetTxnRequest struct { // TxnHash to fetch. TxnHashHex string `safeForLogging:"true"` }
type GetTxnResponse ¶
type GetTxnResponse struct {
TxnFound bool
}
type GetUSDCentsToDeSoExchangeRateResponse ¶
type GetUSDCentsToDeSoExchangeRateResponse struct {
USDCentsPerDeSo uint64
}
type GetUserDerivedKeysRequest ¶
type GetUserDerivedKeysRequest struct { // Public key which derived keys we want to query. PublicKeyBase58Check string `safeForLogging:"true"` }
GetUserDerivedKeysRequest ...
type GetUserDerivedKeysResponse ¶
type GetUserDerivedKeysResponse struct { // DerivedKeys contains user's derived keys indexed by public keys in base58Check DerivedKeys map[string]*UserDerivedKey `safeForLogging:"true"` }
GetUserDerivedKeysResponse ...
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 GetUserMetadataRequest ¶
type GetUserMetadataRequest struct {
PublicKeyBase58Check string
}
type GetUserMetadataResponse ¶
type GetUserMetadataResponse struct { HasPhoneNumber bool CanCreateProfile bool BlockedPubKeys map[string]struct{} HasEmail bool EmailVerified bool // JumioFinishedTime = Time user completed flow in Jumio JumioFinishedTime uint64 // JumioVerified = user was verified from Jumio flow JumioVerified bool // JumioReturned = jumio webhook called JumioReturned bool }
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 GetVideoStatusResponse ¶
type GetVideoStatusResponse struct {
ReadyToStream bool
}
type GetWyreWalletOrderForPublicKeyResponse ¶
type GetWyreWalletOrderForPublicKeyResponse struct {
WyreWalletOrderMetadataResponses []*WyreWalletOrderMetadataResponse
}
type GlobalState ¶
type GlobalState struct { GlobalStateRemoteNode string GlobalStateRemoteSecret string GlobalStateDB *badger.DB }
func (*GlobalState) BatchGet ¶
func (gs *GlobalState) BatchGet(keyList [][]byte) (value [][]byte, _err error)
func (*GlobalState) BatchGetRemote ¶
func (gs *GlobalState) BatchGetRemote(ww http.ResponseWriter, rr *http.Request)
func (*GlobalState) CreateBatchGetRequest ¶
func (gs *GlobalState) CreateBatchGetRequest(keyList [][]byte) ( _url string, _json_data []byte, _err error)
func (*GlobalState) CreateDeleteRequest ¶
func (gs *GlobalState) CreateDeleteRequest(key []byte) ( _url string, _json_data []byte, _err error)
func (*GlobalState) CreateGetRequest ¶
func (gs *GlobalState) CreateGetRequest(key []byte) ( _url string, _json_data []byte, _err error)
func (*GlobalState) CreatePutRequest ¶
func (*GlobalState) CreateSeekRequest ¶
func (*GlobalState) Delete ¶
func (gs *GlobalState) Delete(key []byte) error
func (*GlobalState) DeleteRemote ¶
func (gs *GlobalState) DeleteRemote(ww http.ResponseWriter, rr *http.Request)
func (*GlobalState) GetRemote ¶
func (gs *GlobalState) GetRemote(ww http.ResponseWriter, rr *http.Request)
func (*GlobalState) GlobalStateRoutes ¶
func (gs *GlobalState) GlobalStateRoutes() []Route
GlobalStateRoutes returns the routes for managing global state. Note that these routes are generally protected by a shared_secret
func (*GlobalState) GlobalStateSeekRemote ¶
func (gs *GlobalState) GlobalStateSeekRemote(ww http.ResponseWriter, rr *http.Request)
func (*GlobalState) PutRemote ¶
func (gs *GlobalState) PutRemote(ww http.ResponseWriter, rr *http.Request)
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 HotFeedApprovedPostOp ¶
type HotFeedEntry ¶
A single element in the server's HotFeedOrderedList.
type HotFeedInteractionKey ¶
A key to track whether a specific public key has interacted with a post before.
type HotFeedPKIDMultiplier ¶
type HotFeedPKIDMultiplier struct { // A multiplier applied to the score that each user interaction adds to a post. InteractionMultiplier float64 // A multiplier applied to all posts from this specific PKID. PostsMultiplier float64 }
Multipliers to help a node operator boost content from PKID's relevant to their node. For example, a sports-focused node could boost athlete PKIDs.
type HotFeedPKIDMultiplierOp ¶
type HotFeedPageRequest ¶
type HotFeedPageResponse ¶
type HotFeedPageResponse struct {
HotFeedPage []PostEntryResponse
}
type HotnessPostInfo ¶
type InfuraRequest ¶
type InfuraResponse ¶
type InfuraTx ¶
type InfuraTx struct { BlockHash *string `json:"blockHash"` BlockNumber *string `json:"blockNumber"` From string `json:"from"` Gas string `json:"gas"` GasPrice string `json:"gasPrice"` Hash string `json:"hash"` Input string `json:"input"` Nonce string `json:"nonce"` To *string `json:"to"` TransactionIndex *string `json:"transactionIndex"` Value string `json:"value"` V string `json:"v"` R string `json:"r"` S string `json:"s"` }
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 JumioRejectReason ¶
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 NFTDetails ¶
type NFTDetails struct { NFTEntryResponses []*NFTEntryResponse NFTCollectionResponse *NFTCollectionResponse }
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"` IsPending 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 DeSo node is at in terms of syncing the DeSo // chain. DeSoStatus *NodeStatusResponse DeSoOutboundPeers []*PeerResponse DeSoInboundPeers []*PeerResponse DeSoUnconnectedPeers []*PeerResponse 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 // True if user deleted PII. Since users can PublicKeyDeleted 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 VideoURLs []string RepostedPostEntryResponse *PostEntryResponse CreatorBasisPoints uint64 StakeMultipleBasisPoints uint64 TimestampNanos uint64 IsHidden bool ConfirmationBlockHeight uint32 InMempool bool // 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 InGlobalFeed *bool `json:",omitempty"` InHotFeed *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 RepostCount uint64 QuoteRepostCount uint64 // A list of parent posts for this post (ordered: root -> closest parent post). ParentPosts []*PostEntryResponse // NFT info. IsNFT bool NumNFTCopies uint64 NumNFTCopiesForSale uint64 NumNFTCopiesBurned uint64 HasUnlockable bool NFTRoyaltyToCreatorBasisPoints uint64 NFTRoyaltyToCoinBasisPoints uint64 // Number of diamonds the sender gave this post. Only set when getting diamond posts. DiamondsFromSender uint64 // Score given to this post by the hot feed go routine. Not always populated. HotnessScore uint64 PostMultiplier float64 RecloutCount uint64 // Deprecated QuoteRecloutCount uint64 // Deprecated RecloutedPostEntryResponse *PostEntryResponse // Deprecated }
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 *CoinEntryResponse // Include current price for the frontend to display. CoinPriceDeSoNanos uint64 CoinPriceBitCloutNanos uint64 // Deprecated // Profiles of users that hold the coin + their balances. UsersThatHODL []*BalanceEntryResponse // If user is featured as a well known creator in the tutorial. IsFeaturedTutorialWellKnownCreator bool // If user is featured as an up and coming creator in the tutorial. // Note: a user should not be both featured as well known and up and coming IsFeaturedTutorialUpAndComingCreator bool }
type PutRemoteRequest ¶
type PutRemoteResponse ¶
type PutRemoteResponse struct { }
type QueryETHRPCRequest ¶
type ReferralInfo ¶
type ReferralInfo struct { ReferralHashBase58 string ReferrerPKID *lib.PKID ReferrerAmountUSDCents uint64 RefereeAmountUSDCents uint64 MaxReferrals uint64 // If set to zero, there is no cap on referrals. RequiresJumio bool // Stats NumJumioAttempts uint64 NumJumioSuccesses uint64 TotalReferrals uint64 TotalReferrerDeSoNanos uint64 TotalRefereeDeSoNanos uint64 DateCreatedTStampNanos uint64 }
A ReferralInfo struct holds all of the params and stats for a referral link/hash.
type ReferralInfoResponse ¶
type ReferralInfoResponse struct { IsActive bool Info ReferralInfo ReferredUsers []ProfileEntryResponse }
type RichListEntry ¶
type RichListEntryResponse ¶
type Route ¶
type Route struct { Name string Method []string Pattern string HandlerFunc http.HandlerFunc AccessLevel AccessLevel }
Route ...
type SeekRemoteRequest ¶
type SeekRemoteResponse ¶
type SendDeSoRequest ¶
type SendDeSoRequest struct { SenderPublicKeyBase58Check string `safeForLogging:"true"` RecipientPublicKeyOrUsername string `safeForLogging:"true"` AmountNanos int64 `safeForLogging:"true"` MinFeeRateNanosPerKB uint64 `safeForLogging:"true"` // No need to specify ProfileEntryResponse in each TransactionFee TransactionFees []TransactionFee `safeForLogging:"true"` }
SendDeSoRequest ...
type SendDeSoResponse ¶
type SendDeSoResponse struct { TotalInputNanos uint64 SpendAmountNanos uint64 ChangeAmountNanos uint64 FeeNanos uint64 TransactionIDBase58Check string Transaction *lib.MsgDeSoTxn TransactionHex string TxnHashHex string }
SendDeSoResponse ...
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"` // No need to specify ProfileEntryResponse in each TransactionFee TransactionFees []TransactionFee `safeForLogging:"true"` InTutorial bool `safeForLogging:"true"` }
SendDiamondsRequest ...
type SendDiamondsResponse ¶
type SendDiamondsResponse struct { SpendAmountNanos uint64 TotalInputNanos uint64 ChangeAmountNanos uint64 FeeNanos uint64 Transaction *lib.MsgDeSoTxn 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"` // No need to specify ProfileEntryResponse in each TransactionFee TransactionFees []TransactionFee `safeForLogging:"true"` }
SendMessageStatelessRequest ...
type SendMessageStatelessResponse ¶
type SendMessageStatelessResponse struct { TstampNanos uint64 TotalInputNanos uint64 ChangeAmountNanos uint64 FeeNanos uint64 Transaction *lib.MsgDeSoTxn TransactionHex string }
SendMessageStatelessResponse ...
type SendPhoneNumberVerificationTextResponse ¶
type SendPhoneNumberVerificationTextResponse struct { }
type SetBuyDeSoFeeBasisPointsResponse ¶
type SetBuyDeSoFeeBasisPointsResponse struct {
BuyDeSoFeeBasisPoints uint64
}
type SetNotificationMetadataRequest ¶
type SetNotificationMetadataRequest struct { PublicKeyBase58Check string // The last notification index the user has seen LastSeenIndex int64 // The last notification index that has been scanned LastUnreadNotificationIndex int64 // The total count of unread notifications UnreadNotifications int64 // JWT token JWT string }
type SetUSDCentsToDeSoExchangeRateResponse ¶
type SetUSDCentsToDeSoExchangeRateResponse struct {
USDCentsPerDeSo uint64
}
type SimpleReferralInfo ¶
type SimpleReferralInfoResponse ¶
type SimpleReferralInfoResponse struct { IsActive bool Info SimpleReferralInfo }
type SubmitBlockRequest ¶
type SubmitBlockResponse ¶
SubmitBlockResponse ...
type SubmitETHTxRequest ¶
type SubmitETHTxResponse ¶
type SubmitETHTxResponse struct {
DESOTxHash string
}
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.DeSoBodySchema // The PostHashHex of the post being reposted RepostedPostHashHex 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"` // No need to specify ProfileEntryResponse in each TransactionFee TransactionFees []TransactionFee `safeForLogging:"true"` InTutorial bool `safeForLogging:"true"` }
SubmitPostRequest ...
type SubmitPostResponse ¶
type SubmitPostResponse struct { TstampNanos uint64 `safeForLogging:"true"` PostHashHex string `safeForLogging:"true"` TotalInputNanos uint64 ChangeAmountNanos uint64 FeeNanos uint64 Transaction *lib.MsgDeSoTxn TransactionHex string }
SubmitPostResponse ...
type SubmitTransactionRequest ¶
type SubmitTransactionRequest struct {
TransactionHex string `safeForLogging:"true"`
}
type SubmitTransactionResponse ¶
type SubmitTransactionResponse struct { Transaction *lib.MsgDeSoTxn 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"` // No need to specify ProfileEntryResponse in each TransactionFee TransactionFees []TransactionFee `safeForLogging:"true"` }
SwapIdentityRequest ...
type SwapIdentityResponse ¶
type SwapIdentityResponse struct { TotalInputNanos uint64 ChangeAmountNanos uint64 FeeNanos uint64 Transaction *lib.MsgDeSoTxn TransactionHex string }
SwapIdentityResponse ...
type TestSignTransactionWithDerivedKeyRequest ¶
type TestSignTransactionWithDerivedKeyRequest struct { // Transaction hex. TransactionHex string `safeForLogging:"true"` // Derived private key in base58Check. DerivedKeySeedHex string `safeForLogging:"false"` }
TestSignTransactionWithDerivedKeyRequest ...
type TestSignTransactionWithDerivedKeyResponse ¶
type TestSignTransactionWithDerivedKeyResponse struct { // Signed Transaction hex. TransactionHex string `safeForLogging:"true"` }
TestSignTransactionWithDerivedKeyResponse ...
type TransactionFee ¶
type TransactionFee struct { // PublicKeyBase58Check is the public key of the user who receives the fee. PublicKeyBase58Check string // ProfileEntryResponse is only non-nil when TransactionFees are retrieved through admin endpoints. // The ProfileEntryResponse is only used to display usernames and avatars in the admin dashboard and thus is // excluded in other places to reduce payload sizes and improve performance. ProfileEntryResponse *ProfileEntryResponse // AmountNanos is the amount PublicKeyBase58Check receives when this fee is incurred. AmountNanos uint64 }
TransactionFee is a struct representing a user who should receive a fee.
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.MsgDeSoTxn, txnMeta *lib.TransactionMetadata, params *lib.DeSoParams) *TransactionResponse
APITransactionToResponse converts a raw DeSo 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"` // No need to specify ProfileEntryResponse in each TransactionFee TransactionFees []TransactionFee `safeForLogging:"true"` }
TransferCreatorCoinRequest ...
type TransferCreatorCoinResponse ¶
type TransferCreatorCoinResponse struct { SpendAmountNanos uint64 TotalInputNanos uint64 ChangeAmountNanos uint64 FeeNanos uint64 Transaction *lib.MsgDeSoTxn TransactionHex string TxnHashHex string }
TransferCreatorCoinResponse ...
type TransferNFTRequest ¶
type TransferNFTRequest struct { SenderPublicKeyBase58Check string `safeForLogging:"true"` ReceiverPublicKeyBase58Check string `safeForLogging:"true"` NFTPostHashHex string `safeForLogging:"true"` SerialNumber int `safeForLogging:"true"` EncryptedUnlockableText string `safeForLogging:"true"` MinFeeRateNanosPerKB uint64 `safeForLogging:"true"` // No need to specify ProfileEntryResponse in each TransactionFee TransactionFees []TransactionFee `safeForLogging:"true"` }
type TransferNFTResponse ¶
type TransferNFTResponse struct { SenderPublicKeyBase58Check string `safeForLogging:"true"` ReceiverPublicKeyBase58Check string `safeForLogging:"true"` NFTPostHashHex string `safeForLogging:"true"` SerialNumber int `safeForLogging:"true"` TotalInputNanos uint64 ChangeAmountNanos uint64 FeeNanos uint64 Transaction *lib.MsgDeSoTxn TransactionHex string }
type TutorialStatus ¶
type TutorialStatus string
const ( EMPTY TutorialStatus = "" STARTED TutorialStatus = "TutorialStarted" SKIPPED TutorialStatus = "TutorialSkipped" INVEST_OTHERS_BUY TutorialStatus = "InvestInOthersBuyComplete" INVEST_OTHERS_SELL TutorialStatus = "InvestInOthersSellComplete" CREATE_PROFILE TutorialStatus = "TutorialCreateProfileComplete" INVEST_SELF TutorialStatus = "InvestInYourselfComplete" FOLLOW_CREATORS TutorialStatus = "FollowCreatorsComplete" DIAMOND TutorialStatus = "GiveADiamondComplete" COMPLETE TutorialStatus = "TutorialComplete" )
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"` // No need to specify ProfileEntryResponse in each TransactionFee TransactionFees []TransactionFee `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.MsgDeSoTxn 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"` // No need to specify ProfileEntryResponse in each TransactionFee TransactionFees []TransactionFee `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"` // No need to specify ProfileEntryResponse in each TransactionFee TransactionFees []TransactionFee `safeForLogging:"true"` }
UpdateProfileRequest ...
type UpdateProfileResponse ¶
type UpdateProfileResponse struct { TotalInputNanos uint64 ChangeAmountNanos uint64 FeeNanos uint64 Transaction *lib.MsgDeSoTxn TransactionHex string TxnHashHex string CompProfileCreationTxnHashHex string }
UpdateProfileResponse ...
type UpdateTutorialStatusRequest ¶
type UpdateTutorialStatusRequest struct { PublicKeyBase58Check string TutorialStatus TutorialStatus CreatorPurchasedInTutorialPublicKey string ClearCreatorCoinPurchasedInTutorial bool JWT string }
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 DeSo 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 // Where is the user in the tutorial flow TutorialStatus TutorialStatus // Username of creator purchased during onboarding flow - used in case a user changes devices in the middle of the flow. CreatorPurchasedInTutorialUsername *string `json:",omitempty"` // Amount of creator coins purchased in the tutorial CreatorCoinsPurchasedInTutorial uint64 // Does this user need to complete the tutorial MustCompleteTutorial bool }
User ...
type UserDerivedKey ¶
type UserDerivedKey struct { // This is the public key of the owner. OwnerPublicKeyBase58Check string `safeForLogging:"true"` // This is the derived public key. DerivedPublicKeyBase58Check string `safeForLogging:"true"` // This is the expiration date of the derived key. ExpirationBlock uint64 `safeForLogging:"true"` // This is the current state of the derived key. IsValid bool `safeForLogging:"true"` }
UserDerivedKey ...
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 DeSo 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 // JumioStarterDeSoTxnHashHex = Txn hash hex of the transaction in which the user was paid for // going through the Jumio flow JumioStarterDeSoTxnHashHex string // JumioShouldCompProfileCreation = True if we should comp the create profile fee because the user went through the // Jumio flow. JumioShouldCompProfileCreation bool // User must complete tutorial if they have been jumio verified. MustCompleteTutorial bool // If user is featured as a well known creator in the tutorial. IsFeaturedTutorialWellKnownCreator bool // If user is featured as an up and coming creator in the tutorial. // Note: a user should not be both featured as well known and up and coming IsFeaturedTutorialUpAndComingCreator bool TutorialStatus TutorialStatus CreatorPurchasedInTutorialPKID *lib.PKID CreatorCoinsPurchasedInTutorial uint64 // ReferralHashBase58Check with which user signed up ReferralHashBase58Check string // Txn hash in which the referrer was paid ReferrerDeSoTxnHash string // The number of unread notifications stored in the db. UnreadNotifications uint64 // The most recently scanned notification transaction index in the database. Stored in order to prevent unnecessary re-scanning. LatestUnreadNotificationIndex int64 }
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 DeSo that was sent for this WyreWalletOrder DeSoPurchasedNanos uint64 // BlockHash of the transaction for sending the DeSo 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 DeSo that was sent for this WyreWalletOrder DeSoPurchasedNanos uint64 BitCloutPurchasedNanos uint64 // Deprecated // BlockHash of the transaction for sending the DeSo BasicTransferTxnHash string Timestamp *time.Time }
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"` Country string `json:"country"` Amount string `json:"amount"` 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"` }
Source Files ¶
- admin_buy_deso.go
- admin_feed.go
- admin_fees.go
- admin_jumio.go
- admin_nft.go
- admin_node.go
- admin_referrals.go
- admin_transaction.go
- admin_tutorial.go
- admin_user.go
- base.go
- bitcoin_price.go
- eth.go
- exchange.go
- expose_global_state.go
- global_state.go
- hot_feed.go
- media.go
- message.go
- miner.go
- nft.go
- post.go
- referrals.go
- server.go
- shared.go
- supply.go
- transaction.go
- tutorial.go
- user.go
- verify.go
- wyre.go