dto

package
v0.0.0-...-e03aae4 Latest Latest
Warning

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

Go to latest
Published: May 6, 2022 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

nolint:golint,stylecheck

Index

Constants

View Source
const (
	DirectTransfer                    = "transferFrom"
	QuickTransfer                     = "quickTransfer"
	FullBalanceQuickTransfer          = "quickTransferAll"
	CreateSafeTransfer                = "createSafeTransfer"
	CreateFullBalanceSafeTransfer     = "createSafeTransferAll"
	ApproveSafeTransfer               = "approveSafeTransfer"
	ApproveFullBalanceSafeTransfer    = "approveSafeTransferAll"
	CancelSafeTransfer                = "cancelSafeTransfer"
	CancelFullBalanceSafeTransfer     = "cancelSafeTransferAll"
	ExpireSafeTransfer                = "expireSafeTransfers"
	CreateWPCSafeTransfer             = "createWPCSafeTransfer"
	CreateFullBalanceWPCSafeTransfer  = "createWPCSafeTransferAll"
	ApproveWPCSafeTransfer            = "approveWPCSafeTransfer"
	ApproveFullBalanceWPCSafeTransfer = "approveWPCSafeTransferAll"
	CancelWPCSafeTransfer             = "cancelWPCSafeTransfer"
	CancelFullBalanceWPCSafeTransfer  = "cancelWPCSafeTransferAll"
	ServiceFeeTransfer                = "feeTransfer"
	FrameTransfer                     = "frameTransfer"
)
View Source
const (
	// v1
	DirectTransferV1MethodID      = "23b872dd"
	CreateSafeTransferV1MethodID  = "d172317b"
	ApproveSafeTransferV1MethodID = "d1408c8d"
	CancelSafeTransferV1MethodID  = "8cac0630"
	MonetizeEmissionV1MethodID    = "6b88cfc1"
	MonetizeCertificateV1MethodID = "0ceb4c53"

	// v2
	DirectTransferV2MethodID      = "ab67aa58"
	CreateSafeTransferV2MethodID  = "6c9bcf6f"
	ApproveSafeTransferV2MethodID = "fd821f3f"
	CancelSafeTransferV2MethodID  = "a8389ace"
	ExpireSafeTransferV2MethodID  = "a5471f24"
	MonetizeEmissionV2MethodID    = "6b88cfc1"
	MonetizeCertificateV2MethodID = "0ceb4c53"

	// v3
	DirectTransferV3MethodID                    = "ab67aa58"
	QuickTransferV3MethodID                     = "536684e7"
	FullBalanceQuickTransferV3MethodId          = "ff0833f9"
	FrameTransferV3MethodID                     = "2e7cfa0c"
	CreateSafeTransferV3MethodID                = "6c9bcf6f"
	CreateFullBalanceSafeTransferV3MethodID     = "e33fe72c"
	ApproveSafeTransferV3MethodID               = "fd821f3f"
	ApproveFullBalanceSafeTransferV3MethodID    = "47a17ecb"
	CancelSafeTransferV3MethodID                = "a8389ace"
	CancelFullBalanceSafeTransferV3MethodID     = "e48a66f7"
	ExpireSafeTransferV3MethodID                = "a5471f24"
	CreateWPCSafeTransferV3MethodID             = "9ca9dfa7"
	CreateFullBalanceWPCSafeTransferV3MethodId  = "1a9b6d93"
	ApproveWPCSafeTransferV3MethodID            = "c48bb729"
	ApproveFullBalanceWPCSafeTransferV3MethodID = "8313ea89"
	CancelWPCSafeTransferV3MethodID             = "28b5f788"
	CancelFullBalanceWPCSafeTransferV3MethodID  = "c8c2e567"
	ServiceFeeTransferV3MethodID                = "4fe06442"
)

Variables

This section is empty.

Functions

func AbiInfoAddressToStorage

func AbiInfoAddressToStorage(addr common.Address) string

func BitbonBlockToDto

func BitbonBlockToDto(b []*Block, txFull bool) []*external.Block

