api

package
v0.0.0-...-0594c70 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountApi

type AccountApi struct {
	Client safeheron.Client
}

func (*AccountApi) AddCoin

func (e *AccountApi) AddCoin(d AddCoinRequest, r *AddCoinResponse) error

func (*AccountApi) AddCoinV2

func (e *AccountApi) AddCoinV2(d AddCoinV2Request, r *AddCoinV2Response) error

func (*AccountApi) BatchCreateAccount

func (*AccountApi) BatchCreateAccountCoin

func (*AccountApi) BatchCreateAccountV2

func (e *AccountApi) BatchCreateAccountV2(d BatchCreateAccountRequest, r *[]CreateAccountResponse) error

func (*AccountApi) CreateAccount

func (*AccountApi) InfoAccountCoinAddress

func (*AccountApi) ListAccountCoin

func (e *AccountApi) ListAccountCoin(d ListAccountCoinRequest, r *AccountCoinResponse) error

func (*AccountApi) ListAccountCoinAddress

func (*AccountApi) ListAccounts

func (e *AccountApi) ListAccounts(d ListAccountRequest, r *ListAccountResponse) error

func (*AccountApi) OneAccounts

func (e *AccountApi) OneAccounts(d OneAccountRequest, r *AccountResponse) error

func (*AccountApi) RenameAccountCoinAddress

func (e *AccountApi) RenameAccountCoinAddress(d RenameAccountCoinAddressRequest, r *ResultResponse) error

func (*AccountApi) UpdateAccountShowState

func (e *AccountApi) UpdateAccountShowState(d UpdateAccountShowStateRequest, r *ResultResponse) error

type AccountCoinAddressResponse

type AccountCoinAddressResponse struct {
	PageNumber    int32 `json:"pageNumber"`
	PageSize      int32 `json:"pageSize"`
	TotalElements int64 `json:"totalElements"`
	Content       []struct {
		AddressGroupKey  string `json:"addressGroupKey"`
		AddressGroupName string `json:"addressGroupName"`
		CustomerRefId    string `json:"customerRefId"`
		AddressList      []struct {
			Address        string `json:"address"`
			AddressType    string `json:"addressType"`
			DerivePath     string `json:"derivePath"`
			AddressBalance string `json:"addressBalance"`
		} `json:"addressList"`
	} `json:"content"`
}

type AccountCoinResponse

type AccountCoinResponse []struct {
	CoinKey           string `json:"coinKey"`
	CoinFullName      string `json:"coinFullName"`
	CoinName          string `json:"coinName"`
	CoinDecimal       int32  `json:"coinDecimal"`
	TxRefUrl          string `json:"txRefUrl"`
	AddressRefUrl     string `json:"addressRefUrl"`
	LogoUrl           string `json:"logoUrl"`
	Symbol            string `json:"symbol"`
	IsMultipleAddress string `json:"isMultipleAddress"`
	FeeCoinKey        string `json:"feeCoinKey"`
	FeeUnit           string `json:"feeUnit"`
	FeeDecimal        int32  `json:"feeDecimal"`
	ShowCoinDecimal   int32  `json:"showCoinDecimal"`
	Balance           string `json:"balance"`
	UsdBalance        string `json:"usdBalance"`
	AddressList       []struct {
		Address        string `json:"address"`
		AddressType    string `json:"addressType"`
		DerivePath     string `json:"derivePath"`
		AddressBalance string `json:"addressBalance"`
	} `json:"addressList"`
}

type AccountResponse

type AccountResponse struct {
	AccountKey    string `json:"accountKey"`
	CustomerRefId string `json:"customerRefId"`
	AccountName   string `json:"accountName"`
	AccountIndex  int32  `json:"accountIndex"`
	AccountType   string `json:"accountType"`
	AccountTag    string `json:"accountTag"`
	HiddenOnUI    bool   `json:"hiddenOnUI"`
	UsdBalance    string `json:"usdBalance"`
	PubKeys       []struct {
		SignAlg string `json:"signAlg"`
		PubKey  string `json:"pubKey"`
	} `json:"pubKeys"`
}

type AddCoinRequest

type AddCoinRequest struct {
	CoinKey    string `json:"coinKey,omitempty"`
	AccountKey string `json:"accountKey,omitempty"`
}

type AddCoinResponse

type AddCoinResponse []struct {
	Address     string `json:"address"`
	AddressType string `json:"addressType"`
	DerivePath  string `json:"derivePath"`
}

type AddCoinV2Request

type AddCoinV2Request struct {
	CoinKeyList []string `json:"coinKeyList,omitempty"`
	AccountKey  string   `json:"accountKey,omitempty"`
}

type AddCoinV2Response

type AddCoinV2Response struct {
	AccountKey      string `json:"accountKey"`
	CoinAddressList []struct {
		CoinKey          string `json:"coinKey"`
		AddressGroupKey  string `json:"addressGroupKey"`
		AddressGroupName string `json:"addressGroupName"`
		AddressList      []struct {
			Address     string `json:"address"`
			AddressType string `json:"addressType"`
			DerivePath  string `json:"derivePath"`
		} `json:"addressList"`
	} `json:"coinAddressList"`
}

type BatchCreateAccountCoinRequest

type BatchCreateAccountCoinRequest struct {
	CoinKey          string   `json:"coinKey"`
	AccountKeyList   []string `json:"accountKeyList"`
	AddressGroupName string   `json:"addressGroupName,omitempty"`
}

type BatchCreateAccountCoinResponse

type BatchCreateAccountCoinResponse []struct {
	AccountKey       string `json:"accountKey"`
	AddressGroupKey  string `json:"addressGroupKey"`
	AddressGroupName string `json:"addressGroupName"`
	AddressList      []struct {
		Address     string `json:"address"`
		AddressType string `json:"addressType"`
		DerivePath  string `json:"derivePath"`
	} `json:"addressList"`
}

type BatchCreateAccountCoinUTXORequest

