rpccalls

package
v0.15.4 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: ISC, ISC Imports: 29 Imported by: 0

Documentation

Overview

Package rpccalls - low level RPC calls to bitmarkd

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssetData

type AssetData struct {
	Name        string
	Metadata    string
	Quantity    int
	Registrant  *configuration.Private
	Fingerprint string
}

AssetData - asset data for bitmark creation

type AssetResult added in v0.9.1

type AssetResult struct {
	AssetId   *transactionrecord.AssetIdentifier
	Confirmed bool
}

AssetResult - result of an asset get request

type BalanceData added in v0.10.0

type BalanceData struct {
	Owner   *account.Account
	ShareId string
	Count   int
}

BalanceData - the parameters for a balance request

type BlockDecodeData added in v0.15.0

type BlockDecodeData struct {
	Packed []byte
}

BlockDecodeData - the parameters for a blockDecode request

type BlockDumpData added in v0.15.0

type BlockDumpData struct {
	Block uint64
	Count int
	Txs   bool
}

BlockDumpData - the parameters for a blockDump request

type BlockTransferData added in v0.7.0

type BlockTransferData struct {
	Payments currency.Map
	Owner    *configuration.Private
	NewOwner *account.Account
	TxId     string
}

BlockTransferData - data for a block transfer request

type BlockTransferReply added in v0.7.0

type BlockTransferReply struct {
	BlockTransferId merkle.Digest                                   `json:"blockTransferId"`
	PayId           pay.PayId                                       `json:"payId"`
	Payments        map[string]transactionrecord.PaymentAlternative `json:"payments"`
	Commands        map[string]string                               `json:"commands,omitempty"`
}

BlockTransferReply - JSON data to output after blockTransfer completes

type BlockTransferSingleSignedReply added in v0.7.0

type BlockTransferSingleSignedReply struct {
	Identity      string `json:"identity"`
	BlockTransfer string `json:"blockTransfer"`
}

BlockTransferSingleSignedReply - reply if performing a single signature transfer

type Client

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

Client - to hold RPC connections streams

func NewClient

func NewClient(testnet bool, connect string, verbose bool, handle io.Writer) (*Client, error)

NewClient - create a RPC connection to a bitmarkd

func (*Client) Close

func (c *Client) Close()

Close - shutdown the bitmarkd connection

func (*Client) Countersign added in v0.10.0

func (client *Client) Countersign(countersignConfig *CountersignData) (interface{}, error)

Countersign - countersign a transfer

func (*Client) CountersignBlockTransfer added in v0.7.0

func (client *Client) CountersignBlockTransfer(blockTransfer *transactionrecord.BlockOwnerTransfer) (*BlockTransferReply, error)

CountersignBlockTransfer - perform a transfer

func (*Client) CountersignGrant added in v0.10.0

func (client *Client) CountersignGrant(grant *transactionrecord.ShareGrant) (*GrantReply, error)

CountersignGrant - perform the countersignature

func (*Client) CountersignSwap added in v0.10.0

func (client *Client) CountersignSwap(swap *transactionrecord.ShareSwap) (*SwapReply, error)

CountersignSwap - perform countersigning

func (*Client) CountersignTransfer

func (client *Client) CountersignTransfer(transfer *transactionrecord.BitmarkTransferCountersigned) (*TransferReply, error)

CountersignTransfer - perform as countersigned transfer

func (*Client) DecodeBlock added in v0.15.0

func (client *Client) DecodeBlock(blockDecodeConfig *BlockDecodeData) (*node.BlockDecodeReply, error)

DecodeBlock - retrieve some blocks

func (*Client) GetBalance added in v0.10.0

func (client *Client) GetBalance(balanceConfig *BalanceData) (*share.BalanceReply, error)

GetBalance - retrieve some balance data

func (*Client) GetBitmarkInfo

func (client *Client) GetBitmarkInfo() (*node.InfoReply, error)

GetBitmarkInfo - request status from bitmarkd (must be matching version)

func (*Client) GetBitmarkInfoCompat added in v0.11.0

func (client *Client) GetBitmarkInfoCompat() (map[string]interface{}, error)

GetBitmarkInfoCompat - request status from bitmarkd (any version)

