routes

package
v3.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2022 License: MIT Imports: 59 Imported by: 1

Documentation

Index

Constants

View Source
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
)
View Source
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"
)
View Source
const (
	GlobalStateSharedSecretParam = "shared_secret"

	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"
)
View Source
const (
	// Number of blocks per halving for the scoring time decay for the global hot feed.
	DefaultHotFeedTimeDecayBlocks uint64 = 72
	// Number of blocks per halving for the scoring time decay for a tag hot feed.
	DefaultHotFeedTagTimeDecayBlocks uint64 = 96
	// Maximum score amount that any individual PKID can contribute before time decay.
	DefaultHotFeedInteractionCap uint64 = 4e12
	// Maximum score amount that any individual PKID can contribute before time decay for a particular tag grouping.
	DefaultHotFeedTagInteractionCap uint64 = 4e12
	// How many iterations of the hot feed calculation until the built-up caches should be reset. (Once per day)
	ResetCachesIterationLimit int = 288
)

HotnessFeed scoring algorithm knobs.

View Source
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"
)
View Source
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"
	RoutePathGetIngressCookie = "/api/v0/get-ingress-cookie"

	// 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"
	RoutePathDAOCoin                  = "/api/v0/dao-coin"
	RoutePathTransferDAOCoin          = "/api/v0/transfer-dao-coin"
	RoutePathCreateDAOCoinLimitOrder  = "/api/v0/create-dao-coin-limit-order"
	RoutePathCreateDAOCoinMarketOrder = "/api/v0/create-dao-coin-market-order"
	RoutePathCancelDAOCoinLimitOrder  = "/api/v0/cancel-dao-coin-limit-order"
	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"
	RoutePathGetHodlersCountForPublicKeys               = "/api/v0/get-hodlers-count-for-public-keys"
	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"
	RoutePathGetSingleDerivedKey                        = "/api/v0/get-single-derived-key"
	RoutePathGetTransactionSpendingLimitHexString       = "/api/v0/get-transaction-spending-limit-hex-string"
	RoutePathGetAccessBytes                             = "/api/v0/get-access-bytes"
	RoutePathGetTransactionSpendingLimitResponseFromHex = "/api/v0/get-transaction-spending-limit-response-from-hex"
	RoutePathDeletePII                                  = "/api/v0/delete-pii"
	RoutePathGetUserMetadata                            = "/api/v0/get-user-metadata"
	RoutePathGetUsernameForPublicKey                    = "/api/v0/get-user-name-for-public-key"
	RoutePathGetPublicKeyForUsername                    = "/api/v0/get-public-key-for-user-name"

	// dao_coin_exchange.go
	RoutePathGetDaoCoinLimitOrders           = "/api/v0/get-dao-coin-limit-orders"
	RoutePathGetTransactorDaoCoinLimitOrders = "/api/v0/get-transactor-dao-coin-limit-orders"

	// 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"
	RoutePathGetAcceptedBidHistory     = "/api/v0/accepted-bid-history"

	// 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"
	RoutePathRegisterMessagingGroupKey  = "/api/v0/register-messaging-group-key"
	RoutePathGetAllMessagingGroupKeys   = "/api/v0/get-all-messaging-group-keys"
	RoutePathCheckPartyMessagingKeys    = "/api/v0/check-party-messaging-keys"
	RoutePathGetBulkMessagingPublicKeys = "/api/v0/get-bulk-messaging-public-keys"

	// 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"
	RoutePathMetamaskSignIn    = "/api/v0/send-starter-deso-for-metamask-account"
	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"
	RoutePathAdminResetPhoneNumber                 = "/api/v0/admin/reset-phone-number"

	// 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"
	RoutePathAdminUpdateJumioKickbackUSDCents     = "/api/v0/admin/update-jumio-kickback-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"
	RoutePathGetCountKeysWithDESO = "/api/v0/count-keys-with-deso"
)
View Source
const DAOCoinLimitOrderDESOPublicKey = "DESO"
View Source
const DESOCoinIdentifierString = "DESO"
View Source
const JwtDerivedPublicKeyClaim = "derivedPublicKeyBase58Check"

Variables

View Source
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

func AddHeaders(inner http.Handler, allowedOrigins []string) http.Handler

AddHeaders ...

func CalculateExchangeRateAsFloat

func CalculateExchangeRateAsFloat(
	buyingCoinPublicKeyBase58Check string,
	sellingCoinPublicKeyBase58Check string,
	scaledValue *uint256.Int,
) (float64, error)

CalculateExchangeRateAsFloat acts as a pass-through function to CalculateFloatFromScaledExchangeRate for backwards compatibility

func CalculateFloatFromScaledExchangeRate

func CalculateFloatFromScaledExchangeRate(
	buyingCoinPublicKeyBase58Check string,
	sellingCoinPublicKeyBase58Check string,
	scaledValue *uint256.Int,
) (float64, error)

CalculateFloatFromScaledExchangeRate given a buying coin, selling coin, and base unit to base unit exchange rate, this calculates the coin-level float exchange rate for the coin pair, while accounting for the difference in base unit scaling factors for $DESO (1e9) and DAO coins (1e18)

func CalculateFloatQuantityFromBaseUnits

func CalculateFloatQuantityFromBaseUnits(
	buyingCoinPublicKeyBase58Check string,
	sellingCoinPublicKeyBase58Check string,
	operationTypeString DAOCoinLimitOrderOperationTypeString,
	quantityToFillInBaseUnits *uint256.Int,
) (float64, error)

CalculateFloatQuantityFromBaseUnits calculates the float coin quantity in whole units given a buying coin, selling coin, operationType and a quantity in base units

func CalculatePriceStringFromScaledExchangeRate

func CalculatePriceStringFromScaledExchangeRate(
	buyingCoinPublicKeyBase58Check string,
	sellingCoinPublicKeyBase58Check string,
	scaledValueExchangeRate *uint256.Int,
	operationTypeString DAOCoinLimitOrderOperationTypeString,
) (string, error)

CalculatePriceStringFromScaledExchangeRate calculates price as a decimal string given a scaled ExchangeRateCoinsToSellPerCoinToBuy The denominator for the output price is determined by the operation type If operation type = BID, then price is the number of selling coins per buying coin If operation type = ASK, then price is the number of buying coins per selling coin

func CalculateQuantityToFillAsBaseUnits

func CalculateQuantityToFillAsBaseUnits(
	buyingCoinPublicKeyBase58Check string,
	sellingCoinPublicKeyBase58Check string,
	operationTypeString DAOCoinLimitOrderOperationTypeString,
	quantityToFill string,
) (*uint256.Int, error)

CalculateQuantityToFillAsBaseUnits given a buying coin, selling coin, operationType and a float coin quantity, this calculates the quantity in base units for the side the operationType refers to

func CalculateScaledExchangeRate

func CalculateScaledExchangeRate(
	buyingCoinPublicKeyBase58Check string,
	sellingCoinPublicKeyBase58Check string,
	exchangeRateCoinsToSellPerCoinToBuy float64,
) (*uint256.Int, error)

CalculateScaledExchangeRate acts as a pass through function to CalculateScaledExchangeRateFromFloat for backwards compatibility

func CalculateScaledExchangeRateFromFloat

func CalculateScaledExchangeRateFromFloat(
	buyingCoinPublicKeyBase58Check string,
	sellingCoinPublicKeyBase58Check string,
	exchangeRateCoinsToSellPerCoinToBuy float64,
) (*uint256.Int, error)

CalculateScaledExchangeRateFromFloat given a buying coin, selling coin, and a coin-level float exchange rate, this calculates the base unit to base unit exchange rate for the coin pair, while accounting for the difference in base unit scaling factors for $DESO (1e9) and DAO coins (1e18)

func CalculateScaledExchangeRateFromPriceString

func CalculateScaledExchangeRateFromPriceString(
	buyingCoinPublicKeyBase58Check string,
	sellingCoinPublicKeyBase58Check string,
	price string,
	operationType lib.DAOCoinLimitOrderOperationType,
) (*uint256.Int, error)

CalculateScaledExchangeRateFromPriceString calculates a scaled ExchangeRateCoinsToSellPerCoinsToBuy given a decimal price string (ex: "1.23456") that represents an exchange rate between the two coins where the numerator is the coin defined by the operation type.

func CalculateStringQuantityFromBaseUnits

func CalculateStringQuantityFromBaseUnits(
	buyingCoinPublicKeyBase58Check string,
	sellingCoinPublicKeyBase58Check string,
	operationTypeString DAOCoinLimitOrderOperationTypeString,
	quantityToFillInBaseUnits *uint256.Int,
) (string, error)

CalculateStringQuantityFromBaseUnits given a buying coin, selling coin, operationType and quantity in base units, this calculates the decimal string coin quantity for the side the operation type refers to

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 CheckTxnForEditPost

func CheckTxnForEditPost(txn *lib.MsgDeSoTxn) (
	_isEditPostTxn bool, _postHashCreated *lib.BlockHash)

func Decode64BitIntString

func Decode64BitIntString(bytes []byte, _ *lib.DeSoParams, _ *lib.UtxoView) string

Decode64BitIntString supports decoding integers up to a length of 8 bytes

func Decode64BitUintString

func Decode64BitUintString(bytes []byte, _ *lib.DeSoParams, _ *lib.UtxoView) string

Decode64BitUintString supports decoding unsigned integers up to a length of 8 bytes

func DecodeBoolString

func DecodeBoolString(bytes []byte, params *lib.DeSoParams, utxoView *lib.UtxoView) string

func DecodeExtraDataMap

func DecodeExtraDataMap(params *lib.DeSoParams, utxoView *lib.UtxoView, extraData map[string][]byte) map[string]string

func DecodeHexString

func DecodeHexString(bytes []byte, _ *lib.DeSoParams, _ *lib.UtxoView) string

func DecodePkToString

func DecodePkToString(bytes []byte, params *lib.DeSoParams, _ *lib.UtxoView) string

func DecodePubKeyToUint64MapString

func DecodePubKeyToUint64MapString(bytes []byte, params *lib.DeSoParams, _ *lib.UtxoView) string

func DecodeString

func DecodeString(bytes []byte, _ *lib.DeSoParams, _ *lib.UtxoView) string

func DecodeTransactionSpendingLimit

func DecodeTransactionSpendingLimit(spendingBytes []byte, params *lib.DeSoParams, utxoView *lib.UtxoView) string

func Encode64BitIntString

func Encode64BitIntString(str string) ([]byte, error)

Encode64BitIntString supports encoding integers up to a length of 8 bytes

func Encode64BitUintString

func Encode64BitUintString(str string) ([]byte, error)

Encode64BitUintString supports decoding unsigned integers up to a length of 8 bytes

func EncodeBoolString

func EncodeBoolString(str string) ([]byte, error)

func EncodeExtraDataMap

func EncodeExtraDataMap(extraData map[string]string) (map[string][]byte, error)

func EncodeHexString

func EncodeHexString(str string) ([]byte, error)

func EncodePkStringToBytes

func EncodePkStringToBytes(str string) ([]byte, error)

func EncodeString

func EncodeString(str string) ([]byte, error)

func GetBalanceForPublicKeyUsingUtxoView

func GetBalanceForPublicKeyUsingUtxoView(
	publicKeyBytes []byte, utxoView *lib.UtxoView) (_balance uint64, _err error)

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 GetPostHashFromPostHashHex

func GetPostHashFromPostHashHex(postHashHex string) (*lib.BlockHash, error)

func GetPostHashToScoreForTxn

func GetPostHashToScoreForTxn(txn *lib.MsgDeSoTxn,
	utxoView *lib.UtxoView) (_postHashScored *lib.BlockHash, _posterPKID *lib.PKID)

func GetPubKeyBytesFromBase58Check

func GetPubKeyBytesFromBase58Check(pubKeyBase58Check string) (_pubKeyBytes []byte, _err error)

func GetUSDToBTCPrice

func GetUSDToBTCPrice() (float64, error)

func GlobalStateKeyETHPurchases

func GlobalStateKeyETHPurchases(txnHash string) []byte

func GlobalStateKeyExemptPublicKey

func GlobalStateKeyExemptPublicKey(publicKey []byte) []byte

func GlobalStateKeyForBlacklistAuditLogs

func GlobalStateKeyForBlacklistAuditLogs(username string) []byte

Key for accessing the blacklist audit logs associated with a user.

func GlobalStateKeyForBlacklistedProfile

func GlobalStateKeyForBlacklistedProfile(profilePubKey []byte) []byte

Key for accessing a blacklisted user.

func GlobalStateKeyForBuyDeSoFeeBasisPoints

func GlobalStateKeyForBuyDeSoFeeBasisPoints() []byte

func GlobalStateKeyForCountryCodeToCountrySignUpBonus

func GlobalStateKeyForCountryCodeToCountrySignUpBonus(countryCode string) []byte

func GlobalStateKeyForCountryIDDocumentTypeSubTypeDocumentNumber

func GlobalStateKeyForCountryIDDocumentTypeSubTypeDocumentNumber(countryID string, documentType string, subType string, documentNumber string) []byte

func GlobalStateKeyForGraylistAuditLogs

func GlobalStateKeyForGraylistAuditLogs(username string) []byte

Key for accessing the graylist audit logs associated with a user.

func GlobalStateKeyForGraylistedProfile

