jsonrpc

package
v2.7.1 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2021 License: MIT Imports: 20 Imported by: 11

Documentation

Index

Constants

View Source
const (
	CurrencyLBC = Currency("LBC")
	CurrencyUSD = Currency("USD")
	CurrencyBTC = Currency("BTC")
)
View Source
const DefaultPort = 5279

Variables

View Source
var (
	StreamTypeVideo = streamType("video")
	StreamTypeAudio = streamType("audio")
	StreamTypeImage = streamType("image")
)

Functions

func Decode

func Decode(data interface{}, targetStruct interface{}) error

Types

type Account

type Account struct {
	AddressGenerator struct {
		Change struct {
			Gap                   uint64 `json:"gap"`
			MaximumUsesPerAddress uint64 `json:"maximum_uses_per_address"`
		} `json:"change"`
		Name      string `json:"name"`
		Receiving struct {
			Gap                   uint64 `json:"gap"`
			MaximumUsesPerAddress uint64 `json:"maximum_uses_per_address"`
		} `json:"receiving"`
	} `json:"address_generator"`
	Certificates uint64   `json:"certificates"`
	Coins        float64  `json:"coins"`
	Encrypted    bool     `json:"encrypted"`
	ID           string   `json:"id"`
	IsDefault    bool     `json:"is_default"`
	Ledger       *string  `json:"ledger,omitempty"`
	ModifiedOn   *float64 `json:"modified_on,omitempty"`
	Name         string   `json:"name"`
	Preferences  *struct {
		Theme string `json:"theme"`
	} `json:"preferences,omitempty"`
	PrivateKey *string `json:"private_key,omitempty"`
	PublicKey  string  `json:"public_key"`
	Seed       *string `json:"seed,omitempty"`
	Satoshis   uint64  `json:"satoshis"`
}

type AccountBalanceResponse

type AccountBalanceResponse struct {
	Available         decimal.Decimal `json:"available"`
	Reserved          decimal.Decimal `json:"reserved"`
	ReservedSubtotals struct {
		Claims   decimal.Decimal `json:"claims"`
		Supports decimal.Decimal `json:"supports"`
		Tips     decimal.Decimal `json:"tips"`
	} `json:"reserved_subtotals"`
	Total decimal.Decimal `json:"total"`
}

type AccountFundResponse

type AccountFundResponse TransactionSummary

type AccountListResponse

type AccountListResponse struct {
	Items      []Account `json:"items"`
	Page       uint64    `json:"page"`
	PageSize   uint64    `json:"page_size"`
	TotalPages uint64    `json:"total_pages"`
}

type AccountSettings

type AccountSettings struct {
	Default          *bool   `json:"default,omitempty"`
	NewName          *string `json:"new_name,omitempty"`
	ReceivingGap     *int    `json:"receiving_gap,omitempty"`
	ReceivingMaxUses *int    `json:"receiving_max_uses,omitempty"`
	ChangeGap        *int    `json:"change_gap,omitempty"`
	ChangeMaxUses    *int    `json:"change_max_uses,omitempty"`
}

type Address

type Address string

type AddressListResponse

type AddressListResponse struct {
	Items []struct {
		Account   string  `json:"account"`
		Address   Address `json:"address"`
		Pubkey    string  `json:"pubkey"`
		UsedTimes uint64  `json:"used_times"`
	} `json:"items"`
	Page       uint64 `json:"page"`
	PageSize   uint64 `json:"page_size"`
	TotalPages uint64 `json:"total_pages"`
}

type AddressUnusedResponse

type AddressUnusedResponse Address

type BlobAvailability

type BlobAvailability struct {
	IsAvailable      bool     `json:"is_available"`
	ReachablePeers   []string `json:"reachable_peers"`
	UnReachablePeers []string `json:"unreachable_peers"`
}

type BlobGetResponse

