loopring

package
v0.0.0-...-16aa79d Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEddsaSigNftOrder

func GetEddsaSigNftOrder(
	privateKey string,
	exchangeAddress string,
	storageId string,
	accountId string,
	sellTokenId string,
	buyTokenId string,
	sellTokenAmount string,
	buyTokenAmount string,
	validUntil string,
	maxFeeBips string,
	fillAmountBOrS string,
	takerAddress string,
) (string, error)

func GetLockHashAndEddsaSignature

func GetLockHashAndEddsaSignature(
	privateKey string,
	exchangeAddress string,
	accountId string,
	tokenId string,
	volume string,
	timestamp string,
) (string, error)

func GetNftData

func GetNftData(
	nftId string,
	tokenAddress string,
	royaltyPercentage string,
	minterAddress string,
	nftType string,
) (string, error)

func NewPrivateKeyFromString

func NewPrivateKeyFromString(privateKeyString string) *eddsa.PrivateKey

func SignRequest

func SignRequest(privateKey *eddsa.PrivateKey, method string, baseUrl string, path string, data string) (string, error)

Types

type KeyPair

type KeyPair struct {
	SecretKey  *big.Int
	PublicKeyX *big.Int
	PublicKeyY *big.Int
}

func GenerateKeyPair

func GenerateKeyPair(signature string) (KeyPair, error)

func (KeyPair) FormatPublicKeyX

func (kp KeyPair) FormatPublicKeyX() string

func (KeyPair) FormatPublicKeyY

func (kp KeyPair) FormatPublicKeyY() string

func (KeyPair) FormatSecretKey

func (kp KeyPair) FormatSecretKey() string

func (KeyPair) ToFormatted

func (kp KeyPair) ToFormatted() KeyPairFormatted

type KeyPairFormatted

type KeyPairFormatted struct {
	SecretKey  string
	PublicKeyX string
	PublicKeyY string
}

Jump to

Keyboard shortcuts

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