func GlobalStateKeyForGraylistedProfile(profilePubKey []byte) []byte

Key for accessing a graylisted user.

func GlobalStateKeyForHotFeedApprovedPostOp

func GlobalStateKeyForHotFeedApprovedPostOp(
	opTimestampNanos uint64,
	postHash *lib.BlockHash,
) []byte

func GlobalStateKeyForHotFeedPKIDMultiplierOp

func GlobalStateKeyForHotFeedPKIDMultiplierOp(
	opTimestampNanos uint64,
	opPKID *lib.PKID,
) []byte

func GlobalStateKeyForJumioDeSoNanos

func GlobalStateKeyForJumioDeSoNanos() []byte

func GlobalStateKeyForJumioKickbackUSDCents

func GlobalStateKeyForJumioKickbackUSDCents() []byte

func GlobalStateKeyForJumioUSDCents

func GlobalStateKeyForJumioUSDCents() []byte

func GlobalStateKeyForNFTDropEntry

func GlobalStateKeyForNFTDropEntry(dropNumber uint64) []byte

func GlobalStateKeyForPKIDReferralHashRefereePKID

func GlobalStateKeyForPKIDReferralHashRefereePKID(pkid *lib.PKID, referralHash []byte, refereePKID *lib.PKID) []byte

func GlobalStateKeyForPKIDReferralHashToIsActive

func GlobalStateKeyForPKIDReferralHashToIsActive(pkid *lib.PKID, referralHashBytes []byte) []byte

Key for getting a pub key's referral hashes and "IsActive" status.

func GlobalStateKeyForPKIDTstampnanosToJumioTransaction

func GlobalStateKeyForPKIDTstampnanosToJumioTransaction(pkid *lib.PKID, timestampNanos uint64) []byte

func GlobalStateKeyForPhoneNumberStringToMultiPhoneNumberMetadata

func GlobalStateKeyForPhoneNumberStringToMultiPhoneNumberMetadata(phoneNumber string) (_key []byte, _err error)

countryCode is a string like 'US' (Note: the phonenumbers lib calls this a "region code")

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") Deprecated

func GlobalStateKeyForPublicKeyToUserMetadata

func GlobalStateKeyForPublicKeyToUserMetadata(profilePubKey []byte) []byte

Key for accessing a user's global metadata.

func GlobalStateKeyForReferralHashToReferralInfo

func GlobalStateKeyForReferralHashToReferralInfo(referralHashBytes []byte) []byte

Key for accessing the referral info for a specific referral hash.

func GlobalStateKeyForTimestampPKIDReferralHashRefereePKID

func GlobalStateKeyForTimestampPKIDReferralHashRefereePKID(
	tstampNanos uint64, pkid *lib.PKID, referralHash []byte, refereePKID *lib.PKID) []byte

func GlobalStateKeyForTstampPinnedPostHash

func GlobalStateKeyForTstampPinnedPostHash(tstampNanos uint64, postHash *lib.BlockHash) []byte

Key for accessing a pinned post.

func GlobalStateKeyForTstampPostHash

func GlobalStateKeyForTstampPostHash(tstampNanos uint64, postHash *lib.BlockHash) []byte

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

func GlobalStateKeyForUsernameVerificationAuditLogs(username string) []byte

Key for accessing verification audit logs for a given username

func GlobalStateKeyForWhitelistAuditLogs

func GlobalStateKeyForWhitelistAuditLogs(username string) []byte

Key for accessing the whitelist audit logs associated with a user.

func GlobalStateKeyForWyreOrderID

func GlobalStateKeyForWyreOrderID(orderIdBytes []byte) []byte

func GlobalStateKeyForWyreOrderIDProcessed

func GlobalStateKeyForWyreOrderIDProcessed(orderIdBytes []byte) []byte

func GlobalStateKeyMetamaskAirdrop

func GlobalStateKeyMetamaskAirdrop(pk []byte) []byte

func GlobalStateKeyTransactionFeeOutputsFromTxnType

func GlobalStateKeyTransactionFeeOutputsFromTxnType(txnType lib.TxnType) []byte

func GlobalStateKeyUpAndComingTutorialCreators

func GlobalStateKeyUpAndComingTutorialCreators(pkid *lib.PKID) []byte

func GlobalStateKeyWellKnownTutorialCreators

func GlobalStateKeyWellKnownTutorialCreators(pkid *lib.PKID) []byte

func GlobalStatePrefixforPKIDTstampnanosToJumioTransaction

func GlobalStatePrefixforPKIDTstampnanosToJumioTransaction(pkid *lib.PKID) []byte

func GlobalStateSeekKeyForHotFeedApprovedPostOps

func GlobalStateSeekKeyForHotFeedApprovedPostOps(startTimestampNanos uint64) []byte

func GlobalStateSeekKeyForHotFeedPKIDMultiplierOps

func GlobalStateSeekKeyForHotFeedPKIDMultiplierOps(startTimestampNanos uint64) []byte

func GlobalStateSeekKeyForPKIDReferralHashRefereePKIDs

func GlobalStateSeekKeyForPKIDReferralHashRefereePKIDs(pkid *lib.PKID, referralHash []byte) []byte

func GlobalStateSeekKeyForPKIDReferralHashes

func GlobalStateSeekKeyForPKIDReferralHashes(pkid *lib.PKID) []byte

Key for seeking the DB for all referral hashes with a specific PKID.

func GlobalStateSeekKeyForTstampPostHash

func GlobalStateSeekKeyForTstampPostHash(tstampNanos uint64) []byte

func IsRestrictedPubKey

func IsRestrictedPubKey(userGraylistState []byte, userBlacklistState []byte, moderationType string) bool

func Logger

func Logger(inner http.Handler, name string) http.Handler

Logger ...

func NewHighPrecFloat

func NewHighPrecFloat() *big.Float

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 ParseTagsFromPost

func ParseTagsFromPost(postEntry *lib.PostEntry) ([]string, error)

Parse post body, extract all tags (e.g. @diamondhands), and return them in a slice.

func RefereeCSVHeaders

func RefereeCSVHeaders() (_headers []string)

func ReferralCSVHeaders

func ReferralCSVHeaders() (_headers []string)

func ReservedFieldCannotEncode

func ReservedFieldCannotEncode(_ string) ([]byte, error)

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

func TxnMetaIsNotification(txnMeta *lib.TransactionMetadata, publicKeyBase58Check string, utxoView *lib.UtxoView) bool

func VerifyBytesSignature

func VerifyBytesSignature(signerPk, data, signatureBytes []byte) error

VerifyBytesSignature checks if signatureBytes is a correct DER signature of data made by signerPk.

Types

type APIBalanceRequest

type APIBalanceRequest struct {
	PublicKeyBase58Check string
	Confirmations        uint32
}

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

	// most recent exchange prices fetched
	MostRecentCoinbasePriceUSDCents         uint64
	MostRecentBlockchainDotComPriceUSDCents 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 specified look-back period ordered by hotness score.
	HotFeedOrderedList []*HotFeedEntry
	// A map version of HotFeedOrderedList mapping each post to its hotness score for the tag feed and post age.
	HotFeedPostHashToTagScoreMap map[lib.BlockHash]*HotnessPostInfo
	// An in-memory map from post hash to post tags. This is used to cache tags to prevent hot feed algorithm from
	// continuously parsing the text body from already processed posts.
	PostHashToPostTagsMap map[lib.BlockHash][]string
	// An in-memory map from post tag to post hash. This allows us to
	// quickly get all the posts for a particular group.
	// This is represented as a map of strings to a set of post hashes. A set is used instead of an array to allow for
	// quicker de-duplication checks.
	PostTagToPostHashesMap map[string]map[lib.BlockHash]bool
	// For each tag, store ordered slice of post hashes based on hot feed ranking.
	PostTagToOrderedHotFeedEntries map[string][]*HotFeedEntry
	// For each tag, store ordered slice of post hashes based on newness.
	PostTagToOrderedNewestEntries map[string][]*HotFeedEntry
	// The height of the last block evaluated by the hotness routine.
	HotFeedBlockHeight uint32
	// A cache to store blocks for the block feed - in order to reduce processing time.
	HotFeedBlockCache map[lib.BlockHash]*lib.MsgDeSoBlock
	// 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
	HotFeedTagInteractionCap     uint64
	HotFeedTimeDecayBlocks       uint64
	HotFeedTagTimeDecayBlocks    uint64
	HotFeedTxnTypeMultiplierMap  map[lib.TxnType]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 an ordered state of post hashes on the global feed on
	// this node.
	GlobalFeedPostHashes []*lib.BlockHash
	// GlobalFeedPostEntries is a slice of PostEntries representing an ordered state of PostEntries on the global feed
	// on this node. It is computed from the GlobalFeedPostHashes above.
	GlobalFeedPostEntries []*lib.PostEntry

	// Cache of Total Supply and Rich List
	TotalSupplyNanos  uint64
	TotalSupplyDESO   float64
	RichList          []RichListEntryResponse
	CountKeysWithDESO uint64

	// map of country name to sign up bonus data
	AllCountryLevelSignUpBonuses map[string]CountrySignUpBonusResponse

	// Frequently accessed data from global state
	USDCentsToDESOReserveExchangeRate uint64
	BuyDESOFeeBasisPoints             uint64
	JumioUSDCents                     uint64
	JumioKickbackUSDCents             uint64

	// Public keys that need their balances monitored. Map of Label to Public key
	PublicKeyBalancesToMonitor map[string]string
	// 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) APIRoutes

func (fes *APIServer) APIRoutes() []Route

APIRoutes returns the routes for the public-facing API.

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) AddHotFeedParamToGlobalState

func (fes *APIServer) AddHotFeedParamToGlobalState(prefix []byte, value int) error

func (*APIServer) AddNodeSourceToTxnMetadata

func (fes *APIServer) AddNodeSourceToTxnMetadata(txn *lib.MsgDeSoTxn)

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) AdminResetPhoneNumber

func (fes *APIServer) AdminResetPhoneNumber(ww http.ResponseWriter, req *http.Request)

Clears all phone number metadata for a given phone number - thus allowing it to be used again.

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) AdminUpdateJumioKickbackUSDCents

func (fes *APIServer) AdminUpdateJumioKickbackUSDCents(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 (fes *APIServer) CalculateNanosPurchasedFromWei(value string) (_nanosPurchased uint64, _err error)

func (*APIServer) CancelDAOCoinLimitOrder

func (fes *APIServer) CancelDAOCoinLimitOrder(ww http.ResponseWriter, req *http.Request)

CancelDAOCoinLimitOrder Constructs a transaction that cancels an existing DAO coin limit order with the specified order id

func (*APIServer) CheckAdminPublicKey

func (fes *APIServer) CheckAdminPublicKey(inner http.Handler, AccessLevel AccessLevel) http.Handler

CheckSecret ...

func (*APIServer) CheckPartyMessagingKeys

func (fes *APIServer) CheckPartyMessagingKeys(ww http.ResponseWriter, req *http.Request)

CheckPartyMessagingKeys ...

func (*APIServer) CompProfileCreation

func (fes *APIServer) CompProfileCreation(profilePublicKey []byte, userMetadata *UserMetadata, utxoView *lib.UtxoView) (_additionalFee uint64, _txnHash *lib.BlockHash, _err error)

func (*APIServer) ComputeUserBalance

func (fes *APIServer) ComputeUserBalance(utxoView *lib.UtxoView, pubkey []byte) (uint64, error)

func (*APIServer) ComputeWealth

func (fes *APIServer) ComputeWealth(
	balanceEntryRes *BalanceEntryResponse, utxoView *lib.UtxoView) uint64

func (*APIServer) CopyHotFeedApprovedPostsMap

func (fes *APIServer) CopyHotFeedApprovedPostsMap() map[lib.BlockHash]float64

func (*APIServer) CopyHotFeedPKIDMultipliersMap

func (fes *APIServer) CopyHotFeedPKIDMultipliersMap() map[lib.PKID]*HotFeedPKIDMultiplier

func (*APIServer) CreateCheckPartyMessagingKeysResponse

func (fes *APIServer) CreateCheckPartyMessagingKeysResponse(senderPublicKey *lib.PublicKey, senderMessagingKeyName *lib.GroupKeyName,
	recipientPublicKey *lib.PublicKey, recipientMessagingKeyName *lib.GroupKeyName) (
	*CheckPartyMessagingKeysResponse, error)

func (*APIServer) CreateDAOCoinLimitOrder

func (fes *APIServer) CreateDAOCoinLimitOrder(ww http.ResponseWriter, req *http.Request)

CreateDAOCoinLimitOrder Constructs a transaction that creates a DAO coin limit order for the specified DAO coin pair, price, quantity, operation type, and fill type

func (*APIServer) CreateDAOCoinMarketOrder

func (fes *APIServer) CreateDAOCoinMarketOrder(ww http.ResponseWriter, req *http.Request)

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) DAOCoin

func (fes *APIServer) DAOCoin(ww http.ResponseWriter, req *http.Request)

DAOCoin ...

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) DerivedKeyEntryToUserDerivedKey

func (fes *APIServer) DerivedKeyEntryToUserDerivedKey(entry *lib.DerivedKeyEntry, blockHeight uint32, utxoView *lib.UtxoView) *UserDerivedKey

func (*APIServer) ExceedsDeSoBalance

func (fes *APIServer) ExceedsDeSoBalance(nanosPurchased uint64, seed string) (bool, error)

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