BitbonBlockToDto converts clientBlock to dto.Block (proto). If txFull is true, dto.Block will contain dto.TransactionObject, else only list transaction hashes. If b is nil, return nil

func BitbonTransactionToDto

func BitbonTransactionToDto(t []*Transaction) []*external.TransactionResult

BitbonTransactionToDto converts []clientTransaction to []*dto.TransactionResult (proto). Contains all fields dto.TransactionResult.Transaction

func BitbonTransactionToHashesDto

func BitbonTransactionToHashesDto(t []*Transaction) []*external.TransactionResult

BitbonTransactionToHashesDto converts []clientTransaction to []*dto.TransactionResult (proto). Contains only txHashes

func ContractVersionExists

func ContractVersionExists(contractVersion ContractVersion) bool

func ContractVersionExistsString

func ContractVersionExistsString(contractVersion string) bool

func EventTypeExists

func EventTypeExists(eventType EventType) bool

func EventTypeExistsString

func EventTypeExistsString(eventType string) bool

func GetMethod

func GetMethod(methodName string) external.Method

func OperationTypeStrings

func OperationTypeStrings() []string

OperationTypeStrings returns a slice of all String values of the enum

func StorageToAbiInfoAddress

func StorageToAbiInfoAddress(addr string) common.Address

Types

type AbiInfo

type AbiInfo struct {
	Address      common.Address                 `json:"address"`
	AbiJSON      string                         `json:"abiJson"`
	Version      ContractVersion                `json:"version"`
	ContractType contract_snapshot.ContractType `json:"contractType"`
}

func AbiInfoFromStorage

func AbiInfoFromStorage(sa *models.AbiInfo) *AbiInfo

func (*AbiInfo) ToStorageAbiInfo

func (a *AbiInfo) ToStorageAbiInfo() *models.AbiInfo

type ApproveFullBalanceSafeTransferRequest

type ApproveFullBalanceSafeTransferRequest struct {
	Address        common.Address     `json:"address"`
	TransferID     string             `json:"transferId"`
	ProtectionCode string             `json:"protectionCode"`
	ExtraData      []byte             `json:"extraData"`
	CryptoData     AssetboxCryptoData `json:"crypto_data"`
}

type ApproveFullBalanceWPCSafeTransferRequest

type ApproveFullBalanceWPCSafeTransferRequest struct {
	Address    common.Address     `json:"address"`
	TransferID string             `json:"transferId"`
	ExtraData  []byte             `json:"extraData"`
	CryptoData AssetboxCryptoData `json:"crypto_data"`
}

type ApproveSafeTransferRequest

type ApproveSafeTransferRequest struct {
	Address        common.Address     `json:"address"`
	TransferID     string             `json:"transferId"`
	ProtectionCode string             `json:"protectionCode"`
	ExtraData      []byte             `json:"extraData"`
	CryptoData     AssetboxCryptoData `json:"crypto_data"`
}

type ApproveTransferEvent

type ApproveTransferEvent struct {
	TransferId []byte
	Status     uint8
}

ApproveTransferEvent Duplicated code for reflection parse input in transactions

func (*ApproveTransferEvent) MarshalJSON

func (arg *ApproveTransferEvent) MarshalJSON() ([]byte, error)

type ApproveWPCSafeTransferRequest

type ApproveWPCSafeTransferRequest struct {
	Address    common.Address     `json:"address"`
	TransferID string             `json:"transferId"`
	ExtraData  []byte             `json:"extraData"`
	CryptoData AssetboxCryptoData `json:"crypto_data"`
}

type AssetboxCryptoData

type AssetboxCryptoData struct {
	Wallet     []byte `json:"wallet"`
	Passphrase []byte `json:"passphrase"`
}

type BatchSizeMessage

type BatchSizeMessage struct {
	ID   common.Hash
	Size int
}

type BitbonArgs

type BitbonArgs interface {
	ToExternalDTO() *external.BitbonArgs
}

type BitbonBalanceChanged

type BitbonBalanceChanged struct {
	Assetbox     common.Address `json:"assetbox"`
	Balance      *big.Int       `json:"balance"`
	AssetboxType *big.Int       `json:"assetboxType"`
	Raw          types.Log      `json:"raw"`
}

