clienthttp

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APIURLEnv     = "FIREBLOCKS_API_URL"
	APIURLDefault = "https://api.fireblocks.io"
)
View Source
const (
	APIKeyEnv = "FIREBLOCKS_API_KEY"
)
View Source
const (
	RSAPrivateKeyEnv = "FIREBLOCKS_RSA_PRIVATE_KEY"
)

Variables

This section is empty.

Functions

func APIKeyFlag

func APIKeyFlag(v *viper.Viper, f *pflag.FlagSet)

APIKeyFlag register flag for Authentication apiKey

func APIURLFlag

func APIURLFlag(v *viper.Viper, f *pflag.FlagSet)

APIURLFlag register flag for Authentication apiURL

func Flags

func Flags(v *viper.Viper, f *pflag.FlagSet)

Flags register viper compatible pflags for auth

func GetAPIKey

func GetAPIKey(v *viper.Viper) string

func GetAPIURL

func GetAPIURL(v *viper.Viper) string

func GetRSAPrivateKey

func GetRSAPrivateKey(v *viper.Viper) string

func RSAPrivateKeyFlag

func RSAPrivateKeyFlag(v *viper.Viper, f *pflag.FlagSet)

RSAPrivateKeyFlag register flag for Authentication rsaPrivateKey

Types

type Client

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

func New

func New(cfg *Config) (*Client, error)

func (*Client) AddExternalWalletAsset

func (c *Client) AddExternalWalletAsset(ctx context.Context, walletID, assetID string, msg *client.AddExternalWalletAssetMsg) (*client.ExternalWalletAsset, error)

func (*Client) CancelTransaction

func (c *Client) CancelTransaction(ctx context.Context, txID string) error

func (*Client) CreateExternalWallet

func (c *Client) CreateExternalWallet(ctx context.Context, msg *client.CreateExternalWalletMsg) (*client.ExternalWallet, error)

func (*Client) CreateInternalWallet

func (c *Client) CreateInternalWallet(ctx context.Context, msg *client.CreateInternalWalletMsg) (*client.UnmanagedWallet, error)

func (*Client) CreateTransaction

func (*Client) CreateVaultAccount

func (c *Client) CreateVaultAccount(ctx context.Context, msg *client.CreateVaultAccountMsg) (*client.VaultAccount, error)

func (*Client) CreateVaultAccountAsset

func (c *Client) CreateVaultAccountAsset(ctx context.Context, vaultID, assetID string) (*client.CreateVaultAssetResponse, error)

func (*Client) DeleteExternalWallet

func (c *Client) DeleteExternalWallet(ctx context.Context, walletID string) error

func (*Client) DeleteExternalWalletAsset

func (c *Client) DeleteExternalWalletAsset(ctx context.Context, walletID, assetID string) error

func (*Client) GetContract

func (c *Client) GetContract(ctx context.Context, contractID string) (*client.UnmanagedContract, error)

func (*Client) GetExternalWallet

func (c *Client) GetExternalWallet(ctx context.Context, walletID string) (*client.ExternalWallet, error)

func (*Client) GetExternalWalletAsset

func (c *Client) GetExternalWalletAsset(ctx context.Context, walletID, assetID string) (*client.ExternalWalletAsset, error)

func (*Client) GetInternalWallet

func (c *Client) GetInternalWallet(ctx context.Context, walletID string) (*client.UnmanagedWallet, error)

func (*Client) GetTransaction

func (c *Client) GetTransaction(ctx context.Context, txID string) (*client.TransactionMsg, error)

func (*Client) GetVaultAccount

func (c *Client) GetVaultAccount(ctx context.Context, vaultAccountID string) (*client.VaultAccount, error)

func (*Client) GetVaultAccountAssetBalance

func (c *Client) GetVaultAccountAssetBalance(ctx context.Context, vaultID, assetID string) (*client.VaultAsset, error)

func (*Client) HideVaultAccount

func (c *Client) HideVaultAccount(ctx context.Context, vaultAccountID string) error

func (*Client) Init

func (c *Client) Init(ctx context.Context) error

func (*Client) ListAssets

func (c *Client) ListAssets(ctx context.Context) ([]*client.AssetTypeResponse, error)

func (*Client) ListContracts

func (c *Client) ListContracts(ctx context.Context) ([]*client.UnmanagedContract, error)

func (*Client) ListExternalWallets

func (c *Client) ListExternalWallets(ctx context.Context) ([]*client.ExternalWallet, error)

func (*Client) ListInternalWallets

func (c *Client) ListInternalWallets(ctx context.Context) ([]*client.UnmanagedWallet, error)

func (*Client) ListTransactions

func (c *Client) ListTransactions(ctx context.Context) ([]*client.TransactionMsg, error)

func (*Client) ListUsers

func (c *Client) ListUsers(ctx context.Context) ([]*client.UserMsg, error)

func (*Client) ListVaultAccountAssetAddresses

func (c *Client) ListVaultAccountAssetAddresses(ctx context.Context, vaultID, assetID string) ([]*client.VaultAccountAssetAddress, error)

func (*Client) ListVaultAccountsPaged

func (c *Client) ListVaultAccountsPaged(ctx context.Context) (*client.VaultAccountsWithPageInfoMsg, error)

func (*Client) SetAutoFuelVaultAccount

func (c *Client) SetAutoFuelVaultAccount(ctx context.Context, vaultAccountID string, status bool) error

func (*Client) UnhideVaultAccount

func (c *Client) UnhideVaultAccount(ctx context.Context, vaultAccountID string) error

func (*Client) UpdateVaultAccount

func (c *Client) UpdateVaultAccount(ctx context.Context, vaultAccountID string, msg *client.UpdateVaultAccountMsg) error

type Config

type Config struct {
	APIKey, RSAPrivateKey, APIURL string
}

func NewConfigFromViper

func NewConfigFromViper(v *viper.Viper) *Config

func (*Config) SetDefault

func (cfg *Config) SetDefault() *Config

type ErrorMsg

type ErrorMsg struct {
	Message string `json:"message"`
}

Jump to

Keyboard shortcuts

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