Documentation
¶
Index ¶
- Constants
- Variables
- func NewEd25519Condition(pubKey ed25519.PublicKey) *cryptoconditions.Condition
- func NewURIfromKey(key ed25519.PublicKey) string
- func SignTx(t *models.Transaction, keyPairs []*KeyPair) error
- type Asset
- type BigChainDBDialer
- type Block
- type CreateParams
- type Fulfills
- type KeyPair
- type Metadata
- type Owner
- type RESTClientV1
- func (c *RESTClientV1) CreateTx(params CreateParams) (*Transaction, error)
- func (c *RESTClientV1) GetBlockHeight(blockHeight int64) (*Block, error)
- func (c *RESTClientV1) GetTransaction(txID string) (*Transaction, error)
- func (c *RESTClientV1) ListBlocks(txID string) ([]int64, error)
- func (c *RESTClientV1) ListOutputs(pubKey string, spent bool) ([]*Fulfills, error)
- func (c *RESTClientV1) ListTransactions(assetID string, operation txOp, onlyLast bool) ([]*Transaction, error)
- func (c *RESTClientV1) SearchAsset(search string, limit int64) ([]*Asset, error)
- func (c *RESTClientV1) SearchMetadata(search string, limit int64) ([]Metadata, error)
- func (c *RESTClientV1) TransferManyToMany(mode txMode, amount float64, prevTx []*Transaction, destPubKeys []string, ...) error
- func (c *RESTClientV1) TransferOneToOne(params TransferParams) (*Transaction, error)
- type Transaction
- type TransferParams
- type ValidTransaction
- type WSClient
Constants ¶
View Source
const ( ErrNilTx = bcError("nil transaction provided") ErrNoKeyPairs = bcError("no key pairs provided") ModeAsync = txMode(models.TransactionModeAsync) ModeSync = txMode(models.TransactionModeSync) ModeCommit = txMode(models.TransactionModeCommit) OpCreate = txOp(models.TransactionOperationCREATE) OpTransfer = txOp(models.TransactionOperationTRANSFER) )
Variables ¶
View Source
var DefaultSchemes = []string{"http"}
Functions ¶
func NewEd25519Condition ¶
func NewEd25519Condition(pubKey ed25519.PublicKey) *cryptoconditions.Condition
func NewURIfromKey ¶
Types ¶
type BigChainDBDialer ¶
type BigChainDBDialer = stubborn.DuplexConnector
type CreateParams ¶
type KeyPair ¶
type KeyPair struct { PrivateKey ed25519.PrivateKey `json:"privateKey"` PublicKey ed25519.PublicKey `json:"publicKey"` }
func NewKeyPair ¶
type RESTClientV1 ¶
type RESTClientV1 struct {
// contains filtered or unexported fields
}
func NewRESTClientV1 ¶
func (*RESTClientV1) CreateTx ¶
func (c *RESTClientV1) CreateTx(params CreateParams) (*Transaction, error)
CreateTx : all key names (e.g. anywhere in the JSON documents stored in asset.data or metadata): - must not begin with $ - must not contain . - must not contain the null character (Unicode code point U+0000)
func (*RESTClientV1) GetBlockHeight ¶
func (c *RESTClientV1) GetBlockHeight(blockHeight int64) (*Block, error)
func (*RESTClientV1) GetTransaction ¶
func (c *RESTClientV1) GetTransaction(txID string) (*Transaction, error)
func (*RESTClientV1) ListBlocks ¶
func (c *RESTClientV1) ListBlocks(txID string) ([]int64, error)
func (*RESTClientV1) ListOutputs ¶
func (c *RESTClientV1) ListOutputs(pubKey string, spent bool) ([]*Fulfills, error)
func (*RESTClientV1) ListTransactions ¶
func (c *RESTClientV1) ListTransactions(assetID string, operation txOp, onlyLast bool) ([]*Transaction, error)
func (*RESTClientV1) SearchAsset ¶
func (c *RESTClientV1) SearchAsset(search string, limit int64) ([]*Asset, error)
func (*RESTClientV1) SearchMetadata ¶
func (c *RESTClientV1) SearchMetadata(search string, limit int64) ([]Metadata, error)
func (*RESTClientV1) TransferManyToMany ¶
func (c *RESTClientV1) TransferManyToMany( mode txMode, amount float64, prevTx []*Transaction, destPubKeys []string, metaData any, ) error
TransferManyToMany TODO
func (*RESTClientV1) TransferOneToOne ¶
func (c *RESTClientV1) TransferOneToOne(params TransferParams) (*Transaction, error)
type Transaction ¶
type Transaction = models.Transaction
type TransferParams ¶
type ValidTransaction ¶
type ValidTransaction = models.ValidTransactionResponse
type WSClient ¶
type WSClient struct {
// contains filtered or unexported fields
}
func NewWSClient ¶
func (*WSClient) SubscribeStream ¶
func (ws *WSClient) SubscribeStream(stream chan ValidTransaction) error
Click to show internal directories.
Click to hide internal directories.