coder

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

README

ens-offchain-lookup-coder

A golang library used to decode and encode ENS offchain lookups.


Copyright © 2022 Coinbase, Inc. Licensed under the Apache License v2.0.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeResponse

func EncodeResponse(resultData []byte, expires uint64, signature []byte) (responseData []byte, err error)

Types

type AddrLookup added in v0.0.2

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

func NewAddrLookup added in v0.0.2

func NewAddrLookup(name string, lookupInputs []byte, senderAddress common.Address, requestData []byte) (*AddrLookup, error)

func (*AddrLookup) EncodeResult added in v0.0.2

func (l *AddrLookup) EncodeResult(result []byte, expires uint64) (encodedResult []byte, hash []byte, err error)

func (*AddrLookup) Name added in v0.0.2

func (l *AddrLookup) Name() string

type Lookup added in v0.0.2

type Lookup interface {
	Name() string
	EncodeResult(result []byte, expires uint64) (encodedResult []byte, hash []byte, err error)
}

func DecodeRequest

func DecodeRequest(sender string, data string) (Lookup, error)

type MulticoinAddrLookup added in v0.0.2

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

func NewMulticoinAddrLookup added in v0.0.2

func NewMulticoinAddrLookup(name string, lookupInputs []byte, senderAddress common.Address, requestData []byte) (*MulticoinAddrLookup, error)

func (*MulticoinAddrLookup) CoinType added in v0.0.2

func (l *MulticoinAddrLookup) CoinType() *big.Int

func (*MulticoinAddrLookup) EncodeResult added in v0.0.2

func (l *MulticoinAddrLookup) EncodeResult(result []byte, expires uint64) (encodedResult []byte, hash []byte, err error)

func (*MulticoinAddrLookup) Name added in v0.0.2

func (l *MulticoinAddrLookup) Name() string

type TextLookup added in v0.0.2

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

func NewTextLookup added in v0.0.2

func NewTextLookup(name string, lookupInputs []byte, senderAddress common.Address, requestData []byte) (*TextLookup, error)

func (*TextLookup) EncodeResult added in v0.0.2

func (l *TextLookup) EncodeResult(result []byte, expires uint64) (encodedResult []byte, hash []byte, err error)

func (*TextLookup) Key added in v0.0.2

func (l *TextLookup) Key() string

func (*TextLookup) Name added in v0.0.2

func (l *TextLookup) Name() string

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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