coredocumentpb

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2022 License: MIT Imports: 7 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Action_name = map[int32]string{
		0: "ACTION_INVALID",
		1: "ACTION_READ_SIGN",
		2: "ACTION_READ",
	}
	Action_value = map[string]int32{
		"ACTION_INVALID":   0,
		"ACTION_READ_SIGN": 1,
		"ACTION_READ":      2,
	}
)

Enum value maps for Action.

View Source
var (
	FieldMatchType_name = map[int32]string{
		0: "FIELD_MATCH_TYPE_INVALID",
		1: "FIELD_MATCH_TYPE_PREFIX",
		2: "FIELD_MATCH_TYPE_EXACT",
	}
	FieldMatchType_value = map[string]int32{
		"FIELD_MATCH_TYPE_INVALID": 0,
		"FIELD_MATCH_TYPE_PREFIX":  1,
		"FIELD_MATCH_TYPE_EXACT":   2,
	}
)

Enum value maps for FieldMatchType.

View Source
var (
	TransitionAction_name = map[int32]string{
		0: "TRANSITION_ACTION_INVALID",
		1: "TRANSITION_ACTION_EDIT",
		2: "TRANSITION_ACTION_COMPUTE",
	}
	TransitionAction_value = map[string]int32{
		"TRANSITION_ACTION_INVALID": 0,
		"TRANSITION_ACTION_EDIT":    1,
		"TRANSITION_ACTION_COMPUTE": 2,
	}
)

Enum value maps for TransitionAction.

View Source
var (
	AttributeType_name = map[int32]string{
		0: "ATTRIBUTE_TYPE_INVALID",
		1: "ATTRIBUTE_TYPE_INTEGER",
		2: "ATTRIBUTE_TYPE_DECIMAL",
		3: "ATTRIBUTE_TYPE_STRING",
		4: "ATTRIBUTE_TYPE_BYTES",
		5: "ATTRIBUTE_TYPE_TIMESTAMP",
		6: "ATTRIBUTE_TYPE_SIGNED",
		7: "ATTRIBUTE_TYPE_MONETARY",
	}
	AttributeType_value = map[string]int32{
		"ATTRIBUTE_TYPE_INVALID":   0,
		"ATTRIBUTE_TYPE_INTEGER":   1,
		"ATTRIBUTE_TYPE_DECIMAL":   2,
		"ATTRIBUTE_TYPE_STRING":    3,
		"ATTRIBUTE_TYPE_BYTES":     4,
		"ATTRIBUTE_TYPE_TIMESTAMP": 5,
		"ATTRIBUTE_TYPE_SIGNED":    6,
		"ATTRIBUTE_TYPE_MONETARY":  7,
	}
)

Enum value maps for AttributeType.

View Source
var File_coredocument_coredocument_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type AccessToken

type AccessToken struct {

	// The identifier is an internal 256bit word
	Identifier []byte `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"`
	// The identity granting access to the document
	Granter []byte `protobuf:"bytes,3,opt,name=granter,proto3" json:"granter,omitempty"`
	// The identity being granted access to the document
	Grantee []byte `protobuf:"bytes,4,opt,name=grantee,proto3" json:"grantee,omitempty"`
	// Role identifier is the identifier on the read rule that this token should be mapped to
	RoleIdentifier []byte `protobuf:"bytes,5,opt,name=role_identifier,json=roleIdentifier,proto3" json:"role_identifier,omitempty"`
	// Original identifier of the document
	DocumentIdentifier []byte `protobuf:"bytes,2,opt,name=document_identifier,json=documentIdentifier,proto3" json:"document_identifier,omitempty"`
	// Cryptographic signature that an access token is valid
	Signature []byte `protobuf:"bytes,6,opt,name=signature,proto3" json:"signature,omitempty"`
	// The public key of the signed message
	Key []byte `protobuf:"bytes,7,opt,name=key,proto3" json:"key,omitempty"`
	// The document version refers to a version of the document this token is embedded in. Its timestamp
	// will be used to verify the validity of the signature of the access token.
	DocumentVersion []byte `protobuf:"bytes,8,opt,name=document_version,json=documentVersion,proto3" json:"document_version,omitempty"`
	// contains filtered or unexported fields
}