type BlobGetResponse struct {
	Blobs []struct {
		BlobHash string `json:"blob_hash,omitempty"`
		BlobNum  int    `json:"blob_num"`
		IV       string `json:"iv"`
		Length   int    `json:"length"`
	} `json:"blobs"`
	Key               string `json:"key"`
	StreamHash        string `json:"stream_hash"`
	StreamName        string `json:"stream_name"`
	StreamType        string `json:"stream_type"`
	SuggestedFileName string `json:"suggested_file_name"`
}

type ChannelCreateOptions

type ChannelCreateOptions struct {
	ClaimCreateOptions `json:",flatten"`
	Email              *string  `json:"email,omitempty"`
	WebsiteURL         *string  `json:"website_url,omitempty"`
	CoverURL           *string  `json:"cover_url,omitempty"`
	Featured           []string `json:"featured,omitempty"`
	AccountID          *string  `json:"account_id,omitempty"`
}

type ChannelExportResponse

type ChannelExportResponse string

type ChannelImportResponse added in v2.3.1

type ChannelImportResponse string

type ChannelListResponse

type ChannelListResponse struct {
	Items      []Transaction `json:"items"`
	Page       uint64        `json:"page"`
	PageSize   uint64        `json:"page_size"`
	TotalPages uint64        `json:"total_pages"`
}

type ChannelUpdateOptions

type ChannelUpdateOptions struct {
	ChannelCreateOptions `json:",flatten"`
	NewSigningKey        *bool   `json:"new_signing_key,omitempty"`
	ClearFeatured        *bool   `json:"clear_featured,omitempty"`
	ClearTags            *bool   `json:"clear_tags,omitempty"`
	ClearLanguages       *bool   `json:"clear_languages,omitempty"`
	ClearLocations       *bool   `json:"clear_locations,omitempty"`
	Bid                  *string `json:"bid,omitempty"`
}

type Claim

type Claim struct {
	Address                 string           `json:"address"`
	Amount                  string           `json:"amount"`
	CanonicalURL            string           `json:"canonical_url"`
	ClaimID                 string           `json:"claim_id"`
	ClaimOp                 string           `json:"claim_op,omitempty"`
	Confirmations           int              `json:"confirmations"`
	Height                  int              `json:"height"`
	IsChange                bool             `json:"is_change,omitempty"`
	IsChannelSignatureValid bool             `json:"is_channel_signature_valid,omitempty"`
	IsInternalTransfer      bool             `json:"is_internal_transfer"`
	IsMyInput               bool             `json:"is_my_input"`
	IsMyOutput              bool             `json:"is_my_output"`
	IsSpent                 bool             `json:"is_spent"`
	Meta                    Meta             `json:"meta,omitempty"`
	Name                    string           `json:"name"`
	NormalizedName          string           `json:"normalized_name"`
	Nout                    uint64           `json:"nout"`
	PermanentURL            string           `json:"permanent_url"`
	PurchaseReceipt         *PurchaseReceipt `json:"purchase_receipt,omitempty"`
	ShortURL                string           `json:"short_url"`
	SigningChannel          *Claim           `json:"signing_channel,omitempty"`
	Timestamp               int              `json:"timestamp"`
	Txid                    string           `json:"txid"`
	Type                    string           `json:"type,omitempty"`
	Value                   lbryschema.Claim `json:"protobuf,omitempty"`
	ValueType               string           `json:"value_type,omitempty"`
	AbsoluteChannelPosition int              `json:"absolute_channel_position,omitempty"`
	ChannelName             string           `json:"channel_name,omitempty"`
	ClaimSequence           int64            `json:"claim_sequence,omitempty"`
	DecodedClaim            bool             `json:"decoded_claim,omitempty"`
	EffectiveAmount         string           `json:"effective_amount,omitempty"`
	HasSignature            *bool            `json:"has_signature,omitempty"`
	SignatureIsValid        *bool            `json:"signature_is_valid,omitempty"`
	Supports                []Support        `json:"supports,omitempty"`
	ValidAtHeight           int              `json:"valid_at_height,omitempty"`
}

func (*Claim) GetStreamSizeByMagic

