photon

package module
v0.0.0-...-9f791b1 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2022 License: MIT Imports: 49 Imported by: 0

README

SuperNode

SuperNode is an off-chain scaling solution for MetaLife.

Project Status

This project is still very much a work in progress. It can be used for testing, but it should not be used for real funds. We are doing our best to identify and fix problems, and implement missing features. Any help testing the implementation, reporting bugs, or helping with outstanding issues is very welcome.

Build and run

  go get github.com/MetaLife-Protocol/SuperNode/
  cd $GOPATH/github.com/MetaLife-Protocol/SuperNode
  make 
  ./build/bin/supernode
  
  ./supernode --datadir=./supernode-data \
    --api-address=0.0.0.0:12001 \
    --listen-address=127.0.0.1:12003 \
    --address="0xf413B3187ed510b5b083AB6c5d3BCC259CeF96e9" \
    --keystore-path ./keystore \
    --password-file ***  \
    --eth-rpc-endpoint ws://transport01.smartmesh.cn:33333   \
    --debug   \
    --verbosity 5  \
    --registry-contract-address 0x242e0de2B118279D1479545A131a90A8f67A2512 \
    --pub-address="0xb05Feb81fB4BF6d8B2eB5A5Ae883BAA9E7530cB7" \
    --reward-period 10 \
    --pub-apihost=127.0.0.1:10008 \
    --pfs http://transport01.smartmesh.cn:7000 \
    --xmpp 

mobile support

SuperNode can works on Android and iOS using mobile's API. it needs go mobile to build mobile library.

build Android mobile library
cd mobile
./build_Android.sh 

then you can integrate mobile.aar into your project.

build iOS mobile framework
./build_iOS.sh

then you can integrate Mobile.framework into your project.

Requirements

Latest version of SMC

We need go's plugin module.

Documentation

Index

Constants

This section is empty.

Variables

RewardDB reward path: supernode--metalife PUB--ssb client

Functions

func InitPubDB

func InitPubDB(pdb *stormdb.PubRewardDB)

Types

type API

type API struct {
	Photon *Service
}

API photon for user

#nolint

func NewPhotonAPI

func NewPhotonAPI(photon *Service) *API

NewPhotonAPI create CLI interface.

func (*API) Address

func (r *API) Address() common.Address

Address return this node's address

func (*API) AllowRevealSecret

func (r *API) AllowRevealSecret(lockSecretHash common.Hash, tokenAddress common.Address) (err error)

AllowRevealSecret : 1. find state manager by lockSecretHash and tokenAddress 2. check secret matches lockSecretHash or not 3. remove the predictor

func (*API) BalanceProofForPFS

func (r *API) BalanceProofForPFS(channelIdentifier common.Hash) (proof *ProofForPFS, err error)

BalanceProofForPFS proof for path finding service ,test only

func (*API) CancelPrepareForCooperativeSettle

func (r *API) CancelPrepareForCooperativeSettle(tokenAddress, partnerAddress common.Address) (c *channeltype.Serialization, err error)

CancelPrepareForCooperativeSettle cancel a mark. return when state has been updated to database

func (*API) CancelPrepareForWithdraw

func (r *API) CancelPrepareForWithdraw(tokenAddress, partnerAddress common.Address) (c *channeltype.Serialization, err error)

CancelPrepareForWithdraw cancel a mark. return when state has been updated to database

func (*API) CancelTransfer

func (r *API) CancelTransfer(lockSecretHash common.Hash, tokenAddress common.Address) error

CancelTransfer : cancel a transfer when haven't send secret

func (*API) ChannelInformationFor3rdParty

func (r *API) ChannelInformationFor3rdParty(ChannelIdentifier common.Hash, thirdAddr common.Address) (result *ChannelFor3rd, err error)

ChannelInformationFor3rdParty generate all information need by 3rd party

func (*API) Close

func (r *API) Close(tokenAddress, partnerAddress common.Address) (c *channeltype.Serialization, err error)

Close a channel opened with `partner_address` for the given `token_address`. return when state has been +d to database

func (*API) ContractCallTXQuery

func (r *API) ContractCallTXQuery(req *ContractCallTXQueryParams) (list []*models.TXInfo, err error)

ContractCallTXQuery 根据条件查询所有合约调用的信息

func (*API) CooperativeSettle