type BitbonBalanceLocked

type BitbonBalanceLocked struct {
	Assetbox       common.Address `json:"assetbox"`
	BalanceAviable *big.Int       `json:"balanceAviable"`
	BalanceLocked  *big.Int       `json:"balanceLocked"`
	AssetboxType   *big.Int       `json:"assetboxType"`
	Raw            types.Log      `json:"raw"`
}

type BitbonBalanceUnlocked

type BitbonBalanceUnlocked struct {
	Assetbox       common.Address `json:"assetbox"`
	BalanceAviable *big.Int       `json:"balanceAviable"`
	BalanceLocked  *big.Int       `json:"balanceLocked"`
	AssetboxType   *big.Int       `json:"assetboxType"`
	Raw            types.Log      `json:"raw"`
}

type BitbonMonetizeArgs

type BitbonMonetizeArgs struct {
	Assetbox common.Address `json:"assetbox"`
	Amount   *big.Int       `json:"amount"`
}

For monetize txs

func (*BitbonMonetizeArgs) ToExternalDTO

func (arg *BitbonMonetizeArgs) ToExternalDTO() *external.BitbonArgs

type BitbonTx

type BitbonTx struct {
	Status      bool                        `json:"status"`
	ParseStatus ParseStatus                 `json:"parseStatus"`
	ParseError  error                       `json:"-"`
	TxError     bitbonErrors.Error          `json:"-"`
	Method      string                      `json:"method"`
	Args        BitbonArgs                  `json:"args"`
	Balances    map[common.Address]*big.Int `json:"balances"`
	Sender      common.Address              `json:"sender"`
	Events      []CustomEvent               `json:"events"`
}

func (*BitbonTx) MarshalJSON

func (t *BitbonTx) MarshalJSON() ([]byte, error)

type Block

type Block struct {
	Hash         common.Hash
	Number       *big.Int       `json:"number"`
	ParentHash   common.Hash    `json:"parentHash"`
	Nonce        uint64         `json:"nonce"`
	Miner        common.Address `json:"miner"`
	MixHash      common.Hash    `json:"mixHash"`
	Difficulty   *big.Int       `json:"difficulty"`
	ExtraData    string         `json:"extraData"`
	Size         string         `json:"size"`
	GasLimit     uint64         `json:"gasLimit"`
	GasUsed      uint64         `json:"gasUsed"`
	Timestamp    uint64         `json:"timestamp"`
	Transactions []*Transaction `json:"transactions"`
}

func ToBitbonBlock

func ToBitbonBlock(b *types.Block, txs []*Transaction) *Block

ToBitbonBlock converts types.Block (core ethereum) to Block. If b is nil, return empty struct

type BlockInfo

type BlockInfo struct {
	Hash        common.Hash
	BlockNumber uint64
	BlockTime   uint64
}

type BlocksTimePeriodRequest

type BlocksTimePeriodRequest struct {
	From uint64 `json:"from"`
	To   uint64 `json:"to"`
}

type CancelApprovalArgs

type CancelApprovalArgs struct {
	Address    common.Address `json:"address"`
	TransferId []byte         `json:"transferId"`
	ExtraData  []byte         `json:"extraData"`
}

CancelApprovalArgs For cancel and approve tx

func (*CancelApprovalArgs) MarshalJSON

func (arg *CancelApprovalArgs) MarshalJSON() ([]byte, error)

func (*CancelApprovalArgs) ToExternalDTO

func (arg *CancelApprovalArgs) ToExternalDTO() *external.BitbonArgs

type CancelFullBalanceSafeTransferRequest

type CancelFullBalanceSafeTransferRequest struct {
	Address    common.Address     `json:"address"`
	TransferID string             `json:"transferId"`
	ExtraData  []byte             `json:"extraData"`
	CryptoData AssetboxCryptoData `json:"crypto_data"`
}

type CancelFullBalanceWPCSafeTransferRequest

