walletapi

package
v0.0.0-...-2515fb6 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OkRes

func OkRes() statusRes

Types

type SetupWalletMnemonicReqBody

type SetupWalletMnemonicReqBody struct {
	Mnemonic       string `json:"mnemonic" binding:"required" validate:"required"`
	DerivationPath string `json:"derivationPath" binding:"required" validate:"required"`
}

type SetupWalletPrKeyReqBody

type SetupWalletPrKeyReqBody struct {
	PrivateKey lib.HexString `json:"privateKey" binding:"required" validate:"required"`
}

type WalletController

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

func NewWalletController

func NewWalletController(service interfaces.Wallet) *WalletController

func (*WalletController) DeleteWallet

func (s *WalletController) DeleteWallet(ctx *gin.Context)

DeleteWallet godoc

@Summary		Remove wallet from proxy
@Description	Remove wallet from proxy storage
@Tags			wallet
@Produce		json
@Success		200	{statusRes}	res
@Router			/wallet [delete]

func (*WalletController) GetWallet

func (s *WalletController) GetWallet(ctx *gin.Context)

GetWallet godoc

@Summary		Get Wallet
@Description	Get wallet address
@Tags			wallet
@Produce		json
@Success		200	{WalletRes}	WalletRes
@Router			/wallet [get]

func (*WalletController) RegisterRoutes

func (s *WalletController) RegisterRoutes(r interfaces.Router)

func (*WalletController) SetupWalletMnemonic

func (s *WalletController) SetupWalletMnemonic(ctx *gin.Context)

SetupWalletMnemonic godoc

@Summary		Setup wallet using mnemonic
@Description	Setup wallet using mnemonic
@Tags			wallet
@Produce		json
@Param			mnemonic		body		string	false	"Mnemonic"
@Param			derivationPath	body		string	false	"Derivation path"
@Success		200				{WalletRes}	walletRes
@Router			/wallet/mnemonic [post]

func (*WalletController) SetupWalletPrivateKey

func (s *WalletController) SetupWalletPrivateKey(ctx *gin.Context)

SetupWalletPrivateKey godoc

@Summary		Setup wallet with private key
@Description	Setup wallet with private key
@Tags			wallet
@Produce		json
@Param			privatekey	body		string	true	"Private key"
@Success		200			{WalletRes}	walletRes
@Router			/wallet/privateKey [post]

type WalletRes

type WalletRes struct {
	Address common.Address `json:"address" example:"0x1234"`
}

Jump to

Keyboard shortcuts

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