token

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Overview

Package token contains

  • chaincode methods names {service_name}Chaincode_{method_name}
  • chaincode interface definition {service_name}Chaincode
  • chaincode gateway definition {service_name}}Gateway
  • chaincode service to cckit router registration func

Package token is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Package token contains

  • chaincode methods names {service_name}Chaincode_{method_name}
  • chaincode interface definition {service_name}Chaincode
  • chaincode gateway definition {service_name}}Gateway
  • chaincode service to cckit router registration func

Package token is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (

	// BalanceServiceChaincodeMethodPrefix allows to use multiple services with same method names in one chaincode
	BalanceServiceChaincodeMethodPrefix = "BalanceService."

	BalanceServiceChaincode_GetBalance = BalanceServiceChaincodeMethodPrefix + "GetBalance"

	BalanceServiceChaincode_ListBalances = BalanceServiceChaincodeMethodPrefix + "ListBalances"

	BalanceServiceChaincode_Transfer = BalanceServiceChaincodeMethodPrefix + "Transfer"

	BalanceServiceChaincode_TransferBatch = BalanceServiceChaincodeMethodPrefix + "TransferBatch"
)

BalanceServiceChaincode method names

View Source
const (

	// TokenServiceChaincodeMethodPrefix allows to use multiple services with same method names in one chaincode
	TokenServiceChaincodeMethodPrefix = "TokenService."

	TokenServiceChaincode_GetConfig = TokenServiceChaincodeMethodPrefix + "GetConfig"

	TokenServiceChaincode_SetConfig = TokenServiceChaincodeMethodPrefix + "SetConfig"

	TokenServiceChaincode_GetToken = TokenServiceChaincodeMethodPrefix + "GetToken"

	TokenServiceChaincode_GetDefaultToken = TokenServiceChaincodeMethodPrefix + "GetDefaultToken"

	TokenServiceChaincode_CreateTokenType = TokenServiceChaincodeMethodPrefix + "CreateTokenType"

	TokenServiceChaincode_GetTokenType = TokenServiceChaincodeMethodPrefix + "GetTokenType"

	TokenServiceChaincode_ListTokenTypes = TokenServiceChaincodeMethodPrefix + "ListTokenTypes"

	TokenServiceChaincode_UpdateTokenType = TokenServiceChaincodeMethodPrefix + "UpdateTokenType"

	TokenServiceChaincode_DeleteTokenType = TokenServiceChaincodeMethodPrefix + "DeleteTokenType"

	TokenServiceChaincode_GetTokenGroups = TokenServiceChaincodeMethodPrefix + "GetTokenGroups"

	TokenServiceChaincode_CreateTokenGroup = TokenServiceChaincodeMethodPrefix + "CreateTokenGroup"

	TokenServiceChaincode_GetTokenGroup = TokenServiceChaincodeMethodPrefix + "GetTokenGroup"

	TokenServiceChaincode_DeleteTokenGroup = TokenServiceChaincodeMethodPrefix + "DeleteTokenGroup"
)

TokenServiceChaincode method names

Variables

View Source
var (
	OperationType_name = map[int32]string{
		0: "OPERATION_UNKNOWN",
		1: "OPERATION_TRANSFER",
		2: "OPERATION_MINT",
		3: "OPERATION_BURN",
		4: "OPERATION_LOCK",
	}
	OperationType_value = map[string]int32{
		"OPERATION_UNKNOWN":  0,
		"OPERATION_TRANSFER": 1,
		"OPERATION_MINT":     2,
		"OPERATION_BURN":     3,
		"OPERATION_LOCK":     4,
	}
)

Enum value maps for OperationType.

View Source
var (
	ErrSenderRecipientEqual = errors.New(`sender recipient equal`)
	ErrSenderNotEqual       = errors.New(`sender not equal`)
	ErrOpAddressNotEqual    = errors.New(`operation address not equal`)
	ErrSymbolNotEqual       = errors.New(`symbol not equal`)
	ErrRecipientDuplicate   = errors.New(`errors recipient duplicate`)
)
View Source
var (
	ErrAmountInsuficcient = errors.New(`amount insufficient`)

	StateMappings = m.StateMappings{}.
					Add(&Balance{},
			m.PKeySchema(&BalanceId{}),
			m.List(&Balances{}),
		).
		Add(&UTXO{},

			m.PKeySchema(&UTXOId{}),
			m.List(&UTXOs{}),
		).
		Add(&TokenType{},
			m.PKeySchema(&TokenTypeId{}),
			m.List(&TokenTypes{})).
		Add(&TokenGroup{},
			m.PKeySchema(&TokenGroupId{}),
			m.List(&TokenGroups{})).
		Add(&Config{},
			m.WithConstPKey())

	EventMappings = m.EventMappings{}.
					Add(&Transferred{}).
					Add(&TransferredBatch{}).
					Add(&TokenTypeCreated{}).
					Add(&TokenGroupCreated{})
)
View Source
var (
	TokenGroupType_name = map[int32]string{
		0: "OPTIONAL",
		1: "REQUIRED",
		3: "NOT_ALLOWED",
	}
	TokenGroupType_value = map[string]int32{
		"OPTIONAL":    0,
		"REQUIRED":    1,
		"NOT_ALLOWED": 3,
	}
)

Enum value maps for TokenGroupType.

View Source
var BalanceServiceSwagger []byte
View Source
var (
	ErrTokenAlreadyExists = errors.New(`token already exists`)
)
View Source
var File_token_balance_proto protoreflect.FileDescriptor
View Source
var File_token_token_proto protoreflect.FileDescriptor
View Source
var TokenServiceSwagger []byte

Functions

func Event

func Event(ctx router.Context) state.Event

Event with chaincode mappings

func RegisterBalanceServiceChaincode

func RegisterBalanceServiceChaincode(r *cckit_router.Group, cc BalanceServiceChaincode) error

RegisterBalanceServiceChaincode registers service methods as chaincode router handlers

func RegisterBalanceServiceHandler

func RegisterBalanceServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterBalanceServiceHandler registers the http handlers for service BalanceService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterBalanceServiceHandlerClient

func RegisterBalanceServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BalanceServiceClient) error

RegisterBalanceServiceHandlerClient registers the http handlers for service BalanceService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "BalanceServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "BalanceServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "BalanceServiceClient" to call the correct interceptors.

func RegisterBalanceServiceHandlerFromEndpoint

func RegisterBalanceServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterBalanceServiceHandlerFromEndpoint is same as RegisterBalanceServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterBalanceServiceHandlerServer

func RegisterBalanceServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BalanceServiceServer) error

RegisterBalanceServiceHandlerServer registers the http handlers for service BalanceService to "mux". UnaryRPC :call BalanceServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterBalanceServiceHandlerFromEndpoint instead.

func RegisterBalanceServiceServer

func RegisterBalanceServiceServer(s *grpc.Server, srv BalanceServiceServer)

func RegisterTokenServiceChaincode

func RegisterTokenServiceChaincode(r *cckit_router.Group, cc TokenServiceChaincode) error

RegisterTokenServiceChaincode registers service methods as chaincode router handlers

func RegisterTokenServiceHandler

func RegisterTokenServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterTokenServiceHandler registers the http handlers for service TokenService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterTokenServiceHandlerClient

func RegisterTokenServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TokenServiceClient) error

RegisterTokenServiceHandlerClient registers the http handlers for service TokenService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TokenServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TokenServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "TokenServiceClient" to call the correct interceptors.

func RegisterTokenServiceHandlerFromEndpoint

func RegisterTokenServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterTokenServiceHandlerFromEndpoint is same as RegisterTokenServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterTokenServiceHandlerServer

func RegisterTokenServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TokenServiceServer) error

RegisterTokenServiceHandlerServer registers the http handlers for service TokenService to "mux". UnaryRPC :call TokenServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterTokenServiceHandlerFromEndpoint instead.

func RegisterTokenServiceServer

func RegisterTokenServiceServer(s *grpc.Server, srv TokenServiceServer)

func State

func State(ctx router.Context) m.MappedState

State with chaincode mappings

func UTXOKey

func UTXOKey(utxo *UTXO) state.Key

func UTXOKeyBase

func UTXOKeyBase(utxo *UTXO) state.Key