func (fes *APIServer) FetchFromExternalGlobalState(routePath string) (_body []byte, _err error)

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) GetAcceptedBidHistory

func (fes *APIServer) GetAcceptedBidHistory(ww http.ResponseWriter, req *http.Request)

func (*APIServer) GetAccessBytes

func (fes *APIServer) GetAccessBytes(ww http.ResponseWriter, req *http.Request)

func (*APIServer) GetAllMessagingGroupKeys

func (fes *APIServer) GetAllMessagingGroupKeys(ww http.ResponseWriter, req *http.Request)

GetAllMessagingGroupKeys ...

func (*APIServer) GetAllPostEntries

func (fes *APIServer) GetAllPostEntries(readerPK []byte) (
	_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) GetAppState

func (fes *APIServer) GetAppState(ww http.ResponseWriter, req *http.Request)

func (*APIServer) GetBTCAddress

func (fes *APIServer) GetBTCAddress() string

func (*APIServer) GetBestAvailableExchangeRateCoinsToBuyPerCoinToSell

func (fes *APIServer) GetBestAvailableExchangeRateCoinsToBuyPerCoinToSell(
	utxoView *lib.UtxoView,
	buyingCoinPKID *lib.PKID,
	sellingCoinPKID *lib.PKID,
) (string, error)

GetBestAvailableExchangeRateCoinsToBuyPerCoinToSell computes the best available decimal string exchange rate at which the market is able to exchange one base unit of the selling coin pair for the buying coin. Since we are interested in computing the best exchange rate for the selling coin, the denominator for the output will always be the selling coin.

Example: given buying coin B, and selling coin S, an output exchange rate of "1.5" implies an exchange rate of
         (1.5 coin B) per (1 coin S).

This function can support any arbitrary coin pair, but is most useful for markets where one coin is always considered the denominating coin (ex: DAO coin <> DESO). In such cases, this computes the best available ask price.

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

func (fes *APIServer) GetBlacklistState(pkid *lib.PKID) []byte

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 (fes *APIServer) GetBlockchainDotComExchangeRate() (_exchangeRate float64, _err error)

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) GetBulkMessagingPublicKeys

func (fes *APIServer) GetBulkMessagingPublicKeys(ww http.ResponseWriter, req *http.Request)

GetBulkMessagingPublicKeys endpoint will check if the messaging group keys exist for the given messaging groups identified by <GroupOwnerPublicKeysBase58Check, MessagingGroupKeyNames>. If all the groups exist, it will return the messaging public keys of the groups.

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) GetCoinbaseExchangeRate

func (fes *APIServer) GetCoinbaseExchangeRate() (_exchangeRate float64, _err error)

func (*APIServer) GetCountKeysWithDESO

func (fes *APIServer) GetCountKeysWithDESO(ww http.ResponseWriter, req *http.Request)

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) GetDAOCoinLimitOrders

func (fes *APIServer) GetDAOCoinLimitOrders(ww http.ResponseWriter, req *http.Request)

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

func (fes *APIServer) GetETHTransactionByHash(hash string) (_tx *InfuraTx, _err error)

GetETHTransactionByHash is a helper function to fetch transaction details and parse it into an InfuraTx struct

func (*APIServer) GetExchangeDeSoPrice

func (fes *APIServer) GetExchangeDeSoPrice() uint64

func (*APIServer) GetExchangeRate

func (fes *APIServer) GetExchangeRate(ww http.ResponseWriter, rr *http.Request)

func (*APIServer) GetExemptPublicKeyMapFromGlobalState

func (fes *APIServer) GetExemptPublicKeyMapFromGlobalState() map[string]interface{}

GetExemptPublicKeyMapFromGlobalState gets a map where the keys represent the list of public keys exempt from node fees

func (*APIServer) GetFeaturedCreators

func (fes *APIServer) GetFeaturedCreators(utxoView *lib.UtxoView, responseLimit int, seekKey []byte, disregardFR bool) (_profileEntryResponses []ProfileEntryResponse, _err error)

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 (fes *APIServer) GetFullWalletOrderDetails(client *http.Client, orderId string) (_wyreWalletOrderFullDetails *WyreWalletOrderFullDetails, _err error)

func (*APIServer) GetGCSClient

func (fes *APIServer) GetGCSClient(ctx context.Context) (*storage.Client, error)

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 (fes *APIServer) GetGlobalFeedCache(utxoView *lib.UtxoView) (_postHashes []*lib.BlockHash, _postEntries []*lib.PostEntry, _err error)

func (*APIServer) GetGlobalFeedPostHashesForLastWeek

func (fes *APIServer) GetGlobalFeedPostHashesForLastWeek() (_postHashes []*lib.BlockHash, _err error)

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

func (fes *APIServer) GetGraylistState(pkid *lib.PKID) []byte

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, isDAOCoin bool, utxoView *lib.UtxoView) (
	_youHodlMap map[string]*BalanceEntryResponse, _err error)

Get map of public keys hodling your coin.

func (*APIServer) GetHodlersCountForPublicKeys

func (fes *APIServer) GetHodlersCountForPublicKeys(ww http.ResponseWriter, req *http.Request)

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, isDAOCoin 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 (fes *APIServer) GetHotFeedConstantsFromGlobalState() (
	_interactionCap uint64, _interactionTagCap uint64, _timeDecayBlocks uint64, _timeDecayTagBlocks uint64, _tnxTypeMultiplierMap map[lib.TxnType]uint64, _err error,
)

func (*APIServer) GetHotFeedParamFromGlobalState

func (fes *APIServer) GetHotFeedParamFromGlobalState(prefix []byte) (uint64, error)

func (*APIServer) GetHotnessScoreInfoForTxn

func (fes *APIServer) GetHotnessScoreInfoForTxn(
	txn *lib.MsgDeSoTxn,
	blockAge int,
	postInteractionMap map[HotFeedInteractionKey]uint64,
	utxoView *lib.UtxoView,
	isTagFeed bool,
) (_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) GetIngressCookie

func (fes *APIServer) GetIngressCookie(ww http.ResponseWriter, req *http.Request)

This route allows a client to get the cookie set by nginx for session affinity. This value can then be passed to a backend to ensure that all requests a user is making are being handled by the same machine.

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 (fes *APIServer) GetJumioDeSoNanos() uint64

func (*APIServer) GetJumioStatusForPublicKey

func (fes *APIServer) GetJumioStatusForPublicKey(ww http.ResponseWriter, rr *http.Request)

func (*APIServer) GetLatestNFTDropEntry

func (fes *APIServer) GetLatestNFTDropEntry() (_dropEntry *NFTDropEntry, _err error)

Check global state and get the latest drop entry if available. If no drop entry is found in global state, returns a default-initialized NFTDropEntry.

func (*APIServer) GetLikesForPost

func (fes *APIServer) GetLikesForPost(ww http.ResponseWriter, req *http.Request)

func (*APIServer) GetMessagesStateless

func (fes *APIServer) GetMessagesStateless(ww http.ResponseWriter, rr *http.Request)

GetMessagesStateless ...

func (*APIServer) GetMetamaskAirdropMetadata

func (fes *APIServer) GetMetamaskAirdropMetadata(publicKey []byte) (*MetamaskAirdropMetadata, error)

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

func (fes *APIServer) GetNanosFromETH(eth *big.Float, feeBasisPoints uint64) uint64

GetNanosFromETH - convert ETH to DESO nanos

func (*APIServer) GetNanosFromSats

func (fes *APIServer) GetNanosFromSats(satoshis uint64, feeBasisPoints uint64) uint64

GetNanosFromSats - convert Satoshis to DeSo nanos

func (*APIServer) GetNanosFromUSDCents

func (fes *APIServer) GetNanosFromUSDCents(usdCents float64, feeBasisPoints uint64) uint64

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) GetPhoneVerificationAmountToSendNanos added in v3.0.2

func (fes *APIServer) GetPhoneVerificationAmountToSendNanos(phoneNumber string) uint64

func (*APIServer) GetPostEntriesByDESOAfterTimePaginated

func (fes *APIServer) GetPostEntriesByDESOAfterTimePaginated(readerPK []byte,
	minutesLookback uint64, numToFetch int, mediaRequired bool) (
	_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, mediaRequired bool) (
	_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, mediaRequired 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 (fes *APIServer) GetPostsForFollowFeedForPublicKey(bav *lib.UtxoView, startAfterPostHash *lib.BlockHash, publicKey []byte, numToFetch int, skipHidden bool, mediaRequired bool) (
	_postEntries []*lib.PostEntry, _err error)

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 (fes *APIServer) GetProfilesByUsernamePrefixAndDeSoLocked(
	db *badger.DB, usernamePrefix string, readerPK []byte, utxoView *lib.UtxoView) (
	_profileEntries []*lib.ProfileEntry, _err error)

func (*APIServer) GetPubKeyAndProfileEntryForUsernameOrPublicKeyBase58Check

func (fes *APIServer) GetPubKeyAndProfileEntryForUsernameOrPublicKeyBase58Check(
	pubKeyOrUsername string, utxoView *lib.UtxoView) (_pubKeyBytes []byte, _profileEntry *lib.ProfileEntry, _err error)

func (*APIServer) GetPublicKeyForUsername

func (fes *APIServer) GetPublicKeyForUsername(ww http.ResponseWriter, req *http.Request)

GetPublicKeyForUsername looks up a public key given a username

func (*APIServer) GetPublicKeyPrefix

func (fes *APIServer) GetPublicKeyPrefix() string

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, utxoView *lib.UtxoView, routePath string) (
	_pkidMap map[lib.PKID][]byte, _err error,
)

GetRestrictedPublicKeys fetches the blacklisted or graylisted public keys from the configured external global state (if available) and merges it with this node's global state. This returns 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) GetSingleDerivedKey

func (fes *APIServer) GetSingleDerivedKey(ww http.ResponseWriter, req *http.Request)

func (*APIServer) GetSinglePost

func (fes *APIServer) GetSinglePost(ww http.ResponseWriter, req *http.Request)

func (*APIServer) GetSinglePostComments

func (fes *APIServer) GetSinglePostComments(
	utxoView *lib.UtxoView,
	postEntryResponse *PostEntryResponse,
	requestData GetSinglePostRequest,
	posterPublicKeyBytes []byte,
	readerPublicKeyBytes []byte,
	blockedPublicKeys map[string]struct{},
	commentLevel uint32,
	topLevelPosterPublicKeyBase58Check string,
) ([]*PostEntryResponse, error)

Get the comments associated with a single post.

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) GetTransactionSpendingLimitHexString

func (fes *APIServer) GetTransactionSpendingLimitHexString(ww http.ResponseWriter, req *http.Request)

func (*APIServer) GetTransactionSpendingLimitResponseFromHex

func (fes *APIServer) GetTransactionSpendingLimitResponseFromHex(ww http.ResponseWriter, req *http.Request)

func (*APIServer) GetTransactorDAOCoinLimitOrders

func (fes *APIServer) GetTransactorDAOCoinLimitOrders(ww http.ResponseWriter, req *http.Request)

func (*APIServer) GetTransferDetails

func (fes *APIServer) GetTransferDetails(client *http.Client, transferId string) (_wyreTransferDetails *WyreTransferDetails, _err error)

func (*APIServer) GetTutorialCreators

func (fes *APIServer) GetTutorialCreators(ww http.ResponseWriter, req *http.Request)

func (*APIServer) GetTutorialCreatorsByFR

func (fes *APIServer) GetTutorialCreatorsByFR(ww http.ResponseWriter, req *http.Request, disregardFR bool)

func (*APIServer) GetTxn

func (fes *APIServer) GetTxn(ww http.ResponseWriter, req *http.Request)

func (*APIServer) GetUSDCentsToDeSoReserveExchangeRate

func (fes *APIServer) GetUSDCentsToDeSoReserveExchangeRate(ww http.ResponseWriter, req *http.Request)

GetUSDCentsToDeSoReserveExchangeRate get the current reserve exchange rate

func (*APIServer) GetUSDFromNanos

func (fes *APIServer) GetUSDFromNanos(nanos uint64) float64

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) GetUsernameForPublicKey

func (fes *APIServer) GetUsernameForPublicKey(ww http.ResponseWriter, req *http.Request)

GetUsernameForPublicKey looks up a username given a public key

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,
)

GetVerifiedUsernameMap gets the verified username map (both map[string]string and map[string]*lib.PKID) from the configured GlobalStateAPIUrl and merges it with 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, isDAOCoin bool, utxoView *lib.UtxoView) (
	_youHodlMap map[string]*BalanceEntryResponse, _err error)

Get map of creators you hodl.

func (*APIServer) HandleHotFeedPageRequest

func (fes *APIServer) HandleHotFeedPageRequest(
	ww http.ResponseWriter,
	req *http.Request,
	approvedPostsOnly bool,
	addMultiplierBool bool,
)

func (*APIServer) HashHexToBase58Check

func (fes *APIServer) HashHexToBase58Check(hashHex string) (base58Check string, _err error)

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 (fes *APIServer) IsConfiguredForETH() bool

func (*APIServer) IsConfiguredForJumio

func (fes *APIServer) IsConfiguredForJumio() bool

func (*APIServer) IsConfiguredForSendgrid

func (fes *APIServer) IsConfiguredForSendgrid() bool

