import { AuthApiTransports } from "../../shared/transports.js"; import { PolyesterMutationOptions, PolyesterRequestOptions } from "../../shared/request-options.js"; import { SubaccountResolver } from "../subaccount-resolver.js"; import { PolyesterRealtime } from "../../realtime/types.js"; import { BaseSubscribeInput } from "../../shared/types.js"; import { AddressBook, AddressBookEntries, AddressBookEntry, AddressBookTag, AddressBookView, AddressBookViewInvalidated, CopyAddressBookEntryInput, CreateAddressBookEntryInput, CreateAddressBookTagInput, DeleteAddressBookEntryInput, DeleteAddressBookTagInput, GetAddressBookViewInput, InternalTransferWhitelistEntries, ListAddressBookEntriesInput, ListInternalTransferWhitelistEntriesInput, ListTransferCounterpartiesInput, ListTransferDestinationsInput, SubaccountScopedInput, TransferCounterparties, TransferDestinations, UpdateAddressBookEntryInput, UpdateAddressBookTagInput, WithdrawWhitelistView } from "./address-book.schemas.js"; //#region src/services/address-book/address-book.d.ts interface SubscribeViewInvalidationsInput extends BaseSubscribeInput { rootAccountPublicId: string; } /** * Manages saved transfer destinations, tags, whitelist views, and recent counterparties for root or subaccount-scoped address books. */ declare class AddressBookService { #private; constructor(transports: AuthApiTransports, realtime: PolyesterRealtime, resolver?: SubaccountResolver); /** * Returns the root and subaccount address books visible to the caller, including caller role and display metadata. */ listBooks(options?: PolyesterRequestOptions): Promise; /** * Returns saved address-book entries for the resolved subaccount scope, optionally filtered by external-chain or internal-account destination kind. */ listEntries(input?: ListAddressBookEntriesInput, options?: PolyesterRequestOptions): Promise<{ entries: AddressBookEntries; nextPageToken: string; }>; /** * Creates a saved external withdrawal or internal transfer destination in the resolved address book, optionally attaching existing tags and creating new tags in the same request. */ createEntry(input: CreateAddressBookEntryInput, options?: PolyesterMutationOptions): Promise; /** * Updates selected saved-destination metadata using optimistic concurrency, optionally creating and attaching tags in the same request. */ updateEntry(input: UpdateAddressBookEntryInput, options?: PolyesterMutationOptions): Promise; /** * Deletes one saved destination from the selected address book. */ deleteEntry(input: DeleteAddressBookEntryInput, options?: PolyesterMutationOptions): Promise; /** * Copies a saved destination into another visible root or subaccount address book. */ copyEntry(input: CopyAddressBookEntryInput, options?: PolyesterMutationOptions): Promise; /** * Creates a tag in the resolved address book scope for organizing saved destinations. */ createTag(input: CreateAddressBookTagInput, options?: PolyesterMutationOptions): Promise; /** * Updates a tag's name and optional color token. */ updateTag(input: UpdateAddressBookTagInput, options?: PolyesterMutationOptions): Promise; /** * Deletes a tag and detaches it from any address-book entries. */ deleteTag(input: DeleteAddressBookTagInput, options?: PolyesterMutationOptions): Promise; /** * Returns recent transfer counterparties, including unsaved destinations, with direction, kind, use count, and first/last seen timestamps. */ listTransferCounterparties(input?: ListTransferCounterpartiesInput, options?: PolyesterRequestOptions): Promise<{ counterparties: TransferCounterparties; truncated: boolean; }>; /** * Returns saved and whitelisted destinations available for transfer flows in the resolved address book scope. */ listTransferDestinations(input?: ListTransferDestinationsInput, options?: PolyesterRequestOptions): Promise<{ destinations: TransferDestinations; nextPageToken: string; }>; /** * Returns internal-transfer whitelist entries for the resolved scope, including target account metadata and resolution status. */ listInternalTransferWhitelistEntries(input?: ListInternalTransferWhitelistEntriesInput, options?: PolyesterRequestOptions): Promise<{ entries: InternalTransferWhitelistEntries; nextPageToken: string; }>; /** * Returns external and internal withdrawal whitelist requirements plus active mirrored external whitelist entries for the resolved scope. */ getWithdrawWhitelistView(input?: SubaccountScopedInput, options?: PolyesterRequestOptions): Promise; /** * Fetches the combined address-book view used by dashboards: books, saved entries, recent destinations, tags, and withdrawal whitelist status. * * Pass `minimumViewRevision` (from an invalidation event's `viewRevision`) to make the server wait for its projection to reach that revision instead of returning an older view. */ getView(input?: GetAddressBookViewInput, options?: PolyesterRequestOptions): Promise; /** * Subscribes to scoped address-book view invalidation signals for a root account. * * Use `scope` and `invalidatedAt` for diagnostics and ordering, then refetch `getView` for the canonical aggregate (entries, tags, recent destinations, whitelist), passing the event's `viewRevision` as `minimumViewRevision` to avoid reading an older view. Do not patch individual rows from these events. */ subscribeViewInvalidations(input: SubscribeViewInvalidationsInput): () => void; private resolveInput; } //#endregion export { AddressBookService }; //# sourceMappingURL=address-book.d.ts.map