func (r *API) CooperativeSettle(tokenAddress, partnerAddress common.Address) (c *channeltype.Serialization, err error)

CooperativeSettle a channel opened with `partner_address` for the given `token_address`. return when state has been updated to database

func (*API) DepositAndOpenChannel

func (r *API) DepositAndOpenChannel(tokenAddress, partnerAddress common.Address, settleTimeout, revealTimeout int, deposit *big.Int, newChannel bool) (ch *channeltype.Serialization, err error)

DepositAndOpenChannel a channel with the peer at `partner_address`

with the given `token_address`.

deposit必须大于0 settleTimeout: 如果为0 表示已经知道通道存在,只是为了存款,如果大于0,表示希望完全创建通道. 此接口并不等待交易打包才返回,因此如果是新创建通道,就算是成功了ch也会是nil 如果是单纯deposit,那么err为nil时,ch一定有效

func (*API) ExpectTokenSwap

func (r *API) ExpectTokenSwap(lockSecretHash string, makerToken, takerToken, makerAddress, takerAddress common.Address,
	makerAmount, takerAmount *big.Int, routeInfo []pfsproxy.FindPathResponse) (err error)

ExpectTokenSwap Register an expected transfer for this node.

If a MediatedMessage is received for the `maker_asset` with
`maker_amount` then proceed to send a MediatedTransfer to
`maker_address` for `taker_asset` with `taker_amount`.

func (*API) FindPath

func (r *API) FindPath(targetAddress, tokenAddress common.Address, amount *big.Int) (routes []pfsproxy.FindPathResponse, err error)

FindPath 向PFS询问路由,要求启用收费

func (*API) ForceUnlock

func (r *API) ForceUnlock(channelIdentifier, secret common.Hash) (err error)

ForceUnlock : only for debug

func (*API) GetAllFeeChargeRecord

func (r *API) GetAllFeeChargeRecord() (resp interface{}, err error)

GetAllFeeChargeRecord :

func (*API) GetBalanceByTokenAddress

func (r *API) GetBalanceByTokenAddress(tokenAddress common.Address) (balances []*AccountTokenBalanceVo, err error)

GetBalanceByTokenAddress : get account's balance and locked account on token

func (*API) GetBuildInfo

func (r *API) GetBuildInfo() *BuildInfo

GetBuildInfo 获取当前版本信息

func (*API) GetChannel

func (r *API) GetChannel(ChannelIdentifier common.Hash) (c *channeltype.Serialization, err error)

GetChannel get channel by address

func (*API) GetChannelEvents

func (r *API) GetChannelEvents(channelIdentifier common.Hash, fromBlock, toBlock int64) (data []transfer.Event, err error)

GetChannelEvents events of this channel

func (*API) GetChannelList

func (r *API) GetChannelList(tokenAddress common.Address, partnerAddress common.Address) (cs []*channeltype.Serialization, err error)

GetChannelList Returns a list of channels associated with the optionally given

`token_address` and/or `partner_address

Args:

    token_address (bin): an optionally provided token address
    partner_address (bin): an optionally provided partner address

Return:
    A list containing all channels the node participates. Optionally
    filtered by a token address and/or partner address.

Raises:
    KeyError: An error occurred when the token address is unknown to the node.

func (*API) GetDaysIncome

func (r *API) GetDaysIncome(tokenAddress common.Address, n int) (resp []*DaysIncome, err error)

GetDaysIncome 获取过去n天的收益统计

func (*API) GetFeePolicy

func (r *API) GetFeePolicy() (fp *models.FeePolicy, err error)

GetFeePolicy 如果没有启动收费会返回错误,否则返回当前账户设置的收费信息

func (*API) GetIncomeDetails

func (r *API) GetIncomeDetails(tokenAddress common.Address, fromTime, toTime int64, limit int) (list []*IncomeDetail, err error)

GetIncomeDetails 收益明细查询接口,这里的收益包含手续费收益和收到的data不为""的交易

func (*API) GetNetworkEvents

func (r *API) GetNetworkEvents(fromBlock, toBlock int64) ([]interface{}, error)

GetNetworkEvents all photon events

func (*API) GetNodeNetworkState

func (r *API) GetNodeNetworkState(nodeAddress common.Address) (deviceType string, isOnline bool)

GetNodeNetworkState Returns the currently network status of `node_address

func (*API) GetReceivedTransfers

