seller

package
v0.49.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SellerLayer

type SellerLayer struct {
	layer.BaseLayer
	// nexuses's we're waiting to initialize
	WaitingForApp compat.WaitingForApp
	// nexus list by shared seed
	NexusBySharedSeed compat.NexusBySharedSeed

	// the seller nexus object
	SellerNexus *seller.SellerNexus
	// contains filtered or unexported fields
}

SellerLayer is meant to simulate the seller layer in the js seller app this struct should not be initialized directly, the NewSellerLayer() method below should be used instead

func NewSellerLayer

func NewSellerLayer() *SellerLayer

Create a new seller layer

func (*SellerLayer) AnnounceNexus

func (s *SellerLayer) AnnounceNexus(belowNexus nexus.Nexus)

initializes the handshake with the buyer nexus

func (*SellerLayer) HandleOpinionInvoiceRequest

func (s *SellerLayer) HandleOpinionInvoiceRequest(nx nexus.Nexus, itemId string, requestUuid string)

Calls the client supplied handleOpinionInvoiceRequest method if present

func (*SellerLayer) NexusWaitingForApp

func (s *SellerLayer) NexusWaitingForApp(seed *beacon.SharedSeed, sellerNexus nexus.Nexus)

sets the seller's status to waiting

func (*SellerLayer) RegisterAboveLayer

func (s *SellerLayer) RegisterAboveLayer(belowLayer layer.Layer)

set the on AnnounceNexus/RevokeNexus methods in belowLayer

func (*SellerLayer) SellerNowReadyFromApp

func (s *SellerLayer) SellerNowReadyFromApp()

sets the seller's status to ready (open store)

func (*SellerLayer) SetHandleOpinionInvoiceRequest

func (s *SellerLayer) SetHandleOpinionInvoiceRequest(request compat.HandleOpinionInvoiceRequest)

Sets the client supplied handleOpinionInvoiceRequest method. This method is null by default

func (*SellerLayer) SetHandleSellerInfoRequest

func (s *SellerLayer) SetHandleSellerInfoRequest(handler func() seller.SellerInfo)

Sets the client supplied handleSellerInfoRequest method. This method is null by default

func (*SellerLayer) SetupSellerNexus

func (s *SellerLayer) SetupSellerNexus(belowNexus nexus.Nexus) *seller.SellerNexus

Starts the seller nexus and initializes the callbacks

Jump to

Keyboard shortcuts

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