func (*AccessToken) Descriptor deprecated

func (*AccessToken) Descriptor() ([]byte, []int)

Deprecated: Use AccessToken.ProtoReflect.Descriptor instead.

func (*AccessToken) GetDocumentIdentifier

func (x *AccessToken) GetDocumentIdentifier() []byte

func (*AccessToken) GetDocumentVersion

func (x *AccessToken) GetDocumentVersion() []byte

func (*AccessToken) GetGrantee

func (x *AccessToken) GetGrantee() []byte

func (*AccessToken) GetGranter

func (x *AccessToken) GetGranter() []byte

func (*AccessToken) GetIdentifier

func (x *AccessToken) GetIdentifier() []byte

func (*AccessToken) GetKey

func (x *AccessToken) GetKey() []byte

func (*AccessToken) GetRoleIdentifier

func (x *AccessToken) GetRoleIdentifier() []byte

func (*AccessToken) GetSignature

func (x *AccessToken) GetSignature() []byte

func (*AccessToken) ProtoMessage

func (*AccessToken) ProtoMessage()

func (*AccessToken) ProtoReflect added in v1.0.0

func (x *AccessToken) ProtoReflect() protoreflect.Message

func (*AccessToken) Reset

func (x *AccessToken) Reset()

func (*AccessToken) String

func (x *AccessToken) String() string

type Action

type Action int32

Action defines the set of actions a collaborator can/have per document.

const (
	Action_ACTION_INVALID Action = 0
	// read_sign represents reading as well the sign the documents. We will pick this one when requesting the signatures.
	Action_ACTION_READ_SIGN Action = 1
	// read represents just reading the doc/fields
	Action_ACTION_READ Action = 2
)

func (Action) Descriptor added in v1.0.0

func (Action) Descriptor() protoreflect.EnumDescriptor

func (Action) Enum added in v1.0.0

func (x Action) Enum() *Action

func (Action) EnumDescriptor deprecated

func (Action) EnumDescriptor() ([]byte, []int)

Deprecated: Use Action.Descriptor instead.

func (Action) Number added in v1.0.0

func (x Action) Number() protoreflect.EnumNumber

func (Action) String

func (x Action) String() string

func (Action) Type added in v1.0.0

func (Action) Type() protoreflect.EnumType

type Attribute