type CancelFullBalanceWPCSafeTransferRequest struct {
	Address    common.Address     `json:"address"`
	TransferID string             `json:"transferId"`
	ExtraData  []byte             `json:"extraData"`
	CryptoData AssetboxCryptoData `json:"crypto_data"`
}

type CancelSafeTransferRequest

type CancelSafeTransferRequest struct {
	Address    common.Address     `json:"address"`
	TransferID string             `json:"transferId"`
	ExtraData  []byte             `json:"extraData"`
	CryptoData AssetboxCryptoData `json:"crypto_data"`
}

type CancelWPCSafeTransferRequest

type CancelWPCSafeTransferRequest struct {
	Address    common.Address     `json:"address"`
	TransferID string             `json:"transferId"`
	ExtraData  []byte             `json:"extraData"`
	CryptoData AssetboxCryptoData `json:"crypto_data"`
}

type ContractVersion

type ContractVersion string
const (
	VersionV1 ContractVersion = "v1"
	VersionV2 ContractVersion = "v2"
	VersionV3 ContractVersion = "v3"
)

type CreateFullBalanceSafeTransferRequest

type CreateFullBalanceSafeTransferRequest struct {
	From           common.Address     `json:"from"`
	To             common.Address     `json:"to"`
	TransferID     string             `json:"transferId"`
	ProtectionCode string             `json:"protectionCode"`
	BTSC           string             `json:"btsc"`
	Retries        uint64             `json:"retries"`
	ExpiresAt      int64              `json:"expiresAt"`
	ExtraData      []byte             `json:"extraData"`
	CryptoData     AssetboxCryptoData `json:"crypto_data"`
}

func (*CreateFullBalanceSafeTransferRequest) UnmarshalJSON

func (r *CreateFullBalanceSafeTransferRequest) UnmarshalJSON(data []byte) error

type CreateFullBalanceWPCSafeTransferRequest

type CreateFullBalanceWPCSafeTransferRequest struct {
	From       common.Address     `json:"from"`
	To         common.Address     `json:"to"`
	TransferID string             `json:"transferId"`
	BTSC       string             `json:"btsc"`
	ExpiresAt  int64              `json:"expiresAt"`
	ExtraData  []byte             `json:"extraData"`
	CryptoData AssetboxCryptoData `json:"crypto_data"`
}

func (*CreateFullBalanceWPCSafeTransferRequest) UnmarshalJSON

func (r *CreateFullBalanceWPCSafeTransferRequest) UnmarshalJSON(data []byte) error

type CreateSafeTransferRequest

type CreateSafeTransferRequest struct {
	From           common.Address     `json:"from"`
	To             common.Address     `json:"to"`
	Value          *big.Int           `json:"value"`
	TransferID     string             `json:"transferId"`
	ProtectionCode string             `json:"protectionCode"`
	Retries        uint64             `json:"retries"`
	ExpiresAt      int64              `json:"expiresAt"`
	ExtraData      []byte             `json:"extraData"`
	CryptoData     AssetboxCryptoData `json:"crypto_data"`
}

func (*CreateSafeTransferRequest) UnmarshalJSON

func (r *CreateSafeTransferRequest) UnmarshalJSON(data []byte) error

type CreateWPCSafeTransferRequest

type CreateWPCSafeTransferRequest struct {
	From       common.Address     `json:"from"`
	To         common.Address     `json:"to"`
	Value      *big.Int           `json:"value"`
	TransferID string             `json:"transferId"`
	ExpiresAt  int64              `json:"expiresAt"`
	ExtraData  []byte             `json:"extraData"`
	CryptoData AssetboxCryptoData `json:"crypto_data"`
}

func (*CreateWPCSafeTransferRequest) UnmarshalJSON

func (r *CreateWPCSafeTransferRequest) UnmarshalJSON(data []byte) error

type CustomEvent

type CustomEvent interface {
	GetType() EventType
	MarshalJSON() ([]byte, error)
	ToProto() *external.Event
}

type DeleteAssetboxRequest

type DeleteAssetboxRequest struct {
	Address    common.Address     `json:"address"` // assetbox address to delete
	CryptoData AssetboxCryptoData `json:"crypto_data"`
}

