@account-kit/infra 4.52.2 → 4.52.4

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.
@@ -114,7 +114,7 @@ export function alchemy(config) {
114
114
  overrides: [
115
115
  {
116
116
  methods: alchemyMethods,
117
- transport: http(rpcUrl, { fetchOptions }),
117
+ transport: http(rpcUrl, { fetchOptions, retryCount }),
118
118
  },
119
119
  {
120
120
  methods: chainAgnosticMethods,
@@ -149,8 +149,15 @@ export function alchemy(config) {
149
149
  return createTransport({
150
150
  key: "alchemy",
151
151
  name: "Alchemy Transport",
152
- request: innerTransport(opts).request,
153
- retryCount: retryCount ?? opts?.retryCount,
152
+ request: innerTransport({
153
+ ...opts,
154
+ // Retries are already handled above within the split transport,
155
+ // so `retryCount` must be 0 here for the expected behavior.
156
+ retryCount: 0,
157
+ }).request,
158
+ // Retries are already handled above within the split transport,
159
+ // so `retryCount` must be 0 here too for the expected behavior.
160
+ retryCount: 0,
154
161
  retryDelay,
155
162
  type: "alchemy",
156
163
  }, { alchemyRpcUrl: rpcUrl, fetchOptions });
@@ -1 +1 @@
1
- {"version":3,"file":"alchemyTransport.js","sourceRoot":"","sources":["../../src/alchemyTransport.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,KAAK,GAGN,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,eAAe,EACf,IAAI,GAOL,MAAM,MAAM,CAAC;AACd,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AAEzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAevC,MAAM,cAAc,GAAG;IACrB,uBAAuB;IACvB,8BAA8B;IAC9B,6BAA6B;IAC7B,4BAA4B;IAC5B,0BAA0B;IAC1B,8BAA8B;IAC9B,qBAAqB;IACrB,yBAAyB;IACzB,uCAAuC;CACxC,CAAC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O,CAAC,EAAE,CAAC;QAC3B,OAAO,OAAO,CAAC,MAAM,CACnB,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE;YACd,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YAC3B,OAAO,GAAG,CAAC;QACb,CAAC,EACD,EAA4B,CAC7B,CAAC;IACJ,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC","sourcesContent":["import {\n ChainNotFoundError,\n ConnectionConfigSchema,\n split,\n type ConnectionConfig,\n type NoUndefined,\n} from \"@aa-sdk/core\";\nimport {\n createTransport,\n http,\n type Chain,\n type EIP1193RequestFn,\n type HttpTransportConfig,\n type PublicRpcSchema,\n type Transport,\n type TransportConfig,\n} from \"viem\";\nimport { mutateRemoveTrackingHeaders } from \"./alchemyTrackerHeaders.js\";\nimport type { AlchemyRpcSchema } from \"./client/types.js\";\nimport { AlchemyChainSchema } from \"./schema.js\";\nimport { VERSION } from \"./version.js\";\n\ntype Never<T> = T extends object\n ? {\n [K in keyof T]?: never;\n }\n : never;\n\ntype AlchemyConnectionConfig = ConnectionConfig;\n\ntype SplitTransportConfig = {\n alchemyConnection: AlchemyConnectionConfig;\n nodeRpcUrl: string;\n};\n\nconst alchemyMethods = [\n \"eth_sendUserOperation\",\n \"eth_estimateUserOperationGas\",\n \"eth_getUserOperationReceipt\",\n \"eth_getUserOperationByHash\",\n \"eth_supportedEntryPoints\",\n \"rundler_maxPriorityFeePerGas\",\n \"pm_getPaymasterData\",\n \"pm_getPaymasterStubData\",\n \"alchemy_requestGasAndPaymasterAndData\",\n];\n\nconst chainAgnosticMethods = [\n \"wallet_prepareCalls\",\n \"wallet_sendPreparedCalls\",\n \"wallet_requestAccount\",\n \"wallet_createAccount\",\n \"wallet_listAccounts\",\n \"wallet_createSession\",\n \"wallet_getCallsStatus\",\n];\n\nexport type AlchemyTransportConfig = (\n | (AlchemyConnectionConfig & Never<SplitTransportConfig>)\n | (SplitTransportConfig & Never<AlchemyConnectionConfig>)\n) & {\n /** The max number of times to retry. */\n retryCount?: TransportConfig[\"retryCount\"] | undefined;\n /** The base delay (in ms) between retries. */\n retryDelay?: TransportConfig[\"retryDelay\"] | undefined;\n fetchOptions?: NoUndefined<HttpTransportConfig[\"fetchOptions\"]>;\n};\n\ntype AlchemyTransportBase = Transport<\n \"alchemy\",\n {\n alchemyRpcUrl: string;\n fetchOptions?: AlchemyTransportConfig[\"fetchOptions\"];\n },\n EIP1193RequestFn<[...PublicRpcSchema, ...AlchemyRpcSchema]>\n>;\n\nexport type AlchemyTransport = AlchemyTransportBase & {\n updateHeaders(newHeaders: HeadersInit): void;\n config: AlchemyTransportConfig;\n dynamicFetchOptions: AlchemyTransportConfig[\"fetchOptions\"];\n};\n\n/**\n * A type guard for the transport to determine if it is an Alchemy transport.\n * Used in cases where we would like to do switching depending on the transport, where there used\n * to be two clients for a alchemy and a non alchemy, and with this switch we don't need the two seperate clients. *\n *\n * @param {Transport} transport The transport to check\n * @param {Chain} chain Chain for the transport to run its function to return the transport config\n * @returns {boolean} `true` if the transport is an Alchemy transport, otherwise `false`\n */\nexport function isAlchemyTransport(\n transport: Transport,\n chain: Chain,\n): transport is AlchemyTransport {\n return transport({ chain }).config.type === \"alchemy\";\n}\n\n/**\n * Creates an Alchemy transport with the specified configuration options.\n * When sending all traffic to Alchemy, you must pass in one of rpcUrl, apiKey, or jwt.\n * If you want to send Bundler and Paymaster traffic to Alchemy and Node traffic to a different RPC, you must pass in alchemyConnection and nodeRpcUrl.\n *\n * @example\n * ### Basic Example\n * If the chain you're using is supported for both Bundler and Node RPCs, then you can do the following:\n * ```ts\n * import { alchemy } from \"@account-kit/infra\";\n *\n * const transport = alchemy({\n * // NOTE: you can also pass in an rpcUrl or jwt here or rpcUrl and jwt\n * apiKey: \"your-api-key\",\n * });\n * ```\n *\n * ### AA Only Chains\n * For AA-only chains, you need to specify the alchemyConnection and nodeRpcUrl since Alchemy only\n * handles the Bundler and Paymaster RPCs for these chains.\n * ```ts\n * import { alchemy } from \"@account-kit/infra\";\n *\n * const transport = alchemy({\n * alchemyConnection: {\n * apiKey: \"your-api-key\",\n * },\n * nodeRpcUrl: \"https://zora.rpc.url\",\n * });\n * ```\n *\n * @param {AlchemyTransportConfig} config The configuration object for the Alchemy transport.\n * @param {number} config.retryDelay Optional The delay between retries, in milliseconds.\n * @param {number} config.retryCount Optional The number of retry attempts.\n * @param {string} [config.alchemyConnection] Optional Alchemy connection configuration (if this is passed in, nodeRpcUrl is required).\n * @param {string} [config.fetchOptions] Optional fetch options for HTTP requests.\n * @param {string} [config.nodeRpcUrl] Optional RPC URL for node (if this is passed in, alchemyConnection is required).\n * @param {string} [config.rpcUrl] Optional RPC URL.\n * @param {string} [config.apiKey] Optional API key for Alchemy.\n * @param {string} [config.jwt] Optional JSON Web Token for authorization.\n * @returns {AlchemyTransport} The configured Alchemy transport object.\n */\nexport function alchemy(config: AlchemyTransportConfig): AlchemyTransport {\n const { retryDelay, retryCount = 0 } = config;\n // we create a copy here in case we create a split transport down below\n // we don't want to add alchemy headers to 3rd party nodes\n const fetchOptions = { ...config.fetchOptions };\n\n const connectionConfig = ConnectionConfigSchema.parse(\n config.alchemyConnection ?? config,\n );\n\n const headersAsObject = convertHeadersToObject(fetchOptions.headers);\n\n // TODO: we probably should just log these headers during telemetry logging instead of doing this mutable header stuff\n fetchOptions.headers = {\n ...headersAsObject,\n \"Alchemy-AA-Sdk-Version\": VERSION,\n };\n\n if (connectionConfig.jwt != null || connectionConfig.apiKey != null) {\n fetchOptions.headers = {\n ...fetchOptions.headers,\n Authorization: `Bearer ${\n connectionConfig.jwt ?? connectionConfig.apiKey\n }`,\n };\n }\n\n const transport: AlchemyTransportBase = (opts) => {\n const { chain: chain_ } = opts;\n if (!chain_) {\n throw new ChainNotFoundError();\n }\n const chain = AlchemyChainSchema.parse(chain_);\n\n const rpcUrl =\n connectionConfig.rpcUrl == null\n ? chain.rpcUrls.alchemy.http[0]\n : connectionConfig.rpcUrl;\n\n const chainAgnosticRpcUrl =\n connectionConfig.rpcUrl == null\n ? \"https://api.g.alchemy.com/v2\"\n : (connectionConfig.chainAgnosticUrl ?? connectionConfig.rpcUrl);\n\n const innerTransport = (() => {\n mutateRemoveTrackingHeaders(config?.fetchOptions?.headers);\n if (config.alchemyConnection && config.nodeRpcUrl) {\n return split({\n overrides: [\n {\n methods: alchemyMethods,\n transport: http(rpcUrl, { fetchOptions }),\n },\n {\n methods: chainAgnosticMethods,\n transport: http(chainAgnosticRpcUrl, {\n fetchOptions,\n retryCount,\n retryDelay,\n }),\n },\n ],\n fallback: http(config.nodeRpcUrl, {\n fetchOptions: config.fetchOptions,\n retryCount,\n retryDelay,\n }),\n });\n }\n\n return split({\n overrides: [\n {\n methods: chainAgnosticMethods,\n transport: http(chainAgnosticRpcUrl, {\n fetchOptions,\n retryCount,\n retryDelay,\n }),\n },\n ],\n fallback: http(rpcUrl, { fetchOptions, retryCount, retryDelay }),\n });\n })();\n\n return createTransport(\n {\n key: \"alchemy\",\n name: \"Alchemy Transport\",\n request: innerTransport(opts).request,\n retryCount: retryCount ?? opts?.retryCount,\n retryDelay,\n type: \"alchemy\",\n },\n { alchemyRpcUrl: rpcUrl, fetchOptions },\n );\n };\n\n return Object.assign(transport, {\n dynamicFetchOptions: fetchOptions,\n updateHeaders(newHeaders_: HeadersInit) {\n const newHeaders = convertHeadersToObject(newHeaders_);\n\n fetchOptions.headers = {\n ...fetchOptions.headers,\n ...newHeaders,\n };\n },\n config,\n });\n}\n\nexport const convertHeadersToObject = (\n headers?: HeadersInit,\n): Record<string, string> => {\n if (!headers) {\n return {};\n }\n\n if (headers instanceof Headers) {\n const headersObject = {} as Record<string, string>;\n headers.forEach((value, key) => {\n headersObject[key] = value;\n });\n return headersObject;\n }\n\n if (Array.isArray(headers)) {\n return headers.reduce(\n (acc, header) => {\n acc[header[0]] = header[1];\n return acc;\n },\n {} as Record<string, string>,\n );\n }\n\n return headers;\n};\n"]}
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AAM,UAAU,GAAG,sBAAsB,CAAC,WAAW,CAAC,CAAC;YAEvD,YAAY,CAAC,OAAO,GAAG;gBACrB,GAAG,YAAY,CAAC,OAAO;gBACvB,GAAG,UAAU;aACd,CAAC;QACJ,CAAC;QACD,MAAM;KACP,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,MAAM,sBAAsB,GAAG,CACpC,OAAqB,EACG,EAAE;IAC1B,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,IAAI,OAAO,YAAY,OAAO,EAAE,CAAC;QAC/B,MAAM,aAAa,GAAG,EAA4B,CAAC;QACnD,OAAO,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;YAC7B,aAAa,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QAC7B,CAAC,CAAC,CAAC;QACH,OAAO,aAAa,CAAC;IACvB,CAAC;IAED,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;QAC3B,OAAO,OAAO,CAAC,MAAM,CACnB,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE;YACd,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YAC3B,OAAO,GAAG,CAAC;QACb,CAAC,EACD,EAA4B,CAC7B,CAAC;IACJ,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC","sourcesContent":["import {\n ChainNotFoundError,\n ConnectionConfigSchema,\n split,\n type ConnectionConfig,\n type NoUndefined,\n} from \"@aa-sdk/core\";\nimport {\n createTransport,\n http,\n type Chain,\n type EIP1193RequestFn,\n type HttpTransportConfig,\n type PublicRpcSchema,\n type Transport,\n type TransportConfig,\n} from \"viem\";\nimport { mutateRemoveTrackingHeaders } from \"./alchemyTrackerHeaders.js\";\nimport type { AlchemyRpcSchema } from \"./client/types.js\";\nimport { AlchemyChainSchema } from \"./schema.js\";\nimport { VERSION } from \"./version.js\";\n\ntype Never<T> = T extends object\n ? {\n [K in keyof T]?: never;\n }\n : never;\n\ntype AlchemyConnectionConfig = ConnectionConfig;\n\ntype SplitTransportConfig = {\n alchemyConnection: AlchemyConnectionConfig;\n nodeRpcUrl: string;\n};\n\nconst alchemyMethods = [\n \"eth_sendUserOperation\",\n \"eth_estimateUserOperationGas\",\n \"eth_getUserOperationReceipt\",\n \"eth_getUserOperationByHash\",\n \"eth_supportedEntryPoints\",\n \"rundler_maxPriorityFeePerGas\",\n \"pm_getPaymasterData\",\n \"pm_getPaymasterStubData\",\n \"alchemy_requestGasAndPaymasterAndData\",\n];\n\nconst chainAgnosticMethods = [\n \"wallet_prepareCalls\",\n \"wallet_sendPreparedCalls\",\n \"wallet_requestAccount\",\n \"wallet_createAccount\",\n \"wallet_listAccounts\",\n \"wallet_createSession\",\n \"wallet_getCallsStatus\",\n];\n\nexport type AlchemyTransportConfig = (\n | (AlchemyConnectionConfig & Never<SplitTransportConfig>)\n | (SplitTransportConfig & Never<AlchemyConnectionConfig>)\n) & {\n /** The max number of times to retry. */\n retryCount?: TransportConfig[\"retryCount\"] | undefined;\n /** The base delay (in ms) between retries. */\n retryDelay?: TransportConfig[\"retryDelay\"] | undefined;\n fetchOptions?: NoUndefined<HttpTransportConfig[\"fetchOptions\"]>;\n};\n\ntype AlchemyTransportBase = Transport<\n \"alchemy\",\n {\n alchemyRpcUrl: string;\n fetchOptions?: AlchemyTransportConfig[\"fetchOptions\"];\n },\n EIP1193RequestFn<[...PublicRpcSchema, ...AlchemyRpcSchema]>\n>;\n\nexport type AlchemyTransport = AlchemyTransportBase & {\n updateHeaders(newHeaders: HeadersInit): void;\n config: AlchemyTransportConfig;\n dynamicFetchOptions: AlchemyTransportConfig[\"fetchOptions\"];\n};\n\n/**\n * A type guard for the transport to determine if it is an Alchemy transport.\n * Used in cases where we would like to do switching depending on the transport, where there used\n * to be two clients for a alchemy and a non alchemy, and with this switch we don't need the two seperate clients. *\n *\n * @param {Transport} transport The transport to check\n * @param {Chain} chain Chain for the transport to run its function to return the transport config\n * @returns {boolean} `true` if the transport is an Alchemy transport, otherwise `false`\n */\nexport function isAlchemyTransport(\n transport: Transport,\n chain: Chain,\n): transport is AlchemyTransport {\n return transport({ chain }).config.type === \"alchemy\";\n}\n\n/**\n * Creates an Alchemy transport with the specified configuration options.\n * When sending all traffic to Alchemy, you must pass in one of rpcUrl, apiKey, or jwt.\n * If you want to send Bundler and Paymaster traffic to Alchemy and Node traffic to a different RPC, you must pass in alchemyConnection and nodeRpcUrl.\n *\n * @example\n * ### Basic Example\n * If the chain you're using is supported for both Bundler and Node RPCs, then you can do the following:\n * ```ts\n * import { alchemy } from \"@account-kit/infra\";\n *\n * const transport = alchemy({\n * // NOTE: you can also pass in an rpcUrl or jwt here or rpcUrl and jwt\n * apiKey: \"your-api-key\",\n * });\n * ```\n *\n * ### AA Only Chains\n * For AA-only chains, you need to specify the alchemyConnection and nodeRpcUrl since Alchemy only\n * handles the Bundler and Paymaster RPCs for these chains.\n * ```ts\n * import { alchemy } from \"@account-kit/infra\";\n *\n * const transport = alchemy({\n * alchemyConnection: {\n * apiKey: \"your-api-key\",\n * },\n * nodeRpcUrl: \"https://zora.rpc.url\",\n * });\n * ```\n *\n * @param {AlchemyTransportConfig} config The configuration object for the Alchemy transport.\n * @param {number} config.retryDelay Optional The delay between retries, in milliseconds.\n * @param {number} config.retryCount Optional The number of retry attempts.\n * @param {string} [config.alchemyConnection] Optional Alchemy connection configuration (if this is passed in, nodeRpcUrl is required).\n * @param {string} [config.fetchOptions] Optional fetch options for HTTP requests.\n * @param {string} [config.nodeRpcUrl] Optional RPC URL for node (if this is passed in, alchemyConnection is required).\n * @param {string} [config.rpcUrl] Optional RPC URL.\n * @param {string} [config.apiKey] Optional API key for Alchemy.\n * @param {string} [config.jwt] Optional JSON Web Token for authorization.\n * @returns {AlchemyTransport} The configured Alchemy transport object.\n */\nexport function alchemy(config: AlchemyTransportConfig): AlchemyTransport {\n const { retryDelay, retryCount = 0 } = config;\n // we create a copy here in case we create a split transport down below\n // we don't want to add alchemy headers to 3rd party nodes\n const fetchOptions = { ...config.fetchOptions };\n\n const connectionConfig = ConnectionConfigSchema.parse(\n config.alchemyConnection ?? config,\n );\n\n const headersAsObject = convertHeadersToObject(fetchOptions.headers);\n\n // TODO: we probably should just log these headers during telemetry logging instead of doing this mutable header stuff\n fetchOptions.headers = {\n ...headersAsObject,\n \"Alchemy-AA-Sdk-Version\": VERSION,\n };\n\n if (connectionConfig.jwt != null || connectionConfig.apiKey != null) {\n fetchOptions.headers = {\n ...fetchOptions.headers,\n Authorization: `Bearer ${\n connectionConfig.jwt ?? connectionConfig.apiKey\n }`,\n };\n }\n\n const transport: AlchemyTransportBase = (opts) => {\n const { chain: chain_ } = opts;\n if (!chain_) {\n throw new ChainNotFoundError();\n }\n const chain = AlchemyChainSchema.parse(chain_);\n\n const rpcUrl =\n connectionConfig.rpcUrl == null\n ? chain.rpcUrls.alchemy.http[0]\n : connectionConfig.rpcUrl;\n\n const chainAgnosticRpcUrl =\n connectionConfig.rpcUrl == null\n ? \"https://api.g.alchemy.com/v2\"\n : (connectionConfig.chainAgnosticUrl ?? connectionConfig.rpcUrl);\n\n const innerTransport = (() => {\n mutateRemoveTrackingHeaders(config?.fetchOptions?.headers);\n if (config.alchemyConnection && config.nodeRpcUrl) {\n return split({\n overrides: [\n {\n methods: alchemyMethods,\n transport: http(rpcUrl, { fetchOptions, retryCount }),\n },\n {\n methods: chainAgnosticMethods,\n transport: http(chainAgnosticRpcUrl, {\n fetchOptions,\n retryCount,\n retryDelay,\n }),\n },\n ],\n fallback: http(config.nodeRpcUrl, {\n fetchOptions: config.fetchOptions,\n retryCount,\n retryDelay,\n }),\n });\n }\n\n return split({\n overrides: [\n {\n methods: chainAgnosticMethods,\n transport: http(chainAgnosticRpcUrl, {\n fetchOptions,\n retryCount,\n retryDelay,\n }),\n },\n ],\n fallback: http(rpcUrl, { fetchOptions, retryCount, retryDelay }),\n });\n })();\n\n return createTransport(\n {\n key: \"alchemy\",\n name: \"Alchemy Transport\",\n request: innerTransport({\n ...opts,\n // Retries are already handled above within the split transport,\n // so `retryCount` must be 0 here for the expected behavior.\n retryCount: 0,\n }).request,\n // Retries are already handled above within the split transport,\n // so `retryCount` must be 0 here too for the expected behavior.\n retryCount: 0,\n retryDelay,\n type: \"alchemy\",\n },\n { alchemyRpcUrl: rpcUrl, fetchOptions },\n );\n };\n\n return Object.assign(transport, {\n dynamicFetchOptions: fetchOptions,\n updateHeaders(newHeaders_: HeadersInit) {\n const newHeaders = convertHeadersToObject(newHeaders_);\n\n fetchOptions.headers = {\n ...fetchOptions.headers,\n ...newHeaders,\n };\n },\n config,\n });\n}\n\nexport const convertHeadersToObject = (\n headers?: HeadersInit,\n): Record<string, string> => {\n if (!headers) {\n return {};\n }\n\n if (headers instanceof Headers) {\n const headersObject = {} as Record<string, string>;\n headers.forEach((value, key) => {\n headersObject[key] = value;\n });\n return headersObject;\n }\n\n if (Array.isArray(headers)) {\n return headers.reduce(\n (acc, header) => {\n acc[header[0]] = header[1];\n return acc;\n },\n {} as Record<string, string>,\n );\n }\n\n return headers;\n};\n"]}
@@ -1 +1 @@
1
- export declare const VERSION = "4.52.2";
1
+ export declare const VERSION = "4.52.4";
@@ -1,4 +1,4 @@
1
1
  // This file is autogenerated by inject-version.ts. Any changes will be
2
2
  // overwritten on commit!
3
- export const VERSION = "4.52.2";
3
+ export const VERSION = "4.52.4";
4
4
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,yBAAyB;AACzB,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC","sourcesContent":["// This file is autogenerated by inject-version.ts. Any changes will be\n// overwritten on commit!\nexport const VERSION = \"4.52.2\";\n"]}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,yBAAyB;AACzB,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC","sourcesContent":["// This file is autogenerated by inject-version.ts. Any changes will be\n// overwritten on commit!\nexport const VERSION = \"4.52.4\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"alchemyTransport.d.ts","sourceRoot":"","sources":["../../src/alchemyTransport.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,gBAAgB,EACrB,KAAK,WAAW,EACjB,MAAM,cAAc,CAAC;AACtB,OAAO,EAGL,KAAK,KAAK,EACV,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,KAAK,eAAe,EACrB,MAAM,MAAM,CAAC;AAEd,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAI1D,KAAK,KAAK,CAAC,CAAC,IAAI,CAAC,SAAS,MAAM,GAC5B;KACG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK;CACvB,GACD,KAAK,CAAC;AAEV,KAAK,uBAAuB,GAAG,gBAAgB,CAAC;AAEhD,KAAK,oBAAoB,GAAG;IAC1B,iBAAiB,EAAE,uBAAuB,CAAC;IAC3C,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAwBF,MAAM,MAAM,sBAAsB,GAAG,CACjC,CAAC,uBAAuB,GAAG,KAAK,CAAC,oBAAoB,CAAC,CAAC,GACvD,CAAC,oBAAoB,GAAG,KAAK,CAAC,uBAAuB,CAAC,CAAC,CAC1D,GAAG;IACF,wCAAwC;IACxC,UAAU,CAAC,EAAE,eAAe,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC;IACvD,8CAA8C;IAC9C,UAAU,CAAC,EAAE,eAAe,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC;IACvD,YAAY,CAAC,EAAE,WAAW,CAAC,mBAAmB,CAAC,cAAc,CAAC,CAAC,CAAC;CACjE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AAO,CAAC,MAAM,EAAE,sBAAsB,GAAG,gBAAgB,CAqHxE;AAED,eAAO,MAAM,sBAAsB,GACjC,UAAU,WAAW,KACpB,MAAM,CAAC,MAAM,EAAE,MAAM,CAwBvB,CAAC"}
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "4.52.2";
1
+ export declare const VERSION = "4.52.4";
2
2
  //# sourceMappingURL=version.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@account-kit/infra",
3
- "version": "4.52.2",
3
+ "version": "4.52.4",
4
4
  "description": "adapters for @aa-sdk/core for interacting with alchemy services",
5
5
  "author": "Alchemy",
6
6
  "license": "MIT",
@@ -43,8 +43,8 @@
43
43
  "typescript-template": "*"
44
44
  },
45
45
  "dependencies": {
46
- "@aa-sdk/core": "^4.52.2",
47
- "@account-kit/logging": "^4.52.2",
46
+ "@aa-sdk/core": "^4.52.4",
47
+ "@account-kit/logging": "^4.52.4",
48
48
  "eventemitter3": "^5.0.1",
49
49
  "zod": "^3.22.4"
50
50
  },
@@ -63,7 +63,7 @@
63
63
  "url": "https://github.com/alchemyplatform/aa-sdk/issues"
64
64
  },
65
65
  "homepage": "https://github.com/alchemyplatform/aa-sdk#readme",
66
- "gitHead": "50a4668dbfd90783fb5f546132bf7f114b680580",
66
+ "gitHead": "313c33fc5987d77963a3187c93da45ab416a4bb8",
67
67
  "optionalDependencies": {
68
68
  "alchemy-sdk": "^3.0.0"
69
69
  }
@@ -190,7 +190,7 @@ export function alchemy(config: AlchemyTransportConfig): AlchemyTransport {
190
190
  overrides: [
191
191
  {
192
192
  methods: alchemyMethods,
193
- transport: http(rpcUrl, { fetchOptions }),
193
+ transport: http(rpcUrl, { fetchOptions, retryCount }),
194
194
  },
195
195
  {
196
196
  methods: chainAgnosticMethods,
@@ -228,8 +228,15 @@ export function alchemy(config: AlchemyTransportConfig): AlchemyTransport {
228
228
  {
229
229
  key: "alchemy",
230
230
  name: "Alchemy Transport",
231
- request: innerTransport(opts).request,
232
- retryCount: retryCount ?? opts?.retryCount,
231
+ request: innerTransport({
232
+ ...opts,
233
+ // Retries are already handled above within the split transport,
234
+ // so `retryCount` must be 0 here for the expected behavior.
235
+ retryCount: 0,
236
+ }).request,
237
+ // Retries are already handled above within the split transport,
238
+ // so `retryCount` must be 0 here too for the expected behavior.
239
+ retryCount: 0,
233
240
  retryDelay,
234
241
  type: "alchemy",
235
242
  },
package/src/version.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  // This file is autogenerated by inject-version.ts. Any changes will be
2
2
  // overwritten on commit!
3
- export const VERSION = "4.52.2";
3
+ export const VERSION = "4.52.4";