coredocumentpb

package
v0.0.0-...-1282859 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2021 License: MIT Imports: 6 Imported by: 0

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",
}
View Source
var Action_value = map[string]int32{
	"ACTION_INVALID":   0,
	"ACTION_READ_SIGN": 1,
	"ACTION_READ":      2,
}
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",
}
View Source
var 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,
}
View Source
var FieldMatchType_name = map[int32]string{
	0: "FIELD_MATCH_TYPE_INVALID",
	1: "FIELD_MATCH_TYPE_PREFIX",
	2: "FIELD_MATCH_TYPE_EXACT",
}
View Source
var FieldMatchType_value = map[string]int32{
	"FIELD_MATCH_TYPE_INVALID": 0,
	"FIELD_MATCH_TYPE_PREFIX":  1,
	"FIELD_MATCH_TYPE_EXACT":   2,
}
View Source
var TransitionAction_name = map[int32]string{
	0: "TRANSITION_ACTION_INVALID",
	1: "TRANSITION_ACTION_EDIT",
	2: "TRANSITION_ACTION_COMPUTE",
}
View Source
var TransitionAction_value = map[string]int32{
	"TRANSITION_ACTION_INVALID": 0,
	"TRANSITION_ACTION_EDIT":    1,
	"TRANSITION_ACTION_COMPUTE": 2,
}

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*AccessToken) Descriptor

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

func (*AccessToken) GetDocumentIdentifier

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

func (*AccessToken) GetDocumentVersion

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

func (*AccessToken) GetGrantee

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

func (*AccessToken) GetGranter

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

func (*AccessToken) GetIdentifier

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

func (*AccessToken) GetKey

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

func (*AccessToken) GetRoleIdentifier

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

func (*AccessToken) GetSignature

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

func (*AccessToken) ProtoMessage

func (*AccessToken) ProtoMessage()

func (*AccessToken) Reset

func (m *AccessToken) Reset()

func (*AccessToken) String

func (m *AccessToken) String() string

func (*AccessToken) XXX_DiscardUnknown

func (m *AccessToken) XXX_DiscardUnknown()

func (*AccessToken) XXX_Marshal

func (m *AccessToken) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AccessToken) XXX_Merge

func (m *AccessToken) XXX_Merge(src proto.Message)

func (*AccessToken) XXX_Size

func (m *AccessToken) XXX_Size() int

func (*AccessToken) XXX_Unmarshal

func (m *AccessToken) XXX_Unmarshal(b []byte) error

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) EnumDescriptor

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

func (Action) String

func (x Action) String() string

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 valid to be assigned to Value:
	//	*Attribute_StrVal
	//	*Attribute_ByteVal
	//	*Attribute_TimeVal
	//	*Attribute_SignedVal
	//	*Attribute_MonetaryVal
	Value                isAttribute_Value `protobuf_oneof:"value"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

Attribute represents a custom attribute

func (*Attribute) Descriptor

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

func (*Attribute) GetByteVal

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

func (*Attribute) GetKey

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

func (*Attribute) GetKeyLabel

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

func (*Attribute) GetMonetaryVal

func (m *Attribute) GetMonetaryVal() *Monetary

func (*Attribute) GetSignedVal

func (m *Attribute) GetSignedVal() *Signed

func (*Attribute) GetStrVal

func (m *Attribute) GetStrVal() string

func (*Attribute) GetTimeVal

func (m *Attribute) GetTimeVal() *timestamp.Timestamp

func (*Attribute) GetType

func (m *Attribute) GetType() AttributeType

func (*Attribute) GetValue

func (m *Attribute) GetValue() isAttribute_Value

func (*Attribute) ProtoMessage

func (*Attribute) ProtoMessage()

func (*Attribute) Reset

func (m *Attribute) Reset()

func (*Attribute) String

func (m *Attribute) String() string

func (*Attribute) XXX_DiscardUnknown

func (m *Attribute) XXX_DiscardUnknown()

func (*Attribute) XXX_Marshal

func (m *Attribute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Attribute) XXX_Merge

func (m *Attribute) XXX_Merge(src proto.Message)

func (*Attribute) XXX_OneofWrappers

func (*Attribute) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*Attribute) XXX_Size

func (m *Attribute) XXX_Size() int

func (*Attribute) XXX_Unmarshal

func (m *Attribute) XXX_Unmarshal(b []byte) error

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) EnumDescriptor

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

func (AttributeType) String

func (x AttributeType) String() string

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 *timestamp.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 *any.Any       `protobuf:"bytes,13,opt,name=embedded_data,json=embeddedData,proto3" json:"embedded_data,omitempty"`
	Salts        []*proto1.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 *timestamp.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"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

`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

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

