entity

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConditionType_name = map[int32]string{
	0: "HASH_LOCK",
	1: "DEPLOYED_CONTRACT",
	2: "VIRTUAL_CONTRACT",
}
View Source
var ConditionType_value = map[string]int32{
	"HASH_LOCK":         0,
	"DEPLOYED_CONTRACT": 1,
	"VIRTUAL_CONTRACT":  2,
}
View Source
var E_Soltype = &proto.ExtensionDesc{
	ExtendedType:  (*descriptor.FieldOptions)(nil),
	ExtensionType: (*string)(nil),
	Field:         1001,
	Name:          "entity.soltype",
	Tag:           "bytes,1001,opt,name=soltype",
	Filename:      "entity.proto",
}
View Source
var TokenType_name = map[int32]string{
	0: "INVALID",
	1: "ETH",
	2: "ERC20",
}
View Source
var TokenType_value = map[string]int32{
	"INVALID": 0,
	"ETH":     1,
	"ERC20":   2,
}
View Source
var TransferFunctionType_name = map[int32]string{
	0: "BOOLEAN_AND",
	1: "BOOLEAN_OR",
	2: "BOOLEAN_CIRCUIT",
	3: "NUMERIC_ADD",
	4: "NUMERIC_MAX",
	5: "NUMERIC_MIN",
}
View Source
var TransferFunctionType_value = map[string]int32{
	"BOOLEAN_AND":     0,
	"BOOLEAN_OR":      1,
	"BOOLEAN_CIRCUIT": 2,
	"NUMERIC_ADD":     3,
	"NUMERIC_MAX":     4,
	"NUMERIC_MIN":     5,
}

Functions

This section is empty.

Types

type AccountAmtPair

