Documentation ¶
Index ¶
- func GetMetadataDatumMapV5(txMetadata json.RawMessage, metadataDatumKey int) (map[string][]byte, error)
- func GetMetadataDatumsV5(txMetadata json.RawMessage, metadataDatumKey int) ([][]byte, error)
- type BlockHeaderV5
- type BlockV5
- type ByronBlock
- type ByronBody
- type ByronHeader
- type ByronTxBody
- type ByronTxPayload
- type ByronWitness
- type IntersectionFoundV5
- type IntersectionNotFoundV5
- type OgmiosAuxiliaryDataV5
- type OgmiosAuxiliaryDataV5Body
- type OgmiosMetadataV5
- type PointStructV5
- type PointV5
- func (p PointV5) ConvertToV6() chainsync.Point
- func (p PointV5) MarshalCBOR() ([]byte, error)
- func (p PointV5) MarshalJSON() ([]byte, error)
- func (p PointV5) PointString() (chainsync.PointString, bool)
- func (p PointV5) PointStruct() (*PointStructV5, bool)
- func (p PointV5) PointType() chainsync.PointType
- func (p PointV5) String() string
- func (p *PointV5) UnmarshalCBOR(data []byte) error
- func (p *PointV5) UnmarshalJSON(data []byte) error
- type PointsV5
- type ResponseV5
- type ResultFindIntersectionV5
- type ResultNextBlockV5
- type ResultV5
- type RollBackwardV5
- type RollForwardBlockV5
- type RollForwardV5
- type TxBodyV5
- type TxInV5
- type TxInsV5
- type TxOutV5
- type TxOutsV5
- type TxV5
- type ValidityIntervalV5
- type ValueV5
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMetadataDatumMapV5 ¶
func GetMetadataDatumsV5 ¶
func GetMetadataDatumsV5(txMetadata json.RawMessage, metadataDatumKey int) ([][]byte, error)
Types ¶
type BlockHeaderV5 ¶
type BlockHeaderV5 struct { BlockHash string `json:"blockHash,omitempty" dynamodbav:"blockHash,omitempty"` BlockHeight uint64 `json:"blockHeight,omitempty" dynamodbav:"blockHeight,omitempty"` BlockSize uint64 `json:"blockSize,omitempty" dynamodbav:"blockSize,omitempty"` IssuerVK string `json:"issuerVK,omitempty" dynamodbav:"issuerVK,omitempty"` IssuerVrf string `json:"issuerVrf,omitempty" dynamodbav:"issuerVrf,omitempty"` LeaderValue map[string][]byte `json:"leaderValue,omitempty" dynamodbav:"leaderValue,omitempty"` Nonce map[string]string `json:"nonce,omitempty" dynamodbav:"nonce,omitempty"` OpCert map[string]interface{} `json:"opCert,omitempty" dynamodbav:"opCert,omitempty"` PrevHash string `json:"prevHash,omitempty" dynamodbav:"prevHash,omitempty"` ProtocolVersion map[string]int `json:"protocolVersion,omitempty" dynamodbav:"protocolVersion,omitempty"` Signature string `json:"signature,omitempty" dynamodbav:"signature,omitempty"` Slot uint64 `json:"slot,omitempty" dynamodbav:"slot,omitempty"` }
type BlockV5 ¶
type BlockV5 struct { Body []TxV5 `json:"body,omitempty" dynamodbav:"body,omitempty"` Header BlockHeaderV5 `json:"header,omitempty" dynamodbav:"header,omitempty"` HeaderHash string `json:"headerHash,omitempty" dynamodbav:"headerHash,omitempty"` }
type ByronBlock ¶
type ByronBlock struct { Body ByronBody Hash string Header ByronHeader }
type ByronBody ¶
type ByronBody struct { DlgPayload []json.RawMessage `json:"dlgPayload,omitempty"` TxPayload []ByronTxPayload `json:"txPayload,omitempty"` UpdatePayload json.RawMessage `json:"updatePayload,omitempty"` }
type ByronHeader ¶
type ByronHeader struct { BlockHeight uint64 `json:"blockHeight,omitempty"` GenesisKey string Epoch uint32 Proof json.RawMessage PrevHash string ProtocolMagicId uint64 ProtocolVersion chainsync.ProtocolVersion Signature json.RawMessage Slot uint64 `json:"slot,omitempty"` SoftwareVersion map[string]interface{} }
type ByronTxPayload ¶
type ByronTxPayload struct { ID string Witness []ByronWitness }
type ByronWitness ¶
type IntersectionFoundV5 ¶
type IntersectionFoundV5 struct { Point *PointV5 Tip *PointStructV5 }
type IntersectionNotFoundV5 ¶
type IntersectionNotFoundV5 struct {
Tip *PointStructV5
}
type OgmiosAuxiliaryDataV5 ¶
type OgmiosAuxiliaryDataV5 struct { Hash string `json:"hash"` Body *OgmiosAuxiliaryDataV5Body `json:"body"` }
func OgmiosAuxiliaryDataFromV6 ¶
func OgmiosAuxiliaryDataFromV6(t chainsync.OgmiosAuxiliaryDataV6) (OgmiosAuxiliaryDataV5, error)
NOTE: This works only for JSON metadata. Entries with CBOR metadata are ignored.
func (OgmiosAuxiliaryDataV5) ConvertToV6 ¶
func (t OgmiosAuxiliaryDataV5) ConvertToV6() chainsync.OgmiosAuxiliaryDataV6
type OgmiosAuxiliaryDataV5Body ¶
type OgmiosAuxiliaryDataV5Body struct {
Blob OgmiosMetadataV5 `json:"blob"`
}
type OgmiosMetadataV5 ¶
type OgmiosMetadataV5 map[int]chainsync.OgmiosMetadatum
type PointStructV5 ¶
type PointStructV5 struct { BlockNo uint64 `json:"blockNo,omitempty" dynamodbav:"blockNo,omitempty"` Hash string `json:"hash,omitempty" dynamodbav:"hash,omitempty"` // BLAKE2b_256 hash Slot uint64 `json:"slot,omitempty" dynamodbav:"slot,omitempty"` }
func (PointStructV5) ConvertToV6 ¶
func (p PointStructV5) ConvertToV6() chainsync.PointStruct
func (PointStructV5) Point ¶
func (p PointStructV5) Point() PointV5
type PointV5 ¶
type PointV5 struct {
// contains filtered or unexported fields
}
func PointFromV6 ¶
func (PointV5) ConvertToV6 ¶
func (PointV5) MarshalCBOR ¶
func (PointV5) MarshalJSON ¶
func (PointV5) PointString ¶
func (p PointV5) PointString() (chainsync.PointString, bool)
func (PointV5) PointStruct ¶
func (p PointV5) PointStruct() (*PointStructV5, bool)
func (*PointV5) UnmarshalCBOR ¶
func (*PointV5) UnmarshalJSON ¶
type ResponseV5 ¶
type ResponseV5 struct { Type string `json:"type,omitempty" dynamodbav:"type,omitempty"` Version string `json:"version,omitempty" dynamodbav:"version,omitempty"` ServiceName string `json:"servicename,omitempty" dynamodbav:"servicename,omitempty"` MethodName string `json:"methodname,omitempty" dynamodbav:"methodname,omitempty"` Result *ResultV5 `json:"result,omitempty" dynamodbav:"result,omitempty"` Reflection json.RawMessage `json:"reflection,omitempty" dynamodbav:"reflection,omitempty"` }
func ResponseFromV6 ¶
func ResponseFromV6(r chainsync.ResponsePraos) ResponseV5
I don't really understand the nest of types here...
func (ResponseV5) ConvertToV6 ¶
func (r ResponseV5) ConvertToV6() chainsync.ResponsePraos
type ResultFindIntersectionV5 ¶
type ResultFindIntersectionV5 struct { IntersectionFound *IntersectionFoundV5 `json:",omitempty" dynamodbav:",omitempty"` IntersectionNotFound *IntersectionNotFoundV5 `json:",omitempty" dynamodbav:",omitempty"` }
func ResultFindIntersectionFromV6 ¶
func ResultFindIntersectionFromV6(rfi chainsync.ResultFindIntersectionPraos) ResultFindIntersectionV5
func (ResultFindIntersectionV5) ConvertToV6 ¶
func (r ResultFindIntersectionV5) ConvertToV6() chainsync.ResultFindIntersectionPraos
type ResultNextBlockV5 ¶
type ResultNextBlockV5 struct { RollForward *RollForwardV5 `json:",omitempty" dynamodbav:",omitempty"` RollBackward *RollBackwardV5 `json:",omitempty" dynamodbav:",omitempty"` }
func ResultNextBlockFromV6 ¶
func ResultNextBlockFromV6(rnb chainsync.ResultNextBlockPraos) ResultNextBlockV5
func (ResultNextBlockV5) ConvertToV6 ¶
func (r ResultNextBlockV5) ConvertToV6() chainsync.ResultNextBlockPraos
type ResultV5 ¶
type ResultV5 struct { IntersectionFound *IntersectionFoundV5 `json:",omitempty" dynamodbav:",omitempty"` IntersectionNotFound *IntersectionNotFoundV5 `json:",omitempty" dynamodbav:",omitempty"` RollForward *RollForwardV5 `json:",omitempty" dynamodbav:",omitempty"` RollBackward *RollBackwardV5 `json:",omitempty" dynamodbav:",omitempty"` }
TODO: why do we have two types here?
type RollBackwardV5 ¶
type RollBackwardV5 struct { Point PointV5 `json:"point,omitempty" dynamodbav:"point,omitempty"` Tip PointStructV5 `json:"tip,omitempty" dynamodbav:"tip,omitempty"` }
type RollForwardBlockV5 ¶
type RollForwardBlockV5 struct { Allegra *BlockV5 `json:"allegra,omitempty" dynamodbav:"allegra,omitempty"` Alonzo *BlockV5 `json:"alonzo,omitempty" dynamodbav:"alonzo,omitempty"` Babbage *BlockV5 `json:"babbage,omitempty" dynamodbav:"babbage,omitempty"` Byron *ByronBlock `json:"byron,omitempty" dynamodbav:"byron,omitempty"` Mary *BlockV5 `json:"mary,omitempty" dynamodbav:"mary,omitempty"` Shelley *BlockV5 `json:"shelley,omitempty" dynamodbav:"shelley,omitempty"` }
func BlockFromV6 ¶
func BlockFromV6(b chainsync.Block) (RollForwardBlockV5, error)
func (RollForwardBlockV5) ConvertToV6 ¶
func (b RollForwardBlockV5) ConvertToV6() (chainsync.Block, error)
func (RollForwardBlockV5) Era ¶
func (b RollForwardBlockV5) Era() string
func (RollForwardBlockV5) GetNonByronBlock ¶
func (b RollForwardBlockV5) GetNonByronBlock() *BlockV5
type RollForwardV5 ¶
type RollForwardV5 struct { Block RollForwardBlockV5 `json:"block,omitempty" dynamodbav:"block,omitempty"` Tip PointStructV5 `json:"tip,omitempty" dynamodbav:"tip,omitempty"` }
type TxBodyV5 ¶
type TxBodyV5 struct { Certificates []json.RawMessage `json:"certificates,omitempty" dynamodbav:"certificates,omitempty"` Collaterals TxInsV5 `json:"collaterals,omitempty" dynamodbav:"collaterals,omitempty"` Fee num.Int `json:"fee,omitempty" dynamodbav:"fee,omitempty"` Inputs TxInsV5 `json:"inputs,omitempty" dynamodbav:"inputs,omitempty"` Mint *ValueV5 `json:"mint,omitempty" dynamodbav:"mint,omitempty"` Network json.RawMessage `json:"network,omitempty" dynamodbav:"network,omitempty"` Outputs TxOutsV5 `json:"outputs,omitempty" dynamodbav:"outputs,omitempty"` RequiredExtraSignatures []string `json:"requiredExtraSignatures,omitempty" dynamodbav:"requiredExtraSignatures,omitempty"` ScriptIntegrityHash string `json:"scriptIntegrityHash,omitempty" dynamodbav:"scriptIntegrityHash,omitempty"` TimeToLive int64 `json:"timeToLive,omitempty" dynamodbav:"timeToLive,omitempty"` Update json.RawMessage `json:"update,omitempty" dynamodbav:"update,omitempty"` ValidityInterval ValidityIntervalV5 `json:"validityInterval" dynamodbav:"validityInterval,omitempty"` Withdrawals map[string]int64 `json:"withdrawals,omitempty" dynamodbav:"withdrawals,omitempty"` CollateralReturn *TxOutV5 `json:"collateralReturn,omitempty" dynamodbav:"collateralReturn,omitempty"` TotalCollateral *int64 `json:"totalCollateral,omitempty" dynamodbav:"totalCollateral,omitempty"` References TxInsV5 `json:"references,omitempty" dynamodbav:"references,omitempty"` }
type TxInV5 ¶
type TxInV5 struct { TxHash string `json:"txId" dynamodbav:"txId"` Index int `json:"index" dynamodbav:"index"` }
func InputFromV6 ¶
func (TxInV5) ConvertToV6 ¶
type TxOutV5 ¶
type TxOutV5 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 ValueV5 `json:"value,omitempty" dynamodbav:"value,omitempty"` Script json.RawMessage `json:"script,omitempty" dynamodbav:"script,omitempty"` }
func TxOutFromV6 ¶
func (TxOutV5) ConvertToV6 ¶
type TxV5 ¶
type TxV5 struct { ID string `json:"id,omitempty" dynamodbav:"id,omitempty"` InputSource string `json:"inputSource,omitempty" dynamodbav:"inputSource,omitempty"` Body TxBodyV5 `json:"body,omitempty" dynamodbav:"body,omitempty"` Witness chainsync.Witness `json:"witness,omitempty" dynamodbav:"witness,omitempty"` Metadata json.RawMessage `json:"metadata,omitempty" dynamodbav:"metadata,omitempty"` // Raw serialized transaction, base64. Raw string `json:"raw,omitempty" dynamodbav:"raw,omitempty"` }
Use V5 materials only for JSON backwards compatibility.
func (TxV5) ConvertToV6 ¶
CAVEAT: v5->v6 conversion is, to some degree, best-effort-only. For example, some fields in v6 (e.g., "requiredExtraScripts" and "votes") either aren't represented in v5 or are represented such that it's very difficult, if not impossible, to determine if it's okay to populate the relevant fields in v6. (Example: The "scripts" field in v5 and v6 may contain scripts that aren't considered required in v6.)
type ValidityIntervalV5 ¶
type ValidityIntervalV5 struct { InvalidBefore uint64 `json:"invalidBefore,omitempty" dynamodbav:"invalidBefore,omitempty"` InvalidHereafter uint64 `json:"invalidHereafter,omitempty" dynamodbav:"invalidHereafter,omitempty"` }
func ValidityIntervalFromV6 ¶
func ValidityIntervalFromV6(v chainsync.ValidityInterval) ValidityIntervalV5
func (ValidityIntervalV5) ConvertToV6 ¶
func (v ValidityIntervalV5) ConvertToV6() chainsync.ValidityInterval
Click to show internal directories.
Click to hide internal directories.