func (r *API) GetReceivedTransfers(tokenAddress common.Address, fromBlock, toBlock, fromTime, toTime int64) ([]*models.ReceivedTransfer, error)

GetReceivedTransfers query received transfers from dao

func (*API) GetSentTransferDetails

func (r *API) GetSentTransferDetails(tokenAddress common.Address, from, to int64) ([]*models.SentTransferDetail, error)

GetSentTransferDetails query sent transfers from dao

func (*API) GetTokenList

func (r *API) GetTokenList() (tokens []common.Address)

GetTokenList returns all available tokens

func (*API) GetTokenNetworkEvents

func (r *API) GetTokenNetworkEvents(tokenAddress common.Address, fromBlock, toBlock int64) (data []interface{}, err error)

GetTokenNetworkEvents return events about this token

func (*API) GetTokenTokenNetorks

func (r *API) GetTokenTokenNetorks() (tokens []string)

GetTokenTokenNetorks return all tokens and token networks

func (*API) GetUnfinishedReceivedTransfer

func (r *API) GetUnfinishedReceivedTransfer(lockSecretHash common.Hash, tokenAddress common.Address) (resp *TransferDataResponse)

GetUnfinishedReceivedTransfer :

func (*API) NotifyNetworkDown

func (r *API) NotifyNetworkDown() error

NotifyNetworkDown :

func (*API) PrepareForCooperativeSettle

func (r *API) PrepareForCooperativeSettle(tokenAddress, partnerAddress common.Address) (c *channeltype.Serialization, err error)

PrepareForCooperativeSettle mark a channel prepared for settle, return when state has been updated to database

func (*API) PrepareForWithdraw

func (r *API) PrepareForWithdraw(tokenAddress, partnerAddress common.Address) (c *channeltype.Serialization, err error)

PrepareForWithdraw mark a channel prepared for withdraw, return when state has been updated to database

func (*API) RegisterSecret

func (r *API) RegisterSecret(secret common.Hash, tokenAddress common.Address) (err error)

RegisterSecret :

func (*API) RegisterSecretOnChain

func (r *API) RegisterSecretOnChain(secret common.Hash) (err error)

RegisterSecretOnChain : only for debug

func (*API) SetFeePolicy

func (r *API) SetFeePolicy(fp *models.FeePolicy) error

SetFeePolicy 更新该账户所有的收费信息,不保留历史记录

func (*API) Settle

func (r *API) Settle(tokenAddress, partnerAddress common.Address) (c *channeltype.Serialization, err error)

Settle a closed channel with `partner_address` for the given `token_address`.return when state has been updated to database

func (*API) StartHealthCheckFor

func (r *API) StartHealthCheckFor(nodeAddress common.Address) (deviceType string, isOnline bool)

StartHealthCheckFor Returns the currently network status of `node_address`.

func (*API) Stop

func (r *API) Stop()

Stop stop for mobile app

func (*API) SystemStatus

func (r *API) SystemStatus() (resp interface{}, err error)

SystemStatus :

func (*API) TokenSwapAndWait

func (r *API) TokenSwapAndWait(lockSecretHash string, makerToken, takerToken, makerAddress, takerAddress common.Address,
	makerAmount, takerAmount *big.Int, secret string, routeInfo []pfsproxy.FindPathResponse) error

TokenSwapAndWait Start an atomic swap operation by sending a MediatedTransfer with

`maker_amount` of `maker_token` to `taker_address`. Only proceed when a
new valid MediatedTransfer is received with `taker_amount` of
`taker_token`.

func (*API) Tokens

func (r *API) Tokens() (addresses []common.Address)

Tokens Return a list of the tokens registered with the default registry.

func (*API) Transfer

func (r *API) Transfer(token common.Address, amount *big.Int, target common.Address, secret common.Hash, timeout time.Duration, isDirectTransfer bool, data string, routeInfo []pfsproxy.FindPathResponse) (result *utils.AsyncResult, err error)

Transfer transfer and wait

func (*API) TransferAsync

func (r *API) TransferAsync(tokenAddress common.Address, amount *big.Int, target common.Address, secret common.Hash, isDirectTransfer bool, data string, routeInfo []pfsproxy.FindPathResponse) (result *utils.AsyncResult, err error)

TransferAsync :

func (*API) TransferInternal

