Documentation
¶
Index ¶
- type Client
- func (client *Client) AuthAuthenticate(request contract.AuthRequest) (res contract.AuthResponse, err error)
- func (client *Client) AuthChangePassword(request contract.ChangePasswordRequest) error
- func (client *Client) AuthLogin(request contract.AuthRequest) (res contract.AuthResponse, err error)
- func (client *Client) AuthLogout() error
- func (client *Client) BalanceRefresh(identityAddress string) (b contract.BalanceDTO, err error)
- func (client *Client) Beneficiary(address string) (res contract.IdentityBeneficiaryResponse, err error)
- func (client *Client) ConnectionCreate(consumerID, providerID, hermesID, serviceType string, ...) (status contract.ConnectionInfoDTO, err error)
- func (client *Client) ConnectionDestroy(port int) (err error)
- func (client *Client) ConnectionIP() (ip contract.IPDTO, err error)
- func (client *Client) ConnectionLocation() (location contract.LocationDTO, err error)
- func (client *Client) ConnectionStatistics(sessionID ...string) (statistics contract.ConnectionStatisticsDTO, err error)
- func (client *Client) ConnectionStatus(port int) (status contract.ConnectionInfoDTO, err error)
- func (client *Client) ConnectionTraffic(sessionID ...string) (traffic contract.ConnectionTrafficDTO, err error)
- func (client *Client) CurrentIdentity(identity, passphrase string) (id contract.IdentityRefDTO, err error)
- func (client *Client) DecreaseStake(ID identity.Identity, amount *big.Int) error
- func (client *Client) FetchConfig() (map[string]interface{}, error)
- func (client *Client) GetBeneficiaryAsync(identity string) (contract.BeneficiaryAddressRequest, error)
- func (client *Client) GetIdentities() (ids []contract.IdentityRefDTO, err error)
- func (client *Client) GetRegistrationPaymentStatus(identity string) (contract.RegistrationPaymentResponse, error)
- func (client *Client) GetTransactorFees() (contract.FeesDTO, error)
- func (client *Client) Healthcheck() (healthcheck contract.HealthCheckDTO, err error)
- func (client *Client) Identity(identityAddress string) (id contract.IdentityDTO, err error)
- func (client *Client) IdentityReferralCode(identity string) (contract.ReferralTokenResponse, error)
- func (client *Client) IdentityRegistrationStatus(address string) (contract.IdentityRegistrationResponse, error)
- func (client *Client) ImportIdentity(blob []byte, passphrase string, setDefault bool) (id contract.IdentityRefDTO, err error)
- func (client *Client) MigrateHermes(address string) error
- func (client *Client) MigrateHermesStatus(address string) (contract.MigrationStatusResponse, error)
- func (client *Client) NATStatus() (status contract.NodeStatusResponse, err error)
- func (client *Client) NATType() (status contract.NATTypeDTO, err error)
- func (client *Client) NewIdentity(passphrase string) (id contract.IdentityRefDTO, err error)
- func (client *Client) OrderCreate(id identity.Identity, gw string, order contract.PaymentOrderRequest) (contract.PaymentOrderResponse, error)
- func (client *Client) OrderGet(address identity.Identity, orderID string) (contract.PaymentOrderResponse, error)
- func (client *Client) OrderGetAll(id identity.Identity) ([]contract.PaymentOrderResponse, error)
- func (client *Client) OrderInvoice(address identity.Identity, orderID string) ([]byte, error)
- func (client *Client) OriginLocation() (location contract.LocationDTO, err error)
- func (client *Client) PaymentOrderGateways(optionsCurrency exchange.Currency) ([]contract.GatewaysResponse, error)
- func (client *Client) Proposals() ([]contract.ProposalDTO, error)
- func (client *Client) ProposalsByLocationAndService(serviceType, locationType, locationCountry string) ([]contract.ProposalDTO, error)
- func (client *Client) ProposalsByType(serviceType string) ([]contract.ProposalDTO, error)
- func (client *Client) ProposalsByTypeWithWhitelisting(serviceType string) ([]contract.ProposalDTO, error)
- func (client *Client) ProposalsNATCompatible() ([]contract.ProposalDTO, error)
- func (client *Client) ProxyIP(proxyPort int) (ip contract.IPDTO, err error)
- func (client *Client) ProxyLocation(proxyPort int) (location contract.LocationDTO, err error)
- func (client *Client) RegisterIdentity(address, beneficiary string, token *string) error
- func (client *Client) Service(id string) (service contract.ServiceInfoDTO, err error)
- func (client *Client) ServiceStart(request contract.ServiceStartRequest) (service contract.ServiceInfoDTO, err error)
- func (client *Client) ServiceStop(id string) error
- func (client *Client) Services() (services contract.ServiceListResponse, err error)
- func (client *Client) Sessions() (sessions contract.SessionListResponse, err error)
- func (client *Client) SessionsByServiceType(serviceType string) (contract.SessionListResponse, error)
- func (client *Client) SessionsByStatus(status string) (contract.SessionListResponse, error)
- func (client *Client) SetBeneficiaryAsync(identity, ethAddress string) error
- func (client *Client) SetConfig(data map[string]interface{}) error
- func (client *Client) SetMMNApiKey(data contract.MMNApiKeyRequest) error
- func (client *Client) Settle(providerID identity.Identity, hermesIDs []common.Address, ...) error
- func (client *Client) SettleIntoStake(providerID, hermesID identity.Identity, waitForBlockchain bool) error
- func (client *Client) SettleWithBeneficiary(address, beneficiary, hermesID string) error
- func (client *Client) SettleWithBeneficiaryStatus(address string) (res contract.BeneficiaryTxStatus, err error)
- func (client *Client) SmartConnectionCreate(consumerID, hermesID, serviceType string, ...) (status contract.ConnectionInfoDTO, err error)
- func (client *Client) Stop() error
- func (client *Client) Unlock(identity, passphrase string) error
- func (client *Client) UpdateTerms(obj contract.TermsRequest) error
- func (client *Client) Withdraw(providerID identity.Identity, hermesID, beneficiary common.Address, ...) error
- func (client *Client) WithdrawalHistory(address string) (res contract.SettlementListResponse, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is able perform remote requests to Tequilapi server
func (*Client) AuthAuthenticate ¶
func (client *Client) AuthAuthenticate(request contract.AuthRequest) (res contract.AuthResponse, err error)
AuthAuthenticate authenticates user and issues auth token
func (*Client) AuthChangePassword ¶
func (client *Client) AuthChangePassword(request contract.ChangePasswordRequest) error
AuthChangePassword changes user password
func (*Client) AuthLogin ¶
func (client *Client) AuthLogin(request contract.AuthRequest) (res contract.AuthResponse, err error)
AuthLogin authenticates user and sets cookie with issued auth token
func (*Client) AuthLogout ¶
AuthLogout Clears authentication cookie
func (*Client) BalanceRefresh ¶
func (client *Client) BalanceRefresh(identityAddress string) (b contract.BalanceDTO, err error)
BalanceRefresh forces a balance refresh if possible and returns the latest balance.
func (*Client) Beneficiary ¶
func (client *Client) Beneficiary(address string) (res contract.IdentityBeneficiaryResponse, err error)
Beneficiary gets beneficiary address for the provided identity.
func (*Client) ConnectionCreate ¶
func (client *Client) ConnectionCreate(consumerID, providerID, hermesID, serviceType string, options contract.ConnectOptions) (status contract.ConnectionInfoDTO, err error)
ConnectionCreate initiates a new connection to a host identified by providerID
func (*Client) ConnectionDestroy ¶
ConnectionDestroy terminates current connection
func (*Client) ConnectionIP ¶
ConnectionIP returns public ip
func (*Client) ConnectionLocation ¶
func (client *Client) ConnectionLocation() (location contract.LocationDTO, err error)
ConnectionLocation returns current location
func (*Client) ConnectionStatistics ¶
func (client *Client) ConnectionStatistics(sessionID ...string) (statistics contract.ConnectionStatisticsDTO, err error)
ConnectionStatistics returns statistics about current connection
func (*Client) ConnectionStatus ¶
func (client *Client) ConnectionStatus(port int) (status contract.ConnectionInfoDTO, err error)
ConnectionStatus returns connection status
func (*Client) ConnectionTraffic ¶
func (client *Client) ConnectionTraffic(sessionID ...string) (traffic contract.ConnectionTrafficDTO, err error)
ConnectionTraffic returns traffic information about current connection
func (*Client) CurrentIdentity ¶
func (client *Client) CurrentIdentity(identity, passphrase string) (id contract.IdentityRefDTO, err error)
CurrentIdentity unlocks and returns the last used, new or first identity
func (*Client) DecreaseStake ¶
DecreaseStake requests the decrease of stake via the transactor.
func (*Client) FetchConfig ¶
FetchConfig - fetches current config
func (*Client) GetBeneficiaryAsync ¶
func (client *Client) GetBeneficiaryAsync(identity string) (contract.BeneficiaryAddressRequest, error)
GetBeneficiaryAsync gets locally saved beneficiary address.
func (*Client) GetIdentities ¶
func (client *Client) GetIdentities() (ids []contract.IdentityRefDTO, err error)
GetIdentities returns a list of client identities
func (*Client) GetRegistrationPaymentStatus ¶
func (client *Client) GetRegistrationPaymentStatus(identity string) (contract.RegistrationPaymentResponse, error)
GetRegistrationPaymentStatus returns the registration payment status
func (*Client) GetTransactorFees ¶
GetTransactorFees returns the transactor fees
func (*Client) Healthcheck ¶
func (client *Client) Healthcheck() (healthcheck contract.HealthCheckDTO, err error)
Healthcheck returns a healthcheck info
func (*Client) Identity ¶
func (client *Client) Identity(identityAddress string) (id contract.IdentityDTO, err error)
Identity returns identity status with cached balance
func (*Client) IdentityReferralCode ¶
func (client *Client) IdentityReferralCode(identity string) (contract.ReferralTokenResponse, error)
IdentityReferralCode returns a referral token for the given identity.
func (*Client) IdentityRegistrationStatus ¶
func (client *Client) IdentityRegistrationStatus(address string) (contract.IdentityRegistrationResponse, error)
IdentityRegistrationStatus returns information of identity needed to register it on blockchain
func (*Client) ImportIdentity ¶
func (client *Client) ImportIdentity(blob []byte, passphrase string, setDefault bool) (id contract.IdentityRefDTO, err error)
ImportIdentity sends a request to import a given identity.
func (*Client) MigrateHermes ¶
MigrateHermes migrate from old to active Hermes
func (*Client) MigrateHermesStatus ¶
func (client *Client) MigrateHermesStatus(address string) (contract.MigrationStatusResponse, error)
MigrateHermesStatus check status of the migration
func (*Client) NATStatus ¶
func (client *Client) NATStatus() (status contract.NodeStatusResponse, err error)
NATStatus returns status of NAT traversal
func (*Client) NATType ¶
func (client *Client) NATType() (status contract.NATTypeDTO, err error)
NATType returns type of NAT in sense of traversal capabilities
func (*Client) NewIdentity ¶
func (client *Client) NewIdentity(passphrase string) (id contract.IdentityRefDTO, err error)
NewIdentity creates a new client identity
func (*Client) OrderCreate ¶
func (client *Client) OrderCreate(id identity.Identity, gw string, order contract.PaymentOrderRequest) (contract.PaymentOrderResponse, error)
OrderCreate creates a new order for currency exchange in pilvytis
func (*Client) OrderGet ¶
func (client *Client) OrderGet(address identity.Identity, orderID string) (contract.PaymentOrderResponse, error)
OrderGet returns a single order istance given it's ID.
func (*Client) OrderGetAll ¶
OrderGetAll returns all order istances for a given identity
func (*Client) OrderInvoice ¶
OrderInvoice returns a single order istance given it's ID.
func (*Client) OriginLocation ¶
func (client *Client) OriginLocation() (location contract.LocationDTO, err error)
OriginLocation returns original location
func (*Client) PaymentOrderGateways ¶
func (client *Client) PaymentOrderGateways(optionsCurrency exchange.Currency) ([]contract.GatewaysResponse, error)
PaymentOrderGateways returns all possible gateways and their data.
func (*Client) Proposals ¶
func (client *Client) Proposals() ([]contract.ProposalDTO, error)
Proposals returns all available proposals for services
func (*Client) ProposalsByLocationAndService ¶
func (client *Client) ProposalsByLocationAndService(serviceType, locationType, locationCountry string) ([]contract.ProposalDTO, error)
ProposalsByLocationAndService fetches proposals by given service and node location types.
func (*Client) ProposalsByType ¶
func (client *Client) ProposalsByType(serviceType string) ([]contract.ProposalDTO, error)
ProposalsByType fetches proposals by given type
func (*Client) ProposalsByTypeWithWhitelisting ¶
func (client *Client) ProposalsByTypeWithWhitelisting(serviceType string) ([]contract.ProposalDTO, error)
ProposalsByTypeWithWhitelisting fetches proposals by given type with all whitelisting options.
func (*Client) ProposalsNATCompatible ¶
func (client *Client) ProposalsNATCompatible() ([]contract.ProposalDTO, error)
ProposalsNATCompatible returns proposals for services which we can connect to
func (*Client) ProxyLocation ¶
func (client *Client) ProxyLocation(proxyPort int) (location contract.LocationDTO, err error)
ProxyLocation returns proxy location.
func (*Client) RegisterIdentity ¶
RegisterIdentity registers identity
func (*Client) Service ¶
func (client *Client) Service(id string) (service contract.ServiceInfoDTO, err error)
Service returns a service information by the requested id
func (*Client) ServiceStart ¶
func (client *Client) ServiceStart(request contract.ServiceStartRequest) (service contract.ServiceInfoDTO, err error)
ServiceStart starts an instance of the service.
func (*Client) ServiceStop ¶
ServiceStop stops the running service instance by the requested id.
func (*Client) Services ¶
func (client *Client) Services() (services contract.ServiceListResponse, err error)
Services returns all running services
func (*Client) Sessions ¶
func (client *Client) Sessions() (sessions contract.SessionListResponse, err error)
Sessions returns all sessions from history
func (*Client) SessionsByServiceType ¶
func (client *Client) SessionsByServiceType(serviceType string) (contract.SessionListResponse, error)
SessionsByServiceType returns sessions from history filtered by type
func (*Client) SessionsByStatus ¶
func (client *Client) SessionsByStatus(status string) (contract.SessionListResponse, error)
SessionsByStatus returns sessions from history filtered by their status
func (*Client) SetBeneficiaryAsync ¶
SetBeneficiaryAsync store beneficiary address locally for identity.
func (*Client) SetMMNApiKey ¶
func (client *Client) SetMMNApiKey(data contract.MMNApiKeyRequest) error
SetMMNApiKey sets MMN's API key in config and registers node to MMN
func (*Client) Settle ¶
func (client *Client) Settle(providerID identity.Identity, hermesIDs []common.Address, waitForBlockchain bool) error
Settle requests the settling of hermes promises
func (*Client) SettleIntoStake ¶
func (client *Client) SettleIntoStake(providerID, hermesID identity.Identity, waitForBlockchain bool) error
SettleIntoStake requests the settling of accountant promises into a stake increase
func (*Client) SettleWithBeneficiary ¶
SettleWithBeneficiary set new beneficiary address for the provided identity.
func (*Client) SettleWithBeneficiaryStatus ¶
func (client *Client) SettleWithBeneficiaryStatus(address string) (res contract.BeneficiaryTxStatus, err error)
SettleWithBeneficiaryStatus set new beneficiary address for the provided identity.
func (*Client) SmartConnectionCreate ¶
func (client *Client) SmartConnectionCreate(consumerID, hermesID, serviceType string, filter contract.ConnectionCreateFilter, options contract.ConnectOptions) (status contract.ConnectionInfoDTO, err error)
SmartConnectionCreate initiates a new connection to a host identified by filter
func (*Client) UpdateTerms ¶
func (client *Client) UpdateTerms(obj contract.TermsRequest) error
UpdateTerms takes a TermsRequest and sends it as an update for the terms of use.
func (*Client) Withdraw ¶
func (client *Client) Withdraw(providerID identity.Identity, hermesID, beneficiary common.Address, amount *big.Int, fromChainID, toChainID int64) error
Withdraw requests the withdrawal of money from l2 to l1 of hermes promises
func (*Client) WithdrawalHistory ¶
func (client *Client) WithdrawalHistory(address string) (res contract.SettlementListResponse, err error)
WithdrawalHistory returns latest withdrawals for identity