request

package
v0.0.0-...-e701cd2 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AE         = "AE"
	AF         = "AF"
	AG         = "AG"
	AI         = "AI"
	AL         = "AL"
	AM         = "AM"
	AO         = "AO"
	AR         = "AR"
	AS         = "AS"
	AT         = "AT"
	AU         = "AU"
	AW         = "AW"
	AX         = "AX"
	AZ         = "AZ"
	BA         = "BA"
	BB         = "BB"
	BD         = "BD"
	BE         = "BE"
	BF         = "BF"
	BG         = "BG"
	BH         = "BH"
	BI         = "BI"
	BJ         = "BJ"
	BL         = "BL"
	BM         = "BM"
	BN         = "BN"
	BO         = "BO"
	BQ         = "BQ"
	BR         = "BR"
	BS         = "BS"
	BT         = "BT"
	BV         = "BV"
	BW         = "BW"
	BY         = "BY"
	BZ         = "BZ"
	CA         = "CA"
	CC         = "CC"
	CD         = "CD"
	CF         = "CF"
	CG         = "CG"
	CH         = "CH"
	CI         = "CI"
	CK         = "CK"
	CL         = "CL"
	CM         = "CM"
	CN         = "CN"
	CO         = "CO"
	CR         = "CR"
	CU         = "CU"
	CV         = "CV"
	CW         = "CW"
	CX         = "CX"
	CY         = "CY"
	CZ         = "CZ"
	DE         = "DE"
	DJ         = "DJ"
	DK         = "DK"
	DM         = "DM"
	DO         = "DO"
	DZ         = "DZ"
	EC         = "EC"
	EE         = "EE"
	EG         = "EG"
	EH         = "EH"
	ER         = "ER"
	ES         = "ES"
	ET         = "ET"
	FI         = "FI"
	FJ         = "FJ"
	FK         = "FK"
	FM         = "FM"
	FO         = "FO"
	FR         = "FR"
	GA         = "GA"
	GB         = "GB"
	GD         = "GD"
	GE         = "GE"
	GF         = "GF"
	GG         = "GG"
	GH         = "GH"
	GI         = "GI"
	GL         = "GL"
	GM         = "GM"
	GN         = "GN"
	GP         = "GP"
	GQ         = "GQ"
	GR         = "GR"
	GS         = "GS"
	GT         = "GT"
	GU         = "GU"
	GW         = "GW"
	GY         = "GY"
	HK         = "HK"
	HM         = "HM"
	HN         = "HN"
	HR         = "HR"
	HT         = "HT"
	HU         = "HU"
	ID         = "ID"
	IE         = "IE"
	IL         = "IL"
	IM         = "IM"
	IN         = "IN"
	IO         = "IO"
	IQ         = "IQ"
	IR         = "IR"
	IS         = "IS"
	IT         = "IT"
	JE         = "JE"
	JM         = "JM"
	JO         = "JO"
	JP         = "JP"
	KE         = "KE"
	KG         = "KG"
	KH         = "KH"
	KI         = "KI"
	KM         = "KM"
	KN         = "KN"
	KP         = "KP"
	KR         = "KR"
	KW         = "KW"
	KY         = "KY"
	KZ         = "KZ"
	LA         = "LA"
	LB         = "LB"
	LC         = "LC"
	LI         = "LI"
	LK         = "LK"
	LR         = "LR"
	LS         = "LS"
	LT         = "LT"
	LU         = "LU"
	LV         = "LV"
	LY         = "LY"
	MA         = "MA"
	MC         = "MC"
	MD         = "MD"
	ME         = "ME"
	MF         = "MF"
	MG         = "MG"
	MH         = "MH"
	MK         = "MK"
	ML         = "ML"
	MM         = "MM"
	MN         = "MN"
	MO         = "MO"
	MP         = "MP"
	MQ         = "MQ"
	MR         = "MR"
	MS         = "MS"
	MT         = "MT"
	MU         = "MU"
	MV         = "MV"
	MW         = "MW"
	MX         = "MX"
	MY         = "MY"
	MZ         = "MZ"
	NA         = "NA"
	NC         = "NC"
	NE         = "NE"
	NF         = "NF"
	NG         = "NG"
	NI         = "NI"
	NL         = "NL"
	NO         = "NO"
	NP         = "NP"
	NR         = "NR"
	NU         = "NU"
	NZ         = "NZ"
	OM         = "OM"
	PA         = "PA"
	PE         = "PE"
	PF         = "PF"
	PG         = "PG"
	PH         = "PH"
	PK         = "PK"
	PL         = "PL"
	PM         = "PM"
	PN         = "PN"
	PR         = "PR"
	PS         = "PS"
	PT         = "PT"
	PW         = "PW"
	PY         = "PY"
	QA         = "QA"
	RE         = "RE"
	RO         = "RO"
	RS         = "RS"
	RU         = "RU"
	RW         = "RW"
	SA         = "SA"
	SB         = "SB"
	SC         = "SC"
	SD         = "SD"
	SE         = "SE"
	SG         = "SG"
	SH         = "SH"
	SI         = "SI"
	SJ         = "SJ"
	SK         = "SK"
	SL         = "SL"
	SM         = "SM"
	SN         = "SN"
	SO         = "SO"
	SR         = "SR"
	SS         = "SS"
	ST         = "ST"
	SV         = "SV"
	SX         = "SX"
	SY         = "SY"
	SZ         = "SZ"
	TC         = "TC"
	TD         = "TD"
	TF         = "TF"
	TG         = "TG"
	TH         = "TH"
	TJ         = "TJ"
	TK         = "TK"
	TL         = "TL"
	TM         = "TM"
	TN         = "TN"
	TO         = "TO"
	TR         = "TR"
	TT         = "TT"
	TV         = "TV"
	TW         = "TW"
	TZ         = "TZ"
	UA         = "UA"
	UG         = "UG"
	UM         = "UM"
	US         = "US"
	UY         = "UY"
	UZ         = "UZ"
	VA         = "VA"
	VC         = "VC"
	VE         = "VE"
	VG         = "VG"
	VI         = "VI"
	VN         = "VN"
	VU         = "VU"
	WF         = "WF"
	WS         = "WS"
	YE         = "YE"
	YT         = "YT"
	ZA         = "ZA"
	ZM         = "ZM"
	ZW         = "ZW"
)
View Source
const (
	BTC  Currency = "BTC"
	BCH           = "BCH"
	LTC           = "LTC"
	ETH           = "ETH"
	XRP           = "XRP"
	XLM           = "XLM"
	VET           = "VET"
	NEO           = "NEO"
	BNB           = "BNB"
	USDT          = "USDT"
	LEO           = "LEO"
	LINK          = "LINK"
	WBTC          = "WBTC"
	UNI           = "UNI"
	FREE          = "FREE"
	MKR           = "MKR"
	USDC          = "USDC"
	BAT           = "BAT"
	TUSD          = "TUSD"
	PAX           = "PAX"
	PLTC          = "PLTC"
	ADA           = "ADA"
	XCON          = "XCON"
	MMY           = "MMY"
	PAXG          = "PAXG"
	TRON          = "TRON"
)