func (*APIServer) IsConfiguredForWyre

func (fes *APIServer) IsConfiguredForWyre() bool

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

func (fes *APIServer) IsUserBlacklisted(pkid *lib.PKID) bool

IsUserBlacklisted returns true if the user is blacklisted based on the current Blacklist state.

func (*APIServer) IsUserGraylisted

func (fes *APIServer) IsUserGraylisted(pkid *lib.PKID) bool

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 (fes *APIServer) MakeWyreGetRequest(client *http.Client, url string) (_bodyBytes []byte, _err error)

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) MetamaskSignIn

func (fes *APIServer) MetamaskSignIn(ww http.ResponseWriter, req *http.Request)

func (*APIServer) NewRouter

func (fes *APIServer) NewRouter() *muxtrace.Router

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) ParseMessagingGroupEntries

func (fes *APIServer) ParseMessagingGroupEntries(
	utxoView *lib.UtxoView,
	memberPublicKeyBytes []byte,
	messagingGroupEntries []*lib.MessagingGroupEntry,
) []*MessagingGroupEntryResponse

ParseMessagingGroupEntries parses a core type []*lib.MessagingGroupEntry to the backend type []*MessagingGroupEntryResponse.

func (*APIServer) PopulateHotnessInfoMap

func (fes *APIServer) PopulateHotnessInfoMap(
	utxoView *lib.UtxoView,
	postsToMultipliers map[lib.BlockHash]float64,
	pkidsToMultipliers map[lib.PKID]*HotFeedPKIDMultiplier,
	isTagFeed bool,
	hotnessInfoBlocks []*HotnessInfoBlock,
) (map[lib.BlockHash]*HotnessPostInfo, error)

func (*APIServer) PruneHotFeedApprovedPostsMap

func (fes *APIServer) PruneHotFeedApprovedPostsMap(
	hotFeedPosts map[lib.BlockHash]*HotnessPostInfo, hotFeedApprovedPosts map[lib.BlockHash]float64,
)

func (*APIServer) PutMetamaskAirdropMetadata

func (fes *APIServer) PutMetamaskAirdropMetadata(metamaskAirdropMetadata *MetamaskAirdropMetadata) error

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) RegisterMessagingGroupKey

func (fes *APIServer) RegisterMessagingGroupKey(ww http.ResponseWriter, req *http.Request)

RegisterMessagingGroupKey ...

func (*APIServer) ResendVerifyEmail

func (fes *APIServer) ResendVerifyEmail(ww http.ResponseWriter, req *http.Request)

func (*APIServer) SaveOrderedFeedForTags

func (fes *APIServer) SaveOrderedFeedForTags(sortByHotness bool, PostTagToOrderedEntries map[string][]*HotFeedEntry) map[string][]*HotFeedEntry

Rank posts on a tag-by-tag basis and save them to their corresponding index in a map. If sortByHotness is true, sort by their hotness score, otherwise sort by newness.

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

  1. 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

  1. 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 (fes *APIServer) SendSeedDeSo(recipientPkBytes []byte, amountNanos uint64, useBuyDeSoSeed bool) (txnHash *lib.BlockHash, _err error)

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 (fes *APIServer) SetBlacklistedPKIDMap(utxoView *lib.UtxoView)

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) SetBuyDeSoFeeBasisPointsResponseFromGlobalState

func (fes *APIServer) SetBuyDeSoFeeBasisPointsResponseFromGlobalState()

SetBuyDeSoFeeBasisPointsResponseFromGlobalState is a utility to set the cached value of the current buy DeSo fee from global state.

func (*APIServer) SetGlobalFeedPostHashes

func (fes *APIServer) SetGlobalFeedPostHashes(utxoView *lib.UtxoView)

func (*APIServer) SetGlobalStateCache

func (fes *APIServer) SetGlobalStateCache()

func (*APIServer) SetGraylistedPKIDMap

func (fes *APIServer) SetGraylistedPKIDMap(utxoView *lib.UtxoView)

func (*APIServer) SetJumioKickbackUSDCents

func (fes *APIServer) SetJumioKickbackUSDCents()

func (*APIServer) SetJumioUSDCents

func (fes *APIServer) SetJumioUSDCents()

SetJumioUSDCents sets the cached value of the default amount a user receives for verifying with Jumio without a referral code.

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) SetUSDCentsToDeSoReserveExchangeRateFromGlobalState

func (fes *APIServer) SetUSDCentsToDeSoReserveExchangeRateFromGlobalState()

SetUSDCentsToDeSoReserveExchangeRateFromGlobalState is a helper function to set the cached value of the current USD cents to DeSo exchange rate

func (*APIServer) SetVerifiedUsernameMap

func (fes *APIServer) SetVerifiedUsernameMap()

func (*APIServer) SetWyreRequestHeaders

func (fes *APIServer) SetWyreRequestHeaders(req *http.Request, dataBytes []byte) *http.Request

func (*APIServer) Start

func (fes *APIServer) Start()

Start ...

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) Stop

func (fes *APIServer) Stop()

Stop...

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 (fes *APIServer) TrackWalletOrder(client *http.Client, transferId string) (_wyreTrackOrderResponse *WyreTrackOrderResponse, _err error)

func (*APIServer) TransactionSpendingLimitFromResponse

func (fes *APIServer) TransactionSpendingLimitFromResponse(
	transactionSpendingLimitResponse TransactionSpendingLimitResponse) (*lib.TransactionSpendingLimit, error)

func (*APIServer) TransferCreatorCoin

func (fes *APIServer) TransferCreatorCoin(ww http.ResponseWriter, req *http.Request)

TransferCreatorCoin ...

func (*APIServer) TransferDAOCoin

func (fes *APIServer) TransferDAOCoin(ww http.ResponseWriter, req *http.Request)

TransferDAOCoin ...

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) UpdateHotFeed

func (fes *APIServer) UpdateHotFeed(resetCache bool)

The business.

func (*APIServer) UpdateHotFeedApprovedPostsMap

func (fes *APIServer) UpdateHotFeedApprovedPostsMap(hotFeedApprovedPosts map[lib.BlockHash]float64)

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) UpdateSupplyStats

func (fes *APIServer) UpdateSupplyStats()

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 (fes *APIServer) UserAdminStatus(publicKeyBase58Check string) (_isAdmin bool, _isSuperAdmin bool)

func (*APIServer) ValidateJWT

func (fes *APIServer) ValidateJWT(publicKey string, jwtToken string) (bool, error)

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 AdminGetAllReferralInfoForUserRequest

type AdminGetAllReferralInfoForUserRequest 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"`

	AdminPublicKey string `safeForLogging:"true"`
}

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 AdminGetHotFeedAlgorithmResponse

type AdminGetHotFeedAlgorithmResponse struct {
	InteractionCap       uint64
	InteractionCapTag    uint64
	TimeDecayBlocks      uint64
	TimeDecayBlocksTag   uint64
	TxnTypeMultiplierMap map[lib.TxnType]uint64
}

type AdminGetHotFeedUserMultiplierRequest

type AdminGetHotFeedUserMultiplierRequest struct {
	Username string `safeforlogging:"true"`
}

type AdminGetHotFeedUserMultiplierResponse

type AdminGetHotFeedUserMultiplierResponse struct {
	InteractionMultiplier float64 `safeforlogging:"true"`
	PostsMultiplier       float64 `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 AdminJumioCallback struct {
	PublicKeyBase58Check string
	Username             string
	CountryAlpha3        string
}

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 AdminPinPostResponse

type AdminPinPostResponse struct{}

AdminPinPostResponse ...

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 AdminRequest struct {
	JWT            string
	AdminPublicKey string
}

type AdminResetJumioRequest

type AdminResetJumioRequest struct {
	PublicKeyBase58Check string
	Username             string
	JWT                  string
}

type AdminResetPhoneNumberRequest

type AdminResetPhoneNumberRequest struct {
	PhoneNumber string
}

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 AdminSetJumioVerifiedRequest

type AdminSetJumioVerifiedRequest struct {
	PublicKeyBase58Check string
	Username             string
}

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 global hot feed score
	// before time decay. Ignored if set to zero.
	InteractionCap int
	// Maximum score amount that any individual PKID can contribute to a particular tag's hot feed score
	// before time decay. Ignored if set to zero.
	InteractionCapTag int
	// Number of blocks per halving for the global hot feed score time decay. Ignored if set to zero.
	TimeDecayBlocks int
	// Number of blocks per halving for a tag's hot feed score time decay. Ignored if set to zero.
	TimeDecayBlocksTag int
	// Multiplier which alters the hotness score for a particular transaction type. Multiplier is stored in basis points.
	TxnTypeMultiplierMap map[lib.TxnType]uint64
}

type AdminUpdateHotFeedAlgorithmResponse

type AdminUpdateHotFeedAlgorithmResponse struct{}

type AdminUpdateHotFeedPostMultiplierRequest

type AdminUpdateHotFeedPostMultiplierRequest struct {
	PostHashHex string  `safeforlogging:"true"`
	Multiplier  float64 `safeforlogging:"true"`
}

type AdminUpdateHotFeedPostMultiplierResponse

type AdminUpdateHotFeedPostMultiplierResponse struct{}

type AdminUpdateHotFeedUserMultiplierRequest

type AdminUpdateHotFeedUserMultiplierRequest struct {
	Username              string  `safeforlogging:"true"`
	InteractionMultiplier float64 `safeforlogging:"true"`
	PostsMultiplier       float64 `safeforlogging:"true"`
}

type AdminUpdateHotFeedUserMultiplierResponse

type AdminUpdateHotFeedUserMultiplierResponse struct{}

type AdminUpdateJumioCountrySignUpBonusRequest

type AdminUpdateJumioCountrySignUpBonusRequest struct {
	CountryCode             string
	CountryLevelSignUpBonus CountryLevelSignUpBonus
}

type AdminUpdateJumioDeSoRequest

type AdminUpdateJumioDeSoRequest struct {
	JWT       string
	DeSoNanos uint64
}

type AdminUpdateJumioDeSoResponse

type AdminUpdateJumioDeSoResponse struct {
	DeSoNanos uint64
}

type AdminUpdateJumioKickbackUSDCentsRequest

type AdminUpdateJumioKickbackUSDCentsRequest struct {
	JWT      string
	USDCents uint64
}

type AdminUpdateJumioKickbackUSDCentsResponse

type AdminUpdateJumioKickbackUSDCentsResponse struct {
	USDCents uint64
}

type AdminUpdateJumioUSDCentsRequest

type AdminUpdateJumioUSDCentsRequest struct {
	JWT      string
	USDCents uint64
}

type AdminUpdateJumioUSDCentsResponse

type AdminUpdateJumioUSDCentsResponse struct {
	USDCents uint64
}

type AdminUpdateNFTDropRequest

type AdminUpdateNFTDropRequest struct {
	DropNumber         int    `safeForLogging:"true"`
	DropTstampNanos    int    `safeForLogging:"true"`
	IsActive           bool   `safeForLogging:"true"`
	NFTHashHexToAdd    string `safeForLogging:"true"`
	NFTHashHexToRemove string `safeForLogging:"true"`
}

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 AdminUpdateTutorialCreatorRequest

type AdminUpdateTutorialCreatorRequest struct {
	PublicKeyBase58Check string
	IsRemoval            bool
	IsWellKnown          bool
	JWT                  string
}

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 AdminUploadReferralCSVRequest

type AdminUploadReferralCSVRequest struct {
	CSVRows [][]string
}

type AdminUploadReferralCSVResponse

type AdminUploadReferralCSVResponse struct {
	LinksCreated uint64
	LinksUpdated uint64
}

type AmplitudeEvent

type AmplitudeEvent struct {
	UserId          string                 `json:"user_id"`
	EventType       string                 `json:"event_type"`
	EventProperties map[string]interface{} `json:"event_properties"`
}

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"`

	// ExtraData is arbitrary key value map
	ExtraData map[string]string `safeForLogging:"true"`

	// TransactionSpendingLimitHex represents a struct that will be merged with
	// the TransactionSpendingLimitTracker for this Derived key. We require that
	// this be sent as hex in order to guarantee that the AccessHash computed from
	// this value is consistent with what the user is requesting.
	TransactionSpendingLimitHex string `safeForLogging:"true"`

	// Memo is a simple string that can be used to describe a derived key
	Memo string `safeForLogging:"true"`

	AppName string `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

	// For simplicity, we create a new field for the uint256 balance for DAO coins
	BalanceNanosUint256 uint256.Int

	// 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"`

	// We add the DESO balance of the hodler for convenience
	HodlerDESOBalanceNanos uint64
}

type BatchGetRemoteRequest

type BatchGetRemoteRequest struct {
	KeyList [][]byte
}

type BatchGetRemoteResponse

type BatchGetRemoteResponse struct {
	ValueList [][]byte
}

type BlockPublicKeyRequest

type BlockPublicKeyRequest struct {
	PublicKeyBase58Check      string
	BlockPublicKeyBase58Check string
	Unblock                   bool
	JWT                       string
}

type BlockPublicKeyResponse

type BlockPublicKeyResponse struct {
	BlockedPublicKeys map[string]struct{}
}

type BlockchainDeSoTickerResponse