Types

type AccountStore

type AccountStore struct {
}

func NewAccountStore

func NewAccountStore() *AccountStore

func (*AccountStore) Burn

func (s *AccountStore) Burn(ctx router.Context, op *BalanceOperation) error

func (*AccountStore) BurnAllLock

func (s *AccountStore) BurnAllLock(router.Context, *BalanceOperation) error

func (*AccountStore) BurnLock

func (s *AccountStore) BurnLock(ctx router.Context, id *LockId) error

func (*AccountStore) Get

func (s *AccountStore) Get(ctx router.Context, id *BalanceId) (*Balance, error)

func (*AccountStore) GetLocked

func (s *AccountStore) GetLocked(ctx router.Context, balanceId *BalanceId) (*Balance, error)

func (*AccountStore) GetUTXO added in v1.0.3

func (s *AccountStore) GetUTXO(ctx router.Context, utxoId *UTXOId) (*UTXO, error)

func (*AccountStore) List

func (s *AccountStore) List(ctx router.Context, id *TokenId) ([]*Balance, error)

func (*AccountStore) Lock

func (s *AccountStore) Lock(ctx router.Context, burn *BalanceOperation) (*LockId, error)

func (*AccountStore) LockAll

func (*AccountStore) LockBatch added in v1.0.3

func (u *AccountStore) LockBatch(ctx router.Context, ops []*BalanceOperation) ([]*LockId, error)

func (*AccountStore) Mint

func (s *AccountStore) Mint(ctx router.Context, op *BalanceOperation) error

func (*AccountStore) Transfer

func (s *AccountStore) Transfer(ctx router.Context, transfer *TransferOperation) error

func (*AccountStore) TransferBatch

func (s *AccountStore) TransferBatch(ctx router.Context, transfers []*TransferOperation) error

func (*AccountStore) TransferLock

func (u *AccountStore) TransferLock(ctx router.Context, id *LockId, transfer *TransferOperation) error

todo: add TransferLock implementation

func (*AccountStore) Unlock

func (s *AccountStore) Unlock(ctx router.Context, id *LockId) error

type AddMetaRequest

type AddMetaRequest struct {
	Key   string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*AddMetaRequest) Descriptor deprecated

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

Deprecated: Use AddMetaRequest.ProtoReflect.Descriptor instead.

func (*AddMetaRequest) GetKey

func (x *AddMetaRequest) GetKey() string

func (*AddMetaRequest) GetValue

func (x *AddMetaRequest) GetValue() string

func (*AddMetaRequest) ProtoMessage

func (*AddMetaRequest) ProtoMessage()

func (*AddMetaRequest) ProtoReflect

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

func (*AddMetaRequest) Reset

func (x *AddMetaRequest) Reset()

func (*AddMetaRequest) String

func (x *AddMetaRequest) String() string

func (*AddMetaRequest) Validate

func (this *AddMetaRequest) Validate() error

type Balance

type Balance struct {

	// Token symbol
	Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"`
	// Token group
	Group []string `protobuf:"bytes,2,rep,name=group,proto3" json:"group,omitempty"`
	// account address
	Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`
	// Balance amount
	Amount *decimal.Decimal `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"`
	// contains filtered or unexported fields
}

State: Balance

func (*Balance) Descriptor deprecated

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

Deprecated: Use Balance.ProtoReflect.Descriptor instead.

func (*Balance) GetAddress

func (x *Balance) GetAddress() string

func (*Balance) GetAmount

func (x *Balance) GetAmount() *decimal.Decimal

func (*Balance) GetGroup

func (x *Balance) GetGroup() []string

func (*Balance) GetSymbol

func (x *Balance) GetSymbol() string

func (*Balance) ProtoMessage

func (*Balance) ProtoMessage()

func (*Balance) ProtoReflect

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

func (*Balance) Reset

func (x *Balance) Reset()

func (*Balance) String

func (x *Balance) String() string

func (*Balance) Validate

func (this *Balance) Validate() error

type BalanceId

type BalanceId struct {
	Symbol  string   `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"`
	Group   []string `protobuf:"bytes,3,rep,name=group,proto3" json:"group,omitempty"`
	Address string   `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// contains filtered or unexported fields
}

Identifier: Balance

func (*BalanceId) Descriptor deprecated

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

Deprecated: Use BalanceId.ProtoReflect.Descriptor instead.

func (*BalanceId) GetAddress

func (x *BalanceId) GetAddress() string

func (*BalanceId) GetGroup

func (x *BalanceId) GetGroup() []string

func (*BalanceId) GetSymbol

func (x *BalanceId) GetSymbol() string

func (*BalanceId) ProtoMessage

func (*BalanceId) ProtoMessage()

func (*BalanceId) ProtoReflect

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

func (*BalanceId) Reset

func (x *BalanceId) Reset()

func (*BalanceId) String

func (x *BalanceId) String() string

func (*BalanceId) Validate

func (this *BalanceId) Validate() error

type BalanceOperation

type BalanceOperation struct {
	Address string            `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	Symbol  string            `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"`
	Group   []string          `protobuf:"bytes,3,rep,name=group,proto3" json:"group,omitempty"`
	Amount  *decimal.Decimal  `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"`
	Meta    []*AddMetaRequest `protobuf:"bytes,5,rep,name=meta,proto3" json:"meta,omitempty"`
	// contains filtered or unexported fields
}

func (*BalanceOperation) Descriptor deprecated

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

Deprecated: Use BalanceOperation.ProtoReflect.Descriptor instead.

func (*BalanceOperation) GetAddress

func (x *BalanceOperation) GetAddress() string

func (*BalanceOperation) GetAmount

func (x *BalanceOperation) GetAmount() *decimal.Decimal

func (*BalanceOperation) GetGroup

func (x *BalanceOperation) GetGroup() []string

func (*BalanceOperation) GetMeta

func (x *BalanceOperation) GetMeta() []*AddMetaRequest

func (*BalanceOperation) GetSymbol

func (x *BalanceOperation) GetSymbol() string

func (*BalanceOperation) ProtoMessage

func (*BalanceOperation) ProtoMessage()

func (*BalanceOperation) ProtoReflect

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

func (*BalanceOperation) Reset

func (x *BalanceOperation) Reset()

func (*BalanceOperation) String

func (x *BalanceOperation) String() string

func (*BalanceOperation) Validate

func (this *BalanceOperation) Validate() error

type BalanceService

type BalanceService struct {
	Account account.Getter
	Token   TokenGetter
	Store   BalanceStore
}

func NewBalanceService

func NewBalanceService(
	accountResolver account.Getter,
	tokenGetter TokenGetter,
	store BalanceStore) *BalanceService

func (*BalanceService) GetBalance

func (s *BalanceService) GetBalance(ctx router.Context, id *BalanceId) (*Balance, error)

func (*BalanceService) ListBalances

func (s *BalanceService) ListBalances(ctx router.Context, id *BalanceId) (*Balances, error)

func (*BalanceService) Transfer

func (s *BalanceService) Transfer(ctx router.Context, transfer *TransferRequest) (*TransferResponse, error)

func (*BalanceService) TransferBatch

func (s *BalanceService) TransferBatch(ctx router.Context, transferBatch *TransferBatchRequest) (*TransferBatchResponse, error)

type BalanceServiceChaincode

type BalanceServiceChaincode interface {
	GetBalance(cckit_router.Context, *BalanceId) (*Balance, error)

	ListBalances(cckit_router.Context, *BalanceId) (*Balances, error)

	Transfer(cckit_router.Context, *TransferRequest) (*TransferResponse, error)

	TransferBatch(cckit_router.Context, *TransferBatchRequest) (*TransferBatchResponse, error)
}

BalanceServiceChaincode chaincode methods interface

type BalanceServiceClient

type BalanceServiceClient interface {
	// Returns the amount of tokens owned by account.
	GetBalance(ctx context.Context, in *BalanceId, opts ...grpc.CallOption) (*Balance, error)
	ListBalances(ctx context.Context, in *BalanceId, opts ...grpc.CallOption) (*Balances, error)
	// Moves amount tokens from the caller’s account to recipient.
	// Returns transfer details
	Transfer(ctx context.Context, in *TransferRequest, opts ...grpc.CallOption) (*TransferResponse, error)
	TransferBatch(ctx context.Context, in *TransferBatchRequest, opts ...grpc.CallOption) (*TransferBatchResponse, error)
}

