@solana/connector 0.2.0 → 0.2.2
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 +11 -11
- package/dist/{chunk-HPQ5T32K.mjs → chunk-3623Z2QL.mjs} +4 -4
- package/dist/{chunk-HPQ5T32K.mjs.map → chunk-3623Z2QL.mjs.map} +1 -1
- package/dist/{chunk-UCISIAOG.mjs → chunk-A7WQ3K75.mjs} +3 -3
- package/dist/{chunk-UCISIAOG.mjs.map → chunk-A7WQ3K75.mjs.map} +1 -1
- package/dist/{chunk-SITQ4JWM.js → chunk-BF67LVVM.js} +17 -21
- package/dist/chunk-BF67LVVM.js.map +1 -0
- package/dist/{chunk-RTXUS5KG.mjs → chunk-DFHJYZKZ.mjs} +84 -71
- package/dist/chunk-DFHJYZKZ.mjs.map +1 -0
- package/dist/chunk-E3DAIOYS.mjs +22 -0
- package/dist/chunk-E3DAIOYS.mjs.map +1 -0
- package/dist/chunk-FG7HTQTV.mjs +7 -0
- package/dist/chunk-FG7HTQTV.mjs.map +1 -0
- package/dist/{chunk-BJAVJQLK.js → chunk-I2XX5FUG.js} +6 -6
- package/dist/{chunk-BJAVJQLK.js.map → chunk-I2XX5FUG.js.map} +1 -1
- package/dist/chunk-L5FWMNWO.js +9 -0
- package/dist/chunk-L5FWMNWO.js.map +1 -0
- package/dist/{chunk-HN5AJF7F.js → chunk-NLPEO5GT.js} +5 -5
- package/dist/{chunk-HN5AJF7F.js.map → chunk-NLPEO5GT.js.map} +1 -1
- package/dist/chunk-QST7XLMB.js +26 -0
- package/dist/chunk-QST7XLMB.js.map +1 -0
- package/dist/{chunk-ZZTY3O4N.mjs → chunk-SJCQ3KZE.mjs} +4 -7
- package/dist/chunk-SJCQ3KZE.mjs.map +1 -0
- package/dist/{chunk-IDTUFDNB.mjs → chunk-SQ2JEA2M.mjs} +58 -11
- package/dist/chunk-SQ2JEA2M.mjs.map +1 -0
- package/dist/{chunk-BZ2VBJCZ.js → chunk-TRSJSU33.js} +141 -94
- package/dist/chunk-TRSJSU33.js.map +1 -0
- package/dist/{chunk-EM4KNOKG.js → chunk-VVLY6QPI.js} +202 -189
- package/dist/chunk-VVLY6QPI.js.map +1 -0
- package/dist/compat.js +2 -2
- package/dist/compat.mjs +1 -1
- package/dist/fireblocks-FLKRTJU3.js +67 -0
- package/dist/fireblocks-FLKRTJU3.js.map +1 -0
- package/dist/fireblocks-KCJV3GEK.mjs +65 -0
- package/dist/fireblocks-KCJV3GEK.mjs.map +1 -0
- package/dist/headless.d.mts +6 -11
- package/dist/headless.d.ts +6 -11
- package/dist/headless.js +147 -147
- package/dist/headless.mjs +4 -4
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +188 -188
- package/dist/index.mjs +5 -5
- package/dist/privy-6LYDE24Z.mjs +64 -0
- package/dist/privy-6LYDE24Z.mjs.map +1 -0
- package/dist/privy-ID4YFTKR.js +66 -0
- package/dist/privy-ID4YFTKR.js.map +1 -0
- package/dist/protocol-G-z1lRqo.d.mts +166 -0
- package/dist/protocol-G-z1lRqo.d.ts +166 -0
- package/dist/react.d.mts +18 -6
- package/dist/react.d.ts +18 -6
- package/dist/react.js +49 -49
- package/dist/react.mjs +2 -2
- package/dist/remote.d.mts +46 -0
- package/dist/remote.d.ts +46 -0
- package/dist/remote.js +212 -0
- package/dist/remote.js.map +1 -0
- package/dist/remote.mjs +198 -0
- package/dist/remote.mjs.map +1 -0
- package/dist/server.d.mts +141 -0
- package/dist/server.d.ts +141 -0
- package/dist/server.js +189 -0
- package/dist/server.js.map +1 -0
- package/dist/server.mjs +187 -0
- package/dist/server.mjs.map +1 -0
- package/dist/{standard-shim-tmnQelaJ.d.ts → standard-shim-Cg6fmjK_.d.ts} +10 -0
- package/dist/{standard-shim-CGB88PPO.d.mts → standard-shim-Cz4UNS7t.d.mts} +10 -0
- package/dist/{walletconnect-447EY3OJ.js → walletconnect-F2M3PAAN.js} +8 -8
- package/dist/{walletconnect-447EY3OJ.js.map → walletconnect-F2M3PAAN.js.map} +1 -1
- package/dist/walletconnect-Z6LPGALR.mjs +3 -0
- package/dist/{walletconnect-U455PO4I.mjs.map → walletconnect-Z6LPGALR.mjs.map} +1 -1
- package/package.json +27 -2
- package/dist/chunk-BZ2VBJCZ.js.map +0 -1
- package/dist/chunk-EM4KNOKG.js.map +0 -1
- package/dist/chunk-IDTUFDNB.mjs.map +0 -1
- package/dist/chunk-RTXUS5KG.mjs.map +0 -1
- package/dist/chunk-SITQ4JWM.js.map +0 -1
- package/dist/chunk-ZZTY3O4N.mjs.map +0 -1
- package/dist/walletconnect-U455PO4I.mjs +0 -3
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { SOLANA_CHAIN_IDS, address, chainIdToClusterId, chainIdToClusterType, clusterToChainId, copySignature, createSignableMessage, createSolanaDevnet, createSolanaLocalnet, createSolanaMainnet, createSolanaTestnet, formatSignature, getAllExplorerUrls, getChainIdFromCluster, getChainIdFromClusterId, getChainIdFromClusterType, getChainIdFromConnection, getClusterIdFromChainId, getClusterTypeFromChainId, getClusterTypeFromConnection, getLatestBlockhash, getSolanaExplorerUrl, getSolanaFmUrl, getSolscanUrl, getXrayUrl, isAccountAddress, isKitConnection, isKnownSolanaChain, isLegacyConnection, isSolanaChain, isWalletName, sendRawTransaction, validateKnownSolanaChain } from './chunk-
|
|
2
|
-
export { AccountElement, AppProvider, BalanceElement, ClusterElement, ConnectorErrorBoundary, ConnectorProvider, DisconnectElement, SkeletonShine, TokenListElement, TransactionHistoryElement, UnifiedProvider, WalletConnectProvider, WalletListElement, clearSharedQueryCache, clearTokenCaches, getBalanceQueryKey, getTokensQueryKey, getTransactionsQueryKey, getWalletAssetsQueryKey, invalidateSharedQuery, useAccount, useBalance, useCluster, useConnectWallet, useConnector, useConnectorClient, useDisconnectWallet, useGillSolanaClient, useGillTransactionSigner, useKitTransactionSigner, useSolanaClient, useTokens, useTransactionPreparer, useTransactionSigner, useTransactions, useWallet, useWalletConnectUri, useWalletConnectors, useWalletInfo, withErrorBoundary } from './chunk-
|
|
3
|
-
export { ClipboardErrorType, ConnectorClient, EnhancedStorage, EnhancedStorageAdapter, INITIAL_WALLET_STATUS, PUBLIC_RPC_ENDPOINTS, TransactionSignerError, WALLET_STATE_VERSION, clearWalletState, copyAddressToClipboard, copySignatureToClipboard, copyToClipboard, createConnectorId, createEnhancedStorageAccount, createEnhancedStorageCluster, createEnhancedStorageWallet, createEnhancedStorageWalletState, createGillTransactionSigner, createKitTransactionSigner, createTransactionSigner, formatAddress, formatBigIntBalance, formatBigIntUsd, formatLamportsToSolSafe, formatNumber, formatSOL, formatTokenAmount, formatTokenBalanceSafe, getAddressUrl, getBlockUrl, getChainIdForWalletStandard, getClusterChainId, getClusterExplorerUrl, getClusterName, getClusterRpcUrl, getClusterType, getDefaultConfig, getDefaultMobileConfig, getDefaultRpcUrl, getNetworkDisplayName, getPolyfillStatus, getTokenUrl, getTransactionUrl, getWalletNameFromConnectorId, getWalletsRegistry, installPolyfills, isClipboardAvailable, isConnected, isConnecting, isCryptoAvailable, isDevnet, isDevnetCluster, isDisconnected, isLocalCluster, isLocalnet, isMainnet, isMainnetCluster, isPolyfillInstalled, isStatusError, isTestnet, isTestnetCluster, isTransactionSignerError, isWalletConnectorId, isWalletStatusError, normalizeNetwork, parseConfigOptions, ready, saveWalletState, toClusterId, toLegacyWalletState, truncate, validateConfigOptions } from './chunk-
|
|
1
|
+
export { SOLANA_CHAIN_IDS, address, chainIdToClusterId, chainIdToClusterType, clusterToChainId, copySignature, createSignableMessage, createSolanaDevnet, createSolanaLocalnet, createSolanaMainnet, createSolanaTestnet, formatSignature, getAllExplorerUrls, getChainIdFromCluster, getChainIdFromClusterId, getChainIdFromClusterType, getChainIdFromConnection, getClusterIdFromChainId, getClusterTypeFromChainId, getClusterTypeFromConnection, getLatestBlockhash, getSolanaExplorerUrl, getSolanaFmUrl, getSolscanUrl, getXrayUrl, isAccountAddress, isKitConnection, isKnownSolanaChain, isLegacyConnection, isSolanaChain, isWalletName, sendRawTransaction, validateKnownSolanaChain } from './chunk-3623Z2QL.mjs';
|
|
2
|
+
export { AccountElement, AppProvider, BalanceElement, ClusterElement, ConnectorErrorBoundary, ConnectorProvider, DisconnectElement, SkeletonShine, TokenListElement, TransactionHistoryElement, UnifiedProvider, WalletConnectProvider, WalletListElement, clearSharedQueryCache, clearTokenCaches, getBalanceQueryKey, getTokensQueryKey, getTransactionsQueryKey, getWalletAssetsQueryKey, invalidateSharedQuery, useAccount, useBalance, useCluster, useConnectWallet, useConnector, useConnectorClient, useDisconnectWallet, useGillSolanaClient, useGillTransactionSigner, useKitTransactionSigner, useSolanaClient, useTokens, useTransactionPreparer, useTransactionSigner, useTransactions, useWallet, useWalletConnectUri, useWalletConnectors, useWalletInfo, withErrorBoundary } from './chunk-DFHJYZKZ.mjs';
|
|
3
|
+
export { ClipboardErrorType, ConnectorClient, EnhancedStorage, EnhancedStorageAdapter, INITIAL_WALLET_STATUS, PUBLIC_RPC_ENDPOINTS, TransactionSignerError, WALLET_STATE_VERSION, clearWalletState, copyAddressToClipboard, copySignatureToClipboard, copyToClipboard, createConnectorId, createEnhancedStorageAccount, createEnhancedStorageCluster, createEnhancedStorageWallet, createEnhancedStorageWalletState, createGillTransactionSigner, createKitTransactionSigner, createTransactionSigner, formatAddress, formatBigIntBalance, formatBigIntUsd, formatLamportsToSolSafe, formatNumber, formatSOL, formatTokenAmount, formatTokenBalanceSafe, getAddressUrl, getBlockUrl, getChainIdForWalletStandard, getClusterChainId, getClusterExplorerUrl, getClusterName, getClusterRpcUrl, getClusterType, getDefaultConfig, getDefaultMobileConfig, getDefaultRpcUrl, getNetworkDisplayName, getPolyfillStatus, getTokenUrl, getTransactionUrl, getWalletNameFromConnectorId, getWalletsRegistry, installPolyfills, isClipboardAvailable, isConnected, isConnecting, isCryptoAvailable, isDevnet, isDevnetCluster, isDisconnected, isLocalCluster, isLocalnet, isMainnet, isMainnetCluster, isPolyfillInstalled, isStatusError, isTestnet, isTestnetCluster, isTransactionSignerError, isWalletConnectorId, isWalletStatusError, normalizeNetwork, parseConfigOptions, ready, saveWalletState, toClusterId, toLegacyWalletState, truncate, validateConfigOptions } from './chunk-SQ2JEA2M.mjs';
|
|
4
4
|
export { isFailure, isSuccess, tryCatch, tryCatchSync } from './chunk-HO6QNKFM.mjs';
|
|
5
|
-
export { createMockWalletConnectTransport, createWalletConnectTransport, createWalletConnectWallet, isWalletConnectAvailable, registerWalletConnectWallet } from './chunk-
|
|
6
|
-
export { ConfigurationError, ConnectionError, ConnectorError, Errors, LAMPORTS_PER_SOL, NetworkError, TransactionError, ValidationError, WalletErrorType, base58ToSignatureBytes, createKitSignersFromWallet, createMessageSignerFromWallet, createSolanaClient, createTransactionSendingSignerFromWallet, createWalletError, detectMessageModification, freezeSigner, getExplorerLink, getPublicSolanaRpcUrl, getUserFriendlyMessage, isConfigurationError, isConnectionError, isConnectorError, isNetworkError, isTransactionError, isValidationError, isWalletError, lamportsToSol, prepareTransaction, signatureBytesToBase58, solToLamports, toConnectorError, updateSignatureDictionary } from './chunk-
|
|
5
|
+
export { createMockWalletConnectTransport, createWalletConnectTransport, createWalletConnectWallet, isWalletConnectAvailable, registerWalletConnectWallet } from './chunk-A7WQ3K75.mjs';
|
|
6
|
+
export { ConfigurationError, ConnectionError, ConnectorError, Errors, LAMPORTS_PER_SOL, NetworkError, TransactionError, ValidationError, WalletErrorType, base58ToSignatureBytes, createKitSignersFromWallet, createMessageSignerFromWallet, createSolanaClient, createTransactionSendingSignerFromWallet, createWalletError, detectMessageModification, freezeSigner, getExplorerLink, getPublicSolanaRpcUrl, getUserFriendlyMessage, isConfigurationError, isConnectionError, isConnectorError, isNetworkError, isTransactionError, isValidationError, isWalletError, lamportsToSol, prepareTransaction, signatureBytesToBase58, solToLamports, toConnectorError, updateSignatureDictionary } from './chunk-SJCQ3KZE.mjs';
|
|
7
7
|
//# sourceMappingURL=index.mjs.map
|
|
8
8
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
// src/server/providers/privy.ts
|
|
2
|
+
async function loadPrivySigner(config) {
|
|
3
|
+
let PrivySigner;
|
|
4
|
+
try {
|
|
5
|
+
PrivySigner = (await import('@solana/keychain-privy')).PrivySigner;
|
|
6
|
+
} catch {
|
|
7
|
+
throw new Error(
|
|
8
|
+
"@solana/keychain-privy is not installed. Install it with: npm install @solana/keychain-privy"
|
|
9
|
+
);
|
|
10
|
+
}
|
|
11
|
+
if (!PrivySigner)
|
|
12
|
+
throw new Error("@solana/keychain-privy does not export PrivySigner");
|
|
13
|
+
let signer = await PrivySigner.create({
|
|
14
|
+
appId: config.appId,
|
|
15
|
+
appSecret: config.appSecret,
|
|
16
|
+
walletId: config.walletId,
|
|
17
|
+
apiBaseUrl: config.apiBaseUrl
|
|
18
|
+
});
|
|
19
|
+
return {
|
|
20
|
+
get address() {
|
|
21
|
+
return signer.address;
|
|
22
|
+
},
|
|
23
|
+
async signTransaction(transactionBytes) {
|
|
24
|
+
return await signWithPrivy(signer, transactionBytes);
|
|
25
|
+
},
|
|
26
|
+
async signAllTransactions(transactions) {
|
|
27
|
+
let results = [];
|
|
28
|
+
for (let txBytes of transactions) {
|
|
29
|
+
let signed = await signWithPrivy(signer, txBytes);
|
|
30
|
+
results.push(signed);
|
|
31
|
+
}
|
|
32
|
+
return results;
|
|
33
|
+
},
|
|
34
|
+
async signMessage(message) {
|
|
35
|
+
let signableMessage = {
|
|
36
|
+
content: message,
|
|
37
|
+
signatures: {}
|
|
38
|
+
}, signature = (await signer.signMessages([signableMessage]))[0][signer.address];
|
|
39
|
+
if (!signature)
|
|
40
|
+
throw new Error("No signature returned from Privy");
|
|
41
|
+
return signature;
|
|
42
|
+
},
|
|
43
|
+
async isAvailable() {
|
|
44
|
+
return signer.isAvailable();
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
async function signWithPrivy(signer, transactionBytes) {
|
|
49
|
+
let { getTransactionDecoder, getTransactionEncoder } = await import('@solana/transactions'), transaction = getTransactionDecoder().decode(transactionBytes), signature = (await signer.signTransactions([transaction]))[0][signer.address];
|
|
50
|
+
if (!signature)
|
|
51
|
+
throw new Error("No signature returned from Privy");
|
|
52
|
+
let encoder = getTransactionEncoder(), signedTx = {
|
|
53
|
+
...transaction,
|
|
54
|
+
signatures: {
|
|
55
|
+
...transaction.signatures,
|
|
56
|
+
[signer.address]: signature
|
|
57
|
+
}
|
|
58
|
+
}, encoded = encoder.encode(signedTx);
|
|
59
|
+
return new Uint8Array(encoded);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export { loadPrivySigner };
|
|
63
|
+
//# sourceMappingURL=privy-6LYDE24Z.mjs.map
|
|
64
|
+
//# sourceMappingURL=privy-6LYDE24Z.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/server/providers/privy.ts"],"names":[],"mappings":";AAuBA,eAAsB,gBAAgB,MAAA,EAAoD;AAGtF,EAAA,IAAI,WAAA;AAEJ,EAAA,IAAI;AAEA,IAAA,WAAA,GAAA,CADgB,MAAM,OAAO,wBAAwB,CAAA,EAChC,WAAA;AAAA,EACzB,CAAA,CAAA,MAAgB;AACZ,IAAA,MAAM,IAAI,KAAA;AAAA,MACN;AAAA,KACJ;AAAA,EACJ;AAEA,EAAA,IAAI,CAAC,WAAA;AACD,IAAA,MAAM,IAAI,MAAM,oDAAoD,CAAA;AAIxE,EAAA,IAAM,MAAA,GAAS,MAAM,WAAA,CAAY,MAAA,CAAO;AAAA,IACpC,OAAO,MAAA,CAAO,KAAA;AAAA,IACd,WAAW,MAAA,CAAO,SAAA;AAAA,IAClB,UAAU,MAAA,CAAO,QAAA;AAAA,IACjB,YAAY,MAAA,CAAO;AAAA,GACtB,CAAA;AAGD,EAAA,OAAO;AAAA,IACH,IAAI,OAAA,GAAU;AACV,MAAA,OAAO,MAAA,CAAO,OAAA;AAAA,IAClB,CAAA;AAAA,IAEA,MAAM,gBAAgB,gBAAA,EAAmD;AAGrE,MAAA,OADe,MAAM,aAAA,CAAc,MAAA,EAAQ,gBAAgB,CAAA;AAAA,IAE/D,CAAA;AAAA,IAEA,MAAM,oBAAoB,YAAA,EAAmD;AAEzE,MAAA,IAAM,UAAwB,EAAC;AAC/B,MAAA,KAAA,IAAW,WAAW,YAAA,EAAc;AAChC,QAAA,IAAM,MAAA,GAAS,MAAM,aAAA,CAAc,MAAA,EAAQ,OAAO,CAAA;AAClD,QAAA,OAAA,CAAQ,KAAK,MAAM,CAAA;AAAA,MACvB;AACA,MAAA,OAAO,OAAA;AAAA,IACX,CAAA;AAAA,IAEA,MAAM,YAAY,OAAA,EAA0C;AAGxD,MAAA,IAAM,eAAA,GAAkB;AAAA,QACpB,OAAA,EAAS,OAAA;AAAA,QACT,YAAY;AAAC,OACjB,EAMM,SAAA,GAAA,CAJU,MAAM,MAAA,CAAO,YAAA,CAAa,CAAC,eAA6C,CAAC,CAAA,EAGjE,CAAC,CAAA,CACC,MAAA,CAAO,OAAO,CAAA;AAExC,MAAA,IAAI,CAAC,SAAA;AACD,QAAA,MAAM,IAAI,MAAM,kCAAkC,CAAA;AAGtD,MAAA,OAAO,SAAA;AAAA,IACX,CAAA;AAAA,IAEA,MAAM,WAAA,GAAgC;AAClC,MAAA,OAAO,OAAO,WAAA,EAAY;AAAA,IAC9B;AAAA,GACJ;AACJ;AAKA,eAAe,aAAA,CAAc,QAA4B,gBAAA,EAAmD;AAExG,EAAA,IAAM,EAAE,qBAAA,EAAuB,qBAAA,EAAsB,GAAI,MAAM,OAAO,sBAAsB,CAAA,EAItF,WAAA,GADU,qBAAA,EAAsB,CACV,MAAA,CAAO,gBAAgB,CAAA,EAO7C,SAAA,GAAA,CAJU,MAAM,MAAA,CAAO,gBAAA,CAAiB,CAAC,WAAsB,CAAC,CAAA,EAG9C,CAAC,CAAA,CACC,MAAA,CAAO,OAAO,CAAA;AAExC,EAAA,IAAI,CAAC,SAAA;AACD,IAAA,MAAM,IAAI,MAAM,kCAAkC,CAAA;AAItD,EAAA,IAAM,OAAA,GAAU,qBAAA,EAAsB,EAChC,QAAA,GAAW;AAAA,IACb,GAAG,WAAA;AAAA,IACH,UAAA,EAAY;AAAA,MACR,GAAG,WAAA,CAAY,UAAA;AAAA,MACf,CAAC,MAAA,CAAO,OAAO,GAAG;AAAA;AACtB,GACJ,EAEM,OAAA,GAAU,OAAA,CAAQ,MAAA,CAAO,QAAgD,CAAA;AAC/E,EAAA,OAAO,IAAI,WAAW,OAAO,CAAA;AACjC","file":"privy-6LYDE24Z.mjs","sourcesContent":["/**\n * @solana/connector/server - Privy Provider\n *\n * Dynamically loads @solana/keychain and adapts the Privy signer to the RemoteSigner interface.\n * This file is only imported server-side when Privy is configured.\n */\n\nimport type { RemoteSigner, PrivyProviderConfig } from '../route-handlers';\nimport type { SignableMessage } from '@solana/signers';\n\ninterface KeychainSignerLike {\n address: string;\n isAvailable: () => Promise<boolean>;\n signMessages: (messages: SignableMessage[]) => Promise<Record<string, Uint8Array>[]>;\n signTransactions: (transactions: unknown[]) => Promise<Record<string, Uint8Array>[]>;\n}\n\n/**\n * Load and initialize a Privy signer\n *\n * @param config - Privy provider configuration\n * @returns RemoteSigner implementation backed by Privy\n */\nexport async function loadPrivySigner(config: PrivyProviderConfig): Promise<RemoteSigner> {\n // Dynamically import @solana/keychain\n // This keeps the dependency optional and only loaded when needed\n let PrivySigner: { create: (args: unknown) => Promise<KeychainSignerLike> } | undefined;\n\n try {\n const module = (await import('@solana/keychain-privy')) as unknown as { PrivySigner?: unknown };\n PrivySigner = module.PrivySigner as { create: (args: unknown) => Promise<KeychainSignerLike> } | undefined;\n } catch (error) {\n throw new Error(\n '@solana/keychain-privy is not installed. ' + 'Install it with: npm install @solana/keychain-privy',\n );\n }\n\n if (!PrivySigner) {\n throw new Error('@solana/keychain-privy does not export PrivySigner');\n }\n\n // Create the Privy signer (async factory)\n const signer = await PrivySigner.create({\n appId: config.appId,\n appSecret: config.appSecret,\n walletId: config.walletId,\n apiBaseUrl: config.apiBaseUrl,\n });\n\n // Adapt to RemoteSigner interface\n return {\n get address() {\n return signer.address;\n },\n\n async signTransaction(transactionBytes: Uint8Array): Promise<Uint8Array> {\n // Sign using the Privy signer\n const result = await signWithPrivy(signer, transactionBytes);\n return result;\n },\n\n async signAllTransactions(transactions: Uint8Array[]): Promise<Uint8Array[]> {\n // Sign each transaction sequentially\n const results: Uint8Array[] = [];\n for (const txBytes of transactions) {\n const signed = await signWithPrivy(signer, txBytes);\n results.push(signed);\n }\n return results;\n },\n\n async signMessage(message: Uint8Array): Promise<Uint8Array> {\n // Use the signer's signMessages method\n // Create a SignableMessage-like object\n const signableMessage = {\n content: message,\n signatures: {} as Record<string, Uint8Array>,\n };\n\n const results = await signer.signMessages([signableMessage as unknown as SignableMessage]);\n\n // Extract the signature from the first result\n const sigDict = results[0];\n const signature = sigDict[signer.address];\n\n if (!signature) {\n throw new Error('No signature returned from Privy');\n }\n\n return signature;\n },\n\n async isAvailable(): Promise<boolean> {\n return signer.isAvailable();\n },\n };\n}\n\n/**\n * Sign transaction bytes using the Privy signer\n */\nasync function signWithPrivy(signer: KeychainSignerLike, transactionBytes: Uint8Array): Promise<Uint8Array> {\n // Import transaction utilities\n const { getTransactionDecoder, getTransactionEncoder } = await import('@solana/transactions');\n\n // Decode the transaction\n const decoder = getTransactionDecoder();\n const transaction = decoder.decode(transactionBytes);\n\n // Sign the transaction\n const results = await signer.signTransactions([transaction as unknown]);\n\n // Get the signature\n const sigDict = results[0];\n const signature = sigDict[signer.address];\n\n if (!signature) {\n throw new Error('No signature returned from Privy');\n }\n\n // Re-encode the transaction with the signature\n const encoder = getTransactionEncoder();\n const signedTx = {\n ...transaction,\n signatures: {\n ...transaction.signatures,\n [signer.address]: signature,\n },\n };\n\n const encoded = encoder.encode(signedTx as Parameters<typeof encoder.encode>[0]);\n return new Uint8Array(encoded);\n}\n"]}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// src/server/providers/privy.ts
|
|
4
|
+
async function loadPrivySigner(config) {
|
|
5
|
+
let PrivySigner;
|
|
6
|
+
try {
|
|
7
|
+
PrivySigner = (await import('@solana/keychain-privy')).PrivySigner;
|
|
8
|
+
} catch {
|
|
9
|
+
throw new Error(
|
|
10
|
+
"@solana/keychain-privy is not installed. Install it with: npm install @solana/keychain-privy"
|
|
11
|
+
);
|
|
12
|
+
}
|
|
13
|
+
if (!PrivySigner)
|
|
14
|
+
throw new Error("@solana/keychain-privy does not export PrivySigner");
|
|
15
|
+
let signer = await PrivySigner.create({
|
|
16
|
+
appId: config.appId,
|
|
17
|
+
appSecret: config.appSecret,
|
|
18
|
+
walletId: config.walletId,
|
|
19
|
+
apiBaseUrl: config.apiBaseUrl
|
|
20
|
+
});
|
|
21
|
+
return {
|
|
22
|
+
get address() {
|
|
23
|
+
return signer.address;
|
|
24
|
+
},
|
|
25
|
+
async signTransaction(transactionBytes) {
|
|
26
|
+
return await signWithPrivy(signer, transactionBytes);
|
|
27
|
+
},
|
|
28
|
+
async signAllTransactions(transactions) {
|
|
29
|
+
let results = [];
|
|
30
|
+
for (let txBytes of transactions) {
|
|
31
|
+
let signed = await signWithPrivy(signer, txBytes);
|
|
32
|
+
results.push(signed);
|
|
33
|
+
}
|
|
34
|
+
return results;
|
|
35
|
+
},
|
|
36
|
+
async signMessage(message) {
|
|
37
|
+
let signableMessage = {
|
|
38
|
+
content: message,
|
|
39
|
+
signatures: {}
|
|
40
|
+
}, signature = (await signer.signMessages([signableMessage]))[0][signer.address];
|
|
41
|
+
if (!signature)
|
|
42
|
+
throw new Error("No signature returned from Privy");
|
|
43
|
+
return signature;
|
|
44
|
+
},
|
|
45
|
+
async isAvailable() {
|
|
46
|
+
return signer.isAvailable();
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
async function signWithPrivy(signer, transactionBytes) {
|
|
51
|
+
let { getTransactionDecoder, getTransactionEncoder } = await import('@solana/transactions'), transaction = getTransactionDecoder().decode(transactionBytes), signature = (await signer.signTransactions([transaction]))[0][signer.address];
|
|
52
|
+
if (!signature)
|
|
53
|
+
throw new Error("No signature returned from Privy");
|
|
54
|
+
let encoder = getTransactionEncoder(), signedTx = {
|
|
55
|
+
...transaction,
|
|
56
|
+
signatures: {
|
|
57
|
+
...transaction.signatures,
|
|
58
|
+
[signer.address]: signature
|
|
59
|
+
}
|
|
60
|
+
}, encoded = encoder.encode(signedTx);
|
|
61
|
+
return new Uint8Array(encoded);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
exports.loadPrivySigner = loadPrivySigner;
|
|
65
|
+
//# sourceMappingURL=privy-ID4YFTKR.js.map
|
|
66
|
+
//# sourceMappingURL=privy-ID4YFTKR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/server/providers/privy.ts"],"names":[],"mappings":";;;AAuBA,eAAsB,gBAAgB,MAAA,EAAoD;AAGtF,EAAA,IAAI,WAAA;AAEJ,EAAA,IAAI;AAEA,IAAA,WAAA,GAAA,CADgB,MAAM,OAAO,wBAAwB,CAAA,EAChC,WAAA;AAAA,EACzB,CAAA,CAAA,MAAgB;AACZ,IAAA,MAAM,IAAI,KAAA;AAAA,MACN;AAAA,KACJ;AAAA,EACJ;AAEA,EAAA,IAAI,CAAC,WAAA;AACD,IAAA,MAAM,IAAI,MAAM,oDAAoD,CAAA;AAIxE,EAAA,IAAM,MAAA,GAAS,MAAM,WAAA,CAAY,MAAA,CAAO;AAAA,IACpC,OAAO,MAAA,CAAO,KAAA;AAAA,IACd,WAAW,MAAA,CAAO,SAAA;AAAA,IAClB,UAAU,MAAA,CAAO,QAAA;AAAA,IACjB,YAAY,MAAA,CAAO;AAAA,GACtB,CAAA;AAGD,EAAA,OAAO;AAAA,IACH,IAAI,OAAA,GAAU;AACV,MAAA,OAAO,MAAA,CAAO,OAAA;AAAA,IAClB,CAAA;AAAA,IAEA,MAAM,gBAAgB,gBAAA,EAAmD;AAGrE,MAAA,OADe,MAAM,aAAA,CAAc,MAAA,EAAQ,gBAAgB,CAAA;AAAA,IAE/D,CAAA;AAAA,IAEA,MAAM,oBAAoB,YAAA,EAAmD;AAEzE,MAAA,IAAM,UAAwB,EAAC;AAC/B,MAAA,KAAA,IAAW,WAAW,YAAA,EAAc;AAChC,QAAA,IAAM,MAAA,GAAS,MAAM,aAAA,CAAc,MAAA,EAAQ,OAAO,CAAA;AAClD,QAAA,OAAA,CAAQ,KAAK,MAAM,CAAA;AAAA,MACvB;AACA,MAAA,OAAO,OAAA;AAAA,IACX,CAAA;AAAA,IAEA,MAAM,YAAY,OAAA,EAA0C;AAGxD,MAAA,IAAM,eAAA,GAAkB;AAAA,QACpB,OAAA,EAAS,OAAA;AAAA,QACT,YAAY;AAAC,OACjB,EAMM,SAAA,GAAA,CAJU,MAAM,MAAA,CAAO,YAAA,CAAa,CAAC,eAA6C,CAAC,CAAA,EAGjE,CAAC,CAAA,CACC,MAAA,CAAO,OAAO,CAAA;AAExC,MAAA,IAAI,CAAC,SAAA;AACD,QAAA,MAAM,IAAI,MAAM,kCAAkC,CAAA;AAGtD,MAAA,OAAO,SAAA;AAAA,IACX,CAAA;AAAA,IAEA,MAAM,WAAA,GAAgC;AAClC,MAAA,OAAO,OAAO,WAAA,EAAY;AAAA,IAC9B;AAAA,GACJ;AACJ;AAKA,eAAe,aAAA,CAAc,QAA4B,gBAAA,EAAmD;AAExG,EAAA,IAAM,EAAE,qBAAA,EAAuB,qBAAA,EAAsB,GAAI,MAAM,OAAO,sBAAsB,CAAA,EAItF,WAAA,GADU,qBAAA,EAAsB,CACV,MAAA,CAAO,gBAAgB,CAAA,EAO7C,SAAA,GAAA,CAJU,MAAM,MAAA,CAAO,gBAAA,CAAiB,CAAC,WAAsB,CAAC,CAAA,EAG9C,CAAC,CAAA,CACC,MAAA,CAAO,OAAO,CAAA;AAExC,EAAA,IAAI,CAAC,SAAA;AACD,IAAA,MAAM,IAAI,MAAM,kCAAkC,CAAA;AAItD,EAAA,IAAM,OAAA,GAAU,qBAAA,EAAsB,EAChC,QAAA,GAAW;AAAA,IACb,GAAG,WAAA;AAAA,IACH,UAAA,EAAY;AAAA,MACR,GAAG,WAAA,CAAY,UAAA;AAAA,MACf,CAAC,MAAA,CAAO,OAAO,GAAG;AAAA;AACtB,GACJ,EAEM,OAAA,GAAU,OAAA,CAAQ,MAAA,CAAO,QAAgD,CAAA;AAC/E,EAAA,OAAO,IAAI,WAAW,OAAO,CAAA;AACjC","file":"privy-ID4YFTKR.js","sourcesContent":["/**\n * @solana/connector/server - Privy Provider\n *\n * Dynamically loads @solana/keychain and adapts the Privy signer to the RemoteSigner interface.\n * This file is only imported server-side when Privy is configured.\n */\n\nimport type { RemoteSigner, PrivyProviderConfig } from '../route-handlers';\nimport type { SignableMessage } from '@solana/signers';\n\ninterface KeychainSignerLike {\n address: string;\n isAvailable: () => Promise<boolean>;\n signMessages: (messages: SignableMessage[]) => Promise<Record<string, Uint8Array>[]>;\n signTransactions: (transactions: unknown[]) => Promise<Record<string, Uint8Array>[]>;\n}\n\n/**\n * Load and initialize a Privy signer\n *\n * @param config - Privy provider configuration\n * @returns RemoteSigner implementation backed by Privy\n */\nexport async function loadPrivySigner(config: PrivyProviderConfig): Promise<RemoteSigner> {\n // Dynamically import @solana/keychain\n // This keeps the dependency optional and only loaded when needed\n let PrivySigner: { create: (args: unknown) => Promise<KeychainSignerLike> } | undefined;\n\n try {\n const module = (await import('@solana/keychain-privy')) as unknown as { PrivySigner?: unknown };\n PrivySigner = module.PrivySigner as { create: (args: unknown) => Promise<KeychainSignerLike> } | undefined;\n } catch (error) {\n throw new Error(\n '@solana/keychain-privy is not installed. ' + 'Install it with: npm install @solana/keychain-privy',\n );\n }\n\n if (!PrivySigner) {\n throw new Error('@solana/keychain-privy does not export PrivySigner');\n }\n\n // Create the Privy signer (async factory)\n const signer = await PrivySigner.create({\n appId: config.appId,\n appSecret: config.appSecret,\n walletId: config.walletId,\n apiBaseUrl: config.apiBaseUrl,\n });\n\n // Adapt to RemoteSigner interface\n return {\n get address() {\n return signer.address;\n },\n\n async signTransaction(transactionBytes: Uint8Array): Promise<Uint8Array> {\n // Sign using the Privy signer\n const result = await signWithPrivy(signer, transactionBytes);\n return result;\n },\n\n async signAllTransactions(transactions: Uint8Array[]): Promise<Uint8Array[]> {\n // Sign each transaction sequentially\n const results: Uint8Array[] = [];\n for (const txBytes of transactions) {\n const signed = await signWithPrivy(signer, txBytes);\n results.push(signed);\n }\n return results;\n },\n\n async signMessage(message: Uint8Array): Promise<Uint8Array> {\n // Use the signer's signMessages method\n // Create a SignableMessage-like object\n const signableMessage = {\n content: message,\n signatures: {} as Record<string, Uint8Array>,\n };\n\n const results = await signer.signMessages([signableMessage as unknown as SignableMessage]);\n\n // Extract the signature from the first result\n const sigDict = results[0];\n const signature = sigDict[signer.address];\n\n if (!signature) {\n throw new Error('No signature returned from Privy');\n }\n\n return signature;\n },\n\n async isAvailable(): Promise<boolean> {\n return signer.isAvailable();\n },\n };\n}\n\n/**\n * Sign transaction bytes using the Privy signer\n */\nasync function signWithPrivy(signer: KeychainSignerLike, transactionBytes: Uint8Array): Promise<Uint8Array> {\n // Import transaction utilities\n const { getTransactionDecoder, getTransactionEncoder } = await import('@solana/transactions');\n\n // Decode the transaction\n const decoder = getTransactionDecoder();\n const transaction = decoder.decode(transactionBytes);\n\n // Sign the transaction\n const results = await signer.signTransactions([transaction as unknown]);\n\n // Get the signature\n const sigDict = results[0];\n const signature = sigDict[signer.address];\n\n if (!signature) {\n throw new Error('No signature returned from Privy');\n }\n\n // Re-encode the transaction with the signature\n const encoder = getTransactionEncoder();\n const signedTx = {\n ...transaction,\n signatures: {\n ...transaction.signatures,\n [signer.address]: signature,\n },\n };\n\n const encoded = encoder.encode(signedTx as Parameters<typeof encoder.encode>[0]);\n return new Uint8Array(encoded);\n}\n"]}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @solana/connector/remote - Protocol Types
|
|
3
|
+
*
|
|
4
|
+
* Defines the HTTP protocol for communication between the browser-side
|
|
5
|
+
* remote wallet adapter and the server-side signer endpoint.
|
|
6
|
+
*
|
|
7
|
+
* All byte payloads use base64 encoding for JSON transport.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Capabilities advertised by the remote signer
|
|
11
|
+
*/
|
|
12
|
+
interface RemoteSignerCapabilities {
|
|
13
|
+
/** Supports signing individual transactions */
|
|
14
|
+
signTransaction: boolean;
|
|
15
|
+
/** Supports batch signing multiple transactions */
|
|
16
|
+
signAllTransactions: boolean;
|
|
17
|
+
/** Supports signing arbitrary messages */
|
|
18
|
+
signMessage: boolean;
|
|
19
|
+
/** Supports sign + send in one operation (server broadcasts) */
|
|
20
|
+
signAndSendTransaction: boolean;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Response from GET /signer endpoint
|
|
24
|
+
* Returns signer metadata and capabilities
|
|
25
|
+
*/
|
|
26
|
+
interface RemoteSignerMetadata {
|
|
27
|
+
/** Signer's Solana address (base58) */
|
|
28
|
+
address: string;
|
|
29
|
+
/** Supported Solana chains (e.g., ['solana:mainnet', 'solana:devnet']) */
|
|
30
|
+
chains: string[];
|
|
31
|
+
/** Signer capabilities */
|
|
32
|
+
capabilities: RemoteSignerCapabilities;
|
|
33
|
+
/** Optional human-readable name */
|
|
34
|
+
name?: string;
|
|
35
|
+
/** Optional icon URL (data URI or https) */
|
|
36
|
+
icon?: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Base request structure for all POST operations
|
|
40
|
+
*/
|
|
41
|
+
interface RemoteSignerRequestBase {
|
|
42
|
+
/** Operation type */
|
|
43
|
+
operation: 'signTransaction' | 'signAllTransactions' | 'signMessage' | 'signAndSendTransaction';
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Sign a single transaction
|
|
47
|
+
*/
|
|
48
|
+
interface SignTransactionRequest extends RemoteSignerRequestBase {
|
|
49
|
+
operation: 'signTransaction';
|
|
50
|
+
/** Base64-encoded transaction bytes */
|
|
51
|
+
transaction: string;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Sign multiple transactions
|
|
55
|
+
*/
|
|
56
|
+
interface SignAllTransactionsRequest extends RemoteSignerRequestBase {
|
|
57
|
+
operation: 'signAllTransactions';
|
|
58
|
+
/** Array of base64-encoded transaction bytes */
|
|
59
|
+
transactions: string[];
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Sign an arbitrary message
|
|
63
|
+
*/
|
|
64
|
+
interface SignMessageRequest extends RemoteSignerRequestBase {
|
|
65
|
+
operation: 'signMessage';
|
|
66
|
+
/** Base64-encoded message bytes */
|
|
67
|
+
message: string;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Sign and send a transaction (server broadcasts to RPC)
|
|
71
|
+
*/
|
|
72
|
+
interface SignAndSendTransactionRequest extends RemoteSignerRequestBase {
|
|
73
|
+
operation: 'signAndSendTransaction';
|
|
74
|
+
/** Base64-encoded transaction bytes */
|
|
75
|
+
transaction: string;
|
|
76
|
+
/** Optional send options */
|
|
77
|
+
options?: {
|
|
78
|
+
/** Skip preflight simulation */
|
|
79
|
+
skipPreflight?: boolean;
|
|
80
|
+
/** Maximum retries */
|
|
81
|
+
maxRetries?: number;
|
|
82
|
+
/** Preflight commitment level */
|
|
83
|
+
preflightCommitment?: 'processed' | 'confirmed' | 'finalized';
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Union type for all POST request bodies
|
|
88
|
+
*/
|
|
89
|
+
type RemoteSignerRequest = SignTransactionRequest | SignAllTransactionsRequest | SignMessageRequest | SignAndSendTransactionRequest;
|
|
90
|
+
/**
|
|
91
|
+
* Successful response for signTransaction
|
|
92
|
+
*/
|
|
93
|
+
interface SignTransactionResponse {
|
|
94
|
+
/** Base64-encoded signed transaction bytes */
|
|
95
|
+
signedTransaction: string;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Successful response for signAllTransactions
|
|
99
|
+
*/
|
|
100
|
+
interface SignAllTransactionsResponse {
|
|
101
|
+
/** Array of base64-encoded signed transaction bytes */
|
|
102
|
+
signedTransactions: string[];
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Successful response for signMessage
|
|
106
|
+
*/
|
|
107
|
+
interface SignMessageResponse {
|
|
108
|
+
/** Base64-encoded signature bytes (64 bytes) */
|
|
109
|
+
signature: string;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Successful response for signAndSendTransaction
|
|
113
|
+
*/
|
|
114
|
+
interface SignAndSendTransactionResponse {
|
|
115
|
+
/** Transaction signature (base58) */
|
|
116
|
+
signature: string;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Error response structure
|
|
120
|
+
*/
|
|
121
|
+
interface RemoteSignerErrorResponse {
|
|
122
|
+
error: {
|
|
123
|
+
/** Error code for programmatic handling */
|
|
124
|
+
code: RemoteSignerErrorCode;
|
|
125
|
+
/** Human-readable error message */
|
|
126
|
+
message: string;
|
|
127
|
+
/** Optional additional details */
|
|
128
|
+
details?: unknown;
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Error codes returned by the signer endpoint
|
|
133
|
+
*/
|
|
134
|
+
type RemoteSignerErrorCode = 'UNAUTHORIZED' | 'FORBIDDEN' | 'INVALID_REQUEST' | 'INVALID_OPERATION' | 'SIGNING_FAILED' | 'SEND_FAILED' | 'POLICY_VIOLATION' | 'PROVIDER_ERROR' | 'INTERNAL_ERROR';
|
|
135
|
+
/**
|
|
136
|
+
* Type guard for checking if a response is an error
|
|
137
|
+
*/
|
|
138
|
+
declare function isErrorResponse(response: unknown): response is RemoteSignerErrorResponse;
|
|
139
|
+
/**
|
|
140
|
+
* Configuration for creating a remote wallet
|
|
141
|
+
*/
|
|
142
|
+
interface RemoteWalletConfig {
|
|
143
|
+
/** Signer API endpoint URL */
|
|
144
|
+
endpoint: string;
|
|
145
|
+
/** Wallet name shown in UI */
|
|
146
|
+
name: string;
|
|
147
|
+
/** Wallet icon (data URI or URL) */
|
|
148
|
+
icon?: string;
|
|
149
|
+
/** Supported chains (defaults to mainnet + devnet) */
|
|
150
|
+
chains?: `solana:${string}`[];
|
|
151
|
+
/**
|
|
152
|
+
* Function to get auth headers for requests
|
|
153
|
+
* Called before each request to allow dynamic tokens
|
|
154
|
+
*/
|
|
155
|
+
getAuthHeaders?: () => Record<string, string> | Promise<Record<string, string>>;
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Encode Uint8Array to base64 string
|
|
159
|
+
*/
|
|
160
|
+
declare function encodeBase64(bytes: Uint8Array): string;
|
|
161
|
+
/**
|
|
162
|
+
* Decode base64 string to Uint8Array
|
|
163
|
+
*/
|
|
164
|
+
declare function decodeBase64(base64: string): Uint8Array;
|
|
165
|
+
|
|
166
|
+
export { type RemoteWalletConfig as R, type SignTransactionRequest as S, type RemoteSignerMetadata as a, type RemoteSignerCapabilities as b, type RemoteSignerRequest as c, type SignAllTransactionsRequest as d, type SignMessageRequest as e, type SignAndSendTransactionRequest as f, type SignTransactionResponse as g, type SignAllTransactionsResponse as h, type SignMessageResponse as i, type SignAndSendTransactionResponse as j, type RemoteSignerErrorResponse as k, type RemoteSignerErrorCode as l, encodeBase64 as m, decodeBase64 as n, isErrorResponse as o };
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @solana/connector/remote - Protocol Types
|
|
3
|
+
*
|
|
4
|
+
* Defines the HTTP protocol for communication between the browser-side
|
|
5
|
+
* remote wallet adapter and the server-side signer endpoint.
|
|
6
|
+
*
|
|
7
|
+
* All byte payloads use base64 encoding for JSON transport.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Capabilities advertised by the remote signer
|
|
11
|
+
*/
|
|
12
|
+
interface RemoteSignerCapabilities {
|
|
13
|
+
/** Supports signing individual transactions */
|
|
14
|
+
signTransaction: boolean;
|
|
15
|
+
/** Supports batch signing multiple transactions */
|
|
16
|
+
signAllTransactions: boolean;
|
|
17
|
+
/** Supports signing arbitrary messages */
|
|
18
|
+
signMessage: boolean;
|
|
19
|
+
/** Supports sign + send in one operation (server broadcasts) */
|
|
20
|
+
signAndSendTransaction: boolean;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Response from GET /signer endpoint
|
|
24
|
+
* Returns signer metadata and capabilities
|
|
25
|
+
*/
|
|
26
|
+
interface RemoteSignerMetadata {
|
|
27
|
+
/** Signer's Solana address (base58) */
|
|
28
|
+
address: string;
|
|
29
|
+
/** Supported Solana chains (e.g., ['solana:mainnet', 'solana:devnet']) */
|
|
30
|
+
chains: string[];
|
|
31
|
+
/** Signer capabilities */
|
|
32
|
+
capabilities: RemoteSignerCapabilities;
|
|
33
|
+
/** Optional human-readable name */
|
|
34
|
+
name?: string;
|
|
35
|
+
/** Optional icon URL (data URI or https) */
|
|
36
|
+
icon?: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Base request structure for all POST operations
|
|
40
|
+
*/
|
|
41
|
+
interface RemoteSignerRequestBase {
|
|
42
|
+
/** Operation type */
|
|
43
|
+
operation: 'signTransaction' | 'signAllTransactions' | 'signMessage' | 'signAndSendTransaction';
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Sign a single transaction
|
|
47
|
+
*/
|
|
48
|
+
interface SignTransactionRequest extends RemoteSignerRequestBase {
|
|
49
|
+
operation: 'signTransaction';
|
|
50
|
+
/** Base64-encoded transaction bytes */
|
|
51
|
+
transaction: string;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Sign multiple transactions
|
|
55
|
+
*/
|
|
56
|
+
interface SignAllTransactionsRequest extends RemoteSignerRequestBase {
|
|
57
|
+
operation: 'signAllTransactions';
|
|
58
|
+
/** Array of base64-encoded transaction bytes */
|
|
59
|
+
transactions: string[];
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Sign an arbitrary message
|
|
63
|
+
*/
|
|
64
|
+
interface SignMessageRequest extends RemoteSignerRequestBase {
|
|
65
|
+
operation: 'signMessage';
|
|
66
|
+
/** Base64-encoded message bytes */
|
|
67
|
+
message: string;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Sign and send a transaction (server broadcasts to RPC)
|
|
71
|
+
*/
|
|
72
|
+
interface SignAndSendTransactionRequest extends RemoteSignerRequestBase {
|
|
73
|
+
operation: 'signAndSendTransaction';
|
|
74
|
+
/** Base64-encoded transaction bytes */
|
|
75
|
+
transaction: string;
|
|
76
|
+
/** Optional send options */
|
|
77
|
+
options?: {
|
|
78
|
+
/** Skip preflight simulation */
|
|
79
|
+
skipPreflight?: boolean;
|
|
80
|
+
/** Maximum retries */
|
|
81
|
+
maxRetries?: number;
|
|
82
|
+
/** Preflight commitment level */
|
|
83
|
+
preflightCommitment?: 'processed' | 'confirmed' | 'finalized';
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Union type for all POST request bodies
|
|
88
|
+
*/
|
|
89
|
+
type RemoteSignerRequest = SignTransactionRequest | SignAllTransactionsRequest | SignMessageRequest | SignAndSendTransactionRequest;
|
|
90
|
+
/**
|
|
91
|
+
* Successful response for signTransaction
|
|
92
|
+
*/
|
|
93
|
+
interface SignTransactionResponse {
|
|
94
|
+
/** Base64-encoded signed transaction bytes */
|
|
95
|
+
signedTransaction: string;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Successful response for signAllTransactions
|
|
99
|
+
*/
|
|
100
|
+
interface SignAllTransactionsResponse {
|
|
101
|
+
/** Array of base64-encoded signed transaction bytes */
|
|
102
|
+
signedTransactions: string[];
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Successful response for signMessage
|
|
106
|
+
*/
|
|
107
|
+
interface SignMessageResponse {
|
|
108
|
+
/** Base64-encoded signature bytes (64 bytes) */
|
|
109
|
+
signature: string;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Successful response for signAndSendTransaction
|
|
113
|
+
*/
|
|
114
|
+
interface SignAndSendTransactionResponse {
|
|
115
|
+
/** Transaction signature (base58) */
|
|
116
|
+
signature: string;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Error response structure
|
|
120
|
+
*/
|
|
121
|
+
interface RemoteSignerErrorResponse {
|
|
122
|
+
error: {
|
|
123
|
+
/** Error code for programmatic handling */
|
|
124
|
+
code: RemoteSignerErrorCode;
|
|
125
|
+
/** Human-readable error message */
|
|
126
|
+
message: string;
|
|
127
|
+
/** Optional additional details */
|
|
128
|
+
details?: unknown;
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Error codes returned by the signer endpoint
|
|
133
|
+
*/
|
|
134
|
+
type RemoteSignerErrorCode = 'UNAUTHORIZED' | 'FORBIDDEN' | 'INVALID_REQUEST' | 'INVALID_OPERATION' | 'SIGNING_FAILED' | 'SEND_FAILED' | 'POLICY_VIOLATION' | 'PROVIDER_ERROR' | 'INTERNAL_ERROR';
|
|
135
|
+
/**
|
|
136
|
+
* Type guard for checking if a response is an error
|
|
137
|
+
*/
|
|
138
|
+
declare function isErrorResponse(response: unknown): response is RemoteSignerErrorResponse;
|
|
139
|
+
/**
|
|
140
|
+
* Configuration for creating a remote wallet
|
|
141
|
+
*/
|
|
142
|
+
interface RemoteWalletConfig {
|
|
143
|
+
/** Signer API endpoint URL */
|
|
144
|
+
endpoint: string;
|
|
145
|
+
/** Wallet name shown in UI */
|
|
146
|
+
name: string;
|
|
147
|
+
/** Wallet icon (data URI or URL) */
|
|
148
|
+
icon?: string;
|
|
149
|
+
/** Supported chains (defaults to mainnet + devnet) */
|
|
150
|
+
chains?: `solana:${string}`[];
|
|
151
|
+
/**
|
|
152
|
+
* Function to get auth headers for requests
|
|
153
|
+
* Called before each request to allow dynamic tokens
|
|
154
|
+
*/
|
|
155
|
+
getAuthHeaders?: () => Record<string, string> | Promise<Record<string, string>>;
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Encode Uint8Array to base64 string
|
|
159
|
+
*/
|
|
160
|
+
declare function encodeBase64(bytes: Uint8Array): string;
|
|
161
|
+
/**
|
|
162
|
+
* Decode base64 string to Uint8Array
|
|
163
|
+
*/
|
|
164
|
+
declare function decodeBase64(base64: string): Uint8Array;
|
|
165
|
+
|
|
166
|
+
export { type RemoteWalletConfig as R, type SignTransactionRequest as S, type RemoteSignerMetadata as a, type RemoteSignerCapabilities as b, type RemoteSignerRequest as c, type SignAllTransactionsRequest as d, type SignMessageRequest as e, type SignAndSendTransactionRequest as f, type SignTransactionResponse as g, type SignAllTransactionsResponse as h, type SignMessageResponse as i, type SignAndSendTransactionResponse as j, type RemoteSignerErrorResponse as k, type RemoteSignerErrorCode as l, encodeBase64 as m, decodeBase64 as n, isErrorResponse as o };
|
package/dist/react.d.mts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { d as ConnectorConfig, M as MobileWalletAdapterConfig, Q as WalletError, l as WalletStatus, i as WalletConnectorId, m as SessionAccount, k as WalletSession, j as WalletConnectorMetadata, n as ConnectOptions, t as ClusterType, A as AccountInfo, at as ClipboardResult, Y as SolanaClient } from './standard-shim-
|
|
2
|
-
export { C as ConnectorProvider, c as ConnectorSnapshot, e as ConnectorState, D as DefaultConfigOptions, E as ExtendedConnectorConfig, S as SimplifiedWalletConnectConfig, W as WalletInfo, h as WalletStandardAccount, f as WalletStandardWallet, o as createConnectorId, g as getDefaultConfig, b as getDefaultMobileConfig, q as isConnected, r as isConnecting, s as isDisconnected, p as isWalletConnectorId, u as useConnector, a as useConnectorClient } from './standard-shim-
|
|
1
|
+
import { d as ConnectorConfig, M as MobileWalletAdapterConfig, Q as WalletError, l as WalletStatus, i as WalletConnectorId, m as SessionAccount, k as WalletSession, j as WalletConnectorMetadata, n as ConnectOptions, t as ClusterType, A as AccountInfo, at as ClipboardResult, Y as SolanaClient } from './standard-shim-Cz4UNS7t.mjs';
|
|
2
|
+
export { C as ConnectorProvider, c as ConnectorSnapshot, e as ConnectorState, D as DefaultConfigOptions, E as ExtendedConnectorConfig, S as SimplifiedWalletConnectConfig, W as WalletInfo, h as WalletStandardAccount, f as WalletStandardWallet, o as createConnectorId, g as getDefaultConfig, b as getDefaultMobileConfig, q as isConnected, r as isConnecting, s as isDisconnected, p as isWalletConnectorId, u as useConnector, a as useConnectorClient } from './standard-shim-Cz4UNS7t.mjs';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import React, { ReactNode, ComponentType, PropsWithChildren, Component, ErrorInfo } from 'react';
|
|
5
|
+
export { Wallet, WalletAccount } from '@wallet-standard/base';
|
|
5
6
|
import { Address } from '@solana/addresses';
|
|
6
7
|
import { SolanaCluster, SolanaClusterId } from '@wallet-ui/core';
|
|
7
8
|
export { SolanaCluster, SolanaClusterId } from '@wallet-ui/core';
|
|
8
9
|
import { a as TransactionSigner, v as TransactionSignerCapabilities } from './transaction-signer-7NaYmP5w.mjs';
|
|
9
10
|
import { TransactionModifyingSigner } from '@solana/signers';
|
|
10
11
|
import { TransactionMessage, TransactionMessageWithFeePayer, TransactionMessageWithBlockhashLifetime } from '@solana/kit';
|
|
11
|
-
export { Wallet, WalletAccount } from '@wallet-standard/base';
|
|
12
12
|
import '@solana/keys';
|
|
13
13
|
import '@solana-mobile/wallet-standard-mobile';
|
|
14
14
|
import '@solana/transaction-messages';
|
|
@@ -393,7 +393,7 @@ declare function useAccount(): UseAccountReturn;
|
|
|
393
393
|
/**
|
|
394
394
|
* Simplified wallet information for display purposes
|
|
395
395
|
*/
|
|
396
|
-
interface WalletDisplayInfo {
|
|
396
|
+
interface WalletDisplayInfo$1 {
|
|
397
397
|
/** Wallet name */
|
|
398
398
|
name: string;
|
|
399
399
|
/** Stable connector ID for vNext API */
|
|
@@ -422,7 +422,7 @@ interface UseWalletInfoReturn {
|
|
|
422
422
|
/** Whether a connection attempt is in progress */
|
|
423
423
|
connecting: boolean;
|
|
424
424
|
/** All available wallets */
|
|
425
|
-
wallets: WalletDisplayInfo[];
|
|
425
|
+
wallets: WalletDisplayInfo$1[];
|
|
426
426
|
}
|
|
427
427
|
/**
|
|
428
428
|
* Hook for getting information about the connected wallet
|
|
@@ -1409,6 +1409,18 @@ declare namespace ClusterElement {
|
|
|
1409
1409
|
var displayName: string;
|
|
1410
1410
|
}
|
|
1411
1411
|
|
|
1412
|
+
interface WalletDisplayInfo {
|
|
1413
|
+
/** Wallet name */
|
|
1414
|
+
name: string;
|
|
1415
|
+
/** Stable connector ID for vNext API */
|
|
1416
|
+
connectorId: WalletConnectorId;
|
|
1417
|
+
/** Wallet icon/logo URL if available */
|
|
1418
|
+
icon?: string;
|
|
1419
|
+
/** Whether the wallet is connectable/ready */
|
|
1420
|
+
installed: boolean;
|
|
1421
|
+
/** Whether the wallet supports Solana connections */
|
|
1422
|
+
connectable?: boolean;
|
|
1423
|
+
}
|
|
1412
1424
|
interface WalletListElementRenderProps {
|
|
1413
1425
|
wallets: WalletDisplayInfo[];
|
|
1414
1426
|
installedWallets: WalletDisplayInfo[];
|
|
@@ -1690,4 +1702,4 @@ declare namespace SkeletonShine {
|
|
|
1690
1702
|
var displayName: string;
|
|
1691
1703
|
}
|
|
1692
1704
|
|
|
1693
|
-
export { AccountElement, type AccountElementProps, type AccountElementRenderProps, AccountInfo, AppProvider, type AppProviderProps, BalanceElement, type BalanceElementProps, type BalanceElementRenderProps, ClusterElement, type ClusterElementProps, type ClusterElementRenderProps, ClusterType, ConnectOptions, ConnectorConfig, ConnectorErrorBoundary, DisconnectElement, type DisconnectElementProps, MobileWalletAdapterConfig, SessionAccount, SkeletonShine, type Token, type TokenBalance, TokenListElement, type TokenListElementProps, type TokenListElementRenderProps, TransactionHistoryElement, type TransactionHistoryElementProps, type TransactionHistoryElementRenderProps, type TransactionInfo, type TransactionPrepareOptions, type TransactionsQueryKeyOptions, UnifiedProvider, type UnifiedProviderProps, type UseAccountReturn, type UseBalanceOptions, type UseBalanceReturn, type UseClusterReturn, type UseConnectWalletReturn, type UseDisconnectWalletReturn, type UseGillSolanaClientReturn, type UseGillTransactionSignerReturn, type UseKitTransactionSignerReturn, type UseSolanaClientReturn, type UseTokensOptions, type UseTokensReturn, type UseTransactionPreparerReturn, type UseTransactionSignerReturn, type UseTransactionsOptions, type UseTransactionsReturn, type UseWalletInfoReturn, type UseWalletReturn, type WalletConnectContextValue, WalletConnectProvider, WalletConnectorId, WalletConnectorMetadata, type WalletDisplayInfo, WalletListElement, type WalletListElementProps, type WalletListElementRenderProps, type WalletListElementWalletProps, WalletSession, WalletStatus, clearSharedQueryCache, clearTokenCaches, getBalanceQueryKey, getTokensQueryKey, getTransactionsQueryKey, getWalletAssetsQueryKey, invalidateSharedQuery, useAccount, useBalance, useCluster, useConnectWallet, useDisconnectWallet, useGillSolanaClient, useGillTransactionSigner, useKitTransactionSigner, useSolanaClient, useTokens, useTransactionPreparer, useTransactionSigner, useTransactions, useWallet, useWalletConnectUri, useWalletConnectors, useWalletInfo, withErrorBoundary };
|
|
1705
|
+
export { AccountElement, type AccountElementProps, type AccountElementRenderProps, AccountInfo, AppProvider, type AppProviderProps, BalanceElement, type BalanceElementProps, type BalanceElementRenderProps, ClusterElement, type ClusterElementProps, type ClusterElementRenderProps, ClusterType, ConnectOptions, ConnectorConfig, ConnectorErrorBoundary, DisconnectElement, type DisconnectElementProps, MobileWalletAdapterConfig, SessionAccount, SkeletonShine, type Token, type TokenBalance, TokenListElement, type TokenListElementProps, type TokenListElementRenderProps, TransactionHistoryElement, type TransactionHistoryElementProps, type TransactionHistoryElementRenderProps, type TransactionInfo, type TransactionPrepareOptions, type TransactionsQueryKeyOptions, UnifiedProvider, type UnifiedProviderProps, type UseAccountReturn, type UseBalanceOptions, type UseBalanceReturn, type UseClusterReturn, type UseConnectWalletReturn, type UseDisconnectWalletReturn, type UseGillSolanaClientReturn, type UseGillTransactionSignerReturn, type UseKitTransactionSignerReturn, type UseSolanaClientReturn, type UseTokensOptions, type UseTokensReturn, type UseTransactionPreparerReturn, type UseTransactionSignerReturn, type UseTransactionsOptions, type UseTransactionsReturn, type UseWalletInfoReturn, type UseWalletReturn, type WalletConnectContextValue, WalletConnectProvider, WalletConnectorId, WalletConnectorMetadata, type WalletDisplayInfo$1 as WalletDisplayInfo, WalletListElement, type WalletListElementProps, type WalletListElementRenderProps, type WalletListElementWalletProps, WalletSession, WalletStatus, clearSharedQueryCache, clearTokenCaches, getBalanceQueryKey, getTokensQueryKey, getTransactionsQueryKey, getWalletAssetsQueryKey, invalidateSharedQuery, useAccount, useBalance, useCluster, useConnectWallet, useDisconnectWallet, useGillSolanaClient, useGillTransactionSigner, useKitTransactionSigner, useSolanaClient, useTokens, useTransactionPreparer, useTransactionSigner, useTransactions, useWallet, useWalletConnectUri, useWalletConnectors, useWalletInfo, withErrorBoundary };
|
package/dist/react.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { d as ConnectorConfig, M as MobileWalletAdapterConfig, Q as WalletError, l as WalletStatus, i as WalletConnectorId, m as SessionAccount, k as WalletSession, j as WalletConnectorMetadata, n as ConnectOptions, t as ClusterType, A as AccountInfo, at as ClipboardResult, Y as SolanaClient } from './standard-shim-
|
|
2
|
-
export { C as ConnectorProvider, c as ConnectorSnapshot, e as ConnectorState, D as DefaultConfigOptions, E as ExtendedConnectorConfig, S as SimplifiedWalletConnectConfig, W as WalletInfo, h as WalletStandardAccount, f as WalletStandardWallet, o as createConnectorId, g as getDefaultConfig, b as getDefaultMobileConfig, q as isConnected, r as isConnecting, s as isDisconnected, p as isWalletConnectorId, u as useConnector, a as useConnectorClient } from './standard-shim-
|
|
1
|
+
import { d as ConnectorConfig, M as MobileWalletAdapterConfig, Q as WalletError, l as WalletStatus, i as WalletConnectorId, m as SessionAccount, k as WalletSession, j as WalletConnectorMetadata, n as ConnectOptions, t as ClusterType, A as AccountInfo, at as ClipboardResult, Y as SolanaClient } from './standard-shim-Cg6fmjK_.js';
|
|
2
|
+
export { C as ConnectorProvider, c as ConnectorSnapshot, e as ConnectorState, D as DefaultConfigOptions, E as ExtendedConnectorConfig, S as SimplifiedWalletConnectConfig, W as WalletInfo, h as WalletStandardAccount, f as WalletStandardWallet, o as createConnectorId, g as getDefaultConfig, b as getDefaultMobileConfig, q as isConnected, r as isConnecting, s as isDisconnected, p as isWalletConnectorId, u as useConnector, a as useConnectorClient } from './standard-shim-Cg6fmjK_.js';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import React, { ReactNode, ComponentType, PropsWithChildren, Component, ErrorInfo } from 'react';
|
|
5
|
+
export { Wallet, WalletAccount } from '@wallet-standard/base';
|
|
5
6
|
import { Address } from '@solana/addresses';
|
|
6
7
|
import { SolanaCluster, SolanaClusterId } from '@wallet-ui/core';
|
|
7
8
|
export { SolanaCluster, SolanaClusterId } from '@wallet-ui/core';
|
|
8
9
|
import { a as TransactionSigner, v as TransactionSignerCapabilities } from './transaction-signer-7NaYmP5w.js';
|
|
9
10
|
import { TransactionModifyingSigner } from '@solana/signers';
|
|
10
11
|
import { TransactionMessage, TransactionMessageWithFeePayer, TransactionMessageWithBlockhashLifetime } from '@solana/kit';
|
|
11
|
-
export { Wallet, WalletAccount } from '@wallet-standard/base';
|
|
12
12
|
import '@solana/keys';
|
|
13
13
|
import '@solana-mobile/wallet-standard-mobile';
|
|
14
14
|
import '@solana/transaction-messages';
|
|
@@ -393,7 +393,7 @@ declare function useAccount(): UseAccountReturn;
|
|
|
393
393
|
/**
|
|
394
394
|
* Simplified wallet information for display purposes
|
|
395
395
|
*/
|
|
396
|
-
interface WalletDisplayInfo {
|
|
396
|
+
interface WalletDisplayInfo$1 {
|
|
397
397
|
/** Wallet name */
|
|
398
398
|
name: string;
|
|
399
399
|
/** Stable connector ID for vNext API */
|
|
@@ -422,7 +422,7 @@ interface UseWalletInfoReturn {
|
|
|
422
422
|
/** Whether a connection attempt is in progress */
|
|
423
423
|
connecting: boolean;
|
|
424
424
|
/** All available wallets */
|
|
425
|
-
wallets: WalletDisplayInfo[];
|
|
425
|
+
wallets: WalletDisplayInfo$1[];
|
|
426
426
|
}
|
|
427
427
|
/**
|
|
428
428
|
* Hook for getting information about the connected wallet
|
|
@@ -1409,6 +1409,18 @@ declare namespace ClusterElement {
|
|
|
1409
1409
|
var displayName: string;
|
|
1410
1410
|
}
|
|
1411
1411
|
|
|
1412
|
+
interface WalletDisplayInfo {
|
|
1413
|
+
/** Wallet name */
|
|
1414
|
+
name: string;
|
|
1415
|
+
/** Stable connector ID for vNext API */
|
|
1416
|
+
connectorId: WalletConnectorId;
|
|
1417
|
+
/** Wallet icon/logo URL if available */
|
|
1418
|
+
icon?: string;
|
|
1419
|
+
/** Whether the wallet is connectable/ready */
|
|
1420
|
+
installed: boolean;
|
|
1421
|
+
/** Whether the wallet supports Solana connections */
|
|
1422
|
+
connectable?: boolean;
|
|
1423
|
+
}
|
|
1412
1424
|
interface WalletListElementRenderProps {
|
|
1413
1425
|
wallets: WalletDisplayInfo[];
|
|
1414
1426
|
installedWallets: WalletDisplayInfo[];
|
|
@@ -1690,4 +1702,4 @@ declare namespace SkeletonShine {
|
|
|
1690
1702
|
var displayName: string;
|
|
1691
1703
|
}
|
|
1692
1704
|
|
|
1693
|
-
export { AccountElement, type AccountElementProps, type AccountElementRenderProps, AccountInfo, AppProvider, type AppProviderProps, BalanceElement, type BalanceElementProps, type BalanceElementRenderProps, ClusterElement, type ClusterElementProps, type ClusterElementRenderProps, ClusterType, ConnectOptions, ConnectorConfig, ConnectorErrorBoundary, DisconnectElement, type DisconnectElementProps, MobileWalletAdapterConfig, SessionAccount, SkeletonShine, type Token, type TokenBalance, TokenListElement, type TokenListElementProps, type TokenListElementRenderProps, TransactionHistoryElement, type TransactionHistoryElementProps, type TransactionHistoryElementRenderProps, type TransactionInfo, type TransactionPrepareOptions, type TransactionsQueryKeyOptions, UnifiedProvider, type UnifiedProviderProps, type UseAccountReturn, type UseBalanceOptions, type UseBalanceReturn, type UseClusterReturn, type UseConnectWalletReturn, type UseDisconnectWalletReturn, type UseGillSolanaClientReturn, type UseGillTransactionSignerReturn, type UseKitTransactionSignerReturn, type UseSolanaClientReturn, type UseTokensOptions, type UseTokensReturn, type UseTransactionPreparerReturn, type UseTransactionSignerReturn, type UseTransactionsOptions, type UseTransactionsReturn, type UseWalletInfoReturn, type UseWalletReturn, type WalletConnectContextValue, WalletConnectProvider, WalletConnectorId, WalletConnectorMetadata, type WalletDisplayInfo, WalletListElement, type WalletListElementProps, type WalletListElementRenderProps, type WalletListElementWalletProps, WalletSession, WalletStatus, clearSharedQueryCache, clearTokenCaches, getBalanceQueryKey, getTokensQueryKey, getTransactionsQueryKey, getWalletAssetsQueryKey, invalidateSharedQuery, useAccount, useBalance, useCluster, useConnectWallet, useDisconnectWallet, useGillSolanaClient, useGillTransactionSigner, useKitTransactionSigner, useSolanaClient, useTokens, useTransactionPreparer, useTransactionSigner, useTransactions, useWallet, useWalletConnectUri, useWalletConnectors, useWalletInfo, withErrorBoundary };
|
|
1705
|
+
export { AccountElement, type AccountElementProps, type AccountElementRenderProps, AccountInfo, AppProvider, type AppProviderProps, BalanceElement, type BalanceElementProps, type BalanceElementRenderProps, ClusterElement, type ClusterElementProps, type ClusterElementRenderProps, ClusterType, ConnectOptions, ConnectorConfig, ConnectorErrorBoundary, DisconnectElement, type DisconnectElementProps, MobileWalletAdapterConfig, SessionAccount, SkeletonShine, type Token, type TokenBalance, TokenListElement, type TokenListElementProps, type TokenListElementRenderProps, TransactionHistoryElement, type TransactionHistoryElementProps, type TransactionHistoryElementRenderProps, type TransactionInfo, type TransactionPrepareOptions, type TransactionsQueryKeyOptions, UnifiedProvider, type UnifiedProviderProps, type UseAccountReturn, type UseBalanceOptions, type UseBalanceReturn, type UseClusterReturn, type UseConnectWalletReturn, type UseDisconnectWalletReturn, type UseGillSolanaClientReturn, type UseGillTransactionSignerReturn, type UseKitTransactionSignerReturn, type UseSolanaClientReturn, type UseTokensOptions, type UseTokensReturn, type UseTransactionPreparerReturn, type UseTransactionSignerReturn, type UseTransactionsOptions, type UseTransactionsReturn, type UseWalletInfoReturn, type UseWalletReturn, type WalletConnectContextValue, WalletConnectProvider, WalletConnectorId, WalletConnectorMetadata, type WalletDisplayInfo$1 as WalletDisplayInfo, WalletListElement, type WalletListElementProps, type WalletListElementRenderProps, type WalletListElementWalletProps, WalletSession, WalletStatus, clearSharedQueryCache, clearTokenCaches, getBalanceQueryKey, getTokensQueryKey, getTransactionsQueryKey, getWalletAssetsQueryKey, invalidateSharedQuery, useAccount, useBalance, useCluster, useConnectWallet, useDisconnectWallet, useGillSolanaClient, useGillTransactionSigner, useKitTransactionSigner, useSolanaClient, useTokens, useTransactionPreparer, useTransactionSigner, useTransactions, useWallet, useWalletConnectUri, useWalletConnectors, useWalletInfo, withErrorBoundary };
|