func (*Client) GetBlocks added in v0.15.0

func (client *Client) GetBlocks(blockDumpConfig *BlockDumpData) (*node.BlockDumpRangeReply, error)

GetBlocks - retrieve some blocks

func (*Client) GetFullProvenance added in v0.15.0

func (client *Client) GetFullProvenance(fullProvenanceConfig *FullProvenanceData) (*FullProvenanceReply, error)

GetFullProvenance - obtain the full provenance chain from a specific bitmark id

func (*Client) GetOwned added in v0.10.0

func (client *Client) GetOwned(ownedConfig *OwnedData) (*owner.BitmarksReply, error)

GetOwned - obtain list of owned bitmarks

func (*Client) GetProvenance

func (client *Client) GetProvenance(provenanceConfig *ProvenanceData) (*ProvenanceReply, error)

GetProvenance - obtain the provenance chain from a specific transaction id

func (*Client) GetTransactionStatus

func (client *Client) GetTransactionStatus(statusConfig *TransactionStatusData) (*transaction.StatusReply, error)

GetTransactionStatus - perform a status request

func (*Client) Grant added in v0.10.0

func (client *Client) Grant(grantConfig *GrantData) (*GrantSingleSignedReply, error)

Grant - perform the grant request

func (*Client) Issue

func (client *Client) Issue(issueConfig *IssueData) (*IssueReply, error)

Issue - perform an issue request

func (*Client) MakeAsset

func (client *Client) MakeAsset(assetConfig *AssetData) (*AssetResult, error)

MakeAsset - build a properly signed asset

func (*Client) Share added in v0.10.0

func (client *Client) Share(shareConfig *ShareData) (*ShareReply, error)

Share - perform a share request

func (*Client) SingleSignedBlockTransfer added in v0.7.0

func (client *Client) SingleSignedBlockTransfer(blockTransferConfig *BlockTransferData) (*BlockTransferSingleSignedReply, error)

SingleSignedBlockTransfer - perform a transfer

func (*Client) SingleSignedTransfer

func (client *Client) SingleSignedTransfer(transferConfig *TransferData) (*TransferSingleSignedReply, error)

SingleSignedTransfer - perform a single signed transfer

func (*Client) Swap added in v0.10.0

func (client *Client) Swap(swapConfig *SwapData) (*SwapSingleSignedReply, error)

Swap - perform swap request

func (*Client) Transfer

func (client *Client) Transfer(transferConfig *TransferData) (*TransferReply, error)

Transfer - perform a bitmark transfer

type CountersignData

type CountersignData struct {
	Transaction string
	NewOwner    *configuration.Private
}

CountersignData - data for a countersignature request

type FullProvenanceData added in v0.15.0

type FullProvenanceData struct {
	BitmarkId  string
	Identities map[string]string
}

FullProvenanceData - data for a full provenance request

type FullProvenanceReply added in v0.15.0

type FullProvenanceReply struct {
	Data []fullProvenanceItem `json:"data"`
}

FullProvenanceReply - list of transactions in the full provenance chain

type GrantCountersignData added in v0.10.0

type GrantCountersignData struct {
	Grant     string
	Recipient *configuration.Private
}

GrantCountersignData - data to be countersigned

type GrantData added in v0.10.0

type GrantData struct {
	ShareId     string
	Quantity    uint64
	Owner       *configuration.Private
	Recipient   *account.Account
	BeforeBlock uint64
}

GrantData - data for a grant request

type GrantReply added in v0.10.0

type GrantReply struct {
	GrantId  merkle.Digest                                   `json:"grantId"`
	PayId    pay.PayId                                       `json:"payId"`
	Payments map[string]transactionrecord.PaymentAlternative `json:"payments"`
	Commands map[string]string                               `json:"commands,omitempty"`
}

GrantReply - JSON data to output after grant completes

type GrantSingleSignedReply added in v0.10.0

type GrantSingleSignedReply struct {
	Identity string `json:"identity"`
	Grant    string `json:"grant"`
}

GrantSingleSignedReply - result from single signature

type IssueData

type IssueData struct {
	Issuer    *configuration.Private
	AssetId   *transactionrecord.AssetIdentifier
	Quantity  int
	FreeIssue bool
}

