utils

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2022 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTxEncryptionKeyOffline

func GetTxEncryptionKeyOffline(pubkey []byte, txSenderPrivKey []byte, nonce []byte) ([]byte, error)

func GzipIt

func GzipIt(input []byte) ([]byte, error)

GzipIt compresses the input ([]byte)

func IsGzip

func IsGzip(input []byte) bool

IsGzip returns checks if the file contents are gzip compressed

func IsWasm

func IsWasm(input []byte) bool

IsWasm checks if the file contents are of wasm binary

Types

type WASMContext

type WASMContext struct {
	CLIContext       client.Context
	TestKeyPairPath  string
	TestMasterIOCert regtypes.MasterCertificate
}

WASMContext wraps github.com/cosmos/cosmos-sdk/client/client.Context

func (WASMContext) Decrypt

func (ctx WASMContext) Decrypt(ciphertext []byte, nonce []byte) ([]byte, error)

Decrypt decrypts

func (WASMContext) DecryptError

func (ctx WASMContext) DecryptError(errString string, msgType string, nonce []byte) (json.RawMessage, error)

func (WASMContext) Encrypt

func (ctx WASMContext) Encrypt(plaintext []byte) ([]byte, error)

Encrypt encrypts

func (WASMContext) GetTxSenderKeyPair

func (ctx WASMContext) GetTxSenderKeyPair() (privkey []byte, pubkey []byte, er error)

GetTxSenderKeyPair get the local tx encryption id

func (WASMContext) OfflineEncrypt

func (ctx WASMContext) OfflineEncrypt(plaintext []byte, pathToMasterIoKey string) ([]byte, error)

Jump to

Keyboard shortcuts

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