BalanceServiceClient is the client API for BalanceService service.

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

type BalanceServiceGateway

type BalanceServiceGateway struct {
	ChaincodeInstance cckit_gateway.ChaincodeInstance
}

gateway implementation gateway can be used as kind of SDK, GRPC or REST server ( via grpc-gateway or clay )

func NewBalanceServiceGateway

func NewBalanceServiceGateway(sdk cckit_sdk.SDK, channel, chaincode string, opts ...cckit_gateway.Opt) *BalanceServiceGateway

NewBalanceServiceGateway creates gateway to access chaincode method via chaincode service

func NewBalanceServiceGatewayFromInstance

func NewBalanceServiceGatewayFromInstance(chaincodeInstance cckit_gateway.ChaincodeInstance) *BalanceServiceGateway

func (*BalanceServiceGateway) GetBalance

func (c *BalanceServiceGateway) GetBalance(ctx context.Context, in *BalanceId) (*Balance, error)

func (*BalanceServiceGateway) Invoker

func (*BalanceServiceGateway) ListBalances

func (c *BalanceServiceGateway) ListBalances(ctx context.Context, in *BalanceId) (*Balances, error)

func (*BalanceServiceGateway) ServiceDef

ServiceDef returns service definition

func (*BalanceServiceGateway) Transfer

func (*BalanceServiceGateway) TransferBatch

type BalanceServiceServer

type BalanceServiceServer interface {
	// Returns the amount of tokens owned by account.
	GetBalance(context.Context, *BalanceId) (*Balance, error)
	ListBalances(context.Context, *BalanceId) (*Balances, error)
	// Moves amount tokens from the caller’s account to recipient.
	// Returns transfer details
	Transfer(context.Context, *TransferRequest) (*TransferResponse, error)
	TransferBatch(context.Context, *TransferBatchRequest) (*TransferBatchResponse, error)
}

BalanceServiceServer is the server API for BalanceService service.

type Balances