func (c *Claim) GetStreamSizeByMagic() (streamSize uint64, e error)

GetStreamSizeByMagic uses "magic" to not just estimate, but actually return the exact size of a stream It does so by fetching the sd blob and the last blob from our S3 bucket, decrypting and unpadding the last blob adding up all full blobs that have a known size and finally adding the real last blob size too. This will only work if we host at least the sd blob and the last blob on S3, if not, this will error.

type ClaimAbandonResponse

type ClaimAbandonResponse struct {
	Success bool               `json:"success"`
	Tx      TransactionSummary `json:"tx"`
}

type ClaimCreateOptions

type ClaimCreateOptions struct {
	Title             *string    `json:"title,omitempty"`
	Description       *string    `json:"description,omitempty"`
	Tags              []string   `json:"tags,omitempty"`
	Languages         []string   `json:"languages,omitempty"`
	Locations         []Location `json:"locations,omitempty"`
	ThumbnailURL      *string    `json:"thumbnail_url,omitempty"`
	AccountID         *string    `json:"account_id,omitempty"`
	ClaimAddress      *string    `json:"claim_address,omitempty"`
	Preview           *bool      `json:"preview,omitempty"`
	FundingAccountIDs []string   `json:"funding_account_ids,omitempty"`
}

type ClaimListResponse

type ClaimListResponse struct {
	Claims     []Claim `json:"items"`
	Page       uint64  `json:"page"`
	PageSize   uint64  `json:"page_size"`
	TotalPages uint64  `json:"total_pages"`
}

type ClaimSearchResponse

type ClaimSearchResponse ClaimListResponse

type ClaimShowResponse

type ClaimShowResponse *Claim

type Client

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

func NewClient

func NewClient(address string) *Client

func NewClientAndWait

func NewClientAndWait(address string) *Client

func (*Client) AccountAdd

func (d *Client) AccountAdd(accountName string, seed *string, privateKey *string, publicKey *string, singleKey *bool, walletID *string) (*Account, error)

func (*Client) AccountBalance

func (d *Client) AccountBalance(account *string) (*AccountBalanceResponse, error)

func (*Client) AccountCreate

func (d *Client) AccountCreate(accountName string, singleKey bool) (*Account, error)

func (*Client) AccountFund

func (d *Client) AccountFund(fromAccount string, toAccount string, amount string, outputs uint64, everything bool) (*AccountFundResponse, error)

funds an account. If everything is true then amount is ignored

func (*Client) AccountList

func (d *Client) AccountList(page uint64, pageSize uint64) (*AccountListResponse, error)

func (*Client) AccountListForWallet

func (d *Client) AccountListForWallet(walletID string) (*AccountListResponse, error)

func (*Client) AccountRemove

func (d *Client) AccountRemove(accountID string) (*Account, error)

func (*Client) AccountSet

func (d *Client) AccountSet(accountID string, settings AccountSettings) (*Account, error)

func (*Client) AddressList

func (d *Client) AddressList(account *string, address *string, page uint64, pageSize uint64) (*AddressListResponse, error)

func (*Client) AddressUnused

func (d *Client) AddressUnused(account *string) (*AddressUnusedResponse, error)

func (*Client) ChannelAbandon

func (d *Client) ChannelAbandon(txID string, nOut uint64, accountID *string, blocking bool) (*TransactionSummary, error)

func (*Client) ChannelCreate

func (d *Client) ChannelCreate(name string, bid float64, options ChannelCreateOptions) (*TransactionSummary, error)

func (*Client) ChannelExport

func (d *Client) ChannelExport(channelClaimID string, channelName, accountID *string) (*ChannelExportResponse, error)

func (*Client) ChannelImport added in v2.3.1

func (d *Client) ChannelImport(key string, walletID *string) (*ChannelImportResponse, error)

func (*Client) ChannelList

func (d *Client) ChannelList(account *string, page uint64, pageSize uint64, wid *string) (*ChannelListResponse, error)

func (*Client) ChannelUpdate

