sdkadapter

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBlockClient

func NewBlockClient(deps depinject.Config) (client.BlockClient, error)

NewBlockClient creates a new ShannonSDK compatible block client.

func NewSigner

func NewSigner(signingKey cryptotypes.PrivKey) (*sdk.Signer, error)

NewSigner creates a new ShannonSDK compatible signer with the given signing key.

Types

type ShannonSDK

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

ShannonSDK is a wrapper around the Shannon SDK that is used by the AppGateServer to encapsulate the SDK's functionality and dependencies.

func NewShannonSDK

func NewShannonSDK(
	ctx context.Context,
	signingKey cryptotypes.PrivKey,
	deps depinject.Config,
) (*ShannonSDK, error)

NewShannonSDK creates a new ShannonSDK instance with the given signing key and dependencies. It initializes the necessary clients and signer for the SDK.

func (*ShannonSDK) GetSessionSupplierEndpoints

func (shannonSDK *ShannonSDK) GetSessionSupplierEndpoints(
	ctx context.Context,
	appAddress, serviceId string,
) (*shannonsdk.SessionFilter, error)

GetSessionSupplierEndpoints returns the current session's supplier endpoints for the given appAddress and serviceId.

func (*ShannonSDK) SendRelay

func (shannonSDK *ShannonSDK) SendRelay(
	ctx context.Context,
	appAddress string,
	endpoint shannonsdk.Endpoint,
	requestBz []byte,
) (*types.RelayResponse, error)

SendRelay builds a relay request from the given requestBz, signs it with the application address, then sends it to the given endpoint.

Jump to

Keyboard shortcuts

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