@account-kit/privy-integration 4.72.0 → 4.73.0

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.
package/README.md CHANGED
@@ -32,6 +32,26 @@ yarn add @account-kit/privy-integration
32
32
  pnpm add @account-kit/privy-integration
33
33
  ```
34
34
 
35
+ ### Optional: Solana Support
36
+
37
+ To use Solana features (like `useAlchemySolanaTransaction`), you'll need to install the Solana Web3.js library:
38
+
39
+ ```bash
40
+ npm install @solana/web3.js
41
+ # or
42
+ yarn add @solana/web3.js
43
+ # or
44
+ pnpm add @solana/web3.js
45
+ ```
46
+
47
+ Then import from the `/solana` export:
48
+
49
+ ```tsx
50
+ import { useAlchemySolanaTransaction } from "@account-kit/privy-integration/solana";
51
+ ```
52
+
53
+ > **Note:** The Solana functionality is completely optional. If you only need EVM features, you don't need to install `@solana/web3.js`.
54
+
35
55
  ## Quick Start
36
56
 
37
57
  ### 1. Wrap Your App with Both Providers
@@ -170,7 +190,7 @@ function SwapButton() {
170
190
  ### 4. Send Solana Transactions
171
191
 
172
192
  ```tsx
173
- import { useAlchemySolanaTransaction } from "@account-kit/privy-integration";
193
+ import { useAlchemySolanaTransaction } from "@account-kit/privy-integration/solana";
174
194
 
