@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.d.cts
CHANGED
|
@@ -50,11 +50,6 @@ declare const SolanaExplorerNames: {
|
|
|
50
50
|
readonly devnet: readonly [SolanaExplorers.SolscanDevnet, SolanaExplorers.SolanaExplorerDevnet];
|
|
51
51
|
};
|
|
52
52
|
declare const SolanaExplorerUrls: Record<ExplorerName, string>;
|
|
53
|
-
declare const X402SolanaNetworkIdentifiers: {
|
|
54
|
-
readonly Mainnet: "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp";
|
|
55
|
-
readonly Devnet: "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1";
|
|
56
|
-
};
|
|
57
|
-
declare const SupportedX402SolanaNetworks: string[];
|
|
58
53
|
|
|
59
54
|
declare const KnownTokens: Partial<Record<WarpChainName, Record<WarpChainEnv, WarpChainAsset[]>>>;
|
|
60
55
|
declare const findKnownTokenById: (chain: WarpChainName, env: WarpChainEnv, id: string) => WarpChainAsset | null;
|
|
@@ -69,10 +64,6 @@ declare module '@solana/kit' {
|
|
|
69
64
|
export function isDurableNonceTransaction(transaction: any): boolean
|
|
70
65
|
}
|
|
71
66
|
|
|
72
|
-
declare module '@x402/svm/exact/client' {
|
|
73
|
-
export function registerExactSvmScheme(client: unknown, options: { signer: unknown }): void
|
|
74
|
-
}
|
|
75
|
-
|
|
76
67
|
declare class WarpSolanaDataLoader implements AdapterWarpDataLoader {
|
|
77
68
|
private readonly config;
|
|
78
69
|
private readonly chain;
|
|
@@ -207,7 +198,6 @@ declare class WarpSolanaWallet implements AdapterWarpWallet {
|
|
|
207
198
|
delete(provider: WarpWalletProvider, externalId: string): Promise<void>;
|
|
208
199
|
getAddress(): string | null;
|
|
209
200
|
getPublicKey(): string | null;
|
|
210
|
-
registerX402Handlers(client: unknown): Promise<Record<string, () => void>>;
|
|
211
201
|
private createProvider;
|
|
212
202
|
private initializeCache;
|
|
213
203
|
private createProviderForOperation;
|
|
@@ -221,4 +211,4 @@ declare class WarpSolanaWallet implements AdapterWarpWallet {
|
|
|
221
211
|
private isSimulationError;
|
|
222
212
|
}
|
|
223
213
|
|
|
224
|
-
export { type ExplorerName, ExplorerUrls, KnownTokens, NativeTokenSol, SolanaAdapter, SolanaExplorerMap, SolanaExplorerNames, SolanaExplorerUrls, SolanaExplorers,
|
|
214
|
+
export { type ExplorerName, ExplorerUrls, KnownTokens, NativeTokenSol, SolanaAdapter, SolanaExplorerMap, SolanaExplorerNames, SolanaExplorerUrls, SolanaExplorers, WarpSolanaConstants, WarpSolanaDataLoader, WarpSolanaExecutor, WarpSolanaExplorer, WarpSolanaOutput, WarpSolanaSerializer, WarpSolanaWallet, findKnownTokenById, getKnownTokensForChain };
|
package/dist/index.d.ts
CHANGED
|
@@ -50,11 +50,6 @@ declare const SolanaExplorerNames: {
|
|
|
50
50
|
readonly devnet: readonly [SolanaExplorers.SolscanDevnet, SolanaExplorers.SolanaExplorerDevnet];
|
|
51
51
|
};
|
|
52
52
|
declare const SolanaExplorerUrls: Record<ExplorerName, string>;
|
|
53
|
-
declare const X402SolanaNetworkIdentifiers: {
|
|
54
|
-
readonly Mainnet: "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp";
|
|
55
|
-
readonly Devnet: "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1";
|
|
56
|
-
};
|
|
57
|
-
declare const SupportedX402SolanaNetworks: string[];
|
|
58
53
|
|
|
59
54
|
declare const KnownTokens: Partial<Record<WarpChainName, Record<WarpChainEnv, WarpChainAsset[]>>>;
|
|
60
55
|
declare const findKnownTokenById: (chain: WarpChainName, env: WarpChainEnv, id: string) => WarpChainAsset | null;
|
|
@@ -69,10 +64,6 @@ declare module '@solana/kit' {
|
|
|
69
64
|
export function isDurableNonceTransaction(transaction: any): boolean
|
|
70
65
|
}
|
|
71
66
|
|
|
72
|
-
declare module '@x402/svm/exact/client' {
|
|
73
|
-
export function registerExactSvmScheme(client: unknown, options: { signer: unknown }): void
|
|
74
|
-
}
|
|
75
|
-
|
|
76
67
|
declare class WarpSolanaDataLoader implements AdapterWarpDataLoader {
|
|
77
68
|
private readonly config;
|
|
78
69
|
private readonly chain;
|
|
@@ -207,7 +198,6 @@ declare class WarpSolanaWallet implements AdapterWarpWallet {
|
|
|
207
198
|
delete(provider: WarpWalletProvider, externalId: string): Promise<void>;
|
|
208
199
|
getAddress(): string | null;
|
|
209
200
|
getPublicKey(): string | null;
|
|
210
|
-
registerX402Handlers(client: unknown): Promise<Record<string, () => void>>;
|
|
211
201
|
private createProvider;
|
|
212
202
|
private initializeCache;
|
|
213
203
|
private createProviderForOperation;
|
|
@@ -221,4 +211,4 @@ declare class WarpSolanaWallet implements AdapterWarpWallet {
|
|
|
221
211
|
private isSimulationError;
|
|
222
212
|
}
|
|
223
213
|
|
|
224
|
-
export { type ExplorerName, ExplorerUrls, KnownTokens, NativeTokenSol, SolanaAdapter, SolanaExplorerMap, SolanaExplorerNames, SolanaExplorerUrls, SolanaExplorers,
|
|
214
|
+
export { type ExplorerName, ExplorerUrls, KnownTokens, NativeTokenSol, SolanaAdapter, SolanaExplorerMap, SolanaExplorerNames, SolanaExplorerUrls, SolanaExplorers, WarpSolanaConstants, WarpSolanaDataLoader, WarpSolanaExecutor, WarpSolanaExplorer, WarpSolanaOutput, WarpSolanaSerializer, WarpSolanaWallet, findKnownTokenById, getKnownTokensForChain };
|
package/dist/index.js
CHANGED
|
@@ -38,7 +38,6 @@ __export(index_exports, {
|
|
|
38
38
|
SolanaExplorerNames: () => SolanaExplorerNames,
|
|
39
39
|
SolanaExplorerUrls: () => SolanaExplorerUrls,
|
|
40
40
|
SolanaExplorers: () => SolanaExplorers,
|
|
41
|
-
SupportedX402SolanaNetworks: () => SupportedX402SolanaNetworks,
|
|
42
41
|
WarpSolanaConstants: () => WarpSolanaConstants,
|
|
43
42
|
WarpSolanaDataLoader: () => WarpSolanaDataLoader,
|
|
44
43
|
WarpSolanaExecutor: () => WarpSolanaExecutor,
|
|
@@ -46,7 +45,6 @@ __export(index_exports, {
|
|
|
46
45
|
WarpSolanaOutput: () => WarpSolanaOutput,
|
|
47
46
|
WarpSolanaSerializer: () => WarpSolanaSerializer,
|
|
48
47
|
WarpSolanaWallet: () => WarpSolanaWallet,
|
|
49
|
-
X402SolanaNetworkIdentifiers: () => X402SolanaNetworkIdentifiers,
|
|
50
48
|
findKnownTokenById: () => findKnownTokenById,
|
|
51
49
|
getKnownTokensForChain: () => getKnownTokensForChain
|
|
52
50
|
});
|
|
@@ -113,11 +111,6 @@ var SolanaExplorerNames = {
|
|
|
113
111
|
devnet: ["solscan_devnet" /* SolscanDevnet */, "solana_explorer_devnet" /* SolanaExplorerDevnet */]
|
|
114
112
|
};
|
|
115
113
|
var SolanaExplorerUrls = ExplorerUrls;
|
|
116
|
-
var X402SolanaNetworkIdentifiers = {
|
|
117
|
-
Mainnet: "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
|
|
118
|
-
Devnet: "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1"
|
|
119
|
-
};
|
|
120
|
-
var SupportedX402SolanaNetworks = [X402SolanaNetworkIdentifiers.Mainnet, X402SolanaNetworkIdentifiers.Devnet];
|
|
121
114
|
|
|
122
115
|
// src/tokenProgram.ts
|
|
123
116
|
var import_web3 = require("@solana/web3.js");
|
|
@@ -1743,9 +1736,7 @@ var WarpSolanaExplorer = class {
|
|
|
1743
1736
|
|
|
1744
1737
|
// src/WarpSolanaWallet.ts
|
|
1745
1738
|
var import_warps12 = require("@joai/warps");
|
|
1746
|
-
var import_kit = require("@solana/kit");
|
|
1747
1739
|
var import_web38 = require("@solana/web3.js");
|
|
1748
|
-
var import_client = require("@x402/svm/exact/client");
|
|
1749
1740
|
|
|
1750
1741
|
// src/providers/MnemonicWalletProvider.ts
|
|
1751
1742
|
var bip39 = __toESM(require("@scure/bip39"), 1);
|
|
@@ -2136,22 +2127,6 @@ var WarpSolanaWallet = class {
|
|
|
2136
2127
|
getPublicKey() {
|
|
2137
2128
|
return this.cachedPublicKey;
|
|
2138
2129
|
}
|
|
2139
|
-
async registerX402Handlers(client) {
|
|
2140
|
-
if (!this.walletProvider) return {};
|
|
2141
|
-
const provider = this.walletProvider;
|
|
2142
|
-
const getKeypair = provider.getKeypairInstance;
|
|
2143
|
-
if (typeof getKeypair !== "function") return {};
|
|
2144
|
-
const keypair = getKeypair();
|
|
2145
|
-
if (!keypair || !keypair.secretKey) return {};
|
|
2146
|
-
const signer = await (0, import_kit.createKeyPairSignerFromBytes)(keypair.secretKey);
|
|
2147
|
-
const handlers = {};
|
|
2148
|
-
for (const network of SupportedX402SolanaNetworks) {
|
|
2149
|
-
handlers[network] = () => {
|
|
2150
|
-
(0, import_client.registerExactSvmScheme)(client, { signer });
|
|
2151
|
-
};
|
|
2152
|
-
}
|
|
2153
|
-
return handlers;
|
|
2154
|
-
}
|
|
2155
2130
|
createProvider() {
|
|
2156
2131
|
const wallet = this.config.user?.wallets?.[this.chain.name];
|
|
2157
2132
|
if (!wallet) return null;
|
|
@@ -2345,7 +2320,6 @@ var SolanaAdapter = createSolanaAdapter(import_warps13.WarpChainName.Solana, {
|
|
|
2345
2320
|
SolanaExplorerNames,
|
|
2346
2321
|
SolanaExplorerUrls,
|
|
2347
2322
|
SolanaExplorers,
|
|
2348
|
-
SupportedX402SolanaNetworks,
|
|
2349
2323
|
WarpSolanaConstants,
|
|
2350
2324
|
WarpSolanaDataLoader,
|
|
2351
2325
|
WarpSolanaExecutor,
|
|
@@ -2353,7 +2327,6 @@ var SolanaAdapter = createSolanaAdapter(import_warps13.WarpChainName.Solana, {
|
|
|
2353
2327
|
WarpSolanaOutput,
|
|
2354
2328
|
WarpSolanaSerializer,
|
|
2355
2329
|
WarpSolanaWallet,
|
|
2356
|
-
X402SolanaNetworkIdentifiers,
|
|
2357
2330
|
findKnownTokenById,
|
|
2358
2331
|
getKnownTokensForChain
|
|
2359
2332
|
});
|