type BlockchainDeSoTickerResponse struct {
	Symbol         string  `json:"symbol"`
	Price24H       float64 `json:"price_24h"`
	Volume24H      float64 `json:"volume_24h"`
	LastTradePrice float64 `json:"last_trade_price"`
}

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 BurnNFTResponse 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 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 CFVideoDetailsResponse struct {
	Result   map[string]interface{} `json:"result"`
	Success  bool                   `json:"success"`
	Errors   []interface{}          `json:"errors"`
	Messages []interface{}          `json:"messages"`
}

type CheckPartyMessagingKeysRequest

type CheckPartyMessagingKeysRequest struct {
	// SenderPublicKeyBase58Check is the main public key of the sender in base58check format.
	SenderPublicKeyBase58Check string

	// SenderMessagingKeyName is the sender's key name the existence of which we want to verify.
	SenderMessagingKeyName string

	// RecipientPublicKeyBase58Check is the public key of the recipient in base58check format.
	RecipientPublicKeyBase58Check string

	// RecipientMessagingKeyName is the recipient's key name the existence of we want to verify.
	RecipientMessagingKeyName string
}

CheckPartyMessagingKeysRequest ...

type CheckPartyMessagingKeysResponse

type CheckPartyMessagingKeysResponse struct {
	// SenderMessagingPublicKeyBase58Check is the group messaging public key of the sender corresponding to the provided
	// SenderMessagingKeyName. This field will be an empty string if the key name doesn't exist.
	SenderMessagingPublicKeyBase58Check string

	// SenderMessagingKeyName is the key name that was passed in the initial request. It's added to the response for
	// convenience.
	SenderMessagingKeyName string

	// IsSenderMessagingKey determines if the SenderMessagingKeyName existed for the sender.
	IsSenderMessagingKey bool

	// RecipientMessagingPublicKeyBase58Check is the group messaging public key of the recipient corresponding to the provided
	// RecipientMessagingKeyName. This field will be an empty string if the key name doesn't exist.
	RecipientMessagingPublicKeyBase58Check string

	// RecipientMessagingKeyName is the key name that was passed in the initial request. It's added to the response for
	// convenience.
	RecipientMessagingKeyName string

	// IsRecipientMessagingKey determines if the RecipientMessagingKeyName existed for the sender.
	IsRecipientMessagingKey bool
}

CheckPartyMessagingKeysResponse ...

type CoinEntryResponse

type CoinEntryResponse struct {
	CreatorBasisPoints      uint64
	DeSoLockedNanos         uint64
	NumberOfHolders         uint64
	CoinsInCirculationNanos uint64
	CoinWatermarkNanos      uint64

	// Deprecated: Temporary to add support for BitCloutLockedNanos
	BitCloutLockedNanos uint64 // Deprecated
}

type CoinbaseDeSoTickerResponse

type CoinbaseDeSoTickerResponse struct {
	Data struct {
		Base     string `json:"base"`
		Currency string `json:"currency"`
		Amount   string `json:"amount"` // In USD
	} `json:"data"`
}

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 CommentsPostEntryResponse

type CommentsPostEntryResponse struct {
	PostEntryResponse    *PostEntryResponse
	PosterPublicKeyBytes []byte
}

Include poster public key in comments response

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"`
	IsBuyNow                       bool              `safeForLogging:"true"`
	BuyNowPriceNanos               uint64            `safeForLogging:"true"`
	AdditionalDESORoyaltiesMap     map[string]uint64 `safeForLogging:"true"`
	AdditionalCoinRoyaltiesMap     map[string]uint64 `safeForLogging:"true"`
	ExtraData                      map[string]string `safeForLogging:"true"`

	MinFeeRateNanosPerKB uint64 `safeForLogging:"true"`

	// No need to specify ProfileEntryResponse in each TransactionFee
	TransactionFees []TransactionFee `safeForLogging:"true"`
}

type CreateNFTResponse

type CreateNFTResponse struct {
	NFTPostHashHex string `safeForLogging:"true"`

	TotalInputNanos   uint64
	ChangeAmountNanos uint64
	FeeNanos          uint64
	Transaction       *lib.MsgDeSoTxn
	TransactionHex    string
}

type DAOCoinEntryResponse

type DAOCoinEntryResponse struct {
	NumberOfHolders           uint64
	CoinsInCirculationNanos   uint256.Int
	MintingDisabled           bool
	TransferRestrictionStatus TransferRestrictionStatusString
}

type DAOCoinLimitOrderCreationRequest

type DAOCoinLimitOrderCreationRequest struct {
	// The public key of the user who is creating the order
	TransactorPublicKeyBase58Check string `safeForLogging:"true"`

	// The public key of the DAO coin being bought
	BuyingDAOCoinCreatorPublicKeyBase58Check string `safeForLogging:"true"`

	// The public key of the DAO coin being sold
	SellingDAOCoinCreatorPublicKeyBase58Check string `safeForLogging:"true"`

	// A decimal string (ex: 1.23) that represents the exchange rate between the two coins. If operation type is BID
	// then the denominator represents the coin being bought. If the operation type is ASK, then the denominator
	// represents the coin being sold
	Price string `safeForLogging:"true"`

	// A decimal string (ex: 1.23) that represents the quantity of coins being bought or sold. If operation type is BID,
	// then this quantity refers to the coin being bought. If operation type is ASK, then it refers to the coin being sold
	Quantity string `safeForLogging:"true"`

	OperationType DAOCoinLimitOrderOperationTypeString `safeForLogging:"true"`
	FillType      DAOCoinLimitOrderFillTypeString      `safeForLogging:"true"`

	// The two fields ExchangeRateCoinsToSellPerCoinToBuy and QuantityToFill will be deprecated once the above Price
	// and Quantity fields are deployed, and users have migrated to start using them. Until then, the API will continue
	// to accept ExchangeRateCoinsToSellPerCoinToBuy and QuantityToFill in requests to this endpoint
	ExchangeRateCoinsToSellPerCoinToBuy float64 `safeForLogging:"true"` // Deprecated
	QuantityToFill                      float64 `safeForLogging:"true"` // Deprecated

	MinFeeRateNanosPerKB uint64           `safeForLogging:"true"`
	TransactionFees      []TransactionFee `safeForLogging:"true"`
}

type DAOCoinLimitOrderEntryResponse

type DAOCoinLimitOrderEntryResponse struct {
	TransactorPublicKeyBase58Check string `safeForLogging:"true"`

	BuyingDAOCoinCreatorPublicKeyBase58Check  string `safeForLogging:"true"`
	SellingDAOCoinCreatorPublicKeyBase58Check string `safeForLogging:"true"`

	// A decimal string (ex: 1.23) that represents the exchange rate between the two coins. If operation type is BID
	// then the denominator represents the coin being bought. If the operation type is ASK, then the denominator
	// represents the coin being sold
	Price string `safeForLogging:"true"`

	// A decimal string (ex: 1.23) that represents the quantity of coins being bought or sold. If operation type is BID,
	// then this quantity refers to the coin being bought. If operation type is ASK, then it refers to the coin being sold
	Quantity string `safeForLogging:"true"`

	// These two fields will be deprecated once the above Price and Quantity fields are deployed, and users have migrated
	// to start using them. Until then, the API will continue to populate ExchangeRateCoinsToSellPerCoinToBuy and QuantityToFill
	// in all responses
	ExchangeRateCoinsToSellPerCoinToBuy float64 `safeForLogging:"true"` // Deprecated
	QuantityToFill                      float64 `safeForLogging:"true"` // Deprecated

	OperationType DAOCoinLimitOrderOperationTypeString

	OrderID string
}

type DAOCoinLimitOrderFillTypeString

type DAOCoinLimitOrderFillTypeString string
const (
	DAOCoinLimitOrderFillTypeGoodTillCancelled DAOCoinLimitOrderFillTypeString = "GOOD_TILL_CANCELLED"
	DAOCoinLimitOrderFillTypeFillOrKill        DAOCoinLimitOrderFillTypeString = "FILL_OR_KILL"
	DAOCoinLimitOrderFillTypeImmediateOrCancel DAOCoinLimitOrderFillTypeString = "IMMEDIATE_OR_CANCEL"
)

type DAOCoinLimitOrderOperationTypeString

type DAOCoinLimitOrderOperationTypeString string

DAOCoinLimitOrderOperationTypeString A convenience type that uses a string to represent BID / ASK side in the API, so it's more human-readable

const (
	DAOCoinLimitOrderOperationTypeStringASK DAOCoinLimitOrderOperationTypeString = "ASK"
	DAOCoinLimitOrderOperationTypeStringBID DAOCoinLimitOrderOperationTypeString = "BID"
)

type DAOCoinLimitOrderResponse

type DAOCoinLimitOrderResponse struct {
	SpendAmountNanos  uint64
	TotalInputNanos   uint64
	ChangeAmountNanos uint64
	FeeNanos          uint64
	Transaction       *lib.MsgDeSoTxn
	TransactionHex    string
	TxnHashHex        string

	SimulatedExecutionResult *DAOCoinLimitOrderSimulatedExecutionResult
}

DAOCoinLimitOrderResponse ...

type DAOCoinLimitOrderSimulatedExecutionResult

type DAOCoinLimitOrderSimulatedExecutionResult struct {
	BuyingCoinQuantityFilled  string
	SellingCoinQuantityFilled string
}

type DAOCoinLimitOrderWithCancelOrderIDRequest

type DAOCoinLimitOrderWithCancelOrderIDRequest struct {
	// The public key of the user who is cancelling the order
	TransactorPublicKeyBase58Check string `safeForLogging:"true"`

	CancelOrderID string `safeForLogging:"true"`

	MinFeeRateNanosPerKB uint64           `safeForLogging:"true"`
	TransactionFees      []TransactionFee `safeForLogging:"true"`
}

type DAOCoinLimitOrderWithExchangeRateAndQuantityRequest

type DAOCoinLimitOrderWithExchangeRateAndQuantityRequest DAOCoinLimitOrderCreationRequest

DAOCoinLimitOrderWithExchangeRateAndQuantityRequest alias type for backwards compatibility

type DAOCoinMarketOrderCreationRequest

type DAOCoinMarketOrderCreationRequest struct {
	// The public key of the user who is sending the order
	TransactorPublicKeyBase58Check string `safeForLogging:"true"`

	// The public key of the DAO coin being bought
	BuyingDAOCoinCreatorPublicKeyBase58Check string `safeForLogging:"true"`

	// The public key of the DAO coin being sold
	SellingDAOCoinCreatorPublicKeyBase58Check string `safeForLogging:"true"`

	// A decimal string (ex: 1.23) that represents the quantity of coins being bought or sold. If operation type is BID,
	// then this quantity refers to the coin being bought. If operation type is ASK, then it refers to the coin being sold
	Quantity string `safeForLogging:"true"`

	OperationType DAOCoinLimitOrderOperationTypeString `safeForLogging:"true"`
	FillType      DAOCoinLimitOrderFillTypeString      `safeForLogging:"true"`

	// The QuantityToFill field will be deprecated once the above Quantity field is deployed, and users have migrated to
	// start using it. Until then, the API will continue to accept QuantityToFill as an optional parameter in lieu of Quantity
	QuantityToFill float64 `safeForLogging:"true"` // Deprecated

	MinFeeRateNanosPerKB uint64           `safeForLogging:"true"`
	TransactionFees      []TransactionFee `safeForLogging:"true"`
}

type DAOCoinMarketOrderWithQuantityRequest

type DAOCoinMarketOrderWithQuantityRequest DAOCoinMarketOrderCreationRequest

DAOCoinMarketOrderWithQuantityRequest alias type for backwards compatibility

type DAOCoinOperationTypeString

type DAOCoinOperationTypeString string
const (
	DAOCoinOperationStringMint                            DAOCoinOperationTypeString = "mint"
	DAOCoinOperationStringBurn                            DAOCoinOperationTypeString = "burn"
	DAOCoinOperationStringUpdateTransferRestrictionStatus DAOCoinOperationTypeString = "update_transfer_restriction_status"
	DAOCoinOperationStringDisableMinting                  DAOCoinOperationTypeString = "disable_minting"
)

type DAOCoinRequest

type DAOCoinRequest struct {
	// The public key of the user who is performing the DAOCoin Txn
	UpdaterPublicKeyBase58Check string `safeForLogging:"true"`

	// The public key or username of the profile whose DAO coin the transactor is trying to transact with.
	ProfilePublicKeyBase58CheckOrUsername string `safeForLogging:"true"`

	// Whether this is a "mint", "burn" or "disable_minting" transaction
	OperationType DAOCoinOperationTypeString `safeForLogging:"true"`

	// Coins
	CoinsToMintNanos uint256.Int `safeForLogging:"true"`

	CoinsToBurnNanos uint256.Int `safeForLogging:"true"`

	// Transfer Restriction Status
	TransferRestrictionStatus TransferRestrictionStatusString `safeForLogging:"true"`

	MinFeeRateNanosPerKB uint64 `safeForLogging:"true"`

	// No need to specify ProfileEntryResponse in each TransactionFee
	TransactionFees []TransactionFee `safeForLogging:"true"`
}

DAOCoinRequest ...

type DAOCoinResponse

type DAOCoinResponse struct {
	TotalInputNanos   uint64
	ChangeAmountNanos uint64
	FeeNanos          uint64
	Transaction       *lib.MsgDeSoTxn
	TransactionHex    string
	TxnHashHex        string
}

DAOCoinResponse ...

type DeleteIdentityRequest

