/** * @pwngh/economy-lab * * Copyright (c) Preston Neal * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */ import type { Ctx, Operation, Outcome } from '../contract.js'; import type { Unit } from '../ports.js'; /** * Charge the first month of a subscription and create its record: validate the price, post the * charge (seller earns, platform takes its fee), then save the `Subscription` the background * worker renews each later month. Returns `committed`, or a `rejected` outcome for a duplicate * active subscription (`ALREADY_SUBSCRIBED`) or a short spendable balance (`INSUFFICIENT_FUNDS`). * * @see {@link https://economy-lab-docs.pages.dev/economy/reference/operations/subscribe/ Subscribe} * for the first-month charge and renewal handoff. */ export declare function subscribe(operation: Operation, unit: Unit, ctx: Ctx): Promise;