token

package
v2.0.0-alpha Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TokenOwner_Type_name = map[int32]string{
	0: "MSP_IDENTIFIER",
}
View Source
var TokenOwner_Type_value = map[string]int32{
	"MSP_IDENTIFIER": 0,
}

Functions

func RegisterProverServer

func RegisterProverServer(s *grpc.Server, srv ProverServer)

Types

type Command

type Command struct {
	// Header is the header of this command
	Header *Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	// Payload is the payload of this command. It can assume one of the following value
	//
	// Types that are valid to be assigned to Payload:
	//	*Command_IssueRequest
	//	*Command_TransferRequest
	//	*Command_ListRequest
	//	*Command_RedeemRequest
	//	*Command_TokenOperationRequest
	Payload              isCommand_Payload `protobuf_oneof:"payload"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

Command describes the type of operation that a client is requesting.

func (*Command) Descriptor

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

func (*Command) GetHeader

func (m *Command) GetHeader() *Header

func (*Command) GetIssueRequest

func (m *Command) GetIssueRequest() *IssueRequest

func (*Command) GetListRequest

func (m *Command) GetListRequest() *ListRequest

func (*Command) GetPayload

func (m *Command) GetPayload() isCommand_Payload

func (*Command) GetRedeemRequest

func (m *Command) GetRedeemRequest() *RedeemRequest

func (*Command) GetTokenOperationRequest

func (m *Command) GetTokenOperationRequest() *TokenOperationRequest

func (*Command) GetTransferRequest

func (m *Command) GetTransferRequest() *TransferRequest

func (*Command) ProtoMessage

func (*Command) ProtoMessage()

func (*Command) Reset

func (m *Command) Reset()

func (*Command) String

func (m *Command) String() string

func (*Command) XXX_DiscardUnknown

func (m *Command) XXX_DiscardUnknown()

func (*Command) XXX_Marshal

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

func (*Command) XXX_Merge

func (dst *Command) XXX_Merge(src proto.Message)

func (*Command) XXX_OneofFuncs

func (*Command) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*Command) XXX_Size

func (m *Command) XXX_Size() int

func (*Command) XXX_Unmarshal

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

type CommandResponse

type CommandResponse struct {
	// Header of the response.
	Header *CommandResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	// Payload of the response.
	//
	// Types that are valid to be assigned to Payload:
	//	*CommandResponse_Err
	//	*CommandResponse_TokenTransaction
	//	*CommandResponse_UnspentTokens
	//	*CommandResponse_TokenTransactions
	Payload              isCommandResponse_Payload `protobuf_oneof:"payload"`
	XXX_NoUnkeyedLiteral struct{}                  `json:"-"`
	XXX_unrecognized     []byte                    `json:"-"`
	XXX_sizecache        int32                     `json:"-"`
}

A CommnandResponse is returned from a prover to the command submitter.

func (*CommandResponse) Descriptor

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

func (*CommandResponse) GetErr

func (m *CommandResponse) GetErr() *Error

func (*CommandResponse) GetHeader

func (m *CommandResponse) GetHeader() *CommandResponseHeader

func (*CommandResponse) GetPayload

func (m *CommandResponse) GetPayload() isCommandResponse_Payload

func (*CommandResponse) GetTokenTransaction

func (m *CommandResponse) GetTokenTransaction() *TokenTransaction

func (*CommandResponse) GetTokenTransactions

func (m *CommandResponse) GetTokenTransactions() *TokenTransactions

func (*CommandResponse) GetUnspentTokens

func (m *CommandResponse) GetUnspentTokens() *UnspentTokens

func (*CommandResponse) ProtoMessage

func (*CommandResponse) ProtoMessage()

func (*CommandResponse) Reset

func (m *CommandResponse) Reset()

func (*CommandResponse) String

func (m *CommandResponse) String() string

func (*CommandResponse) XXX_DiscardUnknown

func (m *CommandResponse) XXX_DiscardUnknown()

func (*CommandResponse) XXX_Marshal

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

func (*CommandResponse) XXX_Merge

func (dst *CommandResponse) XXX_Merge(src proto.Message)

func (*CommandResponse) XXX_OneofFuncs

func (*CommandResponse) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*CommandResponse) XXX_Size

func (m *CommandResponse) XXX_Size() int

func (*CommandResponse) XXX_Unmarshal

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

type CommandResponseHeader

type CommandResponseHeader struct {
	// Timestamp is the time that the message
	// was created as  defined by the sender
	Timestamp *timestamp.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// CommandHash is the hash computed on the concatenation of the SignedCommand's command and signature fields.
	// If not specified differently, SHA256 is used
	// The hash is used to link a response with its request, both for bookeeping purposes on an
	// asynchronous system and for security reasons (accountability, non-repudiation)
	CommandHash []byte `protobuf:"bytes,2,opt,name=command_hash,json=commandHash,proto3" json:"command_hash,omitempty"`
	// Creator is the identity of the party creating this message
	Creator              []byte   `protobuf:"bytes,3,opt,name=creator,proto3" json:"creator,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CommandResponseHeader) Descriptor

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

func (*CommandResponseHeader) GetCommandHash

func (m *CommandResponseHeader) GetCommandHash() []byte

func (*CommandResponseHeader) GetCreator

func (m *CommandResponseHeader) GetCreator() []byte

func (*CommandResponseHeader) GetTimestamp

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

func (*CommandResponseHeader) ProtoMessage

func (*CommandResponseHeader) ProtoMessage()

func (*CommandResponseHeader) Reset

func (m *CommandResponseHeader) Reset()

func (*CommandResponseHeader) String

func (m *CommandResponseHeader) String() string

func (*CommandResponseHeader) XXX_DiscardUnknown

func (m *CommandResponseHeader) XXX_DiscardUnknown()

func (*CommandResponseHeader) XXX_Marshal

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

func (*CommandResponseHeader) XXX_Merge

func (dst *CommandResponseHeader) XXX_Merge(src proto.Message)

func (*CommandResponseHeader) XXX_Size

func (m *CommandResponseHeader) XXX_Size() int

func (*CommandResponseHeader) XXX_Unmarshal

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

type CommandResponse_Err

type CommandResponse_Err struct {
	Err *Error `protobuf:"bytes,2,opt,name=err,proto3,oneof"`
}

type CommandResponse_TokenTransaction

type CommandResponse_TokenTransaction struct {
	TokenTransaction *TokenTransaction `protobuf:"bytes,3,opt,name=token_transaction,json=tokenTransaction,proto3,oneof"`
}

type CommandResponse_TokenTransactions

type CommandResponse_TokenTransactions struct {
	TokenTransactions *TokenTransactions `protobuf:"bytes,5,opt,name=token_transactions,json=tokenTransactions,proto3,oneof"`
}

type CommandResponse_UnspentTokens

type CommandResponse_UnspentTokens struct {
	UnspentTokens *UnspentTokens `protobuf:"bytes,4,opt,name=unspent_tokens,json=unspentTokens,proto3,oneof"`
}

type Command_IssueRequest

type Command_IssueRequest struct {
	IssueRequest *IssueRequest `protobuf:"bytes,2,opt,name=issue_request,json=issueRequest,proto3,oneof"`
}

type Command_ListRequest

type Command_ListRequest struct {
	ListRequest *ListRequest `protobuf:"bytes,4,opt,name=list_request,json=listRequest,proto3,oneof"`
}

type Command_RedeemRequest

type Command_RedeemRequest struct {
	RedeemRequest *RedeemRequest `protobuf:"bytes,5,opt,name=redeem_request,json=redeemRequest,proto3,oneof"`
}

type Command_TokenOperationRequest

type Command_TokenOperationRequest struct {
	TokenOperationRequest *TokenOperationRequest `protobuf:"bytes,6,opt,name=token_operation_request,json=tokenOperationRequest,proto3,oneof"`
}

type Command_TransferRequest

type Command_TransferRequest struct {
	TransferRequest *TransferRequest `protobuf:"bytes,3,opt,name=transfer_request,json=transferRequest,proto3,oneof"`
}

type Error

type Error struct {
	// Message associated with this response.
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// Payload that can be used to include metadata with this response.
	Payload              []byte   `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Error reports an application error

func (*Error) Descriptor

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

func (*Error) GetMessage

func (m *Error) GetMessage() string

func (*Error) GetPayload

func (m *Error) GetPayload() []byte

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) Reset

func (m *Error) Reset()

func (*Error) String

func (m *Error) String() string

func (*Error) XXX_DiscardUnknown

func (m *Error) XXX_DiscardUnknown()

func (*Error) XXX_Marshal

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

func (*Error) XXX_Merge

func (dst *Error) XXX_Merge(src proto.Message)

func (*Error) XXX_Size

func (m *Error) XXX_Size() int

func (*Error) XXX_Unmarshal

func (m *Error) XXX_Unmarshal(b []byte) error
type Header struct {
	// Timestamp is the local time when the message was created
	// by the sender
	Timestamp *timestamp.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// ChannelId identifies the channel this message is meant for
	ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
	// Nonce is a sufficientley long random value
	// used to ensure the request has enough entropy.
	Nonce []byte `protobuf:"bytes,3,opt,name=nonce,proto3" json:"nonce,omitempty"`
	// Creator of the message.
	// Typically, a marshaled msp.SerializedIdentity
	Creator []byte `protobuf:"bytes,4,opt,name=creator,proto3" json:"creator,omitempty"`
	// TlsCertHash represents the hash of the client's TLS certificate
	// when mutual TLS is enabled
	TlsCertHash          []byte   `protobuf:"bytes,5,opt,name=tls_cert_hash,json=tlsCertHash,proto3" json:"tls_cert_hash,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Header is a generic replay prevention and identity message to include in a signed command

func (*Header) Descriptor

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

func (*Header) GetChannelId

func (m *Header) GetChannelId() string

func (*Header) GetCreator

func (m *Header) GetCreator() []byte

func (*Header) GetNonce

func (m *Header) GetNonce() []byte

func (*Header) GetTimestamp

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

func (*Header) GetTlsCertHash

func (m *Header) GetTlsCertHash() []byte

func (*Header) ProtoMessage

func (*Header) ProtoMessage()

func (*Header) Reset

func (m *Header) Reset()

func (*Header) String

func (m *Header) String() string

func (*Header) XXX_DiscardUnknown

func (m *Header) XXX_DiscardUnknown()

func (*Header) XXX_Marshal

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

func (*Header) XXX_Merge

func (dst *Header) XXX_Merge(src proto.Message)

func (*Header) XXX_Size

func (m *Header) XXX_Size() int

func (*Header) XXX_Unmarshal

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

type Issue

type Issue struct {
	// Outputs are the newly issued tokens
	Outputs              []*Token `protobuf:"bytes,1,rep,name=outputs,proto3" json:"outputs,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Issue specifies an issue of one or more tokens

func (*Issue) Descriptor

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

func (*Issue) GetOutputs

func (m *Issue) GetOutputs() []*Token

func (*Issue) ProtoMessage

func (*Issue) ProtoMessage()

func (*Issue) Reset

func (m *Issue) Reset()

func (*Issue) String

func (m *Issue) String() string

func (*Issue) XXX_DiscardUnknown

func (m *Issue) XXX_DiscardUnknown()

func (*Issue) XXX_Marshal

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

func (*Issue) XXX_Merge

func (dst *Issue) XXX_Merge(src proto.Message)

func (*Issue) XXX_Size

func (m *Issue) XXX_Size() int

func (*Issue) XXX_Unmarshal

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

type IssueRequest

type IssueRequest struct {
	// Credential contains information about the party who is requesting the operation
	// the content of this field depends on the charateristic of the token manager system used.
	Credential []byte `protobuf:"bytes,1,opt,name=credential,proto3" json:"credential,omitempty"`
	// TokensToIssue contains the information about the tokens to be issued
	TokensToIssue        []*Token `protobuf:"bytes,2,rep,name=tokens_to_issue,json=tokensToIssue,proto3" json:"tokens_to_issue,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

IssueRequest is used to request token issuance

func (*IssueRequest) Descriptor

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

func (*IssueRequest) GetCredential

func (m *IssueRequest) GetCredential() []byte

func (*IssueRequest) GetTokensToIssue

func (m *IssueRequest) GetTokensToIssue() []*Token

func (*IssueRequest) ProtoMessage

func (*IssueRequest) ProtoMessage()

func (*IssueRequest) Reset

func (m *IssueRequest) Reset()

func (*IssueRequest) String

func (m *IssueRequest) String() string

func (*IssueRequest) XXX_DiscardUnknown

func (m *IssueRequest) XXX_DiscardUnknown()

func (*IssueRequest) XXX_Marshal

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

func (*IssueRequest) XXX_Merge

func (dst *IssueRequest) XXX_Merge(src proto.Message)

func (*IssueRequest) XXX_Size

func (m *IssueRequest) XXX_Size() int

func (*IssueRequest) XXX_Unmarshal

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

type ListRequest

type ListRequest struct {
	// Credential refers to the public credential of the party whose unspent tokens is to be listed
	Credential           []byte   `protobuf:"bytes,1,opt,name=credential,proto3" json:"credential,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

ListRequest is used to retrieve the unspent tokens belonging to the party holding Credential

func (*ListRequest) Descriptor

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

func (*ListRequest) GetCredential

func (m *ListRequest) GetCredential() []byte

func (*ListRequest) ProtoMessage

func (*ListRequest) ProtoMessage()

func (*ListRequest) Reset

func (m *ListRequest) Reset()

func (*ListRequest) String

func (m *ListRequest) String() string

func (*ListRequest) XXX_DiscardUnknown

func (m *ListRequest) XXX_DiscardUnknown()

func (*ListRequest) XXX_Marshal

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

func (*ListRequest) XXX_Merge

func (dst *ListRequest) XXX_Merge(src proto.Message)

func (*ListRequest) XXX_Size

func (m *ListRequest) XXX_Size() int

func (*ListRequest) XXX_Unmarshal

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

type ProverClient

type ProverClient interface {
	// ProcessCommand processes the passed command ensuring proper access control.
	// The returned response allows the client to understand if the
	// operation was succeffully executed and if not, the response
	// reports the reason of the failure.
	ProcessCommand(ctx context.Context, in *SignedCommand, opts ...grpc.CallOption) (*SignedCommandResponse, error)
}

ProverClient is the client API for Prover service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewProverClient

func NewProverClient(cc *grpc.ClientConn) ProverClient

type ProverServer

type ProverServer interface {
	// ProcessCommand processes the passed command ensuring proper access control.
	// The returned response allows the client to understand if the
	// operation was succeffully executed and if not, the response
	// reports the reason of the failure.
	ProcessCommand(context.Context, *SignedCommand) (*SignedCommandResponse, error)
}

ProverServer is the server API for Prover service.

type RecipientShare

type RecipientShare struct {
	// Recipient refers to the prospective owner of a transferred token
	Recipient *TokenOwner `protobuf:"bytes,1,opt,name=recipient,proto3" json:"recipient,omitempty"`
	// Quantity refers to the number of token units to be transferred to the recipient.
	// It is encoded as a string whose prefix determines the actual conversion base. A prefix of
	// “0x” or “0X” selects base 16; the “0” prefix selects base 8, and a
	// “0b” or “0B” prefix selects base 2. Otherwise the selected base is 10.
	Quantity             string   `protobuf:"bytes,2,opt,name=quantity,proto3" json:"quantity,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

RecipientShare describes how much a recipient will receive in a token transfer

func (*RecipientShare) Descriptor

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

func (*RecipientShare) GetQuantity

func (m *RecipientShare) GetQuantity() string

func (*RecipientShare) GetRecipient

func (m *RecipientShare) GetRecipient() *TokenOwner

func (*RecipientShare) ProtoMessage

func (*RecipientShare) ProtoMessage()

func (*RecipientShare) Reset

func (m *RecipientShare) Reset()

func (*RecipientShare) String

func (m *RecipientShare) String() string

func (*RecipientShare) XXX_DiscardUnknown

func (m *RecipientShare) XXX_DiscardUnknown()

func (*RecipientShare) XXX_Marshal

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

func (*RecipientShare) XXX_Merge

func (dst *RecipientShare) XXX_Merge(src proto.Message)

func (*RecipientShare) XXX_Size

func (m *RecipientShare) XXX_Size() int

func (*RecipientShare) XXX_Unmarshal

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

type RedeemRequest

type RedeemRequest struct {
	// Credential is the public credential of the requestor of the redemption
	// The content of this field depends on the characteristic of token manager system
	Credential []byte `protobuf:"bytes,1,opt,name=credential,proto3" json:"credential,omitempty"`
	// TokenIds identifies the tokens to be redeemed
	TokenIds []*TokenId `protobuf:"bytes,2,rep,name=token_ids,json=tokenIds,proto3" json:"token_ids,omitempty"`
	// Quantity refers to the number of units of a given token needs to be redeemed.
	// It is encoded as a string whose prefix determines the actual conversion base. A prefix of
	// “0x” or “0X” selects base 16; the “0” prefix selects base 8, and a
	// “0b” or “0B” prefix selects base 2. Otherwise the selected base is 10.
	Quantity             string   `protobuf:"bytes,3,opt,name=quantity,proto3" json:"quantity,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

RedeemRequest is used to request token redemption

func (*RedeemRequest) Descriptor

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

func (*RedeemRequest) GetCredential

func (m *RedeemRequest) GetCredential() []byte

func (*RedeemRequest) GetQuantity

func (m *RedeemRequest) GetQuantity() string

func (*RedeemRequest) GetTokenIds

func (m *RedeemRequest) GetTokenIds() []*TokenId

func (*RedeemRequest) ProtoMessage

func (*RedeemRequest) ProtoMessage()

func (*RedeemRequest) Reset

func (m *RedeemRequest) Reset()

func (*RedeemRequest) String

func (m *RedeemRequest) String() string

func (*RedeemRequest) XXX_DiscardUnknown

func (m *RedeemRequest) XXX_DiscardUnknown()

func (*RedeemRequest) XXX_Marshal

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

func (*RedeemRequest) XXX_Merge

func (dst *RedeemRequest) XXX_Merge(src proto.Message)

func (*RedeemRequest) XXX_Size

func (m *RedeemRequest) XXX_Size() int

func (*RedeemRequest) XXX_Unmarshal

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

type SignedCommand

type SignedCommand struct {
	// Command is the serialised version of a Command message
	Command []byte `protobuf:"bytes,1,opt,name=command,proto3" json:"command,omitempty"`
	// Signature is the signature over command
	Signature            []byte   `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

SignedCommand is a command that carries the signature of the command's creator.

func (*SignedCommand) Descriptor

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

func (*SignedCommand) GetCommand

func (m *SignedCommand) GetCommand() []byte

func (*SignedCommand) GetSignature

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

func (*SignedCommand) ProtoMessage

func (*SignedCommand) ProtoMessage()

func (*SignedCommand) Reset

func (m *SignedCommand) Reset()

func (*SignedCommand) String

func (m *SignedCommand) String() string

func (*SignedCommand) XXX_DiscardUnknown

func (m *SignedCommand) XXX_DiscardUnknown()

func (*SignedCommand) XXX_Marshal

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

func (*SignedCommand) XXX_Merge

func (dst *SignedCommand) XXX_Merge(src proto.Message)

func (*SignedCommand) XXX_Size

func (m *SignedCommand) XXX_Size() int

func (*SignedCommand) XXX_Unmarshal

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

type SignedCommandResponse

type SignedCommandResponse struct {
	// Response is the serialised version of a CommandResponse message
	Response []byte `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"`
	// Signature is the signature over command
	Signature            []byte   `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

SignedCommandResponse is a signed command response

func (*SignedCommandResponse) Descriptor

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

func (*SignedCommandResponse) GetResponse

func (m *SignedCommandResponse) GetResponse() []byte

func (*SignedCommandResponse) GetSignature

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

func (*SignedCommandResponse) ProtoMessage

func (*SignedCommandResponse) ProtoMessage()

func (*SignedCommandResponse) Reset

func (m *SignedCommandResponse) Reset()

func (*SignedCommandResponse) String

func (m *SignedCommandResponse) String() string

func (*SignedCommandResponse) XXX_DiscardUnknown

func (m *SignedCommandResponse) XXX_DiscardUnknown()

func (*SignedCommandResponse) XXX_Marshal

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

func (*SignedCommandResponse) XXX_Merge

func (dst *SignedCommandResponse) XXX_Merge(src proto.Message)

func (*SignedCommandResponse) XXX_Size

func (m *SignedCommandResponse) XXX_Size() int

func (*SignedCommandResponse) XXX_Unmarshal

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

type Token

type Token struct {
	// Owner is the token owner
	Owner *TokenOwner `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
	// Type is the type of the token
	Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	// Quantity is the number of units of Type carried in the token.
	// It is encoded as a string containing a number in base 16. The string has prefix “0x”.
	Quantity             string   `protobuf:"bytes,3,opt,name=quantity,proto3" json:"quantity,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Token is the result of issue and transfer transactions

func (*Token) Descriptor

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

func (*Token) GetOwner

func (m *Token) GetOwner() *TokenOwner

func (*Token) GetQuantity

func (m *Token) GetQuantity() string

func (*Token) GetType

func (m *Token) GetType() string

func (*Token) ProtoMessage

func (*Token) ProtoMessage()

func (*Token) Reset

func (m *Token) Reset()

func (*Token) String

func (m *Token) String() string

func (*Token) XXX_DiscardUnknown

func (m *Token) XXX_DiscardUnknown()

func (*Token) XXX_Marshal

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

func (*Token) XXX_Merge

func (dst *Token) XXX_Merge(src proto.Message)

func (*Token) XXX_Size

func (m *Token) XXX_Size() int

func (*Token) XXX_Unmarshal

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

type TokenAction

type TokenAction struct {
	// Data carries the action to be executed
	//
	// Types that are valid to be assigned to Data:
	//	*TokenAction_Issue
	//	*TokenAction_Transfer
	//	*TokenAction_Redeem
	Data                 isTokenAction_Data `protobuf_oneof:"data"`
	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
	XXX_unrecognized     []byte             `json:"-"`
	XXX_sizecache        int32              `json:"-"`
}

TokenAction specifies the structure of the action that a token undertakes

func (*TokenAction) Descriptor

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

func (*TokenAction) GetData

func (m *TokenAction) GetData() isTokenAction_Data

func (*TokenAction) GetIssue

func (m *TokenAction) GetIssue() *Issue

func (*TokenAction) GetRedeem

func (m *TokenAction) GetRedeem() *Transfer

func (*TokenAction) GetTransfer

func (m *TokenAction) GetTransfer() *Transfer

func (*TokenAction) ProtoMessage

func (*TokenAction) ProtoMessage()

func (*TokenAction) Reset

func (m *TokenAction) Reset()

func (*TokenAction) String

func (m *TokenAction) String() string

func (*TokenAction) XXX_DiscardUnknown

func (m *TokenAction) XXX_DiscardUnknown()

func (*TokenAction) XXX_Marshal

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

func (*TokenAction) XXX_Merge

func (dst *TokenAction) XXX_Merge(src proto.Message)

func (*TokenAction) XXX_OneofFuncs

func (*TokenAction) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*TokenAction) XXX_Size

func (m *TokenAction) XXX_Size() int

func (*TokenAction) XXX_Unmarshal

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

type TokenActionTerms

type TokenActionTerms struct {
	// Sender is the party who should perform the operation
	Sender *TokenOwner `protobuf:"bytes,1,opt,name=Sender,proto3" json:"Sender,omitempty"`
	// Outputs contains the expected outputs
	Outputs              []*Token `protobuf:"bytes,2,rep,name=Outputs,proto3" json:"Outputs,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

TokenActionTerms describes the expected sender and outputs of a token operation

func (*TokenActionTerms) Descriptor

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

func (*TokenActionTerms) GetOutputs

func (m *TokenActionTerms) GetOutputs() []*Token

func (*TokenActionTerms) GetSender

func (m *TokenActionTerms) GetSender() *TokenOwner

func (*TokenActionTerms) ProtoMessage

func (*TokenActionTerms) ProtoMessage()

func (*TokenActionTerms) Reset

func (m *TokenActionTerms) Reset()

func (*TokenActionTerms) String

func (m *TokenActionTerms) String() string

func (*TokenActionTerms) XXX_DiscardUnknown

func (m *TokenActionTerms) XXX_DiscardUnknown()

func (*TokenActionTerms) XXX_Marshal

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

func (*TokenActionTerms) XXX_Merge

func (dst *TokenActionTerms) XXX_Merge(src proto.Message)

func (*TokenActionTerms) XXX_Size

func (m *TokenActionTerms) XXX_Size() int

func (*TokenActionTerms) XXX_Unmarshal

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

type TokenAction_Issue

type TokenAction_Issue struct {
	Issue *Issue `protobuf:"bytes,1,opt,name=issue,proto3,oneof"`
}

type TokenAction_Redeem

type TokenAction_Redeem struct {
	Redeem *Transfer `protobuf:"bytes,3,opt,name=redeem,proto3,oneof"`
}

type TokenAction_Transfer

type TokenAction_Transfer struct {
	Transfer *Transfer `protobuf:"bytes,2,opt,name=transfer,proto3,oneof"`
}

type TokenId

type TokenId struct {
	// TxId is the transaction ID of the transaction that created the token
	TxId string `protobuf:"bytes,1,opt,name=tx_id,json=txId,proto3" json:"tx_id,omitempty"`
	// Index is the index of the token in the transaction that created it
	Index                uint32   `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

A TokenId identifies a token as a function of the identifier of the transaction (issue, transfer) that created it and its index in that transaction

func (*TokenId) Descriptor

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

func (*TokenId) GetIndex

func (m *TokenId) GetIndex() uint32

func (*TokenId) GetTxId

func (m *TokenId) GetTxId() string

func (*TokenId) ProtoMessage

func (*TokenId) ProtoMessage()

func (*TokenId) Reset

func (m *TokenId) Reset()

func (*TokenId) String

func (m *TokenId) String() string

func (*TokenId) XXX_DiscardUnknown

func (m *TokenId) XXX_DiscardUnknown()

func (*TokenId) XXX_Marshal

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

func (*TokenId) XXX_Merge

func (dst *TokenId) XXX_Merge(src proto.Message)

func (*TokenId) XXX_Size

func (m *TokenId) XXX_Size() int

func (*TokenId) XXX_Unmarshal

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

type TokenOperation

type TokenOperation struct {
	// Types that are valid to be assigned to Operation:
	//	*TokenOperation_Action
	Operation            isTokenOperation_Operation `protobuf_oneof:"Operation"`
	XXX_NoUnkeyedLiteral struct{}                   `json:"-"`
	XXX_unrecognized     []byte                     `json:"-"`
	XXX_sizecache        int32                      `json:"-"`
}

TokenOperation describes a token operation

func (*TokenOperation) Descriptor

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

func (*TokenOperation) GetAction

func (m *TokenOperation) GetAction() *TokenOperationAction

func (*TokenOperation) GetOperation

func (m *TokenOperation) GetOperation() isTokenOperation_Operation

func (*TokenOperation) ProtoMessage

func (*TokenOperation) ProtoMessage()

func (*TokenOperation) Reset

func (m *TokenOperation) Reset()

func (*TokenOperation) String

func (m *TokenOperation) String() string

func (*TokenOperation) XXX_DiscardUnknown

func (m *TokenOperation) XXX_DiscardUnknown()

func (*TokenOperation) XXX_Marshal

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

func (*TokenOperation) XXX_Merge

func (dst *TokenOperation) XXX_Merge(src proto.Message)

func (*TokenOperation) XXX_OneofFuncs

func (*TokenOperation) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*TokenOperation) XXX_Size

func (m *TokenOperation) XXX_Size() int

func (*TokenOperation) XXX_Unmarshal

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

type TokenOperationAction

type TokenOperationAction struct {
	// Types that are valid to be assigned to Payload:
	//	*TokenOperationAction_Issue
	//	*TokenOperationAction_Transfer
	Payload              isTokenOperationAction_Payload `protobuf_oneof:"Payload"`
	XXX_NoUnkeyedLiteral struct{}                       `json:"-"`
	XXX_unrecognized     []byte                         `json:"-"`
	XXX_sizecache        int32                          `json:"-"`
}

TokenOperationAction lists the available operations

func (*TokenOperationAction) Descriptor

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

func (*TokenOperationAction) GetIssue

func (m *TokenOperationAction) GetIssue() *TokenActionTerms

func (*TokenOperationAction) GetPayload

func (m *TokenOperationAction) GetPayload() isTokenOperationAction_Payload

func (*TokenOperationAction) GetTransfer

func (m *TokenOperationAction) GetTransfer() *TokenActionTerms

func (*TokenOperationAction) ProtoMessage

func (*TokenOperationAction) ProtoMessage()

func (*TokenOperationAction) Reset

func (m *TokenOperationAction) Reset()

func (*TokenOperationAction) String

func (m *TokenOperationAction) String() string

func (*TokenOperationAction) XXX_DiscardUnknown

func (m *TokenOperationAction) XXX_DiscardUnknown()

func (*TokenOperationAction) XXX_Marshal

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

func (*TokenOperationAction) XXX_Merge

func (dst *TokenOperationAction) XXX_Merge(src proto.Message)

func (*TokenOperationAction) XXX_OneofFuncs

func (*TokenOperationAction) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*TokenOperationAction) XXX_Size

func (m *TokenOperationAction) XXX_Size() int

func (*TokenOperationAction) XXX_Unmarshal

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

type TokenOperationAction_Issue

type TokenOperationAction_Issue struct {
	Issue *TokenActionTerms `protobuf:"bytes,1,opt,name=Issue,proto3,oneof"`
}

type TokenOperationAction_Transfer

type TokenOperationAction_Transfer struct {
	Transfer *TokenActionTerms `protobuf:"bytes,2,opt,name=Transfer,proto3,oneof"`
}

type TokenOperationRequest

type TokenOperationRequest struct {
	// credential contains information for the party who is requesting the operation
	// The content of this field depends on the characteristic of token manager system
	Credential []byte `protobuf:"bytes,1,opt,name=credential,proto3" json:"credential,omitempty"`
	// operations contains the token operations to be performed
	Operations []*TokenOperation `protobuf:"bytes,2,rep,name=operations,proto3" json:"operations,omitempty"`
	// TokenIds are the token identifiers used for the operation. It is empty,
	// in the case of an issue. It must not be empty for operations like transfer or redeem.
	TokenIds             []*TokenId `protobuf:"bytes,3,rep,name=token_ids,json=tokenIds,proto3" json:"token_ids,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

TokenOperationRequest is used to ask the prover peer to perform a specific token operation using given token ids. In this way, the prover peer can assemble token transactions as requested by a chaincode.

func (*TokenOperationRequest) Descriptor

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

func (*TokenOperationRequest) GetCredential

func (m *TokenOperationRequest) GetCredential() []byte

func (*TokenOperationRequest) GetOperations

func (m *TokenOperationRequest) GetOperations() []*TokenOperation

func (*TokenOperationRequest) GetTokenIds

func (m *TokenOperationRequest) GetTokenIds() []*TokenId

func (*TokenOperationRequest) ProtoMessage

func (*TokenOperationRequest) ProtoMessage()

func (*TokenOperationRequest) Reset

func (m *TokenOperationRequest) Reset()

func (*TokenOperationRequest) String

func (m *TokenOperationRequest) String() string

func (*TokenOperationRequest) XXX_DiscardUnknown

func (m *TokenOperationRequest) XXX_DiscardUnknown()

func (*TokenOperationRequest) XXX_Marshal

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

func (*TokenOperationRequest) XXX_Merge

func (dst *TokenOperationRequest) XXX_Merge(src proto.Message)

func (*TokenOperationRequest) XXX_Size

func (m *TokenOperationRequest) XXX_Size() int

func (*TokenOperationRequest) XXX_Unmarshal

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

type TokenOperation_Action

type TokenOperation_Action struct {
	Action *TokenOperationAction `protobuf:"bytes,1,opt,name=Action,proto3,oneof"`
}

type TokenOwner

type TokenOwner struct {
	// Type is the type of the identity of the token owner
	Type TokenOwner_Type `protobuf:"varint,1,opt,name=type,proto3,enum=token.TokenOwner_Type" json:"type,omitempty"`
	// Raw is the serialization of the identity
	Raw                  []byte   `protobuf:"bytes,2,opt,name=raw,proto3" json:"raw,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

TokenOwner holds the identity of a token owner

func (*TokenOwner) Descriptor

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

func (*TokenOwner) GetRaw

func (m *TokenOwner) GetRaw() []byte

func (*TokenOwner) GetType

func (m *TokenOwner) GetType() TokenOwner_Type

func (*TokenOwner) ProtoMessage

func (*TokenOwner) ProtoMessage()

func (*TokenOwner) Reset

func (m *TokenOwner) Reset()

func (*TokenOwner) String

func (m *TokenOwner) String() string

func (*TokenOwner) XXX_DiscardUnknown

func (m *TokenOwner) XXX_DiscardUnknown()

func (*TokenOwner) XXX_Marshal

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

func (*TokenOwner) XXX_Merge

func (dst *TokenOwner) XXX_Merge(src proto.Message)

func (*TokenOwner) XXX_Size

func (m *TokenOwner) XXX_Size() int

func (*TokenOwner) XXX_Unmarshal

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

type TokenOwner_Type

type TokenOwner_Type int32
const (
	TokenOwner_MSP_IDENTIFIER TokenOwner_Type = 0
)

func (TokenOwner_Type) EnumDescriptor

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

func (TokenOwner_Type) String

func (x TokenOwner_Type) String() string

type TokenTransaction

type TokenTransaction struct {
	// TokenAction carries the content of this transaction.
	//
	// Types that are valid to be assigned to Action:
	//	*TokenTransaction_TokenAction
	Action               isTokenTransaction_Action `protobuf_oneof:"action"`
	XXX_NoUnkeyedLiteral struct{}                  `json:"-"`
	XXX_unrecognized     []byte                    `json:"-"`
	XXX_sizecache        int32                     `json:"-"`
}

TokenTransaction governs the structure of Payload.data, when the transaction's envelope header indicates a transaction of type "Token"

func (*TokenTransaction) Descriptor

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

func (*TokenTransaction) GetAction

func (m *TokenTransaction) GetAction() isTokenTransaction_Action

func (*TokenTransaction) GetTokenAction

func (m *TokenTransaction) GetTokenAction() *TokenAction

func (*TokenTransaction) ProtoMessage

func (*TokenTransaction) ProtoMessage()

func (*TokenTransaction) Reset

func (m *TokenTransaction) Reset()

func (*TokenTransaction) String

func (m *TokenTransaction) String() string

func (*TokenTransaction) XXX_DiscardUnknown

func (m *TokenTransaction) XXX_DiscardUnknown()

func (*TokenTransaction) XXX_Marshal

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

func (*TokenTransaction) XXX_Merge

func (dst *TokenTransaction) XXX_Merge(src proto.Message)

func (*TokenTransaction) XXX_OneofFuncs

func (*TokenTransaction) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*TokenTransaction) XXX_Size

func (m *TokenTransaction) XXX_Size() int

func (*TokenTransaction) XXX_Unmarshal

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

type TokenTransaction_TokenAction

type TokenTransaction_TokenAction struct {
	TokenAction *TokenAction `protobuf:"bytes,1,opt,name=token_action,json=tokenAction,proto3,oneof"`
}

type TokenTransactions

type TokenTransactions struct {
	Txs                  []*TokenTransaction `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"`
	XXX_NoUnkeyedLiteral struct{}            `json:"-"`
	XXX_unrecognized     []byte              `json:"-"`
	XXX_sizecache        int32               `json:"-"`
}

TokenTransactions is a container for token transactions

func (*TokenTransactions) Descriptor

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

func (*TokenTransactions) GetTxs

func (m *TokenTransactions) GetTxs() []*TokenTransaction

func (*TokenTransactions) ProtoMessage

func (*TokenTransactions) ProtoMessage()

func (*TokenTransactions) Reset

func (m *TokenTransactions) Reset()

func (*TokenTransactions) String

func (m *TokenTransactions) String() string

func (*TokenTransactions) XXX_DiscardUnknown

func (m *TokenTransactions) XXX_DiscardUnknown()

func (*TokenTransactions) XXX_Marshal

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

func (*TokenTransactions) XXX_Merge

func (dst *TokenTransactions) XXX_Merge(src proto.Message)

func (*TokenTransactions) XXX_Size

func (m *TokenTransactions) XXX_Size() int

func (*TokenTransactions) XXX_Unmarshal

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

type Transfer

type Transfer struct {
	// Inputs specify the identifiers in the ledger of the tokens to be transferred
	Inputs []*TokenId `protobuf:"bytes,1,rep,name=inputs,proto3" json:"inputs,omitempty"`
	// Outputs are the new tokens resulting from the transfer
	Outputs              []*Token `protobuf:"bytes,2,rep,name=outputs,proto3" json:"outputs,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Transfer specifies a transfer of one or more tokens

func (*Transfer) Descriptor

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

func (*Transfer) GetInputs

func (m *Transfer) GetInputs() []*TokenId

func (*Transfer) GetOutputs

func (m *Transfer) GetOutputs() []*Token

func (*Transfer) ProtoMessage

func (*Transfer) ProtoMessage()

func (*Transfer) Reset

func (m *Transfer) Reset()

func (*Transfer) String

func (m *Transfer) String() string

func (*Transfer) XXX_DiscardUnknown

func (m *Transfer) XXX_DiscardUnknown()

func (*Transfer) XXX_Marshal

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

func (*Transfer) XXX_Merge

func (dst *Transfer) XXX_Merge(src proto.Message)

func (*Transfer) XXX_Size

func (m *Transfer) XXX_Size() int

func (*Transfer) XXX_Unmarshal

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

type TransferRequest

type TransferRequest struct {
	// Credential is the public credential of the requestor of the transfer
	// The content of this field depends on the characteristic of token manager system
	Credential []byte `protobuf:"bytes,1,opt,name=credential,proto3" json:"credential,omitempty"`
	// TokenIds identifies the tokens to be transferred
	TokenIds []*TokenId `protobuf:"bytes,2,rep,name=token_ids,json=tokenIds,proto3" json:"token_ids,omitempty"`
	// Shares identify the prospective recipients and the quantity of tokens that each would receive
	Shares               []*RecipientShare `protobuf:"bytes,3,rep,name=shares,proto3" json:"shares,omitempty"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

TransferRequest is used to request token transfers

func (*TransferRequest) Descriptor

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

func (*TransferRequest) GetCredential

func (m *TransferRequest) GetCredential() []byte

func (*TransferRequest) GetShares

func (m *TransferRequest) GetShares() []*RecipientShare

func (*TransferRequest) GetTokenIds

func (m *TransferRequest) GetTokenIds() []*TokenId

func (*TransferRequest) ProtoMessage

func (*TransferRequest) ProtoMessage()

func (*TransferRequest) Reset

func (m *TransferRequest) Reset()

func (*TransferRequest) String

func (m *TransferRequest) String() string

func (*TransferRequest) XXX_DiscardUnknown

func (m *TransferRequest) XXX_DiscardUnknown()

func (*TransferRequest) XXX_Marshal

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

func (*TransferRequest) XXX_Merge

func (dst *TransferRequest) XXX_Merge(src proto.Message)

func (*TransferRequest) XXX_Size

func (m *TransferRequest) XXX_Size() int

func (*TransferRequest) XXX_Unmarshal

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

type UnspentToken

type UnspentToken struct {
	// Id is used to uniquely identify the token in the ledger
	Id *TokenId `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Type is the type of the token
	Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	// Quantity represents the number of units of Type that this unspent token holds.
	// It is formatted in decimal representation
	Quantity             string   `protobuf:"bytes,3,opt,name=quantity,proto3" json:"quantity,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

UnspentToken is used to specify a token returned by ListRequest

func (*UnspentToken) Descriptor

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

func (*UnspentToken) GetId

func (m *UnspentToken) GetId() *TokenId

func (*UnspentToken) GetQuantity

func (m *UnspentToken) GetQuantity() string

func (*UnspentToken) GetType

func (m *UnspentToken) GetType() string

func (*UnspentToken) ProtoMessage

func (*UnspentToken) ProtoMessage()

func (*UnspentToken) Reset

func (m *UnspentToken) Reset()

func (*UnspentToken) String

func (m *UnspentToken) String() string

func (*UnspentToken) XXX_DiscardUnknown

func (m *UnspentToken) XXX_DiscardUnknown()

func (*UnspentToken) XXX_Marshal

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

func (*UnspentToken) XXX_Merge

func (dst *UnspentToken) XXX_Merge(src proto.Message)

func (*UnspentToken) XXX_Size

func (m *UnspentToken) XXX_Size() int

func (*UnspentToken) XXX_Unmarshal

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

type UnspentTokens

type UnspentTokens struct {
	// Tokens is an array of UnspentToken
	Tokens               []*UnspentToken `protobuf:"bytes,1,rep,name=tokens,proto3" json:"tokens,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

UnspentTokens is used to hold the output of ListRequest

func (*UnspentTokens) Descriptor

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

func (*UnspentTokens) GetTokens

func (m *UnspentTokens) GetTokens() []*UnspentToken

func (*UnspentTokens) ProtoMessage

func (*UnspentTokens) ProtoMessage()

func (*UnspentTokens) Reset

func (m *UnspentTokens) Reset()

func (*UnspentTokens) String

func (m *UnspentTokens) String() string

func (*UnspentTokens) XXX_DiscardUnknown

func (m *UnspentTokens) XXX_DiscardUnknown()

func (*UnspentTokens) XXX_Marshal

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

func (*UnspentTokens) XXX_Merge

func (dst *UnspentTokens) XXX_Merge(src proto.Message)

func (*UnspentTokens) XXX_Size

func (m *UnspentTokens) XXX_Size() int

func (*UnspentTokens) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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