type DirectTransferArgs

type DirectTransferArgs struct {
	From      common.Address `json:"from"`
	To        common.Address `json:"to"`
	Value     *big.Int       `json:"value"`
	ExtraData []byte         `json:"extraData"`
}

For DirectTransfer

func (*DirectTransferArgs) ToExternalDTO

func (arg *DirectTransferArgs) ToExternalDTO() *external.BitbonArgs

type DirectTransferRequest

type DirectTransferRequest struct {
	From      common.Address `json:"from"`
	To        common.Address `json:"to"`
	Value     *big.Int       `json:"value"`
	ExtraData []byte         `json:"extraData"`
}

func (*DirectTransferRequest) UnmarshalJSON

func (r *DirectTransferRequest) UnmarshalJSON(data []byte) error

type EmitBitbonRequest

type EmitBitbonRequest struct {
	Address common.Address `json:"address"`
	Value   *big.Int       `json:"value"`
}

func (*EmitBitbonRequest) UnmarshalJSON

func (r *EmitBitbonRequest) UnmarshalJSON(data []byte) error

type EventType

type EventType string
const (
	BalanceChangedEventType         EventType = "BalanceChanged"
	BalanceLockedEventType          EventType = "BalanceLocked"
	BalanceUnLockedEventType        EventType = "BalanceUnLocked"
	TransferExpiredEventType        EventType = "TransferExpired"
	FeeChargedEventType             EventType = "FeeCharged"
	QuickTransferCompletedEventType EventType = "QuickTransferCompleted"
	SafeTransferCreatedEventType    EventType = "SafeTransferCreated"
)

type ExpireSafeTransfersArgs

type ExpireSafeTransfersArgs struct {
	Ids [][32]byte `json:"ids"`
}

For Expire Safe Transfers

func (*ExpireSafeTransfersArgs) MarshalJSON

func (arg *ExpireSafeTransfersArgs) MarshalJSON() ([]byte, error)

func (*ExpireSafeTransfersArgs) ToExternalDTO

func (arg *ExpireSafeTransfersArgs) ToExternalDTO() *external.BitbonArgs

type ExpireTransferResponse

type ExpireTransferResponse struct {
	TxHashes   []common.Hash `json:"txHashes"`
	ExpiredNum int           `json:"expiredNum"`
}

type FeeChargedEvent

type FeeChargedEvent struct {
	From common.Address `json:"from"`
	To   common.Address `json:"to"`
	Fee  *big.Int       `json:"fee"`
}

func (*FeeChargedEvent) GetType

func (arg *FeeChargedEvent) GetType() EventType

func (*FeeChargedEvent) MarshalJSON

func (arg *FeeChargedEvent) MarshalJSON() ([]byte, error)

func (*FeeChargedEvent) ToProto

func (arg *FeeChargedEvent) ToProto() *external.Event

type FeeDistribution

type FeeDistribution struct {
	Account     string
	SelfPercent int32
}

type FeeSettingsResponse

type FeeSettingsResponse struct {
	ValueSettings        map[int32]string
	DistributionSettings map[int32][]*FeeDistribution
}

func (*FeeSettingsResponse) DistributionSettingsToExternalDTO

func (o *FeeSettingsResponse) DistributionSettingsToExternalDTO() map[int32]*external.FeeDistributionSettings

type FrameTransferArgs

type FrameTransferArgs struct {
	From      common.Address `json:"from"`
	To        common.Address `json:"to"`
	Value     *big.Int       `json:"value"`
	ExtraData []byte         `json:"extraData"`
}

For FrameTransfer

func (*FrameTransferArgs) ToExternalDTO

func (arg *FrameTransferArgs) ToExternalDTO() *external.BitbonArgs

type FullBalanceQuickTransferRequest

type FullBalanceQuickTransferRequest struct {
	From       common.Address     `json:"from"`
	To         common.Address     `json:"to"`
	BTSC       string             `json:"btsc"`
	ExtraData  []byte             `json:"extraData"`
	CryptoData AssetboxCryptoData `json:"crypto_data"`
}