type AccountAmtPair struct {
	Account              []byte   `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
	Amt                  []byte   `protobuf:"bytes,2,opt,name=amt,proto3" json:"amt,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Next Tag: 3

func (*AccountAmtPair) Descriptor

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

func (*AccountAmtPair) GetAccount

func (m *AccountAmtPair) GetAccount() []byte

func (*AccountAmtPair) GetAmt

func (m *AccountAmtPair) GetAmt() []byte

func (*AccountAmtPair) ProtoMessage

func (*AccountAmtPair) ProtoMessage()

func (*AccountAmtPair) Reset

func (m *AccountAmtPair) Reset()

func (*AccountAmtPair) String

func (m *AccountAmtPair) String() string

func (*AccountAmtPair) XXX_DiscardUnknown

func (m *AccountAmtPair) XXX_DiscardUnknown()

func (*AccountAmtPair) XXX_Marshal

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

func (*AccountAmtPair) XXX_Merge

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

func (*AccountAmtPair) XXX_Size

func (m *AccountAmtPair) XXX_Size() int

func (*AccountAmtPair) XXX_Unmarshal

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

type ChannelMigrationInfo

type ChannelMigrationInfo struct {
	ChannelId            []byte   `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
	FromLedgerAddress    []byte   `protobuf:"bytes,2,opt,name=from_ledger_address,json=fromLedgerAddress,proto3" json:"from_ledger_address,omitempty"`
	ToLedgerAddress      []byte   `protobuf:"bytes,3,opt,name=to_ledger_address,json=toLedgerAddress,proto3" json:"to_ledger_address,omitempty"`
	MigrationDeadline    uint64   `protobuf:"varint,4,opt,name=migration_deadline,json=migrationDeadline,proto3" json:"migration_deadline,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Next Tag: 5

func (*ChannelMigrationInfo) Descriptor

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

func (*ChannelMigrationInfo) GetChannelId

func (m *ChannelMigrationInfo) GetChannelId() []byte

func (*ChannelMigrationInfo) GetFromLedgerAddress

func (m *ChannelMigrationInfo) GetFromLedgerAddress() []byte

func (*ChannelMigrationInfo) GetMigrationDeadline

func (m *ChannelMigrationInfo) GetMigrationDeadline() uint64

func (*ChannelMigrationInfo) GetToLedgerAddress

func (m *ChannelMigrationInfo) GetToLedgerAddress() []byte

func (*ChannelMigrationInfo) ProtoMessage

func (*ChannelMigrationInfo) ProtoMessage()

func (*ChannelMigrationInfo) Reset

func (m *ChannelMigrationInfo) Reset()

func (*ChannelMigrationInfo) String

func (m *ChannelMigrationInfo) String() string

func (*ChannelMigrationInfo) XXX_DiscardUnknown

func (m *ChannelMigrationInfo) XXX_DiscardUnknown()

func (*ChannelMigrationInfo) XXX_Marshal

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

func (*ChannelMigrationInfo) XXX_Merge

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

func (*ChannelMigrationInfo) XXX_Size

func (m *ChannelMigrationInfo) XXX_Size() int

func (*ChannelMigrationInfo) XXX_Unmarshal

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

type CondPayResult

type CondPayResult struct {
	// serialized ConditionalPay
	CondPay              []byte   `protobuf:"bytes,1,opt,name=cond_pay,json=condPay,proto3" json:"cond_pay,omitempty"`
	Amount               []byte   `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Next Tag: 3

func (*CondPayResult) Descriptor

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

func (*CondPayResult) GetAmount

func (m *CondPayResult) GetAmount() []byte

func (*CondPayResult) GetCondPay

func (m *CondPayResult) GetCondPay() []byte

func (*CondPayResult) ProtoMessage

func (*CondPayResult) ProtoMessage()

func (*CondPayResult) Reset

func (m *CondPayResult) Reset()

func (*CondPayResult) String

func (m *CondPayResult) String() string

func (*CondPayResult) XXX_DiscardUnknown

func (m *CondPayResult) XXX_DiscardUnknown()

func (*CondPayResult) XXX_Marshal

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

func (*CondPayResult) XXX_Merge

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

func (*CondPayResult) XXX_Size

func (m *CondPayResult) XXX_Size() int

func (*CondPayResult) XXX_Unmarshal

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

type Condition

type Condition struct {
	ConditionType ConditionType `` /* 127-byte string literal not displayed */
	// one of the following:
	// 1. hash of the secret preimage
	HashLock []byte `protobuf:"bytes,2,opt,name=hash_lock,json=hashLock,proto3" json:"hash_lock,omitempty"`
	// 2. onchain deployed contract
	DeployedContractAddress []byte `` /* 132-byte string literal not displayed */
	// 3. offchain virtual contract
	VirtualContractAddress []byte   `` /* 129-byte string literal not displayed */
	ArgsQueryFinalization  []byte   `` /* 126-byte string literal not displayed */
	ArgsQueryOutcome       []byte   `protobuf:"bytes,6,opt,name=args_query_outcome,json=argsQueryOutcome,proto3" json:"args_query_outcome,omitempty"`
	XXX_NoUnkeyedLiteral   struct{} `json:"-"`
	XXX_unrecognized       []byte   `json:"-"`
	XXX_sizecache          int32    `json:"-"`
}

Next Tag: 7

func (*Condition) Descriptor

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

func (*Condition) GetArgsQueryFinalization

func (m *Condition) GetArgsQueryFinalization() []byte

func (*Condition) GetArgsQueryOutcome

func (m *Condition) GetArgsQueryOutcome() []byte

func (*Condition) GetConditionType

func (m *Condition) GetConditionType() ConditionType

func (*Condition) GetDeployedContractAddress

func (m *Condition) GetDeployedContractAddress() []byte

func (*Condition) GetHashLock

func (m *Condition) GetHashLock() []byte

func (*Condition) GetVirtualContractAddress

func (m *Condition) GetVirtualContractAddress() []byte

func (*Condition) ProtoMessage

func (*Condition) ProtoMessage()

func (*Condition) Reset

func (m *Condition) Reset()

func (*Condition) String

func (m *Condition) String() string

func (*Condition) XXX_DiscardUnknown

func (m *Condition) XXX_DiscardUnknown()

func (*Condition) XXX_Marshal

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

func (*Condition) XXX_Merge

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

func (*Condition) XXX_Size

func (m *Condition) XXX_Size() int

func (*Condition) XXX_Unmarshal

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

type ConditionType

type ConditionType int32
const (
	ConditionType_HASH_LOCK         ConditionType = 0
	ConditionType_DEPLOYED_CONTRACT ConditionType = 1
	ConditionType_VIRTUAL_CONTRACT  ConditionType = 2
)

func (ConditionType) EnumDescriptor

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

func (ConditionType) String

func (x ConditionType) String() string

type ConditionalPay

type ConditionalPay struct {
	// pay_timestamp is set by payment source, to ensure no same condpay between src-dst
	// global unique pay id used on-chain is computed as hash(hash(cond_pay), pay_resolver_address)
	PayTimestamp uint64 `protobuf:"varint,1,opt,name=pay_timestamp,json=payTimestamp,proto3" json:"pay_timestamp,omitempty"`
	// src and dest are public keys of payment sender and receiver used to vouch the payment result.
	// For simplicity, current off-chain backend implementation requires these two fields to be the
	// sender and receiver account addresses. With better off-chain communication protocols in the
	// future, these two fields will not need to be the same with the actual sender and receiver
	// account addresses, and can be randomly changed by the sender and receiver to preserve privacy.
	Src  []byte `protobuf:"bytes,2,opt,name=src,proto3" json:"src,omitempty"`
	Dest []byte `protobuf:"bytes,3,opt,name=dest,proto3" json:"dest,omitempty"`
	// list of generic conditions for the payment
	Conditions []*Condition `protobuf:"bytes,4,rep,name=conditions,proto3" json:"conditions,omitempty"`
	// transfer_func :: [ConditionResult] -> TokenTransfer
	// transfer_func.max_transfer.receiver.account is not needed for unicast payment
	TransferFunc *TransferFunction `protobuf:"bytes,5,opt,name=transfer_func,json=transferFunc,proto3" json:"transfer_func,omitempty"`
	// resolve_deadline is the deadline for a cond_pay to be resolved on chain in the
	// pay resgistry by either condition or vouched results, and the payment result
	// is finalized after resolve_deadline.
	// Payment channel peers should apply a safe_margin for off-chain processing,
	// i.e., should take dispute action before [resolve_deadline - safe_margin]
	ResolveDeadline uint64 `protobuf:"varint,6,opt,name=resolve_deadline,json=resolveDeadline,proto3" json:"resolve_deadline,omitempty"`
	// resolve_timeout is the dispute window after a resolve payment request is submitted
	ResolveTimeout       uint64   `protobuf:"varint,7,opt,name=resolve_timeout,json=resolveTimeout,proto3" json:"resolve_timeout,omitempty"`
	PayResolver          []byte   `protobuf:"bytes,8,opt,name=pay_resolver,json=payResolver,proto3" json:"pay_resolver,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Next Tag: 9

func (*ConditionalPay) Descriptor

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

func (*ConditionalPay) GetConditions

func (m *ConditionalPay) GetConditions() []*Condition

func (*ConditionalPay) GetDest

func (m *ConditionalPay) GetDest() []byte

func (*ConditionalPay) GetPayResolver

func (m *ConditionalPay) GetPayResolver() []byte

func (*ConditionalPay) GetPayTimestamp

func (m *ConditionalPay) GetPayTimestamp() uint64

func (*ConditionalPay) GetResolveDeadline

func (m *ConditionalPay) GetResolveDeadline() uint64

func (*ConditionalPay) GetResolveTimeout

func (m *ConditionalPay) GetResolveTimeout() uint64

func (*ConditionalPay) GetSrc

func (m *ConditionalPay) GetSrc() []byte

func (*ConditionalPay) GetTransferFunc

func (m *ConditionalPay) GetTransferFunc() *TransferFunction

func (*ConditionalPay) ProtoMessage

func (*ConditionalPay) ProtoMessage()

func (*ConditionalPay) Reset

func (m *ConditionalPay) Reset()

func (*ConditionalPay) String

func (m *ConditionalPay) String() string

func (*ConditionalPay) XXX_DiscardUnknown

func (m *ConditionalPay) XXX_DiscardUnknown()

func (*ConditionalPay) XXX_Marshal

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

func (*ConditionalPay) XXX_Merge

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

func (*ConditionalPay) XXX_Size

func (m *ConditionalPay) XXX_Size() int

func (*ConditionalPay) XXX_Unmarshal

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

type CooperativeSettleInfo

type CooperativeSettleInfo struct {
	ChannelId []byte `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
	// contracts should require seq_num > both seq_nums of two SimplexPaymentChannel
	SeqNum uint64 `protobuf:"varint,2,opt,name=seq_num,json=seqNum,proto3" json:"seq_num,omitempty"`
	// final balance distribution without any conditional payments
	SettleBalance        []*AccountAmtPair `protobuf:"bytes,3,rep,name=settle_balance,json=settleBalance,proto3" json:"settle_balance,omitempty"`
	SettleDeadline       uint64            `protobuf:"varint,4,opt,name=settle_deadline,json=settleDeadline,proto3" json:"settle_deadline,omitempty"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

Next Tag: 5

func (*CooperativeSettleInfo) Descriptor

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

func (*CooperativeSettleInfo) GetChannelId

func (m *CooperativeSettleInfo) GetChannelId() []byte

func (*CooperativeSettleInfo) GetSeqNum

func (m *CooperativeSettleInfo) GetSeqNum() uint64

func (*CooperativeSettleInfo) GetSettleBalance

func (m *CooperativeSettleInfo) GetSettleBalance() []*AccountAmtPair

func (*CooperativeSettleInfo) GetSettleDeadline

func (m *CooperativeSettleInfo) GetSettleDeadline() uint64

func (*CooperativeSettleInfo) ProtoMessage

func (*CooperativeSettleInfo) ProtoMessage()

func (*CooperativeSettleInfo) Reset

func (m *CooperativeSettleInfo) Reset()

func (*CooperativeSettleInfo) String

func (m *CooperativeSettleInfo) String() string

func (*CooperativeSettleInfo) XXX_DiscardUnknown

func (m *CooperativeSettleInfo) XXX_DiscardUnknown()

func (*CooperativeSettleInfo) XXX_Marshal

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

func (*CooperativeSettleInfo) XXX_Merge

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

func (*CooperativeSettleInfo) XXX_Size

func (m *CooperativeSettleInfo) XXX_Size() int

func (*CooperativeSettleInfo) XXX_Unmarshal

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

type CooperativeWithdrawInfo

type CooperativeWithdrawInfo struct {
	ChannelId        []byte          `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
	SeqNum           uint64          `protobuf:"varint,2,opt,name=seq_num,json=seqNum,proto3" json:"seq_num,omitempty"`
	Withdraw         *AccountAmtPair `protobuf:"bytes,3,opt,name=withdraw,proto3" json:"withdraw,omitempty"`
	WithdrawDeadline uint64          `protobuf:"varint,4,opt,name=withdraw_deadline,json=withdrawDeadline,proto3" json:"withdraw_deadline,omitempty"`
	// if non-zero, do balance transfer to the recipient channel
	// instead of withdraw to the account
	RecipientChannelId   []byte   `protobuf:"bytes,5,opt,name=recipient_channel_id,json=recipientChannelId,proto3" json:"recipient_channel_id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Next Tag: 6

func (*CooperativeWithdrawInfo) Descriptor

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

func (*CooperativeWithdrawInfo) GetChannelId

func (m *CooperativeWithdrawInfo) GetChannelId() []byte

func (*CooperativeWithdrawInfo) GetRecipientChannelId

func (m *CooperativeWithdrawInfo) GetRecipientChannelId() []byte

func (*CooperativeWithdrawInfo) GetSeqNum

func (m *CooperativeWithdrawInfo) GetSeqNum() uint64

func (*CooperativeWithdrawInfo) GetWithdraw

func (m *CooperativeWithdrawInfo) GetWithdraw() *AccountAmtPair

func (*CooperativeWithdrawInfo) GetWithdrawDeadline

func (m *CooperativeWithdrawInfo) GetWithdrawDeadline() uint64

func (*CooperativeWithdrawInfo) ProtoMessage

func (*CooperativeWithdrawInfo) ProtoMessage()

func (*CooperativeWithdrawInfo) Reset

func (m *CooperativeWithdrawInfo) Reset()

func (*CooperativeWithdrawInfo) String

func (m *CooperativeWithdrawInfo) String() string

func (*CooperativeWithdrawInfo) XXX_DiscardUnknown

func (m *CooperativeWithdrawInfo) XXX_DiscardUnknown()

func (*CooperativeWithdrawInfo) XXX_Marshal

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

func (*CooperativeWithdrawInfo) XXX_Merge

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

func (*CooperativeWithdrawInfo) XXX_Size

func (m *CooperativeWithdrawInfo) XXX_Size() int

func (*CooperativeWithdrawInfo) XXX_Unmarshal

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

type PayIdList

type PayIdList struct {
	// array of ids of serialized ConditionalPay
	// pay_id is computed as hash(hash(cond_pay), pay_resolver_address)
	PayIds [][]byte `protobuf:"bytes,1,rep,name=pay_ids,json=payIds,proto3" json:"pay_ids,omitempty"`
	// hash of serialized next PayIdList
	NextListHash         []byte   `protobuf:"bytes,2,opt,name=next_list_hash,json=nextListHash,proto3" json:"next_list_hash,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Next Tag: 3

func (*PayIdList) Descriptor

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

func (*PayIdList) GetNextListHash

func (m *PayIdList) GetNextListHash() []byte

func (*PayIdList) GetPayIds

func (m *PayIdList) GetPayIds() [][]byte

func (*PayIdList) ProtoMessage

func (*PayIdList) ProtoMessage()

func (*PayIdList) Reset

func (m *PayIdList) Reset()

func (*PayIdList) String

func (m *PayIdList) String() string

func (*PayIdList) XXX_DiscardUnknown

func (m *PayIdList) XXX_DiscardUnknown()

func (*PayIdList) XXX_Marshal

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

func (*PayIdList) XXX_Merge

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

func (*PayIdList) XXX_Size

func (m *PayIdList) XXX_Size() int

func (*PayIdList) XXX_Unmarshal

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

type PaymentChannelInitializer

type PaymentChannelInitializer struct {
	// require an ascending order based on addresses of init_distribution.distribution[].account
	InitDistribution *TokenDistribution `protobuf:"bytes,1,opt,name=init_distribution,json=initDistribution,proto3" json:"init_distribution,omitempty"`
	OpenDeadline     uint64             `protobuf:"varint,2,opt,name=open_deadline,json=openDeadline,proto3" json:"open_deadline,omitempty"`
	DisputeTimeout   uint64             `protobuf:"varint,3,opt,name=dispute_timeout,json=disputeTimeout,proto3" json:"dispute_timeout,omitempty"`
	// index of channel peer who receives the blockchain native token
	// associated with the transaction (msg.value in case of ETH)
	MsgValueReceiver     uint64   `protobuf:"varint,4,opt,name=msg_value_receiver,json=msgValueReceiver,proto3" json:"msg_value_receiver,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Next Tag: 5

func (*PaymentChannelInitializer) Descriptor

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

func (*PaymentChannelInitializer) GetDisputeTimeout

func (m *PaymentChannelInitializer) GetDisputeTimeout() uint64

func (*PaymentChannelInitializer) GetInitDistribution

func (m *PaymentChannelInitializer) GetInitDistribution() *TokenDistribution

func (*PaymentChannelInitializer) GetMsgValueReceiver

func (m *PaymentChannelInitializer) GetMsgValueReceiver() uint64

func (*PaymentChannelInitializer) GetOpenDeadline

func (m *PaymentChannelInitializer) GetOpenDeadline() uint64

func (*PaymentChannelInitializer) ProtoMessage

func (*PaymentChannelInitializer) ProtoMessage()

func (*PaymentChannelInitializer) Reset

func (m *PaymentChannelInitializer) Reset()

func (*PaymentChannelInitializer) String

func (m *PaymentChannelInitializer) String() string

func (*PaymentChannelInitializer) XXX_DiscardUnknown

func (m *PaymentChannelInitializer) XXX_DiscardUnknown()

func (*PaymentChannelInitializer) XXX_Marshal

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

func (*PaymentChannelInitializer) XXX_Merge

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

func (*PaymentChannelInitializer) XXX_Size

func (m *PaymentChannelInitializer) XXX_Size() int

func (*PaymentChannelInitializer) XXX_Unmarshal

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

type SimplexPaymentChannel

type SimplexPaymentChannel struct {
	ChannelId []byte `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
	// aka simplex channel owner.
	PeerFrom []byte `protobuf:"bytes,2,opt,name=peer_from,json=peerFrom,proto3" json:"peer_from,omitempty"`
	SeqNum   uint64 `protobuf:"varint,3,opt,name=seq_num,json=seqNum,proto3" json:"seq_num,omitempty"`
	// Unconditional token transfer to simplex channel peer, amount increases monotonically.
	TransferToPeer *TokenTransfer `protobuf:"bytes,4,opt,name=transfer_to_peer,json=transferToPeer,proto3" json:"transfer_to_peer,omitempty"`
	// head of the idlist chain of all pending conditional pays.
	PendingPayIds *PayIdList `protobuf:"bytes,5,opt,name=pending_pay_ids,json=pendingPayIds,proto3" json:"pending_pay_ids,omitempty"`
	// The last resolve deadline of all pending conditonal pays.
	// confirmSettle must be called after all pending pays have been finalized,
	// namely all pending pays have been resolved in the pay registry,
	// or after the last_pay_resolve_deadline.
	LastPayResolveDeadline uint64 `` /* 132-byte string literal not displayed */
	// total amount of all pending pays.
	TotalPendingAmount   []byte   `protobuf:"bytes,7,opt,name=total_pending_amount,json=totalPendingAmount,proto3" json:"total_pending_amount,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Next Tag: 8

func (*SimplexPaymentChannel) Descriptor

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

func (*SimplexPaymentChannel) GetChannelId

func (m *SimplexPaymentChannel) GetChannelId() []byte

func (*SimplexPaymentChannel) GetLastPayResolveDeadline

func (m *SimplexPaymentChannel) GetLastPayResolveDeadline() uint64

func (*SimplexPaymentChannel) GetPeerFrom

func (m *SimplexPaymentChannel) GetPeerFrom() []byte

func (*SimplexPaymentChannel) GetPendingPayIds

func (m *SimplexPaymentChannel) GetPendingPayIds() *PayIdList

func (*SimplexPaymentChannel) GetSeqNum

func (m *SimplexPaymentChannel) GetSeqNum() uint64

func (*SimplexPaymentChannel) GetTotalPendingAmount

func (m *SimplexPaymentChannel) GetTotalPendingAmount() []byte

func (*SimplexPaymentChannel) GetTransferToPeer

func (m *SimplexPaymentChannel) GetTransferToPeer() *TokenTransfer

func (*SimplexPaymentChannel) ProtoMessage

func (*SimplexPaymentChannel) ProtoMessage()

func (*SimplexPaymentChannel) Reset

func (m *SimplexPaymentChannel) Reset()

func (*SimplexPaymentChannel) String

func (m *SimplexPaymentChannel) String() string

func (*SimplexPaymentChannel) XXX_DiscardUnknown

func (m *SimplexPaymentChannel) XXX_DiscardUnknown()

func (*SimplexPaymentChannel) XXX_Marshal

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

func (*SimplexPaymentChannel) XXX_Merge

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

func (*SimplexPaymentChannel) XXX_Size

func (m *SimplexPaymentChannel) XXX_Size() int

func (*SimplexPaymentChannel) XXX_Unmarshal

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

type TokenDistribution

type TokenDistribution struct {
	Token                *TokenInfo        `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	Distribution         []*AccountAmtPair `protobuf:"bytes,2,rep,name=distribution,proto3" json:"distribution,omitempty"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

Next Tag: 3

func (*TokenDistribution) Descriptor

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

func (*TokenDistribution) GetDistribution

func (m *TokenDistribution) GetDistribution() []*AccountAmtPair

func (*TokenDistribution) GetToken

func (m *TokenDistribution) GetToken() *TokenInfo

func (*TokenDistribution) ProtoMessage

func (*TokenDistribution) ProtoMessage()

func (*TokenDistribution) Reset

func (m *TokenDistribution) Reset()

func (*TokenDistribution) String

func (m *TokenDistribution) String() string

func (*TokenDistribution) XXX_DiscardUnknown

func (m *TokenDistribution) XXX_DiscardUnknown()

func (*TokenDistribution) XXX_Marshal

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

func (*TokenDistribution) XXX_Merge

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

func (*TokenDistribution) XXX_Size

func (m *TokenDistribution) XXX_Size() int

func (*TokenDistribution) XXX_Unmarshal

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

type TokenInfo

type TokenInfo struct {
	TokenType            TokenType `protobuf:"varint,1,opt,name=token_type,json=tokenType,proto3,enum=entity.TokenType" json:"token_type,omitempty"`
	TokenAddress         []byte    `protobuf:"bytes,2,opt,name=token_address,json=tokenAddress,proto3" json:"token_address,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

Next Tag: 3

func (*TokenInfo) Descriptor

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

func (*TokenInfo) GetTokenAddress

func (m *TokenInfo) GetTokenAddress() []byte

func (*TokenInfo) GetTokenType

func (m *TokenInfo) GetTokenType() TokenType

func (*TokenInfo) ProtoMessage

func (*TokenInfo) ProtoMessage()

func (*TokenInfo) Reset

func (m *TokenInfo) Reset()

func (*TokenInfo) String

func (m *TokenInfo) String() string

func (*TokenInfo) XXX_DiscardUnknown

func (m *TokenInfo) XXX_DiscardUnknown()

func (*TokenInfo) XXX_Marshal

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

func (*TokenInfo) XXX_Merge

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

func (*TokenInfo) XXX_Size

func (m *TokenInfo) XXX_Size() int

func (*TokenInfo) XXX_Unmarshal

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

type TokenTransfer

type TokenTransfer struct {
	Token                *TokenInfo      `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	Receiver             *AccountAmtPair `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

Next Tag: 3

func (*TokenTransfer) Descriptor

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

func (*TokenTransfer) GetReceiver

func (m *TokenTransfer) GetReceiver() *AccountAmtPair

func (*TokenTransfer) GetToken

func (m *TokenTransfer) GetToken() *TokenInfo

func (*TokenTransfer) ProtoMessage

func (*TokenTransfer) ProtoMessage()

func (*TokenTransfer) Reset

func (m *TokenTransfer) Reset()

func (*TokenTransfer) String

func (m *TokenTransfer) String() string

func (*TokenTransfer) XXX_DiscardUnknown

func (m *TokenTransfer) XXX_DiscardUnknown()

func (*TokenTransfer) XXX_Marshal

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

func (*TokenTransfer) XXX_Merge

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

func (*TokenTransfer) XXX_Size

func (m *TokenTransfer) XXX_Size() int

func (*TokenTransfer) XXX_Unmarshal

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

type TokenType

type TokenType int32
const (
	TokenType_INVALID TokenType = 0
	TokenType_ETH     TokenType = 1
	TokenType_ERC20   TokenType = 2
)

func (TokenType) EnumDescriptor

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

func (TokenType) String

func (x TokenType) String() string

type TransferFunction

type TransferFunction struct {
	// Return transfer amount based on condition results.
	// TransferFunctionType is sufficient for simple functions such as
	// BOOLEAN_AND, BOOLEAN_OR, NUMERIC_ADD, NUMERIC_MAX, and NUMERIC_MIN.
	// When logic_type is NUMERIC_*, hashlock condition is always treated as BOOLEAN_AND
	// to other conditions, i.e., payment only happens when hash preimages are revealed.
	LogicType            TransferFunctionType `protobuf:"varint,1,opt,name=logic_type,json=logicType,proto3,enum=entity.TransferFunctionType" json:"logic_type,omitempty"`
	MaxTransfer          *TokenTransfer       `protobuf:"bytes,2,opt,name=max_transfer,json=maxTransfer,proto3" json:"max_transfer,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

Next Tag: 3

func (*TransferFunction) Descriptor

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

func (*TransferFunction) GetLogicType

func (m *TransferFunction) GetLogicType() TransferFunctionType

func (*TransferFunction) GetMaxTransfer

func (m *TransferFunction) GetMaxTransfer() *TokenTransfer

func (*TransferFunction) ProtoMessage

func (*TransferFunction) ProtoMessage()

func (*TransferFunction) Reset

func (m *TransferFunction) Reset()

func (*TransferFunction) String

func (m *TransferFunction) String() string

func (*TransferFunction) XXX_DiscardUnknown

func (m *TransferFunction) XXX_DiscardUnknown()

func (*TransferFunction) XXX_Marshal

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

func (*TransferFunction) XXX_Merge

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

func (*TransferFunction) XXX_Size

func (m *TransferFunction) XXX_Size() int

func (*TransferFunction) XXX_Unmarshal

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

type TransferFunctionType

type TransferFunctionType int32
const (
	TransferFunctionType_BOOLEAN_AND     TransferFunctionType = 0
	TransferFunctionType_BOOLEAN_OR      TransferFunctionType = 1
	TransferFunctionType_BOOLEAN_CIRCUIT TransferFunctionType = 2
	TransferFunctionType_NUMERIC_ADD     TransferFunctionType = 3
	TransferFunctionType_NUMERIC_MAX     TransferFunctionType = 4
	TransferFunctionType_NUMERIC_MIN     TransferFunctionType = 5
)

func (TransferFunctionType) EnumDescriptor

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

func (TransferFunctionType) String

func (x TransferFunctionType) String() string

type VouchedCondPayResult

type VouchedCondPayResult struct {
	// serialized CondPayResult
	CondPayResult        []byte   `protobuf:"bytes,1,opt,name=cond_pay_result,json=condPayResult,proto3" json:"cond_pay_result,omitempty"`
	SigOfSrc             []byte   `protobuf:"bytes,2,opt,name=sig_of_src,json=sigOfSrc,proto3" json:"sig_of_src,omitempty"`
	SigOfDest            []byte   `protobuf:"bytes,3,opt,name=sig_of_dest,json=sigOfDest,proto3" json:"sig_of_dest,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Next Tag: 4

func (*VouchedCondPayResult) Descriptor

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

func (*VouchedCondPayResult) GetCondPayResult

func (m *VouchedCondPayResult) GetCondPayResult() []byte

func (*VouchedCondPayResult) GetSigOfDest

func (m *VouchedCondPayResult) GetSigOfDest() []byte

func (*VouchedCondPayResult) GetSigOfSrc

func (m *VouchedCondPayResult) GetSigOfSrc() []byte

func (*VouchedCondPayResult) ProtoMessage

func (*VouchedCondPayResult) ProtoMessage()

func (*VouchedCondPayResult) Reset

func (m *VouchedCondPayResult) Reset()

func (*VouchedCondPayResult) String

func (m *VouchedCondPayResult) String() string

func (*VouchedCondPayResult) XXX_DiscardUnknown

func (m *VouchedCondPayResult) XXX_DiscardUnknown()

func (*VouchedCondPayResult) XXX_Marshal

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

func (*VouchedCondPayResult) XXX_Merge

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

func (*VouchedCondPayResult) XXX_Size

func (m *VouchedCondPayResult) XXX_Size() int

func (*VouchedCondPayResult) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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