175
195
  function SolanaSendButton() {
176
196
  const { sendTransactionAsync, isPending, error, data } =
@@ -3,5 +3,4 @@ export { useAlchemyClient } from "./hooks/useAlchemyClient.js";
3
3
  export { useAlchemySendTransaction } from "./hooks/useAlchemySendTransaction.js";
4
4
  export { useAlchemyPrepareSwap } from "./hooks/useAlchemyPrepareSwap.js";
5
5
  export { useAlchemySubmitSwap } from "./hooks/useAlchemySubmitSwap.js";
6
- export { useAlchemySolanaTransaction } from "./hooks/useAlchemySolanaTransaction.js";
7
6
  export type { AlchemyProviderConfig, UnsignedTransactionRequest, SendTransactionOptions, SendTransactionResult, UseSendTransactionResult, PrepareSwapRequest, PrepareSwapResult, UsePrepareSwapResult, SubmitSwapResult, UseSubmitSwapResult, SwapQuote, } from "./types.js";
package/dist/esm/index.js CHANGED
@@ -5,5 +5,4 @@ export { useAlchemyClient } from "./hooks/useAlchemyClient.js";
5
5
  export { useAlchemySendTransaction } from "./hooks/useAlchemySendTransaction.js";
6
6
  export { useAlchemyPrepareSwap } from "./hooks/useAlchemyPrepareSwap.js";
7
7
  export { useAlchemySubmitSwap } from "./hooks/useAlchemySubmitSwap.js";
8
- export { useAlchemySolanaTransaction } from "./hooks/useAlchemySolanaTransaction.js";
9
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,WAAW;AACX,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAElE,QAAQ;AACR,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,2BAA2B,EAAE,MAAM,wCAAwC,CAAC","sourcesContent":["// Provider\nexport { AlchemyProvider, useAlchemyConfig } from \"./Provider.js\";\n\n// Hooks\nexport { useAlchemyClient } from \"./hooks/useAlchemyClient.js\";\nexport { useAlchemySendTransaction } from \"./hooks/useAlchemySendTransaction.js\";\nexport { useAlchemyPrepareSwap } from \"./hooks/useAlchemyPrepareSwap.js\";\nexport { useAlchemySubmitSwap } from \"./hooks/useAlchemySubmitSwap.js\";\nexport { useAlchemySolanaTransaction } from \"./hooks/useAlchemySolanaTransaction.js\";\n\n// Types\nexport type {\n AlchemyProviderConfig,\n UnsignedTransactionRequest,\n SendTransactionOptions,\n SendTransactionResult,\n UseSendTransactionResult,\n PrepareSwapRequest,\n PrepareSwapResult,\n UsePrepareSwapResult,\n SubmitSwapResult,\n UseSubmitSwapResult,\n SwapQuote,\n} from \"./types.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,WAAW;AACX,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAElE,QAAQ;AACR,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC","sourcesContent":["// Provider\nexport { AlchemyProvider, useAlchemyConfig } from \"./Provider.js\";\n\n// Hooks\nexport { useAlchemyClient } from \"./hooks/useAlchemyClient.js\";\nexport { useAlchemySendTransaction } from \"./hooks/useAlchemySendTransaction.js\";\nexport { useAlchemyPrepareSwap } from \"./hooks/useAlchemyPrepareSwap.js\";\nexport { useAlchemySubmitSwap } from \"./hooks/useAlchemySubmitSwap.js\";\n\n// Types\nexport type {\n AlchemyProviderConfig,\n UnsignedTransactionRequest,\n SendTransactionOptions,\n SendTransactionResult,\n UseSendTransactionResult,\n PrepareSwapRequest,\n PrepareSwapResult,\n UsePrepareSwapResult,\n SubmitSwapResult,\n UseSubmitSwapResult,\n SwapQuote,\n} from \"./types.js\";\n"]}
@@ -0,0 +1,2 @@
1
+ export { useAlchemySolanaTransaction } from "./hooks/useAlchemySolanaTransaction.js";
2
+ export type { PromiseOrValue, PreSend, TransformInstruction, SolanaTransactionParamOptions, SolanaTransactionParams, SolanaTransactionResult, UseAlchemySolanaTransactionOptions, UseAlchemySolanaTransactionResult, } from "./hooks/useAlchemySolanaTransaction.js";
@@ -0,0 +1,5 @@
1
+ // Solana-specific exports
2
+ // Import from '@account-kit/privy-integration/solana' to use Solana functionality
3
+ // This ensures @solana/web3.js is only loaded when explicitly needed
4
+ export { useAlchemySolanaTransaction } from "./hooks/useAlchemySolanaTransaction.js";
5
+ //# sourceMappingURL=solana.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"solana.js","sourceRoot":"","sources":["../../src/solana.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAC1B,kFAAkF;AAClF,qEAAqE;AAErE,OAAO,EAAE,2BAA2B,EAAE,MAAM,wCAAwC,CAAC","sourcesContent":["// Solana-specific exports\n// Import from '@account-kit/privy-integration/solana' to use Solana functionality\n// This ensures @solana/web3.js is only loaded when explicitly needed\n\nexport { useAlchemySolanaTransaction } from \"./hooks/useAlchemySolanaTransaction.js\";\n\nexport type {\n PromiseOrValue,\n PreSend,\n TransformInstruction,\n SolanaTransactionParamOptions,\n SolanaTransactionParams,\n SolanaTransactionResult,\n UseAlchemySolanaTransactionOptions,\n UseAlchemySolanaTransactionResult,\n} from \"./hooks/useAlchemySolanaTransaction.js\";\n"]}
@@ -37,6 +37,7 @@ export async function createSolanaSponsoredTransaction(instructions, connection,
37
37
  headers: {
38
38
  accept: "application/json",
39
39
  "content-type": "application/json",
40
+ "X-Alchemy-Client-Breadcrumb": "privyIntegrationSdk",
40
41
  },
41
42
  body,
42
43
  };
@@ -1 +1 @@
1
- {"version":3,"file":"createSolanaSponsoredTransaction.js","sourceRoot":"","sources":["../../../src/util/createSolanaSponsoredTransaction.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,SAAS,EACT,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,iBAAiB,CAAC;AAEzB;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,gCAAgC,CACpD,YAAsC,EACtC,UAAsB,EACtB,QAAgB,EAChB,OAAe;IAEf,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,UAAU,CAAC,kBAAkB,CAAC;QACxD,UAAU,EAAE,WAAW;KACxB,CAAC,CAAC;IACH,MAAM,OAAO,GAAG,IAAI,kBAAkB,CAAC;QACrC,4EAA4E;QAC5E,QAAQ,EAAE,IAAI,SAAS,CAAC,OAAO,CAAC;QAChC,eAAe,EAAE,SAAS;QAC1B,YAAY;KACb,CAAC,CAAC,kBAAkB,EAAE,CAAC;IACxB,MAAM,oBAAoB,GAAG,IAAI,oBAAoB,CAAC,OAAO,CAAC,CAAC;IAC/D,MAAM,qBAAqB,GAAG,MAAM,CAAC,IAAI,CACvC,oBAAoB,CAAC,SAAS,EAAE,CACjC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACrB,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC;QAC1B,EAAE,EACA,MAAM,EAAE,UAAU,EAAE;YACpB,GAAG,IAAI,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,MAAM,CAAC,gBAAgB,CAAC,EAAE;QACxE,OAAO,EAAE,KAAK;QACd,MAAM,EAAE,yBAAyB;QACjC,MAAM,EAAE;YACN;gBACE,QAAQ;gBACR,qBAAqB;aACtB;SACF;KACF,CAAC,CAAC;IACH,MAAM,OAAO,GAAG;QACd,MAAM,EAAE,MAAM;QACd,OAAO,EAAE;YACP,MAAM,EAAE,kBAAkB;YAC1B,cAAc,EAAE,kBAAkB;SACnC;QACD,IAAI;KACL,CAAC;IAEF,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,UAAU,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAC9D,MAAM,YAAY,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;IAC3C,IAAI,CAAC,YAAY,EAAE,MAAM,EAAE,qBAAqB;QAC9C,MAAM,IAAI,KAAK,CACb,sDAAsD,IAAI,CAAC,SAAS,CAClE,YAAY,CACb,EAAE,CACJ,CAAC;IACJ,OAAO,oBAAoB,CAAC,WAAW,CACrC,YAAY,CAAC,YAAY,CAAC,MAAM,CAAC,qBAAqB,CAAC,CACxD,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CAAC,qBAA6B;IACjD,OAAO,MAAM,CAAC,IAAI,CAAC,qBAAqB,EAAE,QAAQ,CAAC,CAAC;AACtD,CAAC","sourcesContent":["import type { TransactionInstruction } from \"@solana/web3.js\";\nimport {\n Connection,\n PublicKey,\n TransactionMessage,\n VersionedTransaction,\n} from \"@solana/web3.js\";\n\n/**\n * This function wraps instructions in a sponsored transaction using Alchemy's fee payer service\n *\n * @param {TransactionInstruction[]} instructions - The instructions to add sponsorship to\n * @param {Connection} connection - The connection to use\n * @param {string} policyId - The policy id to use\n * @param {string} address - The address to use\n * @returns {Promise<VersionedTransaction>} - The sponsored transaction\n */\nexport async function createSolanaSponsoredTransaction(\n instructions: TransactionInstruction[],\n connection: Connection,\n policyId: string,\n address: string,\n): Promise<VersionedTransaction> {\n const { blockhash } = await connection.getLatestBlockhash({\n commitment: \"finalized\",\n });\n const message = new TransactionMessage({\n // Right now the backend will rewrite this payer Key to the server's address\n payerKey: new PublicKey(address),\n recentBlockhash: blockhash,\n instructions,\n }).compileToV0Message();\n const versionedTransaction = new VersionedTransaction(message);\n const serializedTransaction = Buffer.from(\n versionedTransaction.serialize(),\n ).toString(\"base64\");\n const body = JSON.stringify({\n id:\n crypto?.randomUUID() ??\n `${Date.now()}-${Math.floor(Math.random() * Number.MAX_SAFE_INTEGER)}`,\n jsonrpc: \"2.0\",\n method: \"alchemy_requestFeePayer\",\n params: [\n {\n policyId,\n serializedTransaction,\n },\n ],\n });\n const options = {\n method: \"POST\",\n headers: {\n accept: \"application/json\",\n \"content-type\": \"application/json\",\n },\n body,\n };\n\n const response = await fetch(connection.rpcEndpoint, options);\n const jsonResponse = await response.json();\n if (!jsonResponse?.result?.serializedTransaction)\n throw new Error(\n `Response doesn't include the serializedTransaction ${JSON.stringify(\n jsonResponse,\n )}`,\n );\n return VersionedTransaction.deserialize(\n decodeBase64(jsonResponse.result.serializedTransaction),\n );\n}\n\nfunction decodeBase64(serializedTransaction: string): Uint8Array {\n return Buffer.from(serializedTransaction, \"base64\");\n}\n"]}
1
+ {"version":3,"file":"createSolanaSponsoredTransaction.js","sourceRoot":"","sources":["../../../src/util/createSolanaSponsoredTransaction.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,SAAS,EACT,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,iBAAiB,CAAC;AAEzB;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,gCAAgC,CACpD,YAAsC,EACtC,UAAsB,EACtB,QAAgB,EAChB,OAAe;IAEf,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,UAAU,CAAC,kBAAkB,CAAC;QACxD,UAAU,EAAE,WAAW;KACxB,CAAC,CAAC;IACH,MAAM,OAAO,GAAG,IAAI,kBAAkB,CAAC;QACrC,4EAA4E;QAC5E,QAAQ,EAAE,IAAI,SAAS,CAAC,OAAO,CAAC;QAChC,eAAe,EAAE,SAAS;QAC1B,YAAY;KACb,CAAC,CAAC,kBAAkB,EAAE,CAAC;IACxB,MAAM,oBAAoB,GAAG,IAAI,oBAAoB,CAAC,OAAO,CAAC,CAAC;IAC/D,MAAM,qBAAqB,GAAG,MAAM,CAAC,IAAI,CACvC,oBAAoB,CAAC,SAAS,EAAE,CACjC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACrB,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC;QAC1B,EAAE,EACA,MAAM,EAAE,UAAU,EAAE;YACpB,GAAG,IAAI,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,MAAM,CAAC,gBAAgB,CAAC,EAAE;QACxE,OAAO,EAAE,KAAK;QACd,MAAM,EAAE,yBAAyB;QACjC,MAAM,EAAE;YACN;gBACE,QAAQ;gBACR,qBAAqB;aACtB;SACF;KACF,CAAC,CAAC;IACH,MAAM,OAAO,GAAG;QACd,MAAM,EAAE,MAAM;QACd,OAAO,EAAE;YACP,MAAM,EAAE,kBAAkB;YAC1B,cAAc,EAAE,kBAAkB;YAClC,6BAA6B,EAAE,qBAAqB;SACrD;QACD,IAAI;KACL,CAAC;IAEF,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,UAAU,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAC9D,MAAM,YAAY,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;IAC3C,IAAI,CAAC,YAAY,EAAE,MAAM,EAAE,qBAAqB;QAC9C,MAAM,IAAI,KAAK,CACb,sDAAsD,IAAI,CAAC,SAAS,CAClE,YAAY,CACb,EAAE,CACJ,CAAC;IACJ,OAAO,oBAAoB,CAAC,WAAW,CACrC,YAAY,CAAC,YAAY,CAAC,MAAM,CAAC,qBAAqB,CAAC,CACxD,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CAAC,qBAA6B;IACjD,OAAO,MAAM,CAAC,IAAI,CAAC,qBAAqB,EAAE,QAAQ,CAAC,CAAC;AACtD,CAAC","sourcesContent":["import type { TransactionInstruction } from \"@solana/web3.js\";\nimport {\n Connection,\n PublicKey,\n TransactionMessage,\n VersionedTransaction,\n} from \"@solana/web3.js\";\n\n/**\n * This function wraps instructions in a sponsored transaction using Alchemy's fee payer service\n *\n * @param {TransactionInstruction[]} instructions - The instructions to add sponsorship to\n * @param {Connection} connection - The connection to use\n * @param {string} policyId - The policy id to use\n * @param {string} address - The address to use\n * @returns {Promise<VersionedTransaction>} - The sponsored transaction\n */\nexport async function createSolanaSponsoredTransaction(\n instructions: TransactionInstruction[],\n connection: Connection,\n policyId: string,\n address: string,\n): Promise<VersionedTransaction> {\n const { blockhash } = await connection.getLatestBlockhash({\n commitment: \"finalized\",\n });\n const message = new TransactionMessage({\n // Right now the backend will rewrite this payer Key to the server's address\n payerKey: new PublicKey(address),\n recentBlockhash: blockhash,\n instructions,\n }).compileToV0Message();\n const versionedTransaction = new VersionedTransaction(message);\n const serializedTransaction = Buffer.from(\n versionedTransaction.serialize(),\n ).toString(\"base64\");\n const body = JSON.stringify({\n id:\n crypto?.randomUUID() ??\n `${Date.now()}-${Math.floor(Math.random() * Number.MAX_SAFE_INTEGER)}`,\n jsonrpc: \"2.0\",\n method: \"alchemy_requestFeePayer\",\n params: [\n {\n policyId,\n serializedTransaction,\n },\n ],\n });\n const options = {\n method: \"POST\",\n headers: {\n accept: \"application/json\",\n \"content-type\": \"application/json\",\n \"X-Alchemy-Client-Breadcrumb\": \"privyIntegrationSdk\",\n },\n body,\n };\n\n const response = await fetch(connection.rpcEndpoint, options);\n const jsonResponse = await response.json();\n if (!jsonResponse?.result?.serializedTransaction)\n throw new Error(\n `Response doesn't include the serializedTransaction ${JSON.stringify(\n jsonResponse,\n )}`,\n );\n return VersionedTransaction.deserialize(\n decodeBase64(jsonResponse.result.serializedTransaction),\n );\n}\n\nfunction decodeBase64(serializedTransaction: string): Uint8Array {\n return Buffer.from(serializedTransaction, \"base64\");\n}\n"]}
@@ -1 +1 @@
1
- export declare const VERSION = "4.72.0";
1
+ export declare const VERSION = "4.73.0";
@@ -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.72.0";
3
+ export const VERSION = "4.73.0";
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.72.0\";\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.73.0\";\n"]}
@@ -3,6 +3,5 @@ export { useAlchemyClient } from "./hooks/useAlchemyClient.js";
3
3
  export { useAlchemySendTransaction } from "./hooks/useAlchemySendTransaction.js";
4
4
  export { useAlchemyPrepareSwap } from "./hooks/useAlchemyPrepareSwap.js";
5
5
  export { useAlchemySubmitSwap } from "./hooks/useAlchemySubmitSwap.js";
6
- export { useAlchemySolanaTransaction } from "./hooks/useAlchemySolanaTransaction.js";
7
6
  export type { AlchemyProviderConfig, UnsignedTransactionRequest, SendTransactionOptions, SendTransactionResult, UseSendTransactionResult, PrepareSwapRequest, PrepareSwapResult, UsePrepareSwapResult, SubmitSwapResult, UseSubmitSwapResult, SwapQuote, } from "./types.js";
8
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAGlE,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,2BAA2B,EAAE,MAAM,wCAAwC,CAAC;AAGrF,YAAY,EACV,qBAAqB,EACrB,0BAA0B,EAC1B,sBAAsB,EACtB,qBAAqB,EACrB,wBAAwB,EACxB,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,mBAAmB,EACnB,SAAS,GACV,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAGlE,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAGvE,YAAY,EACV,qBAAqB,EACrB,0BAA0B,EAC1B,sBAAsB,EACtB,qBAAqB,EACrB,wBAAwB,EACxB,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,mBAAmB,EACnB,SAAS,GACV,MAAM,YAAY,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { useAlchemySolanaTransaction } from "./hooks/useAlchemySolanaTransaction.js";
2
+ export type { PromiseOrValue, PreSend, TransformInstruction, SolanaTransactionParamOptions, SolanaTransactionParams, SolanaTransactionResult, UseAlchemySolanaTransactionOptions, UseAlchemySolanaTransactionResult, } from "./hooks/useAlchemySolanaTransaction.js";
3
+ //# sourceMappingURL=solana.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"solana.d.ts","sourceRoot":"","sources":["../../src/solana.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,2BAA2B,EAAE,MAAM,wCAAwC,CAAC;AAErF,YAAY,EACV,cAAc,EACd,OAAO,EACP,oBAAoB,EACpB,6BAA6B,EAC7B,uBAAuB,EACvB,uBAAuB,EACvB,kCAAkC,EAClC,iCAAiC,GAClC,MAAM,wCAAwC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"createSolanaSponsoredTransaction.d.ts","sourceRoot":"","sources":["../../../src/util/createSolanaSponsoredTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EACL,UAAU,EAGV,oBAAoB,EACrB,MAAM,iBAAiB,CAAC;AAEzB;;;;;;;;GAQG;AACH,wBAAsB,gCAAgC,CACpD,YAAY,EAAE,sBAAsB,EAAE,EACtC,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,oBAAoB,CAAC,CA+C/B"}
1
+ {"version":3,"file":"createSolanaSponsoredTransaction.d.ts","sourceRoot":"","sources":["../../../src/util/createSolanaSponsoredTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EACL,UAAU,EAGV,oBAAoB,EACrB,MAAM,iBAAiB,CAAC;AAEzB;;;;;;;;GAQG;AACH,wBAAsB,gCAAgC,CACpD,YAAY,EAAE,sBAAsB,EAAE,EACtC,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,oBAAoB,CAAC,CAgD/B"}
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "4.72.0";
1
+ export declare const VERSION = "4.73.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@account-kit/privy-integration",
3
- "version": "4.72.0",
3
+ "version": "4.73.0",
4
4
  "description": "Use Alchemy gas sponsorship, swaps and more with Privy",
5
5
  "author": "Alchemy",
6
6
  "license": "MIT",
@@ -27,6 +27,11 @@
27
27
  "import": "./dist/esm/index.js",
28
28
  "default": "./dist/esm/index.js"
29
29
  },
30
+ "./solana": {
31
+ "types": "./dist/types/solana.d.ts",
32
+ "import": "./dist/esm/solana.js",
33
+ "default": "./dist/esm/solana.js"
34
+ },
30
35
  "./package.json": "./package.json"
31
36
  },