type MonetizeRequest

type MonetizeRequest struct {
	Address common.Address `json:"address"`
	Value   *big.Int       `json:"value"`
}

func (*MonetizeRequest) UnmarshalJSON

func (r *MonetizeRequest) UnmarshalJSON(data []byte) error

type Nonces

type Nonces struct {
	Redis         interface{} // nonce in noncer redis
	Blockchain    interface{} // nonce in blockchain
	TxPoolQueued  interface{} // min nonce in tx pool queued transactions
	TxPoolPending interface{} // min nonce in tx pool pending transactions
	Broken        bool        // indicates if nonce is broken (there are transactions in tx pool queued transactions)
}

type OperationType

type OperationType int
const (
	UndefinedOperationType                OperationType = 0
	QuickTransferOperationType            OperationType = 101
	QuickTransferAllOperationType         OperationType = 102
	CreateSafeTransferOperationType       OperationType = 103
	CreateSafeTransferAllOperationType    OperationType = 104
	CreateWpcSafeTransferOperationType    OperationType = 105
	CreateWpcSafeTransferAllOperationType OperationType = 106
	CreateAssetboxOperationType           OperationType = 201
)

func OperationTypeString

func OperationTypeString(s string) (OperationType, error)

OperationTypeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func OperationTypeValues

func OperationTypeValues() []OperationType

OperationTypeValues returns all values of the enum

func (OperationType) IsAOperationType

func (i OperationType) IsAOperationType() bool

IsAOperationType returns "true" if the value is listed in the enum definition. "false" otherwise

func (OperationType) String

func (i OperationType) String() string

type ParseStatus

type ParseStatus uint8
const (
	ParseStatusSuccess         ParseStatus = 0
	ParseStatusParseError      ParseStatus = 1
	ParseStatusParseInputError ParseStatus = 2
	ParseStatusParseLogsError  ParseStatus = 3
)

type PrepareAssetboxesRequest

type PrepareAssetboxesRequest struct {
	Count uint64 `json:"count"`
}

type ProposeDistributionRequest

type ProposeDistributionRequest struct {
	Address      common.Address     `json:"address"`
	CryptoData   AssetboxCryptoData `json:"crypto_data"`
	Distribution map[string]uint64  `json:"distribution"`
}

type PublicAssetboxInfoResponse

type PublicAssetboxInfoResponse struct {
	Address   common.Address `json:"address"`
	Alias     string         `json:"alias"`
	ServiceID string         `json:"serviceId"`
	IsPublic  bool           `json:"isPublic"`
	ExtraInfo string         `json:"extraInfo"`
	IsMining  bool           `json:"isMining"`
}

type QuickTransferArgs

type QuickTransferArgs struct {
	From      common.Address `json:"from"`
	To        common.Address `json:"to"`
	Value     *big.Int       `json:"value"`
	ExtraData []byte         `json:"extraData"`
}

For QuickTransfer

func (*QuickTransferArgs) ToExternalDTO

func (arg *QuickTransferArgs) ToExternalDTO() *external.BitbonArgs

type QuickTransferCompleted

type QuickTransferCompleted struct {
	Source common.Address
	Dest   common.Address
	Amount *big.Int
}

type QuickTransferRequest

type QuickTransferRequest struct {
	From       common.Address     `json:"from"`
	To         common.Address     `json:"to"`
	Value      *big.Int           `json:"value"`
	ExtraData  []byte             `json:"extraData"`
	CryptoData AssetboxCryptoData `json:"crypto_data"`
}

func (*QuickTransferRequest) UnmarshalJSON

func (r *QuickTransferRequest) UnmarshalJSON(data []byte) error

type RangeBlocksByNumberRequest

type RangeBlocksByNumberRequest struct {
	BlockNumberFrom       uint64 `json:"blockNumberFrom"`
	BlockNumberTo         uint64 `json:"blockNumberTo"`
	ReturnFullTransaction bool   `json:"returnFullTransaction"`
}

type SafeTransferArgs