func (r *API) TransferInternal(tokenAddress common.Address, amount *big.Int, target common.Address, secret common.Hash, isDirectTransfer bool, data string, routeInfo []pfsproxy.FindPathResponse) (result *utils.AsyncResult, err error)

TransferInternal :

func (*API) Withdraw

func (r *API) Withdraw(tokenAddress, partnerAddress common.Address, amount *big.Int) (c *channeltype.Serialization, err error)

Withdraw on a channel opened with `partner_address` for the given `token_address`. return when state has been updated to database

type AccountTokenBalanceVo

type AccountTokenBalanceVo struct {
	TokenAddress string   `json:"token_address"`
	Balance      *big.Int `json:"balance"`
	LockedAmount *big.Int `json:"locked_amount"`
}

AccountTokenBalanceVo for api

type AckHelper

type AckHelper struct {
	// contains filtered or unexported fields
}

AckHelper save ack for sent and recevied message

func NewAckHelper

func NewAckHelper(dao models.Dao) *AckHelper

NewAckHelper create ack

func (*AckHelper) GetAck

func (ah *AckHelper) GetAck(echohash common.Hash) []byte

GetAck return a message's ack

func (*AckHelper) SaveAck

func (ah *AckHelper) SaveAck(echohash common.Hash, msg encoding.Messager, ack []byte)

SaveAck save ack to dao

type BuildInfo

type BuildInfo struct {
	GoVersion string `json:"go_version"`
	GitCommit string `json:"git_commit"`
	BuildDate string `json:"build_date"`
	Version   string `json:"version"`
}

BuildInfo 保存构建信息

type ChannelFor3rd

type ChannelFor3rd struct {
	ChannelIdentifier common.Hash    `json:"channel_identifier"`
	OpenBlockNumber   int64          `json:"open_block_number"`
	TokenAddrss       common.Address `json:"token_address"`
	PartnerAddress    common.Address `json:"partner_address"`
	UpdateTransfer    updateTransfer `json:"update_transfer"`
	Unlocks           []*unlock      `json:"unlocks"`
	Punishes          []*punish      `json:"punishes"`
}

ChannelFor3rd is for 3rd party to call update transfer

type ContractCallTXQueryParams

type ContractCallTXQueryParams struct {
	ChannelIdentifier string              `json:"channel_identifier"`
	OpenBlockNumber   int64               `json:"open_block_number"`
	TokenAddress      string              `json:"token_address"`
	TXType            models.TXInfoType   `json:"tx_type"`
	TXStatus          models.TXInfoStatus `json:"tx_status"`
}

ContractCallTXQueryParams 请求参数

type DaysIncome

type DaysIncome struct {
	TokenAddress common.Address  `json:"token_address"`
	TotalAmount  *big.Int        `json:"total_amount"`
	Days         int             `json:"days"`
	Details      []*OneDayIncome `json:"details"`
}

DaysIncome 一周的收益统计

type EventEventTransferReceivedSuccessWrapper

type EventEventTransferReceivedSuccessWrapper struct {
	transfer.EventTransferReceivedSuccess
	BlockNumber int64
	Name        string
}

EventEventTransferReceivedSuccessWrapper wrapper

type EventTransferSentFailedWrapper

type EventTransferSentFailedWrapper struct {
	transfer.EventTransferSentFailed
	BlockNumber int64
	Name        string
}

EventTransferSentFailedWrapper wrapper

type EventTransferSentSuccessWrapper

type EventTransferSentSuccessWrapper struct {
	transfer.EventTransferSentSuccess
	BlockNumber int64
	Name        string
}

EventTransferSentSuccessWrapper wrapper

type FeeModule

type FeeModule struct {
	// contains filtered or unexported fields
}

FeeModule :

func NewFeeModule

func NewFeeModule(dao models.Dao, pfsProxy pfsproxy.PfsProxy) (fm *FeeModule, err error)

NewFeeModule :

func (*FeeModule) GetNodeChargeFee

func (fm *FeeModule) GetNodeChargeFee(nodeAddress, tokenAddress common.Address, amount *big.Int) *big.Int

GetNodeChargeFee : impl of FeeCharge

func (*FeeModule) SetFeePolicy

func (fm *FeeModule) SetFeePolicy(fp *models.FeePolicy) (err error)

SetFeePolicy :

func (*FeeModule) SubmitFeePolicyToPFS

func (fm *FeeModule) SubmitFeePolicyToPFS() (err error)