type BatchCreateAccountCoinUTXORequest struct {
	CoinKey          string `json:"coinKey"`
	AccountKey       string `json:"accountKey"`
	Count            int32  `json:"count"`
	AddressGroupName string `json:"addressGroupName"`
}

type BatchCreateAccountCoinUTXOResponse

type BatchCreateAccountCoinUTXOResponse []struct {
	AccountKey       string `json:"accountKey"`
	AddressGroupKey  string `json:"addressGroupKey"`
	AddressGroupName string `json:"addressGroupName"`
	AddressList      []struct {
		Address     string `json:"address"`
		AddressType string `json:"addressType"`
		DerivePath  string `json:"derivePath"`
	} `json:"addressList"`
}

type BatchCreateAccountRequest

type BatchCreateAccountRequest struct {
	AccountName string `json:"accountName,omitempty"`
	HiddenOnUI  bool   `json:"hiddenOnUI,omitempty"`
	Count       int32  `json:"count"`
	AccountTag  string `json:"accountTag,omitempty"`
}

type BatchCreateAccountResponse

type BatchCreateAccountResponse struct {
	AccountKeyList []string `json:"accountKeyList"`
}

type BatchCreateWeb3AccountRequest

type BatchCreateWeb3AccountRequest struct {
	AccountName string `json:"accountName,omitempty"`
	Count       int32  `json:"count"`
}

type BatchCreateWeb3AccountResponse

type BatchCreateWeb3AccountResponse []struct {
	AccountKey string `json:"accountKey"`
	PubKeyList []struct {
		SignAlg string `json:"signAlg"`
		PubKey  string `json:"pubKey"`
	} `json:"pubKeyList"`
	AddressList []struct {
		BlockchainType string `json:"blockchainType"`
		Address        string `json:"address"`
		DerivePath     string `json:"derivePath"`
	} `json:"addressList"`
}

type BatchUpdateAccountTagRequest

type BatchUpdateAccountTagRequest struct {
	AccountKeyList []string `json:"accountKeyList"`
	AccountTag     string   `json:"accountTag"`
}

type CancelTransactionRequest

type CancelTransactionRequest struct {
	TxKey  string `json:"txKey"`
	TxType string `json:"txType,omitempty"`
}

type CancelWeb3SignRequest

type CancelWeb3SignRequest struct {
	TxKey string `json:"txKey"`
}

type CheckCoinAddressRequest

type CheckCoinAddressRequest struct {
	CoinKey           string `json:"coinKey"`
	Address           string `json:"address"`
	CheckContract     bool   `json:"checkContract,omitempty"`
	CheckAml          bool   `json:"checkAml,omitempty"`
	CheckAddressValid bool   `json:"checkAddressValid,omitempty"`
}

type CheckCoinAddressResponse

type CheckCoinAddressResponse struct {
	Contract     bool `json:"contract"`
	AmlValid     bool `json:"amlValid"`
	AddressValid bool `json:"addressValid"`
}

type CoinApi

type CoinApi struct {
	Client safeheron.Client
}

func (*CoinApi) CheckCoinAddress

func (*CoinApi) CoinBalanceSnapshot

func (*CoinApi) CoinBlockHeight

func (e *CoinApi) CoinBlockHeight(d CoinBlockHeightRequest, r *CoinBlockHeightResponse) error

func (*CoinApi) ListCoin

func (e *CoinApi) ListCoin(r *CoinResponse) error

func (*CoinApi) ListCoinMaintain

func (e *CoinApi) ListCoinMaintain(r *CoinMaintainResponse) error

type CoinBalanceSnapshotRequest

type CoinBalanceSnapshotRequest struct {
	Gmt8Date string `json:"gmt8Date"`
}

type CoinBalanceSnapshotResponse

type CoinBalanceSnapshotResponse struct {
	CoinKey     string `json:"coinKey"`
	CoinBalance string `json:"coinBalance"`
}

type CoinBlockHeightRequest

type CoinBlockHeightRequest struct {
	CoinKey string `json:"coinKey"`
}

type CoinBlockHeightResponse

type CoinBlockHeightResponse []struct {
	CoinKey          string `json:"coinKey"`
	LocalBlockHeight string `json:"localBlockHeight"`
}

type CoinMaintainResponse

type CoinMaintainResponse []struct {
	CoinKey   string `json:"coinKey"`
	Maintain  bool   `json:"maintain"`
	Title     string `json:"title"`
	Content   int32  `json:"content"`
	StartTime string `json:"startTime"`
	EndTime   string `json:"endTime"`
}

type CoinResponse

type CoinResponse []struct {
	CoinKey           string `json:"coinKey"`
	CoinFullName      string `json:"coinFullName"`
	CoinName          string `json:"coinName"`
	CoinDecimal       int32  `json:"coinDecimal"`
	TxRefUrl          string `json:"txRefUrl"`
	AddressRefUrl     string `json:"addressRefUrl"`
	LogoUrl           string `json:"logoUrl"`
	Symbol            string `json:"symbol"`
	IsMultipleAddress string `json:"isMultipleAddress"`
	FeeCoinKey        string `json:"feeCoinKey"`
	FeeUnit           string `json:"feeUnit"`
	FeeDecimal        int32  `json:"feeDecimal"`
	ShowCoinDecimal   int32  `json:"showCoinDecimal"`
	CoinType          string `json:"coinType"`
	TokenIdentifier   string `json:"tokenIdentifier"`
	MinTransferAmount string `json:"minTransferAmount"`
	BlockChain        string `json:"blockChain"`
	Network           string `json:"network"`
	GasLimit          int32  `json:"gasLimit"`
	IsMemo            string `json:"isMemo"`
	IsUtxo            string `json:"isUtxo"`
	BlockchainType    string `json:"blockchainType"`
}

type CollectionTransactionsUTXORequest

