cruzo-web3 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +242 -0
- package/lib/components/icons/copy-icon.component.ts +14 -0
- package/lib/components/web3-signer/web3-signer.component.module.css +106 -0
- package/lib/components/web3-signer/web3-signer.component.ts +320 -0
- package/lib/components/web3-signing/web3-signing.component.module.css +36 -0
- package/lib/components/web3-signing/web3-signing.component.ts +239 -0
- package/lib/components/web3-wallet-picker/web3-wallet-picker.bucket.ts +22 -0
- package/lib/components/web3-wallet-picker/web3-wallet-picker.component.module.css +62 -0
- package/lib/components/web3-wallet-picker/web3-wallet-picker.component.ts +171 -0
- package/lib/crypto/account-signature.ts +175 -0
- package/lib/crypto/decode-bytes.ts +93 -0
- package/lib/crypto/ecdsa-signature.ts +45 -0
- package/lib/crypto/keccak256.ts +117 -0
- package/lib/crypto/secp256k1-verify.ts +232 -0
- package/lib/crypto/sha256.ts +8 -0
- package/lib/crypto/verify-signature.ts +54 -0
- package/lib/env.d.ts +4 -0
- package/lib/errors/web3-error.ts +49 -0
- package/lib/index.ts +20 -0
- package/lib/providers/eip1193.provider.ts +152 -0
- package/lib/providers/injected.ts +71 -0
- package/lib/providers/message-bytes.ts +13 -0
- package/lib/providers/solana.provider.ts +116 -0
- package/lib/providers/tonconnect.provider.ts +161 -0
- package/lib/providers/tron.provider.ts +142 -0
- package/lib/providers/wallet-transport.ts +1 -0
- package/lib/providers/wallet.ts +92 -0
- package/lib/providers/walletconnect-ethereum.provider.ts +49 -0
- package/lib/pub-key.ts +144 -0
- package/lib/signing-url.ts +334 -0
- package/lib/types/signer-state.ts +10 -0
- package/lib/types/web3-types.ts +27 -0
- package/lib/utils/format-pub-key.ts +18 -0
- package/lib/web3-wallet.ts +31 -0
- package/lib/web3.service.ts +419 -0
- package/package.json +58 -0
|
@@ -0,0 +1,419 @@
|
|
|
1
|
+
import { AbstractService } from "cruzo";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
isEvmAddressPubKey,
|
|
5
|
+
isSecp256k1PublicKeyPubKey,
|
|
6
|
+
isTronAddressPubKey,
|
|
7
|
+
verifyAccountSignedContent,
|
|
8
|
+
} from "./crypto/account-signature";
|
|
9
|
+
import { normalizeContent, verifySignedBytes } from "./crypto/verify-signature";
|
|
10
|
+
import { Web3Error } from "./errors/web3-error";
|
|
11
|
+
import {
|
|
12
|
+
assertSignatureBytes,
|
|
13
|
+
decodePubKeyBytes,
|
|
14
|
+
decodeSignatureBytes,
|
|
15
|
+
isPubKey,
|
|
16
|
+
isValidPubKey,
|
|
17
|
+
isValidPubKeyValue,
|
|
18
|
+
parsePubKey as coercePubKey,
|
|
19
|
+
} from "./pub-key";
|
|
20
|
+
import {
|
|
21
|
+
createInjectedProvider,
|
|
22
|
+
detectInjectedWallets,
|
|
23
|
+
hasInjectedWallet,
|
|
24
|
+
type InjectedProviderOptions,
|
|
25
|
+
type InjectedWalletKind,
|
|
26
|
+
} from "./providers/injected";
|
|
27
|
+
import {
|
|
28
|
+
createWalletProvider,
|
|
29
|
+
getWalletModeLabel,
|
|
30
|
+
type WalletKind,
|
|
31
|
+
type WalletProviderOptions,
|
|
32
|
+
} from "./providers/wallet";
|
|
33
|
+
import type { WalletTransport } from "./providers/wallet-transport";
|
|
34
|
+
import type {
|
|
35
|
+
PubKey,
|
|
36
|
+
PubKeyAlgorithm,
|
|
37
|
+
PubKeyEncoding,
|
|
38
|
+
SignableMessage,
|
|
39
|
+
VerifySignedContentOptions,
|
|
40
|
+
Web3Provider,
|
|
41
|
+
} from "./types/web3-types";
|
|
42
|
+
import type { Web3WalletSlot, Web3WalletTarget } from "./web3-wallet";
|
|
43
|
+
import { isCustomWallet } from "./web3-wallet";
|
|
44
|
+
|
|
45
|
+
export const ALL_BUILTIN_WALLET_SLOTS: readonly Web3WalletSlot[] = [
|
|
46
|
+
{ kind: "ethereum", transport: "extension" },
|
|
47
|
+
{ kind: "ethereum", transport: "app" },
|
|
48
|
+
{ kind: "ton", transport: "extension" },
|
|
49
|
+
{ kind: "ton", transport: "app" },
|
|
50
|
+
{ kind: "solana", transport: "extension" },
|
|
51
|
+
{ kind: "tron", transport: "extension" },
|
|
52
|
+
];
|
|
53
|
+
|
|
54
|
+
export type Web3CustomProviderFactory =
|
|
55
|
+
| Web3Provider
|
|
56
|
+
| (() => Web3Provider | Promise<Web3Provider>);
|
|
57
|
+
|
|
58
|
+
export type Web3CustomProviderConfig = {
|
|
59
|
+
id: string;
|
|
60
|
+
label: string;
|
|
61
|
+
hint?: string;
|
|
62
|
+
provider: Web3CustomProviderFactory;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export type Web3CustomProviderOption = {
|
|
66
|
+
id: string;
|
|
67
|
+
label: string;
|
|
68
|
+
hint: string;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export type Web3Config = {
|
|
72
|
+
providers?: Web3WalletSlot[];
|
|
73
|
+
customProviders?: Web3CustomProviderConfig[];
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
export type {
|
|
77
|
+
PubKey,
|
|
78
|
+
PubKeyAlgorithm,
|
|
79
|
+
PubKeyEncoding,
|
|
80
|
+
SignableMessage,
|
|
81
|
+
VerifySignedContentOptions,
|
|
82
|
+
Web3Provider,
|
|
83
|
+
Web3ProviderId,
|
|
84
|
+
} from "./types/web3-types";
|
|
85
|
+
|
|
86
|
+
export type { InjectedProviderOptions, InjectedWalletKind } from "./providers/injected";
|
|
87
|
+
export type { WalletKind, WalletProviderOptions, WalletTransport } from "./providers/wallet";
|
|
88
|
+
export { detectInjectedWallets, getInjectedWalletLabel, hasInjectedWallet } from "./providers/injected";
|
|
89
|
+
export { getWalletModeLabel } from "./providers/wallet";
|
|
90
|
+
|
|
91
|
+
export { Web3Error } from "./errors/web3-error";
|
|
92
|
+
export type { Web3ErrorCode } from "./errors/web3-error";
|
|
93
|
+
|
|
94
|
+
function assertSignableMessage(message: SignableMessage) {
|
|
95
|
+
if (typeof message === "string") {
|
|
96
|
+
if (!message.length) throw Web3Error.invalidMessage("empty string");
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
if (message instanceof Uint8Array) {
|
|
101
|
+
if (!message.length) throw Web3Error.invalidMessage("empty bytes");
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
throw Web3Error.invalidMessage("expected string or Uint8Array");
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function assertSignableContent(content: SignableMessage) {
|
|
109
|
+
if (content == null || (typeof content !== "string" && !(content instanceof Uint8Array))) {
|
|
110
|
+
throw Web3Error.invalidMessage("expected string or Uint8Array");
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
assertSignableMessage(content);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export class Web3Service extends AbstractService {
|
|
117
|
+
readonly userPubKey$ = this.newRx<PubKey | null>(null);
|
|
118
|
+
readonly setup$ = this.newRx(0);
|
|
119
|
+
|
|
120
|
+
private provider: Web3Provider | null = null;
|
|
121
|
+
private tonManifestUrl: string | null = null;
|
|
122
|
+
private walletConnectProjectId: string | null = null;
|
|
123
|
+
private builtinProviders: Web3WalletSlot[] | null = null;
|
|
124
|
+
private customProviders: Web3CustomProviderConfig[] = [];
|
|
125
|
+
|
|
126
|
+
configure(config: Web3Config) {
|
|
127
|
+
this.builtinProviders = config.providers ? [...config.providers] : null;
|
|
128
|
+
this.customProviders = config.customProviders ? [...config.customProviders] : [];
|
|
129
|
+
this.bumpSetup();
|
|
130
|
+
return this;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
reset() {
|
|
134
|
+
this.builtinProviders = null;
|
|
135
|
+
this.customProviders = [];
|
|
136
|
+
this.bumpSetup();
|
|
137
|
+
return this;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
getBuiltinProviders(): Web3WalletSlot[] {
|
|
141
|
+
return this.builtinProviders ? [...this.builtinProviders] : [...ALL_BUILTIN_WALLET_SLOTS];
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
getCustomProviders(): readonly Web3CustomProviderConfig[] {
|
|
145
|
+
return this.customProviders;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
listCustomProviderOptions(): Web3CustomProviderOption[] {
|
|
149
|
+
return this.customProviders.map(({ id, label, hint }) => ({
|
|
150
|
+
id,
|
|
151
|
+
label,
|
|
152
|
+
hint: hint ?? "",
|
|
153
|
+
}));
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
isBuiltinEnabled(kind: Web3WalletSlot["kind"], transport: Web3WalletSlot["transport"]) {
|
|
157
|
+
return this.getBuiltinProviders().some(
|
|
158
|
+
(slot) => slot.kind === kind && slot.transport === transport,
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
getWalletLabel(wallet: Web3WalletTarget) {
|
|
163
|
+
if (isCustomWallet(wallet)) {
|
|
164
|
+
return (
|
|
165
|
+
this.customProviders.find((entry) => entry.id === wallet.providerId)?.label ??
|
|
166
|
+
wallet.providerId
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
return getWalletModeLabel(wallet.kind, wallet.transport);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
useProvider(provider: Web3Provider) {
|
|
174
|
+
this.provider = provider;
|
|
175
|
+
return this;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
getProvider() {
|
|
179
|
+
return this.provider;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
setTonManifestUrl(manifestUrl: string) {
|
|
183
|
+
this.tonManifestUrl = manifestUrl;
|
|
184
|
+
this.bumpSetup();
|
|
185
|
+
return this;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
getTonManifestUrl() {
|
|
189
|
+
return this.tonManifestUrl;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
setWalletConnectProjectId(projectId: string) {
|
|
193
|
+
this.walletConnectProjectId = projectId;
|
|
194
|
+
this.bumpSetup();
|
|
195
|
+
return this;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
getWalletConnectProjectId() {
|
|
199
|
+
return this.walletConnectProjectId;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
detectInjectedWallets() {
|
|
203
|
+
return detectInjectedWallets();
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
hasInjectedWallet(kind: InjectedWalletKind = "ethereum") {
|
|
207
|
+
return hasInjectedWallet(kind);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
private walletOptions(options: WalletProviderOptions = {}): WalletProviderOptions {
|
|
211
|
+
return {
|
|
212
|
+
tonManifestUrl: options.tonManifestUrl ?? this.tonManifestUrl ?? undefined,
|
|
213
|
+
walletConnectProjectId: options.walletConnectProjectId ?? this.walletConnectProjectId ?? undefined,
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
useInjectedProvider(
|
|
218
|
+
kind: InjectedWalletKind = "ethereum",
|
|
219
|
+
options: InjectedProviderOptions = {},
|
|
220
|
+
) {
|
|
221
|
+
const provider = createInjectedProvider(
|
|
222
|
+
kind,
|
|
223
|
+
(pubKey) => {
|
|
224
|
+
this.userPubKey$.update(pubKey);
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
tonManifestUrl: options.tonManifestUrl ?? this.tonManifestUrl ?? undefined,
|
|
228
|
+
},
|
|
229
|
+
);
|
|
230
|
+
|
|
231
|
+
return this.useProvider(provider);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
async useWalletProvider(
|
|
235
|
+
kind: WalletKind,
|
|
236
|
+
transport: WalletTransport = "auto",
|
|
237
|
+
options: WalletProviderOptions = {},
|
|
238
|
+
) {
|
|
239
|
+
const provider = await createWalletProvider(
|
|
240
|
+
kind,
|
|
241
|
+
transport,
|
|
242
|
+
(pubKey) => {
|
|
243
|
+
this.userPubKey$.update(pubKey);
|
|
244
|
+
},
|
|
245
|
+
this.walletOptions(options),
|
|
246
|
+
);
|
|
247
|
+
|
|
248
|
+
return this.useProvider(provider);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
ensureInjectedProvider(
|
|
252
|
+
kind: InjectedWalletKind = "ethereum",
|
|
253
|
+
options: InjectedProviderOptions = {},
|
|
254
|
+
) {
|
|
255
|
+
if (!this.provider) this.useInjectedProvider(kind, options);
|
|
256
|
+
return this;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
async connect() {
|
|
260
|
+
const pubKey = await this.requireProvider().connect();
|
|
261
|
+
this.userPubKey$.update(pubKey);
|
|
262
|
+
return pubKey;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
async connectWallet(
|
|
266
|
+
kind: WalletKind,
|
|
267
|
+
transport: WalletTransport = "auto",
|
|
268
|
+
options: WalletProviderOptions = {},
|
|
269
|
+
) {
|
|
270
|
+
await this.useWalletProvider(kind, transport, options);
|
|
271
|
+
return this.connect();
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
async connectInjected(
|
|
275
|
+
kind: InjectedWalletKind = "ethereum",
|
|
276
|
+
options: InjectedProviderOptions = {},
|
|
277
|
+
) {
|
|
278
|
+
this.ensureInjectedProvider(kind, options);
|
|
279
|
+
return this.connect();
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
async disconnect() {
|
|
283
|
+
if (!this.provider) {
|
|
284
|
+
this.userPubKey$.update(null);
|
|
285
|
+
return;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
await this.provider.disconnect();
|
|
289
|
+
this.userPubKey$.update(null);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
async signMessage(message: SignableMessage) {
|
|
293
|
+
assertSignableMessage(message);
|
|
294
|
+
return this.requireProvider().signMessage(message);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
async signWallet(
|
|
298
|
+
message: SignableMessage,
|
|
299
|
+
kind: WalletKind,
|
|
300
|
+
transport: WalletTransport = "auto",
|
|
301
|
+
options: WalletProviderOptions = {},
|
|
302
|
+
) {
|
|
303
|
+
await this.useWalletProvider(kind, transport, options);
|
|
304
|
+
return this.signMessage(message);
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
async signInjected(
|
|
308
|
+
message: SignableMessage,
|
|
309
|
+
kind: InjectedWalletKind = "ethereum",
|
|
310
|
+
options: InjectedProviderOptions = {},
|
|
311
|
+
) {
|
|
312
|
+
this.ensureInjectedProvider(kind, options);
|
|
313
|
+
return this.signMessage(message);
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
async useCustomProvider(providerId: string) {
|
|
317
|
+
const provider = await this.resolveCustomProvider(providerId);
|
|
318
|
+
return this.useProvider(provider);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
async connectCustom(providerId: string) {
|
|
322
|
+
await this.useCustomProvider(providerId);
|
|
323
|
+
return this.connect();
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
async signCustom(message: SignableMessage, providerId: string) {
|
|
327
|
+
await this.useCustomProvider(providerId);
|
|
328
|
+
return this.signMessage(message);
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
isPubKey(value: unknown): value is PubKey {
|
|
332
|
+
return isPubKey(value);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
isValidPubKeyValue(value: string, encoding: PubKeyEncoding) {
|
|
336
|
+
return isValidPubKeyValue(value, encoding);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
isValidPubKey(pubKey: PubKey) {
|
|
340
|
+
return isValidPubKey(pubKey);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
parsePubKey(value: unknown) {
|
|
344
|
+
return coercePubKey(value);
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
async verifySignedContent(
|
|
348
|
+
content: SignableMessage,
|
|
349
|
+
signature: string,
|
|
350
|
+
pubKey: PubKey,
|
|
351
|
+
options?: VerifySignedContentOptions,
|
|
352
|
+
) {
|
|
353
|
+
assertSignableContent(content);
|
|
354
|
+
|
|
355
|
+
const key = coercePubKey(pubKey);
|
|
356
|
+
|
|
357
|
+
if (typeof signature !== "string" || !signature.length) {
|
|
358
|
+
throw Web3Error.invalidSignature("Signature must be a non-empty string");
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
if (key.type === "sr25519") {
|
|
362
|
+
throw Web3Error.unsupportedAlgorithm("sr25519 verification is not supported yet");
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
const normalized = normalizeContent(content);
|
|
366
|
+
|
|
367
|
+
if (key.type === "secp256k1" && (isEvmAddressPubKey(key) || isTronAddressPubKey(key))) {
|
|
368
|
+
return verifyAccountSignedContent(normalized, signature, key, {
|
|
369
|
+
evmPersonalSign: options?.evmPersonalSign ?? isEvmAddressPubKey(key),
|
|
370
|
+
});
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
const signatureEncoding = options?.signatureEncoding ?? key.encoding;
|
|
374
|
+
const signatureBytes = decodeSignatureBytes(signature, signatureEncoding);
|
|
375
|
+
|
|
376
|
+
assertSignatureBytes(key.type, signatureBytes);
|
|
377
|
+
|
|
378
|
+
if (key.type === "Ed25519" && !globalThis.crypto?.subtle) {
|
|
379
|
+
throw Web3Error.unsupportedAlgorithm("Ed25519 verification requires Web Crypto (crypto.subtle)");
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
if (key.type === "secp256k1" && !isSecp256k1PublicKeyPubKey(key)) {
|
|
383
|
+
throw Web3Error.invalidPubKey("secp256k1 PubKey must be an EVM/Tron address or a 33/65-byte public key");
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
const publicKeyBytes = decodePubKeyBytes(key);
|
|
387
|
+
|
|
388
|
+
return verifySignedBytes(
|
|
389
|
+
normalized,
|
|
390
|
+
signatureBytes,
|
|
391
|
+
publicKeyBytes,
|
|
392
|
+
key.type,
|
|
393
|
+
{ evmPersonalSign: options?.evmPersonalSign ?? key.type === "secp256k1" },
|
|
394
|
+
);
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
private bumpSetup() {
|
|
398
|
+
this.setup$.update((this.setup$.actual ?? 0) + 1);
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
private async resolveCustomProvider(providerId: string): Promise<Web3Provider> {
|
|
402
|
+
const entry = this.customProviders.find((item) => item.id === providerId);
|
|
403
|
+
|
|
404
|
+
if (!entry) {
|
|
405
|
+
throw Web3Error.customProviderNotFound(providerId);
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
const provider = entry.provider;
|
|
409
|
+
|
|
410
|
+
return typeof provider === "function" ? await provider() : provider;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
private requireProvider() {
|
|
414
|
+
if (!this.provider) throw Web3Error.noProvider();
|
|
415
|
+
return this.provider;
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
export const web3Service = new Web3Service();
|
package/package.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "cruzo-web3",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Web3 addon for cruzo: wallet providers, sign, verify",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"sideEffects": [
|
|
8
|
+
"*.css",
|
|
9
|
+
"*.module.css"
|
|
10
|
+
],
|
|
11
|
+
"files": [
|
|
12
|
+
"lib",
|
|
13
|
+
"README.md"
|
|
14
|
+
],
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./lib/index.ts",
|
|
18
|
+
"default": "./lib/index.ts"
|
|
19
|
+
},
|
|
20
|
+
"./components/web3-signing": {
|
|
21
|
+
"types": "./lib/components/web3-signing/web3-signing.component.ts",
|
|
22
|
+
"default": "./lib/components/web3-signing/web3-signing.component.ts"
|
|
23
|
+
},
|
|
24
|
+
"./components/web3-signer": {
|
|
25
|
+
"types": "./lib/components/web3-signer/web3-signer.component.ts",
|
|
26
|
+
"default": "./lib/components/web3-signer/web3-signer.component.ts"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"scripts": {
|
|
30
|
+
"typecheck": "tsc -p tsconfig.json",
|
|
31
|
+
"prepublishOnly": "npm run typecheck"
|
|
32
|
+
},
|
|
33
|
+
"peerDependencies": {
|
|
34
|
+
"@tonconnect/sdk": ">=3.0.0",
|
|
35
|
+
"@tonconnect/ui": ">=3.0.0",
|
|
36
|
+
"@walletconnect/ethereum-provider": ">=2.0.0",
|
|
37
|
+
"cruzo": ">=0.9.888"
|
|
38
|
+
},
|
|
39
|
+
"peerDependenciesMeta": {
|
|
40
|
+
"@tonconnect/sdk": {
|
|
41
|
+
"optional": true
|
|
42
|
+
},
|
|
43
|
+
"@tonconnect/ui": {
|
|
44
|
+
"optional": true
|
|
45
|
+
},
|
|
46
|
+
"@walletconnect/ethereum-provider": {
|
|
47
|
+
"optional": true
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@tonconnect/sdk": "^3.4.1",
|
|
52
|
+
"@tonconnect/ui": "^3.0.0",
|
|
53
|
+
"@types/node": "20.0.0",
|
|
54
|
+
"@walletconnect/ethereum-provider": "^2.23.9",
|
|
55
|
+
"cruzo": "^0.9.888",
|
|
56
|
+
"typescript": "5.9.3"
|
|
57
|
+
}
|
|
58
|
+
}
|