func (d *Client) ChannelUpdate(claimID string, options ChannelUpdateOptions) (*TransactionSummary, error)

func (*Client) ClaimList

func (d *Client) ClaimList(account *string, page uint64, pageSize uint64) (*ClaimListResponse, error)

func (*Client) ClaimSearch

func (d *Client) ClaimSearch(claimName, claimID, txid *string, nout *uint, page uint64, pageSize uint64) (*ClaimSearchResponse, error)

func (*Client) FileList

func (d *Client) FileList(page uint64, pageSize uint64) (*FileListResponse, error)

func (*Client) Get

func (d *Client) Get(uri string) (*GetResponse, error)

func (*Client) Resolve

func (d *Client) Resolve(urls string) (*ResolveResponse, error)

func (*Client) SetRPCTimeout

func (d *Client) SetRPCTimeout(timeout time.Duration)

func (*Client) SingleAccountList

func (d *Client) SingleAccountList(accountID string) (*AccountListResponse, error)

func (*Client) Status

func (d *Client) Status() (*StatusResponse, error)

func (*Client) StreamAbandon

func (d *Client) StreamAbandon(txID string, nOut uint64, accountID *string, blocking bool) (*ClaimAbandonResponse, error)

func (*Client) StreamCreate

func (d *Client) StreamCreate(name, filePath string, bid float64, options StreamCreateOptions) (*TransactionSummary, error)

func (*Client) StreamList added in v2.3.2

func (d *Client) StreamList(account *string, page uint64, pageSize uint64) (*StreamListResponse, error)

func (*Client) StreamUpdate

func (d *Client) StreamUpdate(claimID string, options StreamUpdateOptions) (*TransactionSummary, error)

func (*Client) SupportAbandon

func (d *Client) SupportAbandon(claimID *string, txid *string, nout *uint, keep *string, accountID *string) (*TransactionSummary, error)

func (*Client) SupportCreate

func (d *Client) SupportCreate(claimID string, amount string, tip *bool, accountID *string, fundingAccountIDs []string, walletID *string) (*TransactionSummary, error)

func (*Client) SupportList

func (d *Client) SupportList(accountID *string, page uint64, pageSize uint64) (*SupportListResponse, error)

func (*Client) TransactionList

func (d *Client) TransactionList(account *string, wallet *string, page uint64, pageSize uint64) (*TransactionListResponse, error)

func (*Client) TxoSpend added in v2.5.0

func (d *Client) TxoSpend(txoType, claimID, txid, channelID, name, accountID *string) (*[]TransactionSummary, error)

func (*Client) UTXOList

func (d *Client) UTXOList(account *string, page uint64, pageSize uint64) (*UTXOListResponse, error)

func (*Client) UTXORelease

func (d *Client) UTXORelease(account *string) (*UTXOReleaseResponse, error)

func (*Client) Version

func (d *Client) Version() (*VersionResponse, error)

func (*Client) WalletAdd

func (d *Client) WalletAdd(id string) (*Wallet, error)

func (*Client) WalletCreate

func (d *Client) WalletCreate(id string, opts *WalletCreateOpts) (*Wallet, error)

func (*Client) WalletList

func (d *Client) WalletList(id string, page uint64, pageSize uint64) (*WalletList, error)

func (*Client) WalletRemove

func (d *Client) WalletRemove(id string) (*Wallet, error)

type Currency

type Currency string

type Fee

type Fee struct {
	FeeCurrency Currency        `json:"fee_currency"`
	FeeAmount   decimal.Decimal `json:"fee_amount"`
	FeeAddress  *string         `json:"fee_address"`
}

type File