type Attribute struct {
	Key      []byte        `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	KeyLabel []byte        `protobuf:"bytes,2,opt,name=key_label,json=keyLabel,proto3" json:"key_label,omitempty"`
	Type     AttributeType `protobuf:"varint,3,opt,name=type,proto3,enum=coredocument.AttributeType" json:"type,omitempty"`
	// Types that are assignable to Value:
	//	*Attribute_StrVal
	//	*Attribute_ByteVal
	//	*Attribute_TimeVal
	//	*Attribute_SignedVal
	//	*Attribute_MonetaryVal
	Value isAttribute_Value `protobuf_oneof:"value"`
	// contains filtered or unexported fields
}

Attribute represents a custom attribute

func (*Attribute) Descriptor deprecated

func (*Attribute) Descriptor() ([]byte, []int)

Deprecated: Use Attribute.ProtoReflect.Descriptor instead.

func (*Attribute) GetByteVal

func (x *Attribute) GetByteVal() []byte

func (*Attribute) GetKey

func (x *Attribute) GetKey() []byte

func (*Attribute) GetKeyLabel

func (x *Attribute) GetKeyLabel() []byte

func (*Attribute) GetMonetaryVal

func (x *Attribute) GetMonetaryVal() *Monetary

func (*Attribute) GetSignedVal

func (x *Attribute) GetSignedVal() *Signed

func (*Attribute) GetStrVal

func (x *Attribute) GetStrVal() string

func (*Attribute) GetTimeVal

func (x *Attribute) GetTimeVal() *timestamppb.Timestamp

func (*Attribute) GetType

func (x *Attribute) GetType() AttributeType

func (*Attribute) GetValue

func (m *Attribute) GetValue() isAttribute_Value

func (*Attribute) ProtoMessage

func (*Attribute) ProtoMessage()

func (*Attribute) ProtoReflect added in v1.0.0

func (x *Attribute) ProtoReflect() protoreflect.Message

func (*Attribute) Reset

func (x *Attribute) Reset()

func (*Attribute) String

func (x *Attribute) String() string

type AttributeType

type AttributeType int32

AttributeType defines the allowed attribute types.

const (
	AttributeType_ATTRIBUTE_TYPE_INVALID   AttributeType = 0
	AttributeType_ATTRIBUTE_TYPE_INTEGER   AttributeType = 1
	AttributeType_ATTRIBUTE_TYPE_DECIMAL   AttributeType = 2
	AttributeType_ATTRIBUTE_TYPE_STRING    AttributeType = 3
	AttributeType_ATTRIBUTE_TYPE_BYTES     AttributeType = 4
	AttributeType_ATTRIBUTE_TYPE_TIMESTAMP AttributeType = 5
	AttributeType_ATTRIBUTE_TYPE_SIGNED    AttributeType = 6
	AttributeType_ATTRIBUTE_TYPE_MONETARY  AttributeType = 7
)

func (AttributeType) Descriptor added in v1.0.0

func (AttributeType) Enum added in v1.0.0

func (x AttributeType) Enum() *AttributeType

func (AttributeType) EnumDescriptor deprecated

func (AttributeType) EnumDescriptor() ([]byte, []int)

Deprecated: Use AttributeType.Descriptor instead.

func (AttributeType) Number added in v1.0.0

func (AttributeType) String

func (x AttributeType) String() string

func (AttributeType) Type added in v1.0.0

type Attribute_ByteVal

type Attribute_ByteVal struct {
	ByteVal []byte `protobuf:"bytes,5,opt,name=byte_val,json=byteVal,proto3,oneof"`
}

type Attribute_MonetaryVal

type Attribute_MonetaryVal struct {
	MonetaryVal *Monetary `protobuf:"bytes,8,opt,name=monetary_val,json=monetaryVal,proto3,oneof"`
}

type Attribute_SignedVal

type Attribute_SignedVal struct {
	SignedVal *Signed `protobuf:"bytes,7,opt,name=signed_val,json=signedVal,proto3,oneof"`
}

type Attribute_StrVal

type Attribute_StrVal struct {
	StrVal string `protobuf:"bytes,4,opt,name=str_val,json=strVal,proto3,oneof"`
}

type Attribute_TimeVal

type Attribute_TimeVal struct {
	TimeVal *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=time_val,json=timeVal,proto3,oneof"`
}

type CoreDocument

