import { z } from 'mppx'; /** * Solana charge method — shared schema used by both server and client. * * Supports two settlement modes: * * - **Pull mode** (`type="transaction"`, default): Client signs the * transaction and sends the bytes to the server. The server broadcasts, * confirms, and verifies the transfer on-chain. * * - **Push mode** (`type="signature"`): Client broadcasts the transaction * itself and sends the confirmed signature. The server verifies on-chain. */ export declare const charge: { readonly intent: "charge"; readonly name: "solana"; readonly schema: { readonly credential: { readonly payload: z.ZodMiniObject<{ /** Base58-encoded transaction signature (when type="signature"). */ signature: z.ZodMiniOptional>; /** Base64-encoded serialized signed transaction (when type="transaction"). */ transaction: z.ZodMiniOptional>; /** Payload type: "transaction" (server broadcasts) or "signature" (client already broadcast). */ type: z.ZodMiniString; }, z.core.$strip>; }; readonly request: z.ZodMiniObject<{ /** Amount in smallest unit (lamports for SOL, base units for SPL tokens). */ amount: z.ZodMiniString; /** Identifies the unit for amount. "sol" (lowercase) for native SOL, or the token mint address for SPL tokens. */ currency: z.ZodMiniString; /** Human-readable memo describing the resource or service being paid for. */ description: z.ZodMiniOptional>; /** Merchant's reference (e.g., order ID, invoice number) for reconciliation. */ externalId: z.ZodMiniOptional>; methodDetails: z.ZodMiniObject<{ /** Token decimals (required for SPL token transfers). */ decimals: z.ZodMiniOptional>; /** If true, server pays transaction fees. Client must use the server's feePayerKey. */ feePayer: z.ZodMiniOptional>; /** Server's base58-encoded public key for fee payment. Present when feePayer is true. */ feePayerKey: z.ZodMiniOptional>; /** Solana network: mainnet, devnet, or localnet. */ network: z.ZodMiniOptional>; /** Server-provided base58-encoded recent blockhash. Saves the client an RPC round-trip. */ recentBlockhash: z.ZodMiniOptional>; /** Additional payment splits (max 8). Same asset as primary payment. */ splits: z.ZodMiniOptional; /** If true, the split recipient ATA must be created idempotently before payment. */ ataCreationRequired: z.ZodMiniOptional>; /** Optional memo for this split (max 566 bytes). */ memo: z.ZodMiniOptional>; /** Base58-encoded recipient of this split. */ recipient: z.ZodMiniString; }, z.core.$strip>>>; /** Token program address (TOKEN_PROGRAM or TOKEN_2022_PROGRAM). Defaults from the currency mint. */ tokenProgram: z.ZodMiniOptional>; }, z.core.$strip>; /** Base58-encoded recipient public key. */ recipient: z.ZodMiniString; }, z.core.$strip>; }; }; /** * Solana subscription method — shared schema used by both server and client. * * A subscription creates an on-chain delegation that lets the server pull * a fixed token amount once per billing period. Activation atomically * creates the delegation and executes the first-period charge. Subsequent * renewals are server-driven and require no HTTP round-trip. * * Period mapping: `day` → `periodCount * 24` hours, `week` → `periodCount * 168` * hours. `month` is rejected because the on-chain program uses fixed elapsed * seconds and cannot represent calendar-month cadence exactly. */ export declare const subscription: { readonly intent: "subscription"; readonly name: "solana"; readonly schema: { readonly credential: { readonly payload: z.ZodMiniObject<{ /** Base58 transaction signature (when type="signature"). */ signature: z.ZodMiniOptional>; /** Base64-encoded serialized activation transaction (when type="transaction"). */ transaction: z.ZodMiniOptional>; /** Payload type: "transaction" (server broadcasts) or "signature" (client already broadcast). */ type: z.ZodMiniString; }, z.core.$strip>; }; readonly request: z.ZodMiniObject<{ /** Per-period token amount in base units. */ amount: z.ZodMiniString; /** Base58 SPL token mint address. */ currency: z.ZodMiniString; /** Human-readable subscription description. */ description: z.ZodMiniOptional>; /** Merchant reference for the subscription. */ externalId: z.ZodMiniOptional>; methodDetails: z.ZodMiniObject<{ /** Token decimals. */ decimals: z.ZodMiniNumber; /** If true, server pays activation transaction fees. */ feePayer: z.ZodMiniOptional>; /** Server's base58 fee-payer pubkey. Required when feePayer is true. */ feePayerKey: z.ZodMiniOptional>; /** Base58 of the SPL token mint. Must equal the on-chain plan.mint. */ mint: z.ZodMiniString; /** Solana network: mainnet, devnet, or localnet. */ network: z.ZodMiniOptional>; /** Base58 of the on-chain Plan PDA. */ planId: z.ZodMiniString; /** Base58 of the subscriptions program ID. */ programId: z.ZodMiniOptional>; /** Base58 of the server's puller pubkey (must be in plan.pullers or plan.owner). */ puller: z.ZodMiniString; /** Pre-fetched recent blockhash to bind to the activation transaction. */ recentBlockhash: z.ZodMiniOptional>; /** Advisory distribution splits (on-chain split is governed by plan.destinations). */ splits: z.ZodMiniOptional; /** Split recipient public key. */ recipient: z.ZodMiniString; }, z.core.$strip>>>; /** Base58 of the SPL Token or Token-2022 program ID. */ tokenProgram: z.ZodMiniString; }, z.core.$strip>; /** Positive integer count of `periodUnit` values per billing period. */ periodCount: z.ZodMiniString; /** Billing period unit. The Solana profile supports `day` and `week` only. */ periodUnit: z.ZodMiniEnum<{ day: "day"; week: "week"; }>; /** Primary recipient's wallet pubkey (base58). */ recipient: z.ZodMiniString; /** RFC3339 expiry of the recurring authorization. */ subscriptionExpires: z.ZodMiniOptional>; }, z.core.$strip>; }; }; /** * Solana session method — shared schema used by both server and client. * * A session opens a payment channel or delegation once, then pays for later * deliveries with cumulative off-chain vouchers. */ export declare const session: { readonly intent: "session"; readonly name: "solana"; readonly schema: { readonly credential: { readonly payload: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{ /** Session lifecycle action. */ action: z.ZodMiniLiteral<"open">; /** SPL approved amount for pull mode. */ approvedAmount: z.ZodMiniOptional>; /** Public key authorized to sign vouchers for this session. */ authorizedSigner: z.ZodMiniString; /** Payment-channel address for push mode. */ channelId: z.ZodMiniOptional>; /** Deposit locked by the channel open, in base units. */ deposit: z.ZodMiniOptional>; /** Grace period used by the payment-channels close path. */ gracePeriod: z.ZodMiniOptional>; /** Pre-signed pull-mode initialization transaction. */ initMultiDelegateTx: z.ZodMiniOptional>; /** SPL mint locked in the channel. */ mint: z.ZodMiniOptional>; /** Session funding mode. */ mode: z.ZodMiniEnum<{ push: "push"; pull: "pull"; }>; /** Client wallet owner for pull mode. */ owner: z.ZodMiniOptional>; /** Primary channel payee. */ payee: z.ZodMiniOptional>; /** Client wallet funding the push-mode channel. */ payer: z.ZodMiniOptional>; /** Slot the push-mode open was built against (the channel `openSlot` PDA seed). */ recentSlot: z.ZodMiniOptional, z.ZodMiniNumber]>>; /** PDA salt used for the payment-channel address. */ salt: z.ZodMiniOptional, z.ZodMiniNumber]>>; /** On-chain transaction signature proving the open. */ signature: z.ZodMiniString; /** SPL token account used as the pull-mode session identifier. */ tokenAccount: z.ZodMiniOptional>; /** Signed transaction for operator/server broadcast. */ transaction: z.ZodMiniOptional>; /** Pre-signed pull-mode delegation cap update transaction. */ updateDelegationTx: z.ZodMiniOptional>; }, z.core.$strip>, z.ZodMiniObject<{ action: z.ZodMiniLiteral<"voucher">; voucher: z.ZodMiniObject<{ data: z.ZodMiniObject<{ /** Channel/session ID the voucher is bound to. */ channelId: z.ZodMiniString; /** Legacy wire alias for cumulativeAmount (the Rust mirror accepts both). */ cumulative: z.ZodMiniOptional>; /** Cumulative amount authorized in base units. */ cumulativeAmount: z.ZodMiniOptional>; /** Unix timestamp at which this voucher expires. */ expiresAt: z.ZodMiniNumber; /** Optional client-side voucher counter. Not included in signed bytes. */ nonce: z.ZodMiniOptional>; }, z.core.$strip>; /** Base58 Ed25519 signature over the canonical voucher bytes. */ signature: z.ZodMiniString; }, z.core.$strip>; }, z.core.$strip>, z.ZodMiniObject<{ action: z.ZodMiniLiteral<"commit">; deliveryId: z.ZodMiniString; voucher: z.ZodMiniObject<{ data: z.ZodMiniObject<{ /** Channel/session ID the voucher is bound to. */ channelId: z.ZodMiniString; /** Legacy wire alias for cumulativeAmount (the Rust mirror accepts both). */ cumulative: z.ZodMiniOptional>; /** Cumulative amount authorized in base units. */ cumulativeAmount: z.ZodMiniOptional>; /** Unix timestamp at which this voucher expires. */ expiresAt: z.ZodMiniNumber; /** Optional client-side voucher counter. Not included in signed bytes. */ nonce: z.ZodMiniOptional>; }, z.core.$strip>; /** Base58 Ed25519 signature over the canonical voucher bytes. */ signature: z.ZodMiniString; }, z.core.$strip>; }, z.core.$strip>, z.ZodMiniObject<{ action: z.ZodMiniLiteral<"topUp">; channelId: z.ZodMiniString; newDeposit: z.ZodMiniString; signature: z.ZodMiniString; }, z.core.$strip>, z.ZodMiniObject<{ action: z.ZodMiniLiteral<"close">; channelId: z.ZodMiniString; voucher: z.ZodMiniOptional; /** Legacy wire alias for cumulativeAmount (the Rust mirror accepts both). */ cumulative: z.ZodMiniOptional>; /** Cumulative amount authorized in base units. */ cumulativeAmount: z.ZodMiniOptional>; /** Unix timestamp at which this voucher expires. */ expiresAt: z.ZodMiniNumber; /** Optional client-side voucher counter. Not included in signed bytes. */ nonce: z.ZodMiniOptional>; }, z.core.$strip>; /** Base58 Ed25519 signature over the canonical voucher bytes. */ signature: z.ZodMiniString; }, z.core.$strip>>; }, z.core.$strip>], "action">; }; readonly request: z.ZodMiniObject<{ /** Maximum total amount the client may spend in this session, in base units. */ cap: z.ZodMiniString; /** Currency or SPL mint identifier. */ currency: z.ZodMiniString; /** Token decimals. Defaults to USDC-like 6 decimals server-side. */ decimals: z.ZodMiniOptional>; /** Human-readable memo for the session. */ description: z.ZodMiniOptional>; /** Merchant/session reference. */ externalId: z.ZodMiniOptional>; /** Minimum voucher increment, in base units. */ minVoucherDelta: z.ZodMiniOptional>; /** Supported funding modes. Omitted means push mode only. */ modes: z.ZodMiniOptional>>; /** Solana network: mainnet, devnet, or localnet. */ network: z.ZodMiniOptional>; /** Operator/server public key. */ operator: z.ZodMiniString; /** Payment-channels program ID. */ programId: z.ZodMiniOptional>; /** Voucher authority for pull-mode sessions. */ pullVoucherStrategy: z.ZodMiniOptional>; /** Server-provided recent blockhash. */ recentBlockhash: z.ZodMiniOptional>; /** Server-provided current slot used as the channel `openSlot` PDA seed. */ recentSlot: z.ZodMiniOptional, z.ZodMiniNumber]>>; /** Primary recipient for channel proceeds. */ recipient: z.ZodMiniString; /** Optional basis-point splits distributed at close. */ splits: z.ZodMiniOptional; /** Split recipient public key. */ recipient: z.ZodMiniString; }, z.core.$strip>>>; }, z.core.$strip>; }; }; //# sourceMappingURL=Methods.d.ts.map