SubmitFeePolicyToPFS :

type IncomeDetail

type IncomeDetail struct {
	Amount    *big.Int `json:"amount"`
	Data      string   `json:"data"`
	Type      string   `json:"type"` // 0=转账收益 1-手续费收益
	TimeStamp int64    `json:"time_stamp"`
}

IncomeDetail 收益接口返回的收益明细信息

type NoFeePolicy

type NoFeePolicy struct {
}

NoFeePolicy charge no fee

func (*NoFeePolicy) GetNodeChargeFee

func (n *NoFeePolicy) GetNodeChargeFee(nodeAddress, tokenAddress common.Address, amount *big.Int) *big.Int

GetNodeChargeFee always return 0

type OneDayIncome

type OneDayIncome struct {
	Amount    *big.Int `json:"amount"`
	TimeStamp int64    `json:"time_stamp"`
}

OneDayIncome 一天的收益统计

type ProofForPFS

type ProofForPFS struct {
	BalanceProof balanceProof `json:"balance_proof"`
	Signature    []byte       `json:"balance_signature"`
	LockAmount   *big.Int     `json:"lock_amount"`
}

ProofForPFS proof for path finding service, test only

type ReceivedMediatedTrasnferListener

type ReceivedMediatedTrasnferListener func(msg *encoding.MediatedTransfer) (remove bool)

ReceivedMediatedTrasnferListener return true this listener should not be called next time

type RevealSecretListener

type RevealSecretListener func(msg *encoding.RevealSecret) (remove bool)

RevealSecretListener return true this listener should not be called next time

type SecretRequestPredictor

type SecretRequestPredictor func(msg *encoding.SecretRequest) (ignore bool)

SecretRequestPredictor return true to ignore this message,otherwise continue to process

type SentMediatedTransferListener

type SentMediatedTransferListener func(msg *encoding.MediatedTransfer) (remove bool)

SentMediatedTransferListener return true this listener should not be called next time

type Service

type Service struct {
	/*
		module
	*/
	Config                   *params.Config
	Chain                    *rpc.BlockChainService
	Transport                network.Transporter
	Protocol                 *network.PhotonProtocol
	MessageHandler           *photonMessageHandler
	StateMachineEventHandler *stateMachineEventHandler
	BlockChainEvents         *blockchain.Events

	FeePolicy     fee.Charger //Mediation fee
	NotifyHandler *notify.Handler
	PfsProxy      pfsproxy.PfsProxy

	/*
	 */
	PrivateKey            *ecdsa.PrivateKey
	NodeAddress           common.Address
	Token2ChannelGraph    map[common.Address]*graph.ChannelGraph
	Token2TokenNetwork    map[common.Address]common.Address
	Transfer2StateManager map[common.Hash]*transfer.StateManager
	Transfer2Result       map[common.Hash]*utils.AsyncResult
	SwapKey2TokenSwap     map[swapKey]*TokenSwap
	/*
		   This is a map from a hashlock to a list of channels, the same
			 hashlock can be used in more than one token (for tokenswaps), a
			 channel should be removed from this list only when the Lock is
			 released/withdrawn but not when the secret is registered.
	*/
	Token2LockSecretHash2Channels map[common.Address]map[common.Hash][]*channel.Channel
	FileLocker                    *flock.Flock
	BlockNumber                   *atomic.Value
	/*
		chan for user request
	*/
	UserReqChan                 chan *apiReq
	ProtocolMessageSendComplete chan *protocolMessage
	/*
		these four maps designed for token swap,but it can be extended for purpose usage.
		for example:
		cross chain.
	*/
	SecretRequestPredictorMap map[common.Hash]SecretRequestPredictor //for tokenswap
	RevealSecretListenerMap   map[common.Hash]RevealSecretListener   //for tokenswap
	/*
		important!:
			we must valid the mediated transfer is valid or not first, then to test  if this mediated transfer matchs any token swap.
	*/
	ReceivedMediatedTrasnferListenerMap map[*ReceivedMediatedTrasnferListener]bool //for tokenswap
	SentMediatedTransferListenerMap     map[*SentMediatedTransferListener]bool     //for tokenswap
	HealthCheckMap                      map[common.Address]bool

	StopCreateNewTransfers                bool // 是否停止接收新交易,默认false,目前仅在用户调用prepare-update接口的时候,会被置为true,直到重启		// boolean to check whether stop receiving new transfers, default to false. Currently it sets to true when clients invoke prepare-update, till it reconnects.
	EthConnectionStatus                   chan netshare.Status
	ChanHistoryContractEventsDealComplete chan struct{}
	BuildInfo                             *BuildInfo
	ChanSubmitBalanceProofToPFS           chan *channel.Channel // 供submitBalanceProofToPfsLoop线程使用
	// contains filtered or unexported fields
}