32
37
  "scripts": {
@@ -43,13 +48,18 @@
43
48
  "typescript-template": "*"
44
49
  },
45
50
  "dependencies": {
46
- "@account-kit/infra": "^4.72.0",
47
- "@account-kit/wallet-client": "^4.72.0"
51
+ "@account-kit/infra": "^4.73.0",
52
+ "@account-kit/wallet-client": "^4.73.0"
48
53
  },
49
54
  "peerDependencies": {
50
55
  "@privy-io/react-auth": "^2.3.1 || ^3.0.0",
51
56
  "viem": "^2.29.2"
52
57
  },
58
+ "peerDependenciesMeta": {
59
+ "@solana/web3.js": {
60
+ "optional": true
61
+ }
62
+ },
53
63
  "publishConfig": {
54
64
  "access": "public",
55
65
  "registry": "https://registry.npmjs.org/"
@@ -62,5 +72,5 @@
62
72
  "url": "https://github.com/alchemyplatform/aa-sdk/issues"
63
73
  },
64
74
  "homepage": "https://github.com/alchemyplatform/aa-sdk#readme",
65
- "gitHead": "e5efee1de2bb143287c3da604d0a7f545612a309"
75
+ "gitHead": "1471537aa2b9e8cac4661b7162aa9c702efac7f1"
66
76
  }