type Balances struct {
	Items []*Balance `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

List: balances

func (*Balances) Descriptor deprecated

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

Deprecated: Use Balances.ProtoReflect.Descriptor instead.

func (*Balances) GetItems

func (x *Balances) GetItems() []*Balance

func (*Balances) ProtoMessage

func (*Balances) ProtoMessage()

func (*Balances) ProtoReflect

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

func (*Balances) Reset

func (x *Balances) Reset()

func (*Balances) String

func (x *Balances) String() string

func (*Balances) Validate

func (this *Balances) Validate() error

type Config

type Config struct {
	DefaultToken      *TokenId `protobuf:"bytes,1,opt,name=default_token,json=defaultToken,proto3" json:"default_token,omitempty"`
	MaxTokenTypesNum  int32    `protobuf:"varint,2,opt,name=max_token_types_num,json=maxTokenTypesNum,proto3" json:"max_token_types_num,omitempty"`
	MaxTokenGroupsNum int32    `protobuf:"varint,3,opt,name=max_token_groups_num,json=maxTokenGroupsNum,proto3" json:"max_token_groups_num,omitempty"`
	// contains filtered or unexported fields
}

func (*Config) Descriptor deprecated

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

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetDefaultToken

func (x *Config) GetDefaultToken() *TokenId

func (*Config) GetMaxTokenGroupsNum

func (x *Config) GetMaxTokenGroupsNum() int32

func (*Config) GetMaxTokenTypesNum

func (x *Config) GetMaxTokenTypesNum() int32

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect

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

func (*Config) Reset

func (x *Config) Reset()

func (*Config) String

func (x *Config) String() string

func (*Config) Validate

func (this *Config) Validate() error

type CreateTokenGroupRequest

type CreateTokenGroupRequest struct {
	Symbol      string              `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"`
	Group       []string            `protobuf:"bytes,2,rep,name=group,proto3" json:"group,omitempty"`
	Name        string              `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	TotalSupply *decimal.Decimal    `protobuf:"bytes,4,opt,name=total_supply,json=totalSupply,proto3" json:"total_supply,omitempty"` // big.Int
	Meta        []*TokenMetaRequest `protobuf:"bytes,5,rep,name=meta,proto3" json:"meta,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateTokenGroupRequest) Descriptor deprecated

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

Deprecated: Use CreateTokenGroupRequest.ProtoReflect.Descriptor instead.

func (*CreateTokenGroupRequest) GetGroup

func (x *CreateTokenGroupRequest) GetGroup() []string

func (*CreateTokenGroupRequest) GetMeta

func (x *CreateTokenGroupRequest) GetMeta() []*TokenMetaRequest

func (*CreateTokenGroupRequest) GetName

func (x *CreateTokenGroupRequest) GetName() string

func (*CreateTokenGroupRequest) GetSymbol

func (x *CreateTokenGroupRequest) GetSymbol() string

func (*CreateTokenGroupRequest) GetTotalSupply

func (x *CreateTokenGroupRequest) GetTotalSupply() *decimal.Decimal

func (*CreateTokenGroupRequest) ProtoMessage

func (*CreateTokenGroupRequest) ProtoMessage()

func (*CreateTokenGroupRequest) ProtoReflect

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

func (*CreateTokenGroupRequest) Reset

func (x *CreateTokenGroupRequest) Reset()

func (*CreateTokenGroupRequest) String

func (x *CreateTokenGroupRequest) String() string

func (*CreateTokenGroupRequest) Validate

func (this *CreateTokenGroupRequest) Validate() error

type CreateTokenTypeRequest

type CreateTokenTypeRequest struct {
	Symbol      string              `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"`
	Name        string              `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Decimals    uint32              `protobuf:"varint,3,opt,name=decimals,proto3" json:"decimals,omitempty"`                         // from 0 to 8
	GroupType   TokenGroupType      ``                                                                                               /* 132-byte string literal not displayed */
	TotalSupply *decimal.Decimal    `protobuf:"bytes,5,opt,name=total_supply,json=totalSupply,proto3" json:"total_supply,omitempty"` // big.Int
	Meta        []*TokenMetaRequest `protobuf:"bytes,6,rep,name=meta,proto3" json:"meta,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateTokenTypeRequest) Descriptor deprecated

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

Deprecated: Use CreateTokenTypeRequest.ProtoReflect.Descriptor instead.

func (*CreateTokenTypeRequest) GetDecimals

func (x *CreateTokenTypeRequest) GetDecimals() uint32

func (*CreateTokenTypeRequest) GetGroupType

func (x *CreateTokenTypeRequest) GetGroupType() TokenGroupType

func (*CreateTokenTypeRequest) GetMeta

func (x *CreateTokenTypeRequest) GetMeta() []*TokenMetaRequest

func (*CreateTokenTypeRequest) GetName

func (x *CreateTokenTypeRequest) GetName() string

func (*CreateTokenTypeRequest) GetSymbol

func (x *CreateTokenTypeRequest) GetSymbol() string

func (*CreateTokenTypeRequest) GetTotalSupply

func (x *CreateTokenTypeRequest) GetTotalSupply() *decimal.Decimal

func (*CreateTokenTypeRequest) ProtoMessage

func (*CreateTokenTypeRequest) ProtoMessage()

func (*CreateTokenTypeRequest) ProtoReflect

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

func (*CreateTokenTypeRequest) Reset

func (x *CreateTokenTypeRequest) Reset()

func (*CreateTokenTypeRequest) String

func (x *CreateTokenTypeRequest) String() string

func (*CreateTokenTypeRequest) Validate

func (this *CreateTokenTypeRequest) Validate() error

type LockId

type LockId struct {
	Symbol  string
	Group   string
	Address string
	TxId    string
}

type Meta

type Meta struct {
	Key   string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*Meta) Descriptor deprecated

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

Deprecated: Use Meta.ProtoReflect.Descriptor instead.

func (*Meta) GetKey

func (x *Meta) GetKey() string

func (*Meta) GetValue

func (x *Meta) GetValue() string

func (*Meta) ProtoMessage

func (*Meta) ProtoMessage()

func (*Meta) ProtoReflect

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

func (*Meta) Reset

func (x *Meta) Reset()

func (*Meta) String

func (x *Meta) String() string

func (*Meta) Validate

func (this *Meta) Validate() error

type Operation

type Operation struct {
	Sender    string           `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
	Recipient string           `protobuf:"bytes,2,opt,name=recipient,proto3" json:"recipient,omitempty"`
	Symbol    string           `protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"`
	Group     []string         `protobuf:"bytes,4,rep,name=group,proto3" json:"group,omitempty"`
	Amount    *decimal.Decimal `protobuf:"bytes,5,opt,name=amount,proto3" json:"amount,omitempty"`
	Type      OperationType    `protobuf:"varint,6,opt,name=type,proto3,enum=cckit.extensions.token.OperationType" json:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*Operation) Descriptor deprecated

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

Deprecated: Use Operation.ProtoReflect.Descriptor instead.

func (*Operation) GetAmount

func (x *Operation) GetAmount() *decimal.Decimal

func (*Operation) GetGroup

func (x *Operation) GetGroup() []string

func (*Operation) GetRecipient

func (x *Operation) GetRecipient() string

func (*Operation) GetSender

func (x *Operation) GetSender() string

func (*Operation) GetSymbol

func (x *Operation) GetSymbol() string

func (*Operation) GetType

func (x *Operation) GetType() OperationType

func (*Operation) ProtoMessage

func (*Operation) ProtoMessage()

func (*Operation) ProtoReflect

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

func (*Operation) Reset

func (x *Operation) Reset()

func (*Operation) String

func (x *Operation) String() string

func (*Operation) Validate

func (this *Operation) Validate() error

type OperationType

type OperationType int32
const (
	OperationType_OPERATION_UNKNOWN  OperationType = 0
	OperationType_OPERATION_TRANSFER OperationType = 1
	OperationType_OPERATION_MINT     OperationType = 2
	OperationType_OPERATION_BURN     OperationType = 3
	OperationType_OPERATION_LOCK     OperationType = 4
)

func (OperationType) Descriptor

func (OperationType) Enum

func (x OperationType) Enum() *OperationType

func (OperationType) EnumDescriptor deprecated

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

Deprecated: Use OperationType.Descriptor instead.

func (OperationType) Number

func (OperationType) String

func (x OperationType) String() string

func (OperationType) Type

type Token

type Token struct {
	Type  *TokenType  `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	Group *TokenGroup `protobuf:"bytes,2,opt,name=group,proto3" json:"group,omitempty"`
	// contains filtered or unexported fields
}

func (*Token) Descriptor deprecated

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

Deprecated: Use Token.ProtoReflect.Descriptor instead.

func (*Token) GetGroup

func (x *Token) GetGroup() *TokenGroup

func (*Token) GetType

func (x *Token) GetType() *TokenType

func (*Token) ProtoMessage

func (*Token) ProtoMessage()

func (*Token) ProtoReflect

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

func (*Token) Reset

func (x *Token) Reset()

func (*Token) String

func (x *Token) String() string

func (*Token) Validate

func (this *Token) Validate() error

type TokenGetter

type TokenGetter interface {
	GetToken(router.Context, *TokenId) (*Token, error)
	GetDefaultToken(router.Context, *emptypb.Empty) (*Token, error)
}

type TokenGroup

type TokenGroup struct {
	Symbol      string           `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"`
	Group       []string         `protobuf:"bytes,2,rep,name=group,proto3" json:"group,omitempty"`
	Name        string           `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	TotalSupply *decimal.Decimal `protobuf:"bytes,4,opt,name=total_supply,json=totalSupply,proto3" json:"total_supply,omitempty"`
	Meta        []*TokenMeta     `protobuf:"bytes,5,rep,name=meta,proto3" json:"meta,omitempty"`
	// contains filtered or unexported fields
}

State: TokenGroup

func (*TokenGroup) Descriptor deprecated

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

Deprecated: Use TokenGroup.ProtoReflect.Descriptor instead.

func (*TokenGroup) GetGroup

func (x *TokenGroup) GetGroup() []string

func (*TokenGroup) GetMeta

func (x *TokenGroup) GetMeta() []*TokenMeta

func (*TokenGroup) GetName

func (x *TokenGroup) GetName() string

func (*TokenGroup) GetSymbol

func (x *TokenGroup) GetSymbol() string

func (*TokenGroup) GetTotalSupply

func (x *TokenGroup) GetTotalSupply() *decimal.Decimal

func (*TokenGroup) ProtoMessage

func (*TokenGroup) ProtoMessage()

func (*TokenGroup) ProtoReflect

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

func (*TokenGroup) Reset

func (x *TokenGroup) Reset()

func (*TokenGroup) String

func (x *TokenGroup) String() string

func (*TokenGroup) Validate

func (this *TokenGroup) Validate() error

type TokenGroupCreated

type TokenGroupCreated struct {
	Symbol string   `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"`
	Group  []string `protobuf:"bytes,2,rep,name=group,proto3" json:"group,omitempty"`
	Name   string   `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*TokenGroupCreated) Descriptor deprecated

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

Deprecated: Use TokenGroupCreated.ProtoReflect.Descriptor instead.

func (*TokenGroupCreated) GetGroup

func (x *TokenGroupCreated) GetGroup() []string

func (*TokenGroupCreated) GetName

func (x *TokenGroupCreated) GetName() string

func (*TokenGroupCreated) GetSymbol

func (x *TokenGroupCreated) GetSymbol() string

func (*TokenGroupCreated) ProtoMessage

func (*TokenGroupCreated) ProtoMessage()

func (*TokenGroupCreated) ProtoReflect

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

func (*TokenGroupCreated) Reset

func (x *TokenGroupCreated) Reset()

func (*TokenGroupCreated) String

func (x *TokenGroupCreated) String() string

func (*TokenGroupCreated) Validate

func (this *TokenGroupCreated) Validate() error

type TokenGroupId

type TokenGroupId struct {
	Symbol string   `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"`
	Group  []string `protobuf:"bytes,2,rep,name=group,proto3" json:"group,omitempty"`
	// contains filtered or unexported fields
}

func (*TokenGroupId) Descriptor deprecated

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

Deprecated: Use TokenGroupId.ProtoReflect.Descriptor instead.

func (*TokenGroupId) GetGroup

func (x *TokenGroupId) GetGroup() []string

func (*TokenGroupId) GetSymbol

func (x *TokenGroupId) GetSymbol() string

func (*TokenGroupId) ProtoMessage

func (*TokenGroupId) ProtoMessage()

func (*TokenGroupId) ProtoReflect

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

func (*TokenGroupId) Reset

func (x *TokenGroupId) Reset()

func (*TokenGroupId) String

func (x *TokenGroupId) String() string

func (*TokenGroupId) Validate

func (this *TokenGroupId) Validate() error

type TokenGroupType

type TokenGroupType int32
const (
	TokenGroupType_OPTIONAL    TokenGroupType = 0
	TokenGroupType_REQUIRED    TokenGroupType = 1
	TokenGroupType_NOT_ALLOWED TokenGroupType = 3
)

func (TokenGroupType) Descriptor

func (TokenGroupType) Enum

func (x TokenGroupType) Enum() *TokenGroupType

func (TokenGroupType) EnumDescriptor deprecated

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

Deprecated: Use TokenGroupType.Descriptor instead.

func (TokenGroupType) Number

func (TokenGroupType) String

func (x TokenGroupType) String() string

func (TokenGroupType) Type

type TokenGroups

type TokenGroups struct {
	Groups []*TokenGroup `protobuf:"bytes,1,rep,name=groups,proto3" json:"groups,omitempty"`
	// contains filtered or unexported fields
}

func (*TokenGroups) Descriptor deprecated

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

Deprecated: Use TokenGroups.ProtoReflect.Descriptor instead.

func (*TokenGroups) GetGroups

func (x *TokenGroups) GetGroups() []*TokenGroup

func (*TokenGroups) ProtoMessage

func (*TokenGroups) ProtoMessage()

func (*TokenGroups) ProtoReflect

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

func (*TokenGroups) Reset

func (x *TokenGroups) Reset()

func (*TokenGroups) String

func (x *TokenGroups) String() string

func (*TokenGroups) Validate

func (this *TokenGroups) Validate() error

type TokenId

type TokenId struct {
	Symbol string   `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"`
	Group  []string `protobuf:"bytes,2,rep,name=group,proto3" json:"group,omitempty"`
	// contains filtered or unexported fields
}

func CreateDefault

func CreateDefault(
	ctx router.Context, configSvc TokenServiceChaincode, createToken *CreateTokenTypeRequest) (*TokenId, error)

func (*TokenId) Descriptor deprecated

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

Deprecated: Use TokenId.ProtoReflect.Descriptor instead.

func (*TokenId) GetGroup

func (x *TokenId) GetGroup() []string

func (*TokenId) GetSymbol

func (x *TokenId) GetSymbol() string

func (*TokenId) ProtoMessage

func (*TokenId) ProtoMessage()

func (*TokenId) ProtoReflect

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

func (*TokenId) Reset

func (x *TokenId) Reset()

func (*TokenId) String

func (x *TokenId) String() string

func (*TokenId) Validate

func (this *TokenId) Validate() error

type TokenMeta

type TokenMeta struct {
	Key   string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*TokenMeta) Descriptor deprecated

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

Deprecated: Use TokenMeta.ProtoReflect.Descriptor instead.

func (*TokenMeta) GetKey

func (x *TokenMeta) GetKey() string

func (*TokenMeta) GetValue

func (x *TokenMeta) GetValue() string

func (*TokenMeta) ProtoMessage

func (*TokenMeta) ProtoMessage()

func (*TokenMeta) ProtoReflect

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

func (*TokenMeta) Reset

func (x *TokenMeta) Reset()

func (*TokenMeta) String

func (x *TokenMeta) String() string

func (*TokenMeta) Validate

func (this *TokenMeta) Validate() error

type TokenMetaRequest

type TokenMetaRequest struct {
	Key   string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*TokenMetaRequest) Descriptor deprecated

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

Deprecated: Use TokenMetaRequest.ProtoReflect.Descriptor instead.

func (*TokenMetaRequest) GetKey

func (x *TokenMetaRequest) GetKey() string

func (*TokenMetaRequest) GetValue

func (x *TokenMetaRequest) GetValue() string

func (*TokenMetaRequest) ProtoMessage

func (*TokenMetaRequest) ProtoMessage()

func (*TokenMetaRequest) ProtoReflect

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

func (*TokenMetaRequest) Reset

func (x *TokenMetaRequest) Reset()

func (*TokenMetaRequest) String

func (x *TokenMetaRequest) String() string

func (*TokenMetaRequest) Validate

func (this *TokenMetaRequest) Validate() error

type TokenService

type TokenService struct {
}

func NewTokenService

func NewTokenService() *TokenService

func (*TokenService) CreateTokenGroup

func (s *TokenService) CreateTokenGroup(ctx router.Context, req *CreateTokenGroupRequest) (*TokenGroup, error)

func (*TokenService) CreateTokenType

func (s *TokenService) CreateTokenType(ctx router.Context, req *CreateTokenTypeRequest) (*TokenType, error)

func (*TokenService) DeleteTokenGroup

func (s *TokenService) DeleteTokenGroup(ctx router.Context, id *TokenGroupId) (*Token, error)

func (*TokenService) DeleteTokenType

func (s *TokenService) DeleteTokenType(ctx router.Context, id *TokenTypeId) (*TokenType, error)

func (*TokenService) GetConfig

func (s *TokenService) GetConfig(ctx router.Context, _ *emptypb.Empty) (*Config, error)

func (*TokenService) GetDefaultToken

func (s *TokenService) GetDefaultToken(ctx router.Context, _ *emptypb.Empty) (*Token, error)

func (*TokenService) GetToken

func (s *TokenService) GetToken(ctx router.Context, id *TokenId) (*Token, error)

GetToken naming for token is[{TokenType}, {GroupIdPart1}, {GroupIdPart2}]

func (*TokenService) GetTokenGroup

func (s *TokenService) GetTokenGroup(ctx router.Context, id *TokenGroupId) (*TokenGroup, error)

func (*TokenService) GetTokenGroups

func (s *TokenService) GetTokenGroups(ctx router.Context, id *TokenTypeId) (*TokenGroups, error)

func (*TokenService) GetTokenType

func (s *TokenService) GetTokenType(ctx router.Context, id *TokenTypeId) (*TokenType, error)

func (*TokenService) ListTokenTypes

func (s *TokenService) ListTokenTypes(ctx router.Context, _ *emptypb.Empty) (*TokenTypes, error)

func (*TokenService) SetConfig

func (s *TokenService) SetConfig(ctx router.Context, config *Config) (*Config, error)

func (*TokenService) UpdateTokenType

func (s *TokenService) UpdateTokenType(ctx router.Context, request *UpdateTokenTypeRequest) (*TokenType, error)

type TokenServiceChaincode

TokenServiceChaincode chaincode methods interface

type TokenServiceClient

type TokenServiceClient interface {
	GetConfig(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Config, error)
	SetConfig(ctx context.Context, in *Config, opts ...grpc.CallOption) (*Config, error)
	GetToken(ctx context.Context, in *TokenId, opts ...grpc.CallOption) (*Token, error)
	GetDefaultToken(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Token, error)
	CreateTokenType(ctx context.Context, in *CreateTokenTypeRequest, opts ...grpc.CallOption) (*TokenType, error)
	GetTokenType(ctx context.Context, in *TokenTypeId, opts ...grpc.CallOption) (*TokenType, error)
	ListTokenTypes(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*TokenTypes, error)
	UpdateTokenType(ctx context.Context, in *UpdateTokenTypeRequest, opts ...grpc.CallOption) (*TokenType, error)
	DeleteTokenType(ctx context.Context, in *TokenTypeId, opts ...grpc.CallOption) (*TokenType, error)
	GetTokenGroups(ctx context.Context, in *TokenTypeId, opts ...grpc.CallOption) (*TokenGroups, error)
	CreateTokenGroup(ctx context.Context, in *CreateTokenGroupRequest, opts ...grpc.CallOption) (*TokenGroup, error)
	GetTokenGroup(ctx context.Context, in *TokenGroupId, opts ...grpc.CallOption) (*TokenGroup, error)
	DeleteTokenGroup(ctx context.Context, in *TokenGroupId, opts ...grpc.CallOption) (*Token, error)
}

TokenServiceClient is the client API for TokenService service.

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

type TokenServiceGateway

type TokenServiceGateway struct {
	ChaincodeInstance cckit_gateway.ChaincodeInstance
}

gateway implementation gateway can be used as kind of SDK, GRPC or REST server ( via grpc-gateway or clay )

func NewTokenServiceGateway

func NewTokenServiceGateway(sdk cckit_sdk.SDK, channel, chaincode string, opts ...cckit_gateway.Opt) *TokenServiceGateway

NewTokenServiceGateway creates gateway to access chaincode method via chaincode service

func NewTokenServiceGatewayFromInstance

func NewTokenServiceGatewayFromInstance(chaincodeInstance cckit_gateway.ChaincodeInstance) *TokenServiceGateway

func (*TokenServiceGateway) CreateTokenGroup

func (c *TokenServiceGateway) CreateTokenGroup(ctx context.Context, in *CreateTokenGroupRequest) (*TokenGroup, error)

func (*TokenServiceGateway) CreateTokenType

func (c *TokenServiceGateway) CreateTokenType(ctx context.Context, in *CreateTokenTypeRequest) (*TokenType, error)

func (*TokenServiceGateway) DeleteTokenGroup

func (c *TokenServiceGateway) DeleteTokenGroup(ctx context.Context, in *TokenGroupId) (*Token, error)

func (*TokenServiceGateway) DeleteTokenType

func (c *TokenServiceGateway) DeleteTokenType(ctx context.Context, in *TokenTypeId) (*TokenType, error)

func (*TokenServiceGateway) GetConfig

func (c *TokenServiceGateway) GetConfig(ctx context.Context, in *emptypb.Empty) (*Config, error)

func (*TokenServiceGateway) GetDefaultToken

func (c *TokenServiceGateway) GetDefaultToken(ctx context.Context, in *emptypb.Empty) (*Token, error)

func (*TokenServiceGateway) GetToken

func (c *TokenServiceGateway) GetToken(ctx context.Context, in *TokenId) (*Token, error)

func (*TokenServiceGateway) GetTokenGroup

func (c *TokenServiceGateway) GetTokenGroup(ctx context.Context, in *TokenGroupId) (*TokenGroup, error)

func (*TokenServiceGateway) GetTokenGroups

func (c *TokenServiceGateway) GetTokenGroups(ctx context.Context, in *TokenTypeId) (*TokenGroups, error)

func (*TokenServiceGateway) GetTokenType

func (c *TokenServiceGateway) GetTokenType(ctx context.Context, in *TokenTypeId) (*TokenType, error)

func (*TokenServiceGateway) Invoker

func (*TokenServiceGateway) ListTokenTypes

func (c *TokenServiceGateway) ListTokenTypes(ctx context.Context, in *emptypb.Empty) (*TokenTypes, error)

func (*TokenServiceGateway) ServiceDef

ServiceDef returns service definition

func (*TokenServiceGateway) SetConfig

func (c *TokenServiceGateway) SetConfig(ctx context.Context, in *Config) (*Config, error)

func (*TokenServiceGateway) UpdateTokenType

func (c *TokenServiceGateway) UpdateTokenType(ctx context.Context, in *UpdateTokenTypeRequest) (*TokenType, error)

type TokenServiceServer

type TokenServiceServer interface {
	GetConfig(context.Context, *emptypb.Empty) (*Config, error)
	SetConfig(context.Context, *Config) (*Config, error)
	GetToken(context.Context, *TokenId) (*Token, error)
	GetDefaultToken(context.Context, *emptypb.Empty) (*Token, error)
	CreateTokenType(context.Context, *CreateTokenTypeRequest) (*TokenType, error)
	GetTokenType(context.Context, *TokenTypeId) (*TokenType, error)
	ListTokenTypes(context.Context, *emptypb.Empty) (*TokenTypes, error)
	UpdateTokenType(context.Context, *UpdateTokenTypeRequest) (*TokenType, error)
	DeleteTokenType(context.Context, *TokenTypeId) (*TokenType, error)
	GetTokenGroups(context.Context, *TokenTypeId) (*TokenGroups, error)
	CreateTokenGroup(context.Context, *CreateTokenGroupRequest) (*TokenGroup, error)
	GetTokenGroup(context.Context, *TokenGroupId) (*TokenGroup, error)
	DeleteTokenGroup(context.Context, *TokenGroupId) (*Token, error)
}

TokenServiceServer is the server API for TokenService service.

type TokenType

type TokenType struct {
	Symbol      string           `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"`
	Name        string           `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Decimals    uint32           `protobuf:"varint,3,opt,name=decimals,proto3" json:"decimals,omitempty"`
	TotalSupply *decimal.Decimal `protobuf:"bytes,4,opt,name=total_supply,json=totalSupply,proto3" json:"total_supply,omitempty"`
	GroupType   TokenGroupType   `` /* 132-byte string literal not displayed */
	Meta        []*TokenMeta     `protobuf:"bytes,6,rep,name=meta,proto3" json:"meta,omitempty"`
	// contains filtered or unexported fields
}

State: TokenType

func (*TokenType) Descriptor deprecated

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

Deprecated: Use TokenType.ProtoReflect.Descriptor instead.

func (*TokenType) GetDecimals

func (x *TokenType) GetDecimals() uint32

func (*TokenType) GetGroupType

func (x *TokenType) GetGroupType() TokenGroupType

func (*TokenType) GetMeta

func (x *TokenType) GetMeta() []*TokenMeta

func (*TokenType) GetName

func (x *TokenType) GetName() string

func (*TokenType) GetSymbol

func (x *TokenType) GetSymbol() string

func (*TokenType) GetTotalSupply

func (x *TokenType) GetTotalSupply() *decimal.Decimal

func (*TokenType) ProtoMessage

func (*TokenType) ProtoMessage()

func (*TokenType) ProtoReflect

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

func (*TokenType) Reset

func (x *TokenType) Reset()

func (*TokenType) String

func (x *TokenType) String() string

func (*TokenType) Validate

func (this *TokenType) Validate() error

type TokenTypeCreated

type TokenTypeCreated struct {
	Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"`
	Name   string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*TokenTypeCreated) Descriptor deprecated

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

Deprecated: Use TokenTypeCreated.ProtoReflect.Descriptor instead.

func (*TokenTypeCreated) GetName

func (x *TokenTypeCreated) GetName() string

func (*TokenTypeCreated) GetSymbol

func (x *TokenTypeCreated) GetSymbol() string

func (*TokenTypeCreated) ProtoMessage

func (*TokenTypeCreated) ProtoMessage()

func (*TokenTypeCreated) ProtoReflect

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

func (*TokenTypeCreated) Reset

func (x *TokenTypeCreated) Reset()

func (*TokenTypeCreated) String

func (x *TokenTypeCreated) String() string

func (*TokenTypeCreated) Validate

func (this *TokenTypeCreated) Validate() error

type TokenTypeId

type TokenTypeId struct {
	Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"`
	// contains filtered or unexported fields
}

Id: toke type id

func (*TokenTypeId) Descriptor deprecated

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

Deprecated: Use TokenTypeId.ProtoReflect.Descriptor instead.

func (*TokenTypeId) GetSymbol

func (x *TokenTypeId) GetSymbol() string

func (*TokenTypeId) ProtoMessage

func (*TokenTypeId) ProtoMessage()

func (*TokenTypeId) ProtoReflect

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

func (*TokenTypeId) Reset

func (x *TokenTypeId) Reset()

func (*TokenTypeId) String

func (x *TokenTypeId) String() string

func (*TokenTypeId) Validate

func (this *TokenTypeId) Validate() error

type TokenTypes

type TokenTypes struct {
	Types []*TokenType `protobuf:"bytes,1,rep,name=types,proto3" json:"types,omitempty"`
	// contains filtered or unexported fields
}

func (*TokenTypes) Descriptor deprecated

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

Deprecated: Use TokenTypes.ProtoReflect.Descriptor instead.

func (*TokenTypes) GetTypes

func (x *TokenTypes) GetTypes() []*TokenType

func (*TokenTypes) ProtoMessage

func (*TokenTypes) ProtoMessage()

func (*TokenTypes) ProtoReflect

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

func (*TokenTypes) Reset

func (x *TokenTypes) Reset()

func (*TokenTypes) String

func (x *TokenTypes) String() string

func (*TokenTypes) Validate

func (this *TokenTypes) Validate() error

type TransferBatchRequest

type TransferBatchRequest struct {
	Transfers []*TransferRequest `protobuf:"bytes,1,rep,name=transfers,proto3" json:"transfers,omitempty"`
	// contains filtered or unexported fields
}

func (*TransferBatchRequest) Descriptor deprecated

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

Deprecated: Use TransferBatchRequest.ProtoReflect.Descriptor instead.

func (*TransferBatchRequest) GetTransfers

func (x *TransferBatchRequest) GetTransfers() []*TransferRequest

func (*TransferBatchRequest) ProtoMessage

func (*TransferBatchRequest) ProtoMessage()

func (*TransferBatchRequest) ProtoReflect

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

func (*TransferBatchRequest) Reset

func (x *TransferBatchRequest) Reset()

func (*TransferBatchRequest) String

func (x *TransferBatchRequest) String() string

func (*TransferBatchRequest) Validate

func (this *TransferBatchRequest) Validate() error

type TransferBatchResponse

type TransferBatchResponse struct {
	Transfers []*TransferResponse `protobuf:"bytes,1,rep,name=transfers,proto3" json:"transfers,omitempty"`
	// contains filtered or unexported fields
}

func (*TransferBatchResponse) Descriptor deprecated

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

Deprecated: Use TransferBatchResponse.ProtoReflect.Descriptor instead.

func (*TransferBatchResponse) GetTransfers

func (x *TransferBatchResponse) GetTransfers() []*TransferResponse

func (*TransferBatchResponse) ProtoMessage

func (*TransferBatchResponse) ProtoMessage()

func (*TransferBatchResponse) ProtoReflect

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

func (*TransferBatchResponse) Reset

func (x *TransferBatchResponse) Reset()

func (*TransferBatchResponse) String

func (x *TransferBatchResponse) String() string

func (*TransferBatchResponse) Validate

func (this *TransferBatchResponse) Validate() error

type TransferOperation

type TransferOperation struct {
	Sender    string            `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
	Recipient string            `protobuf:"bytes,2,opt,name=recipient,proto3" json:"recipient,omitempty"`
	Symbol    string            `protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"`
	Group     []string          `protobuf:"bytes,4,rep,name=group,proto3" json:"group,omitempty"`
	Amount    *decimal.Decimal  `protobuf:"bytes,5,opt,name=amount,proto3" json:"amount,omitempty"`
	Meta      []*AddMetaRequest `protobuf:"bytes,6,rep,name=meta,proto3" json:"meta,omitempty"`
	// contains filtered or unexported fields
}

func (*TransferOperation) Descriptor deprecated

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

Deprecated: Use TransferOperation.ProtoReflect.Descriptor instead.

func (*TransferOperation) GetAmount

func (x *TransferOperation) GetAmount() *decimal.Decimal

func (*TransferOperation) GetGroup

func (x *TransferOperation) GetGroup() []string

func (*TransferOperation) GetMeta

func (x *TransferOperation) GetMeta() []*AddMetaRequest

func (*TransferOperation) GetRecipient

func (x *TransferOperation) GetRecipient() string

func (*TransferOperation) GetSender

func (x *TransferOperation) GetSender() string

func (*TransferOperation) GetSymbol

func (x *TransferOperation) GetSymbol() string

func (*TransferOperation) ProtoMessage

func (*TransferOperation) ProtoMessage()

func (*TransferOperation) ProtoReflect

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

func (*TransferOperation) Reset

func (x *TransferOperation) Reset()

func (*TransferOperation) String

func (x *TransferOperation) String() string

func (*TransferOperation) Validate

func (this *TransferOperation) Validate() error

type TransferRequest

type TransferRequest struct {
	Recipient string            `protobuf:"bytes,1,opt,name=recipient,proto3" json:"recipient,omitempty"`
	Symbol    string            `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"`
	Group     []string          `protobuf:"bytes,3,rep,name=group,proto3" json:"group,omitempty"`
	Amount    *decimal.Decimal  `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"`
	Meta      []*AddMetaRequest `protobuf:"bytes,5,rep,name=meta,proto3" json:"meta,omitempty"`
	// contains filtered or unexported fields
}

func (*TransferRequest) Descriptor deprecated

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

Deprecated: Use TransferRequest.ProtoReflect.Descriptor instead.

func (*TransferRequest) GetAmount

func (x *TransferRequest) GetAmount() *decimal.Decimal

func (*TransferRequest) GetGroup

func (x *TransferRequest) GetGroup() []string

func (*TransferRequest) GetMeta

func (x *TransferRequest) GetMeta() []*AddMetaRequest

func (*TransferRequest) GetRecipient

func (x *TransferRequest) GetRecipient() string

func (*TransferRequest) GetSymbol

func (x *TransferRequest) GetSymbol() string

func (*TransferRequest) ProtoMessage

func (*TransferRequest) ProtoMessage()

func (*TransferRequest) ProtoReflect

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

func (*TransferRequest) Reset

func (x *TransferRequest) Reset()

func (*TransferRequest) String

func (x *TransferRequest) String() string

func (*TransferRequest) Validate

func (this *TransferRequest) Validate() error

type TransferResponse

type TransferResponse struct {
	Sender    string           `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
	Recipient string           `protobuf:"bytes,2,opt,name=recipient,proto3" json:"recipient,omitempty"`
	Symbol    string           `protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"`
	Group     []string         `protobuf:"bytes,4,rep,name=group,proto3" json:"group,omitempty"`
	Amount    *decimal.Decimal `protobuf:"bytes,5,opt,name=amount,proto3" json:"amount,omitempty"`
	Meta      []*Meta          `protobuf:"bytes,6,rep,name=meta,proto3" json:"meta,omitempty"`
	// contains filtered or unexported fields
}

func (*TransferResponse) Descriptor deprecated

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

Deprecated: Use TransferResponse.ProtoReflect.Descriptor instead.

func (*TransferResponse) GetAmount

func (x *TransferResponse) GetAmount() *decimal.Decimal

func (*TransferResponse) GetGroup

func (x *TransferResponse) GetGroup() []string

func (*TransferResponse) GetMeta

func (x *TransferResponse) GetMeta() []*Meta

func (*TransferResponse) GetRecipient

func (x *TransferResponse) GetRecipient() string

func (*TransferResponse) GetSender

func (x *TransferResponse) GetSender() string

func (*TransferResponse) GetSymbol

func (x *TransferResponse) GetSymbol() string

func (*TransferResponse) ProtoMessage

func (*TransferResponse) ProtoMessage()

func (*TransferResponse) ProtoReflect

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

func (*TransferResponse) Reset

func (x *TransferResponse) Reset()

func (*TransferResponse) String

func (x *TransferResponse) String() string

func (*TransferResponse) Validate

func (this *TransferResponse) Validate() error

type Transferred

type Transferred struct {
	Sender    string           `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
	Recipient string           `protobuf:"bytes,2,opt,name=recipient,proto3" json:"recipient,omitempty"`
	Symbol    string           `protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"`
	Group     []string         `protobuf:"bytes,4,rep,name=group,proto3" json:"group,omitempty"`
	Amount    *decimal.Decimal `protobuf:"bytes,5,opt,name=amount,proto3" json:"amount,omitempty"`
	Meta      []*Meta          `protobuf:"bytes,6,rep,name=meta,proto3" json:"meta,omitempty"`
	// contains filtered or unexported fields
}

Event: emitted when Transfer method has been invoked

func (*Transferred) Descriptor deprecated

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

Deprecated: Use Transferred.ProtoReflect.Descriptor instead.

func (*Transferred) GetAmount

func (x *Transferred) GetAmount() *decimal.Decimal

func (*Transferred) GetGroup

func (x *Transferred) GetGroup() []string

func (*Transferred) GetMeta

func (x *Transferred) GetMeta() []*Meta

func (*Transferred) GetRecipient

func (x *Transferred) GetRecipient() string

func (*Transferred) GetSender

func (x *Transferred) GetSender() string

func (*Transferred) GetSymbol

func (x *Transferred) GetSymbol() string

func (*Transferred) ProtoMessage

func (*Transferred) ProtoMessage()

func (*Transferred) ProtoReflect

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

func (*Transferred) Reset

func (x *Transferred) Reset()

func (*Transferred) String

func (x *Transferred) String() string

func (*Transferred) Validate

func (this *Transferred) Validate() error

type TransferredBatch

type TransferredBatch struct {
	Transfers []*Transferred `protobuf:"bytes,1,rep,name=transfers,proto3" json:"transfers,omitempty"`
	// contains filtered or unexported fields
}

Event: emitted when TransferBatch method has been invoked

func (*TransferredBatch) Descriptor deprecated

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

Deprecated: Use TransferredBatch.ProtoReflect.Descriptor instead.

func (*TransferredBatch) GetTransfers

func (x *TransferredBatch) GetTransfers() []*Transferred

func (*TransferredBatch) ProtoMessage

func (*TransferredBatch) ProtoMessage()

func (*TransferredBatch) ProtoReflect

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

func (*TransferredBatch) Reset

func (x *TransferredBatch) Reset()

func (*TransferredBatch) String

func (x *TransferredBatch) String() string

func (*TransferredBatch) Validate

func (this *TransferredBatch) Validate() error

type UTXO

type UTXO struct {
	Symbol  string           `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"`         // Token symbol
	Group   string           `protobuf:"bytes,2,opt,name=group,proto3" json:"group,omitempty"`           // Token groups, joined
	Address string           `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`       // account address
	TxId    string           `protobuf:"bytes,4,opt,name=tx_id,json=txId,proto3" json:"tx_id,omitempty"` // Transaction Id
	Amount  *decimal.Decimal `protobuf:"bytes,6,opt,name=amount,proto3" json:"amount,omitempty"`         // amount
	Locked  bool             `protobuf:"varint,7,opt,name=locked,proto3" json:"locked,omitempty"`
	Meta    []*Meta          `protobuf:"bytes,8,rep,name=meta,proto3" json:"meta,omitempty"` // meta
	// contains filtered or unexported fields
}

State: UTXO

func (*UTXO) Descriptor deprecated

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

Deprecated: Use UTXO.ProtoReflect.Descriptor instead.

func (*UTXO) GetAddress

func (x *UTXO) GetAddress() string

func (*UTXO) GetAmount

func (x *UTXO) GetAmount() *decimal.Decimal

func (*UTXO) GetGroup

func (x *UTXO) GetGroup() string

func (*UTXO) GetLocked

func (x *UTXO) GetLocked() bool

func (*UTXO) GetMeta

func (x *UTXO) GetMeta() []*Meta

func (*UTXO) GetSymbol

func (x *UTXO) GetSymbol() string

func (*UTXO) GetTxId

func (x *UTXO) GetTxId() string

func (*UTXO) ID

func (u *UTXO) ID() *UTXOId

func (*UTXO) ProtoMessage

func (*UTXO) ProtoMessage()

func (*UTXO) ProtoReflect

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

func (*UTXO) Reset

func (x *UTXO) Reset()

func (*UTXO) String

func (x *UTXO) String() string

func (*UTXO) Validate

func (this *UTXO) Validate() error

type UTXOId

type UTXOId struct {
	Symbol  string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"`
	Group   string `protobuf:"bytes,2,opt,name=group,proto3" json:"group,omitempty"` // !!!! should be repeated
	Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`
	TxId    string `protobuf:"bytes,4,opt,name=tx_id,json=txId,proto3" json:"tx_id,omitempty"`
	// contains filtered or unexported fields
}

Id: UTXO

func (*UTXOId) Descriptor deprecated

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

Deprecated: Use UTXOId.ProtoReflect.Descriptor instead.

func (*UTXOId) GetAddress

func (x *UTXOId) GetAddress() string

func (*UTXOId) GetGroup

func (x *UTXOId) GetGroup() string

func (*UTXOId) GetSymbol

func (x *UTXOId) GetSymbol() string

func (*UTXOId) GetTxId

func (x *UTXOId) GetTxId() string

func (*UTXOId) ProtoMessage

func (*UTXOId) ProtoMessage()

func (*UTXOId) ProtoReflect

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

func (*UTXOId) Reset

func (x *UTXOId) Reset()

func (*UTXOId) String

func (x *UTXOId) String() string

func (*UTXOId) Validate

func (this *UTXOId) Validate() error

type UTXOStore

type UTXOStore struct {
}

func NewUTXOStore

func NewUTXOStore() *UTXOStore

func (*UTXOStore) Burn

func (u *UTXOStore) Burn(ctx router.Context, op *BalanceOperation) error

Burn unlocked tokens

func (*UTXOStore) BurnAllLock

func (u *UTXOStore) BurnAllLock(ctx router.Context, op *BalanceOperation) error

func (*UTXOStore) BurnLock

func (u *UTXOStore) BurnLock(ctx router.Context, id *LockId) error

BurnLock locked tokens

func (*UTXOStore) Get

func (u *UTXOStore) Get(ctx router.Context, balanceId *BalanceId) (*Balance, error)

func (*UTXOStore) GetLocked

func (u *UTXOStore) GetLocked(ctx router.Context, balanceId *BalanceId) (*Balance, error)

func (*UTXOStore) GetUTXO added in v1.0.3

func (u *UTXOStore) GetUTXO(ctx router.Context, utxoId *UTXOId) (*UTXO, error)

func (*UTXOStore) List

func (u *UTXOStore) List(ctx router.Context, id *TokenId) ([]*Balance, error)

func (*UTXOStore) ListOutputs

func (u *UTXOStore) ListOutputs(ctx router.Context, balanceId *BalanceId) ([]*UTXO, error)

ListOutputs unspended outputs list

func (*UTXOStore) Lock

func (u *UTXOStore) Lock(ctx router.Context, op *BalanceOperation) (*LockId, error)

Lock tokens

func (*UTXOStore) LockAll

func (u *UTXOStore) LockAll(ctx router.Context, op *BalanceOperation) error

func (*UTXOStore) LockBatch added in v1.0.3

func (u *UTXOStore) LockBatch(ctx router.Context, ops []*BalanceOperation) ([]*LockId, error)

func (*UTXOStore) Mint

func (u *UTXOStore) Mint(ctx router.Context, op *BalanceOperation) error

func (*UTXOStore) Transfer

func (u *UTXOStore) Transfer(ctx router.Context, transfer *TransferOperation) error

func (*UTXOStore) TransferBatch

func (u *UTXOStore) TransferBatch(ctx router.Context, transfers []*TransferOperation) error

func (*UTXOStore) TransferLock

func (u *UTXOStore) TransferLock(ctx router.Context, id *LockId, transfer *TransferOperation) error

TransferLock locked tokens between accounts

func (*UTXOStore) Unlock

func (u *UTXOStore) Unlock(ctx router.Context, id *LockId) error

Unlock tokens

type UTXOs

type UTXOs struct {
	Items []*UTXO `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*UTXOs) Descriptor deprecated

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

Deprecated: Use UTXOs.ProtoReflect.Descriptor instead.

func (*UTXOs) GetItems

func (x *UTXOs) GetItems() []*UTXO

func (*UTXOs) ProtoMessage

func (*UTXOs) ProtoMessage()

func (*UTXOs) ProtoReflect

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

func (*UTXOs) Reset

func (x *UTXOs) Reset()

func (*UTXOs) String

func (x *UTXOs) String() string

func (*UTXOs) Validate

func (this *UTXOs) Validate() error

type UnimplementedBalanceServiceServer

type UnimplementedBalanceServiceServer struct {
}

UnimplementedBalanceServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedBalanceServiceServer) GetBalance

func (*UnimplementedBalanceServiceServer) ListBalances

func (*UnimplementedBalanceServiceServer) Transfer

func (*UnimplementedBalanceServiceServer) TransferBatch

type UnimplementedTokenServiceServer

type UnimplementedTokenServiceServer struct {
}

UnimplementedTokenServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedTokenServiceServer) CreateTokenGroup