type CoreDocument struct {

	// # Identifiers
	// CoreDocument has two kinds of identifiers, the `document_identifier` is assigned
	// once per document and stays the same for the lifetime of the document.
	// document_identifier is the first ID ever used to anchor the document on chain and
	// is used internally to store all future versions. The `previous_version`, `current_version`, and the
	// `next_version` refer only to a particular version.
	//
	// 32 byte value
	DocumentIdentifier []byte `protobuf:"bytes,9,opt,name=document_identifier,json=documentIdentifier,proto3" json:"document_identifier,omitempty"`
	// previous_version refers to the previous state of the document.
	// 32 byte value
	PreviousVersion []byte `protobuf:"bytes,16,opt,name=previous_version,json=previousVersion,proto3" json:"previous_version,omitempty"`
	// current_version is the version used to refer to the current state of the document.
	// 32 byte value
	CurrentVersion []byte `protobuf:"bytes,3,opt,name=current_version,json=currentVersion,proto3" json:"current_version,omitempty"`
	// current_preimage is the sha256 pre-image of the current_version. It prevents current state commitment id(anchor id) from getting exposed.
	// 32 byte value
	CurrentPreimage []byte `protobuf:"bytes,23,opt,name=current_preimage,json=currentPreimage,proto3" json:"current_preimage,omitempty"`
	// next_version is the version that is going to be used for the next version if any
	// party wants to update the state.
	NextVersion []byte `protobuf:"bytes,4,opt,name=next_version,json=nextVersion,proto3" json:"next_version,omitempty"`
	// next_preimage is the sha256 pre-image of the next_version. It prevents next state commitment id(anchor id) from getting exposed.
	NextPreimage []byte `protobuf:"bytes,22,opt,name=next_preimage,json=nextPreimage,proto3" json:"next_preimage,omitempty"`
	// Signatures of the signature_root by collaborators on the document.
	SignatureData *SignatureData `protobuf:"bytes,6,opt,name=signature_data,json=signatureData,proto3" json:"signature_data,omitempty"`
	// When a document is transmitted over the wire, the type specific fields (e.g. InvoiceData) are
	// embedded in the document using the google.protobuf.Any type.
	EmbeddedData *anypb.Any    `protobuf:"bytes,13,opt,name=embedded_data,json=embeddedData,proto3" json:"embedded_data,omitempty"`
	Salts        []*proto.Salt `protobuf:"bytes,15,rep,name=salts,proto3" json:"salts,omitempty"`
	// list of roles
	Roles []*Role `protobuf:"bytes,1,rep,name=roles,proto3" json:"roles,omitempty"`
	// read_rules define who may read a document and who should sign it
	ReadRules []*ReadRule `protobuf:"bytes,19,rep,name=read_rules,json=readRules,proto3" json:"read_rules,omitempty"`
	// transition rules define how a document may be manipulated
	TransitionRules []*TransitionRule `protobuf:"bytes,24,rep,name=transition_rules,json=transitionRules,proto3" json:"transition_rules,omitempty"`
	// nft list for uniqueness check
	Nfts []*NFT `protobuf:"bytes,20,rep,name=nfts,proto3" json:"nfts,omitempty"`
	// AccessTokens which have been added to this CoreDocument
	AccessTokens []*AccessToken `protobuf:"bytes,21,rep,name=access_tokens,json=accessTokens,proto3" json:"access_tokens,omitempty"`
	// author of the latest update
	Author []byte `protobuf:"bytes,25,opt,name=author,proto3" json:"author,omitempty"`
	// timestamp of the latest update
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,26,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// anchor repository address used to anchor this document
	AnchorRepositoryUsed []byte `protobuf:"bytes,27,opt,name=anchor_repository_used,json=anchorRepositoryUsed,proto3" json:"anchor_repository_used,omitempty"`
	// custom attributes(user defined fields) for this document
	Attributes []*Attribute `protobuf:"bytes,28,rep,name=attributes,proto3" json:"attributes,omitempty"`
	// contains filtered or unexported fields
}

`CoreDocument` is a document that can be sent to different nodes and anchored on chain. It handles all the generic features native Centrifuge Documents support:

* Merkle Roots for the document data * Signatures on document data * Access Control

func (*CoreDocument) Descriptor deprecated

func (*CoreDocument) Descriptor() ([]byte, []int)

Deprecated: Use CoreDocument.ProtoReflect.Descriptor instead.

func (*CoreDocument) GetAccessTokens

func (x *CoreDocument) GetAccessTokens() []*AccessToken

func (*CoreDocument) GetAnchorRepositoryUsed

func (x *CoreDocument) GetAnchorRepositoryUsed() []byte

func (*CoreDocument) GetAttributes

func (x *CoreDocument) GetAttributes() []*Attribute

func (*CoreDocument) GetAuthor

func (x *CoreDocument) GetAuthor() []byte

func (*CoreDocument) GetCurrentPreimage

func (x *CoreDocument) GetCurrentPreimage() []byte

func (*CoreDocument) GetCurrentVersion

func (x *CoreDocument) GetCurrentVersion() []byte

func (*CoreDocument) GetDocumentIdentifier

func (x *CoreDocument) GetDocumentIdentifier() []byte

func (*CoreDocument) GetEmbeddedData

func (x *CoreDocument) GetEmbeddedData() *anypb.Any

func (*CoreDocument) GetNextPreimage

func (x *CoreDocument) GetNextPreimage() []byte

func (*CoreDocument) GetNextVersion

func (x *CoreDocument) GetNextVersion() []byte

func (*CoreDocument) GetNfts

func (x *CoreDocument) GetNfts() []*NFT

func (*CoreDocument) GetPreviousVersion

func (x *CoreDocument) GetPreviousVersion() []byte

func (*CoreDocument) GetReadRules