type File struct {
	AddedOn              int64             `json:"added_on"`
	BlobsCompleted       uint64            `json:"blobs_completed"`
	BlobsInStream        uint64            `json:"blobs_in_stream"`
	BlobsRemaining       uint64            `json:"blobs_remaining"`
	ChannelClaimID       string            `json:"channel_claim_id"`
	ChannelName          string            `json:"channel_name"`
	ClaimID              string            `json:"claim_id"`
	ClaimName            string            `json:"claim_name"`
	Completed            bool              `json:"completed"`
	Confirmations        int64             `json:"confirmations"`
	ContentFee           *Fee              `json:"content_fee"`
	DownloadDirectory    string            `json:"download_directory"`
	DownloadPath         string            `json:"download_path"`
	FileName             string            `json:"file_name"`
	Height               int               `json:"height"`
	IsFullyReflected     bool              `json:"is_fully_reflected"`
	Key                  string            `json:"key"`
	Metadata             *lbryschema.Claim `json:"protobuf"`
	MimeType             string            `json:"mime_type"`
	Nout                 int               `json:"nout"`
	Outpoint             string            `json:"outpoint"`
	Protobuf             string            `json:"protobuf"`
	PurchaseReceipt      interface{}       `json:"purchase_receipt"`
	ReflectorProgress    int               `json:"reflector_progress"`
	SdHash               string            `json:"sd_hash"`
	Status               string            `json:"status"`
	Stopped              bool              `json:"stopped"`
	StreamHash           string            `json:"stream_hash"`
	StreamName           string            `json:"stream_name"`
	StreamingURL         string            `json:"streaming_url"`
	SuggestedFileName    string            `json:"suggested_file_name"`
	Timestamp            int64             `json:"timestamp"`
	TotalBytes           uint64            `json:"total_bytes"`
	TotalBytesLowerBound uint64            `json:"total_bytes_lower_bound"`
	Txid                 string            `json:"txid"`
	UploadingToReflector bool              `json:"uploading_to_reflector"`
	WrittenBytes         uint64            `json:"written_bytes"`
}

type FileListResponse

type FileListResponse struct {
	Items      []File `json:"items"`
	Page       uint64 `json:"page"`
	PageSize   uint64 `json:"page_size"`
	TotalPages uint64 `json:"total_pages"`
}

type GetResponse

type GetResponse File

type Location

type Location struct {
	Country    *string `json:"country,omitempty"`
	State      *string `json:"state,omitempty"`
	City       *string `json:"city,omitempty"`
	PostalCode *string `json:"code,omitempty"`
	Latitude   *string `json:"latitude,omitempty"`
	Longitude  *string `json:"longitude,omitempty"`
}

type Meta

type Meta struct {
	ActivationHeight  int64   `json:"activation_height,omitempty"`
	CreationHeight    int64   `json:"creation_height,omitempty"`
	CreationTimestamp int     `json:"creation_timestamp,omitempty"`
	EffectiveAmount   string  `json:"effective_amount,omitempty"`
	ExpirationHeight  int64   `json:"expiration_height,omitempty"`
	IsControlling     bool    `json:"is_controlling,omitempty"`
	SupportAmount     string  `json:"support_amount,omitempty"`
	TrendingGlobal    float64 `json:"trending_global,omitempty"`
	TrendingGroup     float64 `json:"trending_group,omitempty"`
	TrendingLocal     float64 `json:"trending_local,omitempty"`
	TrendingMixed     float64 `json:"trending_mixed,omitempty"`
}

type PeerListResponse

type PeerListResponse []PeerListResponsePeer

type PeerListResponsePeer

type PeerListResponsePeer struct {
	IP     string `json:"host"`
	Port   uint   `json:"port"`
	NodeId string `json:"node_id"`
}

type PurchaseReceipt added in v2.7.0

type PurchaseReceipt struct {
	Address       string `json:"file_name"`
	Amount        string `json:"amount"`
	ClaimID       string `json:"claim_id"`
	Confirmations int    `json:"confirmations"`
	Height        int    `json:"height"`
	Nout          uint64 `json:"nout"`
	Timestamp     uint64 `json:"timestamp"`
	Txid          string `json:"txid"`
	Type          string `json:"purchase"`
}

type ResolveResponse

type ResolveResponse map[string]Claim

type StatusResponse

