Documentation
¶
Index ¶
- func NewEd25519Condition(pubKey ed25519.PublicKey) *cryptoconditions.Condition
- type Asset
- type AssetResponse
- type Block
- type Condition
- type ConditionDetail
- type Input
- type KeyPair
- type Metadata
- type MetadataResponse
- type Output
- type OutputLocation
- type Transaction
- func New(operation string, asset Asset, metadata Metadata, inputs []Input, ...) (*Transaction, error)
- func NewCreateTransaction(asset Asset, metadata Metadata, outputs []Output, issuers []ed25519.PublicKey) (*Transaction, error)
- func NewTransferTransaction(unspentTransactions []Transaction, outputs []Output, metadata Metadata) (*Transaction, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEd25519Condition ¶
func NewEd25519Condition(pubKey ed25519.PublicKey) *cryptoconditions.Condition
Types ¶
type AssetResponse ¶
type Block ¶
type Block struct {
Height int `json:"height"`
Transactions []Transaction `json:"transactions"`
}
type Condition ¶
type Condition struct {
Details ConditionDetail `json:"details"`
Uri string `json:"uri"`
}
type ConditionDetail ¶
type Input ¶
type Input struct {
// Fulfillment can have both uri string or object with pubKey and other info
// ID has to convert to null value in JSON
Fulfillment *string `json:"fulfillment"`
Fulfills *OutputLocation `json:"fulfills"`
OwnersBefore []string `json:"owners_before"`
}
type KeyPair ¶
type KeyPair struct {
PrivateKey ed25519.PrivateKey `json:"privateKey"`
PublicKey ed25519.PublicKey `json:"publicKey"`
}
type MetadataResponse ¶
type Output ¶
type OutputLocation ¶
type Transaction ¶
type Transaction struct {
Asset Asset `json:"asset"`
// ID has to convert to null value in JSON
ID *string `json:"id"`
Inputs []Input `json:"inputs"`
Metadata Metadata `json:"metadata"`
Operation string `json:"operation"`
Outputs []Output `json:"outputs"`
Version string `json:"version"`
}
func NewCreateTransaction ¶
func NewTransferTransaction ¶
func NewTransferTransaction( unspentTransactions []Transaction, outputs []Output, metadata Metadata, ) (*Transaction, error)
TODO clarify starting point transfer txn: Outputlocations or unspent transactions?
func (*Transaction) JSON ¶
func (t *Transaction) JSON() ([]byte, error)
func (*Transaction) Sign ¶
func (t *Transaction) Sign(keyPairs []*KeyPair) error
The privateKeys slice expects keys in the same order as the accompanying public key in the transaction.Inputs
func (*Transaction) String ¶
func (t *Transaction) String() (string, error)
Click to show internal directories.
Click to hide internal directories.