func (x *CoreDocument) GetReadRules() []*ReadRule

func (*CoreDocument) GetRoles

func (x *CoreDocument) GetRoles() []*Role

func (*CoreDocument) GetSalts

func (x *CoreDocument) GetSalts() []*proto.Salt

func (*CoreDocument) GetSignatureData

func (x *CoreDocument) GetSignatureData() *SignatureData

func (*CoreDocument) GetTimestamp

func (x *CoreDocument) GetTimestamp() *timestamppb.Timestamp

func (*CoreDocument) GetTransitionRules

func (x *CoreDocument) GetTransitionRules() []*TransitionRule

func (*CoreDocument) ProtoMessage

func (*CoreDocument) ProtoMessage()

func (*CoreDocument) ProtoReflect added in v1.0.0

func (x *CoreDocument) ProtoReflect() protoreflect.Message

func (*CoreDocument) Reset

func (x *CoreDocument) Reset()

func (*CoreDocument) String

func (x *CoreDocument) String() string

type FieldMatchType

type FieldMatchType int32
const (
	FieldMatchType_FIELD_MATCH_TYPE_INVALID FieldMatchType = 0
	FieldMatchType_FIELD_MATCH_TYPE_PREFIX  FieldMatchType = 1
	FieldMatchType_FIELD_MATCH_TYPE_EXACT   FieldMatchType = 2
)

func (FieldMatchType) Descriptor added in v1.0.0

func (FieldMatchType) Enum added in v1.0.0

func (x FieldMatchType) Enum() *FieldMatchType

func (FieldMatchType) EnumDescriptor deprecated

func (FieldMatchType) EnumDescriptor() ([]byte, []int)

Deprecated: Use FieldMatchType.Descriptor instead.

func (FieldMatchType) Number added in v1.0.0

func (FieldMatchType) String

func (x FieldMatchType) String() string

func (FieldMatchType) Type added in v1.0.0

type Monetary