func (*CoreDocument) GetAccessTokens

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

func (*CoreDocument) GetAnchorRepositoryUsed

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

func (*CoreDocument) GetAttributes

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

func (*CoreDocument) GetAuthor

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

func (*CoreDocument) GetCurrentPreimage

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

func (*CoreDocument) GetCurrentVersion

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

func (*CoreDocument) GetDocumentIdentifier

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

func (*CoreDocument) GetEmbeddedData

func (m *CoreDocument) GetEmbeddedData() *any.Any

func (*CoreDocument) GetNextPreimage

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

func (*CoreDocument) GetNextVersion

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

func (*CoreDocument) GetNfts

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

func (*CoreDocument) GetPreviousVersion

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

func (*CoreDocument) GetReadRules

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

func (*CoreDocument) GetRoles

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

func (*CoreDocument) GetSalts

func (m *CoreDocument) GetSalts() []*proto1.Salt

func (*CoreDocument) GetSignatureData

func (m *CoreDocument) GetSignatureData() *SignatureData

func (*CoreDocument) GetTimestamp

func (m *CoreDocument) GetTimestamp() *timestamp.Timestamp

func (*CoreDocument) GetTransitionRules

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

func (*CoreDocument) ProtoMessage

func (*CoreDocument) ProtoMessage()

func (*CoreDocument) Reset

func (m *CoreDocument) Reset()

func (*CoreDocument) String

func (m *CoreDocument) String() string

func (*CoreDocument) XXX_DiscardUnknown

func (m *CoreDocument) XXX_DiscardUnknown()

func (*CoreDocument) XXX_Marshal

func (m *CoreDocument) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CoreDocument) XXX_Merge

func (m *CoreDocument) XXX_Merge(src proto.Message)

func (*CoreDocument) XXX_Size

func (m *CoreDocument) XXX_Size() int

func (*CoreDocument) XXX_Unmarshal

func (m *CoreDocument) XXX_Unmarshal(b []byte) error

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) EnumDescriptor

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

func (FieldMatchType) String

func (x FieldMatchType) String() string

type Monetary

type Monetary struct {
	Type                 []byte   `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	Chain                []byte   `protobuf:"bytes,2,opt,name=chain,proto3" json:"chain,omitempty"`
	Value                []byte   `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
	Id                   []byte   `protobuf:"bytes,4,opt,name=id,proto3" json:"id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Monetary holds decimal value, id, type and chain context

func (*Monetary) Descriptor

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

func (*Monetary) GetChain

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

func (*Monetary) GetId

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

func (*Monetary) GetType

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

func (*Monetary) GetValue

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

func (*Monetary) ProtoMessage

func (*Monetary) ProtoMessage()

func (*Monetary) Reset

func (m *Monetary) Reset()

func (*Monetary) String

func (m *Monetary) String() string

func (*Monetary) XXX_DiscardUnknown

func (m *Monetary) XXX_DiscardUnknown()

func (*Monetary) XXX_Marshal

func (m *Monetary) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Monetary) XXX_Merge

func (m *Monetary) XXX_Merge(src proto.Message)

func (*Monetary) XXX_Size

func (m *Monetary) XXX_Size() int

func (*Monetary) XXX_Unmarshal

func (m *Monetary) XXX_Unmarshal(b []byte) error

type NFT

type NFT struct {
	RegistryId           []byte   `protobuf:"bytes,1,opt,name=registry_id,json=registryId,proto3" json:"registry_id,omitempty"`
	TokenId              []byte   `protobuf:"bytes,2,opt,name=token_id,json=tokenId,proto3" json:"token_id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*NFT) Descriptor

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

func (*NFT) GetRegistryId

func (m *NFT) GetRegistryId() []byte

func (*NFT) GetTokenId

func (m *NFT) GetTokenId() []byte

func (*NFT) ProtoMessage

func (*NFT) ProtoMessage()

func (*NFT) Reset

func (m *NFT) Reset()

func (*NFT) String

func (m *NFT) String() string

func (*NFT) XXX_DiscardUnknown

func (m *NFT) XXX_DiscardUnknown()

func (*NFT) XXX_Marshal

func (m *NFT) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NFT) XXX_Merge