type StatusResponse struct {
	BlobManager struct {
		Connections struct {
			MaxIncomingMbs   float64 `json:"max_incoming_mbs"`
			MaxOutgoingMbs   float64 `json:"max_outgoing_mbs"`
			TotalIncomingMbs float64 `json:"total_incoming_mbs"`
			TotalOutgoingMbs float64 `json:"total_outgoing_mbs"`
			TotalReceived    int64   `json:"total_received"`
			TotalSent        int64   `json:"total_sent"`
		} `json:"connections"`
		FinishedBlobs int64 `json:"finished_blobs"`
	} `json:"blob_manager"`
	ConnectionStatus struct {
		Code    string `json:"code"`
		Message string `json:"message"`
	} `json:"connection_status"`
	Dht struct {
		NodeID              string `json:"node_id"`
		PeersInRoutingTable uint64 `json:"peers_in_routing_table"`
	} `json:"dht"`
	FfmpegStatus struct {
		AnalyzeAudioVolume bool   `json:"analyze_audio_volume"`
		Available          bool   `json:"available"`
		Which              string `json:"which"`
	} `json:"ffmpeg_status"`
	FileManager struct {
		ManagedFiles int64 `json:"managed_files"`
	} `json:"file_manager"`
	HashAnnouncer struct {
		AnnounceQueueSize uint64 `json:"announce_queue_size"`
	} `json:"hash_announcer"`
	InstallationID    string   `json:"installation_id"`
	IsRunning         bool     `json:"is_running"`
	SkippedComponents []string `json:"skipped_components"`
	StartupStatus     struct {
		BlobManager          bool `json:"blob_manager"`
		Database             bool `json:"database"`
		Dht                  bool `json:"dht"`
		ExchangeRateManager  bool `json:"exchange_rate_manager"`
		FileManager          bool `json:"file_manager"`
		HashAnnouncer        bool `json:"hash_announcer"`
		LibtorrentComponent  bool `json:"libtorrent_component"`
		PeerProtocolServer   bool `json:"peer_protocol_server"`
		Upnp                 bool `json:"upnp"`
		Wallet               bool `json:"wallet"`
		WalletServerPayments bool `json:"wallet_server_payments"`
	} `json:"startup_status"`
	Upnp struct {
		AioupnpVersion  string   `json:"aioupnp_version"`
		DhtRedirectSet  bool     `json:"dht_redirect_set"`
		ExternalIp      string   `json:"external_ip"`
		Gateway         string   `json:"gateway"`
		PeerRedirectSet bool     `json:"peer_redirect_set"`
		Redirects       struct{} `json:"redirects"`
	} `json:"upnp"`
	Wallet struct {
		AvailableServers  int    `json:"available_servers"`
		BestBlockhash     string `json:"best_blockhash"`
		Blocks            int    `json:"blocks"`
		BlocksBehind      int    `json:"blocks_behind"`
		Connected         string `json:"connected"`
		ConnectedFeatures struct {
			DailyFee        string `json:"daily_fee"`
			Description     string `json:"description"`
			DonationAddress string `json:"donation_address"`
			GenesisHash     string `json:"genesis_hash"`
			HashFunction    string `json:"hash_function"`
			Hosts           struct {
			} `json:"hosts"`
			PaymentAddress    string      `json:"payment_address"`
			ProtocolMax       string      `json:"protocol_max"`
			ProtocolMin       string      `json:"protocol_min"`
			Pruning           interface{} `json:"pruning"`
			ServerVersion     string      `json:"server_version"`
			TrendingAlgorithm string      `json:"trending_algorithm"`
		} `json:"connected_features"`
		HeadersSynchronizationProgress int `json:"headers_synchronization_progress"`
		KnownServers                   int `json:"known_servers"`
		Servers                        []struct {
			Availability bool    `json:"availability"`
			Host         string  `json:"host"`
			Latency      float64 `json:"latency"`
			Port         int     `json:"port"`
		} `json:"servers"`
	} `json:"wallet"`
	WalletServerPayments struct {
		MaxFee  string `json:"max_fee"`
		Running bool   `json:"running"`
	} `json:"wallet_server_payments"`
}

