@joai/warps-adapter-solana 1.2.1 → 1.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/dist/index.d.cts +1 -11
- package/dist/index.d.ts +1 -11
- package/dist/index.js +0 -27
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +0 -25
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -3
package/dist/index.mjs
CHANGED
|
@@ -65,11 +65,6 @@ var SolanaExplorerNames = {
|
|
|
65
65
|
devnet: ["solscan_devnet" /* SolscanDevnet */, "solana_explorer_devnet" /* SolanaExplorerDevnet */]
|
|
66
66
|
};
|
|
67
67
|
var SolanaExplorerUrls = ExplorerUrls;
|
|
68
|
-
var X402SolanaNetworkIdentifiers = {
|
|
69
|
-
Mainnet: "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
|
|
70
|
-
Devnet: "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1"
|
|
71
|
-
};
|
|
72
|
-
var SupportedX402SolanaNetworks = [X402SolanaNetworkIdentifiers.Mainnet, X402SolanaNetworkIdentifiers.Devnet];
|
|
73
68
|
|
|
74
69
|
// src/tokenProgram.ts
|
|
75
70
|
import { PublicKey, SystemProgram, TransactionInstruction } from "@solana/web3.js";
|
|
@@ -1715,9 +1710,7 @@ import {
|
|
|
1715
1710
|
getProviderConfig as getProviderConfig4,
|
|
1716
1711
|
initializeWalletCache
|
|
1717
1712
|
} from "@joai/warps";
|
|
1718
|
-
import { createKeyPairSignerFromBytes } from "@solana/kit";
|
|
1719
1713
|
import { Connection as Connection5, Transaction as Transaction3, VersionedTransaction as VersionedTransaction4 } from "@solana/web3.js";
|
|
1720
|
-
import { registerExactSvmScheme } from "@x402/svm/exact/client";
|
|
1721
1714
|
|
|
1722
1715
|
// src/providers/MnemonicWalletProvider.ts
|
|
1723
1716
|
import * as bip39 from "@scure/bip39";
|
|
@@ -2123,22 +2116,6 @@ var WarpSolanaWallet = class {
|
|
|
2123
2116
|
getPublicKey() {
|
|
2124
2117
|
return this.cachedPublicKey;
|
|
2125
2118
|
}
|
|
2126
|
-
async registerX402Handlers(client) {
|
|
2127
|
-
if (!this.walletProvider) return {};
|
|
2128
|
-
const provider = this.walletProvider;
|
|
2129
|
-
const getKeypair = provider.getKeypairInstance;
|
|
2130
|
-
if (typeof getKeypair !== "function") return {};
|
|
2131
|
-
const keypair = getKeypair();
|
|
2132
|
-
if (!keypair || !keypair.secretKey) return {};
|
|
2133
|
-
const signer = await createKeyPairSignerFromBytes(keypair.secretKey);
|
|
2134
|
-
const handlers = {};
|
|
2135
|
-
for (const network of SupportedX402SolanaNetworks) {
|
|
2136
|
-
handlers[network] = () => {
|
|
2137
|
-
registerExactSvmScheme(client, { signer });
|
|
2138
|
-
};
|
|
2139
|
-
}
|
|
2140
|
-
return handlers;
|
|
2141
|
-
}
|
|
2142
2119
|
createProvider() {
|
|
2143
2120
|
const wallet = this.config.user?.wallets?.[this.chain.name];
|
|
2144
2121
|
if (!wallet) return null;
|
|
@@ -2331,7 +2308,6 @@ export {
|
|
|
2331
2308
|
SolanaExplorerNames,
|
|
2332
2309
|
SolanaExplorerUrls,
|
|
2333
2310
|
SolanaExplorers,
|
|
2334
|
-
SupportedX402SolanaNetworks,
|
|
2335
2311
|
WarpSolanaConstants,
|
|
2336
2312
|
WarpSolanaDataLoader,
|
|
2337
2313
|
WarpSolanaExecutor,
|
|
@@ -2339,7 +2315,6 @@ export {
|
|
|
2339
2315
|
WarpSolanaOutput,
|
|
2340
2316
|
WarpSolanaSerializer,
|
|
2341
2317
|
WarpSolanaWallet,
|
|
2342
|
-
X402SolanaNetworkIdentifiers,
|
|
2343
2318
|
findKnownTokenById,
|
|
2344
2319
|
getKnownTokensForChain
|
|
2345
2320
|
};
|