api

package
v0.0.0-...-fe10d55 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	URLBase = "https://api.circle.com/v1/w3s"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CircleChangeOwnerReq

type CircleChangeOwnerReq struct {
	AbiParameters          []string `json:"abiParameters"`
	IdempotencyKey         string   `json:"idempotencyKey"`
	AbiFunctionSignature   string   `json:"abiFunctionSignature"`
	ContractAddress        string   `json:"contractAddress"`
	RefID                  string   `json:"refId"`
	WalletId               string   `json:"walletId"`
	EntitySecretCipherText string   `json:"entitySecretCiphertext"`
	FeeLevel               string   `json:"feeLevel"`
}

type CircleChangeOwnerResp

type CircleChangeOwnerResp struct {
	Data struct {
		Id    string `json:"id"`
		State string `json:"state"`
	} `json:"data"`
}

type CircleCreateWalletReq

type CircleCreateWalletReq struct {
	IdempotencyKey         string     `json:"idempotencyKey"`
	AccountType            string     `json:"accountType"`
	Blockchains            []string   `json:"blockchains"`
	EntitySecretCipherText string     `json:"entitySecretCiphertext"`
	WalletSetId            string     `json:"walletSetId"`
	Count                  int        `json:"count"`
	Metadata               []Metadata `json:"metadata"`
}

type CircleCreateWalletResp

type CircleCreateWalletResp struct {
	Data struct {
		Wallets []struct {
			Id               string `json:"id"`
			Address          string `json:"address"`
			Blockchain       string `json:"blockchain"`
			CreateDate       string `json:"createDate"`
			UpdateDate       string `json:"updateDate"`
			CustodyType      string `json:"custodyType"`
			State            string `json:"state"`
			WalletSetId      string `json:"walletSetId"`
			AccountType      string `json:"accountType"`
			Name             string `json:"name"`
			RefID            string `json:"refId"`
			UserId           string `json:"userId"`
			InitialPublicKey string `json:"initialPublicKey"`
		} `json:"wallets"`
	} `json:"data"`
}

type CircleErrorResp

type CircleErrorResp struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
	Errors  []struct {
		Error        string `json:"error"`
		InvalidValue string `json:"invalidValue"`
		Message      string `json:"message"`
	} `json:"errors"`
}

func (*CircleErrorResp) Error

func (r *CircleErrorResp) Error() string

type CircleWallet

type CircleWallet struct {
	Id          string `json:"id"`
	State       string `json:"state"`
	WalletSetId string `json:"walletSetId"`
	CustodyType string `json:"custodyType"`
	Name        string `json:"name"`
	Address     string `json:"address"`
	RefID       string `json:"refId"`
	Blockchain  string `json:"blockchain"`
	AccountType string `json:"accountType"`
	UpdateDate  string `json:"updateDate"`
	CreateDate  string `json:"createDate"`
	ScaCore     string `json:"scaCore"`
}

type CircleWalletsResp

type CircleWalletsResp struct {
	Data struct {
		Wallets []CircleWallet `json:"wallets"`
	} `json:"data"`
}

type CreateWalletReq

type CreateWalletReq struct {
	IdempotencyKey string `json:"idempotency_key"`
	AccountType    string `json:"account_type"`
	Owner          string `json:"owner"`
	Name           string `json:"name"`
}

CreateWalletReq represents the request payload for creating a new wallet.

func (*CreateWalletReq) Validate

func (r *CreateWalletReq) Validate() error

type Metadata

type Metadata struct {
	Name  string `json:"name"`
	RefID string `json:"refId"`
}

type Server

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

func NewServer

func NewServer(cfg config.Config) (*Server, error)

NewServer creates a new Server instance with the provided configuration.

func (*Server) CreateWallet

func (s *Server) CreateWallet(c echo.Context) error

func (*Server) GetWallets

func (s *Server) GetWallets(c echo.Context) error

func (*Server) Ping

func (s *Server) Ping(c echo.Context) error

func (*Server) Start

func (s *Server) Start() error

Start starts the server.

func (*Server) StopServer

func (s *Server) StopServer() error

Jump to

Keyboard shortcuts

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