IssueData - data for an issue request

type IssueReply

type IssueReply struct {
	AssetId        transactionrecord.AssetIdentifier               `json:"assetId"`
	IssueIds       []merkle.Digest                                 `json:"issueIds"`
	PayId          pay.PayId                                       `json:"payId"`
	PayNonce       reservoir.PayNonce                              `json:"payNonce"`
	Difficulty     string                                          `json:"difficulty"`
	SubmittedNonce string                                          `json:"submittedNonce"`
	ProofStatus    reservoir.TrackingStatus                        `json:"proofStatus"`
	Payments       map[string]transactionrecord.PaymentAlternative `json:"payments,omitempty"`
	Commands       map[string]string                               `json:"commands,omitempty"`
}

IssueReply - JSON data to output after asset/issue/proof completes

type OwnedData added in v0.10.0

type OwnedData struct {
	Owner *account.Account
	Start uint64
	Count int
}

OwnedData - data for an ownership request

type ProvenanceData

type ProvenanceData struct {
	TxId       string
	Count      int
	Identities map[string]string
}

ProvenanceData - data for a provenance request

type ProvenanceReply added in v0.9.1

type ProvenanceReply struct {
	Data []provenanceItem `json:"data"`
}

ProvenanceReply - list of transactions in the provenance chain

type ShareData added in v0.10.0

type ShareData struct {
	Owner    *configuration.Private
	NewOwner *configuration.Private
	TxId     string
	Quantity uint64
}

ShareData - data for a share request

type ShareReply added in v0.10.0

type ShareReply struct {
	TxId     merkle.Digest                                   `json:"txId"`
	ShareId  merkle.Digest                                   `json:"shareId"`
	PayId    pay.PayId                                       `json:"payId"`
	Payments map[string]transactionrecord.PaymentAlternative `json:"payments"`
	Commands map[string]string                               `json:"commands,omitempty"`
}

ShareReply - JSON data to output after transfer completes

type SwapCountersignData added in v0.10.0

type SwapCountersignData struct {
	Swap      string
	Recipient *configuration.Private
}

SwapCountersignData - data for countersigning

type SwapData added in v0.10.0

type SwapData struct {
	ShareIdOne  string
	QuantityOne uint64
	OwnerOne    *configuration.Private
	ShareIdTwo  string
	QuantityTwo uint64
	OwnerTwo    *account.Account
	BeforeBlock uint64
}

SwapData - data for a swap request

type SwapReply added in v0.10.0

type SwapReply struct {
	SwapId   merkle.Digest                                   `json:"swapId"`
	PayId    pay.PayId                                       `json:"payId"`
	Payments map[string]transactionrecord.PaymentAlternative `json:"payments"`
	Commands map[string]string                               `json:"commands,omitempty"`
}

SwapReply - JSON data to output after swap completes

type SwapSingleSignedReply added in v0.10.0

type SwapSingleSignedReply struct {
	Identity string `json:"identity"`
	Swap     string `json:"swap"`
}

SwapSingleSignedReply - result of single signature

type TransactionStatusData

type TransactionStatusData struct {
	TxId string
}

TransactionStatusData - request data fro transaction status

type TransferCountersignData added in v0.10.0

type TransferCountersignData struct {
	Transfer string
	NewOwner *configuration.Private
}

TransferCountersignData - countersign data request

type TransferData

type TransferData struct {
	Owner    *configuration.Private
	NewOwner *account.Account
	TxId     string
}

TransferData - data for a transfer request

type TransferReply

type TransferReply struct {
	TransferId merkle.Digest                                   `json:"transferId"`
	BitmarkId  merkle.Digest                                   `json:"bitmarkId"`
	PayId      pay.PayId                                       `json:"payId"`
	Payments   map[string]transactionrecord.PaymentAlternative `json:"payments"`
	Commands   map[string]string                               `json:"commands,omitempty"`
}

TransferReply - JSON data to output after transfer completes

type TransferSingleSignedReply added in v0.10.0

type TransferSingleSignedReply struct {
	Identity string `json:"identity"`
	Transfer string `json:"transfer"`
}

TransferSingleSignedReply - response to single signature

Jump to

Keyboard shortcuts

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