Variables

View Source
var EthBasedCurrencies = []string{
	"USDT",
	"LEO",
	"LINK",
	"UNI",
	"FREE",
	"MKR",
	"USDC",
	"BAT",
	"TUSD",
	"PAX",
	"PAXG",
	"PLTC",
	"XCON",
	"ETH",
	"MMY",
}

Functions

This section is empty.

Types

type BaseTransferEthErc20Offchain

type BaseTransferEthErc20Offchain struct {
	SenderAccountId string `validate:"required,min=24,max=24"`
	Address         string `validate:"required,min=42,max=42"`
	Amount          string `validate:"required,numeric"`
	Compliant       bool
	PaymentId       string `validate:"min=1,max=100"`
	SenderNote      string `validate:"min=1,max=500"`
	Nonce           uint64 `validate:"min=0"`
	GasPrice        string `validate:"numeric"`
	GasLimit        string `validate:"numeric"`
}

type BlockAmount

type BlockAmount struct {
	Amount      *string `json:"amount"`
	Type        *string `json:"type"`
	Description *string `json:"description"`
}

type BroadcastWithdrawal

type BroadcastWithdrawal struct {
	/**
	 * Currency of signed transaction to be broadcast, BTC, LTC, BCH, ETH, XRP, ERC20
	 * @type {string}
	 * @memberof BroadcastWithdrawal
	 */
	Currency string
	/**
	 * Raw signed transaction to be published to network.
	 * @type {string}
	 * @memberof BroadcastWithdrawal
	 */
	TxData string
	/**
	 * Withdrawal ID to be completed by transaction broadcast
	 * @type {string}
	 * @memberof BroadcastWithdrawal
	 */
	WithdrawalId string
	/**
	 * Signature ID to be completed by transaction broadcast
	 * @type {string}
	 * @memberof BroadcastWithdrawal
	 */
	SignatureId string
}

