SwishClient - adonisv79/swish-protocol GitHub Wiki
Introduction
The SwishClientclass is the blueprint for creating a client which utilizes the swish transaction protocol for connecting to a swish compliant service. This can be basically any client whether ran from a desktop device, a server or from the WEB client.
Property(ies)
- SessionId (string) - Gets the current client session id
Functions
generateHandshake
Generates a new handshake request and retrieve the next generated SWISH header values
encryptRequest
Encrypts a request body and retrieve the next generated SWISH header values
Parameters
- body (BinaryLike | object) - The request body to encrypt
handleHandshakeResponse
Handle the response from the SWISH service and stores the next pub key in the chain
- options(SwishPackage) - The swish object containing the swish headers and body
decryptResponse
Decrypt the encrypted response and stores the next pub key in the chain
- options(SwishPackage) - The swish object containing the swish headers and body