desoapi

package module
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2022 License: MIT Imports: 9 Imported by: 0

README

DeSo client

TODO

  • Ability to upload files
  • Refactoring executeRequest method in Client
  • Tests

Usage

package main

import (
	"encoding/json"
	"fmt"
	desoRoutes "github.com/deso-smart/deso-backend/v3/routes"
	"github.com/deso-smart/desoapi"
	"log"
)

func main() {
	client, err := desoapi.NewClient("https://node.deso.org")
	if err != nil {
		log.Fatal(err)
	}
	payload := &desoRoutes.GetSingleProfileRequest{
		PublicKeyBase58Check: "...",
	}
	resp, err := client.GetSingleProfile(payload)
	if err != nil {
		log.Fatal(err)
	}
	data, err := json.Marshal(resp)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Print(string(data))
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SignTransactionWithDerivedKey

func SignTransactionWithDerivedKey(transactionHex string, derivedKeySeedHex string) (string, error)

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(baseUri string) (*Client, error)

func (*Client) AcceptNFTBid

func (*Client) AcceptNFTTransfer

func (*Client) AppendExtraData

func (*Client) Balance

func (*Client) Base

func (c *Client) Base() (*desoRoutes.APIBaseResponse, error)

func (*Client) Block

func (*Client) BlockPublicKey

func (*Client) BurnNFT

func (*Client) CancelDAOCoinLimitOrder added in v0.0.4

func (*Client) CreateDAOCoinLimitOrder added in v0.0.4

func (*Client) CreateDAOCoinMarketOrder added in v0.0.5

func (*Client) CreateNFT

func (*Client) CreateNFTBid

func (*Client) DAOCoin

func (*Client) DeletePII

func (c *Client) DeletePII(payload *desoRoutes.DeletePIIRequest) error

func (*Client) ExchangeBitcoin

func (*Client) GetAcceptedBidHistory

func (c *Client) GetAcceptedBidHistory(postHashHex string) (*desoRoutes.GetAcceptedBidHistoryResponse, error)

func (*Client) GetAccessBytes added in v0.0.13

func (*Client) GetAppState

func (*Client) GetBlockTemplate

func (*Client) GetBulkMessagingPublicKeys added in v0.0.13

func (*Client) GetDAOCoinLimitOrders added in v0.0.4

func (*Client) GetExchangeRate

func (c *Client) GetExchangeRate() (*desoRoutes.GetExchangeRateResponse, error)

func (*Client) GetFollowsStateless

func (c *Client) GetFollowsStateless(payload *desoRoutes.GetFollowsStatelessRequest) (*desoRoutes.GetFollowsResponse, error)

func (*Client) GetHodlersCountForPublicKeys added in v0.0.11

func (c *Client) GetHodlersCountForPublicKeys(payload *desoRoutes.GetHolderCountForPublicKeysRequest) (map[string]int, error)

func (*Client) GetHotFeed

func (*Client) GetLikesForPost

func (*Client) GetMessagesStateless

func (c *Client) GetMessagesStateless(payload *desoRoutes.GetMessagesStatelessRequest) (*desoRoutes.GetMessagesResponse, error)

func (*Client) GetNFTBidsForUser

func (*Client) GetNFTShowcase

func (*Client) GetNFTsForUser

func (*Client) GetNotifications

func (*Client) GetPostsStateless

func (*Client) GetProfiles

func (*Client) GetRepostsForPost

func (*Client) GetSingleDerivedKey added in v0.0.13

func (c *Client) GetSingleDerivedKey(ownerPublicKeyBase58Check string, derivedPublicKeyBase58Check string) (*desoRoutes.GetSingleDerivedKeyResponse, error)

func (*Client) GetSinglePost

func (*Client) GetSingleProfile

func (*Client) GetTransactionSpendingLimitResponseFromHex added in v0.0.4

func (c *Client) GetTransactionSpendingLimitResponseFromHex(transactionSpendingLimitHex string) (*desoRoutes.TransactionSpendingLimitResponse, error)

func (*Client) GetTransactorDAOCoinLimitOrders added in v0.0.4

func (*Client) GetTxn

func (*Client) GetUserMetadata

func (c *Client) GetUserMetadata(publicKeyBase58Check string) (*desoRoutes.GetUserMetadataResponse, error)

func (*Client) GetUsersStateless

func (c *Client) GetUsersStateless(payload *desoRoutes.GetUsersStatelessRequest) (*desoRoutes.GetUsersResponse, error)

func (*Client) HealthCheck

func (c *Client) HealthCheck() error

func (*Client) KeyPair

func (*Client) MarkAllMessagesRead

func (c *Client) MarkAllMessagesRead(payload *desoRoutes.MarkAllMessagesReadRequest) error

func (*Client) MarkContactMessagesRead

func (c *Client) MarkContactMessagesRead(payload *desoRoutes.MarkContactMessagesReadRequest) error

func (*Client) MetamaskSignIn added in v0.0.13

func (*Client) QueryETHRPC

func (c *Client) QueryETHRPC(payload *desoRoutes.QueryETHRPCRequest) (*desoRoutes.InfuraResponse, error)

func (*Client) SendDeSo

func (*Client) SendDiamonds

func (*Client) SetNotificationMetadata

func (c *Client) SetNotificationMetadata(payload *desoRoutes.SetNotificationMetadataRequest) error

func (*Client) StartOrSkipTutorial

func (c *Client) StartOrSkipTutorial(payload *desoRoutes.StartOrSkipTutorialRequest) error

func (*Client) SubmitBlock

func (*Client) SubmitETHTx

func (*Client) SubmitPost

func (*Client) SubmitTransaction

func (*Client) TransferDAOCoin

func (*Client) TransferDeSo

func (*Client) TransferNFT

func (*Client) UpdateNFT

func (*Client) UpdateProfile

func (*Client) UpdateTutorialStatus

func (c *Client) UpdateTutorialStatus(payload *desoRoutes.UpdateTutorialStatusRequest) error

Jump to

Keyboard shortcuts

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