type Country

type Country string

type CreateAccount

type CreateAccount struct {
	Currency           string          `json:"currency" validate:"required,min=2,max=40"`
	Xpub               string          `json:"xpub" validate:"omitempty,max=192"`
	Compliant          bool            `json:"compliant"`
	AccountingCurrency *string         `json:"accountingCurrency" validate:"omitempty"`
	AccountCode        *string         `json:"accountCode" validate:"omitempty,min=1,max=50"`
	AccountNumber      *string         `json:"accountNumber" validate:"omitempty,min=1,max=20"`
	Customer           *CustomerUpdate `json:"customer" validate:"omitempty"`
}

type CreateAccountsBatch

type CreateAccountsBatch struct {
	Accounts []CreateAccount `json:"accounts" validate:"required"`
}

type CreateCurrency

type CreateCurrency struct {
	Name               string
	Supply             string
	Description        string
	AccountCode        string
	BasePair           interface{}
	BaseRate           uint32
	AccountingCurrency common.Fiat
	Customer           CustomerUpdate
}

type CreateRecord

type CreateRecord struct {
	Data           string `validate:"required,min=1,max=130000"`
	FromPrivateKey string `validate:"required,min=32,max=66"`
	To             string `validate:"min=42,max=42"`
	Nonce          uint64 `validate:"min=0"`
	EthFee         *Fee   `validate:"omitempty"`
}

type CreateSubscription

type CreateSubscription struct {
	Type common.SubscriptionType `json:"type"`
	Attr interface{}             `json:"attr"`
}

type CreateTransaction

type CreateTransaction struct {
	SenderAccountId    string  `json:"senderAccountId" validate:"required,len=24"`
	RecipientAccountId string  `json:"recipientAccountId" validate:"required,len=24"`
	Amount             string  `json:"amount" validate:"required,numeric,max=38"`
	PaymentId          *string `json:"paymentId" validate:"min=1,max=100"`
	TransactionCode    *string `json:"transactionCode" validate:"min=1,max=100"`
	SenderNote         *string `json:"senderNote" validate:"min=1,max=500"`
	RecipientNote      *string `json:"recipientNote" validate:"min=1,max=500"`
	BaseRate           uint32  `json:"baseRate" validate:"min=0"`
	Anonymous          bool    `json:"anonymous"`
	Compliant          bool    `json:"compliant"`
}

type CreateWithdrawal

type CreateWithdrawal struct {
	SenderAccountId string `validate:"required,len=24"`
	Address         string `validate:"required,min=1,max=10000"`
	Amount          string `validate:"required,numeric,max=38"`
	Fee             string `validate:"numeric"`
	Compliant       bool
	PaymentId       string `validate:"min=1,max=100"`
	SenderNote      string `validate:"required,min=1,max=500"`
	MultipleAmounts []string
	Attr            string `validate:"max=64"`
}

type Currency

type Currency string

func (Currency) IsValid

func (c Currency) IsValid() (*string, bool)

func (Currency) String

func (c Currency) String() string

type CurrencyOperation

type CurrencyOperation struct {
	AccountId       string
	Amount          string
	PaymentId       string
	TransactionCode string
	SenderNote      string
	RecipientNote   string
	CounterAccount  string
	Reference       string
}

