import type { Transport, PageResult } from '@23blocks/contracts'; import type { AuthorizationCode, CreateAuthorizationCodeRequest, ValidateAuthorizationCodeRequest, UseAuthorizationCodeRequest, ListAuthorizationCodesParams } from '../types/authorization-code.js'; import type { Transaction } from '../types/transaction.js'; export interface AuthorizationCodesService { /** * List authorization codes with optional filtering. * @returns Paginated list of AuthorizationCode records with metadata. */ list(params?: ListAuthorizationCodesParams): Promise>; /** * Get a single authorization code by unique ID. * @returns The matching AuthorizationCode record. */ get(uniqueId: string): Promise; /** * Create a new authorization code for a wallet. * @returns The newly created AuthorizationCode record. */ create(data: CreateAuthorizationCodeRequest): Promise; /** * Validate an authorization code and amount. * @returns Object with `valid` boolean and the matching `authorizationCode` if valid. * @note Returns `{ valid: false }` on any validation error instead of throwing. */ validate(data: ValidateAuthorizationCodeRequest): Promise<{ valid: boolean; authorizationCode?: AuthorizationCode; }>; /** * Use an authorization code to execute a transaction. * @returns The resulting Transaction record. */ use(data: UseAuthorizationCodeRequest): Promise; /** * Invalidate an authorization code so it can no longer be used. * @returns The updated AuthorizationCode record with invalidated status. */ invalidate(uniqueId: string): Promise; } export declare function createAuthorizationCodesService(transport: Transport, _config: { apiKey: string; }): AuthorizationCodesService; //# sourceMappingURL=authorization-codes.service.d.ts.map