@seedprotocol/arweave 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/ArweaveClient/BaseArweaveClient.d.ts +73 -0
  2. package/dist/ArweaveClient/BaseArweaveClient.d.ts.map +1 -0
  3. package/dist/ArweaveClient/IArweaveClient.d.ts +11 -0
  4. package/dist/ArweaveClient/IArweaveClient.d.ts.map +1 -0
  5. package/dist/ArweaveClient/arweaveL1UploadApi.d.ts +52 -0
  6. package/dist/ArweaveClient/arweaveL1UploadApi.d.ts.map +1 -0
  7. package/dist/ArweaveClient/queries.d.ts +44 -0
  8. package/dist/ArweaveClient/queries.d.ts.map +1 -0
  9. package/dist/ArweaveClient/selectReadGateway.d.ts +16 -0
  10. package/dist/ArweaveClient/selectReadGateway.d.ts.map +1 -0
  11. package/dist/ArweaveClient/uploadApiVerification.d.ts +23 -0
  12. package/dist/ArweaveClient/uploadApiVerification.d.ts.map +1 -0
  13. package/dist/constants.d.ts +46 -0
  14. package/dist/constants.d.ts.map +1 -0
  15. package/dist/gateway/gatewayState.d.ts +5 -0
  16. package/dist/gateway/gatewayState.d.ts.map +1 -0
  17. package/dist/gateway/resolveSeedGatewayEndpoints.d.ts +15 -0
  18. package/dist/gateway/resolveSeedGatewayEndpoints.d.ts.map +1 -0
  19. package/dist/gateway/seedGatewayConfig.d.ts +5 -0
  20. package/dist/gateway/seedGatewayConfig.d.ts.map +1 -0
  21. package/dist/graphql/gql/fragment-masking.d.ts +20 -0
  22. package/dist/graphql/gql/fragment-masking.d.ts.map +1 -0
  23. package/dist/graphql/gql/gql.d.ts +42 -0
  24. package/dist/graphql/gql/gql.d.ts.map +1 -0
  25. package/dist/graphql/gql/graphql.d.ts +337 -0
  26. package/dist/graphql/gql/graphql.d.ts.map +1 -0
  27. package/dist/graphql/gql/index.d.ts +3 -0
  28. package/dist/graphql/gql/index.d.ts.map +1 -0
  29. package/dist/index.d.ts +17 -0
  30. package/dist/index.d.ts.map +1 -0
  31. package/dist/index.js +432 -0
  32. package/dist/index.js.map +1 -0
  33. package/dist/mediaRef.d.ts +58 -0
  34. package/dist/mediaRef.d.ts.map +1 -0
  35. package/dist/node/ArweaveClient.d.ts +14 -0
  36. package/dist/node/ArweaveClient.d.ts.map +1 -0
  37. package/dist/node/index.d.ts +7 -0
  38. package/dist/node/index.d.ts.map +1 -0
  39. package/dist/node.js +110 -0
  40. package/dist/node.js.map +1 -0
  41. package/dist/queries-DgB0O5RC.js +512 -0
  42. package/dist/queries-DgB0O5RC.js.map +1 -0
  43. package/dist/relationSeedRef.d.ts +6 -0
  44. package/dist/relationSeedRef.d.ts.map +1 -0
  45. package/dist/shims/typed-document-node.d.ts +5 -0
  46. package/dist/shims/typed-document-node.d.ts.map +1 -0
  47. package/dist/types/arweave.d.ts +57 -0
  48. package/dist/types/arweave.d.ts.map +1 -0
  49. package/dist/types/gateway.d.ts +44 -0
  50. package/dist/types/gateway.d.ts.map +1 -0
  51. package/dist/types/seedConfig.d.ts +26 -0
  52. package/dist/types/seedConfig.d.ts.map +1 -0
  53. package/package.json +57 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queries-DgB0O5RC.js","names":[],"sources":["../src/constants.ts","../src/ArweaveClient/BaseArweaveClient.ts","../src/graphql/gql/graphql.ts","../src/graphql/gql/gql.ts","../src/ArweaveClient/queries.ts"],"sourcesContent":["/** Default Arweave gateway host used across all packages (first in {@link DEFAULT_ARWEAVE_GATEWAYS}) */\nexport const DEFAULT_ARWEAVE_HOST = 'ar.seedprotocol.io'\n\n/**\n * Official Seed Protocol public feed Hyperdrive key (z32).\n * Empty until the first official publisher keypair is generated and backed up by ops.\n */\nexport const DEFAULT_SEED_FEED_HYPER_KEY = ''\n\n/**\n * Official Seed Protocol gateway Hyper tunnel operator key (z32).\n * Empty until ops generate and back up the first operator keypair.\n */\nexport const DEFAULT_SEED_GATEWAY_HYPER_KEY = ''\n\n/** Default localhost sidecar bind for Gateway Hyper client mode. */\nexport const DEFAULT_GATEWAY_SIDECAR_HOST = '127.0.0.1'\nexport const DEFAULT_GATEWAY_SIDECAR_PORT = 1984\n\n/** Default Arweave gateway GraphQL endpoint (transaction / block queries). */\nexport const DEFAULT_ARWEAVE_GRAPHQL_URL = `https://${DEFAULT_ARWEAVE_HOST}/graphql`\n\n/**\n * Default Arweave gateways for read fallback / metadata fetching (ordered by preference).\n * Override order with `ARWEAVE_READ_GATEWAYS` or `NEXT_PUBLIC_ARWEAVE_READ_GATEWAYS` (comma-separated hosts).\n */\nexport const DEFAULT_ARWEAVE_GATEWAYS = [\n 'ar.seedprotocol.io',\n 'arweave.net',\n 'arweave.dev',\n 'g8way.io',\n 'permagate.io',\n 'zigza.xyz',\n] as const\n\nconst READ_GATEWAYS_ENV_KEYS = ['ARWEAVE_READ_GATEWAYS', 'NEXT_PUBLIC_ARWEAVE_READ_GATEWAYS'] as const\n\n/** Env keys checked for primary Arweave gateway host (first match wins). */\nexport const ARWEAVE_HOST_ENV_KEYS = [\n 'NEXT_PUBLIC_ARWEAVE_HOST',\n 'ARWEAVE_HOST',\n 'VITE_ARWEAVE_HOST',\n] as const\n\nfunction normalizeGatewayHostInput(input: string): string {\n const t = input.trim()\n if (t.startsWith('http://')) return t.slice(7).replace(/\\/$/, '')\n if (t.startsWith('https://')) return t.slice(8).replace(/\\/$/, '')\n return t.replace(/\\/$/, '')\n}\n\n/**\n * Primary gateway host from env (`NEXT_PUBLIC_ARWEAVE_HOST`, `ARWEAVE_HOST`, or `VITE_ARWEAVE_HOST`).\n * Scheme prefixes (`http://`, `https://`) are stripped.\n */\nexport function resolveArweaveHostFromEnv(): string | undefined {\n if (typeof process === 'undefined' || !process.env) return undefined\n for (const key of ARWEAVE_HOST_ENV_KEYS) {\n const raw = process.env[key]?.trim()\n if (raw) return normalizeGatewayHostInput(raw)\n }\n return undefined\n}\n\nfunction filterDefaultsForPrimary(primary: string, defaults: readonly string[]): string[] {\n const primaryNorm = primary.trim().toLowerCase().replace(/\\/$/, '')\n const seedNorm = DEFAULT_ARWEAVE_HOST.toLowerCase()\n if (primaryNorm === seedNorm) return [...defaults]\n return defaults.filter((g) => g.toLowerCase() !== seedNorm)\n}\n\n/**\n * Ordered read gateways: `primary` first, then fallbacks.\n * When `primary` is not {@link DEFAULT_ARWEAVE_HOST}, `ar.seedprotocol.io` is omitted from fallbacks\n * unless it appears in an explicit `ARWEAVE_READ_GATEWAYS` env list.\n */\nexport function getArweaveReadGatewayHostsForPrimary(primary: string): string[] {\n const defaults = getDefaultArweaveReadGatewayHostsOrdered()\n return mergePrimaryHostWithDefaults(primary, filterDefaultsForPrimary(primary, defaults))\n}\n\n/** Ordered gateway hostnames for reads: env list if set, otherwise {@link DEFAULT_ARWEAVE_GATEWAYS}. */\nexport function getDefaultArweaveReadGatewayHostsOrdered(): string[] {\n if (typeof process === 'undefined' || !process.env) {\n return [...DEFAULT_ARWEAVE_GATEWAYS]\n }\n for (const key of READ_GATEWAYS_ENV_KEYS) {\n const raw = process.env[key]?.trim()\n if (raw) {\n return raw.split(',').map((s) => s.trim()).filter(Boolean)\n }\n }\n return [...DEFAULT_ARWEAVE_GATEWAYS]\n}\n\n/**\n * Deduped host list: primary first, then each default not already present (case-insensitive).\n */\nexport function mergePrimaryHostWithDefaults(\n primary: string,\n defaults: readonly string[],\n): string[] {\n const seen = new Set<string>()\n const out: string[] = []\n const keyOf = (h: string) => h.trim().toLowerCase().replace(/\\/$/, '')\n const add = (h: string) => {\n const t = h.trim().replace(/\\/$/, '')\n if (!t) return\n const k = keyOf(t)\n if (seen.has(k)) return\n seen.add(k)\n out.push(t)\n }\n add(primary)\n for (const d of defaults) add(d)\n return out\n}\n\n/**\n * True if `hostname` looks like a public Arweave gateway used in stored URLs (hydration / RSS).\n */\nexport function isKnownArweaveGatewayHostname(hostname: string): boolean {\n const h = hostname.trim().toLowerCase()\n if (!h) return false\n if (h.endsWith('arweave.net')) return true\n if (h.endsWith('ar-io.net')) return true\n for (const g of DEFAULT_ARWEAVE_GATEWAYS) {\n const gl = g.toLowerCase()\n if (h === gl || h.endsWith(`.${gl}`)) return true\n }\n return false\n}\n","import { GraphQLClient } from 'graphql-request'\nimport type {\n TransactionStatus,\n TransactionTag,\n GetDataOptions,\n DownloadFilesParams,\n DownloadResult,\n CreateTransactionOptions,\n} from '../types/arweave.js'\nimport { DEFAULT_ARWEAVE_HOST, resolveArweaveHostFromEnv } from '../constants.js'\nimport type { IArweaveClient } from './IArweaveClient.js'\n\nfunction parseGateway(input: string): { protocol: 'http' | 'https'; host: string } {\n const t = input.trim()\n if (t.startsWith('http://')) {\n return { protocol: 'http', host: t.slice(7).replace(/\\/$/, '') }\n }\n if (t.startsWith('https://')) {\n return { protocol: 'https', host: t.slice(8).replace(/\\/$/, '') }\n }\n return { protocol: 'https', host: t.replace(/\\/$/, '') }\n}\n\n// Internal gateway state (process-wide; stays on the facade)\nlet _host = DEFAULT_ARWEAVE_HOST\nlet _protocol: 'http' | 'https' = 'https'\nlet _hostExplicitlySet = false\n/** When true, env gateway host does not override `_host` (after a successful read-gateway probe). */\nlet _suppressEnvGatewayOverride = false\n\nexport abstract class BaseArweaveClient {\n private static _impl: IArweaveClient | null = null\n\n static configure(impl: IArweaveClient): void {\n if (!impl) {\n throw new Error(\n 'Cannot configure ArweaveClient with undefined or null. Ensure the platform-specific ArweaveClient is properly created.',\n )\n }\n BaseArweaveClient._impl = impl\n }\n\n private static requireImpl(): IArweaveClient {\n if (!BaseArweaveClient._impl) {\n throw new Error(\n 'ArweaveClient not configured. Import from @seedprotocol/arweave/node to register the Node.js implementation, or ensure SDK platform init has run.',\n )\n }\n return BaseArweaveClient._impl\n }\n\n /**\n * Resolved gateway host (no scheme) and protocol from env override or setHost().\n */\n static resolveGateway(): { protocol: 'http' | 'https'; host: string } {\n const envHost = resolveArweaveHostFromEnv()\n if (envHost && !_hostExplicitlySet && !_suppressEnvGatewayOverride) {\n return parseGateway(envHost)\n }\n return { protocol: _protocol, host: _host }\n }\n\n // ============================================\n // Configuration Methods (facade / process-wide)\n // ============================================\n\n /**\n * Get the current Arweave host (hostname, optionally with port — no URL scheme)\n * @returns The Arweave host (e.g. 'arweave.net' or 'localhost:1984')\n */\n static getHost(): string {\n return this.resolveGateway().host\n }\n\n /**\n * Get whether requests use http or https\n */\n static getProtocol(): 'http' | 'https' {\n return this.resolveGateway().protocol\n }\n\n /**\n * Base URL for the configured gateway (e.g. https://arweave.net or http://localhost:1984)\n */\n static getBaseUrl(): string {\n const { protocol, host } = this.resolveGateway()\n return `${protocol}://${host}`\n }\n\n /**\n * Set the Arweave gateway. Plain host defaults to https; prefix with http:// for local HTTP gateways.\n * @param host - e.g. 'arweave.net', 'https://arweave.net', or 'http://localhost:1984'\n */\n static setHost(host: string): void {\n const parsed = parseGateway(host)\n _host = parsed.host\n _protocol = parsed.protocol\n _hostExplicitlySet = true\n _suppressEnvGatewayOverride = false\n }\n\n /**\n * When true, read-path gateway probing does not change the host ({@link setHost}).\n */\n static isReadGatewayLocked(): boolean {\n return _hostExplicitlySet\n }\n\n /**\n * @internal Clears env override suppression after probing (for test isolation).\n */\n static resetReadGatewaySelectionStateForTests(): void {\n _suppressEnvGatewayOverride = false\n }\n\n /**\n * Sets the preferred read gateway without locking. Env host still takes precedence until a probe applies a host.\n * Used for seed `arweaveDomain`.\n */\n static setPreferredReadGateway(host: string): void {\n const parsed = parseGateway(host)\n _host = parsed.host\n _protocol = parsed.protocol\n _hostExplicitlySet = false\n }\n\n /**\n * Applies a gateway chosen by read-path health probing so {@link getHost} uses it instead of env override.\n */\n static applyProbedReadGateway(host: string): void {\n const parsed = parseGateway(host)\n _host = parsed.host\n _protocol = parsed.protocol\n _hostExplicitlySet = false\n _suppressEnvGatewayOverride = true\n }\n\n /**\n * Get the GraphQL endpoint URL\n * @returns The full GraphQL endpoint URL\n */\n static getEndpoint(): string {\n return `${this.getBaseUrl()}/graphql`\n }\n\n /**\n * Get the raw data URL for a transaction\n * @param transactionId - The Arweave transaction ID\n * @returns The full URL to access raw transaction data\n */\n static getRawUrl(transactionId: string): string {\n return `${this.getBaseUrl()}/raw/${transactionId}`\n }\n\n /**\n * URL used to verify that a transaction is available on the gateway (HTTP 200 = present).\n * @param transactionId - The Arweave transaction ID\n */\n static getStatusUrl(transactionId: string): string {\n return `${this.getBaseUrl()}/${transactionId}`\n }\n\n // ============================================\n // Delegated to platform instance\n // ============================================\n\n static getArweaveClient(): GraphQLClient {\n return BaseArweaveClient.requireImpl().getArweaveClient()\n }\n\n static getTransactionStatus(transactionId: string): Promise<TransactionStatus> {\n return BaseArweaveClient.requireImpl().getTransactionStatus(transactionId)\n }\n\n static getTransactionData(\n transactionId: string,\n options?: GetDataOptions\n ): Promise<Uint8Array | string> {\n return BaseArweaveClient.requireImpl().getTransactionData(transactionId, options)\n }\n\n static getTransactionTags(transactionId: string): Promise<TransactionTag[]> {\n return BaseArweaveClient.requireImpl().getTransactionTags(transactionId)\n }\n\n static createTransaction(\n data: string | Uint8Array,\n options?: CreateTransactionOptions\n ): Promise<any> {\n return BaseArweaveClient.requireImpl().createTransaction(data, options)\n }\n\n static downloadFiles(params: DownloadFilesParams): Promise<DownloadResult[]> {\n return BaseArweaveClient.requireImpl().downloadFiles(params)\n }\n}\n","/* eslint-disable */\nimport { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';\nexport type Maybe<T> = T | null;\nexport type InputMaybe<T> = T | null | undefined;\nexport type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };\nexport type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };\nexport type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };\nexport type MakeEmpty<T extends { [key: string]: unknown }, K extends keyof T> = { [_ in K]?: never };\nexport type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };\n/** All built-in and custom scalars, mapped to their actual values */\nexport type Scalars = {\n ID: { input: string; output: string; }\n String: { input: string; output: string; }\n Boolean: { input: boolean; output: boolean; }\n Int: { input: number; output: number; }\n Float: { input: number; output: number; }\n};\n\n/** Representation of a value transfer between wallets, in both winson and ar. */\nexport type Amount = {\n __typename?: 'Amount';\n /** Amount as an AR string e.g. \\`\"0.000000000001\"\\`. */\n ar: Scalars['String']['output'];\n /** Amount as a winston string e.g. \\`\"1000000000000\"\\`. */\n winston: Scalars['String']['output'];\n};\n\n/** Block Schema */\nexport type Block = {\n __typename?: 'Block';\n /** The block height. */\n height: Scalars['Int']['output'];\n /** The block ID. */\n id?: Maybe<Scalars['ID']['output']>;\n /** The previous block ID. */\n previous?: Maybe<Scalars['ID']['output']>;\n /** The block timestamp (UTC). */\n timestamp?: Maybe<Scalars['Int']['output']>;\n};\n\n/**\n * Paginated result set using the GraphQL cursor spec,\n * see: https://relay.dev/graphql/connections.htm.\n */\nexport type BlockConnection = {\n __typename?: 'BlockConnection';\n edges: Array<BlockEdge>;\n pageInfo: PageInfo;\n};\n\n/** Paginated result set using the GraphQL cursor spec. */\nexport type BlockEdge = {\n __typename?: 'BlockEdge';\n /**\n * The cursor value for fetching the next page.\n *\n * Pass this to the after parameter in blocks(after: $cursor), the next page will start from the next item after this.\n */\n cursor: Scalars['String']['output'];\n /** A block object. */\n node: Block;\n};\n\n/**\n * The data bundle containing the current data item.\n * See: https://github.com/ArweaveTeam/arweave-standards/blob/master/ans/ANS-104.md.\n */\nexport type Bundle = {\n __typename?: 'Bundle';\n /** ID of the containing data bundle. */\n id: Scalars['ID']['output'];\n};\n\nexport enum CacheControlScope {\n Private = 'PRIVATE',\n Public = 'PUBLIC'\n}\n\n/** Basic metadata about the transaction data payload. */\nexport type MetaData = {\n __typename?: 'MetaData';\n /** Size of the associated data in bytes. */\n size: Scalars['String']['output'];\n /** Type is derived from the \\`content-type\\` tag on a transaction. */\n type?: Maybe<Scalars['String']['output']>;\n};\n\n/** Representation of a transaction owner. */\nexport type Owner = {\n __typename?: 'Owner';\n /** The owner's wallet address. */\n address: Scalars['String']['output'];\n /** The owner's public key as a base64url encoded string. */\n key: Scalars['String']['output'];\n};\n\n/** Paginated page info using the GraphQL cursor spec. */\nexport type PageInfo = {\n __typename?: 'PageInfo';\n hasNextPage: Scalars['Boolean']['output'];\n};\n\n/**\n * The parent transaction for bundled transactions,\n * see: https://github.com/ArweaveTeam/arweave-standards/blob/master/ans/ANS-102.md.\n */\nexport type Parent = {\n __typename?: 'Parent';\n id: Scalars['ID']['output'];\n};\n\nexport type Query = {\n __typename?: 'Query';\n block?: Maybe<Block>;\n blocks: BlockConnection;\n /** Get a transaction by its id */\n transaction?: Maybe<Transaction>;\n /** Get a paginated set of matching transactions using filters. */\n transactions: TransactionConnection;\n};\n\n\nexport type QueryBlockArgs = {\n id?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryBlocksArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n height?: InputMaybe<RangeFilter>;\n ids?: InputMaybe<Array<Scalars['ID']['input']>>;\n sort?: InputMaybe<SortOrder>;\n};\n\n\nexport type QueryTransactionArgs = {\n id: Scalars['ID']['input'];\n};\n\n\nexport type QueryTransactionsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n block?: InputMaybe<RangeFilter>;\n bundledIn?: InputMaybe<Array<Scalars['ID']['input']>>;\n first?: InputMaybe<Scalars['Int']['input']>;\n ids?: InputMaybe<Array<Scalars['ID']['input']>>;\n ingested_at?: InputMaybe<RangeFilter>;\n owners?: InputMaybe<Array<Scalars['String']['input']>>;\n recipients?: InputMaybe<Array<Scalars['String']['input']>>;\n sort?: InputMaybe<SortOrder>;\n tags?: InputMaybe<Array<TagFilter>>;\n};\n\n/** Filter with a min and max */\nexport type RangeFilter = {\n /** Maximum integer to filter to */\n max?: InputMaybe<Scalars['Int']['input']>;\n /** Minimum integer to filter from */\n min?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/** Optionally reverse the result sort order from `HEIGHT_DESC` (default) to `HEIGHT_ASC`. */\nexport enum SortOrder {\n /** Results are sorted by the transaction block height in ascending order, with the oldest transactions appearing first, and the most recent and pending/unconfirmed appearing last. */\n HeightAsc = 'HEIGHT_ASC',\n /** Results are sorted by the transaction block height in descending order, with the most recent and unconfirmed/pending transactions appearing first. */\n HeightDesc = 'HEIGHT_DESC',\n /** Results are sorted by the transaction ingestion time in ascending order, with the oldest ingested transactions appearing first. */\n IngestedAtAsc = 'INGESTED_AT_ASC',\n /** Results are sorted by the transaction ingestion time in descending order, with the most recently ingested transactions appearing first. */\n IngestedAtDesc = 'INGESTED_AT_DESC'\n}\n\n/** Tag Schema */\nexport type Tag = {\n __typename?: 'Tag';\n /** UTF-8 tag name */\n name: Scalars['String']['output'];\n /** UTF-8 tag value */\n value: Scalars['String']['output'];\n};\n\n/** Find transactions with the following tag name and value */\nexport type TagFilter = {\n /** How tag names and values are matched. Defaults to EXACT. */\n match?: TagMatch;\n /** The tag name */\n name?: InputMaybe<Scalars['String']['input']>;\n /** The operator to apply to to the tag filter. Defaults to EQ (equal). */\n op?: TagOperator;\n /**\n * An array of values to match against. If multiple values are passed then transactions with _any_ matching tag value from the set will be returned.\n *\n * e.g.\n *\n * `{name: \"app-name\", values: [\"app-1\"]}`\n *\n * Returns all transactions where the `app-name` tag has a value of `app-1`.\n *\n * `{name: \"app-name\", values: [\"app-1\", \"app-2\", \"app-3\"]}`\n *\n * Returns all transactions where the `app-name` tag has a value of either `app-1` _or_ `app-2` _or_ `app-3`.\n */\n values?: InputMaybe<Array<Scalars['String']['input']>>;\n};\n\n/** The method used to determine if tags match. */\nexport enum TagMatch {\n /** An exact match */\n Exact = 'EXACT',\n /** Fuzzy match containing all search terms */\n FuzzyAnd = 'FUZZY_AND',\n /** Fuzzy match containing at least one search term */\n FuzzyOr = 'FUZZY_OR',\n /** A wildcard match */\n Wildcard = 'WILDCARD'\n}\n\n/** The operator to apply to a tag value. */\nexport enum TagOperator {\n /** Equal */\n Eq = 'EQ',\n /** Not equal */\n Neq = 'NEQ'\n}\n\n/** Transaction Structure */\nexport type Transaction = {\n __typename?: 'Transaction';\n anchor: Scalars['String']['output'];\n /** Transactions with a null block are recent and unconfirmed, if they aren't mined into a block within 60 minutes they will be removed from results. */\n block?: Maybe<Block>;\n /**\n * For bundled data items this references the containing bundle ID.\n * See: https://github.com/ArweaveTeam/arweave-standards/blob/master/ans/ANS-104.md\n */\n bundledIn?: Maybe<Bundle>;\n data: MetaData;\n fee: Amount;\n id: Scalars['ID']['output'];\n /** When this transaction was made available for querying */\n ingested_at?: Maybe<Scalars['Int']['output']>;\n owner: Owner;\n /**\n * @deprecated Don't use, kept for backwards compatability only!\n * @deprecated Use `bundledIn`\n */\n parent?: Maybe<Parent>;\n quantity: Amount;\n recipient: Scalars['String']['output'];\n signature: Scalars['String']['output'];\n tags: Array<Tag>;\n};\n\n/**\n * Paginated result set using the GraphQL cursor spec,\n * see: https://relay.dev/graphql/connections.htm.\n */\nexport type TransactionConnection = {\n __typename?: 'TransactionConnection';\n /** The number of transactions that match this query. */\n count?: Maybe<Scalars['String']['output']>;\n edges: Array<TransactionEdge>;\n pageInfo: PageInfo;\n};\n\n/** Paginated result set using the GraphQL cursor spec. */\nexport type TransactionEdge = {\n __typename?: 'TransactionEdge';\n /**\n * The cursor value for fetching the next page.\n *\n * Pass this to the `after` parameter in ` transactions(after: $cursor)`, the next page will start from the next item after this.\n */\n cursor: Scalars['String']['output'];\n /** A transaction object. */\n node: Transaction;\n};\n\nexport type GetTransactionTagsQueryVariables = Exact<{\n transactionId: Scalars['ID']['input'];\n}>;\n\n\nexport type GetTransactionTagsQuery = { __typename?: 'Query', tags?: { __typename?: 'Transaction', id: string, tags: Array<{ __typename?: 'Tag', name: string, value: string }> } | null };\n\nexport type GetArweaveTransactionsQueryVariables = Exact<{\n owners?: InputMaybe<Array<Scalars['String']['input']> | Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n after?: InputMaybe<Scalars['String']['input']>;\n}>;\n\n\nexport type GetArweaveTransactionsQuery = { __typename?: 'Query', transactions: { __typename?: 'TransactionConnection', edges: Array<{ __typename?: 'TransactionEdge', cursor: string, node: { __typename?: 'Transaction', id: string, anchor: string, signature: string, block?: { __typename?: 'Block', id?: string | null, height: number } | null, data: { __typename?: 'MetaData', size: string, type?: string | null }, tags: Array<{ __typename?: 'Tag', name: string, value: string }> } }>, pageInfo: { __typename?: 'PageInfo', hasNextPage: boolean } } };\n\n\nexport const GetTransactionTagsDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"query\",\"name\":{\"kind\":\"Name\",\"value\":\"GetTransactionTags\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"transactionId\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"ID\"}}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"alias\":{\"kind\":\"Name\",\"value\":\"tags\"},\"name\":{\"kind\":\"Name\",\"value\":\"transaction\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"transactionId\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"tags\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"name\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"value\"}}]}}]}}]}}]} as unknown as DocumentNode<GetTransactionTagsQuery, GetTransactionTagsQueryVariables>;\nexport const GetArweaveTransactionsDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"query\",\"name\":{\"kind\":\"Name\",\"value\":\"GetArweaveTransactions\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"owners\"}},\"type\":{\"kind\":\"ListType\",\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}}},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"first\"}},\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"Int\"}}},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"after\"}},\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"transactions\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"owners\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"owners\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"first\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"first\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"after\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"after\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"edges\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"cursor\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"node\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"anchor\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"signature\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"block\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"height\"}}]}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"data\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"size\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"type\"}}]}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"tags\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"name\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"value\"}}]}}]}}]}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"pageInfo\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"hasNextPage\"}}]}}]}}]}}]} as unknown as DocumentNode<GetArweaveTransactionsQuery, GetArweaveTransactionsQueryVariables>;","/* eslint-disable */\nimport * as types from './graphql';\nimport { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';\n\n/**\n * Map of all GraphQL operations in the project.\n *\n * This map has several performance disadvantages:\n * 1. It is not tree-shakeable, so it will include all operations in the project.\n * 2. It is not minifiable, so the string of a GraphQL query will be multiple times inside the bundle.\n * 3. It does not support dead code elimination, so it will add unused operations.\n *\n * Therefore it is highly recommended to use the babel or swc plugin for production.\n * Learn more about it here: https://the-guild.dev/graphql/codegen/plugins/presets/preset-client#reducing-bundle-size\n */\ntype Documents = {\n \"\\n query GetTransactionTags($transactionId: ID!) {\\n tags: transaction(id: $transactionId) {\\n id\\n tags {\\n name\\n value\\n }\\n }\\n }\\n\": typeof types.GetTransactionTagsDocument,\n \"\\n query GetArweaveTransactions(\\n $owners: [String!]\\n $first: Int\\n $after: String\\n ) {\\n transactions(owners: $owners, first: $first, after: $after) {\\n edges {\\n cursor\\n node {\\n id\\n anchor\\n signature\\n block {\\n id\\n height\\n }\\n data {\\n size\\n type\\n }\\n tags {\\n name\\n value\\n }\\n }\\n }\\n pageInfo {\\n hasNextPage\\n }\\n }\\n }\\n\": typeof types.GetArweaveTransactionsDocument,\n};\nconst documents: Documents = {\n \"\\n query GetTransactionTags($transactionId: ID!) {\\n tags: transaction(id: $transactionId) {\\n id\\n tags {\\n name\\n value\\n }\\n }\\n }\\n\": types.GetTransactionTagsDocument,\n \"\\n query GetArweaveTransactions(\\n $owners: [String!]\\n $first: Int\\n $after: String\\n ) {\\n transactions(owners: $owners, first: $first, after: $after) {\\n edges {\\n cursor\\n node {\\n id\\n anchor\\n signature\\n block {\\n id\\n height\\n }\\n data {\\n size\\n type\\n }\\n tags {\\n name\\n value\\n }\\n }\\n }\\n pageInfo {\\n hasNextPage\\n }\\n }\\n }\\n\": types.GetArweaveTransactionsDocument,\n};\n\n/**\n * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n *\n *\n * @example\n * ```ts\n * const query = graphql(`query GetUser($id: ID!) { user(id: $id) { name } }`);\n * ```\n *\n * The query argument is unknown!\n * Please regenerate the types.\n */\nexport function graphql(source: string): unknown;\n\n/**\n * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n */\nexport function graphql(source: \"\\n query GetTransactionTags($transactionId: ID!) {\\n tags: transaction(id: $transactionId) {\\n id\\n tags {\\n name\\n value\\n }\\n }\\n }\\n\"): (typeof documents)[\"\\n query GetTransactionTags($transactionId: ID!) {\\n tags: transaction(id: $transactionId) {\\n id\\n tags {\\n name\\n value\\n }\\n }\\n }\\n\"];\n/**\n * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n */\nexport function graphql(source: \"\\n query GetArweaveTransactions(\\n $owners: [String!]\\n $first: Int\\n $after: String\\n ) {\\n transactions(owners: $owners, first: $first, after: $after) {\\n edges {\\n cursor\\n node {\\n id\\n anchor\\n signature\\n block {\\n id\\n height\\n }\\n data {\\n size\\n type\\n }\\n tags {\\n name\\n value\\n }\\n }\\n }\\n pageInfo {\\n hasNextPage\\n }\\n }\\n }\\n\"): (typeof documents)[\"\\n query GetArweaveTransactions(\\n $owners: [String!]\\n $first: Int\\n $after: String\\n ) {\\n transactions(owners: $owners, first: $first, after: $after) {\\n edges {\\n cursor\\n node {\\n id\\n anchor\\n signature\\n block {\\n id\\n height\\n }\\n data {\\n size\\n type\\n }\\n tags {\\n name\\n value\\n }\\n }\\n }\\n pageInfo {\\n hasNextPage\\n }\\n }\\n }\\n\"];\n\nexport function graphql(source: string) {\n return (documents as any)[source] ?? {};\n}\n\nexport type DocumentType<TDocumentNode extends DocumentNode<any, any>> = TDocumentNode extends DocumentNode< infer TType, any> ? TType : never;","import { graphql } from '../graphql/gql/index.js'\nimport { TypedDocumentNode } from '@graphql-typed-document-node/core'\n\nexport const GET_TRANSACTION_TAGS = graphql(/* GraphQL */ `\n query GetTransactionTags($transactionId: ID!) {\n tags: transaction(id: $transactionId) {\n id\n tags {\n name\n value\n }\n }\n }\n`) as unknown as TypedDocumentNode<{ tags: { id: string; tags: { name: string; value: string }[] } | null }, { transactionId: string }>\n\nexport const GET_ARWEAVE_TRANSACTIONS = graphql(/* GraphQL */ `\n query GetArweaveTransactions(\n $owners: [String!]\n $first: Int\n $after: String\n ) {\n transactions(owners: $owners, first: $first, after: $after) {\n edges {\n cursor\n node {\n id\n anchor\n signature\n block {\n id\n height\n }\n data {\n size\n type\n }\n tags {\n name\n value\n }\n }\n }\n pageInfo {\n hasNextPage\n }\n }\n }\n`) as unknown as TypedDocumentNode<\n {\n transactions: {\n edges: Array<{\n cursor: string\n node: {\n id: string\n anchor: string\n signature: string\n block: { id: string; height: number }\n data: { size: number; type: string }\n tags: Array<{ name: string; value: string }>\n }\n }>\n pageInfo: { hasNextPage: boolean }\n }\n },\n { owners?: string[]; first?: number; after?: string }\n>\n"],"mappings":";;;AACA,IAAa,IAAuB,sBAMvB,IAA8B,IAM9B,IAAiC,IAGjC,IAA+B,aAC/B,IAA+B,MAG/B,IAA8B,WAAW,EAAqB,WAM9D,IAA2B;CACtC;CACA;CACA;CACA;CACA;CACA;AACF,GAEM,IAAyB,CAAC,yBAAyB,mCAAmC,GAG/E,IAAwB;CACnC;CACA;CACA;AACF;AAEA,SAAS,EAA0B,GAAuB;CACxD,IAAM,IAAI,EAAM,KAAK;CAGrB,OAFI,EAAE,WAAW,SAAS,IAAU,EAAE,MAAM,CAAC,EAAE,QAAQ,OAAO,EAAE,IAC5D,EAAE,WAAW,UAAU,IAAU,EAAE,MAAM,CAAC,EAAE,QAAQ,OAAO,EAAE,IAC1D,EAAE,QAAQ,OAAO,EAAE;AAC5B;AAMA,SAAgB,IAAgD;CAC1D,aAAO,UAAY,OAAe,CAAC,QAAQ,MAC/C,KAAK,IAAM,KAAO,GAAuB;EACvC,IAAM,IAAM,QAAQ,IAAI,IAAM,KAAK;EACnC,IAAI,GAAK,OAAO,EAA0B,CAAG;CAC/C;AAEF;AAEA,SAAS,EAAyB,GAAiB,GAAuC;CACxF,IAAM,IAAc,EAAQ,KAAK,EAAE,YAAY,EAAE,QAAQ,OAAO,EAAE,GAC5D,IAAW,EAAqB,YAAY;CAElD,OADI,MAAgB,IAAiB,CAAC,GAAG,CAAQ,IAC1C,EAAS,QAAQ,MAAM,EAAE,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ertyValue(value: unknown): string | undefined;
