Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressesService ¶
type AddressesService interface {
Create(ctx context.Context, newAddress *addressesmodels.NewAddress) error
}
AddressesService is an interface for addresses service
type Cache ¶
type Cache interface {
GetModel(ctx context.Context, key string, model interface{}) error
SetModel(ctx context.Context, key string, model interface{}, ttl time.Duration, dependencies ...string) error
}
Cache is an interface that defines the methods to interact with a cache.
type ClientInterface ¶
type ClientInterface = paymail.ClientInterface
ClientInterface is an interface for the paymail client
type ContactsService ¶
type ContactsService interface {
AddContactRequest(ctx context.Context, fullName, paymail, userID string) (*contactsmodels.Contact, error)
}
ContactsService is an interface for contacts service
type MerkleRootsVerifier ¶
type MerkleRootsVerifier interface {
VerifyMerkleRoots(ctx context.Context, merkleRoots []*spv.MerkleRootConfirmationRequestItem) (bool, error)
}
MerkleRootsVerifier is an interface for verifying merkle roots
type PayloadFormat ¶
type PayloadFormat uint32
PayloadFormat is the format of the paymail payload
const ( BasicPaymailPayloadFormat PayloadFormat = iota BeefPaymailPayloadFormat )
Types of Paymail payload formats
func (PayloadFormat) String ¶
func (format PayloadFormat) String() string
type PaymailsService ¶
type PaymailsService interface {
Find(ctx context.Context, alias, domain string) (*paymailsmodels.Paymail, error)
}
PaymailsService is an interface for paymails service
type ServiceClient ¶
type ServiceClient interface {
GetSanitizedPaymail(addr string) (*paymail.SanitisedPaymail, error)
GetCapabilities(ctx context.Context, domain string) (*paymail.CapabilitiesPayload, error)
GetP2PDestinations(ctx context.Context, address *paymail.SanitisedPaymail, satoshis bsv.Satoshis) (*paymail.PaymentDestinationPayload, error)
GetP2P(ctx context.Context, domain string) (success bool, p2pDestinationURL, p2pSubmitTxURL string, format PayloadFormat)
StartP2PTransaction(alias, domain, p2pDestinationURL string, satoshis uint64) (*paymail.PaymentDestinationPayload, error)
GetPkiForPaymail(ctx context.Context, sPaymail *paymail.SanitisedPaymail) (*paymail.PKIResponse, error)
AddContactRequest(ctx context.Context, receiverPaymail *paymail.SanitisedPaymail, contactData *paymail.PikeContactRequestPayload) (*paymail.PikeContactRequestResponse, error)
Notify(ctx context.Context, address string, p2pMetadata *paymail.P2PMetaData, reference string, tx *trx.Transaction) error
}
ServiceClient is a service that aims to make easier paymail operations.
func NewServiceClient ¶
func NewServiceClient(cache Cache, paymailClient ClientInterface, log zerolog.Logger) ServiceClient
NewServiceClient creates a new paymail service client
type TxRecorder ¶
type TxRecorder interface {
RecordPaymailTransaction(ctx context.Context, tx *trx.Transaction, senderPaymail, receiverPaymail string) error
}
TxRecorder is an interface for recording transactions
type UsersService ¶
type UsersService interface {
GetPubKey(ctx context.Context, userID string) (*primitives.PublicKey, error)
}
UsersService is an interface for users service