type CustomerUpdate

type CustomerUpdate struct {
	CustomerCountry    Country     `json:"customerCountry" validate:"min=2,max=2"`
	AccountingCurrency common.Fiat `json:"accountingCurrency" validate:"min=3,max=3"`
	ProviderCountry    Country     `json:"providerCountry" validate:"min=2,max=2"`
	ExternalId         string      `json:"externalId" validate:"min=1,max=100"`
}

type DeployEthErc20

type DeployEthErc20 struct {
	Name           string `validate:"required,min=1,max=100"`
	Symbol         string `validate:"required,min=1,max=30"`
	Address        string `validate:"required,min=42,max=42"`
	Supply         string `validate:"required,numeric"`
	Digits         int    `validate:"required,min=1,max=30"`
	FromPrivateKey string `validate:"required,min=66,max=66"`
	Nonce          uint64 `validate:"required,min=0"`
	Fee            *Fee   `validate:"omitempty"`
}

type EstimateGasVet

type EstimateGasVet struct {
	From  string   `json:"from" validate:"required,len=66"`
	To    string   `json:"to" validate:"required,len=42"`
	Value string   `json:"value" validate:"required,numeric"`
	Data  string   `json:"data" validate:"required,len=10000"`
	Nonce *big.Int `json:"nonce" validate:"omitempty,min=0"`
}

type Fee

type Fee struct {
	GasLimit string `validate:"required,numeric"`
	GasPrice string `validate:"required,numeric"`
}

type FromAddress

type FromAddress struct {
	Address    string `json:"address" validate:"required,min=30,max=50"`
	PrivateKey string `json:"privateKey" validate:"required,min=52,max=52"`
}

type FromUTXO

type FromUTXO struct {
	TxHash     string `json:"txHash" validate:"required,min=64,max=64"`
	Index      uint32 `json:"index" validate:"required"`
	PrivateKey string `json:"privateKey" validate:"required,min=52,max=52"`
}

type FromUTXOBcash

type FromUTXOBcash struct {
	Value    float64  `validate:"required,min=0"`
	FromUTXO FromUTXO `validate:"required"`
}

type KeyPair

type KeyPair struct {
	Address    string `validate:"required,min=30,max=50"`
	PrivateKey string `validate:"required,min=52,max=52"`
}

type OrderBookRequest

type OrderBookRequest struct {
	Type               TradeType `json:"type" validate:"required"`
	Price              string    `json:"price" validate:"required,numeric,max=38"`
	Amount             string    `json:"amount" validate:"required,numeric,max=38"`
	Pair               string    `json:"pair" validate:"required,alphanumunicode,min=3,max=30"`
	Currency1AccountId string    `json:"currency1AccountId" validate:"required,len=24"`
	Currency2AccountId string    `json:"currency2AccountId" validate:"required,len=24"`
	Fee                uint32    `json:"fee" validate:"required,min=0,max=100"`
	FeeAccountId       string    `json:"feeAccountId" validate:"required,len=24"`
}

type SubscriptionAttrAccountBalanceLimit

type SubscriptionAttrAccountBalanceLimit struct {
	Limit         string
	TypeOfBalance string
}

type SubscriptionAttrCompleteBlockchainTx

type SubscriptionAttrCompleteBlockchainTx struct {
	Currency string
}

type SubscriptionAttrIncomingBlockchainTx

type SubscriptionAttrIncomingBlockchainTx struct {
	Id  string
	Url string
}

type SubscriptionAttrOffchainWithdrawal

type SubscriptionAttrOffchainWithdrawal struct {
	Currency string `json:"currency"`
}

type SubscriptionAttrTxHistoryReport

type SubscriptionAttrTxHistoryReport struct {
	Interval uint32
}

type To

type To struct {
	Address string  `json:"address" validate:"required,min=30,max=50"`
	Value   float64 `json:"value" validate:"required,min=0"`
}

type TradeType

type TradeType string
const (
	BUY  TradeType = "BUY"
	SELL           = "SELL"
)

