Documentation
¶
Overview ¶
Package chargeclient contains the Tempo charge client method for creating Payment Credentials that satisfy Tempo HTTP 402 Challenges. It is usually imported as charge alongside the generic client package.
Package chargeclient creates Tempo charge Credentials for MPP HTTP clients.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Signer signs Tempo transactions and proof payloads.
Signer *temposigner.Signer
// PrivateKey constructs Signer when Signer is nil.
PrivateKey string
// RPC overrides the Tempo JSON-RPC client used for signing flows.
RPC tempo.RPCClient
// RPCURL is used to build an RPC client when RPC is nil.
RPCURL string
// ChainID constrains the challenge to a specific Tempo chain when set.
ChainID int64
// ClientID is folded into automatically generated attribution memos.
ClientID string
// CredentialType selects transaction, hash, or proof credentials.
CredentialType tempo.CredentialType
}
Config configures a Tempo charge client method.
type Method ¶
type Method struct {
// contains filtered or unexported fields
}
Method implements Tempo charge credential creation for the generic MPP client.
func (*Method) CreateCredential ¶
func (m *Method) CreateCredential(ctx context.Context, challenge *mpp.Challenge) (*mpp.Credential, error)
CreateCredential turns a Tempo charge Challenge into a Tempo Credential.
Click to show internal directories.
Click to hide internal directories.