type CollectionTransactionsUTXORequest struct {
	CustomerRefId          string `json:"customerRefId"`
	CustomerExt1           string `json:"customerExt1,omitempty"`
	CustomerExt2           string `json:"customerExt2,omitempty"`
	Note                   string `json:"note,omitempty"`
	CoinKey                string `json:"coinKey"`
	TxFeeRate              string `json:"txFeeRate,omitempty"`
	TxFeeLevel             string `json:"txFeeLevel,omitempty"`
	MaxTxFeeRate           string `json:"maxTxFeeRate,omitempty"`
	MinCollectionAmount    string `json:"minCollectionAmount,omitempty"`
	SourceAccountKey       string `json:"sourceAccountKey"`
	SourceAccountType      string `json:"sourceAccountType"`
	DestinationAccountKey  string `json:"destinationAccountKey"`
	DestinationAccountType string `json:"destinationAccountType"`
	DestinationAddress     string `json:"destinationAddress,omitempty"`
	DestinationTag         string `json:"destinationTag,omitempty"`
}

type CollectionTransactionsUTXOResponse

type CollectionTransactionsUTXOResponse struct {
	TxKey            string `json:"txKey"`
	CollectionAmount string `json:"collectionAmount"`
	CollectionNum    int32  `json:"collectionNum"`
}

type CreateAccountCoinAddressRequest

type CreateAccountCoinAddressRequest struct {
	CoinKey          string `json:"coinKey"`
	AccountKey       string `json:"accountKey"`
	AddressGroupName string `json:"addressGroupName"`
	CustomerRefId    string `json:"customerRefId"`
}

type CreateAccountCoinAddressResponse

type CreateAccountCoinAddressResponse struct {
	Address     string `json:"address"`
	AddressType string `json:"addressType"`
	DerivePath  string `json:"derivePath"`
}

type CreateAccountCoinAddressV2Response

type CreateAccountCoinAddressV2Response struct {
	AddressGroupKey  string `json:"addressGroupKey"`
	AddressGroupName string `json:"addressGroupName"`
	AddressList      []struct {
		Address        string `json:"address"`
		AddressType    string `json:"addressType"`
		DerivePath     string `json:"derivePath"`
		AddressBalance string `json:"addressBalance"`
	} `json:"addressList"`
}

type CreateAccountRequest

type CreateAccountRequest struct {
	AccountName   string   `json:"accountName,omitempty"`
	CustomerRefId string   `json:"customerRefId,omitempty"`
	HiddenOnUI    bool     `json:"hiddenOnUI,omitempty"`
	AccountTag    string   `json:"accountTag,omitempty"`
	CoinKeyList   []string `json:"coinKeyList,omitempty"`
}

type CreateAccountResponse

type CreateAccountResponse struct {
	AccountKey string `json:"accountKey"`
	PubKeys    []struct {
		SignAlg string `json:"signAlg"`
		PubKey  string `json:"pubKey"`
	} `json:"pubKeys"`
	CoinAddressList []struct {
		CoinKey          string `json:"coinKey"`
		AddressGroupKey  string `json:"addressGroupKey"`
		AddressGroupName string `json:"addressGroupName"`
		AddressList      []struct {
			Address     string `json:"address"`
			AddressType string `json:"addressType"`
			DerivePath  string `json:"derivePath"`
		} `json:"addressList"`
	} `json:"coinAddressList"`
}

type CreateMpcSignRequest

type CreateMpcSignRequest struct {
	CustomerRefId    string `json:"customerRefId,omitempty"`
	SourceAccountKey string `json:"sourceAccountKey,omitempty"`
	SignAlg          string `json:"signAlg,omitempty"`
	DataList         []struct {
		Data string `json:"data,omitempty"`
		Note string `json:"note,omitempty"`
	} `json:"dataList,omitempty"`
}

type CreateMpcSignResponse

type CreateMpcSignResponse struct {
	TxKey string `json:"txKey"`
}

type CreateTransactionsRequest

type CreateTransactionsRequest struct {
	CustomerRefId          string     `json:"customerRefId"`
	CustomerExt1           string     `json:"customerExt1,omitempty"`
	CustomerExt2           string     `json:"customerExt2,omitempty"`
	Note                   string     `json:"note,omitempty"`
	CoinKey                string     `json:"coinKey"`
	TxFeeLevel             string     `json:"txFeeLevel,omitempty"`
	FeeRateDto             FeeRateDto `json:"feeRateDto,omitempty"`
	MaxTxFeeRate           string     `json:"maxTxFeeRate,omitempty"`
	TxAmount               string     `json:"txAmount"`
	TreatAsGrossAmount     bool       `json:"treatAsGrossAmount,omitempty"`
	SourceAccountKey       string     `json:"sourceAccountKey"`
	SourceAccountType      string     `json:"sourceAccountType"`
	DestinationAccountKey  string     `json:"destinationAccountKey,omitempty"`
	DestinationAccountType string     `json:"destinationAccountType"`
	DestinationAddress     string     `json:"destinationAddress,omitempty"`
	DestinationTag         string     `json:"destinationTag,omitempty"`
	IsRbf                  *bool      `json:"isRbf,omitempty"`
	FailOnContract         *bool      `json:"failOnContract,omitempty"`
	Nonce                  int64      `json:"nonce,omitempty"`
	SequenceNumber         int64      `json:"sequenceNumber,omitempty"`
	BalanceVerifyType      string     `json:"balanceVerifyType,omitempty"`
}

type CreateTransactionsUTXOMultiDestRequest

type CreateTransactionsUTXOMultiDestRequest struct {
	CustomerRefId          string               `json:"customerRefId"`
	CustomerExt1           string               `json:"customerExt1,omitempty"`
	CustomerExt2           string               `json:"customerExt2,omitempty"`
	Note                   string               `json:"note,omitempty"`
	CoinKey                string               `json:"coinKey"`
	TxFeeLevel             string               `json:"txFeeLevel,omitempty"`
	FeeRateDto             FeeRateDto           `json:"feeRateDto,omitempty"`
	MaxTxFeeRate           string               `json:"maxTxFeeRate,omitempty"`
	SourceAccountKey       string               `json:"sourceAccountKey"`
	SourceAccountType      string               `json:"sourceAccountType"`
	DestinationAddressList []DestinationAddress `json:"destinationAddressList,omitempty"`
	DestinationTag         string               `json:"destinationTag,omitempty"`
	IsRbf                  bool                 `json:"isRbf,omitempty"`
}

type CreateWeb3AccountRequest

type CreateWeb3AccountRequest struct {
	AccountName   string `json:"accountName,omitempty"`
	CustomerRefId string `json:"customerRefId,omitempty"`
	HiddenOnUI    bool   `json:"hiddenOnUI,omitempty"`
}

type CreateWeb3AccountResponse

type CreateWeb3AccountResponse struct {
	AccountKey    string `json:"accountKey"`
	CustomerRefId string `json:"customerRefId"`
	AccountName   string `json:"accountName"`
	HiddenOnUI    bool   `json:"hiddenOnUI"`
	PubKeyList    []struct {
		SignAlg string `json:"signAlg"`
		PubKey  string `json:"pubKey"`
	} `json:"pubKeyList"`
	AddressList []struct {
		BlockchainType string `json:"blockchainType"`
		Address        string `json:"address"`
		DerivePath     string `json:"derivePath"`
	} `json:"addressList"`
}

type CreateWhitelistRequest

type CreateWhitelistRequest struct {
	WhitelistName string `json:"whitelistName,omitempty"`
	ChainType     string `json:"chainType,omitempty"`
	Address       string `json:"address,omitempty"`
}

type CreateWhitelistResponse

type CreateWhitelistResponse struct {
	WhitelistKey string `json:"whitelistKey"`
}

type DeleteWhitelistRequest

type DeleteWhitelistRequest struct {
	WhitelistKey string `json:"whitelistKey,omitempty"`
}

type DestinationAddress

type DestinationAddress struct {
	Address         string `json:"address"`
	Amount          string `json:"amount"`
	AddressGroupKey string `json:"addressGroupKey"`
}

type EditWhitelistRequest

type EditWhitelistRequest struct {
	WhitelistKey  string `json:"whitelistKey,omitempty"`
	WhitelistName string `json:"whitelistName,omitempty"`
	Address       string `json:"address,omitempty"`
	Force         bool   `json:"force,omitempty"`
}

type EthSignRequest

type EthSignRequest struct {
	AccountKey       string `json:"accountKey"`
	CustomerRefId    string `json:"customerRefId"`
	Note             string `json:"note,omitempty"`
	CustomerExt1     string `json:"customerExt1,omitempty"`
	CustomerExt2     string `json:"customerExt2,omitempty"`
	UseCustomNetwork bool   `json:"useCustomNetwork,omitempty"`
	MessageHash      struct {
		ChainId int64    `json:"chainId"`
		Hash    []string `json:"hash"`
	} `json:"messageHash"`
}

type EthSignTransactionRequest

type EthSignTransactionRequest struct {
	AccountKey       string `json:"accountKey"`
	CustomerRefId    string `json:"customerRefId"`
	Note             string `json:"note,omitempty"`
	CustomerExt1     string `json:"customerExt1,omitempty"`
	CustomerExt2     string `json:"customerExt2,omitempty"`
	UseCustomNetwork bool   `json:"useCustomNetwork,omitempty"`
	Transaction      struct {
		To                   string `json:"to"`
		Value                string `json:"value"`
		ChainId              int64  `json:"chainId"`
		GasPrice             string `json:"gasPrice,omitempty"`
		GasLimit             int32  `json:"gasLimit"`
		MaxPriorityFeePerGas string `json:"maxPriorityFeePerGas,omitempty"`
		MaxFeePerGas         string `json:"maxFeePerGas,omitempty"`
		Nonce                int64  `json:"nonce"`
		Data                 string `json:"data,omitempty"`
	} `json:"transaction"`
}

type EthSignTypedDataRequest

type EthSignTypedDataRequest struct {
	AccountKey       string `json:"accountKey"`
	CustomerRefId    string `json:"customerRefId"`
	Note             string `json:"note,omitempty"`
	CustomerExt1     string `json:"customerExt1,omitempty"`
	CustomerExt2     string `json:"customerExt2,omitempty"`
	UseCustomNetwork bool   `json:"useCustomNetwork,omitempty"`
	Message          struct {
		ChainId int64  `json:"chainId"`
		Data    string `json:"data"`
		Version string `json:"version"`
	} `json:"message"`
}

type FeeRate

type FeeRate struct {
	FeeRate        string `json:"feeRate"`
	Fee            string `json:"fee"`
	GasLimit       string `json:"gasLimit"`
	BaseFee        string `json:"baseFee"`
	MaxPriorityFee string `json:"maxPriorityFee"`
	MaxFee         string `json:"maxFee"`
	BytesSize      string `json:"bytesSize"`
	GasPremium     string `json:"gasPremium "`
	GasFeeCap      string `json:"gasFeeCap"`
	GasBudget      string `json:"gasBudget"`
	GasUnitPrice   string `json:"gasUnitPrice"`
	MaxGasAmount   string `json:"maxGasAmount"`
}

type FeeRateDto

type FeeRateDto struct {
	FeeRate        string `json:"feeRate,omitempty"`
	GasLimit       string `json:"gasLimit,omitempty"`
	MaxPriorityFee string `json:"maxPriorityFee,omitempty"`
	MaxFee         string `json:"maxFee,omitempty"`
	GasPremium     string `json:"gasPremium,omitempty"`
	GasFeeCap      string `json:"gasFeeCap,omitempty"`
	GasBudget      string `json:"gasBudget,omitempty"`
	GasUnitPrice   string `json:"gasUnitPrice,omitempty"`
	MaxGasAmount   string `json:"maxGasAmount,omitempty"`
}

type InfoAccountCoinAddressRequest

type InfoAccountCoinAddressRequest struct {
	CoinKey string `json:"coinKey"`
	Address string `json:"address"`
}

type InfoAccountCoinAddressResponse

type InfoAccountCoinAddressResponse struct {
	Address        string `json:"address"`
	AddressType    string `json:"addressType"`
	DerivePath     string `json:"derivePath"`
	AddressBalance string `json:"addressBalance"`
	AccountKey     string `json:"accountKey"`
}

type ListAccountCoinAddressRequest

type ListAccountCoinAddressRequest struct {
	PageNumber    int    `json:"pageNumber,omitempty"`
	PageSize      int    `json:"pageSize,omitempty"`
	CoinKey       string `json:"coinKey"`
	AccountKey    string `json:"accountKey"`
	CustomerRefId string `json:"customerRefId"`
}

type ListAccountCoinRequest

type ListAccountCoinRequest struct {
	AccountKey string `json:"accountKey"`
}

type ListAccountRequest

type ListAccountRequest struct {
	PageNumber    int    `json:"pageNumber,omitempty"`
	PageSize      int    `json:"pageSize,omitempty"`
	HiddenOnUI    *bool  `json:"hiddenOnUI,omitempty"`
	NamePrefix    string `json:"namePrefix,omitempty"`
	NameSuffix    string `json:"nameSuffix,omitempty"`
	CustomerRefId string `json:"customerRefId,omitempty"`
}

type ListAccountResponse

type ListAccountResponse struct {
	PageNumber    int32             `json:"pageNumber"`
	PageSize      int32             `json:"pageSize"`
	TotalElements int64             `json:"totalElements"`
	Content       []AccountResponse `json:"content"`
}

type ListMPCSignTransactionsRequest

type ListMPCSignTransactionsRequest struct {
	Direct        string `json:"direct,omitempty"`
	Limit         int32  `json:"limit,omitempty"`
	FromId        string `json:"fromId,omitempty"`
	CreateTimeMin int64  `json:"createTimeMin,omitempty"`
	CreateTimeMax int64  `json:"createTimeMax,omitempty"`
}

type ListTransactionsV1Request

type ListTransactionsV1Request struct {
	PageNumber                 int    `json:"pageNumber,omitempty"`
	PageSize                   int    `json:"pageSize,omitempty"`
	SourceAccountKey           string `json:"sourceAccountKey,omitempty"`
	SourceAccountType          string `json:"sourceAccountType,omitempty"`
	DestinationAccountKey      string `json:"destinationAccountKey,omitempty"`
	DestinationAccountType     string `json:"destinationAccountType,omitempty"`
	CreateTimeMin              int64  `json:"createTimeMin,omitempty"`
	CreateTimeMax              int64  `json:"createTimeMax,omitempty"`
	TxAmountMin                string `json:"txAmountMin,omitempty"`
	TxAmountMax                string `json:"txAmountMax,omitempty"`
	CoinKey                    string `json:"coinKey,omitempty"`
	FeeCoinKey                 string `json:"feeCoinKey,omitempty"`
	TransactionStatus          string `json:"transactionStatus,omitempty"`
	TransactionSubStatus       string `json:"transactionSubStatus,omitempty"`
	CompletedTimeMin           int64  `json:"completedTimeMin,omitempty"`
	CompletedTimeMax           int64  `json:"completedTimeMax,omitempty"`
	CustomerRefId              string `json:"customerRefId,omitempty"`
	RealDestinationAccountType string `json:"realDestinationAccountType,omitempty"`
	HideSmallAmountUsd         string `json:"hideSmallAmountUsd,omitempty"`
	TransactionDirection       string `json:"transactionDirection,omitempty"`
}

type ListTransactionsV2Request

type ListTransactionsV2Request struct {
	Direct                     string `json:"direct,omitempty"`
	Limit                      int32  `json:"limit,omitempty"`
	FromId                     string `json:"fromId,omitempty"`
	SourceAccountKey           string `json:"sourceAccountKey,omitempty"`
	SourceAccountType          string `json:"sourceAccountType,omitempty"`
	DestinationAccountKey      string `json:"destinationAccountKey,omitempty"`
	DestinationAccountType     string `json:"destinationAccountType,omitempty"`
	CreateTimeMin              int64  `json:"createTimeMin,omitempty"`
	CreateTimeMax              int64  `json:"createTimeMax,omitempty"`
	TxAmountMin                string `json:"txAmountMin,omitempty"`
	TxAmountMax                string `json:"txAmountMax,omitempty"`
	CoinKey                    string `json:"coinKey,omitempty"`
	FeeCoinKey                 string `json:"feeCoinKey,omitempty"`
	TransactionStatus          string `json:"transactionStatus,omitempty"`
	TransactionSubStatus       string `json:"transactionSubStatus,omitempty"`
	CompletedTimeMin           int64  `json:"completedTimeMin,omitempty"`
	CompletedTimeMax           int64  `json:"completedTimeMax,omitempty"`
	CustomerRefId              string `json:"customerRefId,omitempty"`
	RealDestinationAccountType string `json:"realDestinationAccountType,omitempty"`
	HideSmallAmountUsd         string `json:"hideSmallAmountUsd,omitempty"`
	TransactionDirection       string `json:"transactionDirection,omitempty"`
}

type ListWeb3AccountRequest

type ListWeb3AccountRequest struct {
	Direct        string `json:"direct,omitempty"`
	Limit         int32  `json:"limit,omitempty"`
	FromId        string `json:"fromId,omitempty"`
	NamePrefix    string `json:"namePrefix,omitempty"`
	CustomerRefId string `json:"customerRefId,omitempty"`
}

type ListWeb3SignRequest

type ListWeb3SignRequest struct {
	Direct            string   `json:"direct,omitempty"`
	Limit             int32    `json:"limit,omitempty"`
	FromId            string   `json:"fromId,omitempty"`
	SubjectType       string   `json:"subjectType,omitempty"`
	TransactionStatus []string `json:"transactionStatus,omitempty"`
	AccountKey        string   `json:"accountKey,omitempty"`
	CreateTimeMin     int64    `json:"createTimeMin,omitempty"`
	CreateTimeMax     int64    `json:"createTimeMax,omitempty"`
}

type ListWhitelistRequest

type ListWhitelistRequest struct {
	Direct          string `json:"direct,omitempty"`
	Limit           int32  `json:"limit,omitempty"`
	FromId          string `json:"fromId,omitempty"`
	ChainType       string `json:"chainType,omitempty"`
	WhitelistStatus string `json:"whitelistStatus,omitempty"`
	CreateTimeMin   int64  `json:"createTimeMin,omitempty"`
	CreateTimeMax   int64  `json:"createTimeMax,omitempty"`
}

type MPCSignTransactionsResponse

type MPCSignTransactionsResponse struct {
	TxKey                string `json:"txKey,omitempty"`
	TransactionStatus    string `json:"transactionStatus,omitempty"`
	TransactionSubStatus string `json:"transactionSubStatus,omitempty"`
	CreateTime           int64  `json:"createTime,omitempty"`
	SourceAccountKey     string `json:"sourceAccountKey,omitempty"`
	AuditUserKey         string `json:"auditUserKey,omitempty"`
	CreatedByUserKey     string `json:"createdByUserKey,omitempty"`
	CustomerRefId        string `json:"customerRefId,omitempty"`
	CustomerExt1         string `json:"customerExt1,omitempty"`
	CustomerExt2         string `json:"customerExt2,omitempty"`
	SignAlg              string `json:"signAlg,omitempty"`
	AuditUserName        string `json:"auditUserName,omitempty"`
	CreatedByUserName    string `json:"createdByUserName,omitempty"`
	DataList             []struct {
		Data string `json:"data,omitempty"`
		Sig  string `json:"sig,omitempty"`
		Note string `json:"note,omitempty"`
	} `json:"dataList,omitempty"`
}

type MessagesCountResponse

type MessagesCountResponse struct {
	MessagesCount int32 `json:"messagesCount"`
}

type MpcSignApi

type MpcSignApi struct {
	Client safeheron.Client
}

func (*MpcSignApi) CreateMpcSign

func (*MpcSignApi) CreateWhitelist

func (*MpcSignApi) DeleteWhitelist

func (e *MpcSignApi) DeleteWhitelist(d DeleteWhitelistRequest, r *ResultResponse) error

func (*MpcSignApi) EditWhitelist

func (e *MpcSignApi) EditWhitelist(d EditWhitelistRequest, r *ResultResponse) error

func (*MpcSignApi) ListMPCSignTransactions

func (e *MpcSignApi) ListMPCSignTransactions(d ListMPCSignTransactionsRequest, r *[]MPCSignTransactionsResponse) error

func (*MpcSignApi) ListWhitelist

func (e *MpcSignApi) ListWhitelist(d ListWhitelistRequest, r *[]WhitelistResponse) error

func (*MpcSignApi) OneMPCSignTransactions

func (*MpcSignApi) OneWhitelist

func (e *MpcSignApi) OneWhitelist(d OneWhitelistRequest, r *WhitelistResponse) error

func (*MpcSignApi) ResendFailed

func (*MpcSignApi) ResendWebhook

func (e *MpcSignApi) ResendWebhook(d ResendWebhookRequest, r *ResultResponse) error

type OneAccountRequest

type OneAccountRequest struct {
	AccountKey    string `json:"accountKey,omitempty"`
	CustomerRefId string `json:"customerRefId,omitempty"`
}

type OneMPCSignTransactionsRequest

type OneMPCSignTransactionsRequest struct {
	CustomerRefId string `json:"customerRefId,omitempty"`
	TxKey         string `json:"txKey,omitempty"`
}

type OneTransactionsRequest

type OneTransactionsRequest struct {
	TxKey         string `json:"txKey,omitempty"`
	CustomerRefId string `json:"customerRefId,omitempty"`
}

type OneTransactionsResponse

type OneTransactionsResponse struct {
	TxKey                      string                `json:"txKey"`
	TxHash                     string                `json:"txHash"`
	CoinKey                    string                `json:"coinKey"`
	TxAmount                   string                `json:"txAmount"`
	SourceAccountKey           string                `json:"sourceAccountKey"`
	SourceAccountType          string                `json:"sourceAccountType"`
	SourceAddress              string                `json:"sourceAddress"`
	SourceAddressList          []SourceAddress       `json:"sourceAddressList"`
	DestinationAccountKey      string                `json:"destinationAccountKey"`
	DestinationAccountType     string                `json:"destinationAccountType"`
	DestinationAddress         string                `json:"destinationAddress"`
	DestinationAddressList     []DestinationAddress  `json:"destinationAddressList"`
	DestinationTag             string                `json:"destinationTag"`
	TransactionType            string                `json:"transactionType"`
	TransactionStatus          string                `json:"transactionStatus"`
	TransactionSubStatus       string                `json:"transactionSubStatus"`
	CreateTime                 int64                 `json:"createTime"`
	Note                       string                `json:"note"`
	AuditUserKey               string                `json:"auditUserKey"`
	CreatedByUserKey           string                `json:"createdByUserKey"`
	TxFee                      string                `json:"txFee"`
	FeeCoinKey                 string                `json:"feeCoinKey"`
	ReplaceTxHash              string                `json:"replaceTxHash"`
	CustomerRefId              string                `json:"customerRefId"`
	CustomerExt1               string                `json:"customerExt1"`
	CustomerExt2               string                `json:"customerExt2"`
	AmlLock                    string                `json:"amlLock"`
	BlockHeight                int64                 `json:"blockHeight"`
	CompletedTime              int64                 `json:"completedTime"`
	RealDestinationAccountType string                `json:"realDestinationAccountType"`
	TransactionSubStatusDesc   string                `json:"transactionSubStatusDesc"`
	TxAmountToUsd              string                `json:"txAmountToUsd"`
	SourceAccountName          string                `json:"sourceAccountName"`
	SourceAccountTypeName      string                `json:"sourceAccountTypeName"`
	DestinationAccountName     string                `json:"destinationAccountName"`
	DestinationAccountTypeName string                `json:"destinationAccountTypeName"`
	AuditUserName              string                `json:"auditUserName"`
	CreatedByUserName          string                `json:"createdByUserName"`
	SpeedUpHistory             []TransactionsRequest `json:"speedUpHistory"`
	TransactionDirection       string                `json:"transactionDirection"`
}

type OneWhitelistRequest

type OneWhitelistRequest struct {
	WhitelistKey string `json:"whitelistKey,omitempty"`
	Address      string `json:"address,omitempty"`
}

type PersonalSignRequest

type PersonalSignRequest struct {
	AccountKey       string `json:"accountKey"`
	CustomerRefId    string `json:"customerRefId"`
	Note             string `json:"note,omitempty"`
	CustomerExt1     string `json:"customerExt1,omitempty"`
	CustomerExt2     string `json:"customerExt2,omitempty"`
	UseCustomNetwork bool   `json:"useCustomNetwork,omitempty"`
	Message          struct {
		ChainId int64  `json:"chainId"`
		Data    string `json:"data"`
	} `json:"message"`
}

type RecreateTransactionRequest

type RecreateTransactionRequest struct {
	TxKey      string     `json:"txKey"`
	TxHash     string     `json:"txHash"`
	CoinKey    string     `json:"coinKey"`
	TxFeeLevel string     `json:"txFeeLevel,omitempty"`
	FeeRateDto FeeRateDto `json:"feeRateDto,omitempty"`
}

type RenameAccountCoinAddressRequest

type RenameAccountCoinAddressRequest struct {
	AddressGroupKey  string `json:"addressGroupKey"`
	AddressGroupName string `json:"addressGroupName"`
}

type ResendFailedRequest

type ResendFailedRequest struct {
	StartTime int64 `json:"startTime,omitempty"`
	EndTime   int64 `json:"endTime,omitempty"`
}

type ResendWebhookRequest

type ResendWebhookRequest struct {
	Category string `json:"category,omitempty"`
	TxKey    string `json:"txKey,omitempty"`
}

type ResultResponse

type ResultResponse struct {
	Result bool `json:"result"`
}

type SourceAddress

type SourceAddress struct {
	Address         string `json:"address"`
	AddressGroupKey string `json:"addressGroupKey"`
}

type TransactionApi

type TransactionApi struct {
	Client safeheron.Client
}

func (*TransactionApi) CancelTransactions

func (e *TransactionApi) CancelTransactions(d CancelTransactionRequest, r *ResultResponse) error

func (*TransactionApi) CreateTransactions

func (e *TransactionApi) CreateTransactions(d CreateTransactionsRequest, r *TxKeyResult) error

func (*TransactionApi) CreateTransactionsUTXOMultiDest

func (e *TransactionApi) CreateTransactionsUTXOMultiDest(d CreateTransactionsUTXOMultiDestRequest, r *TxKeyResult) error

func (*TransactionApi) ListTransactionsV1

func (*TransactionApi) ListTransactionsV2

func (*TransactionApi) OneTransactions

func (*TransactionApi) RecreateTransactions

func (e *TransactionApi) RecreateTransactions(d RecreateTransactionRequest, r *TxKeyResult) error

func (*TransactionApi) TransactionFeeRate

type TransactionsFeeRateRequest

type TransactionsFeeRateRequest struct {
	CoinKey                string               `json:"coinKey"`
	TxHash                 string               `json:"txHash,omitempty"`
	SourceAccountKey       string               `json:"sourceAccountKey,omitempty"`
	SourceAddress          string               `json:"sourceAddress,omitempty"`
	DestinationAddress     string               `json:"destinationAddress"`
	DestinationAddressList []DestinationAddress `json:"destinationAddressList"`
	Value                  string               `json:"value,omitempty"`
}

type TransactionsFeeRateResponse

type TransactionsFeeRateResponse struct {
	FeeUnit       string  `json:"feeUnit"`
	MinFeeRate    FeeRate `json:"minFeeRate"`
	LowFeeRate    FeeRate `json:"lowFeeRate"`
	MiddleFeeRate FeeRate `json:"middleFeeRate"`
	HighFeeRate   FeeRate `json:"highFeeRate"`
}

type TransactionsRequest

type TransactionsRequest struct {
	TxKey                      string               `json:"txKey"`
	TxHash                     string               `json:"txHash"`
	CoinKey                    string               `json:"coinKey"`
	TxAmount                   string               `json:"txAmount"`
	SourceAccountKey           string               `json:"sourceAccountKey"`
	SourceAccountType          string               `json:"sourceAccountType"`
	SourceAddress              string               `json:"sourceAddress"`
	SourceAddressList          []SourceAddress      `json:"sourceAddressList"`
	DestinationAccountKey      string               `json:"destinationAccountKey"`
	DestinationAccountType     string               `json:"destinationAccountType"`
	DestinationAddress         string               `json:"destinationAddress"`
	DestinationAddressList     []DestinationAddress `json:"destinationAddressList"`
	DestinationTag             string               `json:"destinationTag"`
	TransactionType            string               `json:"transactionType"`
	TransactionStatus          string               `json:"transactionStatus"`
	TransactionSubStatus       string               `json:"transactionSubStatus"`
	CreateTime                 int64                `json:"createTime"`
	Note                       string               `json:"note"`
	AuditUserKey               string               `json:"auditUserKey"`
	CreatedByUserKey           string               `json:"createdByUserKey"`
	TxFee                      string               `json:"txFee"`
	FeeCoinKey                 string               `json:"feeCoinKey"`
	ReplaceTxHash              string               `json:"replaceTxHash"`
	CustomerRefId              string               `json:"customerRefId"`
	CustomerExt1               string               `json:"customerExt1"`
	CustomerExt2               string               `json:"customerExt2"`
	AmlLock                    string               `json:"amlLock"`
	BlockHeight                int64                `json:"blockHeight"`
	CompletedTime              int64                `json:"completedTime"`
	RealDestinationAccountType string               `json:"realDestinationAccountType"`
	TransactionSubStatusDesc   string               `json:"transactionSubStatusDesc"`
	TxAmountToUsd              string               `json:"txAmountToUsd"`
	SourceAccountName          string               `json:"sourceAccountName"`
	SourceAccountTypeName      string               `json:"sourceAccountTypeName"`
	DestinationAccountName     string               `json:"destinationAccountName"`
	DestinationAccountTypeName string               `json:"destinationAccountTypeName"`
	AuditUserName              string               `json:"auditUserName"`
	CreatedByUserName          string               `json:"createdByUserName"`
	TransactionDirection       string               `json:"transactionDirection"`
}

type TransactionsResponseV1

type TransactionsResponseV1 struct {
	PageNumber    int32                 `json:"pageNumber"`
	PageSize      int32                 `json:"pageSize"`
	TotalElements int64                 `json:"totalElements"`
	Content       []TransactionsRequest `json:"content"`
}

type TransactionsResponseV2

type TransactionsResponseV2 []TransactionsRequest

type TxKeyResult

type TxKeyResult struct {
	TxKey string `json:"txKey"`
}

type UpdateAccountShowStateRequest

type UpdateAccountShowStateRequest struct {
	AccountKey string `json:"accountKey"`
	HiddenOnUI bool   `json:"hiddenOnUI"`
}

type Web3Api

type Web3Api struct {
	Client safeheron.Client
}

func (*Web3Api) CancelWeb3Sign

func (e *Web3Api) CancelWeb3Sign(d CancelWeb3SignRequest, r *ResultResponse) error

func (*Web3Api) CreateWeb3Account

func (*Web3Api) EthSign

func (e *Web3Api) EthSign(d EthSignRequest, r *TxKeyResult) error

func (*Web3Api) EthSignTransaction

func (e *Web3Api) EthSignTransaction(d EthSignTransactionRequest, r *TxKeyResult) error

func (*Web3Api) EthSignTypedData

func (e *Web3Api) EthSignTypedData(d EthSignTypedDataRequest, r *TxKeyResult) error

func (*Web3Api) ListWeb3Accounts

func (e *Web3Api) ListWeb3Accounts(d ListWeb3AccountRequest, r *[]CreateWeb3AccountResponse) error

func (*Web3Api) ListWeb3Sign

func (e *Web3Api) ListWeb3Sign(d ListWeb3SignRequest, r *[]Web3SignQueryResponse) error

func (*Web3Api) PersonalSign

func (e *Web3Api) PersonalSign(d PersonalSignRequest, r *TxKeyResult) error

func (*Web3Api) QueryWeb3Sig

type Web3SignQueryRequest

type Web3SignQueryRequest struct {
	TxKey         string `json:"txKey,omitempty"`
	CustomerRefId string `json:"customerRefId,omitempty"`
}

type Web3SignQueryResponse

type Web3SignQueryResponse struct {
	TxKey                string `json:"txKey"`
	AccountKey           string `json:"accountKey,omitempty"`
	SourceAddress        string `json:"sourceAddress,omitempty"`
	TransactionStatus    string `json:"transactionStatus,omitempty"`
	TransactionSubStatus string `json:"transactionSubStatus,omitempty"`
	CreatedByUserKey     string `json:"createdByUserKey,omitempty"`
	CreatedByUserName    string `json:"createdByUserName,omitempty"`
	CreateTime           int64  `json:"createTime,omitempty"`
	AuditUserKey         string `json:"auditUserKey,omitempty"`
	AuditUserName        string `json:"auditUserName,omitempty"`
	CustomerRefId        string `json:"customerRefId"`
	Note                 string `json:"note,omitempty"`
	CustomerExt1         string `json:"customerExt1,omitempty"`
	CustomerExt2         string `json:"customerExt2,omitempty"`
	Balance              string `json:"balance,omitempty"`
	TokenBalance         string `json:"tokenBalance,omitempty"`
	Symbol               string `json:"symbol,omitempty"`
	TokenSymbol          string `json:"tokenSymbol,omitempty"`
	SubjectType          string `json:"subjectType,omitempty"`
	Transaction          struct {
		To                   string `json:"to,omitempty"`
		Value                string `json:"value,omitempty"`
		ChainId              int64  `json:"chainId,omitempty"`
		GasPrice             string `json:"gasPrice,omitempty"`
		GasLimit             int32  `json:"gasLimit,omitempty"`
		MaxPriorityFeePerGas string `json:"maxPriorityFeePerGas,omitempty"`
		MaxFeePerGas         string `json:"maxFeePerGas,omitempty"`
		Nonce                int64  `json:"nonce,omitempty"`
		Data                 string `json:"data,omitempty"`
		TxHash               string `json:"txHash,omitempty"`
		SignedTransaction    string `json:"signedTransaction,omitempty"`
		Sig                  struct {
			Hash string `json:"hash,omitempty"`
			Sig  string `json:"sig,omitempty"`
		} `json:"sig,omitempty"`
	} `json:"transaction"`
	Message struct {
		ChainId int64  `json:"hash,omitempty"`
		Data    string `json:"data,omitempty"`
		Sig     struct {
			Hash string `json:"hash,omitempty"`
			Sig  string `json:"sig,omitempty"`
		} `json:"sig,omitempty"`
	} `json:"message,omitempty"`
	MessageHash struct {
		ChainId int64 `json:"hash,omitempty"`
		SigList []struct {
			Hash string `json:"hash,omitempty"`
			Sig  string `json:"sig,omitempty"`
		} `json:"sigList,omitempty"`
	} `json:"messageHash,omitempty"`
}

type WebhookApi

type WebhookApi struct {
	Client safeheron.Client
}

type WhitelistApi

type WhitelistApi struct {
	Client safeheron.Client
}

type WhitelistResponse

type WhitelistResponse struct {
	WhitelistKey    string `json:"whitelistKey,omitempty"`
	ChainType       string `json:"chainType,omitempty"`
	WhitelistName   string `json:"whitelistName,omitempty"`
	WhitelistStatus string `json:"whitelistStatus,omitempty"`
	CreateTime      int64  `json:"createTime,omitempty"`
	LastUpdateTime  int64  `json:"lastUpdateTime,omitempty"`
}

Jump to

Keyboard shortcuts

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