type Monetary struct {
	Type  []byte `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`   // fixed 1 byte
	Chain []byte `protobuf:"bytes,2,opt,name=chain,proto3" json:"chain,omitempty"` // fixed 4 bytes
	Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` // fixed 32 bytes
	Id    []byte `protobuf:"bytes,4,opt,name=id,proto3" json:"id,omitempty"`       // fixed 32 bytes
	// contains filtered or unexported fields
}

Monetary holds decimal value, id, type and chain context

func (*Monetary) Descriptor deprecated

func (*Monetary) Descriptor() ([]byte, []int)

Deprecated: Use Monetary.ProtoReflect.Descriptor instead.

func (*Monetary) GetChain

func (x *Monetary) GetChain() []byte

func (*Monetary) GetId

func (x *Monetary) GetId() []byte

func (*Monetary) GetType

func (x *Monetary) GetType() []byte

func (*Monetary) GetValue

func (x *Monetary) GetValue() []byte

func (*Monetary) ProtoMessage

func (*Monetary) ProtoMessage()

func (*Monetary) ProtoReflect added in v1.0.0

func (x *Monetary) ProtoReflect() protoreflect.Message

func (*Monetary) Reset

func (x *Monetary) Reset()

func (*Monetary) String

func (x *Monetary) String() string

type NFT

type NFT struct {
	CollectionId []byte `protobuf:"bytes,1,opt,name=collection_id,json=collectionId,proto3" json:"collection_id,omitempty"`
	ItemId       []byte `protobuf:"bytes,2,opt,name=item_id,json=itemId,proto3" json:"item_id,omitempty"`
	// contains filtered or unexported fields
}

func (*NFT) Descriptor deprecated

func (*NFT) Descriptor() ([]byte, []int)

Deprecated: Use NFT.ProtoReflect.Descriptor instead.

func (*NFT) GetCollectionId added in v1.0.0

func (x *NFT) GetCollectionId() []byte

func (*NFT) GetItemId added in v1.0.0

func (x *NFT) GetItemId() []byte

func (*NFT) ProtoMessage

func (*NFT) ProtoMessage()

func (*NFT) ProtoReflect added in v1.0.0

func (x *NFT) ProtoReflect() protoreflect.Message

func (*NFT) Reset

func (x *NFT) Reset()

func (*NFT) String

func (x *NFT) String() string

type ReadRule

type ReadRule struct {
	Roles  [][]byte `protobuf:"bytes,2,rep,name=roles,proto3" json:"roles,omitempty"`
	Action Action   `protobuf:"varint,4,opt,name=action,proto3,enum=coredocument.Action" json:"action,omitempty"`
	// contains filtered or unexported fields
}

func (*ReadRule) Descriptor deprecated

func (*ReadRule) Descriptor() ([]byte, []int)

Deprecated: Use ReadRule.ProtoReflect.Descriptor instead.

func (*ReadRule) GetAction

func (x *ReadRule) GetAction() Action

func (*ReadRule) GetRoles

func (x *ReadRule) GetRoles() [][]byte

func (*ReadRule) ProtoMessage

func (*ReadRule) ProtoMessage()

func (*ReadRule) ProtoReflect added in v1.0.0

func (x *ReadRule) ProtoReflect() protoreflect.Message

func (*ReadRule) Reset

func (x *ReadRule) Reset()

func (*ReadRule) String

func (x *ReadRule) String() string

type Role

type Role struct {

	// role key which is used to identify the group internally and map the role to rules
	RoleKey []byte `protobuf:"bytes,1,opt,name=role_key,json=roleKey,proto3" json:"role_key,omitempty"`
	// collaborators holds the list of document collaborators
	Collaborators [][]byte `protobuf:"bytes,3,rep,name=collaborators,proto3" json:"collaborators,omitempty"`
	// nfts is a list of collection and item ID pairs.
	// For easier verification in merkle proofs, the values are simply concatenated with the first 8 bytes
	// being the NFT encoded collection ID and the remaining 16 bytes the encoded item ID.
	Nfts [][]byte `protobuf:"bytes,4,rep,name=nfts,proto3" json:"nfts,omitempty"`
	// contains filtered or unexported fields
}

Roles holds a list of collaborators, NFTs, and/or access tokens.

func (*Role) Descriptor deprecated

func (*Role) Descriptor() ([]byte, []int)

Deprecated: Use Role.ProtoReflect.Descriptor instead.

func (*Role) GetCollaborators

func (x *Role) GetCollaborators() [][]byte

func (*Role) GetNfts

func (x *Role) GetNfts() [][]byte

func (*Role) GetRoleKey

func (x *Role) GetRoleKey() []byte

func (*Role) ProtoMessage

func (*Role) ProtoMessage()

func (*Role) ProtoReflect added in v1.0.0

func (x *Role) ProtoReflect() protoreflect.Message

func (*Role) Reset

func (x *Role) Reset()

func (*Role) String

func (x *Role) String() string

type Signature

type Signature struct {

	// `signature_id` is a composed key signer_id+public_key (20+32) used
	SignatureId []byte `protobuf:"bytes,1,opt,name=signature_id,json=signatureId,proto3" json:"signature_id,omitempty"`
	// `signer_id` is the CentrifugeID of the identity signing the document.
	SignerId []byte `protobuf:"bytes,2,opt,name=signer_id,json=signerId,proto3" json:"signer_id,omitempty"`
	// `public_key` is the public key of the `signer` used for signing the `CoreDocument`
	PublicKey []byte `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	// `signature` is the actual signature of the CoreDocument
	Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"`
	// `transition_validated` defines if node was able to validate transition rules from document version A -> B
	TransitionValidated bool `protobuf:"varint,5,opt,name=transition_validated,json=transitionValidated,proto3" json:"transition_validated,omitempty"`
	// contains filtered or unexported fields
}

Signature contains the entity ID, public key used and signature)

func (*Signature) Descriptor deprecated

func (*Signature) Descriptor() ([]byte, []int)

Deprecated: Use Signature.ProtoReflect.Descriptor instead.

func (*Signature) GetPublicKey

func (x *Signature) GetPublicKey() []byte

func (*Signature) GetSignature

func (x *Signature) GetSignature() []byte

func (*Signature) GetSignatureId

func (x *Signature) GetSignatureId() []byte

func (*Signature) GetSignerId

func (x *Signature) GetSignerId() []byte

func (*Signature) GetTransitionValidated

