{"version":3,"sources":["../../src/types.ts"],"sourcesContent":["import type { NEP413Message } from \"@fastnear/utils\";\n\nexport interface AccessKeyWithError {\n  result: {\n    nonce: number;\n    permission?: any;\n    error?: string;\n  };\n}\n\nexport interface BlockView {\n  result: {\n    header: {\n      hash: string;\n      timestamp_nanosec: string;\n    };\n  };\n}\n\nexport interface LastKnownBlock {\n  header: {\n    hash: string;\n    timestamp_nanosec: string;\n  };\n}\n\nexport interface AccessKeyView {\n  nonce: number;\n  permission: any;\n}\n\nexport interface FastNearRpcAccountView {\n  amount: string;\n  locked?: string;\n  storage_usage?: number;\n  code_hash?: string;\n  block_height?: number;\n  block_hash?: string;\n  [key: string]: any;\n}\n\nexport interface FastNearRpcQueryAccountResponse {\n  result: FastNearRpcAccountView;\n  [key: string]: any;\n}\n\nexport interface FastNearRecipeViewAccountResult extends FastNearRpcAccountView {}\n\nexport interface RecipeViewContractParams {\n  contractId: string;\n  methodName: string;\n  args?: any;\n  argsBase64?: string;\n  blockId?: string;\n}\n\nexport interface RecipeViewAccountParams {\n  accountId: string;\n  blockId?: string;\n}\n\nexport type RecipeViewAccountInput = string | RecipeViewAccountParams;\n\nexport interface RecipeInspectTransactionParams {\n  txHash: string;\n  accountId?: string;\n}\n\nexport type RecipeInspectTransactionInput = string | RecipeInspectTransactionParams;\n\nexport interface RecipeFunctionCallParams {\n  receiverId: string;\n  methodName: string;\n  args?: Record<string, any>;\n  argsBase64?: string;\n  gas?: string;\n  deposit?: string;\n  waitUntil?: string;\n  // Routes the call through the per-network slot in `@fastnear/api@1.1.1+`\n  // so a page holding parallel mainnet+testnet sessions can dispatch to\n  // either without flipping `near.config()`. Falls back to the active\n  // network when omitted.\n  network?: \"mainnet\" | \"testnet\";\n}\n\nexport interface RecipeTransferParams {\n  receiverId: string;\n  amount: string;\n  waitUntil?: string;\n  network?: \"mainnet\" | \"testnet\";\n}\n\nexport interface RecipeConnectParams {\n  contractId?: string;\n  excludedWallets?: string[];\n  features?: Record<string, boolean>;\n  // When set, opens the wallet picker scoped to this network — otherwise\n  // falls back to `near.config().networkId`. With @fastnear/wallet 1.1.0+\n  // the per-network sessions live alongside each other on the same page.\n  network?: \"mainnet\" | \"testnet\";\n}\n\nexport interface FastNearRecipeDiscoveryEntry {\n  id: string;\n  api: string;\n  title: string;\n}\n\nexport interface ExplainedAction {\n  kind: \"action\";\n  type: string;\n  params: Record<string, any>;\n  methodName?: string | null;\n  gas?: string | null;\n  deposit?: string | null;\n  args?: any;\n  argsBase64?: string | null;\n  publicKey?: string | null;\n  stake?: string | null;\n  beneficiaryId?: string | null;\n  accessKey?: any;\n  codeBase64?: string | null;\n  codeLength?: number | null;\n}\n\nexport interface ExplainedTransaction {\n  kind: \"transaction\";\n  signerId?: string | null;\n  receiverId: string;\n  actionCount: number;\n  actions: ExplainedAction[];\n}\n\nexport interface ExplainedError {\n  kind: \"rpc_error\" | \"wallet_error\" | \"transport_error\" | \"error\";\n  code: string | number | null;\n  name: string | null;\n  message: string;\n  data: any;\n  retryable: boolean;\n}\n\nexport interface FastNearApiAccountState {\n  balance: string;\n  locked?: string;\n  storage_usage?: number;\n  code_hash?: string;\n  block_height?: number;\n  block_hash?: string;\n  [key: string]: any;\n}\n\nexport interface FastNearApiTokenBalance {\n  contract_id?: string;\n  ft_id?: string;\n  symbol?: string;\n  balance?: string;\n  balance_yocto?: string;\n  decimals?: number;\n  [key: string]: any;\n}\n\nexport interface FastNearApiNftContractHolding {\n  contract_id?: string;\n  nft_contract_id?: string;\n  tokens?: any[];\n  [key: string]: any;\n}\n\nexport interface FastNearApiStakingPoolPosition {\n  pool_id?: string;\n  contract_id?: string;\n  staked_balance?: string;\n  unstaked_balance?: string;\n  can_withdraw?: boolean;\n  [key: string]: any;\n}\n\nexport interface FastNearApiPublicKeyAccount {\n  account_id: string;\n  public_key?: string;\n  access_key?: any;\n  [key: string]: any;\n}\n\nexport interface FastNearApiFtTopAccount {\n  account_id: string;\n  balance?: string;\n  human_balance?: string;\n  [key: string]: any;\n}\n\nexport interface FastNearApiV1AccountFullResponse {\n  account_id: string;\n  state: FastNearApiAccountState;\n  tokens: FastNearApiTokenBalance[];\n  nfts: FastNearApiNftContractHolding[];\n  pools: FastNearApiStakingPoolPosition[];\n  [key: string]: any;\n}\n\nexport interface FastNearApiV1AccountFtResponse {\n  account_id?: string;\n  tokens: FastNearApiTokenBalance[];\n  page_token?: string | null;\n  resume_token?: string | null;\n  [key: string]: any;\n}\n\nexport interface FastNearApiV1AccountNftResponse {\n  account_id?: string;\n  nfts: FastNearApiNftContractHolding[];\n  page_token?: string | null;\n  resume_token?: string | null;\n  [key: string]: any;\n}\n\nexport interface FastNearApiV1AccountStakingResponse {\n  account_id?: string;\n  pools: FastNearApiStakingPoolPosition[];\n  page_token?: string | null;\n  resume_token?: string | null;\n  [key: string]: any;\n}\n\nexport interface FastNearApiV1PublicKeyResponse {\n  public_key?: string;\n  accounts: FastNearApiPublicKeyAccount[];\n  [key: string]: any;\n}\n\nexport interface FastNearApiV1PublicKeyAllResponse {\n  public_key?: string;\n  accounts: FastNearApiPublicKeyAccount[];\n  transactions?: any[];\n  [key: string]: any;\n}\n\nexport interface FastNearApiV1FtTopResponse {\n  token_id?: string;\n  accounts: FastNearApiFtTopAccount[];\n  page_token?: string | null;\n  [key: string]: any;\n}\n\nexport interface FastNearTxExecutionOutcome {\n  block_hash?: string;\n  block_height?: number;\n  id?: string;\n  logs?: string[];\n  outcome?: any;\n  proof?: any[];\n  executor_id?: string;\n  status?: any;\n  tokens_burnt?: string;\n  [key: string]: any;\n}\n\nexport interface FastNearTxTransactionRecord {\n  hash: string;\n  signer_id: string;\n  receiver_id: string;\n  actions?: any[];\n  [key: string]: any;\n}\n\nexport interface FastNearTxReceiptRow {\n  receipt_id?: string;\n  receipt?: any;\n  execution_outcome?: FastNearTxExecutionOutcome;\n  [key: string]: any;\n}\n\nexport interface FastNearTxTransactionRow {\n  transaction: FastNearTxTransactionRecord;\n  execution_outcome: FastNearTxExecutionOutcome;\n  receipts: FastNearTxReceiptRow[];\n  [key: string]: any;\n}\n\nexport interface FastNearTxBlockRow {\n  block_height?: number;\n  block_hash?: string;\n  transactions?: FastNearTxTransactionRow[];\n  receipts?: FastNearTxReceiptRow[];\n  [key: string]: any;\n}\n\nexport interface FastNearTxTransactionsResponse {\n  transactions: FastNearTxTransactionRow[];\n  resume_token?: string | null;\n  page_token?: string | null;\n  [key: string]: any;\n}\n\nexport interface FastNearTxReceiptResponse {\n  receipt?: FastNearTxReceiptRow | null;\n  receipts?: FastNearTxReceiptRow[];\n  transaction?: FastNearTxTransactionRow | null;\n  [key: string]: any;\n}\n\nexport interface FastNearTxAccountResponse {\n  transactions?: FastNearTxTransactionRow[];\n  resume_token?: string | null;\n  page_token?: string | null;\n  [key: string]: any;\n}\n\nexport interface FastNearTxBlockResponse {\n  block?: FastNearTxBlockRow;\n  [key: string]: any;\n}\n\nexport interface FastNearTxBlocksResponse {\n  blocks: FastNearTxBlockRow[];\n  resume_token?: string | null;\n  page_token?: string | null;\n  [key: string]: any;\n}\n\nexport interface FastNearTransfersEntry {\n  account_id?: string;\n  asset_id?: string;\n  human_amount?: string;\n  other_account_id?: string;\n  transfer_type?: string;\n  transaction_id?: string;\n  block_height?: number;\n  [key: string]: any;\n}\n\nexport interface FastNearTransfersQueryResponse {\n  transfers: FastNearTransfersEntry[];\n  resume_token?: string | null;\n  [key: string]: any;\n}\n\nexport interface FastNearNeardataTransaction {\n  hash?: string;\n  signer_id?: string;\n  receiver_id?: string;\n  [key: string]: any;\n}\n\nexport interface FastNearNeardataBlockHeader {\n  height: number;\n  hash?: string;\n  prev_hash?: string;\n  timestamp_nanosec?: string;\n  [key: string]: any;\n}\n\nexport interface FastNearNeardataChunk {\n  chunk_hash?: string;\n  shard_id?: number;\n  transactions: FastNearNeardataTransaction[];\n  [key: string]: any;\n}\n\nexport interface FastNearNeardataShard {\n  shard_id: number;\n  chunk: FastNearNeardataChunk;\n  [key: string]: any;\n}\n\nexport interface FastNearNeardataBlock {\n  header: FastNearNeardataBlockHeader;\n  [key: string]: any;\n}\n\nexport interface FastNearNeardataLastBlockFinalResponse {\n  block: FastNearNeardataBlock;\n  shards: FastNearNeardataShard[];\n  [key: string]: any;\n}\n\nexport interface FastNearNeardataLastBlockOptimisticResponse {\n  block: FastNearNeardataBlock;\n  shards: FastNearNeardataShard[];\n  [key: string]: any;\n}\n\nexport interface FastNearNeardataBlockResponse {\n  block: FastNearNeardataBlock;\n  shards: FastNearNeardataShard[];\n  [key: string]: any;\n}\n\nexport interface FastNearNeardataBlockHeadersResponse {\n  block: FastNearNeardataBlock;\n  shards?: FastNearNeardataShard[];\n  [key: string]: any;\n}\n\nexport interface FastNearNeardataBlockShardResponse {\n  block: FastNearNeardataBlock;\n  shard: FastNearNeardataShard;\n  [key: string]: any;\n}\n\nexport interface FastNearNeardataBlockChunkResponse {\n  block: FastNearNeardataBlock;\n  chunk: FastNearNeardataChunk;\n  [key: string]: any;\n}\n\nexport interface FastNearNeardataBlockOptimisticResponse {\n  block: FastNearNeardataBlock;\n  shards: FastNearNeardataShard[];\n  [key: string]: any;\n}\n\nexport interface FastNearNeardataFirstBlockResponse {\n  block: FastNearNeardataBlock;\n  [key: string]: any;\n}\n\nexport interface FastNearNeardataHealthResponse {\n  status?: string;\n  ok?: boolean;\n  [key: string]: any;\n}\n\nexport interface FastNearKvEntry {\n  current_account_id: string;\n  predecessor_id: string;\n  key: string;\n  value: any;\n  block_height?: number;\n  block_hash?: string;\n  timestamp_nanosec?: string;\n  [key: string]: any;\n}\n\nexport interface FastNearKvEntriesResponse {\n  entries: FastNearKvEntry[];\n  resume_token?: string | null;\n  page_token?: string | null;\n  [key: string]: any;\n}\n\nexport interface FastNearKvGetLatestKeyResponse extends FastNearKvEntriesResponse {}\n\nexport interface FastNearKvGetHistoryKeyResponse extends FastNearKvEntriesResponse {}\n\nexport interface FastNearKvLatestByAccountResponse extends FastNearKvEntriesResponse {}\n\nexport interface FastNearKvHistoryByAccountResponse extends FastNearKvEntriesResponse {}\n\nexport interface FastNearKvLatestByPredecessorResponse extends FastNearKvEntriesResponse {}\n\nexport interface FastNearKvHistoryByPredecessorResponse extends FastNearKvEntriesResponse {}\n\nexport interface FastNearKvAllByPredecessorResponse extends FastNearKvEntriesResponse {}\n\nexport interface FastNearKvMultiResult {\n  entries?: FastNearKvEntry[];\n  [key: string]: any;\n}\n\nexport interface FastNearKvMultiResponse {\n  results?: FastNearKvMultiResult[];\n  entries?: FastNearKvEntry[];\n  [key: string]: any;\n}\n\nexport type FastNearSignMessageParams = NEP413Message;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}