Documentation ¶
Index ¶
- Constants
- Variables
- func MarshalBlobTx(tx []byte, blobs ...*Blob) ([]byte, error)
- func Sort(blobs []*Blob)
- type Blob
- func (*Blob) Descriptor() ([]byte, []int)
- func (m *Blob) GetData() []byte
- func (m *Blob) GetNamespaceId() []byte
- func (m *Blob) GetNamespaceVersion() uint32
- func (m *Blob) GetShareVersion() uint32
- func (m *Blob) Marshal() (dAtA []byte, err error)
- func (m *Blob) MarshalTo(dAtA []byte) (int, error)
- func (m *Blob) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (b Blob) Namespace() namespace.Namespace
- func (*Blob) ProtoMessage()
- func (m *Blob) Reset()
- func (m *Blob) Size() (n int)
- func (m *Blob) String() string
- func (m *Blob) Unmarshal(dAtA []byte) error
- func (b *Blob) Validate() error
- func (m *Blob) XXX_DiscardUnknown()
- func (m *Blob) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Blob) XXX_Merge(src proto.Message)
- func (m *Blob) XXX_Size() int
- func (m *Blob) XXX_Unmarshal(b []byte) error
- type BlobTx
- func (*BlobTx) Descriptor() ([]byte, []int)
- func (m *BlobTx) GetBlobs() []*Blob
- func (m *BlobTx) GetTx() []byte
- func (m *BlobTx) GetTypeId() string
- func (m *BlobTx) Marshal() (dAtA []byte, err error)
- func (m *BlobTx) MarshalTo(dAtA []byte) (int, error)
- func (m *BlobTx) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*BlobTx) ProtoMessage()
- func (m *BlobTx) Reset()
- func (m *BlobTx) Size() (n int)
- func (m *BlobTx) String() string
- func (m *BlobTx) Unmarshal(dAtA []byte) error
- func (m *BlobTx) XXX_DiscardUnknown()
- func (m *BlobTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BlobTx) XXX_Merge(src proto.Message)
- func (m *BlobTx) XXX_Size() int
- func (m *BlobTx) XXX_Unmarshal(b []byte) error
Constants ¶
const ProtoBlobTxTypeID = "BLOB"
ProtoBlobTxTypeID is included in each encoded BlobTx to help prevent decoding binaries that are not actually BlobTxs.
Variables ¶
Functions ¶
func MarshalBlobTx ¶
MarshalBlobTx creates a BlobTx using a normal transaction and some number of blobs.
NOTE: Any checks on the blobs or the transaction must be performed in the application
Types ¶
type Blob ¶
type Blob struct { NamespaceId []byte `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` NamespaceVersion uint32 `protobuf:"varint,4,opt,name=namespace_version,json=namespaceVersion,proto3" json:"namespace_version,omitempty"` }
Blob (named after binary large object) is a chunk of data submitted by a user to be published to the Celestia blockchain. The data of a Blob is published to a namespace and is encoded into shares based on the format specified by share_version.
func New ¶
NewBlob creates a new coretypes.Blob from the provided data after performing basic stateless checks over it.
func (*Blob) Descriptor ¶
func (*Blob) GetNamespaceId ¶
func (*Blob) GetNamespaceVersion ¶
func (*Blob) GetShareVersion ¶
func (*Blob) ProtoMessage ¶
func (*Blob) ProtoMessage()
func (*Blob) XXX_DiscardUnknown ¶
func (m *Blob) XXX_DiscardUnknown()
func (*Blob) XXX_Unmarshal ¶
type BlobTx ¶
type BlobTx struct { Tx []byte `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"` Blobs []*Blob `protobuf:"bytes,2,rep,name=blobs,proto3" json:"blobs,omitempty"` TypeId string `protobuf:"bytes,3,opt,name=type_id,json=typeId,proto3" json:"type_id,omitempty"` }
BlobTx wraps an encoded sdk.Tx with a second field to contain blobs of data. The raw bytes of the blobs are not signed over, instead we verify each blob using the relevant MsgPayForBlobs that is signed over in the encoded sdk.Tx.
func UnmarshalBlobTx ¶
UnmarshalBlobTx attempts to unmarshal a transaction into blob transaction. If an error is thrown, false is returned.
func (*BlobTx) Descriptor ¶
func (*BlobTx) MarshalToSizedBuffer ¶
func (*BlobTx) ProtoMessage ¶
func (*BlobTx) ProtoMessage()
func (*BlobTx) XXX_DiscardUnknown ¶
func (m *BlobTx) XXX_DiscardUnknown()