Documentation ¶
Index ¶
- Constants
- type Config
- type Provider
- func (p *Provider) EthereumRPC(ctx context.Context, isTest bool) (*ethclient.Client, error)
- func (p *Provider) Main() *tatum.APIClient
- func (p *Provider) MaticRPC(ctx context.Context, isTest bool) (*ethclient.Client, error)
- func (p *Provider) SubscribeToWebhook(ctx context.Context, params SubscriptionParams) (string, error)
- func (p *Provider) Test() *tatum.APIClient
- func (p *Provider) ValidateHMAC(body []byte, hash string) bool
- type SubscriptionParams
- type SubscriptionResponse
Constants ¶
View Source
const ( TokenHeader = "x-api-key" EthTestnet = "ethereum-goerli" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { BasePath string APIKey string `yaml:"api_key" env:"TATUM_API_KEY" env-description:"Tatum API Key"` TestAPIKey string `yaml:"test_api_key" env:"TATUM_TEST_API_KEY" env-description:"Tatum Test API Key"` HMACSecret string `yaml:"tatum_hmac_secret" env:"TATUM_HMAC_SECRET" env-description:"Tatum HMAC Secret. Use any random string with 8+ chars"` // HMACForceSet will make "set hmac set" request on every service start. // Useful if HMAC secret was changed. HMACForceSet bool `yaml:"tatum_hmac_force_set" env:"TATUM_HMAC_FORCE_SET" env-description:"Internal variable"` }
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
func (*Provider) EthereumRPC ¶
func (*Provider) SubscribeToWebhook ¶
func (p *Provider) SubscribeToWebhook(ctx context.Context, params SubscriptionParams) (string, error)
SubscribeToWebhook fcking auto-generated sdk throws an error on this request, so it's rewritten manually.
type SubscriptionParams ¶
type SubscriptionParams struct { Blockchain money.Blockchain Address string IsTest bool WebhookURL string }
type SubscriptionResponse ¶
type SubscriptionResponse struct {
ID string `json:"id"`
}
Click to show internal directories.
Click to hide internal directories.