func (*UnimplementedTokenServiceServer) CreateTokenType

func (*UnimplementedTokenServiceServer) DeleteTokenGroup

func (*UnimplementedTokenServiceServer) DeleteTokenType

func (*UnimplementedTokenServiceServer) GetConfig

func (*UnimplementedTokenServiceServer) GetDefaultToken

func (*UnimplementedTokenServiceServer) GetToken

func (*UnimplementedTokenServiceServer) GetTokenGroup

func (*UnimplementedTokenServiceServer) GetTokenGroups

func (*UnimplementedTokenServiceServer) GetTokenType

func (*UnimplementedTokenServiceServer) ListTokenTypes

func (*UnimplementedTokenServiceServer) SetConfig

func (*UnimplementedTokenServiceServer) UpdateTokenType

type UpdateTokenTypeRequest

type UpdateTokenTypeRequest struct {
	Symbol      string              `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"`
	Name        string              `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	TotalSupply string              `protobuf:"bytes,3,opt,name=total_supply,json=totalSupply,proto3" json:"total_supply,omitempty"` // big.Int
	Meta        []*TokenMetaRequest `protobuf:"bytes,4,rep,name=meta,proto3" json:"meta,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateTokenTypeRequest) Descriptor deprecated

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

Deprecated: Use UpdateTokenTypeRequest.ProtoReflect.Descriptor instead.

func (*UpdateTokenTypeRequest) GetMeta

func (x *UpdateTokenTypeRequest) GetMeta() []*TokenMetaRequest

func (*UpdateTokenTypeRequest) GetName

func (x *UpdateTokenTypeRequest) GetName() string

func (*UpdateTokenTypeRequest) GetSymbol

func (x *UpdateTokenTypeRequest) GetSymbol() string

func (*UpdateTokenTypeRequest) GetTotalSupply

func (x *UpdateTokenTypeRequest) GetTotalSupply() string

func (*UpdateTokenTypeRequest) ProtoMessage

func (*UpdateTokenTypeRequest) ProtoMessage()

func (*UpdateTokenTypeRequest) ProtoReflect

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

func (*UpdateTokenTypeRequest) Reset

func (x *UpdateTokenTypeRequest) Reset()

func (*UpdateTokenTypeRequest) String

func (x *UpdateTokenTypeRequest) String() string

func (*UpdateTokenTypeRequest) Validate

func (this *UpdateTokenTypeRequest) Validate() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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