Versions in this module Expand all Collapse all v1 v1.0.1 Nov 9, 2023 v1.0.0 Nov 6, 2023 Changes in this version + const KinMintDecimals + const QuarksPerKin + var ErrInvalidCurrency = errors.New("currency is invalid") + var KinTokenMint = NewPublicKeyFromString("kinXdEcpDQeHPEuQnqmUgtYykqKGVFq6CeVX5iAHJq6") + func IsValidCurrency(currency string) bool + type Client struct + func NewWebClient() *Client + func (c *Client) CreatePaymentRequest(ctx context.Context, intent *PaymentRequestIntent, ...) (*CreatePaymentRequestResponse, error) + func (c *Client) GetIntentStatus(ctx context.Context, intentId string) (*GetIntentStateResponse, error) + type CodePayload struct + func NewCodePayload(kind CodePayloadType, currency CurrencyCode, amount float64, ...) (*CodePayload, error) + type CodePayloadType uint8 + const CodePayloadCash + const CodePayloadGiftCard + const CodePayloadPaymentRequest + type CreatePaymentRequestResponse struct + ClientSecret string + IntentId string + type CurrencyCode string + const AED + const AFN + const ALL + const AMD + const ANG + const AOA + const ARS + const AUD + const AWG + const AZN + const BAM + const BBD + const BDT + const BGN + const BHD + const BIF + const BMD + const BND + const BOB + const BRL + const BSD + const BTN + const BWP + const BYN + const BZD + const CAD + const CDF + const CHF + const CLP + const CNY + const COP + const CRC + const CUP + const CVE + const CZK + const DJF + const DKK + const DOP + const DZD + const EGP + const ERN + const ETB + const EUR + const FJD + const FKP + const GBP + const GEL + const GHS + const GIP + const GMD + const GNF + const GTQ + const GYD + const HKD + const HNL + const HRK + const HTG + const HUF + const IDR + const ILS + const INR + const IQD + const IRR + const ISK + const JMD + const JOD + const JPY + const KES + const KGS + const KHR + const KIN + const KMF + const KPW + const KRW + const KWD + const KYD + const KZT + const LAK + const LBP + const LKR + const LRD + const LYD + const MAD + const MDL + const MGA + const MKD + const MMK + const MNT + const MOP + const MRU + const MUR + const MVR + const MWK + const MXN + const MYR + const MZN + const NAD + const NGN + const NIO + const NOK + const NPR + const NZD + const OMR + const PAB + const PEN + const PGK + const PHP + const PKR + const PLN + const PYG + const QAR + const RON + const RSD + const RUB + const RWF + const SAR + const SBD + const SCR + const SDG + const SEK + const SGD + const SHP + const SLL + const SOS + const SRD + const SSP + const STN + const SYP + const SZL + const THB + const TJS + const TMT + const TND + const TOP + const TRY + const TTD + const TWD + const TZS + const UAH + const UGX + const USD + const UYU + const UZS + const VES + const VND + const VUV + const WST + const XAF + const XCD + const XOF + const XPF + const YER + const ZAR + const ZMW + type GetIntentStateResponse struct + Status IntentState + type IdempotencyKey [codePayloadNonceSize]byte + func GenerateIdempotencyKey() IdempotencyKey + func NewIdempotencyKeyFromClientSecret(data string) (IdempotencyKey, error) + func NewIdempotencyKeyFromSeed(seed string) IdempotencyKey + func (k IdempotencyKey) String() string + type IntentOption func(*optionalIntentParameters) + func WithIdempotencyKey(idempotencyKey IdempotencyKey) IntentOption + type IntentState string + const IntentStateConfirmed + const IntentStatePending + const IntentStateUnknown + type KeyPair struct + func GenerateKeyPair() (*KeyPair, error) + func GenerateRendezvousKey(p *CodePayload) (*KeyPair, error) + func NewKeyPairFromRawValue(rawValue ed25519.PrivateKey) (*KeyPair, error) + func NewKeyPairFromSeed(seed []byte) (*KeyPair, error) + func (k *KeyPair) GetPrivateKey() *PrivateKey + func (k *KeyPair) GetPublicKey() *PublicKey + func (k *KeyPair) Sign(message []byte) []byte + func (k *KeyPair) Verify(message, signature []byte) bool + type PaymentRequestIntent struct + func NewPaymentRequestIntent(currency CurrencyCode, amount float64, destination string, ...) (*PaymentRequestIntent, error) + func (p *PaymentRequestIntent) GetClientSecret() string + func (p *PaymentRequestIntent) GetIntentId() string + func (p *PaymentRequestIntent) GetRendezvousKey() *KeyPair + type PaymentRequestOption func(*optionalPaymentRequestParameters) + func WithWebhookUrl(webhookUrl string) PaymentRequestOption + type PrivateKey struct + func NewPrivateKeyFromBytes(value []byte) (*PrivateKey, error) + func NewPrivateKeyFromString(value string) (*PrivateKey, error) + func (k *PrivateKey) GetPublicKey() *PublicKey + func (k *PrivateKey) Sign(message []byte) []byte + func (k *PrivateKey) ToBase58() string + func (k *PrivateKey) ToBytes() ed25519.PrivateKey + type PublicKey struct + func NewPublicKeyFromBytes(value []byte) (*PublicKey, error) + func NewPublicKeyFromString(value string) (*PublicKey, error) + func (k *PublicKey) ToBase58() string + func (k *PublicKey) ToBytes() ed25519.PublicKey