verifiers

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidOperationType  = goerr.New("invalid operation type")
	ErrWrongOperationContent = goerr.New("wrong operation content")
	ErrUnsupportedNetwork    = goerr.New("unsupported network")
)

Functions

func GetImage

func GetImage(metaUrl string) (url string, hash string, err error)

func MustGenerateTokenSeed

func MustGenerateTokenSeed(bridgeContract string) (string, string)

MustGenerateTokenSeed returns seed and id hex-encoded with leading 0x

func MustGetPDA

func MustGetPDA(bridgeContract, tokenSeed string) string

func MustPublicKeyFromHexStr

func MustPublicKeyFromHexStr(programId string) solana.PublicKey

func MustVerifyTokenSeed

func MustVerifyTokenSeed(bridgeContract, tokenSeed string) bool

Types

type Metadata

type Metadata struct {
	Image string `json:"image"`
}

type TransferOperator

type TransferOperator interface {
	VerifyTransfer(ctx context.Context, tx, eventId string, transfer *rarimotypes.Transfer) error
}

TransferOperator implements logic for transfer generation on every chain. Every saver should implement it based on its chain peculiarities

type TransferVerifier

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

func NewTransferVerifier

func NewTransferVerifier(operator TransferOperator, log *logan.Entry) *TransferVerifier

func (*TransferVerifier) Verify

Jump to

Keyboard shortcuts

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