type TransactionFilter

type TransactionFilter struct {
	Id              *string                 `json:"id" validate:"min=1,max=50"`
	From            *uint64                 `json:"id" validate:"min=0"`
	To              *uint64                 `json:"id" validate:"min=0"`
	Account         *string                 `json:"account" validate:"min=1,max=50"`
	CounterAccount  *string                 `json:"counterAccount" validate:"min=1,max=50"`
	Currency        *string                 `json:"currency" validate:"min=1,max=50"`
	PaymentId       *string                 `json:"paymentId" validate:"min=1,max=100"`
	TransactionCode *string                 `json:"transactionCode" validate:"min=1,max=100"`
	SenderNote      *string                 `json:"SenderNote" validate:"min=1,max=500"`
	RecipientNote   *string                 `json:"RecipientNote" validate:"min=1,max=500"`
	OpType          *common.OperationType   `json:"opType"`
	TransactionType *common.TransactionType `json:"transactionType"`
}

type TransferBchBlockchain

type TransferBchBlockchain struct {
	FromUTXO []FromUTXOBcash `validate:"required"`
	To       []To            `validate:"required"`
}

type TransferBtcBasedBlockchain

type TransferBtcBasedBlockchain struct {
	FromAddress []FromAddress `json:"fromAddress" validate:"omitempty"`
	FromUTXO    []FromUTXO    `json:"fromUtxo" validate:"omitempty"`
	To          []To          `json:"to" validate:"required"`
}

type TransferBtcBasedOffchain

type TransferBtcBasedOffchain struct {
	Withdrawal *CreateWithdrawal `validate:"required"`
	Mnemonic   string            `validate:"min=1,max=500"`
	KeyPair    []KeyPair         `validate:"omitempty"`
}

type TransferCustomErc20

type TransferCustomErc20 struct {
	FromPrivateKey  string `validate:"required,min=66,max=66"`
	To              string `validate:"required,min=42,max=42"`
	Amount          string `validate:"required,numeric"`
	ContractAddress string `validate:"required,min=42,max=42"`
	Fee             *Fee   `validate:"omitempty"`
	Digits          int    `validate:"required,min=1,max=30"`
	Nonce           uint64 `validate:"required,min=0"`
}

type TransferEthErc20

type TransferEthErc20 struct {
	FromPrivateKey string `validate:"required,min=66,max=66"`
	To             string `validate:"required,min=42,max=42"`
	Amount         string `validate:"required,numeric"`
	Data           string `validate:"max=130000"`
	Currency       string `validate:"required"` //@IsIn(ETH_BASED_CURRENCIES)
	Fee            *Fee   `validate:"omitempty"`
	Nonce          uint64 `validate:"min=0"`
}

type TransferEthErc20Offchain

type TransferEthErc20Offchain struct {
	BaseTransferEthErc20Offchain *BaseTransferEthErc20Offchain `validate:"required"`
	Mnemonic                     string                        `validate:"min=1,max=500"`
	Index                        uint32                        `validate:"min=0"`
	PrivateKey                   string                        `validate:"min=66,max=66"`
}

type TransferEthOffchain

type TransferEthOffchain struct {
	Mnemonic                     string                        `validate:"min=1,max=500"`
	Index                        uint32                        `validate:"min=0"`
	PrivateKey                   string                        `validate:"min=66,max=66"`
	Data                         string                        `validate:"max=50000"`
	BaseTransferEthErc20Offchain *BaseTransferEthErc20Offchain `validate:"required"`
}

type TransferVet

type TransferVet struct {
	FromPrivateKey string  `validate:"required,min=66,max=66"`
	To             string  `validate:"required,min=42,max=42"`
	Amount         string  `validate:"required,numeric"`
	Data           string  `validate:"required,max=10000"`
	Fee            *VetFee `validate:"omitempty"`
}

type UpdateCurrency

type UpdateCurrency struct {
	Name     string
	BasePair interface{}
	BaseRate uint32
}

type VetFee

type VetFee struct {
	GasLimit string `validate:"required,numeric"`
}

Jump to

Keyboard shortcuts

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