func (m *NFT) XXX_Merge(src proto.Message)

func (*NFT) XXX_Size

func (m *NFT) XXX_Size() int

func (*NFT) XXX_Unmarshal

func (m *NFT) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ReadRule) Descriptor

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

func (*ReadRule) GetAction

func (m *ReadRule) GetAction() Action

func (*ReadRule) GetRoles

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

func (*ReadRule) ProtoMessage

func (*ReadRule) ProtoMessage()

func (*ReadRule) Reset

func (m *ReadRule) Reset()

func (*ReadRule) String

func (m *ReadRule) String() string

func (*ReadRule) XXX_DiscardUnknown

func (m *ReadRule) XXX_DiscardUnknown()

func (*ReadRule) XXX_Marshal

func (m *ReadRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ReadRule) XXX_Merge

func (m *ReadRule) XXX_Merge(src proto.Message)

func (*ReadRule) XXX_Size

func (m *ReadRule) XXX_Size() int

func (*ReadRule) XXX_Unmarshal

func (m *ReadRule) XXX_Unmarshal(b []byte) error

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 registry address/tokenID pairs.
	// For easier verification in merkle proofs, the values are simply concatenated with the first 20 bytes being the NFT registry and the remaining 32 bytes the tokenID.
	Nfts                 [][]byte `protobuf:"bytes,4,rep,name=nfts,proto3" json:"nfts,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (*Role) Descriptor

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

func (*Role) GetCollaborators

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

func (*Role) GetNfts

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

func (*Role) GetRoleKey

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

func (*Role) ProtoMessage

func (*Role) ProtoMessage()

func (*Role) Reset

func (m *Role) Reset()

func (*Role) String

func (m *Role) String() string

func (*Role) XXX_DiscardUnknown

func (m *Role) XXX_DiscardUnknown()

func (*Role) XXX_Marshal

func (m *Role) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Role) XXX_Merge

func (m *Role) XXX_Merge(src proto.Message)

func (*Role) XXX_Size

func (m *Role) XXX_Size() int

func (*Role) XXX_Unmarshal

func (m *Role) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (*Signature) Descriptor

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

func (*Signature) GetPublicKey

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

func (*Signature) GetSignature

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

func (*Signature) GetSignatureId

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

func (*Signature) GetSignerId

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

func (*Signature) GetTransitionValidated

func (m *Signature) GetTransitionValidated() bool

func (*Signature) ProtoMessage

func (*Signature) ProtoMessage()

func (*Signature) Reset

func (m *Signature) Reset()

func (*Signature) String

func (m *Signature) String() string

func (*Signature) XXX_DiscardUnknown

func (m *Signature) XXX_DiscardUnknown()

func (*Signature) XXX_Marshal

func (m *Signature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Signature) XXX_Merge

func (m *Signature) XXX_Merge(src proto.Message)

func (*Signature) XXX_Size

func (m *Signature) XXX_Size() int

func (*Signature) XXX_Unmarshal

func (m *Signature) XXX_Unmarshal(b []byte) error

type SignatureData

type SignatureData struct {
	Signatures           []*Signature `protobuf:"bytes,1,rep,name=signatures,proto3" json:"signatures,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

SignatureData contains the list of signatures identified by the signature_id

func (*SignatureData) Descriptor

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

func (*SignatureData) GetSignatures

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

func (*SignatureData) ProtoMessage

func (*SignatureData) ProtoMessage()