type DeleteIdentityRequest struct{}

type DeleteIdentityResponse

type DeleteIdentityResponse struct{}

type DeletePIIRequest

type DeletePIIRequest struct {
	PublicKeyBase58Check string
	JWT                  string
}

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 ETHTx

type ETHTx struct {
	Nonce   string `json:"nonce"`
	Value   string `json:"value"`
	ChainId string `json:"chainId"`
	To      string `json:"to"`
	R       string `json:"r"`
	S       string `json:"s"`
}

type ETHTxLog

type ETHTxLog struct {
	PublicKey  []byte
	DESOTxHash string
}

ETHTxLog is used by admins to reprocess stuck transactions

type ExchangeBitcoinRequest

type ExchangeBitcoinRequest struct {
	// The public key of the user who we're creating the burn for.
	PublicKeyBase58Check string `safeForLogging:"true"`
	// If passed, we will check if the user intends to burn btc through a derived key.
	DerivedPublicKeyBase58Check 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 ExtraDataDecoderFunc

type ExtraDataDecoderFunc func([]byte, *lib.DeSoParams, *lib.UtxoView) string

type ExtraDataEncoderFunc

type ExtraDataEncoderFunc func(string) ([]byte, error)

type ExtraDataEncoding

type ExtraDataEncoding struct {
	Decode ExtraDataDecoderFunc
	Encode ExtraDataEncoderFunc
}

func GetExtraDataFieldEncoding

func GetExtraDataFieldEncoding(extraDataKey string) ExtraDataEncoding

GetExtraDataFieldEncoding For special fields, this gets the encoding used for that field. For all others, it uses an agnostic []byte <-> string cast for encoding / decoding.

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 GetAcceptedBidHistoryResponse

type GetAcceptedBidHistoryResponse struct {
	AcceptedBidHistoryMap map[uint64][]*NFTBidEntryResponse
}

type GetAccessBytesRequest

type GetAccessBytesRequest struct {
	DerivedPublicKeyBase58Check string
	ExpirationBlock             uint64
	TransactionSpendingLimit    TransactionSpendingLimitResponse
}

type GetAccessBytesResponse

type GetAccessBytesResponse struct {
	TransactionSpendingLimitHex string
	AccessBytesHex              string
}

type GetAllCountryLevelSignUpBonusResponse

type GetAllCountryLevelSignUpBonusResponse struct {
	SignUpBonusMetadata        map[string]CountrySignUpBonusResponse
	DefaultSignUpBonusMetadata CountryLevelSignUpBonus
}

type GetAllMessagingGroupKeysRequest

type GetAllMessagingGroupKeysRequest struct {
	// OwnerPublicKeyBase58Check is the public key in base58check of the account whose group messaging keys we want to fetch.
	OwnerPublicKeyBase58Check string
}

GetAllMessagingGroupKeysRequest ...

type GetAllMessagingGroupKeysResponse

type GetAllMessagingGroupKeysResponse struct {
	// MessagingGroupEntries is the list of all user's group messaging keys.
	MessagingGroupEntries []*MessagingGroupEntryResponse
}

GetAllMessagingGroupKeysResponse ...

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
	USDCentsPerDeSoCoinbase         uint64
	USDCentsPerDeSoBlockchainDotCom uint64
	JumioDeSoNanos                  uint64 // Deprecated
	JumioUSDCents                   uint64
	JumioKickbackUSDCents           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 GetBulkMessagingPublicKeysRequest

type GetBulkMessagingPublicKeysRequest struct {
	// GroupOwnerPublicKeysBase58Check is a list of public keys of the group owners.
	GroupOwnerPublicKeysBase58Check []string `safeForLogging:"true"`
	// MessagingGroupKeyNames is a list of messaging key names in hex.
	MessagingGroupKeyNames []string `safeForLogging:"true"`
}

GetBulkMessagingPublicKeysRequest ...

type GetBulkMessagingPublicKeysResponse

type GetBulkMessagingPublicKeysResponse struct {
	// MessagingPublicKeysBase58Check is a list of messaging public keys in base58check of the corresponding groups
	// identified by the <GroupOwnerPublicKeysBase58Check, MessagingGroupKeyNames> pairs.
	MessagingPublicKeysBase58Check []string `safeForLogging:"true"`
}

GetBulkMessagingPublicKeysResponse ...

type GetBuyDeSoFeeBasisPointsResponse

type GetBuyDeSoFeeBasisPointsResponse struct {
	BuyDeSoFeeBasisPoints uint64
}

type GetDAOCoinLimitOrdersRequest

type GetDAOCoinLimitOrdersRequest struct {
	DAOCoin1CreatorPublicKeyBase58Check string `safeForLogging:"true"`
	DAOCoin2CreatorPublicKeyBase58Check string `safeForLogging:"true"`
}

type GetDAOCoinLimitOrdersResponse

type GetDAOCoinLimitOrdersResponse struct {
	Orders []DAOCoinLimitOrderEntryResponse
}

type GetDiamondsForPostRequest

type GetDiamondsForPostRequest struct {
	// PostHashHex to fetch.
	PostHashHex                string `safeForLogging:"true"`
	Offset                     uint32 `safeForLogging:"true"`
	Limit                      uint32 `safeForLogging:"true"`
	ReaderPublicKeyBase58Check string `safeForLogging:"true"`
}

type GetDiamondsForPostResponse

type GetDiamondsForPostResponse struct {
	DiamondSenders []*DiamondSenderResponse
}

type GetDiamondsForPublicKeyRequest

type GetDiamondsForPublicKeyRequest struct {
	// The user we are getting diamonds for.
	PublicKeyBase58Check string `safeForLogging:"true"`

	// If true, fetch the diamonds this public key gave out instead of the diamond this public key received
	FetchYouDiamonded bool
}

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
	USDCentsPerDeSoBlockchainDotCom    uint64
	USDCentsPerDeSoCoinbase            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 DAO coin balance entries instead of creator coin balance entries
	IsDAOCoin bool `safeForLogging:"true"`

	// If true, fetch balance entries for your hodlings instead of balance entries for hodler's of your coin
	FetchHodlings bool

	// The sorting method to use when returning profiles. Defaults to
	// "coin_balance" when unset.
	SortType TopHodlerSortType

	// If true, fetch all hodlers/hodlings -- supercedes NumToFetch
	FetchAll bool
}

type GetHodlersForPublicKeyResponse

type GetHodlersForPublicKeyResponse struct {
	Hodlers                  []*BalanceEntryResponse
	LastPublicKeyBase58Check string
}

type GetHolderCountForPublicKeysRequest

type GetHolderCountForPublicKeysRequest struct {
	PublicKeysBase58Check []string
	IsDAOCoin             bool
}

type GetIngressCookieResponse

type GetIngressCookieResponse struct {
	CookieValue string
}

type GetJumioStatusForPublicKeyRequest

type GetJumioStatusForPublicKeyRequest struct {
	JWT                  string
	PublicKeyBase58Check string
}

type GetJumioStatusForPublicKeyResponse

type GetJumioStatusForPublicKeyResponse struct {
	JumioFinishedTime uint64
	JumioReturned     bool
	JumioVerified     bool

	BalanceNanos *uint64
}

type GetLikesForPostRequest

type GetLikesForPostRequest struct {
	// PostHashHex to fetch.
	PostHashHex                string `safeForLogging:"true"`
	Offset                     uint32 `safeForLogging:"true"`
	Limit                      uint32 `safeForLogging:"true"`
	ReaderPublicKeyBase58Check string `safeForLogging:"true"`
}

type GetLikesForPostResponse

type GetLikesForPostResponse struct {
	Likers []*ProfileEntryResponse
}

type GetMessagesResponse

type GetMessagesResponse struct {
	// PublicKeyToProfileEntry is a map of profile entries of the message parties. Keys are base58check public keys.
	PublicKeyToProfileEntry map[string]*ProfileEntryResponse

	// OrderedContactsWithMessages is a list of message contacts. Each entry in the list corresponds to a messaging
	// thread and contains the public key and profile entry of the other party in the thread. Entries also contain a
	// list of encrypted messages for the threads.
	OrderedContactsWithMessages []*MessageContactResponse

	// UnreadStateByContact is a map indexed by public key base58check of contacts and with boolean values corresponding
	// to whether the thread has any unread messages. True means there are unread messages.
	UnreadStateByContact map[string]bool

	// NumberOfUnreadThreads is a counter of how many unread threads are there.
	NumberOfUnreadThreads int

	// MessagingGroups are all user's registered messaging keys and group chats that the user is a member of.
	MessagingGroups []*MessagingGroupEntryResponse
}

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 GetNFTBidsForNFTPostRequest

type GetNFTBidsForNFTPostRequest struct {
	ReaderPublicKeyBase58Check string
	PostHashHex                string
}

type GetNFTBidsForNFTPostResponse

type GetNFTBidsForNFTPostResponse struct {
	PostEntryResponse *PostEntryResponse
	NFTEntryResponses []*NFTEntryResponse
	BidEntryResponses []*NFTBidEntryResponse
}

type GetNFTBidsForUserRequest

type GetNFTBidsForUserRequest struct {
	UserPublicKeyBase58Check   string `safeForLogging:"true"`
	ReaderPublicKeyBase58Check string `safeForLogging:"true"`
}

type GetNFTBidsForUserResponse

type GetNFTBidsForUserResponse struct {
	NFTBidEntries                              []*NFTBidEntryResponse
	PublicKeyBase58CheckToProfileEntryResponse map[string]*ProfileEntryResponse
	PostHashHexToPostEntryResponse             map[string]*PostEntryResponse
}

type GetNFTCollectionSummaryRequest

type GetNFTCollectionSummaryRequest struct {
	PostHashHex                string
	ReaderPublicKeyBase58Check string
}

type GetNFTCollectionSummaryResponse

type GetNFTCollectionSummaryResponse struct {
	NFTCollectionResponse          *NFTCollectionResponse
	SerialNumberToNFTEntryResponse map[uint64]*NFTEntryResponse
}

type GetNFTEntriesForPostHashRequest

type GetNFTEntriesForPostHashRequest struct {
	PostHashHex                string
	ReaderPublicKeyBase58Check string
}

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 GetNFTsForUserRequest struct {
	UserPublicKeyBase58Check   string `safeForLogging:"true"`
	ReaderPublicKeyBase58Check string `safeForLogging:"true"`
	IsForSale                  *bool  `safeForLogging:"true"`
	// Ignored if IsForSale is provided
	IsPending *bool `safeForLogging:"true"`
}

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 GetNotificationsCountResponse

type GetNotificationsCountResponse struct {
	NotificationsCount          uint64
	LastUnreadNotificationIndex uint64
	// Whether new unread notifications were added and the user metadata should be updated
	UpdateMetadata bool
}

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",
	// and "dao coin"
	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 GetQuoteRepostsForPostRequest

type GetQuoteRepostsForPostRequest struct {
	// PostHashHex to fetch.
	PostHashHex                string `safeForLogging:"true"`
	Offset                     uint32 `safeForLogging:"true"`
	Limit                      uint32 `safeForLogging:"true"`
	ReaderPublicKeyBase58Check string `safeForLogging:"true"`
}

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 GetReferralInfoForUserRequest

type GetReferralInfoForUserRequest struct {
	PublicKeyBase58Check string `safeForLogging:"true"`

	JWT string
}

type GetReferralInfoForUserResponse

type GetReferralInfoForUserResponse struct {
	ReferralInfoResponses []ReferralInfoResponse `safeForLogging:"true"`
}

type GetRemoteRequest

type GetRemoteRequest struct {
	Key []byte
}

type GetRemoteResponse

type GetRemoteResponse struct {
	Value []byte
}

type GetRepostsForPostRequest

type GetRepostsForPostRequest struct {
	// PostHashHex to fetch.
	PostHashHex                string `safeForLogging:"true"`
	Offset                     uint32 `safeForLogging:"true"`
	Limit                      uint32 `safeForLogging:"true"`
	ReaderPublicKeyBase58Check string `safeForLogging:"true"`
}

type GetRepostsForPostResponse

type GetRepostsForPostResponse struct {
	Reposters  []*ProfileEntryResponse
	Reclouters []*ProfileEntryResponse // Deprecated
}

type GetSingleDerivedKeyResponse

type GetSingleDerivedKeyResponse struct {
	DerivedKey *UserDerivedKey
}

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"`
	// How many levels of replies will be retrieved. If unset, will only retrieve the top-level replies.
	ThreadLevelLimit uint32 `safeForLogging:"true"`
	// How many child replies of a parent comment will be considered when returning a comment thread. Setting this to -1 will include all child replies. This limit does not affect the top-level replies to a post.
	ThreadLeafLimit int32 `safeForLogging:"true"`
	// If the post contains a comment thread where all comments are created by the author, include that thread in the response.
	LoadAuthorThread 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"`
}

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 GetTransactionSpendingLimitHexStringRequest

type GetTransactionSpendingLimitHexStringRequest struct {
	TransactionSpendingLimit TransactionSpendingLimitResponse
}

type GetTransactionSpendingLimitHexStringResponse

type GetTransactionSpendingLimitHexStringResponse struct {
	HexString string
}

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 GetTransactorDAOCoinLimitOrdersRequest

type GetTransactorDAOCoinLimitOrdersRequest struct {
	TransactorPublicKeyBase58Check string `safeForLogging:"true"`
}

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

