interfaces

package module
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2023 License: Apache-2.0 Imports: 0 Imported by: 8

README

Scale Signature Interfaces

Discord

This library contains the Scale Signature Interfaces to generate host and guest signatures across multiple languages.

This library is not meant to be used directly, but rather as an internal dependency for the Scale Runtime and generated Scale Signatures.

License

The Scale Signature Interfaces project is available as open source under the terms of the Apache License, Version 2.0.

Project Managed By:

Documentation

Index

Constants

View Source
const TYPESCRIPT_ADDRESS_OF = "scale_address_of" //nolint:revive

TYPESCRIPT_ADDRESS_OF is the name of the address_of function in the typescript guest runtime

View Source
const TYPESCRIPT_NEXT = "scale_next" //nolint:revive

TYPESCRIPT_NEXT is the name of the next function in the typescript guest runtime

Variables

This section is empty.

Functions

This section is empty.

Types

type New

type New[T Signature] func() T

New is a factory function for creating a new Signature

type Signature

type Signature interface {
	Read(b []byte) error    // Read reads the signature from the given byte slice
	Write() []byte          // Write writes the signature into a byte slice and returns it
	Error(err error) []byte // Error writes the error into a byte slice and returns it
	Hash() string           // Hash returns the SHA256 hash of the Signature
}

Signature is an interface that must be implemented by all Scale Signatures for use with the Host. Guest implementations do not use this interface.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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