func (*SignatureData) Reset

func (m *SignatureData) Reset()

func (*SignatureData) String

func (m *SignatureData) String() string

func (*SignatureData) XXX_DiscardUnknown

func (m *SignatureData) XXX_DiscardUnknown()

func (*SignatureData) XXX_Marshal

func (m *SignatureData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SignatureData) XXX_Merge

func (m *SignatureData) XXX_Merge(src proto.Message)

func (*SignatureData) XXX_Size

func (m *SignatureData) XXX_Size() int

func (*SignatureData) XXX_Unmarshal

func (m *SignatureData) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Signed holds the custom attribute signature type

func (*Signed) Descriptor

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

func (*Signed) GetDocVersion

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

func (*Signed) GetIdentity

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

func (*Signed) GetPublicKey

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

func (*Signed) GetSignature

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

func (*Signed) GetType

func (m *Signed) GetType() AttributeType

func (*Signed) GetValue

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

func (*Signed) ProtoMessage

func (*Signed) ProtoMessage()

func (*Signed) Reset

func (m *Signed) Reset()

func (*Signed) String

func (m *Signed) String() string

func (*Signed) XXX_DiscardUnknown

func (m *Signed) XXX_DiscardUnknown()

func (*Signed) XXX_Marshal

func (m *Signed) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Signed) XXX_Merge

func (m *Signed) XXX_Merge(src proto.Message)

func (*Signed) XXX_Size

func (m *Signed) XXX_Size() int

func (*Signed) XXX_Unmarshal

func (m *Signed) XXX_Unmarshal(b []byte) error

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) EnumDescriptor

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

func (TransitionAction) String

func (x TransitionAction) String() string

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*TransitionRule) Descriptor

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

func (*TransitionRule) GetAction

func (m *TransitionRule) GetAction() TransitionAction

func (*TransitionRule) GetComputeCode

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

func (*TransitionRule) GetComputeFields

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

func (*TransitionRule) GetComputeTargetField

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

func (*TransitionRule) GetField

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

func (*TransitionRule) GetMatchType

func (m *TransitionRule) GetMatchType() FieldMatchType

func (*TransitionRule) GetRoles

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

func (*TransitionRule) GetRuleKey

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

func (*TransitionRule) ProtoMessage

func (*TransitionRule) ProtoMessage()

func (*TransitionRule) Reset

func (m *TransitionRule) Reset()

func (*TransitionRule) String

func (m *TransitionRule) String() string

func (*TransitionRule) XXX_DiscardUnknown

func (m *TransitionRule) XXX_DiscardUnknown()

func (*TransitionRule) XXX_Marshal

func (m *TransitionRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TransitionRule) XXX_Merge

func (m *TransitionRule) XXX_Merge(src proto.Message)

func (*TransitionRule) XXX_Size

func (m *TransitionRule) XXX_Size() int

func (*TransitionRule) XXX_Unmarshal

func (m *TransitionRule) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

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

func (*TransitionRulesFingerprint) Descriptor

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

func (*TransitionRulesFingerprint) GetRoles

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

func (*TransitionRulesFingerprint) GetTransitionRules

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

func (*TransitionRulesFingerprint) ProtoMessage

func (*TransitionRulesFingerprint) ProtoMessage()

func (*TransitionRulesFingerprint) Reset

func (m *TransitionRulesFingerprint) Reset()

func (*TransitionRulesFingerprint) String

func (m *TransitionRulesFingerprint) String() string

func (*TransitionRulesFingerprint) XXX_DiscardUnknown

func (m *TransitionRulesFingerprint) XXX_DiscardUnknown()

func (*TransitionRulesFingerprint) XXX_Marshal

func (m *TransitionRulesFingerprint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TransitionRulesFingerprint) XXX_Merge

func (m *TransitionRulesFingerprint) XXX_Merge(src proto.Message)

func (*TransitionRulesFingerprint) XXX_Size

func (m *TransitionRulesFingerprint) XXX_Size() int

func (*TransitionRulesFingerprint) XXX_Unmarshal

func (m *TransitionRulesFingerprint) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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