type GetUserGlobalMetadataResponse struct {
	Email       string
	PhoneNumber string
}

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"`
	IncludeBalance        bool     `safeForLogging:"true"`
	GetUnminedBalance     bool     `safeForLogging:"true"`
}

GetUsersRequest ...

type GetVideoStatusResponse

type GetVideoStatusResponse struct {
	ReadyToStream bool
	Duration      float64
	Dimensions    map[string]interface{}
}

type GetWyreWalletOrderForPublicKeyRequest

type GetWyreWalletOrderForPublicKeyRequest struct {
	PublicKeyBase58Check string
	Username             string

	AdminPublicKey string
}

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 (gs *GlobalState) CreatePutRequest(key []byte, value []byte) (
	_url string, _json_data []byte, _err error)

func (*GlobalState) CreateSeekRequest

func (gs *GlobalState) CreateSeekRequest(startPrefix []byte, validForPrefix []byte,
	maxKeyLen int, numToFetch int, reverse bool, fetchValues bool) (
	_url string, _json_data []byte, _err error)

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) Get

func (gs *GlobalState) Get(key []byte) (value []byte, _err error)

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) Put

func (gs *GlobalState) Put(key []byte, value []byte) error

func (*GlobalState) PutRemote

func (gs *GlobalState) PutRemote(ww http.ResponseWriter, rr *http.Request)

func (*GlobalState) Seek

func (gs *GlobalState) Seek(startPrefix []byte, validForPrefix []byte,
	maxKeyLen int, numToFetch int, reverse bool, fetchValues bool) (
	_keysFound [][]byte, _valsFound [][]byte, _err error)

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 HotFeedApprovedPostOp struct {
	IsRemoval  bool
	Multiplier float64 // Negatives are ignored when updating the ApprovedPosts map.
}

type HotFeedEntry

type HotFeedEntry struct {
	PostHash     *lib.BlockHash
	PostHashHex  string
	HotnessScore uint64
}

A single element in the server's HotFeedOrderedList.

type HotFeedEntryTimeSortable

type HotFeedEntryTimeSortable struct {
	PostHash     *lib.BlockHash
	PostHashHex  string
	HotnessScore uint64
	PostBlockAge int
}

A single element in the server's HotFeedOrderedList, with the age of the post for sorting purposes.

type HotFeedInteractionKey

type HotFeedInteractionKey struct {
	InteractionPKID     lib.PKID
	InteractionPostHash lib.BlockHash
}

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 HotFeedPKIDMultiplierOp struct {
	InteractionMultiplier float64 // Negatives are ignored when updating the PKIDMultiplier map.
	PostsMultiplier       float64 // Negatives are ignored when updating the PKIDMultiplier map.
}

type HotFeedPageRequest

type HotFeedPageRequest struct {
	ReaderPublicKeyBase58Check string
	// Since the hot feed is constantly changing, we pass a list of posts that have already
	// been seen in order to send a more accurate next page.
	SeenPosts []string
	// Number of post entry responses to return.
	ResponseLimit int
	// If defined, only get the hot feed for posts tagged with this tag.
	Tag string
	// If true, sort by new instead of by hotness. Only applies to queries where "Tag" is defined.
	SortByNew bool
}

type HotFeedPageResponse

type HotFeedPageResponse struct {
	HotFeedPage []PostEntryResponse
}

type HotnessInfoBlock

type HotnessInfoBlock struct {
	Block    *lib.MsgDeSoBlock
	BlockAge int
}

type HotnessPostInfo

type HotnessPostInfo struct {
	// How long ago the post was created in number of blocks
	PostBlockAge int
	HotnessScore uint64
}

type InfuraRequest

type InfuraRequest struct {
	JSONRPC string        `json:"jsonrpc"`
	Method  string        `json:"method"`
	Params  []interface{} `json:"params"`
	Id      uint64        `json:"id"`
}

type InfuraResponse

type InfuraResponse struct {
	Id      uint64      `json:"id"`
	JSONRPC string      `json:"jsonrpc"`
	Result  interface{} `json:"result"`
	Error   struct {
		Code    float64 `json:"code"`
		Message string  `json:"message"`
	} `json:"error"`
}

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

type InputResponse struct {
	TransactionIDBase58Check string
	Index                    int64
}

InputResponse ...

type IsFolllowingPublicKeyResponse

type IsFolllowingPublicKeyResponse struct {
	IsFollowing bool
}

type IsFollowingPublicKeyRequest

type IsFollowingPublicKeyRequest struct {
	PublicKeyBase58Check            string
	IsFollowingPublicKeyBase58Check string
}

type IsHodlingPublicKeyRequest

type IsHodlingPublicKeyRequest struct {
	PublicKeyBase58Check          string
	IsHodlingPublicKeyBase58Check string
	IsDAOCoin                     bool
}

type IsHodlingPublicKeyResponse

type IsHodlingPublicKeyResponse struct {
	IsHodling    bool
	BalanceEntry *BalanceEntryResponse
}

type JumioBeginRequest

type JumioBeginRequest struct {
	PublicKey          string
	ReferralHashBase58 string
	SuccessURL         string
	ErrorURL           string
	JWT                string
}

type JumioBeginResponse

type JumioBeginResponse struct {
	URL string
}

type JumioFlowFinishedRequest

type JumioFlowFinishedRequest struct {
	PublicKey              string
	JumioInternalReference string
	JWT                    string
}

type JumioIdentityVerification

type JumioIdentityVerification struct {
	Similarity string `json:"similarity"`
	Validity   bool   `json:"validity"`
	Reason     string `json:"reason"`
}

type JumioInitRequest

type JumioInitRequest struct {
	CustomerInternalReference string `json:"customerInternalReference"`
	UserReference             string `json:"userReference"`
	SuccessURL                string `json:"successUrl"`
	ErrorURL                  string `json:"errorUrl"`
}

type JumioInitResponse

type JumioInitResponse struct {
	RedirectURL          string `json:"redirectUrl"`
	TransactionReference string `json:"transactionReference"`
}

type JumioRejectReason

type JumioRejectReason struct {
	RejectReasonCode        string      `json:"rejectReasonCode"`
	RejectReasonDescription string      `json:"rejectReasonDescription"`
	RejectReasonDetails     interface{} `json:"rejectReasonDetails"`
}

type KrakenResponse

type KrakenResponse struct {
	Result struct {
		Ticker struct {
			LastPriceList []string `json:"c"`
		} `json:"XXBTZUSD"`
	} `json:"result"`
}

type LastTradePriceHistoryItem

type LastTradePriceHistoryItem struct {
	LastTradePrice uint64
	Timestamp      uint64
}

type MarkAllMessagesReadRequest

type MarkAllMessagesReadRequest struct {
	JWT                      string
	UserPublicKeyBase58Check string
}

type MarkContactMessagesReadRequest

type MarkContactMessagesReadRequest struct {
	JWT                         string
	UserPublicKeyBase58Check    string
	ContactPublicKeyBase58Check string
}

type MessageContactResponse

type MessageContactResponse struct {
	// PublicKeyBase58Check is the public key in base58check format of the message contact.
	PublicKeyBase58Check string

	// Messages is the list of messages within this contact.
	Messages []*MessageEntryResponse

	// ProfileEntryResponse is the profile entry corresponding to the contact.
	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
}

MessageContactResponse ...

type MessageEntryResponse

type MessageEntryResponse struct {
	// SenderPublicKeyBase58Check is the main public key of the sender in base58check.
	SenderPublicKeyBase58Check string

	// RecipientPublicKeyBase58Check is the main public key of the recipient in base58check.
	RecipientPublicKeyBase58Check string

	// EncryptedText is the encrypted message in hex format.
	EncryptedText string
	// TstampNanos is the message's timestamp.
	TstampNanos uint64

	// Whether or not the user is the sender of the message.
	IsSender bool

	// Indicate if message was encrypted using shared secret
	V2 bool // Deprecated

	// Indicate message version
	Version uint32

	// SenderMessagingPublicKey is the sender's messaging public key that was used
	// to encrypt the corresponding message.
	SenderMessagingPublicKey string

	// SenderMessagingGroupKeyName is the sender's group key name of SenderMessagingPublicKey
	SenderMessagingGroupKeyName string

	// RecipientMessagingPublicKey is the recipient's messaging public key that was
	// used to encrypt the corresponding message.
	RecipientMessagingPublicKey string

	// RecipientMessagingGroupKeyName is the recipient's group key name of RecipientMessagingPublicKey
	RecipientMessagingGroupKeyName string

	// ExtraData is an arbitrary key value map
	ExtraData map[string]string
}

MessageEntryResponse ...

type MessagingGroupEntryResponse

type MessagingGroupEntryResponse struct {
	// GroupOwnerPublicKeyBase58Check is the main public key of the group owner, or, equivalently, the public key that
	// registered the group.
	GroupOwnerPublicKeyBase58Check string

	// MessagingPublicKeyBase58Check is the group messaging public key in base58check.
	MessagingPublicKeyBase58Check string

	// MessagingGroupKeyName is the name of the group messaging key.
	MessagingGroupKeyName string

	// MessagingGroupMembers is the list of the members in the group chat.
	MessagingGroupMembers []*MessagingGroupMemberResponse

	// EncryptedKey is the hex string of the encrypted private corresponding with the MessagingPublicKeyBase58Check.
	EncryptedKey string

	// ExtraData is an arbitrary key value map
	ExtraData map[string]string
}

MessagingGroupEntryResponse ...

type MessagingGroupMemberResponse

type MessagingGroupMemberResponse struct {
	// GroupMemberPublicKeyBase58Check is the main public key of the group member.
	GroupMemberPublicKeyBase58Check string

	// GroupMemberKeyName is the key name of the member that we encrypt the group messaging public key to. The group
	// messaging public key should not be confused with the GroupMemberPublicKeyBase58Check, the former is the public
	// key of the whole group, while the latter is the public key of the group member.
	GroupMemberKeyName string

	// EncryptedKey is the encrypted private key corresponding to the group messaging public key that's encrypted
	// to the member's registered messaging key labeled with GroupMemberKeyName.
	EncryptedKey string
}

type MetamaskAirdropMetadata

type MetamaskAirdropMetadata struct {
	PublicKey                 []byte
	HasReceivedAirdrop        bool
	ShouldCompProfileCreation bool
}

type MetamaskSignInRequest

type MetamaskSignInRequest struct {
	AmountNanos uint64
	Signer      []byte
	Message     []byte
	Signature   []byte
}

type MetamaskSignInResponse

type MetamaskSignInResponse struct {
	TxnHash *lib.BlockHash
}

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"`

	// If we fetched the accepted bid history, include the accepted block height.
	AcceptedBlockHeight *uint32 `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"`
	HighestBuyNowPriceNanos *uint64               `safeForLogging:"true"`
	LowestBuyNowPriceNanos  *uint64               `safeForLogging:"true"`
	NumCopiesForSale        uint64                `safeForLogging:"true"`
	NumCopiesBuyNow         uint64                `safeForLogging:"true"`
	AvailableSerialNumbers  []uint64              `safeForLogging:"true"`
}

type NFTDetails

type NFTDetails struct {
	NFTEntryResponses     []*NFTEntryResponse
	NFTCollectionResponse *NFTCollectionResponse
}

type NFTDropEntry

type NFTDropEntry struct {
	IsActive        bool
	DropNumber      uint64
	DropTstampNanos uint64
	NFTHashes       []*lib.BlockHash
}

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"`
	IsBuyNow                   bool                  `safeForLogging:"true"`
	BuyNowPriceNanos           uint64                `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"`

	// ExtraData is an arbitrary key value map
	ExtraData map[string]string `safeForLogging:"true"`
}

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

type OutputResponse struct {
	PublicKeyBase58Check string
	AmountNanos          uint64
}

OutputResponse ...

type PeerResponse

type PeerResponse struct {
	IP           string
	ProtocolPort uint16
	IsSyncPeer   bool
}

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
	// This map specifies royalties that should go to user's  other than the creator
	AdditionalDESORoyaltiesMap map[string]uint64
	// This map specifies royalties that should be add to creator coins other than the creator's coin.
	AdditionalCoinRoyaltiesMap map[string]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

	// DAO Coin fields
	DAOCoinEntry *DAOCoinEntryResponse

	// 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

	// ExtraData stores an arbitrary map of attributes of a ProfileEntry
	ExtraData map[string]string

	// The user's DESO balance
	DESOBalanceNanos uint64

	// The DESO to DAO coin exchange rate. Only set when there's a valid order
	// on the limit order exchange that we can execute against to purchase this
	// profile's DAO coin. If there's no order, then this is zero.
	BestExchangeRateDESOPerDAOCoin float64
}

type PutRemoteRequest

type PutRemoteRequest struct {
	Key   []byte
	Value []byte
}

type PutRemoteResponse

type PutRemoteResponse struct {
}

type QueryETHRPCRequest

type QueryETHRPCRequest struct {
	Method string
	Params []interface{}
}

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 RegisterMessagingGroupKeyRequest

