core

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2025 License: BSD-2-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ecrecover

func Ecrecover(hash, sig string) (string, error)

func HashTypedData added in v1.0.6

func HashTypedData(typedDataJson string) (string, error)

func HexToAddress added in v1.0.6

func HexToAddress(address string) string

func Keccak256

func Keccak256(data string) string

func TableInsert

func TableInsert(db *gorm.DB, table string, obj map[string]any) error

func TableSelect

func TableSelect(db *gorm.DB, query string) ([]map[string]any, error)

Types

type FetchArgs

type FetchArgs struct {
	Method  string            `json:"method"`
	Headers map[string]string `json:"headers"`
	Body    string            `json:"body"`
}

type FetchResp

type FetchResp struct {
	Status int    `json:"status"`
	Body   string `json:"body"`
}

func Fetch

func Fetch(url string, args FetchArgs) (*FetchResp, error)

Jump to

Keyboard shortcuts

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