func (x *Signature) GetTransitionValidated() bool

func (*Signature) ProtoMessage

func (*Signature) ProtoMessage()

func (*Signature) ProtoReflect added in v1.0.0

func (x *Signature) ProtoReflect() protoreflect.Message

func (*Signature) Reset

func (x *Signature) Reset()

func (*Signature) String

func (x *Signature) String() string

type SignatureData

type SignatureData struct {
	Signatures []*Signature `protobuf:"bytes,1,rep,name=signatures,proto3" json:"signatures,omitempty"`
	// contains filtered or unexported fields
}

SignatureData contains the list of signatures identified by the signature_id

func (*SignatureData) Descriptor deprecated

func (*SignatureData) Descriptor() ([]byte, []int)

Deprecated: Use SignatureData.ProtoReflect.Descriptor instead.

func (*SignatureData) GetSignatures

func (x *SignatureData) GetSignatures() []*Signature

func (*SignatureData) ProtoMessage

func (*SignatureData) ProtoMessage()

func (*SignatureData) ProtoReflect added in v1.0.0

func (x *SignatureData) ProtoReflect() protoreflect.Message

func (*SignatureData) Reset

func (x *SignatureData) Reset()

func (*SignatureData) String

func (x *SignatureData) String() string

type Signed

type Signed struct {
	DocVersion []byte        `protobuf:"bytes,1,opt,name=doc_version,json=docVersion,proto3" json:"doc_version,omitempty"`
	Type       AttributeType `protobuf:"varint,6,opt,name=type,proto3,enum=coredocument.AttributeType" json:"type,omitempty"`
	Value      []byte        `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	Identity   []byte        `protobuf:"bytes,3,opt,name=identity,proto3" json:"identity,omitempty"`
	// signature = sign(identity + doc_id(taken from the document.document_identifier) + doc_version + value)
	Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"`
	PublicKey []byte `protobuf:"bytes,5,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	// contains filtered or unexported fields
}

Signed holds the custom attribute signature type

func (*Signed) Descriptor deprecated

func (*Signed) Descriptor() ([]byte, []int)

Deprecated: Use Signed.ProtoReflect.Descriptor instead.

func (*Signed) GetDocVersion

func (x *Signed) GetDocVersion() []byte

func (*Signed) GetIdentity

func (x *Signed) GetIdentity() []byte

func (*Signed) GetPublicKey

func (x *Signed) GetPublicKey() []byte

func (*Signed) GetSignature

func (x *Signed) GetSignature() []byte

func (*Signed) GetType

func (x *Signed) GetType() AttributeType

func (*Signed) GetValue

func (x *Signed) GetValue() []byte

func (*Signed) ProtoMessage

func (*Signed) ProtoMessage()

func (*Signed) ProtoReflect added in v1.0.0

func (x *Signed) ProtoReflect() protoreflect.Message

func (*Signed) Reset

func (x *Signed) Reset()

func (*Signed) String

func (x *Signed) String() string

type TransitionAction

type TransitionAction int32
const (
	TransitionAction_TRANSITION_ACTION_INVALID TransitionAction = 0
	TransitionAction_TRANSITION_ACTION_EDIT    TransitionAction = 1
	TransitionAction_TRANSITION_ACTION_COMPUTE TransitionAction = 2
)

func (TransitionAction) Descriptor added in v1.0.0

func (TransitionAction) Enum added in v1.0.0

func (TransitionAction) EnumDescriptor deprecated

func (TransitionAction) EnumDescriptor() ([]byte, []int)

Deprecated: Use TransitionAction.Descriptor instead.

func (TransitionAction) Number added in v1.0.0

func (TransitionAction) String

func (x TransitionAction) String() string

func (TransitionAction) Type added in v1.0.0

type TransitionRule

type TransitionRule struct {

	// rule key, to help track of the rule
	RuleKey []byte `protobuf:"bytes,1,opt,name=rule_key,json=ruleKey,proto3" json:"rule_key,omitempty"`
	// Indicates which roles can make changes or read the fields specified:
	// this list holds role keys correlated to those in the 'roles' field of the CoreDocument
	Roles [][]byte `protobuf:"bytes,2,rep,name=roles,proto3" json:"roles,omitempty"`
	// prefix or exact
	MatchType FieldMatchType `protobuf:"varint,3,opt,name=match_type,json=matchType,proto3,enum=coredocument.FieldMatchType" json:"match_type,omitempty"`
	// compact property of the field
	Field []byte `protobuf:"bytes,4,opt,name=field,proto3" json:"field,omitempty"`
	// what kind of action this rule allows
	Action TransitionAction `protobuf:"varint,5,opt,name=action,proto3,enum=coredocument.TransitionAction" json:"action,omitempty"`
	// compute_fields holds the list of attribute fields that will be passed to WASM
	ComputeFields [][]byte `protobuf:"bytes,6,rep,name=compute_fields,json=computeFields,proto3" json:"compute_fields,omitempty"`
	// compute_target_field is the attribute label that will hold the result of the WASM execution
	ComputeTargetField []byte `protobuf:"bytes,7,opt,name=compute_target_field,json=computeTargetField,proto3" json:"compute_target_field,omitempty"`
	// compute_code is the WASM binary that will be executed
	ComputeCode []byte `protobuf:"bytes,8,opt,name=compute_code,json=computeCode,proto3" json:"compute_code,omitempty"`
	// contains filtered or unexported fields
}

func (*TransitionRule) Descriptor deprecated

func (*TransitionRule) Descriptor() ([]byte, []int)

Deprecated: Use TransitionRule.ProtoReflect.Descriptor instead.

func (*TransitionRule) GetAction

func (x *TransitionRule) GetAction() TransitionAction

func (*TransitionRule) GetComputeCode

func (x *TransitionRule) GetComputeCode() []byte

func (*TransitionRule) GetComputeFields

func (x *TransitionRule) GetComputeFields() [][]byte

func (*TransitionRule) GetComputeTargetField

func (x *TransitionRule) GetComputeTargetField() []byte

func (*TransitionRule) GetField

func (x *TransitionRule) GetField() []byte

func (*TransitionRule) GetMatchType

func (x *TransitionRule) GetMatchType() FieldMatchType

func (*TransitionRule) GetRoles

func (x *TransitionRule) GetRoles() [][]byte

func (*TransitionRule) GetRuleKey

func (x *TransitionRule) GetRuleKey() []byte

func (*TransitionRule) ProtoMessage

func (*TransitionRule) ProtoMessage()

func (*TransitionRule) ProtoReflect added in v1.0.0

func (x *TransitionRule) ProtoReflect() protoreflect.Message

func (*TransitionRule) Reset

func (x *TransitionRule) Reset()

func (*TransitionRule) String

func (x *TransitionRule) String() string

type TransitionRulesFingerprint

type TransitionRulesFingerprint struct {

	// list of roles
	Roles []*Role `protobuf:"bytes,1,rep,name=roles,proto3" json:"roles,omitempty"`
	// transition rules define how a document may be manipulated
	TransitionRules []*TransitionRule `protobuf:"bytes,3,rep,name=transition_rules,json=transitionRules,proto3" json:"transition_rules,omitempty"`
	// contains filtered or unexported fields
}

TransitionRulesFingerprint is used to create the 'fingerprint' hash for verifying if the Transition Rules and Roles of a CoreDocument have changed

func (*TransitionRulesFingerprint) Descriptor deprecated

func (*TransitionRulesFingerprint) Descriptor() ([]byte, []int)

Deprecated: Use TransitionRulesFingerprint.ProtoReflect.Descriptor instead.

func (*TransitionRulesFingerprint) GetRoles

func (x *TransitionRulesFingerprint) GetRoles() []*Role

func (*TransitionRulesFingerprint) GetTransitionRules

func (x *TransitionRulesFingerprint) GetTransitionRules() []*TransitionRule

func (*TransitionRulesFingerprint) ProtoMessage

func (*TransitionRulesFingerprint) ProtoMessage()

func (*TransitionRulesFingerprint) ProtoReflect added in v1.0.0

func (*TransitionRulesFingerprint) Reset

func (x *TransitionRulesFingerprint) Reset()

func (*TransitionRulesFingerprint) String

func (x *TransitionRulesFingerprint) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL