integrations

package
v0.88.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package integrations emulates various moneysocket-js modules to allow integration tests

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SellerApp

type SellerApp struct {
	// SellerStack is a stack of layers to manage events in the seller provider app https://git.io/JmVq7
	SellerStack *stack.SellerStack
	// ConsumerStack is a stack of layers to manage events in the seller consumer app
	ConsumerStack *stack.OutgoingConsumerStack
	// AccountUUID is the uuid used to identify the (buyer?) account
	AccountUUID string
	// SellerUUID is the uuid used to identify the (seller) account
	SellerUUID string
	// RequestedItems is a list of items the buyer "checks out with"
	RequestedItems map[string]string
	// StoreOpen is whether or not the seller opens the store
	StoreOpen bool
	// ProviderInfo contains information about the state of the sale (who's paying who, the wad, account uuid)
	ProviderInfo seller.Info
}

SellerApp is a prototype based on https://git.io/JmVLj designed to test interactions between two accounts on terminus.

func NewSellerApp

func NewSellerApp(beacon beacon.Beacon) *SellerApp

NewSellerApp initializes a seller app with a beacon (that contains the location we communicate with).

func (*SellerApp) CloseStore

func (sa *SellerApp) CloseStore()

CloseStore closes the shop.

func (*SellerApp) OpenStore

func (sa *SellerApp) OpenStore()

OpenStore opens the shop.

func (*SellerApp) SetupSellerStack

func (sa *SellerApp) SetupSellerStack()

SetupSellerStack creates eevent handlers on the seller stack for interacting w/ the consuer stack.

func (*SellerApp) UpdatePrices

func (sa *SellerApp) UpdatePrices()

UpdatePrices updates the prices in the state.

type WalletConsumer

type WalletConsumer struct {
	*stack.OutgoingConsumerStack
	ConsumerBeacon beacon.Beacon
}

WalletConsumer emulates wallet consumer from bs-demo.

func NewWalletConsumer

func NewWalletConsumer(beacon beacon.Beacon) WalletConsumer

NewWalletConsumer creates a WalletConsumer from a beacon.Beacon and initializes event handlers.

Jump to

Keyboard shortcuts

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