Service is a photon node most of Service's member is not thread safe, and should not visit outside the loop method.

func NewPhotonService

func NewPhotonService(chain *rpc.BlockChainService, privateKey *ecdsa.PrivateKey, transport network.Transporter, config *params.Config, notifyHandler *notify.Handler, dao models.Dao, pubdb *stormdb.PubRewardDB) (rs *Service, err error)

NewPhotonService create photon service

func (*Service) GetBlockNumber

func (rs *Service) GetBlockNumber() int64

GetBlockNumber return latest blocknumber of ethereum

func (*Service) GetChannelStatus

func (rs *Service) GetChannelStatus(channelIdentifier common.Hash) (int, int64)

GetChannelStatus return status of channel

func (*Service) GetDao

func (rs *Service) GetDao() models.Dao

GetDao return photon's dao

func (*Service) GetNodeChargeFee

func (rs *Service) GetNodeChargeFee(nodeAddress, tokenAddress common.Address, amount *big.Int) *big.Int

GetNodeChargeFee implement of FeeCharger

func (*Service) SendAndWait

func (rs *Service) SendAndWait(recipient common.Address, message encoding.SignedMessager, timeout time.Duration) error

SendAndWait Send `message` to `recipient` and wait for the response or `timeout`.

Args:
    recipient (address): The address of the node that will receive the
        message.
    message: The transfer message.
    timeout (float): How long should we wait for a response from `recipient`.

Returns:
    None: If the wait timed out
    object: The result from the event

func (*Service) SetBuildInfo

func (rs *Service) SetBuildInfo(goVersion, gitCommit, buildDate, version string)

SetBuildInfo 启动时保存构建信息

func (*Service) Start

func (rs *Service) Start() (err error)

Start the node.

func (*Service) Stop

func (rs *Service) Stop()

Stop the node.

func (*Service) UpdateChannel

func (rs *Service) UpdateChannel(c *channeltype.Serialization, tx models.TX) error

UpdateChannel 数据库中更新通道状态,同时通知App

func (*Service) UpdateChannelAndSaveAck

func (rs *Service) UpdateChannelAndSaveAck(c *channel.Channel, tag interface{})

UpdateChannelAndSaveAck 保证通道更新和消息确认是一个原子操作

func (*Service) UpdateChannelContractBalance

func (rs *Service) UpdateChannelContractBalance(c *channeltype.Serialization) error

UpdateChannelContractBalance 数据库更新,同时通知app

func (*Service) UpdateChannelNoTx

func (rs *Service) UpdateChannelNoTx(c *channeltype.Serialization) error

UpdateChannelNoTx 数据库更新,同时通知App,与updateChannelState的区别就在于回调函数的

func (*Service) UpdateChannelState

func (rs *Service) UpdateChannelState(c *channeltype.Serialization) error

UpdateChannelState 数据库更新,同时通知app

type TokenSwap

type TokenSwap struct {
	LockSecretHash  common.Hash
	Secret          common.Hash // maker will use
	FromToken       common.Address
	FromAmount      *big.Int
	FromNodeAddress common.Address //the node address of the owner of the `from_token`
	ToToken         common.Address
	ToAmount        *big.Int
	ToNodeAddress   common.Address //the node address of the owner of the `to_token`
	RouteInfo       []pfsproxy.FindPathResponse
}

TokenSwap for tokenswap api

type TransferDataResponse

type TransferDataResponse struct {
	Initiator      string   `json:"initiator_address"`
	Target         string   `json:"target_address"`
	Token          string   `json:"token_address"`
	Amount         *big.Int `json:"amount"`
	Secret         string   `json:"secret"`
	LockSecretHash string   `json:"lock_secret_hash"`
	Expiration     int64    `json:"expiration"`
	Fee            *big.Int `json:"fee"`
	IsDirect       bool     `json:"is_direct"`
}

TransferDataResponse :

Jump to

Keyboard shortcuts

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