2
+ export declare function resolveSeedIdsFromRefString(s: string): {
3
+ seedLocalId?: string;
4
+ seedUid?: string;
5
+ };
6
+ //# sourceMappingURL=relationSeedRef.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relationSeedRef.d.ts","sourceRoot":"","sources":["../src/relationSeedRef.ts"],"names":[],"mappings":"AAaA,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAgBjF;AAID,wBAAgB,2BAA2B,CAAC,CAAC,EAAE,MAAM,GAAG;IACtD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CASA"}
@@ -0,0 +1,5 @@
1
+ /** Runtime stubs — graphql-codegen imports these as values but only uses them as types. */
2
+ export const TypedDocumentNode: undefined;
3
+ export const ResultOf: undefined;
4
+ export const DocumentTypeDecoration: undefined;
5
+ //# sourceMappingURL=typed-document-node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typed-document-node.d.ts","sourceRoot":"","sources":["../../src/shims/typed-document-node.js"],"names":[],"mappings":"AAAA,2FAA2F;AAC3F,0CAA0C;AAC1C,iCAAiC;AACjC,+CAA+C"}
@@ -0,0 +1,57 @@
1
+ import type { CreateTransactionInterface } from 'arweave/web';
2
+ /**
3
+ * Transaction presence / status as returned by {@link BaseArweaveClient.getTransactionStatus}.
4
+ * `confirmed` is only populated by mocks or legacy paths; gateway checks use HTTP status only.
5
+ */
6
+ export type TransactionStatus = {
7
+ status: number;
8
+ confirmed: {
9
+ block_height: number;
10
+ block_indep_hash: string;
11
+ number_of_confirmations: number;
12
+ } | null;
13
+ };
14
+ /**
15
+ * Transaction tag (name-value pair)
16
+ */
17
+ export type TransactionTag = {
18
+ name: string;
19
+ value: string;
20
+ };
21
+ /**
22
+ * Options for fetching transaction data
23
+ */
24
+ export type GetDataOptions = {
25
+ decode?: boolean;
26
+ string?: boolean;
27
+ };
28
+ /**
29
+ * Parameters for bulk file download operations
30
+ */
31
+ export type DownloadFilesParams = {
32
+ transactionIds: string[];
33
+ excludedTransactions?: Set<string>;
34
+ };
35
+ /**
36
+ * Result of a file download operation
37
+ */
38
+ export type DownloadResult = {
39
+ transactionId: string;
40
+ success: boolean;
41
+ contentType?: string;
42
+ data?: Uint8Array | string;
43
+ error?: string;
44
+ };
45
+ /**
46
+ * Arweave transaction interface (from arweave package)
47
+ */
48
+ export type ArweaveTransaction = Awaited<ReturnType<{
49
+ createTransaction(attributes: Partial<CreateTransactionInterface>): Promise<any>;
50
+ }['createTransaction']>>;
51
+ /**
52
+ * Options for creating a transaction
53
+ */
54
+ export type CreateTransactionOptions = {
55
+ tags?: TransactionTag[];
56
+ };
57
+ //# sourceMappingURL=arweave.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arweave.d.ts","sourceRoot":"","sources":["../../src/types/arweave.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;AAE7D;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE;QACT,YAAY,EAAE,MAAM,CAAA;QACpB,gBAAgB,EAAE,MAAM,CAAA;QACxB,uBAAuB,EAAE,MAAM,CAAA;KAChC,GAAG,IAAI,CAAA;CACT,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,cAAc,EAAE,MAAM,EAAE,CAAA;IACxB,oBAAoB,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CACnC,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,aAAa,EAAE,MAAM,CAAA;IACrB,OAAO,EAAE,OAAO,CAAA;IAChB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,UAAU,GAAG,MAAM,CAAA;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC,UAAU,CAAC;IAClD,iBAAiB,CAAC,UAAU,EAAE,OAAO,CAAC,0BAA0B,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAAA;CACjF,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAA;AAExB;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC,IAAI,CAAC,EAAE,cAAc,EAAE,CAAA;CACxB,CAAA"}
@@ -0,0 +1,44 @@
1
+ /** How Arweave / upload infrastructure is reached. */
2
+ export type SeedGatewayTransportMode = 'http-gateway' | 'hyper' | 'hybrid';
3
+ /** Which path {@link ResolvedSeedGatewayEndpoints} selected. */
4
+ export type SeedGatewayActivePath = 'http' | 'hyper-sidecar' | 'hybrid-fallback-http';
5
+ export interface SeedGatewayHyperConfig {
6
+ /** Operator infrastructure identity (z32). Empty = unset. */
7
+ gatewayHyperKey?: string;
8
+ /** Local sidecar bind host (client). Default 127.0.0.1 */
9
+ localSidecarHost?: string;
10
+ /** Local sidecar bind port (client). Default 1984 */
11
+ localSidecarPort?: number;
12
+ /** Probe sidecar before use in hybrid mode. Default true */
13
+ probeSidecar?: boolean;
14
+ }
15
+ export interface SeedGatewayConfig {
16
+ /** Default `http-gateway` */
17
+ transport?: SeedGatewayTransportMode;
18
+ /** HTTP gateway host (no scheme) — existing seed.config field also accepted at top level */
19
+ arweaveDomain?: string;
20
+ /** Upload API origin for publish apps (HTTP mode / hybrid fallback) */
21
+ uploadApiBaseUrl?: string;
22
+ hyper?: SeedGatewayHyperConfig;
23
+ /** Shorthand for `hyper.gatewayHyperKey` in seed.config */
24
+ gatewayHyperKey?: string;
25
+ /** Shorthand for `hyper.localSidecarHost` */
26
+ localSidecarHost?: string;
27
+ /** Shorthand for `hyper.localSidecarPort` */
28
+ localSidecarPort?: number;
29
+ /** Shorthand for `hyper.probeSidecar` */
30
+ probeSidecar?: boolean;
31
+ }
32
+ export interface ResolvedSeedGatewayEndpoints {
33
+ mode: SeedGatewayTransportMode;
34
+ /** Effective host for BaseArweaveClient (hostname:port, no scheme) */
35
+ arweaveHost: string;
36
+ arweaveProtocol: 'http' | 'https';
37
+ arweaveBaseUrl: string;
38
+ arweaveGraphqlUrl: string;
39
+ uploadApiBaseUrl: string;
40
+ activePath: SeedGatewayActivePath;
41
+ /** Operator Hyper key when configured */
42
+ gatewayHyperKey?: string;
43
+ }
44
+ //# sourceMappingURL=gateway.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gateway.d.ts","sourceRoot":"","sources":["../../src/types/gateway.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,MAAM,MAAM,wBAAwB,GAAG,cAAc,GAAG,OAAO,GAAG,QAAQ,CAAA;AAE1E,gEAAgE;AAChE,MAAM,MAAM,qBAAqB,GAAG,MAAM,GAAG,eAAe,GAAG,sBAAsB,CAAA;AAErF,MAAM,WAAW,sBAAsB;IACrC,6DAA6D;IAC7D,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,0DAA0D;IAC1D,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,qDAAqD;IACrD,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,4DAA4D;IAC5D,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB;AAED,MAAM,WAAW,iBAAiB;IAChC,6BAA6B;IAC7B,SAAS,CAAC,EAAE,wBAAwB,CAAA;IACpC,4FAA4F;IAC5F,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,uEAAuE;IACvE,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,KAAK,CAAC,EAAE,sBAAsB,CAAA;IAC9B,2DAA2D;IAC3D,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,6CAA6C;IAC7C,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,6CAA6C;IAC7C,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,yCAAyC;IACzC,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB;AAED,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,wBAAwB,CAAA;IAC9B,sEAAsE;IACtE,WAAW,EAAE,MAAM,CAAA;IACnB,eAAe,EAAE,MAAM,GAAG,OAAO,CAAA;IACjC,cAAc,EAAE,MAAM,CAAA;IACtB,iBAAiB,EAAE,MAAM,CAAA;IACzB,gBAAgB,EAAE,MAAM,CAAA;IACxB,UAAU,EAAE,qBAAqB,CAAA;IACjC,yCAAyC;IACzC,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB"}
@@ -0,0 +1,26 @@
1
+ import type { SeedGatewayHyperConfig, SeedGatewayTransportMode, SeedGatewayConfig } from './gateway.js';
2
+ /** Minimal seed.config shape for gateway resolution (SDK types are a superset). */
3
+ export type SeedConfigGatewayInput = {
4
+ arweaveDomain?: string;
5
+ uploadApiBaseUrl?: string;
6
+ gateway?: {
7
+ transport?: SeedGatewayTransportMode;
8
+ arweaveDomain?: string;
9
+ uploadApiBaseUrl?: string;
10
+ gatewayHyperKey?: string;
11
+ localSidecarHost?: string;
12
+ localSidecarPort?: number;
13
+ probeSidecar?: boolean;
14
+ hyper?: SeedGatewayHyperConfig;
15
+ };
16
+ };
17
+ export type ClientGatewayContextInput = {
18
+ arweaveDomain?: string;
19
+ uploadApiBaseUrl?: string;
20
+ gatewayTransport?: SeedGatewayTransportMode;
21
+ gatewayHyperKey?: string;
22
+ gatewaySidecarHost?: string;
23
+ gatewaySidecarPort?: number;
24
+ };
25
+ export type { SeedGatewayConfig };
26
+ //# sourceMappingURL=seedConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"seedConfig.d.ts","sourceRoot":"","sources":["../../src/types/seedConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAEvG,mFAAmF;AACnF,MAAM,MAAM,sBAAsB,GAAG;IACnC,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,OAAO,CAAC,EAAE;QACR,SAAS,CAAC,EAAE,wBAAwB,CAAA;QACpC,aAAa,CAAC,EAAE,MAAM,CAAA;QACtB,gBAAgB,CAAC,EAAE,MAAM,CAAA;QACzB,eAAe,CAAC,EAAE,MAAM,CAAA;QACxB,gBAAgB,CAAC,EAAE,MAAM,CAAA;QACzB,gBAAgB,CAAC,EAAE,MAAM,CAAA;QACzB,YAAY,CAAC,EAAE,OAAO,CAAA;QACtB,KAAK,CAAC,EAAE,sBAAsB,CAAA;KAC/B,CAAA;CACF,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG;IACtC,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,gBAAgB,CAAC,EAAE,wBAAwB,CAAA;IAC3C,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAC5B,CAAA;AAED,YAAY,EAAE,iBAAiB,EAAE,CAAA"}
package/package.json ADDED
@@ -0,0 +1,57 @@
1
+ {
2
+ "name": "@seedprotocol/arweave",
3
+ "version": "0.5.1",
4
+ "description": "Arweave gateway client and helpers for Seed Protocol",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "exports": {
8
+ ".": {
9
+ "import": {
10
+ "types": "./dist/index.d.ts",
11
+ "default": "./dist/index.js"
12
+ },
13
+ "require": {
14
+ "types": "./dist/index.d.ts",
15
+ "default": "./dist/index.js"
16
+ }
17
+ },
18
+ "./node": {
19
+ "import": {
20
+ "types": "./dist/node/index.d.ts",
21
+ "default": "./dist/node.js"
22
+ },
23
+ "require": {
24
+ "types": "./dist/node/index.d.ts",
25
+ "default": "./dist/node.js"
26
+ }
27
+ },
28
+ "./package.json": "./package.json"
29
+ },
30
+ "files": [
31
+ "dist"
32
+ ],
33
+ "scripts": {
34
+ "build": "rimraf dist && tsc -p tsconfig.build.json && vite build",
35
+ "test": "vitest run --reporter=default",
36
+ "prepublishOnly": "bun run build && node ../../scripts/sync-versions.js"
37
+ },
38
+ "dependencies": {
39
+ "@graphql-typed-document-node/core": "^3.2.0",
40
+ "arweave": "^1.15.5",
41
+ "debug": "^4.4.1",
42
+ "graphql": "^16.10.0",
43
+ "graphql-request": "^7.3.5"
44
+ },
45
+ "devDependencies": {
46
+ "@types/bun": "latest",
47
+ "rimraf": "^6.0.1",
48
+ "typescript": "~5.9.3",
49
+ "vite": "^8.0.0",
50
+ "vitest": "^3.0.0"
51
+ },
52
+ "author": "Keith Axline <keith@journodao.xyz>",
53
+ "license": "MIT",
54
+ "publishConfig": {
55
+ "access": "public"
56
+ }
57
+ }