Documentation ¶
Index ¶
- Constants
- func AmountTooSmall(err error) bool
- func InsufficientBalance(err error) bool
- type Asset
- type Assets
- type PaymentRequest
- type PriceNumber
- type Snapshot
- func QuerySnapshots(ctx context.Context, token, assetId string, desc bool, limit int, ...) ([]Snapshot, *request.Pagination, error)
- func Transfer(ctx context.Context, token string, pin account.Pin, tr TransferRequest) (*Snapshot, error)
- func Withdraw(ctx context.Context, token string, pin account.Pin, wr WithdrawRequest) (*Snapshot, error)
- type Status
- type TransferRequest
- type WithdrawRequest
Constants ¶
View Source
const ( USDT = "815b0b1a-2764-3736-8faa-42d694fa620a" // "USDT", BTC = "c6d0c728-2624-429b-8e0d-d9d19b6592fa" // "BTC", BCH = "fd11b6e3-0b87-41f1-a41f-f0e9b49e5bf0" // "BCH", EOS = "6cfe566e-4aad-470b-8c9a-2fd35b49c68d" //: "EOS", ETH = "43d61dcd-e413-450d-80b8-101d5e903357" //: "ETH", ETC = "2204c1ee-0ea2-4add-bb9a-b3719cfff93a" LTC = "76c802a2-7c88-447f-a93e-c29c9e5dd9c8" )
Variables ¶
This section is empty.
Functions ¶
func AmountTooSmall ¶
func InsufficientBalance ¶
Types ¶
type Asset ¶
type Asset struct { AssetId string `json:"assetId"` AssetKey string `json:"assetKey,omitempty"` ChainId string `json:"chainId"` Icon string `json:"icon"` Name string `json:"name"` Symbol string `json:"symbol"` Balance float64 `json:"balance"` PublicKey string `json:"publicKey,omitempty"` AccountName string `json:"accountName,omitempty"` AccountTag string `json:"accountTag,omitempty"` Price float64 `json:"price"` Change float64 `json:"change"` }
type PaymentRequest ¶
type PriceNumber ¶
type PriceNumber string
func (*PriceNumber) MarshalJSON ¶
func (p *PriceNumber) MarshalJSON() ([]byte, error)
func (*PriceNumber) UnmarshalJSON ¶
func (p *PriceNumber) UnmarshalJSON(b []byte) error
type Snapshot ¶
type Snapshot struct { SnapshotId string `json:"snapshotId"` AssetId string `json:"assetId"` TraceId string `json:"traceId"` Amount PriceNumber `json:"amount"` Memo string `json:"memo"` CreatedAt int64 `json:"createdAt"` CounterUserId string `json:"counterUserId"` Sender string `json:"sender"` Receiver string `json:"receiver"` TransactionHash string `json:"transactionHash"` }
func QuerySnapshots ¶
type Status ¶
type TransferRequest ¶
type TransferRequest struct { PaymentRequest CounterUserId string `json:"counterUserId"` }
type WithdrawRequest ¶
type WithdrawRequest struct { PaymentRequest PublicKey string `json:"publicKey"` // 提现地址 }
Click to show internal directories.
Click to hide internal directories.