models

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: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type ApproveTransferObj

type ApproveTransferObj struct {
	Address        common.Address
	TransferID     string
	ProtectionCode string
	ExtraData      []byte
	CryptoData     dto.AssetboxCryptoData
}

func ApproveTransferObjFromDTO

func ApproveTransferObjFromDTO(astor *dto.ApproveSafeTransferRequest) *ApproveTransferObj

func ApproveWPCTransferObjFromDTO

func ApproveWPCTransferObjFromDTO(astor *dto.ApproveWPCSafeTransferRequest) *ApproveTransferObj

type Assetbox

type Assetbox struct {
	Address    common.Address `json:"address"`
	Alias      string         `json:"alias"`
	ServiceID  string         `json:"serviceID"`
	CreatedAt  *time.Time     `json:"createdAt"`
	UpdatedAt  *time.Time     `json:"updatedAt"`
	DeletedAt  *time.Time     `json:"deletedAt"`
	IsPublic   bool           `json:"isPublic"`
	IsMining   bool           `json:"isMining"`
	ExtraInfo  string         `json:"extraInfo"`
	Wallet     []byte         `json:"wallet" `
	PassPhrase []byte         `json:"passPhrase"`

	Pk *ecdsa.PrivateKey `json:"-"` // nolint, assetbox private key
}

func (*Assetbox) PopulateContractData

func (a *Assetbox) PopulateContractData(ca *contracts.Assetbox)

func (*Assetbox) ToContractsAssetbox

func (a *Assetbox) ToContractsAssetbox() *contracts.Assetbox

type CancelTransferObj

type CancelTransferObj struct {
	Address    common.Address
	TransferID string
	ExtraData  []byte
	CryptoData dto.AssetboxCryptoData
}

func CancelTransferObjFromDTO

func CancelTransferObjFromDTO(cstor *dto.CancelSafeTransferRequest) *CancelTransferObj

func CancelWPCTransferObjFromDTO

func CancelWPCTransferObjFromDTO(cstor *dto.CancelWPCSafeTransferRequest) *CancelTransferObj

type CreateTransferObj

type CreateTransferObj struct {
	From           common.Address
	To             common.Address
	Value          *big.Int
	TransferID     string
	ProtectionCode string
	Retries        uint64
	ExpiresAt      int64
	Proof          []byte
	VK             []byte
	ExtraData      []byte
	CryptoData     dto.AssetboxCryptoData
}

func CreateTransferObjFromDTO

func CreateTransferObjFromDTO(cstor *dto.CreateSafeTransferRequest) *CreateTransferObj

func CreateWPCTransferObjFromDTO

func CreateWPCTransferObjFromDTO(cstor *dto.CreateWPCSafeTransferRequest) *CreateTransferObj

func (*CreateTransferObj) ToContractsTransfer

func (t *CreateTransferObj) ToContractsTransfer() *contracts.Transfer

type DirectTransferObj

type DirectTransferObj struct {
	From      common.Address
	To        common.Address
	Value     *big.Int
	ExtraData []byte
}

func DirectTransferObjFromDTO

func DirectTransferObjFromDTO(dtr *dto.DirectTransferRequest) *DirectTransferObj

type EmitObj

type EmitObj struct {
	Address common.Address
	Value   *big.Int
}

type FeeDistribution

type FeeDistribution struct {
	Account     common.Address
	SelfPercent *big.Int
}

func (*FeeDistribution) ToDTO

func (o *FeeDistribution) ToDTO() *dto.FeeDistribution

type FeeSettingsResponseObj

type FeeSettingsResponseObj struct {
	FeeValues        map[uint64]*big.Int
	FeeDistributions map[uint64][]*FeeDistribution
}

func (*FeeSettingsResponseObj) ToDTO

type QuickTransferObj

type QuickTransferObj struct {
	From       common.Address
	To         common.Address
	Value      *big.Int
	ExtraData  []byte
	CryptoData dto.AssetboxCryptoData
}

func FullBalanceQuickTransferObjFromDTO

func FullBalanceQuickTransferObjFromDTO(cstor *dto.FullBalanceQuickTransferRequest) *QuickTransferObj

func QuickTransferObjFromDTO

func QuickTransferObjFromDTO(cstor *dto.QuickTransferRequest) *QuickTransferObj

type ServiceFeeTransferObj

type ServiceFeeTransferObj struct {
	From          common.Address
	OperationType *big.Int
}

type ShortAssetbox

type ShortAssetbox struct {
	Address    common.Address `json:"address"`
	Wallet     []byte         `json:"wallet" `
	PassPhrase []byte         `json:"passPhrase"`
}

type TransferResponseObj

type TransferResponseObj struct {
	BlockNumber uint64      `json:"blockNumber"`
	TxHash      common.Hash `json:"txHash"`
	ExtraData   []byte      `json:"extraData"`
}

func (*TransferResponseObj) DTO

func (*TransferResponseObj) ToDTO

Jump to

Keyboard shortcuts

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