signature

package
v0.0.0-...-b29c596 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SignBytes

func SignBytes(input []byte, privateKey *ecdsa.PrivateKey) ([]byte, error)

func SignedGet

func SignedGet(endpoint string, privateKey *ecdsa.PrivateKey, selfHost string) (*http.Request, error)

func SignedPost

func SignedPost(endpoint string, contentType string, r io.Reader, privateKey *ecdsa.PrivateKey, selfHost string) *http.Request

Types

type ListenTSSignature

type ListenTSSignature struct {
	Signature string
	Timestamp string
}

func GenerateListenTimestampAndSignature

func GenerateListenTimestampAndSignature(privateKey *ecdsa.PrivateKey) (*ListenTSSignature, error)

type RecoveredSignature

type RecoveredSignature struct {
	DataHash     common.Hash
	Data         SignatureData
	SignerWallet string
}

func ParseFromQueryString

func ParseFromQueryString(queryStringValue string) (*RecoveredSignature, error)

func (*RecoveredSignature) String

func (r *RecoveredSignature) String() string

type SignatureData

type SignatureData struct {
	UploadID    string `json:"upload_id"`
	Cid         string `json:"cid"`
	ShouldCache int    `json:"shouldCache"`
	Timestamp   int64  `json:"timestamp"`
	TrackId     int64  `json:"trackId"`
	UserID      int    `json:"userId"`
}

type SignatureEnvelope

type SignatureEnvelope struct {
	Data      string
	Signature string
}

Jump to

Keyboard shortcuts

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