type StreamAvailabilityResponse

type StreamAvailabilityResponse struct {
	IsAvailable          bool             `json:"is_available"`
	DidDecode            bool             `json:"did_decode"`
	DidResolve           bool             `json:"did_resolve"`
	IsStream             bool             `json:"is_stream"`
	NumBlobsInStream     uint64           `json:"num_blobs_in_stream"`
	SDHash               string           `json:"sd_hash"`
	SDBlobAvailability   BlobAvailability `json:"sd_blob_availability"`
	HeadBlobHash         string           `json:"head_blob_hash"`
	HeadBlobAvailability BlobAvailability `json:"head_blob_availability"`
	UseUPNP              bool             `json:"use_upnp"`
	UPNPRedirectIsSet    bool             `json:"upnp_redirect_is_set"`
	Error                string           `json:"error,omitempty"`
}

type StreamCostEstimateResponse

type StreamCostEstimateResponse decimal.Decimal

type StreamCreateOptions

type StreamCreateOptions struct {
	ClaimCreateOptions `json:",flatten"`
	Fee                *Fee        `json:",omitempty,flatten"`
	Author             *string     `json:"author,omitempty"`
	License            *string     `json:"license,omitempty"`
	LicenseURL         *string     `json:"license_url,omitempty"`
	StreamType         *streamType `json:"stream_type,omitempty"`
	ReleaseTime        *int64      `json:"release_time,omitempty"`
	Duration           *uint64     `json:"duration,omitempty"`
	Width              *uint       `json:"width,omitempty"`
	Height             *uint       `json:"height,omitempty"`
	Preview            *string     `json:"preview,omitempty"`
	AllowDuplicateName *bool       `json:"allow_duplicate_name,omitempty"`
	ChannelName        *string     `json:"channel_name,omitempty"`
	ChannelID          *string     `json:"channel_id,omitempty"`
	ChannelAccountID   *string     `json:"channel_account_id,omitempty"`
	AccountID          *string     `json:"account_id,omitempty"`
}

type StreamListResponse added in v2.3.2

type StreamListResponse struct {
	Items      []Claim `json:"items"`
	Page       uint64  `json:"page"`
	PageSize   uint64  `json:"page_size"`
	TotalPages uint64  `json:"total_pages"`
}

type StreamUpdateOptions

type StreamUpdateOptions struct {
	ClearTags            *bool   `json:"clear_tags,omitempty"`
	ClearLanguages       *bool   `json:"clear_languages,omitempty"`
	ClearLocations       *bool   `json:"clear_locations,omitempty"`
	Name                 *string `json:"name,omitempty"`
	FilePath             *string `json:"file_path,omitempty"`
	FileSize             *uint64 `json:"file_size,omitempty"`
	Bid                  *string `json:"bid,omitempty"`
	*StreamCreateOptions `json:",flatten"`
}

type Support

type Support struct {
	Amount string `json:"amount"`
	Nout   uint64 `json:"nout"`
	Txid   string `json:"txid"`
}

type SupportListResponse

type SupportListResponse struct {
	Items      []Claim
	Page       uint64 `json:"page"`
	PageSize   uint64 `json:"page_size"`
	TotalPages uint64 `json:"total_pages"`
}

type Transaction

type Transaction struct {
	Address            string            `json:"address"`
	Amount             string            `json:"amount"`
	ClaimID            string            `json:"claim_id"`
	ClaimOp            string            `json:"claim_op"`
	Confirmations      int               `json:"confirmations"`
	HasSigningKey      bool              `json:"has_signing_key"`
	Height             int               `json:"height"`
	IsInternalTransfer bool              `json:"is_internal_transfer"`
	IsMyInput          bool              `json:"is_my_input"`
	IsMyOutput         bool              `json:"is_my_output"`
	IsSpent            bool              `json:"is_spent"`
	Name               string            `json:"name"`
	NormalizedName     string            `json:"normalized_name"`
	Nout               uint64            `json:"nout"`
	PermanentUrl       string            `json:"permanent_url"`
	TimeStamp          uint64            `json:"time_stamp"`
	Protobuf           string            `json:"protobuf,omitempty"`
	Txid               string            `json:"txid"`
	Type               string            `json:"type"`
	Value              *lbryschema.Claim `json:"protobuf"`
}

