Documentation
¶
Overview ¶
Package api provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.0 DO NOT EDIT.
Index ¶
- Constants
- type Access
- type AccessIncoming
- type AccessIncomingActions
- type AccessIncomingType
- type AccessItem
- func (t AccessItem) AsAccessIncoming() (AccessIncoming, error)
- func (t AccessItem) AsAccessOutgoing() (AccessOutgoing, error)
- func (t AccessItem) AsAccessQuote() (AccessQuote, error)
- func (t *AccessItem) FromAccessIncoming(v AccessIncoming) error
- func (t *AccessItem) FromAccessOutgoing(v AccessOutgoing) error
- func (t *AccessItem) FromAccessQuote(v AccessQuote) error
- func (t AccessItem) MarshalJSON() ([]byte, error)
- func (t *AccessItem) MergeAccessIncoming(v AccessIncoming) error
- func (t *AccessItem) MergeAccessOutgoing(v AccessOutgoing) error
- func (t *AccessItem) MergeAccessQuote(v AccessQuote) error
- func (t *AccessItem) UnmarshalJSON(b []byte) error
- type AccessOutgoing
- type AccessOutgoingActions
- type AccessOutgoingType
- type AccessQuote
- type AccessQuoteActions
- type AccessQuoteType
- type AccessToken
- type AccessTokenRequest
- type Amount
- type Client
- func (t Client) AsClientDirectedIdentity() (ClientDirectedIdentity, error)
- func (t Client) AsClientWalletAddress() (ClientWalletAddress, error)
- func (t Client) AsClientWalletAddressString() (ClientWalletAddressString, error)
- func (t *Client) FromClientDirectedIdentity(v ClientDirectedIdentity) error
- func (t *Client) FromClientWalletAddress(v ClientWalletAddress) error
- func (t *Client) FromClientWalletAddressString(v ClientWalletAddressString) error
- func (t Client) MarshalJSON() ([]byte, error)
- func (t *Client) MergeClientDirectedIdentity(v ClientDirectedIdentity) error
- func (t *Client) MergeClientWalletAddress(v ClientWalletAddress) error
- func (t *Client) MergeClientWalletAddressString(v ClientWalletAddressString) error
- func (t *Client) UnmarshalJSON(b []byte) error
- type ClientDirectedIdentity
- type ClientWalletAddress
- type ClientWalletAddressString
- type ContinuationRequest
- type Continue
- type ErrorInvalidClient
- type ErrorInvalidClientErrorCode
- type ErrorInvalidContinuation
- type ErrorInvalidContinuationErrorCode
- type ErrorInvalidRequest
- type ErrorInvalidRequestErrorCode
- type ErrorInvalidRotation
- type ErrorInvalidRotationErrorCode
- type ErrorRequestDenied
- type ErrorRequestDeniedErrorCode
- type ErrorTooFast
- type ErrorTooFastErrorCode
- type GrantRequest
- func (t GrantRequest) AsGrantRequestWithAccessToken() (GrantRequestWithAccessToken, error)
- func (t GrantRequest) AsGrantRequestWithSubject() (GrantRequestWithSubject, error)
- func (t *GrantRequest) FromGrantRequestWithAccessToken(v GrantRequestWithAccessToken) error
- func (t *GrantRequest) FromGrantRequestWithSubject(v GrantRequestWithSubject) error
- func (t GrantRequest) MarshalJSON() ([]byte, error)
- func (t *GrantRequest) MergeGrantRequestWithAccessToken(v GrantRequestWithAccessToken) error
- func (t *GrantRequest) MergeGrantRequestWithSubject(v GrantRequestWithSubject) error
- func (t *GrantRequest) UnmarshalJSON(b []byte) error
- type GrantRequestWithAccessToken
- type GrantRequestWithSubject
- type InteractRequest
- type InteractRequestFinishMethod
- type InteractRequestStart
- type InteractResponse
- type Interval
- type JsonWebKey
- type JsonWebKeyAlg
- type JsonWebKeyCrv
- type JsonWebKeyKty
- type JsonWebKeyUse
- type LimitsOutgoing
- func (t LimitsOutgoing) AsLimitsOutgoingDebitAmount() (LimitsOutgoingDebitAmount, error)
- func (t LimitsOutgoing) AsLimitsOutgoingNoAmount() (LimitsOutgoingNoAmount, error)
- func (t LimitsOutgoing) AsLimitsOutgoingReceiveAmount() (LimitsOutgoingReceiveAmount, error)
- func (t *LimitsOutgoing) FromLimitsOutgoingDebitAmount(v LimitsOutgoingDebitAmount) error
- func (t *LimitsOutgoing) FromLimitsOutgoingNoAmount(v LimitsOutgoingNoAmount) error
- func (t *LimitsOutgoing) FromLimitsOutgoingReceiveAmount(v LimitsOutgoingReceiveAmount) error
- func (t LimitsOutgoing) MarshalJSON() ([]byte, error)
- func (t *LimitsOutgoing) MergeLimitsOutgoingDebitAmount(v LimitsOutgoingDebitAmount) error
- func (t *LimitsOutgoing) MergeLimitsOutgoingNoAmount(v LimitsOutgoingNoAmount) error
- func (t *LimitsOutgoing) MergeLimitsOutgoingReceiveAmount(v LimitsOutgoingReceiveAmount) error
- func (t *LimitsOutgoing) UnmarshalJSON(b []byte) error
- type LimitsOutgoingDebitAmount
- type LimitsOutgoingNoAmount
- type LimitsOutgoingReceiveAmount
- type PostContinueJSONRequestBody
- type PostRequestJSONRequestBody
- type Receiver
- type Subject
- type SubjectSubIdsFormat
Constants ¶
const (
GNAPScopes = "GNAP.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Access ¶
type Access = []AccessItem
Access A description of the rights associated with this access token.
type AccessIncoming ¶
type AccessIncoming struct {
// Actions The types of actions the client instance will take at the RS as an array of strings.
Actions []AccessIncomingActions `json:"actions"`
// Identifier A string identifier indicating a specific resource at the RS.
Identifier *string `json:"identifier,omitempty"`
// Type The type of resource request as a string. This field defines which other fields are allowed in the request object.
Type AccessIncomingType `json:"type"`
}
AccessIncoming defines model for access-incoming.
type AccessIncomingActions ¶
type AccessIncomingActions string
AccessIncomingActions defines model for AccessIncoming.Actions.
const ( AccessIncomingActionsComplete AccessIncomingActions = "complete" AccessIncomingActionsCreate AccessIncomingActions = "create" AccessIncomingActionsList AccessIncomingActions = "list" AccessIncomingActionsListAll AccessIncomingActions = "list-all" AccessIncomingActionsRead AccessIncomingActions = "read" AccessIncomingActionsReadAll AccessIncomingActions = "read-all" )
Defines values for AccessIncomingActions.
type AccessIncomingType ¶
type AccessIncomingType string
AccessIncomingType The type of resource request as a string. This field defines which other fields are allowed in the request object.
const (
IncomingPayment AccessIncomingType = "incoming-payment"
)
Defines values for AccessIncomingType.
type AccessItem ¶
type AccessItem struct {
// contains filtered or unexported fields
}
AccessItem The access associated with the access token is described using objects that each contain multiple dimensions of access.
func (AccessItem) AsAccessIncoming ¶
func (t AccessItem) AsAccessIncoming() (AccessIncoming, error)
AsAccessIncoming returns the union data inside the AccessItem as a AccessIncoming
func (AccessItem) AsAccessOutgoing ¶
func (t AccessItem) AsAccessOutgoing() (AccessOutgoing, error)
AsAccessOutgoing returns the union data inside the AccessItem as a AccessOutgoing
func (AccessItem) AsAccessQuote ¶
func (t AccessItem) AsAccessQuote() (AccessQuote, error)
AsAccessQuote returns the union data inside the AccessItem as a AccessQuote
func (*AccessItem) FromAccessIncoming ¶
func (t *AccessItem) FromAccessIncoming(v AccessIncoming) error
FromAccessIncoming overwrites any union data inside the AccessItem as the provided AccessIncoming
func (*AccessItem) FromAccessOutgoing ¶
func (t *AccessItem) FromAccessOutgoing(v AccessOutgoing) error
FromAccessOutgoing overwrites any union data inside the AccessItem as the provided AccessOutgoing
func (*AccessItem) FromAccessQuote ¶
func (t *AccessItem) FromAccessQuote(v AccessQuote) error
FromAccessQuote overwrites any union data inside the AccessItem as the provided AccessQuote
func (AccessItem) MarshalJSON ¶
func (t AccessItem) MarshalJSON() ([]byte, error)
func (*AccessItem) MergeAccessIncoming ¶
func (t *AccessItem) MergeAccessIncoming(v AccessIncoming) error
MergeAccessIncoming performs a merge with any union data inside the AccessItem, using the provided AccessIncoming
func (*AccessItem) MergeAccessOutgoing ¶
func (t *AccessItem) MergeAccessOutgoing(v AccessOutgoing) error
MergeAccessOutgoing performs a merge with any union data inside the AccessItem, using the provided AccessOutgoing
func (*AccessItem) MergeAccessQuote ¶
func (t *AccessItem) MergeAccessQuote(v AccessQuote) error
MergeAccessQuote performs a merge with any union data inside the AccessItem, using the provided AccessQuote
func (*AccessItem) UnmarshalJSON ¶
func (t *AccessItem) UnmarshalJSON(b []byte) error
type AccessOutgoing ¶
type AccessOutgoing struct {
// Actions The types of actions the client instance will take at the RS as an array of strings.
Actions []AccessOutgoingActions `json:"actions"`
// Identifier A string identifier indicating a specific resource at the RS.
Identifier string `json:"identifier"`
// Limits Open Payments specific property that defines the limits under which outgoing payments can be created.
Limits *LimitsOutgoing `json:"limits,omitempty"`
// Type The type of resource request as a string. This field defines which other fields are allowed in the request object.
Type AccessOutgoingType `json:"type"`
}
AccessOutgoing defines model for access-outgoing.
type AccessOutgoingActions ¶
type AccessOutgoingActions string
AccessOutgoingActions defines model for AccessOutgoing.Actions.
const ( AccessOutgoingActionsCreate AccessOutgoingActions = "create" AccessOutgoingActionsList AccessOutgoingActions = "list" AccessOutgoingActionsListAll AccessOutgoingActions = "list-all" AccessOutgoingActionsRead AccessOutgoingActions = "read" AccessOutgoingActionsReadAll AccessOutgoingActions = "read-all" )
Defines values for AccessOutgoingActions.
type AccessOutgoingType ¶
type AccessOutgoingType string
AccessOutgoingType The type of resource request as a string. This field defines which other fields are allowed in the request object.
const (
OutgoingPayment AccessOutgoingType = "outgoing-payment"
)
Defines values for AccessOutgoingType.
type AccessQuote ¶
type AccessQuote struct {
// Actions The types of actions the client instance will take at the RS as an array of strings.
Actions []AccessQuoteActions `json:"actions"`
// Type The type of resource request as a string. This field defines which other fields are allowed in the request object.
Type AccessQuoteType `json:"type"`
}
AccessQuote defines model for access-quote.
type AccessQuoteActions ¶
type AccessQuoteActions string
AccessQuoteActions defines model for AccessQuote.Actions.
const ( Create AccessQuoteActions = "create" Read AccessQuoteActions = "read" ReadAll AccessQuoteActions = "read-all" )
Defines values for AccessQuoteActions.
type AccessQuoteType ¶
type AccessQuoteType string
AccessQuoteType The type of resource request as a string. This field defines which other fields are allowed in the request object.
const (
Quote AccessQuoteType = "quote"
)
Defines values for AccessQuoteType.
type AccessToken ¶
type AccessToken struct {
// Access A description of the rights associated with this access token.
Access Access `json:"access"`
// ExpiresIn The number of seconds in which the access will expire. The client instance MUST NOT use the access token past this time. An RS MUST NOT accept an access token past this time.
ExpiresIn *int `json:"expires_in,omitempty"`
// Manage The management URI for this access token. This URI MUST NOT include the access token value and SHOULD be different for each access token issued in a request.
Manage string `json:"manage"`
// Value The value of the access token as a string. The value is opaque to the client instance. The value SHOULD be limited to ASCII characters to facilitate transmission over HTTP headers within other protocols without requiring additional encoding.
Value string `json:"value"`
}
AccessToken A single access token or set of access tokens that the client instance can use to call the RS on behalf of the RO.
type AccessTokenRequest ¶
type AccessTokenRequest struct {
// Access A description of the rights associated with this access token.
Access Access `json:"access"`
}
AccessTokenRequest The requested access permissions for the grant.
type Amount ¶
type Amount struct {
// AssetCode The assetCode is a code that indicates the underlying asset. An ISO4217 currency code should be used whenever possible. The ISO4217 representation of the US Dollar is USD.
AssetCode string `json:"assetCode"`
// AssetScale The number of decimal places that defines the scale of the smallest divisible unit for the given asset code. It determines how an integer amount is scaled to derive the actual monetary value. For example, USD has an asset scale of 2 with the smallest unit being 0.01. An integer amount of `1000` with an `assetCode` of `USD` and `assetScale` of `2` translates to $10.00.
AssetScale int `json:"assetScale"`
// Value The value is an unsigned 64-bit integer amount, represented as a string.
Value string `json:"value"`
}
Amount defines model for amount.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client Client identification for grant requests.
When sending a non-continuation request to the AS, the client instance MUST identify itself by including the client field of the request and by signing the request.
Can be either: - A wallet address string (backwards compatible format) - An object with either `jwk` (for directed identity) or `walletAddress` (mutually exclusive)
When using a wallet address string or the `walletAddress` property: A JSON Web Key Set document, including the public key that the client instance will use to protect this request and any continuation requests at the AS and any user-facing information about the client instance used in interactions, MUST be available at the wallet address + `/jwks.json` url.
When using the `jwk` property (directed identity approach): The client instance provides its public key directly in the request, eliminating the need for the AS to fetch it from a wallet address. This approach enhances privacy by not requiring the client to expose a persistent wallet address identifier. The `jwk` property can only be used for non-interactive grant requests (i.e.: incoming payments).
If sending a grant initiation request that requires RO interaction, the wallet address MUST serve necessary client display information.
func (Client) AsClientDirectedIdentity ¶
func (t Client) AsClientDirectedIdentity() (ClientDirectedIdentity, error)
AsClientDirectedIdentity returns the union data inside the Client as a ClientDirectedIdentity
func (Client) AsClientWalletAddress ¶
func (t Client) AsClientWalletAddress() (ClientWalletAddress, error)
AsClientWalletAddress returns the union data inside the Client as a ClientWalletAddress
func (Client) AsClientWalletAddressString ¶
func (t Client) AsClientWalletAddressString() (ClientWalletAddressString, error)
AsClientWalletAddressString returns the union data inside the Client as a ClientWalletAddressString
func (*Client) FromClientDirectedIdentity ¶
func (t *Client) FromClientDirectedIdentity(v ClientDirectedIdentity) error
FromClientDirectedIdentity overwrites any union data inside the Client as the provided ClientDirectedIdentity
func (*Client) FromClientWalletAddress ¶
func (t *Client) FromClientWalletAddress(v ClientWalletAddress) error
FromClientWalletAddress overwrites any union data inside the Client as the provided ClientWalletAddress
func (*Client) FromClientWalletAddressString ¶
func (t *Client) FromClientWalletAddressString(v ClientWalletAddressString) error
FromClientWalletAddressString overwrites any union data inside the Client as the provided ClientWalletAddressString
func (Client) MarshalJSON ¶
func (*Client) MergeClientDirectedIdentity ¶
func (t *Client) MergeClientDirectedIdentity(v ClientDirectedIdentity) error
MergeClientDirectedIdentity performs a merge with any union data inside the Client, using the provided ClientDirectedIdentity
func (*Client) MergeClientWalletAddress ¶
func (t *Client) MergeClientWalletAddress(v ClientWalletAddress) error
MergeClientWalletAddress performs a merge with any union data inside the Client, using the provided ClientWalletAddress
func (*Client) MergeClientWalletAddressString ¶
func (t *Client) MergeClientWalletAddressString(v ClientWalletAddressString) error
MergeClientWalletAddressString performs a merge with any union data inside the Client, using the provided ClientWalletAddressString
func (*Client) UnmarshalJSON ¶
type ClientDirectedIdentity ¶
type ClientDirectedIdentity struct {
// Jwk A JWK representation of an Ed25519 Public Key
Jwk JsonWebKey `json:"jwk"`
}
ClientDirectedIdentity defines model for client-directed-identity.
type ClientWalletAddress ¶
type ClientWalletAddress struct {
// WalletAddress Wallet address of the client instance that is making this request.
WalletAddress string `json:"walletAddress"`
}
ClientWalletAddress defines model for client-wallet-address.
type ClientWalletAddressString ¶
type ClientWalletAddressString = string
ClientWalletAddressString DEPRECATED: This string format of the client wallet address is maintained only for backwards compatibility. Migrate to the object form with `jwk` or `walletAddress`.
type ContinuationRequest ¶
type ContinuationRequest struct {
// InteractRef The interaction reference generated for this
// interaction by the AS.
InteractRef *string `json:"interact_ref,omitempty"`
}
ContinuationRequest defines model for continuation-request.
type Continue ¶
type Continue struct {
// AccessToken A unique access token for continuing the request, called the "continuation access token".
AccessToken struct {
Value string `json:"value"`
} `json:"access_token"`
// Uri The URI at which the client instance can make continuation requests.
Uri string `json:"uri"`
// Wait The amount of time in integer seconds the client instance MUST wait after receiving this request continuation response and calling the continuation URI.
Wait *int `json:"wait,omitempty"`
}
Continue If the AS determines that the request can be continued with additional requests, it responds with the continue field.
type ErrorInvalidClient ¶
type ErrorInvalidClient struct {
Error *struct {
Code *ErrorInvalidClientErrorCode `json:"code,omitempty"`
Description *string `json:"description,omitempty"`
} `json:"error,omitempty"`
}
ErrorInvalidClient defines model for error-invalid-client.
type ErrorInvalidClientErrorCode ¶
type ErrorInvalidClientErrorCode string
ErrorInvalidClientErrorCode defines model for ErrorInvalidClient.Error.Code.
const (
InvalidClient ErrorInvalidClientErrorCode = "invalid_client"
)
Defines values for ErrorInvalidClientErrorCode.
type ErrorInvalidContinuation ¶
type ErrorInvalidContinuation struct {
Error *struct {
Code *ErrorInvalidContinuationErrorCode `json:"code,omitempty"`
Description *string `json:"description,omitempty"`
} `json:"error,omitempty"`
}
ErrorInvalidContinuation defines model for error-invalid-continuation.
type ErrorInvalidContinuationErrorCode ¶
type ErrorInvalidContinuationErrorCode string
ErrorInvalidContinuationErrorCode defines model for ErrorInvalidContinuation.Error.Code.
const (
InvalidContinuation ErrorInvalidContinuationErrorCode = "invalid_continuation"
)
Defines values for ErrorInvalidContinuationErrorCode.
type ErrorInvalidRequest ¶
type ErrorInvalidRequest struct {
Error *struct {
Code *ErrorInvalidRequestErrorCode `json:"code,omitempty"`
Description *string `json:"description,omitempty"`
} `json:"error,omitempty"`
}
ErrorInvalidRequest defines model for error-invalid-request.
type ErrorInvalidRequestErrorCode ¶
type ErrorInvalidRequestErrorCode string
ErrorInvalidRequestErrorCode defines model for ErrorInvalidRequest.Error.Code.
const (
InvalidRequest ErrorInvalidRequestErrorCode = "invalid_request"
)
Defines values for ErrorInvalidRequestErrorCode.
type ErrorInvalidRotation ¶
type ErrorInvalidRotation struct {
Error *struct {
Code *ErrorInvalidRotationErrorCode `json:"code,omitempty"`
Description *string `json:"description,omitempty"`
} `json:"error,omitempty"`
}
ErrorInvalidRotation defines model for error-invalid-rotation.
type ErrorInvalidRotationErrorCode ¶
type ErrorInvalidRotationErrorCode string
ErrorInvalidRotationErrorCode defines model for ErrorInvalidRotation.Error.Code.
const (
InvalidRotation ErrorInvalidRotationErrorCode = "invalid_rotation"
)
Defines values for ErrorInvalidRotationErrorCode.
type ErrorRequestDenied ¶
type ErrorRequestDenied struct {
Error *struct {
Code *ErrorRequestDeniedErrorCode `json:"code,omitempty"`
Description *string `json:"description,omitempty"`
} `json:"error,omitempty"`
}
ErrorRequestDenied defines model for error-request-denied.
type ErrorRequestDeniedErrorCode ¶
type ErrorRequestDeniedErrorCode string
ErrorRequestDeniedErrorCode defines model for ErrorRequestDenied.Error.Code.
const (
RequestDenied ErrorRequestDeniedErrorCode = "request_denied"
)
Defines values for ErrorRequestDeniedErrorCode.
type ErrorTooFast ¶
type ErrorTooFast struct {
Error *struct {
Code *ErrorTooFastErrorCode `json:"code,omitempty"`
Description *string `json:"description,omitempty"`
} `json:"error,omitempty"`
}
ErrorTooFast defines model for error-too-fast.
type ErrorTooFastErrorCode ¶
type ErrorTooFastErrorCode string
ErrorTooFastErrorCode defines model for ErrorTooFast.Error.Code.
const (
TooFast ErrorTooFastErrorCode = "too_fast"
)
Defines values for ErrorTooFastErrorCode.
type GrantRequest ¶
type GrantRequest struct {
// contains filtered or unexported fields
}
GrantRequest defines model for grant-request.
func (GrantRequest) AsGrantRequestWithAccessToken ¶
func (t GrantRequest) AsGrantRequestWithAccessToken() (GrantRequestWithAccessToken, error)
AsGrantRequestWithAccessToken returns the union data inside the GrantRequest as a GrantRequestWithAccessToken
func (GrantRequest) AsGrantRequestWithSubject ¶
func (t GrantRequest) AsGrantRequestWithSubject() (GrantRequestWithSubject, error)
AsGrantRequestWithSubject returns the union data inside the GrantRequest as a GrantRequestWithSubject
func (*GrantRequest) FromGrantRequestWithAccessToken ¶
func (t *GrantRequest) FromGrantRequestWithAccessToken(v GrantRequestWithAccessToken) error
FromGrantRequestWithAccessToken overwrites any union data inside the GrantRequest as the provided GrantRequestWithAccessToken
func (*GrantRequest) FromGrantRequestWithSubject ¶
func (t *GrantRequest) FromGrantRequestWithSubject(v GrantRequestWithSubject) error
FromGrantRequestWithSubject overwrites any union data inside the GrantRequest as the provided GrantRequestWithSubject
func (GrantRequest) MarshalJSON ¶
func (t GrantRequest) MarshalJSON() ([]byte, error)
func (*GrantRequest) MergeGrantRequestWithAccessToken ¶
func (t *GrantRequest) MergeGrantRequestWithAccessToken(v GrantRequestWithAccessToken) error
MergeGrantRequestWithAccessToken performs a merge with any union data inside the GrantRequest, using the provided GrantRequestWithAccessToken
func (*GrantRequest) MergeGrantRequestWithSubject ¶
func (t *GrantRequest) MergeGrantRequestWithSubject(v GrantRequestWithSubject) error
MergeGrantRequestWithSubject performs a merge with any union data inside the GrantRequest, using the provided GrantRequestWithSubject
func (*GrantRequest) UnmarshalJSON ¶
func (t *GrantRequest) UnmarshalJSON(b []byte) error
type GrantRequestWithAccessToken ¶
type GrantRequestWithAccessToken struct {
// AccessToken The requested access permissions for the grant.
AccessToken AccessTokenRequest `json:"access_token"`
// Client Client identification for grant requests.
//
// When sending a non-continuation request to the AS, the client instance MUST identify itself by including the client field of the request and by signing the request.
//
// Can be either:
// - A wallet address string (backwards compatible format)
// - An object with either `jwk` (for directed identity) or `walletAddress` (mutually exclusive)
//
// When using a wallet address string or the `walletAddress` property:
// A JSON Web Key Set document, including the public key that the client instance will use to protect this request and any continuation requests at the AS and any user-facing information about the client instance used in interactions, MUST be available at the wallet address + `/jwks.json` url.
//
// When using the `jwk` property (directed identity approach):
// The client instance provides its public key directly in the request, eliminating the need for the AS to fetch it from a wallet address. This approach enhances privacy by not requiring the client to expose a persistent wallet address identifier. The `jwk` property can only be used for non-interactive grant requests (i.e.: incoming payments).
//
// If sending a grant initiation request that requires RO interaction, the wallet address MUST serve necessary client display information.
Client Client `json:"client"`
// Interact The client instance declares the parameters for interaction methods that it can support using the interact field.
Interact *InteractRequest `json:"interact,omitempty"`
// Subject Information about the subject for which the client is requesting information.
Subject *Subject `json:"subject,omitempty"`
}
GrantRequestWithAccessToken defines model for grant-request-with-access-token.
type GrantRequestWithSubject ¶
type GrantRequestWithSubject struct {
// AccessToken The requested access permissions for the grant.
AccessToken *AccessTokenRequest `json:"access_token,omitempty"`
// Client Client identification for grant requests.
//
// When sending a non-continuation request to the AS, the client instance MUST identify itself by including the client field of the request and by signing the request.
//
// Can be either:
// - A wallet address string (backwards compatible format)
// - An object with either `jwk` (for directed identity) or `walletAddress` (mutually exclusive)
//
// When using a wallet address string or the `walletAddress` property:
// A JSON Web Key Set document, including the public key that the client instance will use to protect this request and any continuation requests at the AS and any user-facing information about the client instance used in interactions, MUST be available at the wallet address + `/jwks.json` url.
//
// When using the `jwk` property (directed identity approach):
// The client instance provides its public key directly in the request, eliminating the need for the AS to fetch it from a wallet address. This approach enhances privacy by not requiring the client to expose a persistent wallet address identifier. The `jwk` property can only be used for non-interactive grant requests (i.e.: incoming payments).
//
// If sending a grant initiation request that requires RO interaction, the wallet address MUST serve necessary client display information.
Client Client `json:"client"`
// Interact The client instance declares the parameters for interaction methods that it can support using the interact field.
Interact InteractRequest `json:"interact"`
// Subject Information about the subject for which the client is requesting information.
Subject Subject `json:"subject"`
}
GrantRequestWithSubject defines model for grant-request-with-subject.
type InteractRequest ¶
type InteractRequest struct {
// Finish Indicates how the client instance can receive an indication that interaction has finished at the AS.
Finish *struct {
// Method The callback method that the AS will use to contact the client instance.
Method InteractRequestFinishMethod `json:"method"`
// Nonce Unique value to be used in the calculation of the "hash" query parameter sent to the callback URI, must be sufficiently random to be unguessable by an attacker. MUST be generated by the client instance as a unique value for this request.
Nonce string `json:"nonce"`
// Uri Indicates the URI that the AS will either send the RO to after interaction or send an HTTP POST request.
Uri string `json:"uri"`
} `json:"finish,omitempty"`
// Start Indicates how the client instance can start an interaction.
Start []InteractRequestStart `json:"start"`
}
InteractRequest The client instance declares the parameters for interaction methods that it can support using the interact field.
type InteractRequestFinishMethod ¶
type InteractRequestFinishMethod string
InteractRequestFinishMethod The callback method that the AS will use to contact the client instance.
const (
InteractRequestFinishMethodRedirect InteractRequestFinishMethod = "redirect"
)
Defines values for InteractRequestFinishMethod.
type InteractRequestStart ¶
type InteractRequestStart string
InteractRequestStart defines model for InteractRequest.Start.
const (
InteractRequestStartRedirect InteractRequestStart = "redirect"
)
Defines values for InteractRequestStart.
type InteractResponse ¶
type InteractResponse struct {
// Finish Unique key to secure the callback.
Finish string `json:"finish"`
// Redirect The URI to direct the end user to.
Redirect string `json:"redirect"`
}
InteractResponse defines model for interact-response.
type Interval ¶
type Interval = string
Interval [ISO8601 repeating interval](https://en.wikipedia.org/wiki/ISO_8601#Repeating_intervals)
type JsonWebKey ¶
type JsonWebKey struct {
// Alg The cryptographic algorithm family used with the key. The only allowed value is `EdDSA`.
Alg JsonWebKeyAlg `json:"alg"`
// Crv The cryptographic curve used with the key. This parameter identifies the elliptic curve (for EC keys) or the Edwards curve (for OKP keys). The only allowed value is `Ed25519`.
Crv JsonWebKeyCrv `json:"crv"`
Kid string `json:"kid"`
Kty JsonWebKeyKty `json:"kty"`
Use *JsonWebKeyUse `json:"use,omitempty"`
// X The base64 url-encoded public key.
X string `json:"x"`
}
JsonWebKey A JWK representation of an Ed25519 Public Key
type JsonWebKeyAlg ¶
type JsonWebKeyAlg string
JsonWebKeyAlg The cryptographic algorithm family used with the key. The only allowed value is `EdDSA`.
const (
EdDSA JsonWebKeyAlg = "EdDSA"
)
Defines values for JsonWebKeyAlg.
type JsonWebKeyCrv ¶
type JsonWebKeyCrv string
JsonWebKeyCrv The cryptographic curve used with the key. This parameter identifies the elliptic curve (for EC keys) or the Edwards curve (for OKP keys). The only allowed value is `Ed25519`.
const (
Ed25519 JsonWebKeyCrv = "Ed25519"
)
Defines values for JsonWebKeyCrv.
type JsonWebKeyKty ¶
type JsonWebKeyKty string
JsonWebKeyKty defines model for JsonWebKey.Kty.
const (
OKP JsonWebKeyKty = "OKP"
)
Defines values for JsonWebKeyKty.
type JsonWebKeyUse ¶
type JsonWebKeyUse string
JsonWebKeyUse defines model for JsonWebKey.Use.
const (
Sig JsonWebKeyUse = "sig"
)
Defines values for JsonWebKeyUse.
type LimitsOutgoing ¶
type LimitsOutgoing struct {
// contains filtered or unexported fields
}
LimitsOutgoing Open Payments specific property that defines the limits under which outgoing payments can be created.
func (LimitsOutgoing) AsLimitsOutgoingDebitAmount ¶
func (t LimitsOutgoing) AsLimitsOutgoingDebitAmount() (LimitsOutgoingDebitAmount, error)
AsLimitsOutgoingDebitAmount returns the union data inside the LimitsOutgoing as a LimitsOutgoingDebitAmount
func (LimitsOutgoing) AsLimitsOutgoingNoAmount ¶
func (t LimitsOutgoing) AsLimitsOutgoingNoAmount() (LimitsOutgoingNoAmount, error)
AsLimitsOutgoingNoAmount returns the union data inside the LimitsOutgoing as a LimitsOutgoingNoAmount
func (LimitsOutgoing) AsLimitsOutgoingReceiveAmount ¶
func (t LimitsOutgoing) AsLimitsOutgoingReceiveAmount() (LimitsOutgoingReceiveAmount, error)
AsLimitsOutgoingReceiveAmount returns the union data inside the LimitsOutgoing as a LimitsOutgoingReceiveAmount
func (*LimitsOutgoing) FromLimitsOutgoingDebitAmount ¶
func (t *LimitsOutgoing) FromLimitsOutgoingDebitAmount(v LimitsOutgoingDebitAmount) error
FromLimitsOutgoingDebitAmount overwrites any union data inside the LimitsOutgoing as the provided LimitsOutgoingDebitAmount
func (*LimitsOutgoing) FromLimitsOutgoingNoAmount ¶
func (t *LimitsOutgoing) FromLimitsOutgoingNoAmount(v LimitsOutgoingNoAmount) error
FromLimitsOutgoingNoAmount overwrites any union data inside the LimitsOutgoing as the provided LimitsOutgoingNoAmount
func (*LimitsOutgoing) FromLimitsOutgoingReceiveAmount ¶
func (t *LimitsOutgoing) FromLimitsOutgoingReceiveAmount(v LimitsOutgoingReceiveAmount) error
FromLimitsOutgoingReceiveAmount overwrites any union data inside the LimitsOutgoing as the provided LimitsOutgoingReceiveAmount
func (LimitsOutgoing) MarshalJSON ¶
func (t LimitsOutgoing) MarshalJSON() ([]byte, error)
func (*LimitsOutgoing) MergeLimitsOutgoingDebitAmount ¶
func (t *LimitsOutgoing) MergeLimitsOutgoingDebitAmount(v LimitsOutgoingDebitAmount) error
MergeLimitsOutgoingDebitAmount performs a merge with any union data inside the LimitsOutgoing, using the provided LimitsOutgoingDebitAmount
func (*LimitsOutgoing) MergeLimitsOutgoingNoAmount ¶
func (t *LimitsOutgoing) MergeLimitsOutgoingNoAmount(v LimitsOutgoingNoAmount) error
MergeLimitsOutgoingNoAmount performs a merge with any union data inside the LimitsOutgoing, using the provided LimitsOutgoingNoAmount
func (*LimitsOutgoing) MergeLimitsOutgoingReceiveAmount ¶
func (t *LimitsOutgoing) MergeLimitsOutgoingReceiveAmount(v LimitsOutgoingReceiveAmount) error
MergeLimitsOutgoingReceiveAmount performs a merge with any union data inside the LimitsOutgoing, using the provided LimitsOutgoingReceiveAmount
func (*LimitsOutgoing) UnmarshalJSON ¶
func (t *LimitsOutgoing) UnmarshalJSON(b []byte) error
type LimitsOutgoingDebitAmount ¶
type LimitsOutgoingDebitAmount struct {
DebitAmount Amount `json:"debitAmount"`
// Interval [ISO8601 repeating interval](https://en.wikipedia.org/wiki/ISO_8601#Repeating_intervals)
Interval *Interval `json:"interval,omitempty"`
// Receiver The URL of the incoming payment that is being paid.
Receiver *Receiver `json:"receiver,omitempty"`
}
LimitsOutgoingDebitAmount defines model for limits-outgoing-debit-amount.
type LimitsOutgoingNoAmount ¶
type LimitsOutgoingNoAmount struct {
// Interval [ISO8601 repeating interval](https://en.wikipedia.org/wiki/ISO_8601#Repeating_intervals)
Interval *Interval `json:"interval,omitempty"`
// Receiver The URL of the incoming payment that is being paid.
Receiver *Receiver `json:"receiver,omitempty"`
}
LimitsOutgoingNoAmount defines model for limits-outgoing-no-amount.
type LimitsOutgoingReceiveAmount ¶
type LimitsOutgoingReceiveAmount struct {
// Interval [ISO8601 repeating interval](https://en.wikipedia.org/wiki/ISO_8601#Repeating_intervals)
Interval *Interval `json:"interval,omitempty"`
ReceiveAmount Amount `json:"receiveAmount"`
// Receiver The URL of the incoming payment that is being paid.
Receiver *Receiver `json:"receiver,omitempty"`
}
LimitsOutgoingReceiveAmount defines model for limits-outgoing-receive-amount.
type PostContinueJSONRequestBody ¶
type PostContinueJSONRequestBody = ContinuationRequest
PostContinueJSONRequestBody defines body for PostContinue for application/json ContentType.
type PostRequestJSONRequestBody ¶
type PostRequestJSONRequestBody = GrantRequest
PostRequestJSONRequestBody defines body for PostRequest for application/json ContentType.
type Subject ¶
type Subject struct {
// SubIds A list of subject identifiers.
SubIds []struct {
// Format The format of subject identifier that the client can accept.
Format SubjectSubIdsFormat `json:"format"`
// Id Specific identifier for the subject for which the client is requesting information.
Id string `json:"id"`
} `json:"sub_ids"`
}
Subject Information about the subject for which the client is requesting information.
type SubjectSubIdsFormat ¶
type SubjectSubIdsFormat string
SubjectSubIdsFormat The format of subject identifier that the client can accept.
const (
Uri SubjectSubIdsFormat = "uri"
)
Defines values for SubjectSubIdsFormat.