package/src/index.ts CHANGED
@@ -6,7 +6,6 @@ export { useAlchemyClient } from "./hooks/useAlchemyClient.js";
6
6
  export { useAlchemySendTransaction } from "./hooks/useAlchemySendTransaction.js";
7
7
  export { useAlchemyPrepareSwap } from "./hooks/useAlchemyPrepareSwap.js";
8
8
  export { useAlchemySubmitSwap } from "./hooks/useAlchemySubmitSwap.js";
9
- export { useAlchemySolanaTransaction } from "./hooks/useAlchemySolanaTransaction.js";
10
9
 
11
10
  // Types
12
11
  export type {
package/src/solana.ts ADDED
@@ -0,0 +1,16 @@
1
+ // Solana-specific exports
2
+ // Import from '@account-kit/privy-integration/solana' to use Solana functionality
3
+ // This ensures @solana/web3.js is only loaded when explicitly needed
4
+
5
+ export { useAlchemySolanaTransaction } from "./hooks/useAlchemySolanaTransaction.js";
6
+
7
+ export type {
8
+ PromiseOrValue,
9
+ PreSend,
10
+ TransformInstruction,
11
+ SolanaTransactionParamOptions,
12
+ SolanaTransactionParams,
13
+ SolanaTransactionResult,
14
+ UseAlchemySolanaTransactionOptions,
15
+ UseAlchemySolanaTransactionResult,
16
+ } from "./hooks/useAlchemySolanaTransaction.js";
@@ -52,6 +52,7 @@ export async function createSolanaSponsoredTransaction(
52
52
  headers: {
53
53
  accept: "application/json",
54
54
  "content-type": "application/json",
55
+ "X-Alchemy-Client-Breadcrumb": "privyIntegrationSdk",
55
56
  },
56
57
  body,
57
58
  };
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.72.0";
3
+ export const VERSION = "4.73.0";