type SafeTransferArgs struct {
	From       common.Address `json:"from"`
	To         common.Address `json:"to"`
	TransferId []byte         `json:"transferId"`
	Value      *big.Int       `json:"value"`
	ExtraData  []byte         `json:"extraData"`
}

For SafeTransfer

func (*SafeTransferArgs) MarshalJSON

func (arg *SafeTransferArgs) MarshalJSON() ([]byte, error)

func (*SafeTransferArgs) ToExternalDTO

func (arg *SafeTransferArgs) ToExternalDTO() *external.BitbonArgs

type SafeTransferCreated

type SafeTransferCreated struct {
	Source     common.Address
	Dest       common.Address
	Value      *big.Int
	TransferId []byte
}

type ServiceFeeTransferArgs

type ServiceFeeTransferArgs struct {
	OpType *big.Int       `json:"opType"`
	From   common.Address `json:"from"`
}

func (*ServiceFeeTransferArgs) MarshalJSON

func (arg *ServiceFeeTransferArgs) MarshalJSON() ([]byte, error)

func (*ServiceFeeTransferArgs) ToExternalDTO

func (arg *ServiceFeeTransferArgs) ToExternalDTO() *external.BitbonArgs

type ServiceFeeTransferParams

type ServiceFeeTransferParams struct {
	OperationType *big.Int
	From          common.Address
	Key           *ecdsa.PrivateKey
}

type ServiceFeeTransferRequest

type ServiceFeeTransferRequest struct {
	From          common.Address `json:"from"`
	OperationType *big.Int       `json:"operationType"`
}

type SetFeeDistributionParams

type SetFeeDistributionParams struct {
	OperationType           *big.Int
	FeeDistributionAccounts []common.Address
	FeeDistributionAmounts  []*big.Int
}

type SetPublicAssetboxInfoRequest

type SetPublicAssetboxInfoRequest struct {
	Address    common.Address     `json:"address"`
	Alias      string             `json:"alias"`
	IsPublic   bool               `json:"isPublic"`
	ExtraInfo  string             `json:"extraInfo"`
	IsMining   bool               `json:"isMining"`
	ServiceID  string             `json:"service_id"`
	CryptoData AssetboxCryptoData `json:"crypto_data"`
}

type Transaction

type Transaction struct {
	Hash        common.Hash `json:"hash"`
	Nonce       uint64      `json:"nonce"`
	BlockHash   common.Hash `json:"blockHash"`
	BlockNumber uint64      `json:"blockNumber"`
	BlockTime   uint64      `json:"blockTime"`
	GasPrice    *big.Int    `json:"gasPrice"`
	Gas         uint64      `json:"gasLimit"`
	Time        uint64      `json:"creates"`
	Size        string      `json:"size"`
	BitbonTx    *BitbonTx   `json:"bitbonTx"`
}

func ToTransaction

func ToTransaction(t *types.Transaction, bb *BitbonTx, bi *BlockInfo) *Transaction

type TransactionByBlockHashAndIndexRequest

type TransactionByBlockHashAndIndexRequest struct {
	BlockHash common.Hash `json:"blockHash"`
	TxIndex   uint64      `json:"txIndex"`
}

type TransactionByBlockNumberAndIndexRequest

type TransactionByBlockNumberAndIndexRequest struct {
	BlockNumber uint64 `json:"blockNumber"`
	TxIndex     uint64 `json:"txIndex"`
}

type TransactionTimePeriodRequest

type TransactionTimePeriodRequest struct {
	From uint64 `json:"from"`
	To   uint64 `json:"to"`
}

type TransferExpiredEvent

type TransferExpiredEvent struct {
	TransferId []byte `json:"transferId"`
}

func (*TransferExpiredEvent) GetType

func (arg *TransferExpiredEvent) GetType() EventType

func (*TransferExpiredEvent) MarshalJSON

func (arg *TransferExpiredEvent) MarshalJSON() ([]byte, error)

func (*TransferExpiredEvent) ToProto

func (arg *TransferExpiredEvent) ToProto() *external.Event

type TransferResponse

type TransferResponse struct {
	BlockNumber uint64      `json:"blockNumber"`
	TxHash      common.Hash `json:"txHash"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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