rpccalls

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2018 License: ISC, ISC Imports: 22 Imported by: 0

Documentation

Overview

Bitmark rpccalls

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMakeBlockTransferFail  = fault.ProcessError("make block transfer failed")
	ErrNotBlockTransferRecord = fault.InvalidError("not block transfer record")
)
View Source
var (
	ErrMakeTransferFail  = fault.ProcessError("make transfer failed")
	ErrNotTransferRecord = fault.InvalidError("not transfer record")
)
View Source
var (
	ErrAssetRequestFail = fault.ProcessError("send asset request failed")
)
View Source
var (
	ErrMakeIssueFail = fault.ProcessError("make issue failed")
)

Functions

This section is empty.

Types

type AssetData

type AssetData struct {
	Name        string
	Metadata    string
	Quantity    int
	Registrant  *keypair.KeyPair
	Fingerprint string
}

type AssetResult added in v0.9.1

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

type BlockTransferCountersignData added in v0.7.0

type BlockTransferCountersignData struct {
	BlockTransfer string
	NewOwner      *keypair.KeyPair
}

type BlockTransferData added in v0.7.0

type BlockTransferData struct {
	Payments currency.Map
	Owner    *keypair.KeyPair
	NewOwner *keypair.KeyPair
	TxId     string
}

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

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

type Client

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

to hold RPC connections streams

func NewClient

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

func (*Client) Close

func (c *Client) Close()

func (*Client) CountersignBlockTransfer added in v0.7.0

func (client *Client) CountersignBlockTransfer(countersignConfig *BlockTransferCountersignData) (*BlockTransferReply, error)

func (*Client) CountersignTransfer

func (client *Client) CountersignTransfer(countersignConfig *CountersignData) (*TransferReply, error)

func (*Client) GetBitmarkInfo

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

func (*Client) GetProvenance

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

func (*Client) GetTransactionStatus

func (client *Client) GetTransactionStatus(statusConfig *TransactionStatusData) (*rpc.TransactionStatusReply, error)

func (*Client) Issue

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

func (*Client) MakeAsset

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

build a properly signed asset

func (*Client) SingleSignedBlockTransfer added in v0.7.0

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

func (*Client) SingleSignedTransfer

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

func (*Client) Transfer

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

type CountersignData

type CountersignData struct {
	Transfer string
	NewOwner *keypair.KeyPair
}

type IssueData

type IssueData struct {
	Issuer    *keypair.KeyPair
	AssetId   *transactionrecord.AssetIdentifier
	Quantity  int
	FreeIssue bool
}

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

JSON data to output after asset/issue/proof completes

type ProvenanceData

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

type ProvenanceReply added in v0.9.1

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

type SingleSignedReply

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

type TransactionStatusData

type TransactionStatusData struct {
	TxId string
}

type TransferData

type TransferData struct {
	Owner    *keypair.KeyPair
	NewOwner *keypair.KeyPair
	TxId     string
}

type TransferReply

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

JSON data to output after transfer completes

Jump to

Keyboard shortcuts

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