type TransactionListResponse

type TransactionListResponse struct {
	Items []struct {
		AbandonInfo   []transactionListBlob `json:"abandon_info"`
		ClaimInfo     []transactionListBlob `json:"claim_info"`
		Confirmations int64                 `json:"confirmations"`
		Date          string                `json:"date"`
		Fee           string                `json:"fee"`
		SupportInfo   []supportBlob         `json:"support_info"`
		Timestamp     int64                 `json:"timestamp"`
		Txid          string                `json:"txid"`
		UpdateInfo    []transactionListBlob `json:"update_info"`
		Value         string                `json:"value"`
	} `json:"items"`
	Page       uint64 `json:"page"`
	PageSize   uint64 `json:"page_size"`
	TotalPages uint64 `json:"total_pages"`
}

type TransactionSummary

type TransactionSummary struct {
	Height      int           `json:"height"`
	Hex         string        `json:"hex"`
	Inputs      []Transaction `json:"inputs"`
	Outputs     []Transaction `json:"outputs"`
	TotalFee    string        `json:"total_fee"`
	TotalOutput string        `json:"total_output"`
	Txid        string        `json:"txid"`
}

type UTXOListResponse

type UTXOListResponse struct {
	Items []struct {
		Address            string `json:"address"`
		Amount             string `json:"amount"`
		Confirmations      int    `json:"confirmations"`
		Height             int    `json:"height"`
		IsInternalTransfer bool   `json:"is_internal_transfer"`
		IsMyInput          bool   `json:"is_my_input"`
		IsMyOutput         bool   `json:"is_my_output"`
		IsSpent            bool   `json:"is_spent"`
		Nout               int    `json:"nout"`
		Timestamp          int64  `json:"timestamp"`
		Txid               string `json:"txid"`
		Type               string `json:"type"`
	} `json:"items"`
	Page       uint64 `json:"page"`
	PageSize   uint64 `json:"page_size"`
	TotalPages uint64 `json:"total_pages"`
}

type UTXOReleaseResponse

type UTXOReleaseResponse *string

type VersionResponse

type VersionResponse struct {
	Build   string `json:"build"`
	Desktop string `json:"desktop"`
	Distro  struct {
		Codename     string `json:"codename"`
		ID           string `json:"id"`
		Like         string `json:"like"`
		Version      string `json:"version"`
		VersionParts struct {
			BuildNumber string `json:"build_number"`
			Major       string `json:"major"`
			Minor       string `json:"minor"`
		} `json:"version_parts"`
	} `json:"distro"`
	LbrynetVersion string `json:"lbrynet_version"`
	OsRelease      string `json:"os_release"`
	OsSystem       string `json:"os_system"`
	Platform       string `json:"platform"`
	Processor      string `json:"processor"`
	PythonVersion  string `json:"python_version"`
	Version        string `json:"version"`
}

type Wallet

type Wallet struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type WalletBalanceResponse

type WalletBalanceResponse decimal.Decimal

type WalletCreateOpts

type WalletCreateOpts struct {
	ID            string `json:"wallet_id"`
	SkipOnStartup bool   `json:"skip_on_startup,omitempty"`
	CreateAccount bool   `json:"create_account,omitempty"`
	SingleKey     bool   `json:"single_key,omitempty"`
}

type WalletList

type WalletList struct {
	Items      []Wallet `json:"items"`
	Page       uint64   `json:"page"`
	PageSize   uint64   `json:"page_size"`
	TotalPages uint64   `json:"total_pages"`
}

Jump to

Keyboard shortcuts

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