Documentation
¶
Index ¶
- Variables
- type BlockInfo
- type ConfigTransaction
- func (*ConfigTransaction) Descriptor() ([]byte, []int)deprecated
- func (x *ConfigTransaction) GetEnvelope() []byte
- func (x *ConfigTransaction) GetVersion() uint64
- func (*ConfigTransaction) ProtoMessage()
- func (x *ConfigTransaction) ProtoReflect() protoreflect.Message
- func (x *ConfigTransaction) Reset()
- func (x *ConfigTransaction) String() string
- type LastCommittedBlock
- func (*LastCommittedBlock) Descriptor() ([]byte, []int)deprecated
- func (x *LastCommittedBlock) GetBlock() *BlockInfo
- func (*LastCommittedBlock) ProtoMessage()
- func (x *LastCommittedBlock) ProtoReflect() protoreflect.Message
- func (x *LastCommittedBlock) Reset()
- func (x *LastCommittedBlock) String() string
- type NamespacePolicies
- func (*NamespacePolicies) Descriptor() ([]byte, []int)deprecated
- func (x *NamespacePolicies) GetPolicies() []*PolicyItem
- func (*NamespacePolicies) ProtoMessage()
- func (x *NamespacePolicies) ProtoReflect() protoreflect.Message
- func (x *NamespacePolicies) Reset()
- func (x *NamespacePolicies) String() string
- type NamespacePolicy
- func (*NamespacePolicy) Descriptor() ([]byte, []int)deprecated
- func (x *NamespacePolicy) GetPublicKey() []byte
- func (x *NamespacePolicy) GetScheme() string
- func (*NamespacePolicy) ProtoMessage()
- func (x *NamespacePolicy) ProtoReflect() protoreflect.Message
- func (x *NamespacePolicy) Reset()
- func (x *NamespacePolicy) String() string
- type PolicyItem
- func (*PolicyItem) Descriptor() ([]byte, []int)deprecated
- func (x *PolicyItem) GetNamespace() string
- func (x *PolicyItem) GetPolicy() []byte
- func (x *PolicyItem) GetVersion() uint64
- func (*PolicyItem) ProtoMessage()
- func (x *PolicyItem) ProtoReflect() protoreflect.Message
- func (x *PolicyItem) Reset()
- func (x *PolicyItem) String() string
- type QueryStatus
- type Read
- type ReadWrite
- func (*ReadWrite) Descriptor() ([]byte, []int)deprecated
- func (x *ReadWrite) GetKey() []byte
- func (x *ReadWrite) GetValue() []byte
- func (x *ReadWrite) GetVersion() uint64
- func (*ReadWrite) ProtoMessage()
- func (x *ReadWrite) ProtoReflect() protoreflect.Message
- func (x *ReadWrite) Reset()
- func (x *ReadWrite) String() string
- type Status
- type StatusWithHeight
- func (*StatusWithHeight) Descriptor() ([]byte, []int)deprecated
- func (x *StatusWithHeight) GetBlockNumber() uint64
- func (x *StatusWithHeight) GetCode() Status
- func (x *StatusWithHeight) GetTxNumber() uint32
- func (*StatusWithHeight) ProtoMessage()
- func (x *StatusWithHeight) ProtoReflect() protoreflect.Message
- func (x *StatusWithHeight) Reset()
- func (x *StatusWithHeight) String() string
- type TransactionsStatus
- func (*TransactionsStatus) Descriptor() ([]byte, []int)deprecated
- func (x *TransactionsStatus) GetStatus() map[string]*StatusWithHeight
- func (*TransactionsStatus) ProtoMessage()
- func (x *TransactionsStatus) ProtoReflect() protoreflect.Message
- func (x *TransactionsStatus) Reset()
- func (x *TransactionsStatus) String() string
- type Tx
- type TxNamespace
- func (*TxNamespace) Descriptor() ([]byte, []int)deprecated
- func (x *TxNamespace) GetBlindWrites() []*Write
- func (x *TxNamespace) GetNsId() string
- func (x *TxNamespace) GetNsVersion() uint64
- func (x *TxNamespace) GetReadWrites() []*ReadWrite
- func (x *TxNamespace) GetReadsOnly() []*Read
- func (*TxNamespace) ProtoMessage()
- func (x *TxNamespace) ProtoReflect() protoreflect.Message
- func (x *TxNamespace) Reset()
- func (x *TxNamespace) String() string
- type Write
Constants ¶
This section is empty.
Variables ¶
var ( Status_name = map[int32]string{ 0: "NOT_VALIDATED", 1: "COMMITTED", 2: "ABORTED_SIGNATURE_INVALID", 3: "ABORTED_MVCC_CONFLICT", 100: "REJECTED_DUPLICATE_TX_ID", 101: "MALFORMED_BAD_ENVELOPE", 102: "MALFORMED_MISSING_TX_ID", 103: "MALFORMED_UNSUPPORTED_ENVELOPE_PAYLOAD", 104: "MALFORMED_BAD_ENVELOPE_PAYLOAD", 105: "MALFORMED_TX_ID_CONFLICT", 106: "MALFORMED_EMPTY_NAMESPACES", 107: "MALFORMED_DUPLICATE_NAMESPACE", 108: "MALFORMED_NAMESPACE_ID_INVALID", 109: "MALFORMED_BLIND_WRITES_NOT_ALLOWED", 110: "MALFORMED_NO_WRITES", 111: "MALFORMED_EMPTY_KEY", 112: "MALFORMED_DUPLICATE_KEY_IN_READ_WRITE_SET", 113: "MALFORMED_MISSING_SIGNATURE", 114: "MALFORMED_NAMESPACE_POLICY_INVALID", 115: "MALFORMED_CONFIG_TX_INVALID", } Status_value = map[string]int32{ "NOT_VALIDATED": 0, "COMMITTED": 1, "ABORTED_SIGNATURE_INVALID": 2, "ABORTED_MVCC_CONFLICT": 3, "REJECTED_DUPLICATE_TX_ID": 100, "MALFORMED_BAD_ENVELOPE": 101, "MALFORMED_MISSING_TX_ID": 102, "MALFORMED_UNSUPPORTED_ENVELOPE_PAYLOAD": 103, "MALFORMED_BAD_ENVELOPE_PAYLOAD": 104, "MALFORMED_TX_ID_CONFLICT": 105, "MALFORMED_EMPTY_NAMESPACES": 106, "MALFORMED_DUPLICATE_NAMESPACE": 107, "MALFORMED_NAMESPACE_ID_INVALID": 108, "MALFORMED_BLIND_WRITES_NOT_ALLOWED": 109, "MALFORMED_NO_WRITES": 110, "MALFORMED_EMPTY_KEY": 111, "MALFORMED_DUPLICATE_KEY_IN_READ_WRITE_SET": 112, "MALFORMED_MISSING_SIGNATURE": 113, "MALFORMED_NAMESPACE_POLICY_INVALID": 114, "MALFORMED_CONFIG_TX_INVALID": 115, } )
Enum value maps for Status.
var File_api_protoblocktx_block_tx_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type BlockInfo ¶
type BlockInfo struct { Number uint64 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"` // contains filtered or unexported fields }
func (*BlockInfo) Descriptor
deprecated
func (*BlockInfo) ProtoMessage ¶
func (*BlockInfo) ProtoMessage()
func (*BlockInfo) ProtoReflect ¶
func (x *BlockInfo) ProtoReflect() protoreflect.Message
type ConfigTransaction ¶
type ConfigTransaction struct { Envelope []byte `protobuf:"bytes,1,opt,name=envelope,proto3" json:"envelope,omitempty"` Version uint64 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` // contains filtered or unexported fields }
func (*ConfigTransaction) Descriptor
deprecated
func (*ConfigTransaction) Descriptor() ([]byte, []int)
Deprecated: Use ConfigTransaction.ProtoReflect.Descriptor instead.
func (*ConfigTransaction) GetEnvelope ¶
func (x *ConfigTransaction) GetEnvelope() []byte
func (*ConfigTransaction) GetVersion ¶
func (x *ConfigTransaction) GetVersion() uint64
func (*ConfigTransaction) ProtoMessage ¶
func (*ConfigTransaction) ProtoMessage()
func (*ConfigTransaction) ProtoReflect ¶
func (x *ConfigTransaction) ProtoReflect() protoreflect.Message
func (*ConfigTransaction) Reset ¶
func (x *ConfigTransaction) Reset()
func (*ConfigTransaction) String ¶
func (x *ConfigTransaction) String() string
type LastCommittedBlock ¶
type LastCommittedBlock struct { Block *BlockInfo `protobuf:"bytes,1,opt,name=block,proto3,oneof" json:"block,omitempty"` // contains filtered or unexported fields }
func (*LastCommittedBlock) Descriptor
deprecated
func (*LastCommittedBlock) Descriptor() ([]byte, []int)
Deprecated: Use LastCommittedBlock.ProtoReflect.Descriptor instead.
func (*LastCommittedBlock) GetBlock ¶
func (x *LastCommittedBlock) GetBlock() *BlockInfo
func (*LastCommittedBlock) ProtoMessage ¶
func (*LastCommittedBlock) ProtoMessage()
func (*LastCommittedBlock) ProtoReflect ¶
func (x *LastCommittedBlock) ProtoReflect() protoreflect.Message
func (*LastCommittedBlock) Reset ¶
func (x *LastCommittedBlock) Reset()
func (*LastCommittedBlock) String ¶
func (x *LastCommittedBlock) String() string
type NamespacePolicies ¶
type NamespacePolicies struct { Policies []*PolicyItem `protobuf:"bytes,1,rep,name=policies,proto3" json:"policies,omitempty"` // contains filtered or unexported fields }
func (*NamespacePolicies) Descriptor
deprecated
func (*NamespacePolicies) Descriptor() ([]byte, []int)
Deprecated: Use NamespacePolicies.ProtoReflect.Descriptor instead.
func (*NamespacePolicies) GetPolicies ¶
func (x *NamespacePolicies) GetPolicies() []*PolicyItem
func (*NamespacePolicies) ProtoMessage ¶
func (*NamespacePolicies) ProtoMessage()
func (*NamespacePolicies) ProtoReflect ¶
func (x *NamespacePolicies) ProtoReflect() protoreflect.Message
func (*NamespacePolicies) Reset ¶
func (x *NamespacePolicies) Reset()
func (*NamespacePolicies) String ¶
func (x *NamespacePolicies) String() string
type NamespacePolicy ¶
type NamespacePolicy struct { Scheme string `protobuf:"bytes,1,opt,name=scheme,proto3" json:"scheme,omitempty"` // The scheme for signature verification. PublicKey []byte `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` // The public key for signature verification. // contains filtered or unexported fields }
Represents a namespace policy.
func (*NamespacePolicy) Descriptor
deprecated
func (*NamespacePolicy) Descriptor() ([]byte, []int)
Deprecated: Use NamespacePolicy.ProtoReflect.Descriptor instead.
func (*NamespacePolicy) GetPublicKey ¶
func (x *NamespacePolicy) GetPublicKey() []byte
func (*NamespacePolicy) GetScheme ¶
func (x *NamespacePolicy) GetScheme() string
func (*NamespacePolicy) ProtoMessage ¶
func (*NamespacePolicy) ProtoMessage()
func (*NamespacePolicy) ProtoReflect ¶
func (x *NamespacePolicy) ProtoReflect() protoreflect.Message
func (*NamespacePolicy) Reset ¶
func (x *NamespacePolicy) Reset()
func (*NamespacePolicy) String ¶
func (x *NamespacePolicy) String() string
type PolicyItem ¶
type PolicyItem struct { Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` Policy []byte `protobuf:"bytes,2,opt,name=policy,proto3" json:"policy,omitempty"` Version uint64 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` // contains filtered or unexported fields }
func (*PolicyItem) Descriptor
deprecated
func (*PolicyItem) Descriptor() ([]byte, []int)
Deprecated: Use PolicyItem.ProtoReflect.Descriptor instead.
func (*PolicyItem) GetNamespace ¶
func (x *PolicyItem) GetNamespace() string
func (*PolicyItem) GetPolicy ¶
func (x *PolicyItem) GetPolicy() []byte
func (*PolicyItem) GetVersion ¶
func (x *PolicyItem) GetVersion() uint64
func (*PolicyItem) ProtoMessage ¶
func (*PolicyItem) ProtoMessage()
func (*PolicyItem) ProtoReflect ¶
func (x *PolicyItem) ProtoReflect() protoreflect.Message
func (*PolicyItem) Reset ¶
func (x *PolicyItem) Reset()
func (*PolicyItem) String ¶
func (x *PolicyItem) String() string
type QueryStatus ¶
type QueryStatus struct { TxIDs []string `protobuf:"bytes,1,rep,name=txIDs,proto3" json:"txIDs,omitempty"` // contains filtered or unexported fields }
func (*QueryStatus) Descriptor
deprecated
func (*QueryStatus) Descriptor() ([]byte, []int)
Deprecated: Use QueryStatus.ProtoReflect.Descriptor instead.
func (*QueryStatus) GetTxIDs ¶
func (x *QueryStatus) GetTxIDs() []string
func (*QueryStatus) ProtoMessage ¶
func (*QueryStatus) ProtoMessage()
func (*QueryStatus) ProtoReflect ¶
func (x *QueryStatus) ProtoReflect() protoreflect.Message
func (*QueryStatus) Reset ¶
func (x *QueryStatus) Reset()
func (*QueryStatus) String ¶
func (x *QueryStatus) String() string
type Read ¶
type Read struct { Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // The key being read. Version *uint64 `protobuf:"varint,2,opt,name=version,proto3,oneof" json:"version,omitempty"` // The version of the key being read. Nil version means it doesn't exist. // contains filtered or unexported fields }
Represents a read operation.
func (*Read) Descriptor
deprecated
func (*Read) GetVersion ¶
func (*Read) ProtoMessage ¶
func (*Read) ProtoMessage()
func (*Read) ProtoReflect ¶
func (x *Read) ProtoReflect() protoreflect.Message
type ReadWrite ¶
type ReadWrite struct { Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // The key involved in the read-write operation. Version *uint64 `protobuf:"varint,2,opt,name=version,proto3,oneof" json:"version,omitempty"` // The version of the key being read and written. Nil version means it doesn't exist. Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` // The value associated with the key being written. // contains filtered or unexported fields }
Represents a read-write operation.
func (*ReadWrite) Descriptor
deprecated
func (*ReadWrite) GetVersion ¶
func (*ReadWrite) ProtoMessage ¶
func (*ReadWrite) ProtoMessage()
func (*ReadWrite) ProtoReflect ¶
func (x *ReadWrite) ProtoReflect() protoreflect.Message
type Status ¶
type Status int32
Status represents the result of transaction validation. Except for NOT_VALIDATED, all statuses are recorded in the ledger. Some statuses are also stored in the state database which prevent resubmission of the same transaction ID.
const ( // Should never be persisted or reported. Status_NOT_VALIDATED Status = 0 // Default. The transaction has not been validated yet. // Stored in the state database. Prevents submitting a transaction with the same ID. Status_COMMITTED Status = 1 // Successfully committed and state updated. Status_ABORTED_SIGNATURE_INVALID Status = 2 // Signature is invalid according to the namespace policy. Status_ABORTED_MVCC_CONFLICT Status = 3 // Read-write set conflict. // Cannot be stored in the state database because the TX ID cannot be extracted, // or the TX ID entry is already occupied. Status_REJECTED_DUPLICATE_TX_ID Status = 100 // Transaction with the same ID has already been processed. Status_MALFORMED_BAD_ENVELOPE Status = 101 // Cannot unmarshal envelope. Status_MALFORMED_MISSING_TX_ID Status = 102 // Envelope is missing transaction ID. // Stored in the state database. Prevents submitting a transaction with the same ID. Status_MALFORMED_UNSUPPORTED_ENVELOPE_PAYLOAD Status = 103 // Unsupported envelope payload type. Status_MALFORMED_BAD_ENVELOPE_PAYLOAD Status = 104 // Cannot unmarshal envelope's payload. Status_MALFORMED_TX_ID_CONFLICT Status = 105 // Envelope's TX ID does not match the payload's TX ID. Status_MALFORMED_EMPTY_NAMESPACES Status = 106 // No namespaces provided. Status_MALFORMED_DUPLICATE_NAMESPACE Status = 107 // Duplicate namespace detected. Status_MALFORMED_NAMESPACE_ID_INVALID Status = 108 // Invalid namespace identifier. Status_MALFORMED_BLIND_WRITES_NOT_ALLOWED Status = 109 // Blind writes are not allowed in a namespace transaction. Status_MALFORMED_NO_WRITES Status = 110 // No write operations in the transaction. Status_MALFORMED_EMPTY_KEY Status = 111 // Unset key detected. Status_MALFORMED_DUPLICATE_KEY_IN_READ_WRITE_SET Status = 112 // Duplicate key in the read-write set. Status_MALFORMED_MISSING_SIGNATURE Status = 113 // Number of signatures does not match the number of namespaces. Status_MALFORMED_NAMESPACE_POLICY_INVALID Status = 114 // Invalid namespace policy. Status_MALFORMED_CONFIG_TX_INVALID Status = 115 // Invalid configuration transaction. )
func (Status) Descriptor ¶
func (Status) Descriptor() protoreflect.EnumDescriptor
func (Status) EnumDescriptor
deprecated
func (Status) Number ¶
func (x Status) Number() protoreflect.EnumNumber
func (Status) Type ¶
func (Status) Type() protoreflect.EnumType
type StatusWithHeight ¶
type StatusWithHeight struct { Code Status `protobuf:"varint,1,opt,name=code,proto3,enum=protoblocktx.Status" json:"code,omitempty"` BlockNumber uint64 `protobuf:"varint,2,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` TxNumber uint32 `protobuf:"varint,3,opt,name=tx_number,json=txNumber,proto3" json:"tx_number,omitempty"` // contains filtered or unexported fields }
func (*StatusWithHeight) Descriptor
deprecated
func (*StatusWithHeight) Descriptor() ([]byte, []int)
Deprecated: Use StatusWithHeight.ProtoReflect.Descriptor instead.
func (*StatusWithHeight) GetBlockNumber ¶
func (x *StatusWithHeight) GetBlockNumber() uint64
func (*StatusWithHeight) GetCode ¶
func (x *StatusWithHeight) GetCode() Status
func (*StatusWithHeight) GetTxNumber ¶
func (x *StatusWithHeight) GetTxNumber() uint32
func (*StatusWithHeight) ProtoMessage ¶
func (*StatusWithHeight) ProtoMessage()
func (*StatusWithHeight) ProtoReflect ¶
func (x *StatusWithHeight) ProtoReflect() protoreflect.Message
func (*StatusWithHeight) Reset ¶
func (x *StatusWithHeight) Reset()
func (*StatusWithHeight) String ¶
func (x *StatusWithHeight) String() string
type TransactionsStatus ¶
type TransactionsStatus struct { Status map[string]*StatusWithHeight `` /* 153-byte string literal not displayed */ // contains filtered or unexported fields }
func (*TransactionsStatus) Descriptor
deprecated
func (*TransactionsStatus) Descriptor() ([]byte, []int)
Deprecated: Use TransactionsStatus.ProtoReflect.Descriptor instead.
func (*TransactionsStatus) GetStatus ¶
func (x *TransactionsStatus) GetStatus() map[string]*StatusWithHeight
func (*TransactionsStatus) ProtoMessage ¶
func (*TransactionsStatus) ProtoMessage()
func (*TransactionsStatus) ProtoReflect ¶
func (x *TransactionsStatus) ProtoReflect() protoreflect.Message
func (*TransactionsStatus) Reset ¶
func (x *TransactionsStatus) Reset()
func (*TransactionsStatus) String ¶
func (x *TransactionsStatus) String() string
type Tx ¶
type Tx struct { Namespaces []*TxNamespace `protobuf:"bytes,1,rep,name=namespaces,proto3" json:"namespaces,omitempty"` // Namespaces associated with the transaction. Signatures [][]byte `protobuf:"bytes,2,rep,name=signatures,proto3" json:"signatures,omitempty"` // Signature per namespace. // contains filtered or unexported fields }
Represents a transaction in the blockchain.
func (*Tx) Descriptor
deprecated
func (*Tx) GetNamespaces ¶
func (x *Tx) GetNamespaces() []*TxNamespace
func (*Tx) GetSignatures ¶
func (*Tx) ProtoMessage ¶
func (*Tx) ProtoMessage()
func (*Tx) ProtoReflect ¶
func (x *Tx) ProtoReflect() protoreflect.Message
type TxNamespace ¶
type TxNamespace struct { NsId string `protobuf:"bytes,1,opt,name=ns_id,json=nsId,proto3" json:"ns_id,omitempty"` // The namespace ID. NsVersion uint64 `protobuf:"varint,2,opt,name=ns_version,json=nsVersion,proto3" json:"ns_version,omitempty"` // The version of the namespace. ReadsOnly []*Read `protobuf:"bytes,3,rep,name=reads_only,json=readsOnly,proto3" json:"reads_only,omitempty"` // List of read only operations within the namespace. ReadWrites []*ReadWrite `protobuf:"bytes,4,rep,name=read_writes,json=readWrites,proto3" json:"read_writes,omitempty"` // List of read-write operations within the namespace. BlindWrites []*Write `protobuf:"bytes,5,rep,name=blind_writes,json=blindWrites,proto3" json:"blind_writes,omitempty"` // List of blind write operations within the namespace. // contains filtered or unexported fields }
Represents a namespace within a transaction.
func (*TxNamespace) Descriptor
deprecated
func (*TxNamespace) Descriptor() ([]byte, []int)
Deprecated: Use TxNamespace.ProtoReflect.Descriptor instead.
func (*TxNamespace) GetBlindWrites ¶
func (x *TxNamespace) GetBlindWrites() []*Write
func (*TxNamespace) GetNsId ¶
func (x *TxNamespace) GetNsId() string
func (*TxNamespace) GetNsVersion ¶
func (x *TxNamespace) GetNsVersion() uint64
func (*TxNamespace) GetReadWrites ¶
func (x *TxNamespace) GetReadWrites() []*ReadWrite
func (*TxNamespace) GetReadsOnly ¶
func (x *TxNamespace) GetReadsOnly() []*Read
func (*TxNamespace) ProtoMessage ¶
func (*TxNamespace) ProtoMessage()
func (*TxNamespace) ProtoReflect ¶
func (x *TxNamespace) ProtoReflect() protoreflect.Message
func (*TxNamespace) Reset ¶
func (x *TxNamespace) Reset()
func (*TxNamespace) String ¶
func (x *TxNamespace) String() string
type Write ¶
type Write struct { Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // The key being written. Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // The value associated with the key being written. // contains filtered or unexported fields }
Represents a write operation.
func (*Write) Descriptor
deprecated
func (*Write) ProtoMessage ¶
func (*Write) ProtoMessage()
func (*Write) ProtoReflect ¶
func (x *Write) ProtoReflect() protoreflect.Message