type RegisterMessagingGroupKeyRequest struct {
	// OwnerPublicKeyBase58Check is the public key in base58check of the account we want to register the messaging key for.
	OwnerPublicKeyBase58Check string

	// MessagingPublicKeyBase58Check is the public key in base58check of the messaging group we want to register.
	MessagingPublicKeyBase58Check string

	// MessagingGroupKeyName is the name of the group key.
	MessagingGroupKeyName string

	// MessagingKeySignatureHex is the signature of sha256x2(MessagingPublicKey + MessagingGroupKeyName). Currently,
	// the signature is only needed to register the default key.
	MessagingKeySignatureHex string

	// ExtraData is an arbitrary key value map
	ExtraData map[string]string

	MinFeeRateNanosPerKB uint64 `safeForLogging:"true"`

	// No need to specify ProfileEntryResponse in each TransactionFee
	TransactionFees []TransactionFee `safeForLogging:"true"`
}

RegisterMessagingGroupKeyRequest ...

type RegisterMessagingGroupKeyResponse

type RegisterMessagingGroupKeyResponse struct {
	TotalInputNanos   uint64
	ChangeAmountNanos uint64
	FeeNanos          uint64
	Transaction       *lib.MsgDeSoTxn
	TransactionHex    string
	TxnHashHex        string
}

RegisterMessagingGroupKeyResponse ...

type ResendVerifyEmailRequest

type ResendVerifyEmailRequest struct {
	PublicKey string
	JWT       string
}

type RichListEntry

type RichListEntry struct {
	KeyBytes     []byte
	BalanceNanos uint64
}

type RichListEntryResponse

type RichListEntryResponse struct {
	PublicKeyBase58Check string
	BalanceNanos         uint64
	BalanceDESO          float64
	Percentage           float64
	Value                float64
}

type Route

type Route struct {
	Name        string
	Method      []string
	Pattern     string
	HandlerFunc http.HandlerFunc
	AccessLevel AccessLevel
}

Route ...

type SeekRemoteRequest

type SeekRemoteRequest struct {
	StartPrefix    []byte
	ValidForPrefix []byte
	MaxKeyLen      int
	NumToFetch     int
	Reverse        bool
	FetchValues    bool
}

type SeekRemoteResponse

type SeekRemoteResponse struct {
	KeysFound [][]byte
	ValsFound [][]byte
}

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 is the public key in base58check of the message sender.
	SenderPublicKeyBase58Check string `safeForLogging:"true"`

	// RecipientPublicKeyBase58Check is the public key in base58check of the messaging recipient.
	RecipientPublicKeyBase58Check string `safeForLogging:"true"`

	MessageText string // Deprecated

	// EncryptedMessageText is the intended message content. It is recommended to pass actual encrypted message here,
	// although unencrypted message can be passed as well.
	EncryptedMessageText string

	MinFeeRateNanosPerKB uint64 `safeForLogging:"true"`
	// No need to specify ProfileEntryResponse in each TransactionFee
	TransactionFees []TransactionFee `safeForLogging:"true"`

	// SenderMessagingGroupKeyName is the messaging group key name of the sender. If left empty, this endpoint
	// will replace it with the base messaging key. If both SenderMessagingGroupKeyName and
	// RecipientMessagingGroupKeyName are left empty, a V2 message will be constructed.
	SenderMessagingGroupKeyName string `safeForLogging:"true"`

	// RecipientMessagingGroupKeyName is the messaging group key name of the recipient. If left empty, this endpoint
	// will replace it with the base messaging key. If both SenderMessagingGroupKeyName and
	// RecipientMessagingGroupKeyName are left empty, a V2 message will be constructed.
	RecipientMessagingGroupKeyName string `safeForLogging:"true"`

	// ExtraData is an arbitrary key value map
	ExtraData map[string]string
}

SendMessageStatelessRequest ...

type SendMessageStatelessResponse

type SendMessageStatelessResponse struct {
	TstampNanos uint64

	TotalInputNanos   uint64
	ChangeAmountNanos uint64
	FeeNanos          uint64
	Transaction       *lib.MsgDeSoTxn
	TransactionHex    string
}

SendMessageStatelessResponse ...

type SendPhoneNumberVerificationTextRequest

type SendPhoneNumberVerificationTextRequest struct {
	PublicKeyBase58Check string `safeForLogging:"true"`
	PhoneNumber          string
	JWT                  string
}

type SendPhoneNumberVerificationTextResponse

type SendPhoneNumberVerificationTextResponse struct {
}

type SetBuyDeSoFeeBasisPointsRequest

type SetBuyDeSoFeeBasisPointsRequest struct {
	BuyDeSoFeeBasisPoints uint64
	AdminPublicKey        string
}

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 SetUSDCentsToDeSoExchangeRateRequest

type SetUSDCentsToDeSoExchangeRateRequest struct {
	USDCentsPerDeSo uint64
	AdminPublicKey  string
}

type SetUSDCentsToDeSoExchangeRateResponse

type SetUSDCentsToDeSoExchangeRateResponse struct {
	USDCentsPerDeSo uint64
}

type SimpleReferralInfo

type SimpleReferralInfo struct {
	ReferralHashBase58    string
	RefereeAmountUSDCents uint64
	MaxReferrals          uint64 // If set to zero, there is no cap on referrals.
	TotalReferrals        uint64
}

type SimpleReferralInfoResponse

type SimpleReferralInfoResponse struct {
	IsActive bool
	Info     SimpleReferralInfo
}

type StartOrSkipTutorialRequest

type StartOrSkipTutorialRequest struct {
	PublicKeyBase58Check string
	JWT                  string
	IsSkip               bool
}

type SubmitBlockRequest

type SubmitBlockRequest struct {
	PublicKeyBase58Check string

	Header []byte

	// TODO: This field should be renamed ExtraData in JSON, but doing so would break
	// existing miners so we should make this update after we switch away from v0.
	ExtraData uint64 `json:"ExtraNonce"`

	BlockID string
}

type SubmitBlockResponse

type SubmitBlockResponse struct {
	IsMainChain bool
	IsOrphan    bool
}

SubmitBlockResponse ...

type SubmitETHTxRequest

type SubmitETHTxRequest struct {
	PublicKeyBase58Check string
	Tx                   ETHTx
	TxBytes              string
	ToSign               []string
	SignedHashes         []string
}

type SubmitETHTxResponse

type SubmitETHTxResponse struct {
	DESOTxHash string
}

type SubmitPhoneNumberVerificationCodeRequest

type SubmitPhoneNumberVerificationCodeRequest struct {
	JWT                  string
	PublicKeyBase58Check string
	PhoneNumber          string
	VerificationCode     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
	TransactionIDBase58Check 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 TopHodlerSortType

type TopHodlerSortType string
const (
	TopHodlerSortTypeNone        TopHodlerSortType = ""
	TopHodlerSortTypeCoinBalance TopHodlerSortType = "coin_balance"
	TopHodlerSortTypeWealth      TopHodlerSortType = "wealth"
)

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"`

	// The ExtraData added to this transaction
	ExtraData map[string]string `json:",omitempty"`
}

TransactionResponse ... TODO: This is redundant with TransactionInfo in frontend_utils.

func APITransactionToResponse

func APITransactionToResponse(
	txnn *lib.MsgDeSoTxn,
	txnMeta *lib.TransactionMetadata,
	utxoView *lib.UtxoView,
	params *lib.DeSoParams) *TransactionResponse

APITransactionToResponse converts a raw DeSo transaction message to an object that can be easily JSON serialized.

type TransactionSpendingLimitResponse

type TransactionSpendingLimitResponse struct {
	// GlobalDESOLimit is the total amount of DESO (in nanos) that the DerivedKey can spend
	GlobalDESOLimit uint64
	// TransactionCountLimitMap is a map from transaction type (as a string) to the number of transactions
	// the derived key is authorized to perform.
	TransactionCountLimitMap map[lib.TxnString]uint64
	// CreatorCoinOperationLimitMap is a map with public key base58 check as keys mapped to a map of
	// CreatorCoinLimitOperationString (buy, sell, transfer, any) keys to the number of these operations that the
	// derived key is authorized to perform.
	CreatorCoinOperationLimitMap map[string]map[lib.CreatorCoinLimitOperationString]uint64
	// DAOCoinOperationLimitMap is a map with public key base58 check as keys mapped to a map of
	// DAOCoinLimitOperationString (mint, burn, transfer, disable_minting, update_transfer_restriction status, any)
	// keys to the number of these operations that the derived key is authorized to perform.
	DAOCoinOperationLimitMap map[string]map[lib.DAOCoinLimitOperationString]uint64
	// NFTOperationLimitMap is a map with post hash hex as keys mapped to a map with serial number keys mapped to a map
	// with NFTLimitOperationString (update, nft_bid, accept_nft_bid, transfer, burn, accept_nft_transfer, any) keys to
	// the number of these operations that the derived key is authorized to perform.
	NFTOperationLimitMap map[string]map[uint64]map[lib.NFTLimitOperationString]uint64
	// DAOCoinLimitOrderLimitMap is a map with BuyingCoinPublicKey as keys mapped to a map
	// of SellingCoinPublicKey mapped to the number of DAO Coin Limit Order transactions with
	// this Buying and Selling coin pair that the derived key is authorized to perform.
	DAOCoinLimitOrderLimitMap map[string]map[string]uint64

	// ===== ENCODER MIGRATION lib.UnlimitedDerivedKeysMigration =====
	// IsUnlimited determines whether this derived key is unlimited. An unlimited derived key can perform all transactions
	// that the owner can.
	IsUnlimited bool
}

TransactionSpendingLimitResponse is a backend struct used to describe the TransactionSpendingLimit for a Derived key in a way that can be JSON encoded/decoded.

func TransactionSpendingLimitToResponse

func TransactionSpendingLimitToResponse(
	transactionSpendingLimit *lib.TransactionSpendingLimit, utxoView *lib.UtxoView, params *lib.DeSoParams,
) *TransactionSpendingLimitResponse

TransactionSpendingLimitToResponse converts the core struct lib.TransactionSpendingLimit to a TransactionSpendingLimitResponse

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 TransferDAOCoinRequest

type TransferDAOCoinRequest struct {
	// The public key of the user who is making the transfer.
	SenderPublicKeyBase58Check string `safeForLogging:"true"`

	// The public key/Username of the profile for the DAO coin that the user is transferring.
	ProfilePublicKeyBase58CheckOrUsername string `safeForLogging:"true"`

	// The public key/username of the user receiving the transferred creator coin.
	ReceiverPublicKeyBase58CheckOrUsername string `safeForLogging:"true"`

	// The amount of creator coins to transfer in nanos.
	DAOCoinToTransferNanos uint256.Int `safeForLogging:"true"`

	MinFeeRateNanosPerKB uint64 `safeForLogging:"true"`

	// No need to specify ProfileEntryResponse in each TransactionFee
	TransactionFees []TransactionFee `safeForLogging:"true"`
}

TransferDAOCoinRequest ...

type TransferDAOCoinResponse

type TransferDAOCoinResponse struct {
	SpendAmountNanos  uint64
	TotalInputNanos   uint64
	ChangeAmountNanos uint64
	FeeNanos          uint64
	Transaction       *lib.MsgDeSoTxn
	TransactionHex    string
	TxnHashHex        string
}

TransferDAOCoinResponse ...

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 TransferRestrictionStatusString

type TransferRestrictionStatusString string
const (
	TransferRestrictionStatusStringUnrestricted            TransferRestrictionStatusString = "unrestricted"
	TransferRestrictionStatusStringProfileOwnerOnly        TransferRestrictionStatusString = "profile_owner_only"
	TransferRestrictionStatusStringDAOMembersOnly          TransferRestrictionStatusString = "dao_members_only"
	TransferRestrictionStatusStringPermanentlyUnrestricted TransferRestrictionStatusString = "permanently_unrestricted"
)

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"`
	IsBuyNow                    bool   `safeForLogging:"true"`
	BuyNowPriceNanos            uint64 `safeForLogging:"true"`

	MinFeeRateNanosPerKB uint64 `safeForLogging:"true"`

	// No need to specify ProfileEntryResponse in each TransactionFee
	TransactionFees []TransactionFee `safeForLogging:"true"`
}

type UpdateNFTResponse

type UpdateNFTResponse struct {
	NFTPostHashHex string `safeForLogging:"true"`
	SerialNumber   int    `safeForLogging:"true"`

	TotalInputNanos   uint64
	ChangeAmountNanos uint64
	FeeNanos          uint64
	Transaction       *lib.MsgDeSoTxn
	TransactionHex    string
}

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"`

	// ExtraData
	ExtraData map[string]string `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"`

	// ExtraData is an arbitrary key value map
	ExtraData map[string]string `safeForLogging:"true"`

	// TransactionSpendingLimit represents the current state of the TransactionSpendingLimitTracker
	TransactionSpendingLimit *TransactionSpendingLimitResponse `safeForLogging:"true"`

	// Memo is a string that describes the Derived Key
	Memo string `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 VerifiedUsernameToPKID struct {
	VerifiedUsernameToPKID map[string]*lib.PKID
}

Type used for gob decoding and encoding verification mapping

type VerifyEmailRequest

type VerifyEmailRequest struct {
	PublicKey string
	EmailHash string
}

type WalletOrderQuotationRequest

type WalletOrderQuotationRequest struct {
	SourceAmount   float64
	Country        string
	SourceCurrency string
}

type WalletOrderReservationRequest

type WalletOrderReservationRequest struct {
	SourceAmount   float64
	ReferenceId    string
	Country        string
	SourceCurrency string
	RedirectUrl    string
}

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"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL