meta

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CURATEDASSETSENDPOINT = "/platform/curated-assets"
)
View Source
const (
	KYCSTATUSENDPOINT = "/platform/kyc-status/"
)
View Source
const (
	PINGENDPOINT = "/platform/ping"
)
View Source
const (
	RATESCURRENCYENDPOINT = "/platform/rates/"
)
View Source
const (
	USERTOKENENDPOINT = "/platform/user-token"
)
View Source
const (
	XRPLTRANSACTIONENDPOINT = "/platform/xrpl-tx/"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CurrencyCodeError

type CurrencyCodeError struct {
	Code string
}

CurrencyCodeError returns an error if an invalid currency code is given.

func (*CurrencyCodeError) Error

func (e *CurrencyCodeError) Error() string

type EmptyTransactionId

type EmptyTransactionId struct{}

EmptyTransactionId returns an error when an empty transaction ID is given.

func (*EmptyTransactionId) Error

func (e *EmptyTransactionId) Error() string

type EmptyUserToken added in v1.1.0

type EmptyUserToken struct {
	// contains filtered or unexported fields
}

EmptyUserToken Returns an error if no user tokens are provided.

func (*EmptyUserToken) Error added in v1.1.0

func (e *EmptyUserToken) Error() string

type Meta

type Meta struct {
	Cfg *xumm.Config
}

func (*Meta) GetCuratedAssets

func (m *Meta) GetCuratedAssets() (*models.CuratedAssetsResponse, error)

GetCuratedAssets Gets curated assets from the XUMM API. This API contains the same issuers and assets available to users in XUMM when they press the "Add asset" button on the home screen.

func (*Meta) GetKycStatusByAccount

func (m *Meta) GetKycStatusByAccount(a string) (*models.KycStatusByAccountResponse, error)

GetKycStatusByAccount fetches the KYC status for a XUMM user (based on a public XRPL account address, r...). Takes 1 parameter, account.

func (*Meta) GetKycStatusByUserToken

func (m *Meta) GetKycStatusByUserToken(body models.KycStatusByUserTokenRequest) (*models.KycStatusByUserTokenResponse, error)

GetKycStatusByUserToken fetches the KYC status for a XUMM user (based on an issued user_token). Takes 1 parameter, user_token.

func (*Meta) GetRatesForCurrency

func (m *Meta) GetRatesForCurrency(cur string) (*models.RatesCurrencyResponse, error)

GetRatesForCurrency gets semi-live XRP exchange rates. Takes 1 parameter, a 3 alpha char currency code, eg. INR.

func (*Meta) GetXrplTransaction

func (m *Meta) GetXrplTransaction(txid string) (*models.XrpTxResponse, error)

GetXrplTransaction fetches transaction & outcome live from XRP ledger full history nodes (through the XUMM platform) containing parsed transaction outcome balance mutations. Takes 1 parameter, txid (64 hexadecimal characters).

func (*Meta) Ping

func (m *Meta) Ping() (*models.Pong, error)

Ping method tests connectivity to XUMM api.

func (*Meta) VerifyUserToken added in v1.1.0

func (m *Meta) VerifyUserToken(t string) (*models.UserTokenResponse, error)

Verifys a single user token. Takes a single argument of a user token.

func (*Meta) VerifyUserTokens added in v1.1.0

func (m *Meta) VerifyUserTokens(uts ...string) (*models.UserTokenResponse, error)

Verifys multiple user tokens. Takes multiple user token strings as arguments.

type MetaInterface

type MetaInterface interface {
	Ping() (*models.Pong, error)
	GetCuratedAssets() (*models.CuratedAssetsResponse, error)
	GetKycStatusByAccount(a string) (*models.KycStatusByAccountResponse, error)
	GetKycStatusByUserToken(body models.KycStatusByUserTokenRequest) (*models.KycStatusByUserTokenResponse, error)
	GetRatesForCurrency(cur string) (*models.RatesCurrencyResponse, error)
	GetXrplTransaction(txid string) (*models.XrpTxResponse, error)
	VerifyUserToken(t string) (*models.UserTokenResponse, error)
	VerifyUserTokens(uts ...string) (*models.UserTokenResponse, error)
}

Jump to

Keyboard shortcuts

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