@alchemy/wallet-apis 5.0.0-beta.9 → 5.0.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.
- package/README.md +2 -0
- package/dist/esm/actions/prepareCalls.d.ts +8 -3
- package/dist/esm/actions/prepareCalls.js +8 -0
- package/dist/esm/actions/prepareCalls.js.map +1 -1
- package/dist/esm/actions/requestAccount.d.ts +4 -3
- package/dist/esm/actions/requestAccount.js.map +1 -1
- package/dist/esm/actions/sendCalls.d.ts +5 -2
- package/dist/esm/actions/sendCalls.js +5 -2
- package/dist/esm/actions/sendCalls.js.map +1 -1
- package/dist/esm/actions/sendPreparedCalls.d.ts +3 -1
- package/dist/esm/actions/sendPreparedCalls.js.map +1 -1
- package/dist/esm/actions/signPreparedCalls.d.ts +2 -0
- package/dist/esm/actions/signPreparedCalls.js +14 -1
- package/dist/esm/actions/signPreparedCalls.js.map +1 -1
- package/dist/esm/actions/signSignatureRequest.d.ts +4 -4
- package/dist/esm/actions/signSignatureRequest.js +1 -1
- package/dist/esm/actions/signSignatureRequest.js.map +1 -1
- package/dist/esm/actions/signTypedData.d.ts +14 -4
- package/dist/esm/actions/signTypedData.js.map +1 -1
- package/dist/esm/actions/solana/getCallsStatus.d.ts +24 -0
- package/dist/esm/actions/solana/getCallsStatus.js +44 -0
- package/dist/esm/actions/solana/getCallsStatus.js.map +1 -0
- package/dist/esm/actions/solana/prepareCalls.d.ts +46 -0
- package/dist/esm/actions/solana/prepareCalls.js +70 -0
- package/dist/esm/actions/solana/prepareCalls.js.map +1 -0
- package/dist/esm/actions/solana/sendCalls.d.ts +34 -0
- package/dist/esm/actions/solana/sendCalls.js +44 -0
- package/dist/esm/actions/solana/sendCalls.js.map +1 -0
- package/dist/esm/actions/solana/sendPreparedCalls.d.ts +24 -0
- package/dist/esm/actions/solana/sendPreparedCalls.js +32 -0
- package/dist/esm/actions/solana/sendPreparedCalls.js.map +1 -0
- package/dist/esm/actions/solana/signPreparedCalls.d.ts +23 -0
- package/dist/esm/actions/solana/signPreparedCalls.js +24 -0
- package/dist/esm/actions/solana/signPreparedCalls.js.map +1 -0
- package/dist/esm/actions/solana/signSignatureRequest.d.ts +10 -0
- package/dist/esm/actions/solana/signSignatureRequest.js +33 -0
- package/dist/esm/actions/solana/signSignatureRequest.js.map +1 -0
- package/dist/esm/actions/solana/waitForCallsStatus.d.ts +24 -0
- package/dist/esm/actions/solana/waitForCallsStatus.js +46 -0
- package/dist/esm/actions/solana/waitForCallsStatus.js.map +1 -0
- package/dist/esm/actions/undelegateAccount.d.ts +37 -0
- package/dist/esm/actions/undelegateAccount.js +49 -0
- package/dist/esm/actions/undelegateAccount.js.map +1 -0
- package/dist/esm/adapters/SolanaSignerError.d.ts +4 -0
- package/dist/esm/adapters/SolanaSignerError.js +13 -0
- package/dist/esm/adapters/SolanaSignerError.js.map +1 -0
- package/dist/esm/adapters/fromKeypair.d.ts +21 -0
- package/dist/esm/adapters/fromKeypair.js +46 -0
- package/dist/esm/adapters/fromKeypair.js.map +1 -0
- package/dist/esm/adapters/fromKitSigner.d.ts +21 -0
- package/dist/esm/adapters/fromKitSigner.js +61 -0
- package/dist/esm/adapters/fromKitSigner.js.map +1 -0
- package/dist/esm/adapters/fromWalletAdapter.d.ts +26 -0
- package/dist/esm/adapters/fromWalletAdapter.js +45 -0
- package/dist/esm/adapters/fromWalletAdapter.js.map +1 -0
- package/dist/esm/adapters/fromWalletStandard.d.ts +31 -0
- package/dist/esm/adapters/fromWalletStandard.js +53 -0
- package/dist/esm/adapters/fromWalletStandard.js.map +1 -0
- package/dist/esm/adapters/resolveSignerSlot.d.ts +10 -0
- package/dist/esm/adapters/resolveSignerSlot.js +39 -0
- package/dist/esm/adapters/resolveSignerSlot.js.map +1 -0
- package/dist/esm/client.d.ts +29 -14
- package/dist/esm/client.js +63 -19
- package/dist/esm/client.js.map +1 -1
- package/dist/esm/decorators/smartWalletActions.d.ts +2 -0
- package/dist/esm/decorators/smartWalletActions.js +4 -2
- package/dist/esm/decorators/smartWalletActions.js.map +1 -1
- package/dist/esm/decorators/solanaSmartWalletActions.d.ts +16 -0
- package/dist/esm/decorators/solanaSmartWalletActions.js +16 -0
- package/dist/esm/decorators/solanaSmartWalletActions.js.map +1 -0
- package/dist/esm/experimental/actions/requestQuoteV0.d.ts +48 -11
- package/dist/esm/experimental/actions/requestQuoteV0.js +8 -4
- package/dist/esm/experimental/actions/requestQuoteV0.js.map +1 -1
- package/dist/esm/experimental/swapActionsDecorator.d.ts +3 -0
- package/dist/esm/experimental/swapActionsDecorator.js.map +1 -1
- package/dist/esm/exports/index.d.ts +5 -3
- package/dist/esm/exports/index.js +1 -0
- package/dist/esm/exports/index.js.map +1 -1
- package/dist/esm/exports/solana.d.ts +24 -0
- package/dist/esm/exports/solana.js +15 -0
- package/dist/esm/exports/solana.js.map +1 -0
- package/dist/esm/types.d.ts +28 -4
- package/dist/esm/types.js.map +1 -1
- package/dist/esm/utils/assertions.d.ts +4 -2
- package/dist/esm/utils/assertions.js +6 -0
- package/dist/esm/utils/assertions.js.map +1 -1
- package/dist/esm/utils/capabilities.d.ts +22 -6
- package/dist/esm/utils/capabilities.js +19 -2
- package/dist/esm/utils/capabilities.js.map +1 -1
- package/dist/esm/utils/format.d.ts +2 -2
- package/dist/esm/utils/format.js +4 -3
- package/dist/esm/utils/format.js.map +1 -1
- package/dist/esm/utils/schema.d.ts +14 -14
- package/dist/esm/utils/schema.js +35 -39
- package/dist/esm/utils/schema.js.map +1 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/dist/types/actions/prepareCalls.d.ts +8 -3
- package/dist/types/actions/prepareCalls.d.ts.map +1 -1
- package/dist/types/actions/requestAccount.d.ts +4 -3
- package/dist/types/actions/requestAccount.d.ts.map +1 -1
- package/dist/types/actions/sendCalls.d.ts +5 -2
- package/dist/types/actions/sendCalls.d.ts.map +1 -1
- package/dist/types/actions/sendPreparedCalls.d.ts +3 -1
- package/dist/types/actions/sendPreparedCalls.d.ts.map +1 -1
- package/dist/types/actions/signPreparedCalls.d.ts +2 -0
- package/dist/types/actions/signPreparedCalls.d.ts.map +1 -1
- package/dist/types/actions/signSignatureRequest.d.ts +4 -4
- package/dist/types/actions/signSignatureRequest.d.ts.map +1 -1
- package/dist/types/actions/signTypedData.d.ts +14 -4
- package/dist/types/actions/signTypedData.d.ts.map +1 -1
- package/dist/types/actions/solana/getCallsStatus.d.ts +25 -0
- package/dist/types/actions/solana/getCallsStatus.d.ts.map +1 -0
- package/dist/types/actions/solana/prepareCalls.d.ts +47 -0
- package/dist/types/actions/solana/prepareCalls.d.ts.map +1 -0
- package/dist/types/actions/solana/sendCalls.d.ts +35 -0
- package/dist/types/actions/solana/sendCalls.d.ts.map +1 -0
- package/dist/types/actions/solana/sendPreparedCalls.d.ts +25 -0
- package/dist/types/actions/solana/sendPreparedCalls.d.ts.map +1 -0
- package/dist/types/actions/solana/signPreparedCalls.d.ts +24 -0
- package/dist/types/actions/solana/signPreparedCalls.d.ts.map +1 -0
- package/dist/types/actions/solana/signSignatureRequest.d.ts +11 -0
- package/dist/types/actions/solana/signSignatureRequest.d.ts.map +1 -0
- package/dist/types/actions/solana/waitForCallsStatus.d.ts +25 -0
- package/dist/types/actions/solana/waitForCallsStatus.d.ts.map +1 -0
- package/dist/types/actions/undelegateAccount.d.ts +38 -0
- package/dist/types/actions/undelegateAccount.d.ts.map +1 -0
- package/dist/types/adapters/SolanaSignerError.d.ts +5 -0
- package/dist/types/adapters/SolanaSignerError.d.ts.map +1 -0
- package/dist/types/adapters/fromKeypair.d.ts +22 -0
- package/dist/types/adapters/fromKeypair.d.ts.map +1 -0
- package/dist/types/adapters/fromKitSigner.d.ts +22 -0
- package/dist/types/adapters/fromKitSigner.d.ts.map +1 -0
- package/dist/types/adapters/fromWalletAdapter.d.ts +27 -0
- package/dist/types/adapters/fromWalletAdapter.d.ts.map +1 -0
- package/dist/types/adapters/fromWalletStandard.d.ts +32 -0
- package/dist/types/adapters/fromWalletStandard.d.ts.map +1 -0
- package/dist/types/adapters/resolveSignerSlot.d.ts +11 -0
- package/dist/types/adapters/resolveSignerSlot.d.ts.map +1 -0
- package/dist/types/client.d.ts +29 -14
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/decorators/smartWalletActions.d.ts +2 -0
- package/dist/types/decorators/smartWalletActions.d.ts.map +1 -1
- package/dist/types/decorators/solanaSmartWalletActions.d.ts +17 -0
- package/dist/types/decorators/solanaSmartWalletActions.d.ts.map +1 -0
- package/dist/types/experimental/actions/requestQuoteV0.d.ts +48 -11
- package/dist/types/experimental/actions/requestQuoteV0.d.ts.map +1 -1
- package/dist/types/experimental/swapActionsDecorator.d.ts +3 -0
- package/dist/types/experimental/swapActionsDecorator.d.ts.map +1 -1
- package/dist/types/exports/index.d.ts +5 -3
- package/dist/types/exports/index.d.ts.map +1 -1
- package/dist/types/exports/solana.d.ts +25 -0
- package/dist/types/exports/solana.d.ts.map +1 -0
- package/dist/types/types.d.ts +28 -4
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/utils/assertions.d.ts +4 -2
- package/dist/types/utils/assertions.d.ts.map +1 -1
- package/dist/types/utils/capabilities.d.ts +22 -6
- package/dist/types/utils/capabilities.d.ts.map +1 -1
- package/dist/types/utils/format.d.ts +2 -2
- package/dist/types/utils/format.d.ts.map +1 -1
- package/dist/types/utils/schema.d.ts +14 -14
- package/dist/types/utils/schema.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/types/version.d.ts.map +1 -1
- package/package.json +26 -9
- package/src/actions/prepareCalls.ts +21 -3
- package/src/actions/requestAccount.ts +7 -5
- package/src/actions/sendCalls.ts +5 -2
- package/src/actions/sendPreparedCalls.ts +4 -1
- package/src/actions/signPreparedCalls.ts +15 -2
- package/src/actions/signSignatureRequest.ts +8 -8
- package/src/actions/signTypedData.ts +15 -7
- package/src/actions/solana/getCallsStatus.ts +79 -0
- package/src/actions/solana/prepareCalls.ts +120 -0
- package/src/actions/solana/sendCalls.ts +66 -0
- package/src/actions/solana/sendPreparedCalls.ts +65 -0
- package/src/actions/solana/signPreparedCalls.ts +50 -0
- package/src/actions/solana/signSignatureRequest.ts +63 -0
- package/src/actions/solana/waitForCallsStatus.ts +84 -0
- package/src/actions/undelegateAccount.ts +68 -0
- package/src/adapters/SolanaSignerError.ts +5 -0
- package/src/adapters/fromKeypair.ts +58 -0
- package/src/adapters/fromKitSigner.ts +82 -0
- package/src/adapters/fromWalletAdapter.ts +58 -0
- package/src/adapters/fromWalletStandard.ts +100 -0
- package/src/adapters/resolveSignerSlot.ts +46 -0
- package/src/client.ts +131 -18
- package/src/decorators/smartWalletActions.ts +11 -2
- package/src/decorators/solanaSmartWalletActions.ts +62 -0
- package/src/experimental/actions/requestQuoteV0.ts +40 -15
- package/src/experimental/swapActionsDecorator.ts +3 -0
- package/src/exports/index.ts +10 -4
- package/src/exports/solana.ts +36 -0
- package/src/types.ts +38 -7
- package/src/utils/assertions.ts +17 -2
- package/src/utils/capabilities.ts +40 -8
- package/src/utils/format.ts +8 -3
- package/src/utils/schema.ts +58 -69
- package/src/version.ts +1 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Prettify } from "viem";
|
|
2
|
+
import type { InnerSolanaWalletApiClient } from "../../types.js";
|
|
3
|
+
import { PreparedCall_SolanaV0_Signed as PreparedCall_SolanaV0_SignedSchema } from "@alchemy/wallet-api-types";
|
|
4
|
+
import type { z } from "zod";
|
|
5
|
+
import { wallet_sendPreparedCalls as MethodSchema } from "@alchemy/wallet-api-types/rpc";
|
|
6
|
+
import { type MethodResponse } from "../../utils/schema.js";
|
|
7
|
+
type SendPreparedCallsResponse = MethodResponse<typeof MethodSchema>;
|
|
8
|
+
export type SolanaSendPreparedCallsParams = Prettify<z.output<typeof PreparedCall_SolanaV0_SignedSchema>>;
|
|
9
|
+
type SolanaSendPreparedCallsResponse = Extract<SendPreparedCallsResponse, {
|
|
10
|
+
details: {
|
|
11
|
+
type: "solana-transaction-v0";
|
|
12
|
+
};
|
|
13
|
+
}>;
|
|
14
|
+
export type SolanaSendPreparedCallsResult = SolanaSendPreparedCallsResponse;
|
|
15
|
+
/**
|
|
16
|
+
* Sends a signed Solana transaction.
|
|
17
|
+
* This method is used after signing the signature request returned from prepareCalls.
|
|
18
|
+
*
|
|
19
|
+
* @param {InnerSolanaWalletApiClient} client - The Solana wallet API client
|
|
20
|
+
* @param {SolanaSendPreparedCallsParams} params - The signed Solana transaction
|
|
21
|
+
* @returns {Promise<SolanaSendPreparedCallsResult>} The result containing the call ID
|
|
22
|
+
*/
|
|
23
|
+
export declare function sendPreparedCalls(client: InnerSolanaWalletApiClient, params: SolanaSendPreparedCallsParams): Promise<SolanaSendPreparedCallsResult>;
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=sendPreparedCalls.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sendPreparedCalls.d.ts","sourceRoot":"","sources":["../../../../src/actions/solana/sendPreparedCalls.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAE,4BAA4B,IAAI,kCAAkC,EAAE,MAAM,2BAA2B,CAAC;AAC/G,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAG7B,OAAO,EAAE,wBAAwB,IAAI,YAAY,EAAE,MAAM,+BAA+B,CAAC;AACzF,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,uBAAuB,CAAC;AAG/B,KAAK,yBAAyB,GAAG,cAAc,CAAC,OAAO,YAAY,CAAC,CAAC;AAErE,MAAM,MAAM,6BAA6B,GAAG,QAAQ,CAClD,CAAC,CAAC,MAAM,CAAC,OAAO,kCAAkC,CAAC,CACpD,CAAC;AAEF,KAAK,+BAA+B,GAAG,OAAO,CAC5C,yBAAyB,EACzB;IAAE,OAAO,EAAE;QAAE,IAAI,EAAE,uBAAuB,CAAA;KAAE,CAAA;CAAE,CAC/C,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG,+BAA+B,CAAC;AAQ5E;;;;;;;GAOG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,0BAA0B,EAClC,MAAM,EAAE,6BAA6B,GACpC,OAAO,CAAC,6BAA6B,CAAC,CAmBxC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Prettify } from "viem";
|
|
2
|
+
import type { InnerSolanaWalletApiClient } from "../../types.js";
|
|
3
|
+
import { type SolanaSignatureResult } from "./signSignatureRequest.js";
|
|
4
|
+
import type { SolanaPrepareCallsResult } from "./prepareCalls.js";
|
|
5
|
+
export type SolanaSignPreparedCallsParams = Prettify<SolanaPrepareCallsResult>;
|
|
6
|
+
export type SolanaSignPreparedCallsResult = Prettify<Omit<SolanaPrepareCallsResult, "signatureRequest" | "feePayment" | "details"> & {
|
|
7
|
+
signature: SolanaSignatureResult;
|
|
8
|
+
}>;
|
|
9
|
+
/**
|
|
10
|
+
* Signs a prepared Solana transaction using the client's Ed25519 signer.
|
|
11
|
+
*
|
|
12
|
+
* @param {InnerSolanaWalletApiClient} client - The Solana wallet client
|
|
13
|
+
* @param {SolanaSignPreparedCallsParams} params - The prepared Solana transaction with signature request
|
|
14
|
+
* @returns {Promise<SolanaSignPreparedCallsResult>} The signed Solana transaction
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* const prepared = await client.prepareCalls({ ... });
|
|
19
|
+
* const signed = await client.signPreparedCalls(prepared);
|
|
20
|
+
* const result = await client.sendPreparedCalls(signed);
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare function signPreparedCalls(client: InnerSolanaWalletApiClient, params: SolanaSignPreparedCallsParams): Promise<SolanaSignPreparedCallsResult>;
|
|
24
|
+
//# sourceMappingURL=signPreparedCalls.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signPreparedCalls.d.ts","sourceRoot":"","sources":["../../../../src/actions/solana/signPreparedCalls.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAGlE,MAAM,MAAM,6BAA6B,GAAG,QAAQ,CAAC,wBAAwB,CAAC,CAAC;AAE/E,MAAM,MAAM,6BAA6B,GAAG,QAAQ,CAClD,IAAI,CACF,wBAAwB,EACxB,kBAAkB,GAAG,YAAY,GAAG,SAAS,CAC9C,GAAG;IACF,SAAS,EAAE,qBAAqB,CAAC;CAClC,CACF,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,0BAA0B,EAClC,MAAM,EAAE,6BAA6B,GACpC,OAAO,CAAC,6BAA6B,CAAC,CAYxC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { SolanaSigner } from "../../types.js";
|
|
2
|
+
export type SolanaSignatureRequestParams = {
|
|
3
|
+
type: "solana_signTransaction";
|
|
4
|
+
data: `0x${string}`;
|
|
5
|
+
};
|
|
6
|
+
export type SolanaSignatureResult = {
|
|
7
|
+
type: "ed25519";
|
|
8
|
+
data: string;
|
|
9
|
+
};
|
|
10
|
+
export declare function signSolanaSignatureRequest(signer: SolanaSigner, signatureRequest: SolanaSignatureRequestParams): Promise<SolanaSignatureResult>;
|
|
11
|
+
//# sourceMappingURL=signSignatureRequest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signSignatureRequest.d.ts","sourceRoot":"","sources":["../../../../src/actions/solana/signSignatureRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAOnD,MAAM,MAAM,4BAA4B,GAAG;IACzC,IAAI,EAAE,wBAAwB,CAAC;IAC/B,IAAI,EAAE,KAAK,MAAM,EAAE,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,wBAAsB,0BAA0B,CAC9C,MAAM,EAAE,YAAY,EACpB,gBAAgB,EAAE,4BAA4B,GAC7C,OAAO,CAAC,qBAAqB,CAAC,CA0ChC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { InnerSolanaWalletApiClient } from "../../types.js";
|
|
2
|
+
import { type SolanaGetCallsStatusResult } from "./getCallsStatus.js";
|
|
3
|
+
export type SolanaWaitForCallsStatusParams = {
|
|
4
|
+
id: `0x${string}`;
|
|
5
|
+
pollingInterval?: number;
|
|
6
|
+
retryCount?: number;
|
|
7
|
+
retryDelay?: (opts: {
|
|
8
|
+
count: number;
|
|
9
|
+
}) => number;
|
|
10
|
+
status?: (result: SolanaGetCallsStatusResult) => boolean;
|
|
11
|
+
throwOnFailure?: boolean;
|
|
12
|
+
timeout?: number;
|
|
13
|
+
};
|
|
14
|
+
export type SolanaWaitForCallsStatusResult = SolanaGetCallsStatusResult;
|
|
15
|
+
/**
|
|
16
|
+
* Polls getCallsStatus until the call reaches a terminal state.
|
|
17
|
+
* Similar API to viem's waitForCallsStatus with retry, exponential backoff,
|
|
18
|
+
* configurable status predicate, throwOnFailure, and timeout.
|
|
19
|
+
*
|
|
20
|
+
* @param {InnerSolanaWalletApiClient} client - The Solana wallet API client
|
|
21
|
+
* @param {SolanaWaitForCallsStatusParams} params - The call ID and optional polling config
|
|
22
|
+
* @returns {Promise<SolanaWaitForCallsStatusResult>} The final status
|
|
23
|
+
*/
|
|
24
|
+
export declare function waitForCallsStatus(client: InnerSolanaWalletApiClient, params: SolanaWaitForCallsStatusParams): Promise<SolanaWaitForCallsStatusResult>;
|
|
25
|
+
//# sourceMappingURL=waitForCallsStatus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"waitForCallsStatus.d.ts","sourceRoot":"","sources":["../../../../src/actions/solana/waitForCallsStatus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAEL,KAAK,0BAA0B,EAChC,MAAM,qBAAqB,CAAC;AAI7B,MAAM,MAAM,8BAA8B,GAAG;IAC3C,EAAE,EAAE,KAAK,MAAM,EAAE,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,MAAM,CAAC;IACjD,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,0BAA0B,KAAK,OAAO,CAAC;IACzD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG,0BAA0B,CAAC;AAExE;;;;;;;;GAQG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,0BAA0B,EAClC,MAAM,EAAE,8BAA8B,GACrC,OAAO,CAAC,8BAA8B,CAAC,CAmDzC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type Chain, type Prettify } from "viem";
|
|
2
|
+
import type { InnerWalletApiClient } from "../types.js";
|
|
3
|
+
import { type AccountParam } from "../utils/resolve.js";
|
|
4
|
+
import { type SendCallsResult } from "./sendCalls.js";
|
|
5
|
+
export type UndelegateAccountParams = Prettify<{
|
|
6
|
+
account?: AccountParam;
|
|
7
|
+
chain?: Pick<Chain, "id">;
|
|
8
|
+
capabilities?: {
|
|
9
|
+
paymaster?: {
|
|
10
|
+
policyId: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
}>;
|
|
14
|
+
export type UndelegateAccountResult = Prettify<SendCallsResult>;
|
|
15
|
+
/**
|
|
16
|
+
* Prepares, signs, and sends an EIP-7702 undelegation to remove delegation from an EOA.
|
|
17
|
+
* Gas is sponsored by Alchemy (requires Enterprise plan).
|
|
18
|
+
*
|
|
19
|
+
* A BSO (Bundler Sponsorship Override) policy ID must be provided either via
|
|
20
|
+
* `params.capabilities.paymaster.policyId` or pre-configured on the client via `policyIds`.
|
|
21
|
+
*
|
|
22
|
+
* @param {InnerWalletApiClient} client - The wallet API client to use for the request
|
|
23
|
+
* @param {UndelegateAccountParams} params - Parameters for undelegating the account
|
|
24
|
+
* @param {AccountParam} [params.account] - The account to undelegate. Defaults to the client's account (signer address).
|
|
25
|
+
* @param {object} [params.chain] - The chain. Defaults to the client's chain.
|
|
26
|
+
* @param {object} [params.capabilities] - Optional capabilities. If omitted, falls back to the policy ID(s) set on the client.
|
|
27
|
+
* @param {object} [params.capabilities.paymaster] - Paymaster capabilities. Requires a BSO policy ID.
|
|
28
|
+
* @param {string} [params.capabilities.paymaster.policyId] - The BSO policy ID to use for gas sponsorship.
|
|
29
|
+
* @returns {Promise<UndelegateAccountResult>} A Promise that resolves to the result containing the call ID.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* const result = await client.undelegateAccount();
|
|
34
|
+
* const status = await client.waitForCallsStatus({ id: result.id });
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export declare function undelegateAccount(client: InnerWalletApiClient, params?: UndelegateAccountParams): Promise<UndelegateAccountResult>;
|
|
38
|
+
//# sourceMappingURL=undelegateAccount.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"undelegateAccount.d.ts","sourceRoot":"","sources":["../../../src/actions/undelegateAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,KAAK,EAAE,KAAK,QAAQ,EAAE,MAAM,MAAM,CAAC;AAC9D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAExD,OAAO,EAAkB,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAa,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjE,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAAC;IAC7C,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,KAAK,CAAC,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAC1B,YAAY,CAAC,EAAE;QACb,SAAS,CAAC,EAAE;YACV,QAAQ,EAAE,MAAM,CAAC;SAClB,CAAC;KACH,CAAC;CACH,CAAC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAC;AAEhE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,oBAAoB,EAC5B,MAAM,CAAC,EAAE,uBAAuB,GAC/B,OAAO,CAAC,uBAAuB,CAAC,CAwBlC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SolanaSignerError.d.ts","sourceRoot":"","sources":["../../../src/adapters/SolanaSignerError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,qBAAa,iBAAkB,SAAQ,SAAS;IACrC,IAAI,SAAuB;CACrC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { SolanaSigner } from "../types.js";
|
|
2
|
+
/** Raw Ed25519 keypair signer (e.g. `Keypair` from `@solana/web3.js` v1 or a bare Ed25519 key). */
|
|
3
|
+
export interface SolanaKeypairSigner {
|
|
4
|
+
address: string;
|
|
5
|
+
signMessage(message: Uint8Array): Promise<Uint8Array>;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Adapts a raw Ed25519 keypair signer into a {@link SolanaSigner}.
|
|
9
|
+
*
|
|
10
|
+
* Use this for legacy `@solana/web3.js` v1 `Keypair` signers or any signer
|
|
11
|
+
* that exposes a `signMessage(bytes) => signature` interface. For
|
|
12
|
+
* `@solana/kit` signers, use {@link fromKitSigner}. For browser wallets
|
|
13
|
+
* (wallet adapter, Phantom, etc.), use {@link fromWalletAdapter}. For
|
|
14
|
+
* wallet-standard wallets, use {@link fromWalletStandard}.
|
|
15
|
+
*
|
|
16
|
+
* Requires `@solana/kit` or `@solana/web3.js` as a peer dependency.
|
|
17
|
+
*
|
|
18
|
+
* @param {SolanaKeypairSigner} signer - The raw Ed25519 keypair signer to adapt
|
|
19
|
+
* @returns {SolanaSigner} A SolanaSigner compatible with `createSmartWalletClient`
|
|
20
|
+
*/
|
|
21
|
+
export declare function fromKeypair(signer: SolanaKeypairSigner): SolanaSigner;
|
|
22
|
+
//# sourceMappingURL=fromKeypair.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fromKeypair.d.ts","sourceRoot":"","sources":["../../../src/adapters/fromKeypair.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAIhD,mGAAmG;AACnG,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;CACvD;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,mBAAmB,GAAG,YAAY,CAiCrE"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { SolanaSigner } from "../types.js";
|
|
2
|
+
/** Any {@link https://solanakit.com @solana/kit} signer that implements `signTransactions` (e.g. `TransactionPartialSigner`, `KeyPairSigner`). */
|
|
3
|
+
export interface SolanaTransactionPartialSigner {
|
|
4
|
+
address: string;
|
|
5
|
+
signTransactions(transactions: readonly unknown[]): Promise<readonly Record<string, Uint8Array>[]>;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Adapts an {@link https://solanakit.com @solana/kit} signer into a {@link SolanaSigner}.
|
|
9
|
+
*
|
|
10
|
+
* Accepts any signer that implements `signTransactions`, including
|
|
11
|
+
* `KeyPairSigner`, `TransactionPartialSigner`, and `NoopSigner`. For raw
|
|
12
|
+
* Ed25519 keypairs, use {@link fromKeypair}. For browser wallets (wallet
|
|
13
|
+
* adapter, Phantom, etc.), use {@link fromWalletAdapter}. For
|
|
14
|
+
* wallet-standard wallets, use {@link fromWalletStandard}.
|
|
15
|
+
*
|
|
16
|
+
* Requires `@solana/kit` as a peer dependency.
|
|
17
|
+
*
|
|
18
|
+
* @param {SolanaTransactionPartialSigner} signer - The @solana/kit signer to adapt
|
|
19
|
+
* @returns {SolanaSigner} A SolanaSigner compatible with `createSmartWalletClient`
|
|
20
|
+
*/
|
|
21
|
+
export declare function fromKitSigner(signer: SolanaTransactionPartialSigner): SolanaSigner;
|
|
22
|
+
//# sourceMappingURL=fromKitSigner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fromKitSigner.d.ts","sourceRoot":"","sources":["../../../src/adapters/fromKitSigner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAIhD,kJAAkJ;AAClJ,MAAM,WAAW,8BAA8B;IAC7C,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,CACd,YAAY,EAAE,SAAS,OAAO,EAAE,GAC/B,OAAO,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,EAAE,CAAC,CAAC;CACnD;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,8BAA8B,GACrC,YAAY,CAqDd"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { SolanaSigner } from "../types.js";
|
|
2
|
+
import type { VersionedTransaction } from "@solana/web3.js";
|
|
3
|
+
/** Any signer with a `publicKey` and `signTransaction(VersionedTransaction)` method — matches `useWallet()` from `@solana/wallet-adapter-react` and injected wallet providers like `window.phantom.solana`. */
|
|
4
|
+
export interface WalletAdapterSigner {
|
|
5
|
+
publicKey: {
|
|
6
|
+
toBase58(): string;
|
|
7
|
+
};
|
|
8
|
+
signTransaction: <T extends VersionedTransaction>(transaction: T) => Promise<T>;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Adapts a wallet that signs `VersionedTransaction` objects into a {@link SolanaSigner}.
|
|
12
|
+
*
|
|
13
|
+
* Works with `useWallet()` from `@solana/wallet-adapter-react` and injected
|
|
14
|
+
* browser wallet providers (e.g. `window.phantom.solana`). Handles the
|
|
15
|
+
* `Uint8Array` ↔ `VersionedTransaction` conversion internally.
|
|
16
|
+
*
|
|
17
|
+
* For `@solana/kit` signers, use {@link fromKitSigner}. For raw Ed25519
|
|
18
|
+
* keypairs, use {@link fromKeypair}. For wallet-standard wallets, use
|
|
19
|
+
* {@link fromWalletStandard}.
|
|
20
|
+
*
|
|
21
|
+
* Requires `@solana/web3.js` as a peer dependency.
|
|
22
|
+
*
|
|
23
|
+
* @param {WalletAdapterSigner} signer - The wallet adapter signer
|
|
24
|
+
* @returns {SolanaSigner} A SolanaSigner compatible with `createSmartWalletClient`
|
|
25
|
+
*/
|
|
26
|
+
export declare function fromWalletAdapter(signer: WalletAdapterSigner): SolanaSigner;
|
|
27
|
+
//# sourceMappingURL=fromWalletAdapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fromWalletAdapter.d.ts","sourceRoot":"","sources":["../../../src/adapters/fromWalletAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAG5D,+MAA+M;AAC/M,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE;QAAE,QAAQ,IAAI,MAAM,CAAA;KAAE,CAAC;IAClC,eAAe,EAAE,CAAC,CAAC,SAAS,oBAAoB,EAC9C,WAAW,EAAE,CAAC,KACX,OAAO,CAAC,CAAC,CAAC,CAAC;CACjB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,mBAAmB,GAAG,YAAY,CA6B3E"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { SolanaSigner } from "../types.js";
|
|
2
|
+
/** Minimal structural shape of a wallet-standard account. */
|
|
3
|
+
export interface WalletStandardAccount {
|
|
4
|
+
address: string;
|
|
5
|
+
publicKey?: Uint8Array;
|
|
6
|
+
chains?: readonly string[];
|
|
7
|
+
features?: readonly string[];
|
|
8
|
+
[key: string]: unknown;
|
|
9
|
+
}
|
|
10
|
+
/** Minimal structural shape of a wallet-standard wallet. */
|
|
11
|
+
export interface WalletStandardWallet {
|
|
12
|
+
features: {
|
|
13
|
+
readonly [name: string]: unknown;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Adapts a Wallet Standard wallet into a {@link SolanaSigner}.
|
|
18
|
+
*
|
|
19
|
+
* Works with any wallet that implements the `solana:signTransaction` feature
|
|
20
|
+
* from the Wallet Standard spec (Phantom, Solflare, etc.). No peer dependency
|
|
21
|
+
* required — the interface uses `Uint8Array` directly.
|
|
22
|
+
*
|
|
23
|
+
* For `@solana/wallet-adapter-react` wallets, use {@link fromWalletAdapter}.
|
|
24
|
+
* For `@solana/kit` signers, use {@link fromKitSigner}. For raw Ed25519
|
|
25
|
+
* keypairs, use {@link fromKeypair}.
|
|
26
|
+
*
|
|
27
|
+
* @param {WalletStandardWallet} wallet - The wallet-standard wallet object
|
|
28
|
+
* @param {WalletStandardAccount} account - The account to sign with
|
|
29
|
+
* @returns {SolanaSigner} A SolanaSigner compatible with `createSmartWalletClient`
|
|
30
|
+
*/
|
|
31
|
+
export declare function fromWalletStandard(wallet: WalletStandardWallet, account: WalletStandardAccount): SolanaSigner;
|
|
32
|
+
//# sourceMappingURL=fromWalletStandard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fromWalletStandard.d.ts","sourceRoot":"","sources":["../../../src/adapters/fromWalletStandard.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAIhD,6DAA6D;AAC7D,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,4DAA4D;AAC5D,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE;QAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;CAChD;AAuBD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,oBAAoB,EAC5B,OAAO,EAAE,qBAAqB,GAC7B,YAAY,CAyCd"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Finds the signature slot index for `signerAddress` by decoding the
|
|
3
|
+
* transaction message and looking up the address in the account keys.
|
|
4
|
+
* Tries `@solana/kit` first, falls back to `@solana/web3.js`.
|
|
5
|
+
*
|
|
6
|
+
* @param {Uint8Array} transaction - The serialized Solana transaction bytes
|
|
7
|
+
* @param {string} signerAddress - The base58-encoded address of the signer
|
|
8
|
+
* @returns {Promise<number>} The slot index, or -1 if the address is not a required signer
|
|
9
|
+
*/
|
|
10
|
+
export declare function findSignerSlot(transaction: Uint8Array, signerAddress: string): Promise<number>;
|
|
11
|
+
//# sourceMappingURL=resolveSignerSlot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveSignerSlot.d.ts","sourceRoot":"","sources":["../../../src/adapters/resolveSignerSlot.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,wBAAsB,cAAc,CAClC,WAAW,EAAE,UAAU,EACvB,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,MAAM,CAAC,CA+BjB"}
|
package/dist/types/client.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { type Address, type Chain } from "viem";
|
|
2
|
-
import type { SmartWalletClient, SmartWalletSigner } from "./types.js";
|
|
2
|
+
import type { SmartWalletClient, SmartWalletSigner, SolanaSmartWalletClient, SolanaSigner, SolanaChainDef } from "./types.js";
|
|
3
3
|
import type { AlchemyWalletTransport } from "./transport.js";
|
|
4
|
-
|
|
4
|
+
import type { SolanaChainId } from "@alchemy/wallet-api-types";
|
|
5
|
+
export declare const SOLANA_CHAINS: Record<SolanaChainId, SolanaChainDef>;
|
|
6
|
+
export type CreateEvmSmartWalletClientParams = {
|
|
5
7
|
signer: SmartWalletSigner;
|
|
6
8
|
transport: AlchemyWalletTransport;
|
|
7
9
|
chain: Chain;
|
|
@@ -11,20 +13,33 @@ export type CreateSmartWalletClientParams = {
|
|
|
11
13
|
policyIds?: string[];
|
|
12
14
|
};
|
|
13
15
|
};
|
|
16
|
+
export type CreateSolanaSmartWalletClientParams = {
|
|
17
|
+
signer: SolanaSigner;
|
|
18
|
+
transport: AlchemyWalletTransport;
|
|
19
|
+
chain: SolanaChainId;
|
|
20
|
+
account?: string;
|
|
21
|
+
paymaster?: {
|
|
22
|
+
policyId: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
/** Either {@link CreateEvmSmartWalletClientParams} or {@link CreateSolanaSmartWalletClientParams}. */
|
|
26
|
+
export type CreateSmartWalletClientParams = CreateEvmSmartWalletClientParams | CreateSolanaSmartWalletClientParams;
|
|
27
|
+
/**
|
|
28
|
+
* Creates a smart wallet client for EVM chains with actions for preparing,
|
|
29
|
+
* signing, and sending user operations.
|
|
30
|
+
*
|
|
31
|
+
* @param {CreateEvmSmartWalletClientParams} params - EVM client configuration
|
|
32
|
+
* @returns {SmartWalletClient} An EVM smart wallet client with smart wallet actions
|
|
33
|
+
*/
|
|
34
|
+
export declare function createSmartWalletClient(params: CreateEvmSmartWalletClientParams): SmartWalletClient;
|
|
14
35
|
/**
|
|
15
|
-
* Creates a smart wallet client with
|
|
36
|
+
* Creates a smart wallet client for Solana chains with actions for preparing,
|
|
37
|
+
* signing, and sending transactions.
|
|
16
38
|
*
|
|
17
|
-
*
|
|
18
|
-
* `prepareCalls` or `sendCalls` directly without first calling `requestAccount`.
|
|
19
|
-
* Use `requestAccount` only if you need a non-7702 smart account.
|
|
39
|
+
* Solana-specific adapters are in `@alchemy/wallet-apis/solana`.
|
|
20
40
|
*
|
|
21
|
-
* @param {
|
|
22
|
-
* @
|
|
23
|
-
* @param {AlchemyWalletTransport} params.transport - The transport to use for RPC calls.
|
|
24
|
-
* @param {Chain} params.chain - The blockchain network to connect to.
|
|
25
|
-
* @param {AccountParam} [params.account] - Optional account. Can be an address string or an object with an `address` property. Defaults to the signer's address (EIP-7702).
|
|
26
|
-
* @param {object} [params.paymaster] - Optional paymaster configuration with policy IDs.
|
|
27
|
-
* @returns {SmartWalletClient} A wallet client extended with smart wallet actions.
|
|
41
|
+
* @param {CreateSolanaSmartWalletClientParams} params - Solana client configuration
|
|
42
|
+
* @returns {SolanaSmartWalletClient} A Solana smart wallet client with Solana smart wallet actions
|
|
28
43
|
*/
|
|
29
|
-
export declare
|
|
44
|
+
export declare function createSmartWalletClient(params: CreateSolanaSmartWalletClientParams): SolanaSmartWalletClient;
|
|
30
45
|
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"AACA,OAAO,EAA6B,KAAK,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,MAAM,CAAC;AAG3E,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EACjB,uBAAuB,EACvB,YAAY,EACZ,cAAc,EACf,MAAM,YAAY,CAAC;AAGpB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAwB/D,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,aAAa,EAAE,cAAc,CAK/D,CAAC;AAIF,MAAM,MAAM,gCAAgC,GAAG;IAC7C,MAAM,EAAE,iBAAiB,CAAC;IAC1B,SAAS,EAAE,sBAAsB,CAAC;IAClC,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE;QACV,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;KACtB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,mCAAmC,GAAG;IAChD,MAAM,EAAE,YAAY,CAAC;IACrB,SAAS,EAAE,sBAAsB,CAAC;IAClC,KAAK,EAAE,aAAa,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE;QACV,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;CACH,CAAC;AAEF,sGAAsG;AACtG,MAAM,MAAM,6BAA6B,GACrC,gCAAgC,GAChC,mCAAmC,CAAC;AAUxC;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,gCAAgC,GACvC,iBAAiB,CAAC;AACrB;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,mCAAmC,GAC1C,uBAAuB,CAAC"}
|
|
@@ -10,6 +10,7 @@ import { type SignMessageParams } from "../actions/signMessage.js";
|
|
|
10
10
|
import { type SignTypedDataParams } from "../actions/signTypedData.js";
|
|
11
11
|
import { type GrantPermissionsParams, type GrantPermissionsResult } from "../actions/grantPermissions.js";
|
|
12
12
|
import { type GetCapabilitiesParams, type GetCapabilitiesResult } from "../actions/getCapabilities.js";
|
|
13
|
+
import { type UndelegateAccountParams, type UndelegateAccountResult } from "../actions/undelegateAccount.js";
|
|
13
14
|
import type { InnerWalletApiClient } from "../types.js";
|
|
14
15
|
import { type GetCallsStatusParameters, type GetCallsStatusReturnType, type WaitForCallsStatusParameters, type WaitForCallsStatusReturnType } from "viem/actions";
|
|
15
16
|
export type SmartWalletActions = {
|
|
@@ -26,6 +27,7 @@ export type SmartWalletActions = {
|
|
|
26
27
|
getCallsStatus: (params: GetCallsStatusParameters) => Promise<GetCallsStatusReturnType>;
|
|
27
28
|
waitForCallsStatus: (params: WaitForCallsStatusParameters) => Promise<WaitForCallsStatusReturnType>;
|
|
28
29
|
getCapabilities: (params?: GetCapabilitiesParams | undefined) => Promise<GetCapabilitiesResult>;
|
|
30
|
+
undelegateAccount: (params?: UndelegateAccountParams) => Promise<UndelegateAccountResult>;
|
|
29
31
|
};
|
|
30
32
|
/**
|
|
31
33
|
* Decorator that adds smart wallet actions to a wallet API client.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smartWalletActions.d.ts","sourceRoot":"","sources":["../../../src/decorators/smartWalletActions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,MAAM,CAAC;AAChC,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EAC1B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACxB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAEL,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C1E,oBAAoB,EAAE,CACpB,MAAM,EAAE,0BAA0B,KAC/B,OAAO,CAAC,0BAA0B,CAAC,CAAC;IACzC,iBAAiB,EAAE,CACjB,MAAM,EAAE,uBAAuB,KAC5B,OAAO,CAAC,uBAAuB,CAAC,CAAC;IACtC,WAAW,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IACzD,aAAa,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IAC7D,gBAAgB,EAAE,CAChB,MAAM,EAAE,sBAAsB,KAC3B,OAAO,CAAC,sBAAsB,CAAC,CAAC;IACrC,cAAc,EAAE,CACd,MAAM,EAAE,wBAAwB,KAC7B,OAAO,CAAC,wBAAwB,CAAC,CAAC;IACvC,kBAAkB,EAAE,CAClB,MAAM,EAAE,4BAA4B,KACjC,OAAO,CAAC,4BAA4B,CAAC,CAAC;IAC3C,eAAe,EAAE,CACf,MAAM,CAAC,EAAE,qBAAqB,GAAG,SAAS,KACvC,OAAO,CAAC,qBAAqB,CAAC,CAAC;IACpC,iBAAiB,EAAE,CACjB,MAAM,CAAC,EAAE,uBAAuB,KAC7B,OAAO,CAAC,uBAAuB,CAAC,CAAC;CACvC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,GAC7B,QAAQ,oBAAoB,KAC3B,kBAiBD,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { InnerSolanaWalletApiClient } from "../types.js";
|
|
2
|
+
import { type SolanaPrepareCallsParams, type SolanaPrepareCallsResult } from "../actions/solana/prepareCalls.js";
|
|
3
|
+
import { type SolanaSignPreparedCallsParams, type SolanaSignPreparedCallsResult } from "../actions/solana/signPreparedCalls.js";
|
|
4
|
+
import { type SolanaSendPreparedCallsParams, type SolanaSendPreparedCallsResult } from "../actions/solana/sendPreparedCalls.js";
|
|
5
|
+
import { type SolanaSendCallsParams, type SolanaSendCallsResult } from "../actions/solana/sendCalls.js";
|
|
6
|
+
import { type SolanaGetCallsStatusParams, type SolanaGetCallsStatusResult } from "../actions/solana/getCallsStatus.js";
|
|
7
|
+
import { type SolanaWaitForCallsStatusParams, type SolanaWaitForCallsStatusResult } from "../actions/solana/waitForCallsStatus.js";
|
|
8
|
+
export type SolanaSmartWalletActions = {
|
|
9
|
+
prepareCalls: (params: SolanaPrepareCallsParams) => Promise<SolanaPrepareCallsResult>;
|
|
10
|
+
signPreparedCalls: (params: SolanaSignPreparedCallsParams) => Promise<SolanaSignPreparedCallsResult>;
|
|
11
|
+
sendPreparedCalls: (params: SolanaSendPreparedCallsParams) => Promise<SolanaSendPreparedCallsResult>;
|
|
12
|
+
sendCalls: (params: SolanaSendCallsParams) => Promise<SolanaSendCallsResult>;
|
|
13
|
+
getCallsStatus: (params: SolanaGetCallsStatusParams) => Promise<SolanaGetCallsStatusResult>;
|
|
14
|
+
waitForCallsStatus: (params: SolanaWaitForCallsStatusParams) => Promise<SolanaWaitForCallsStatusResult>;
|
|
15
|
+
};
|
|
16
|
+
export declare const solanaSmartWalletActions: (client: InnerSolanaWalletApiClient) => SolanaSmartWalletActions;
|
|
17
|
+
//# sourceMappingURL=solanaSmartWalletActions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"solanaSmartWalletActions.d.ts","sourceRoot":"","sources":["../../../src/decorators/solanaSmartWalletActions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,EAEL,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC9B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAEL,KAAK,6BAA6B,EAClC,KAAK,6BAA6B,EACnC,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAEL,KAAK,6BAA6B,EAClC,KAAK,6BAA6B,EACnC,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAEL,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC3B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAEL,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,EAChC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAEL,KAAK,8BAA8B,EACnC,KAAK,8BAA8B,EACpC,MAAM,yCAAyC,CAAC;AAEjD,MAAM,MAAM,wBAAwB,GAAG;IACrC,YAAY,EAAE,CACZ,MAAM,EAAE,wBAAwB,KAC7B,OAAO,CAAC,wBAAwB,CAAC,CAAC;IACvC,iBAAiB,EAAE,CACjB,MAAM,EAAE,6BAA6B,KAClC,OAAO,CAAC,6BAA6B,CAAC,CAAC;IAC5C,iBAAiB,EAAE,CACjB,MAAM,EAAE,6BAA6B,KAClC,OAAO,CAAC,6BAA6B,CAAC,CAAC;IAC5C,SAAS,EAAE,CAAC,MAAM,EAAE,qBAAqB,KAAK,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAC7E,cAAc,EAAE,CACd,MAAM,EAAE,0BAA0B,KAC/B,OAAO,CAAC,0BAA0B,CAAC,CAAC;IACzC,kBAAkB,EAAE,CAClB,MAAM,EAAE,8BAA8B,KACnC,OAAO,CAAC,8BAA8B,CAAC,CAAC;CAC9C,CAAC;AAEF,eAAO,MAAM,wBAAwB,GACnC,QAAQ,0BAA0B,KACjC,wBAQD,CAAC"}
|
|
@@ -1,15 +1,45 @@
|
|
|
1
|
-
import type { Address, Prettify } from "viem";
|
|
2
|
-
import type {
|
|
3
|
-
import { type PrepareCallsCapabilities
|
|
1
|
+
import type { Address, Hex, Prettify } from "viem";
|
|
2
|
+
import type { InnerWalletApiClient } from "../../types.ts";
|
|
3
|
+
import { type PrepareCallsCapabilities } from "../../utils/capabilities.js";
|
|
4
4
|
import { type AccountParam } from "../../utils/resolve.js";
|
|
5
5
|
import { wallet_requestQuote_v0 as MethodSchema } from "@alchemy/wallet-api-types/rpc";
|
|
6
|
-
import { type
|
|
7
|
-
type BaseRequestQuoteV0Params = MethodParams<typeof MethodSchema>;
|
|
6
|
+
import { type MethodResponse } from "../../utils/schema.js";
|
|
8
7
|
type RequestQuoteV0Response = MethodResponse<typeof MethodSchema>;
|
|
9
|
-
|
|
8
|
+
type SwapAmountParams = {
|
|
9
|
+
fromAmount: bigint;
|
|
10
|
+
minimumToAmount?: never;
|
|
11
|
+
} | {
|
|
12
|
+
fromAmount?: never;
|
|
13
|
+
minimumToAmount: bigint;
|
|
14
|
+
};
|
|
15
|
+
type SwapChainParams = {
|
|
16
|
+
toChainId?: never;
|
|
17
|
+
postCalls?: Array<{
|
|
18
|
+
to: Address;
|
|
19
|
+
data?: Hex;
|
|
20
|
+
value?: bigint;
|
|
21
|
+
}>;
|
|
22
|
+
} | {
|
|
23
|
+
toChainId: number;
|
|
24
|
+
postCalls?: never;
|
|
25
|
+
};
|
|
26
|
+
type SwapExecutionParams = {
|
|
27
|
+
returnRawCalls?: false;
|
|
28
|
+
capabilities?: PrepareCallsCapabilities;
|
|
29
|
+
} | {
|
|
30
|
+
returnRawCalls: true;
|
|
31
|
+
capabilities?: never;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Parameters accepted by the experimental `requestQuoteV0` action.
|
|
35
|
+
*/
|
|
36
|
+
export type RequestQuoteV0Params = Prettify<{
|
|
37
|
+
fromToken: Address;
|
|
38
|
+
toToken: Address;
|
|
39
|
+
slippage?: bigint;
|
|
10
40
|
account?: AccountParam;
|
|
11
41
|
chainId?: number;
|
|
12
|
-
}
|
|
42
|
+
} & SwapAmountParams & SwapChainParams & SwapExecutionParams>;
|
|
13
43
|
/** The modifiedRequest in client format: `account` instead of `from`, SDK capabilities. */
|
|
14
44
|
type ClientModifiedRequest = Prettify<Omit<Extract<RequestQuoteV0Response, {
|
|
15
45
|
type: "paymaster-permit";
|
|
@@ -17,6 +47,9 @@ type ClientModifiedRequest = Prettify<Omit<Extract<RequestQuoteV0Response, {
|
|
|
17
47
|
account: Address;
|
|
18
48
|
capabilities?: PrepareCallsCapabilities;
|
|
19
49
|
}>;
|
|
50
|
+
/**
|
|
51
|
+
* Result returned by the experimental `requestQuoteV0` action.
|
|
52
|
+
*/
|
|
20
53
|
export type RequestQuoteV0Result = Exclude<RequestQuoteV0Response, {
|
|
21
54
|
type: "paymaster-permit";
|
|
22
55
|
}> | (Omit<Extract<RequestQuoteV0Response, {
|
|
@@ -32,13 +65,15 @@ export type RequestQuoteV0Result = Exclude<RequestQuoteV0Response, {
|
|
|
32
65
|
* @param {RequestQuoteV0Params} params - Parameters for requesting a swap quote
|
|
33
66
|
* @param {Address} params.fromToken - The address of the token to swap from
|
|
34
67
|
* @param {Address} params.toToken - The address of the token to swap to
|
|
35
|
-
* @param {
|
|
36
|
-
* @param {
|
|
68
|
+
* @param {bigint} [params.fromAmount] - The amount to swap from (mutually exclusive with minimumToAmount)
|
|
69
|
+
* @param {bigint} [params.minimumToAmount] - The minimum amount to receive (mutually exclusive with fromAmount)
|
|
37
70
|
* @param {AccountParam} [params.account] - The account to execute the swap from. Can be an address string or an object with an `address` property. Defaults to the client's account (signer address via EIP-7702).
|
|
38
|
-
* @param {
|
|
71
|
+
* @param {number} [params.chainId] - The source chain ID. Defaults to the wallet client's chain.
|
|
72
|
+
* @param {number} [params.toChainId] - The destination chain ID for cross-chain swaps. Omit for same-chain swaps.
|
|
73
|
+
* @param {bigint} [params.slippage] - The maximum acceptable slippage in basis points.
|
|
39
74
|
* @param {boolean} [params.returnRawCalls] - Whether to return raw calls for EOA wallets (defaults to false for smart wallets)
|
|
40
75
|
* @param {object} [params.capabilities] - Optional capabilities to include with the request (only available when returnRawCalls is false)
|
|
41
|
-
* @param {Array<{to: Address
|
|
76
|
+
* @param {Array<{ to: Address; data?: Hex; value?: bigint }>} [params.postCalls] - Optional calls to execute after the swap
|
|
42
77
|
* @returns {Promise<RequestQuoteV0Result>} A Promise that resolves to either prepared calls or raw calls depending on returnRawCalls
|
|
43
78
|
*
|
|
44
79
|
* @example
|
|
@@ -48,6 +83,7 @@ export type RequestQuoteV0Result = Exclude<RequestQuoteV0Response, {
|
|
|
48
83
|
* fromToken: "0xA0b86a33E6441e1d6a8E8C7a8E8E8E8E8E8E8E8E",
|
|
49
84
|
* toToken: "0xB0b86a33E6441e1d6a8E8C7a8E8E8E8E8E8E8E8E",
|
|
50
85
|
* fromAmount: 1000000000000000000n, // 1 ETH
|
|
86
|
+
* chainId: 42161, // Arbitrum
|
|
51
87
|
* capabilities: {
|
|
52
88
|
* paymaster: { policyId: "your-policy-id" }
|
|
53
89
|
* }
|
|
@@ -58,6 +94,7 @@ export type RequestQuoteV0Result = Exclude<RequestQuoteV0Response, {
|
|
|
58
94
|
* fromToken: "0xA0b86a33E6441e1d6a8E8C7a8E8E8E8E8E8E8E8E",
|
|
59
95
|
* toToken: "0xB0b86a33E6441e1d6a8E8C7a8E8E8E8E8E8E8E8E",
|
|
60
96
|
* fromAmount: 1000000000000000000n,
|
|
97
|
+
* chainId: 42161,
|
|
61
98
|
* returnRawCalls: true
|
|
62
99
|
* });
|
|
63
100
|
* ```
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requestQuoteV0.d.ts","sourceRoot":"","sources":["../../../../src/experimental/actions/requestQuoteV0.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"requestQuoteV0.d.ts","sourceRoot":"","sources":["../../../../src/experimental/actions/requestQuoteV0.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AACnD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAIL,KAAK,wBAAwB,EAC9B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAkB,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3E,OAAO,EAAE,sBAAsB,IAAI,YAAY,EAAE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;CAAE,CAC7B,CAAC,iBAAiB,CAAC,EACpB,MAAM,GAAG,cAAc,CACxB,GAAG;IACF,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,wBAAwB,CAAC;CACzC,CACF,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAC5B,OAAO,CAAC,sBAAsB,EAAE;IAAE,IAAI,EAAE,kBAAkB,CAAA;CAAE,CAAC,GAC7D,CAAC,IAAI,CACH,OAAO,CAAC,sBAAsB,EAAE;IAAE,IAAI,EAAE,kBAAkB,CAAA;CAAE,CAAC,EAC7D,iBAAiB,CAClB,GAAG;IACF,eAAe,EAAE,qBAAqB,CAAC;CACxC,CAAC,CAAC;AAEP;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE,oBAAoB,EAC5B,MAAM,EAAE,oBAAoB,GAC3B,OAAO,CAAC,oBAAoB,CAAC,CA6C/B"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { type RequestQuoteV0Params, type RequestQuoteV0Result } from "./actions/requestQuoteV0.js";
|
|
2
2
|
import type { BaseWalletClient } from "../types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Experimental swap actions for wallet API clients.
|
|
5
|
+
*/
|
|
3
6
|
export type SwapActions = {
|
|
4
7
|
requestQuoteV0: (params: RequestQuoteV0Params) => Promise<RequestQuoteV0Result>;
|
|
5
8
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"swapActionsDecorator.d.ts","sourceRoot":"","sources":["../../../src/experimental/swapActionsDecorator.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EAC1B,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,gBAAgB,EAAwB,MAAM,aAAa,CAAC;AAE1E,MAAM,MAAM,WAAW,GAAG;IACxB,cAAc,EAAE,CACd,MAAM,EAAE,oBAAoB,KACzB,OAAO,CAAC,oBAAoB,CAAC,CAAC;CACpC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,WAAW,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,WASvD,CAAC"}
|
|
1
|
+
{"version":3,"file":"swapActionsDecorator.d.ts","sourceRoot":"","sources":["../../../src/experimental/swapActionsDecorator.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EAC1B,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,gBAAgB,EAAwB,MAAM,aAAa,CAAC;AAE1E;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,cAAc,EAAE,CACd,MAAM,EAAE,oBAAoB,KACzB,OAAO,CAAC,oBAAoB,CAAC,CAAC;CACpC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,WAAW,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,WASvD,CAAC"}
|
|
@@ -24,10 +24,12 @@ export type * from "../actions/signSignatureRequest.js";
|
|
|
24
24
|
export { signSignatureRequest } from "../actions/signSignatureRequest.js";
|
|
25
25
|
export type * from "../actions/signTypedData.js";
|
|
26
26
|
export { signTypedData } from "../actions/signTypedData.js";
|
|
27
|
-
export type * from "../
|
|
27
|
+
export type * from "../actions/undelegateAccount.js";
|
|
28
|
+
export { undelegateAccount } from "../actions/undelegateAccount.js";
|
|
29
|
+
export type { SmartWalletActions } from "../decorators/smartWalletActions.js";
|
|
28
30
|
export { smartWalletActions } from "../decorators/smartWalletActions.js";
|
|
29
|
-
export type {
|
|
30
|
-
export type
|
|
31
|
+
export type { SmartWalletClient, SolanaSmartWalletClient, SolanaSigner, } from "../types.js";
|
|
32
|
+
export type { CreateEvmSmartWalletClientParams, CreateSolanaSmartWalletClientParams, CreateSmartWalletClientParams, } from "../client.js";
|
|
31
33
|
export { createSmartWalletClient } from "../client.js";
|
|
32
34
|
export type * from "../transport.js";
|
|
33
35
|
export { alchemyWalletTransport } from "../transport.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/exports/index.ts"],"names":[],"mappings":"AACA,mBAAmB,0BAA0B,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,mBAAmB,+BAA+B,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,mBAAmB,gCAAgC,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,mBAAmB,4BAA4B,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,mBAAmB,4BAA4B,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,mBAAmB,2BAA2B,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,mBAAmB,8BAA8B,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,mBAAmB,yBAAyB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,mBAAmB,iCAAiC,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,mBAAmB,2BAA2B,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,mBAAmB,iCAAiC,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,mBAAmB,oCAAoC,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,mBAAmB,6BAA6B,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","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;AAC9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAGzE,YAAY,EACV,iBAAiB,EACjB,uBAAuB,EACvB,YAAY,GACb,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,gCAAgC,EAChC,mCAAmC,EACnC,6BAA6B,GAC9B,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAGvD,mBAAmB,iBAAiB,CAAC;AACrC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type * from "../actions/solana/prepareCalls.js";
|
|
2
|
+
export { prepareCalls } from "../actions/solana/prepareCalls.js";
|
|
3
|
+
export type * from "../actions/solana/signPreparedCalls.js";
|
|
4
|
+
export { signPreparedCalls } from "../actions/solana/signPreparedCalls.js";
|
|
5
|
+
export type * from "../actions/solana/sendPreparedCalls.js";
|
|
6
|
+
export { sendPreparedCalls } from "../actions/solana/sendPreparedCalls.js";
|
|
7
|
+
export type * from "../actions/solana/sendCalls.js";
|
|
8
|
+
export { sendCalls } from "../actions/solana/sendCalls.js";
|
|
9
|
+
export type * from "../actions/solana/getCallsStatus.js";
|
|
10
|
+
export { getCallsStatus } from "../actions/solana/getCallsStatus.js";
|
|
11
|
+
export type * from "../actions/solana/waitForCallsStatus.js";
|
|
12
|
+
export { waitForCallsStatus } from "../actions/solana/waitForCallsStatus.js";
|
|
13
|
+
export type { SolanaSmartWalletActions } from "../decorators/solanaSmartWalletActions.js";
|
|
14
|
+
export { solanaSmartWalletActions } from "../decorators/solanaSmartWalletActions.js";
|
|
15
|
+
export { SolanaSignerError } from "../adapters/SolanaSignerError.js";
|
|
16
|
+
export { fromKeypair } from "../adapters/fromKeypair.js";
|
|
17
|
+
export type { SolanaKeypairSigner } from "../adapters/fromKeypair.js";
|
|
18
|
+
export { fromKitSigner } from "../adapters/fromKitSigner.js";
|
|
19
|
+
export type { SolanaTransactionPartialSigner } from "../adapters/fromKitSigner.js";
|
|
20
|
+
export { fromWalletAdapter } from "../adapters/fromWalletAdapter.js";
|
|
21
|
+
export type { WalletAdapterSigner } from "../adapters/fromWalletAdapter.js";
|
|
22
|
+
export { fromWalletStandard } from "../adapters/fromWalletStandard.js";
|
|
23
|
+
export type { WalletStandardWallet, WalletStandardAccount, } from "../adapters/fromWalletStandard.js";
|
|
24
|
+
export type { SolanaSigner, SolanaSmartWalletClient } from "../types.js";
|
|
25
|
+
//# sourceMappingURL=solana.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"solana.d.ts","sourceRoot":"","sources":["../../../src/exports/solana.ts"],"names":[],"mappings":"AACA,mBAAmB,mCAAmC,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,mBAAmB,wCAAwC,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,mBAAmB,wCAAwC,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,mBAAmB,gCAAgC,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,mBAAmB,qCAAqC,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,mBAAmB,yCAAyC,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAG7E,YAAY,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AAC1F,OAAO,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AAGrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAGrE,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,YAAY,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,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