Documentation ¶
Index ¶
- Constants
- Variables
- func Equals(left Value, right Value) bool
- func GetMetadataDatumMapV6(txMetadata json.RawMessage, metadataDatumKey int) (map[string][]byte, error)
- func GetMetadataDatums(datums map[string][]byte) ([][]byte, error)
- func GetMetadataDatumsV6(txMetadata json.RawMessage, metadataDatumKey int) ([][]byte, error)
- func ReconstructDatums(metadatum OgmiosMetadatum) (map[string][]byte, error)
- type Block
- type BlockIssuer
- type BlockSize
- type ByronBlockBFT
- type ByronBlockDelegate
- type ByronBlockEBB
- type ByronBlockIssuer
- type ByronProtocol
- type Datums
- type Kes
- type LeaderValue
- type Nonce
- type OgmiosAuxiliaryDataLabelsV6
- type OgmiosAuxiliaryDataV6
- type OgmiosMetadatum
- type OgmiosMetadatumKind
- type OgmiosMetadatumMap
- type OgmiosMetadatumRecordV6
- type OpCert
- type Point
- func (p Point) MarshalCBOR() ([]byte, error)
- func (p Point) MarshalDynamoDBAttributeValue(item *dynamodb.AttributeValue) error
- func (p Point) MarshalJSON() ([]byte, error)
- func (p Point) PointString() (PointString, bool)
- func (p Point) PointStruct() (*PointStruct, bool)
- func (p Point) PointType() PointType
- func (p Point) String() string
- func (p *Point) UnmarshalCBOR(data []byte) error
- func (p *Point) UnmarshalDynamoDBAttributeValue(item *dynamodb.AttributeValue) error
- func (p *Point) UnmarshalJSON(data []byte) error
- type PointString
- type PointStruct
- type PointType
- type Points
- type Protocol
- type ProtocolVersion
- type ResponseByronBFT
- type ResponseByronEBB
- type ResponsePraos
- type ResultByronBFT
- type ResultByronEBB
- type ResultError
- type ResultFindIntersectionPraos
- type ResultNextBlockPraos
- type RollBackward
- type RollBackwardPoint
- type RollForward
- type Signature
- type Tx
- type TxID
- type TxIn
- type TxInID
- type TxInQuery
- type TxIns
- type TxOut
- type TxOuts
- type ValidityInterval
- type Witness
Constants ¶
View Source
const FindIntersectMethod = "FindIntersect"
View Source
const FindIntersectionMethod = "findIntersection"
View Source
const NextBlockMethod = "nextBlock"
View Source
const RequestNextMethod = "RequestNext"
View Source
const RollBackwardString = "backward"
View Source
const RollForwardString = "forward"
Variables ¶
View Source
var Origin = PointString("origin").Point()
Functions ¶
func GetMetadataDatumMapV6 ¶
func GetMetadataDatumsV6 ¶
func GetMetadataDatumsV6(txMetadata json.RawMessage, metadataDatumKey int) ([][]byte, error)
func ReconstructDatums ¶
func ReconstructDatums(metadatum OgmiosMetadatum) (map[string][]byte, error)
Types ¶
type Block ¶
type Block struct { Type string `json:"type,omitempty"` Era string `json:"era,omitempty"` ID string `json:"id,omitempty"` Ancestor string `json:"ancestor,omitempty"` Nonce *Nonce `json:"nonce,omitempty"` Height uint64 `json:"height,omitempty"` Size BlockSize `json:"size,omitempty"` Slot uint64 `json:"slot,omitempty"` Transactions []Tx `json:"transactions,omitempty"` Protocol Protocol `json:"protocol,omitempty"` Issuer BlockIssuer `json:"issuer,omitempty"` }
All blocks except Byron-era blocks.
func (Block) PointStruct ¶
func (b Block) PointStruct() PointStruct
type BlockIssuer ¶
type BlockIssuer struct { VerificationKey string `json:"verificationKey,omitempty"` VrfVerificationKey string `json:"vrfVerificationKey,omitempty"` OperationalCertificate OpCert `json:"operationalCertificate,omitempty"` LeaderValue *LeaderValue `json:"leaderValue,omitempty"` }
type BlockSize ¶
type BlockSize struct {
Bytes int64 `json:"bytes,omitempty" dynamodbav:"bytes,omitempty"`
}
type ByronBlockBFT ¶
type ByronBlockBFT struct { Type string `json:"type,omitempty"` Era string `json:"era,omitempty"` ID string `json:"id,omitempty"` Ancestor string `json:"ancestor,omitempty"` Height uint64 `json:"height,omitempty"` Slot uint64 `json:"slot,omitempty"` Size BlockSize `json:"size,omitempty"` Transactions []Tx `json:"transactions,omitempty"` OperationalCertificates []json.RawMessage `json:"operationalCertificates,omitempty"` Protocol ByronProtocol `json:"protocol,omitempty"` Issuer ByronBlockIssuer `json:"issuer,omitempty"` Delegate ByronBlockDelegate `json:"delegate,omitempty"` }
BFT Block Root
type ByronBlockDelegate ¶
type ByronBlockDelegate struct {
VerificationKey string
}
type ByronBlockEBB ¶
type ByronBlockEBB struct { Type string `json:"type,omitempty"` Era string `json:"era,omitempty"` ID string `json:"id,omitempty"` Ancestor string `json:"ancestor,omitempty"` Height uint64 `json:"height,omitempty"` }
EBB Block Type
type ByronBlockIssuer ¶
type ByronBlockIssuer struct {
VerificationKey string
}
type ByronProtocol ¶
type ByronProtocol struct { Version ProtocolVersion Id uint64 // aka magic Software map[string]interface{} Update json.RawMessage }
type Datums ¶
func (*Datums) UnmarshalDynamoDBAttributeValue ¶
func (d *Datums) UnmarshalDynamoDBAttributeValue(item *dynamodb.AttributeValue) error
func (*Datums) UnmarshalJSON ¶
type LeaderValue ¶
type OgmiosAuxiliaryDataLabelsV6 ¶
type OgmiosAuxiliaryDataLabelsV6 map[int]OgmiosMetadatumRecordV6
type OgmiosAuxiliaryDataV6 ¶
type OgmiosAuxiliaryDataV6 struct { Hash string Labels *OgmiosAuxiliaryDataLabelsV6 }
func (*OgmiosAuxiliaryDataV6) UnmarshalJSON ¶
func (o *OgmiosAuxiliaryDataV6) UnmarshalJSON(data []byte) error
type OgmiosMetadatum ¶
type OgmiosMetadatum struct { Tag OgmiosMetadatumKind IntField *big.Int `json:"int"` StringField string `json:"string"` BytesField []byte `json:"bytes"` ListField []*OgmiosMetadatum `json:"list"` MapField []*OgmiosMetadatumMap `json:"map"` }
func (*OgmiosMetadatum) UnmarshalJSON ¶
func (o *OgmiosMetadatum) UnmarshalJSON(data []byte) error
type OgmiosMetadatumKind ¶
type OgmiosMetadatumKind int
const ( OgmiosMetadatumTagUnknown OgmiosMetadatumKind = iota OgmiosMetadatumTagInt OgmiosMetadatumTagString OgmiosMetadatumTagBytes OgmiosMetadatumTagList OgmiosMetadatumTagMap )
type OgmiosMetadatumMap ¶
type OgmiosMetadatumMap struct { Key *OgmiosMetadatum `json:"k"` Value *OgmiosMetadatum `json:"v"` }
type OgmiosMetadatumRecordV6 ¶
type OgmiosMetadatumRecordV6 struct { Cbor *string `json:"cbor"` Json *OgmiosMetadatum `json:"json"` }
type Point ¶
type Point struct {
// contains filtered or unexported fields
}
func (Point) MarshalCBOR ¶
func (Point) MarshalDynamoDBAttributeValue ¶
func (p Point) MarshalDynamoDBAttributeValue(item *dynamodb.AttributeValue) error
func (Point) MarshalJSON ¶
func (Point) PointString ¶
func (p Point) PointString() (PointString, bool)
func (Point) PointStruct ¶
func (p Point) PointStruct() (*PointStruct, bool)
func (*Point) UnmarshalCBOR ¶
func (*Point) UnmarshalDynamoDBAttributeValue ¶
func (p *Point) UnmarshalDynamoDBAttributeValue(item *dynamodb.AttributeValue) error
func (*Point) UnmarshalJSON ¶
type PointString ¶
type PointString string
func (PointString) Point ¶
func (p PointString) Point() Point
type PointStruct ¶
type PointStruct struct { Height *uint64 `json:"height,omitempty" dynamodbav:"height,omitempty"` // Not part of RollBackward. ID string `json:"id,omitempty" dynamodbav:"id,omitempty"` // BLAKE2b_256 hash Slot uint64 `json:"slot,omitempty" dynamodbav:"slot,omitempty"` }
func (PointStruct) Point ¶
func (p PointStruct) Point() Point
type Protocol ¶
type Protocol struct {
Version ProtocolVersion `json:"version,omitempty" dynamodbav:"version,omitempty"`
}
type ProtocolVersion ¶
type ResponseByronBFT ¶
type ResponseByronBFT struct { JsonRpc string `json:"jsonrpc,omitempty" dynamodbav:"jsonrpc,omitempty"` Method string `json:"method,omitempty" dynamodbav:"method,omitempty"` Result *ResultByronBFT `json:"result,omitempty" dynamodbav:"result,omitempty"` ID json.RawMessage `json:"id,omitempty" dynamodbav:"id,omitempty"` }
type ResponseByronEBB ¶
type ResponseByronEBB struct { JsonRpc string `json:"jsonrpc,omitempty" dynamodbav:"jsonrpc,omitempty"` Method string `json:"method,omitempty" dynamodbav:"method,omitempty"` Result *ResultByronEBB `json:"result,omitempty" dynamodbav:"result,omitempty"` ID json.RawMessage `json:"id,omitempty" dynamodbav:"id,omitempty"` }
type ResponsePraos ¶
type ResponsePraos struct { JsonRpc string `json:"jsonrpc,omitempty" dynamodbav:"jsonrpc,omitempty"` Method string `json:"method,omitempty" dynamodbav:"method,omitempty"` Result interface{} `json:"result,omitempty" dynamodbav:"result,omitempty"` Error *ResultError `json:"error,omitempty" dynamodbav:"error,omitempty"` ID json.RawMessage `json:"id,omitempty" dynamodbav:"id,omitempty"` }
func (ResponsePraos) MustFindIntersectResult ¶
func (r ResponsePraos) MustFindIntersectResult() ResultFindIntersectionPraos
func (ResponsePraos) MustNextBlockResult ¶
func (r ResponsePraos) MustNextBlockResult() ResultNextBlockPraos
func (*ResponsePraos) UnmarshalJSON ¶
func (r *ResponsePraos) UnmarshalJSON(b []byte) error
type ResultByronBFT ¶
type ResultByronBFT struct { Direction string `json:"direction,omitempty" dynamodbav:"direction,omitempty"` Block *ByronBlockBFT `json:"block,omitempty" dynamodbav:"block,omitempty"` Tip *PointStruct `json:"tip,omitempty" dynamodbav:"tip,omitempty"` }
type ResultByronEBB ¶
type ResultByronEBB struct { Direction string `json:"direction,omitempty" dynamodbav:"direction,omitempty"` Block *ByronBlockEBB `json:"block,omitempty" dynamodbav:"block,omitempty"` Tip *PointStruct `json:"tip,omitempty" dynamodbav:"tip,omitempty"` }
type ResultError ¶
type ResultError struct { Code uint32 `json:"code,omitempty" dynamodbav:"code,omitempty"` Message string `json:"message,omitempty" dynamodbav:"message,omitempty"` Data json.RawMessage `json:"data,omitempty" dynamodbav:"data,omitempty"` // Forward ID json.RawMessage `json:"id,omitempty" dynamodbav:"id,omitempty"` }
type ResultFindIntersectionPraos ¶
type ResultFindIntersectionPraos struct { Intersection *Point `json:"intersection,omitempty" dynamodbav:"intersection,omitempty"` Tip *PointStruct `json:"tip,omitempty" dynamodbav:"tip,omitempty"` Error *ResultError `json:"error,omitempty" dynamodbav:"error,omitempty"` ID json.RawMessage `json:"id,omitempty" dynamodbav:"id,omitempty"` }
Covers everything except Byron-era blocks.
type ResultNextBlockPraos ¶
type ResultNextBlockPraos struct { Direction string `json:"direction,omitempty" dynamodbav:"direction,omitempty"` Tip *PointStruct `json:"tip,omitempty" dynamodbav:"tip,omitempty"` Block *Block `json:"block,omitempty" dynamodbav:"block,omitempty"` // Forward Point *Point `json:"point,omitempty" dynamodbav:"point,omitempty"` // Backward }
Covers all blocks except Byron-era blocks.
type RollBackward ¶
type RollBackward struct { Direction string `json:"direction,omitempty" dynamodbav:"direction,omitempty"` Tip PointStruct `json:"tip,omitempty" dynamodbav:"tip,omitempty"` Point RollBackwardPoint `json:"point,omitempty" dynamodbav:"point,omitempty"` }
type RollBackwardPoint ¶
type RollForward ¶
type RollForward struct { Direction string `json:"direction,omitempty" dynamodbav:"direction,omitempty"` Tip PointStruct `json:"tip,omitempty" dynamodbav:"tip,omitempty"` Block Block `json:"block,omitempty" dynamodbav:"block,omitempty"` }
Assume non-Byron blocks.
type Signature ¶
type Signature struct { Key string `json:"key" dynamodbav:"key"` Signature string `json:"signature" dynamodbav:"signature"` ChainCode string `json:"chainCode,omitempty" dynamodbav:"chainCode,omitempty"` AddressAttributes string `json:"addressAttributes,omitempty" dynamodbav:"addressAttributes,omitempty"` }
type Tx ¶
type Tx struct { ID string `json:"id,omitempty" dynamodbav:"id,omitempty"` Spends string `json:"spends,omitempty" dynamodbav:"spends,omitempty"` Inputs []TxIn `json:"inputs,omitempty" dynamodbav:"inputs,omitempty"` References []TxIn `json:"references,omitempty" dynamodbav:"references,omitempty"` Collaterals []TxIn `json:"collaterals,omitempty" dynamodbav:"collaterals,omitempty"` TotalCollateral *shared.Value `json:"totalCollateral,omitempty" dynamodbav:"totalCollateral,omitempty"` CollateralReturn *TxOut `json:"collateralReturn,omitempty" dynamodbav:"collateralReturn,omitempty"` Outputs TxOuts `json:"outputs,omitempty" dynamodbav:"outputs,omitempty"` Certificates []json.RawMessage `json:"certificates,omitempty" dynamodbav:"certificates,omitempty"` Withdrawals map[string]shared.Value `json:"withdrawals,omitempty" dynamodbav:"withdrawals,omitempty"` Fee shared.Value `json:"fee,omitempty" dynamodbav:"fee,omitempty"` ValidityInterval ValidityInterval `json:"validityInterval" dynamodbav:"validityInterval,omitempty"` Mint shared.Value `json:"mint,omitempty" dynamodbav:"mint,omitempty"` Network json.RawMessage `json:"network,omitempty" dynamodbav:"network,omitempty"` ScriptIntegrityHash string `json:"scriptIntegrityHash,omitempty" dynamodbav:"scriptIntegrityHash,omitempty"` RequiredExtraSignatories []string `json:"requiredExtraSignatories,omitempty" dynamodbav:"requiredExtraSignatories,omitempty"` RequiredExtraScripts []string `json:"requiredExtraScripts,omitempty" dynamodbav:"requiredExtraScripts,omitempty"` Proposals json.RawMessage `json:"proposals,omitempty" dynamodbav:"proposals,omitempty"` Votes json.RawMessage `json:"votes,omitempty" dynamodbav:"votes,omitempty"` Metadata json.RawMessage `json:"metadata,omitempty" dynamodbav:"metadata,omitempty"` Signatories []Signature `json:"signatories,omitempty" dynamodbav:"signatories,omitempty"` Scripts json.RawMessage `json:"scripts,omitempty" dynamodbav:"scripts,omitempty"` Datums Datums `json:"datums" dynamodbav:"datums,omitempty"` Redeemers json.RawMessage `json:"redeemers,omitempty" dynamodbav:"redeemers,omitempty"` CBOR string `json:"cbor,omitempty" dynamodbav:"cbor,omitempty"` }
type TxIn ¶
type TxOut ¶
type TxOut struct { Address string `json:"address,omitempty" dynamodbav:"address,omitempty"` Datum string `json:"datum,omitempty" dynamodbav:"datum,omitempty"` DatumHash string `json:"datumHash,omitempty" dynamodbav:"datumHash,omitempty"` Value shared.Value `json:"value,omitempty" dynamodbav:"value,omitempty"` Script json.RawMessage `json:"script,omitempty" dynamodbav:"script,omitempty"` }
type ValidityInterval ¶
type Witness ¶
type Witness struct { Bootstrap []json.RawMessage `json:"bootstrap,omitempty" dynamodbav:"bootstrap,omitempty"` Datums Datums `json:"datums" dynamodbav:"datums,omitempty"` Redeemers json.RawMessage `json:"redeemers,omitempty" dynamodbav:"redeemers,omitempty"` Scripts json.RawMessage `json:"scripts,omitempty" dynamodbav:"scripts,omitempty"` Signatures map[string]string `json:"signatures,omitempty" dynamodbav:"signatures,omitempty"` }
Click to show internal directories.
Click to hide internal directories.