viem 0.2.0-main.20230401T004104 → 0.2.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.
Files changed (75) hide show
  1. package/accounts/package.json +4 -0
  2. package/dist/abi.d.ts +3 -3
  3. package/dist/abi.js +2 -2
  4. package/dist/abi.mjs +1 -1
  5. package/dist/accounts/index.d.ts +81 -0
  6. package/dist/accounts/index.js +142 -0
  7. package/dist/accounts/index.js.map +1 -0
  8. package/dist/accounts/index.mjs +142 -0
  9. package/dist/accounts/index.mjs.map +1 -0
  10. package/dist/{chain-1b53ef88.d.ts → chain-5507c6f0.d.ts} +212 -148
  11. package/dist/{chain-ec8c485d.d.ts → chain-fe47467d.d.ts} +1 -1
  12. package/dist/chains.d.ts +867 -99
  13. package/dist/chains.js +115 -63
  14. package/dist/chains.js.map +1 -1
  15. package/dist/chains.mjs +58 -6
  16. package/dist/chains.mjs.map +1 -1
  17. package/dist/chunk-63WKWOMO.js +31 -0
  18. package/dist/chunk-63WKWOMO.js.map +1 -0
  19. package/dist/{chunk-U5Z7JOWV.mjs → chunk-FSIBCQFR.mjs} +1886 -261
  20. package/dist/chunk-FSIBCQFR.mjs.map +1 -0
  21. package/dist/chunk-KON3DHPC.mjs +31 -0
  22. package/dist/chunk-KON3DHPC.mjs.map +1 -0
  23. package/dist/{chunk-HBDMIBEO.js → chunk-YDNKDSST.js} +1942 -317
  24. package/dist/chunk-YDNKDSST.js.map +1 -0
  25. package/dist/contract.d.ts +9 -7
  26. package/dist/contract.js +2 -2
  27. package/dist/contract.mjs +1 -1
  28. package/dist/{createTransport-e3eba9f7.d.ts → createTransport-21a0d2b3.d.ts} +24 -10
  29. package/dist/{eip1193-4f4e240c.d.ts → eip1193-2f3a9cd2.d.ts} +1 -1
  30. package/dist/{encodeFunctionResult-1f324375.d.ts → encodeFunctionResult-c5185b98.d.ts} +15 -15
  31. package/dist/{encodePacked-d5d5264a.d.ts → encodePacked-98f67d09.d.ts} +1 -1
  32. package/dist/ens.d.ts +6 -4
  33. package/dist/ens.js +8 -3
  34. package/dist/ens.js.map +1 -1
  35. package/dist/ens.mjs +7 -2
  36. package/dist/ens.mjs.map +1 -1
  37. package/dist/ethers.d.ts +5 -6
  38. package/dist/ethers.js +7 -5
  39. package/dist/ethers.js.map +1 -1
  40. package/dist/ethers.mjs +7 -5
  41. package/dist/ethers.mjs.map +1 -1
  42. package/dist/{formatAbiItem-15e8817d.d.ts → formatAbiItem-56dff508.d.ts} +1 -1
  43. package/dist/{getAbiItem-3e809ff9.d.ts → getAbiItem-bfba73d1.d.ts} +3 -3
  44. package/dist/getEnsResolver-9e26c596.d.ts +876 -0
  45. package/dist/index.d.ts +132 -15
  46. package/dist/index.js +150 -103
  47. package/dist/index.js.map +1 -1
  48. package/dist/index.mjs +96 -49
  49. package/dist/index.mjs.map +1 -1
  50. package/dist/{parseGwei-361e8a12.d.ts → parseGwei-d2147f8b.d.ts} +95 -15
  51. package/dist/public.d.ts +6 -4
  52. package/dist/public.js +2 -2
  53. package/dist/public.mjs +1 -1
  54. package/dist/publicKeyToAddress-623eb398.d.ts +16 -0
  55. package/dist/test-b67569fe.d.ts +198 -0
  56. package/dist/test.d.ts +11 -11
  57. package/dist/test.js +2 -2
  58. package/dist/test.mjs +1 -1
  59. package/dist/typedData-46b4d81f.d.ts +93 -0
  60. package/dist/utils/index.d.ts +22 -30
  61. package/dist/utils/index.js +28 -2
  62. package/dist/utils/index.mjs +31 -5
  63. package/dist/wallet.d.ts +6 -4
  64. package/dist/wallet.js +2 -2
  65. package/dist/wallet.mjs +1 -1
  66. package/dist/window.d.ts +2 -2
  67. package/package.json +13 -4
  68. package/dist/chunk-HBDMIBEO.js.map +0 -1
  69. package/dist/chunk-I5QGTPHV.mjs +0 -186
  70. package/dist/chunk-I5QGTPHV.mjs.map +0 -1
  71. package/dist/chunk-LWNOZI6J.js +0 -186
  72. package/dist/chunk-LWNOZI6J.js.map +0 -1
  73. package/dist/chunk-U5Z7JOWV.mjs.map +0 -1
  74. package/dist/createPublicClient-31d44569.d.ts +0 -841
  75. package/dist/test-67630299.d.ts +0 -205
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../dist/accounts/index.mjs",
3
+ "main": "../dist/accounts/index.js"
4
+ }
package/dist/abi.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { ParseAbi, ParseAbiItem, ParseAbiParameter, ParseAbiParameters, parseAbi, parseAbiItem, parseAbiParameter, parseAbiParameters } from 'abitype';
2
- export { D as DecodeAbiParametersReturnType, E as EncodeAbiParametersReturnType, G as GetAbiItemParameters, d as decodeAbiParameters, e as encodeAbiParameters, g as getAbiItem } from './getAbiItem-3e809ff9.js';
3
- export { e as encodePacked } from './encodePacked-d5d5264a.js';
4
- import './chain-1b53ef88.js';
2
+ export { D as DecodeAbiParametersReturnType, E as EncodeAbiParametersReturnType, G as GetAbiItemParameters, d as decodeAbiParameters, e as encodeAbiParameters, g as getAbiItem } from './getAbiItem-bfba73d1.js';
3
+ export { e as encodePacked } from './encodePacked-98f67d09.js';
4
+ import './chain-5507c6f0.js';
5
5
  import '@wagmi/chains';
package/dist/abi.js CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
 
9
9
 
10
- var _chunkHBDMIBEOjs = require('./chunk-HBDMIBEO.js');
10
+ var _chunkYDNKDSSTjs = require('./chunk-YDNKDSST.js');
11
11
 
12
12
 
13
13
 
@@ -17,5 +17,5 @@ var _chunkHBDMIBEOjs = require('./chunk-HBDMIBEO.js');
17
17
 
18
18
 
19
19
 
20
- exports.decodeAbiParameters = _chunkHBDMIBEOjs.decodeAbiParameters; exports.encodeAbiParameters = _chunkHBDMIBEOjs.encodeAbiParameters; exports.encodePacked = _chunkHBDMIBEOjs.encodePacked; exports.getAbiItem = _chunkHBDMIBEOjs.getAbiItem; exports.parseAbi = _chunkHBDMIBEOjs.parseAbi; exports.parseAbiItem = _chunkHBDMIBEOjs.parseAbiItem; exports.parseAbiParameter = _chunkHBDMIBEOjs.parseAbiParameter; exports.parseAbiParameters = _chunkHBDMIBEOjs.parseAbiParameters;
20
+ exports.decodeAbiParameters = _chunkYDNKDSSTjs.decodeAbiParameters; exports.encodeAbiParameters = _chunkYDNKDSSTjs.encodeAbiParameters; exports.encodePacked = _chunkYDNKDSSTjs.encodePacked; exports.getAbiItem = _chunkYDNKDSSTjs.getAbiItem; exports.parseAbi = _chunkYDNKDSSTjs.parseAbi; exports.parseAbiItem = _chunkYDNKDSSTjs.parseAbiItem; exports.parseAbiParameter = _chunkYDNKDSSTjs.parseAbiParameter; exports.parseAbiParameters = _chunkYDNKDSSTjs.parseAbiParameters;
21
21
  //# sourceMappingURL=abi.js.map
package/dist/abi.mjs CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  parseAbiItem,
8
8
  parseAbiParameter,
9
9
  parseAbiParameters
10
- } from "./chunk-U5Z7JOWV.mjs";
10
+ } from "./chunk-FSIBCQFR.mjs";
11
11
  export {
12
12
  decodeAbiParameters,
13
13
  encodeAbiParameters,
@@ -0,0 +1,81 @@
1
+ export { HDKey } from '@scure/bip32';
2
+ import { H as Hex } from '../chain-5507c6f0.js';
3
+ import { P as PrivateKeyAccount, a as AccountSource, J as JsonRpcAccount, C as CustomSource, L as LocalAccount, T as TypedDataDefinition } from '../typedData-46b4d81f.js';
4
+ export { A as Account, a as AccountSource, C as CustomSource, H as HDAccount, b as HDOptions, J as JsonRpcAccount, L as LocalAccount, P as PrivateKeyAccount } from '../typedData-46b4d81f.js';
5
+ import { Address, TypedData } from 'abitype';
6
+ export { p as parseAccount, a as publicKeyToAddress } from '../publicKeyToAddress-623eb398.js';
7
+ export { wordlist as czech } from '@scure/bip39/wordlists/czech';
8
+ export { wordlist as english } from '@scure/bip39/wordlists/english';
9
+ export { wordlist as french } from '@scure/bip39/wordlists/french';
10
+ export { wordlist as italian } from '@scure/bip39/wordlists/italian';
11
+ export { wordlist as japanese } from '@scure/bip39/wordlists/japanese';
12
+ export { wordlist as korean } from '@scure/bip39/wordlists/korean';
13
+ export { wordlist as simplifiedChinese } from '@scure/bip39/wordlists/simplified-chinese';
14
+ export { wordlist as spanish } from '@scure/bip39/wordlists/spanish';
15
+ export { wordlist as traditionalChinese } from '@scure/bip39/wordlists/traditional-chinese';
16
+ import '@wagmi/chains';
17
+
18
+ /**
19
+ * @description Generates a random mnemonic phrase with a given wordlist.
20
+ *
21
+ * @param wordlist The wordlist to use for generating the mnemonic phrase.
22
+ *
23
+ * @returns A randomly generated mnemonic phrase.
24
+ */
25
+ declare function generateMnemonic(wordlist: string[]): string;
26
+
27
+ /**
28
+ * @description Generates a random private key.
29
+ *
30
+ * @returns A randomly generated private key.
31
+ */
32
+ declare function generatePrivateKey(): Hex;
33
+
34
+ /**
35
+ * @description Creates an Account from a private key.
36
+ *
37
+ * @returns A Private Key Account.
38
+ */
39
+ declare function privateKeyToAccount(privateKey: Hex): PrivateKeyAccount;
40
+
41
+ type GetAccountReturnType<TAccountSource extends AccountSource> = (TAccountSource extends Address ? JsonRpcAccount : never) | (TAccountSource extends CustomSource ? LocalAccount : never);
42
+ /**
43
+ * @description Creates an Account from a custom signing implementation.
44
+ *
45
+ * @returns A Local Account.
46
+ */
47
+ declare function toAccount<TAccountSource extends AccountSource>(source: TAccountSource): GetAccountReturnType<TAccountSource>;
48
+
49
+ type SignMessageParameters = {
50
+ /** The message to sign. */
51
+ message: string;
52
+ /** The private key to sign with. */
53
+ privateKey: Hex;
54
+ };
55
+ type SignMessageReturnType = Hex;
56
+ /**
57
+ * @description Calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191):
58
+ * `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`.
59
+ *
60
+ * @returns The signature.
61
+ */
62
+ declare function signMessage({ message, privateKey, }: SignMessageParameters): Promise<SignMessageReturnType>;
63
+
64
+ type SignTypedDataParameters<TTypedData extends TypedData | {
65
+ [key: string]: unknown;
66
+ } = TypedData, TPrimaryType extends string = string> = TypedDataDefinition<TTypedData, TPrimaryType> & {
67
+ /** The private key to sign with. */
68
+ privateKey: Hex;
69
+ };
70
+ type SignTypedDataReturnType = Hex;
71
+ /**
72
+ * @description Signs typed data and calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191):
73
+ * `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`.
74
+ *
75
+ * @returns The signature.
76
+ */
77
+ declare function signTypedData<TTypedData extends TypedData | {
78
+ [key: string]: unknown;
79
+ }, TPrimaryType extends string = string>({ privateKey, ...typedData }: SignTypedDataParameters<TTypedData, TPrimaryType>): Promise<SignTypedDataReturnType>;
80
+
81
+ export { SignMessageParameters, SignMessageReturnType, SignTypedDataParameters, SignTypedDataReturnType, generateMnemonic, generatePrivateKey, privateKeyToAccount, signMessage, signTypedData, toAccount };
@@ -0,0 +1,142 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunk63WKWOMOjs = require('../chunk-63WKWOMO.js');
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+ var _chunkYDNKDSSTjs = require('../chunk-YDNKDSST.js');
14
+
15
+ // src/accounts/index.ts
16
+ var _bip32 = require('@scure/bip32');
17
+
18
+ // src/accounts/generateMnemonic.ts
19
+ var _bip39 = require('@scure/bip39');
20
+ function generateMnemonic(wordlist10) {
21
+ return _bip39.generateMnemonic.call(void 0, wordlist10);
22
+ }
23
+
24
+ // src/accounts/generatePrivateKey.ts
25
+ var _secp256k1 = require('@noble/curves/secp256k1');
26
+ function generatePrivateKey() {
27
+ return _chunkYDNKDSSTjs.toHex.call(void 0, _secp256k1.secp256k1.utils.randomPrivateKey());
28
+ }
29
+
30
+ // src/accounts/privateKeyToAccount.ts
31
+
32
+
33
+ // src/accounts/utils/sign.ts
34
+
35
+ async function sign({
36
+ hash,
37
+ privateKey
38
+ }) {
39
+ const { r, s, recovery } = _secp256k1.secp256k1.sign(hash.slice(2), privateKey.slice(2));
40
+ return {
41
+ r: _chunkYDNKDSSTjs.toHex.call(void 0, r),
42
+ s: _chunkYDNKDSSTjs.toHex.call(void 0, s),
43
+ v: recovery ? 28n : 27n
44
+ };
45
+ }
46
+
47
+ // src/accounts/utils/signatureToHex.ts
48
+
49
+ function signatureToHex({ r, s, v }) {
50
+ return `0x${new _secp256k1.secp256k1.Signature(
51
+ _chunkYDNKDSSTjs.hexToBigInt.call(void 0, r),
52
+ _chunkYDNKDSSTjs.hexToBigInt.call(void 0, s)
53
+ ).toCompactHex()}${_chunkYDNKDSSTjs.toHex.call(void 0, v).slice(2)}`;
54
+ }
55
+
56
+ // src/accounts/utils/signMessage.ts
57
+ async function signMessage({
58
+ message,
59
+ privateKey
60
+ }) {
61
+ const signature = await sign({ hash: _chunkYDNKDSSTjs.hashMessage.call(void 0, message), privateKey });
62
+ return signatureToHex(signature);
63
+ }
64
+
65
+ // src/accounts/utils/signTransaction.ts
66
+ async function signTransaction({
67
+ privateKey,
68
+ transaction
69
+ }) {
70
+ const signature = await sign({
71
+ hash: _chunkYDNKDSSTjs.keccak256.call(void 0, _chunkYDNKDSSTjs.serializeTransaction.call(void 0, transaction)),
72
+ privateKey
73
+ });
74
+ return _chunkYDNKDSSTjs.serializeTransaction.call(void 0, transaction, signature);
75
+ }
76
+
77
+ // src/accounts/utils/signTypedData.ts
78
+ async function signTypedData({
79
+ privateKey,
80
+ ...typedData
81
+ }) {
82
+ const signature = await sign({
83
+ hash: _chunkYDNKDSSTjs.hashTypedData.call(void 0, typedData),
84
+ privateKey
85
+ });
86
+ return signatureToHex(signature);
87
+ }
88
+
89
+ // src/accounts/privateKeyToAccount.ts
90
+ function privateKeyToAccount(privateKey) {
91
+ const publicKey = _chunkYDNKDSSTjs.toHex.call(void 0, _secp256k1.secp256k1.getPublicKey(privateKey.slice(2), false));
92
+ const address = _chunkYDNKDSSTjs.publicKeyToAddress.call(void 0, publicKey);
93
+ const account = _chunk63WKWOMOjs.toAccount.call(void 0, {
94
+ address,
95
+ async signMessage({ message }) {
96
+ return signMessage({ message, privateKey });
97
+ },
98
+ async signTransaction(transaction) {
99
+ return signTransaction({ privateKey, transaction });
100
+ },
101
+ async signTypedData(typedData) {
102
+ return signTypedData({ ...typedData, privateKey });
103
+ }
104
+ });
105
+ return {
106
+ ...account,
107
+ publicKey,
108
+ source: "privateKey"
109
+ };
110
+ }
111
+
112
+ // src/accounts/wordlists.ts
113
+ var _czech = require('@scure/bip39/wordlists/czech');
114
+ var _english = require('@scure/bip39/wordlists/english');
115
+ var _french = require('@scure/bip39/wordlists/french');
116
+ var _italian = require('@scure/bip39/wordlists/italian');
117
+ var _japanese = require('@scure/bip39/wordlists/japanese');
118
+ var _korean = require('@scure/bip39/wordlists/korean');
119
+ var _simplifiedchinese = require('@scure/bip39/wordlists/simplified-chinese');
120
+ var _spanish = require('@scure/bip39/wordlists/spanish');
121
+ var _traditionalchinese = require('@scure/bip39/wordlists/traditional-chinese');
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+ exports.HDKey = _bip32.HDKey; exports.czech = _czech.wordlist; exports.english = _english.wordlist; exports.french = _french.wordlist; exports.generateMnemonic = generateMnemonic; exports.generatePrivateKey = generatePrivateKey; exports.italian = _italian.wordlist; exports.japanese = _japanese.wordlist; exports.korean = _korean.wordlist; exports.parseAccount = _chunkYDNKDSSTjs.parseAccount; exports.privateKeyToAccount = privateKeyToAccount; exports.publicKeyToAddress = _chunkYDNKDSSTjs.publicKeyToAddress; exports.signMessage = signMessage; exports.signTypedData = signTypedData; exports.simplifiedChinese = _simplifiedchinese.wordlist; exports.spanish = _spanish.wordlist; exports.toAccount = _chunk63WKWOMOjs.toAccount; exports.traditionalChinese = _traditionalchinese.wordlist;
142
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/accounts/index.ts","../../src/accounts/generateMnemonic.ts","../../src/accounts/generatePrivateKey.ts","../../src/accounts/privateKeyToAccount.ts","../../src/accounts/utils/sign.ts","../../src/accounts/utils/signatureToHex.ts","../../src/accounts/utils/signMessage.ts","../../src/accounts/utils/signTransaction.ts","../../src/accounts/utils/signTypedData.ts","../../src/accounts/wordlists.ts"],"names":["wordlist","secp256k1"],"mappings":";;;;;;;;;;;;;;;AAAA,SAAS,aAAa;;;ACAtB,SAAS,oBAAoB,yBAAyB;AAS/C,SAAS,iBAAiBA,YAA4B;AAC3D,SAAO,kBAAkBA,UAAQ;AACnC;;;ACXA,SAAS,iBAAiB;AAUnB,SAAS,qBAA0B;AACxC,SAAO,MAAM,UAAU,MAAM,iBAAiB,CAAC;AACjD;;;ACZA,SAAS,aAAAC,kBAAiB;;;ACA1B,SAAS,aAAAA,kBAAiB;AAmB1B,eAAsB,KAAK;AAAA,EACzB;AAAA,EACA;AACF,GAA4C;AAC1C,QAAM,EAAE,GAAG,GAAG,SAAS,IAAIA,WAAU,KAAK,KAAK,MAAM,CAAC,GAAG,WAAW,MAAM,CAAC,CAAC;AAC5E,SAAO;AAAA,IACL,GAAG,MAAM,CAAC;AAAA,IACV,GAAG,MAAM,CAAC;AAAA,IACV,GAAG,WAAW,MAAM;AAAA,EACtB;AACF;;;AC7BA,SAAS,aAAAA,kBAAiB;AAKnB,SAAS,eAAe,EAAE,GAAG,GAAG,EAAE,GAAmB;AAC1D,SAAO,KAAK,IAAIA,WAAU;AAAA,IACxB,YAAY,CAAC;AAAA,IACb,YAAY,CAAC;AAAA,EACf,EAAE,aAAa,IAAI,MAAM,CAAC,EAAE,MAAM,CAAC;AACrC;;;ACSA,eAAsB,YAAY;AAAA,EAChC;AAAA,EACA;AACF,GAA0D;AACxD,QAAM,YAAY,MAAM,KAAK,EAAE,MAAM,YAAY,OAAO,GAAG,WAAW,CAAC;AACvE,SAAO,eAAe,SAAS;AACjC;;;ACDA,eAAsB,gBAEpB;AAAA,EACA;AAAA,EACA;AACF,GAEE;AACA,QAAM,YAAY,MAAM,KAAK;AAAA,IAC3B,MAAM,UAAU,qBAAqB,WAAW,CAAC;AAAA,IACjD;AAAA,EACF,CAAC;AACD,SAAO,qBAAqB,aAAa,SAAS;AACpD;;;ACdA,eAAsB,cAGpB;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAGqC;AACnC,QAAM,YAAY,MAAM,KAAK;AAAA,IAC3B,MAAM,cAAc,SAAoC;AAAA,IACxD;AAAA,EACF,CAAC;AACD,SAAO,eAAe,SAAS;AACjC;;;ALpBO,SAAS,oBAAoB,YAAoC;AACtE,QAAM,YAAY,MAAMA,WAAU,aAAa,WAAW,MAAM,CAAC,GAAG,KAAK,CAAC;AAC1E,QAAM,UAAU,mBAAmB,SAAS;AAE5C,QAAM,UAAU,UAAU;AAAA,IACxB;AAAA,IACA,MAAM,YAAY,EAAE,QAAQ,GAAG;AAC7B,aAAO,YAAY,EAAE,SAAS,WAAW,CAAC;AAAA,IAC5C;AAAA,IACA,MAAM,gBAAgB,aAAa;AACjC,aAAO,gBAAgB,EAAE,YAAY,YAAY,CAAC;AAAA,IACpD;AAAA,IACA,MAAM,cAAc,WAAW;AAC7B,aAAO,cAAc,EAAE,GAAG,WAAW,WAAW,CAAC;AAAA,IACnD;AAAA,EACF,CAAC;AAED,SAAO;AAAA,IACL,GAAG;AAAA,IACH;AAAA,IACA,QAAQ;AAAA,EACV;AACF;;;AMxCA,SAAqB,gBAAa;AAClC,SAAqB,YAAZD,iBAA2B;AACpC,SAAqB,YAAZA,iBAA0B;AACnC,SAAqB,YAAZA,iBAA2B;AACpC,SAAqB,YAAZA,iBAA4B;AACrC,SAAqB,YAAZA,iBAA0B;AACnC,SAAqB,YAAZA,iBAAqC;AAC9C,SAAqB,YAAZA,iBAA2B;AACpC,SAAqB,YAAZA,iBAAsC","sourcesContent":["import { HDKey } from '@scure/bip32'\n\nexport { HDKey }\n\nexport { generateMnemonic } from './generateMnemonic'\n\nexport { generatePrivateKey } from './generatePrivateKey'\n\nexport { privateKeyToAccount } from './privateKeyToAccount'\n\nexport { toAccount } from './toAccount'\n\nexport type {\n Account,\n AccountSource,\n CustomSource,\n HDOptions,\n JsonRpcAccount,\n LocalAccount,\n HDAccount,\n PrivateKeyAccount,\n} from './types'\n\nexport type {\n SignMessageParameters,\n SignMessageReturnType,\n SignTypedDataParameters,\n SignTypedDataReturnType,\n} from './utils'\nexport {\n parseAccount,\n publicKeyToAddress,\n signMessage,\n signTypedData,\n} from './utils'\n\nexport {\n czech,\n english,\n french,\n italian,\n japanese,\n korean,\n simplifiedChinese,\n spanish,\n traditionalChinese,\n} from './wordlists'\n","import { generateMnemonic as generateMnemonic_ } from '@scure/bip39'\n\n/**\n * @description Generates a random mnemonic phrase with a given wordlist.\n *\n * @param wordlist The wordlist to use for generating the mnemonic phrase.\n *\n * @returns A randomly generated mnemonic phrase.\n */\nexport function generateMnemonic(wordlist: string[]): string {\n return generateMnemonic_(wordlist)\n}\n","import { secp256k1 } from '@noble/curves/secp256k1'\n\nimport type { Hex } from '../types'\nimport { toHex } from '../utils'\n\n/**\n * @description Generates a random private key.\n *\n * @returns A randomly generated private key.\n */\nexport function generatePrivateKey(): Hex {\n return toHex(secp256k1.utils.randomPrivateKey())\n}\n","import { secp256k1 } from '@noble/curves/secp256k1'\n\nimport type { Hex } from '../types'\nimport { toHex } from '../utils'\nimport {\n publicKeyToAddress,\n signMessage,\n signTransaction,\n signTypedData,\n} from './utils'\nimport { toAccount } from './toAccount'\nimport type { PrivateKeyAccount } from './types'\n\n/**\n * @description Creates an Account from a private key.\n *\n * @returns A Private Key Account.\n */\nexport function privateKeyToAccount(privateKey: Hex): PrivateKeyAccount {\n const publicKey = toHex(secp256k1.getPublicKey(privateKey.slice(2), false))\n const address = publicKeyToAddress(publicKey)\n\n const account = toAccount({\n address,\n async signMessage({ message }) {\n return signMessage({ message, privateKey })\n },\n async signTransaction(transaction) {\n return signTransaction({ privateKey, transaction })\n },\n async signTypedData(typedData) {\n return signTypedData({ ...typedData, privateKey })\n },\n })\n\n return {\n ...account,\n publicKey,\n source: 'privateKey',\n }\n}\n","import { secp256k1 } from '@noble/curves/secp256k1'\n\nimport type { Hex, Signature } from '../../types'\nimport { toHex } from '../../utils'\n\nexport type SignParameters = {\n hash: Hex\n privateKey: Hex\n}\nexport type SignReturnType = Signature\n\n/**\n * @description Signs a hash with a given private key.\n *\n * @param hash The hash to sign.\n * @param privateKey The private key to sign with.\n *\n * @returns The signature.\n */\nexport async function sign({\n hash,\n privateKey,\n}: SignParameters): Promise<SignReturnType> {\n const { r, s, recovery } = secp256k1.sign(hash.slice(2), privateKey.slice(2))\n return {\n r: toHex(r),\n s: toHex(s),\n v: recovery ? 28n : 27n,\n }\n}\n","import { secp256k1 } from '@noble/curves/secp256k1'\n\nimport type { Hex, Signature } from '../../types'\nimport { hexToBigInt, toHex } from '../../utils'\n\nexport function signatureToHex({ r, s, v }: Signature): Hex {\n return `0x${new secp256k1.Signature(\n hexToBigInt(r),\n hexToBigInt(s),\n ).toCompactHex()}${toHex(v).slice(2)}`\n}\n","import type { Hex } from '../../types'\nimport { hashMessage } from '../../utils'\nimport { sign } from './sign'\nimport { signatureToHex } from './signatureToHex'\n\nexport type SignMessageParameters = {\n /** The message to sign. */\n message: string\n /** The private key to sign with. */\n privateKey: Hex\n}\nexport type SignMessageReturnType = Hex\n\n/**\n * @description Calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191):\n * `keccak256(\"\\x19Ethereum Signed Message:\\n\" + len(message) + message))`.\n *\n * @returns The signature.\n */\nexport async function signMessage({\n message,\n privateKey,\n}: SignMessageParameters): Promise<SignMessageReturnType> {\n const signature = await sign({ hash: hashMessage(message), privateKey })\n return signatureToHex(signature)\n}\n","import type {\n Hex,\n TransactionSerializable,\n TransactionSerialized,\n TransactionType,\n} from '../../types'\nimport {\n GetTransactionType,\n keccak256,\n serializeTransaction,\n} from '../../utils'\nimport { sign } from './sign'\n\nexport type SignTransactionArgs<\n TTransactionSerializable extends TransactionSerializable = TransactionSerializable,\n> = {\n privateKey: Hex\n transaction: TTransactionSerializable\n}\nexport type SignTransactionReturnType<\n TTransactionSerializable extends TransactionSerializable = TransactionSerializable,\n TTransactionType extends TransactionType = GetTransactionType<TTransactionSerializable>,\n> = TransactionSerialized<TTransactionType>\n\nexport async function signTransaction<\n TTransactionSerializable extends TransactionSerializable,\n>({\n privateKey,\n transaction,\n}: SignTransactionArgs<TTransactionSerializable>): Promise<\n SignTransactionReturnType<TTransactionSerializable>\n> {\n const signature = await sign({\n hash: keccak256(serializeTransaction(transaction)),\n privateKey,\n })\n return serializeTransaction(transaction, signature)\n}\n","import type { TypedData } from 'abitype'\n\nimport type { Hex, TypedDataDefinition } from '../../types'\nimport { HashTypedDataParameters, hashTypedData } from '../../utils'\nimport { sign } from './sign'\nimport { signatureToHex } from './signatureToHex'\n\nexport type SignTypedDataParameters<\n TTypedData extends TypedData | { [key: string]: unknown } = TypedData,\n TPrimaryType extends string = string,\n> = TypedDataDefinition<TTypedData, TPrimaryType> & {\n /** The private key to sign with. */\n privateKey: Hex\n}\n\nexport type SignTypedDataReturnType = Hex\n\n/**\n * @description Signs typed data and calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191):\n * `keccak256(\"\\x19Ethereum Signed Message:\\n\" + len(message) + message))`.\n *\n * @returns The signature.\n */\nexport async function signTypedData<\n TTypedData extends TypedData | { [key: string]: unknown },\n TPrimaryType extends string = string,\n>({\n privateKey,\n ...typedData\n}: SignTypedDataParameters<\n TTypedData,\n TPrimaryType\n>): Promise<SignTypedDataReturnType> {\n const signature = await sign({\n hash: hashTypedData(typedData as HashTypedDataParameters),\n privateKey,\n })\n return signatureToHex(signature)\n}\n","export { wordlist as czech } from '@scure/bip39/wordlists/czech'\nexport { wordlist as english } from '@scure/bip39/wordlists/english'\nexport { wordlist as french } from '@scure/bip39/wordlists/french'\nexport { wordlist as italian } from '@scure/bip39/wordlists/italian'\nexport { wordlist as japanese } from '@scure/bip39/wordlists/japanese'\nexport { wordlist as korean } from '@scure/bip39/wordlists/korean'\nexport { wordlist as simplifiedChinese } from '@scure/bip39/wordlists/simplified-chinese'\nexport { wordlist as spanish } from '@scure/bip39/wordlists/spanish'\nexport { wordlist as traditionalChinese } from '@scure/bip39/wordlists/traditional-chinese'\n"]}
@@ -0,0 +1,142 @@
1
+ import {
2
+ toAccount
3
+ } from "../chunk-KON3DHPC.mjs";
4
+ import {
5
+ hashMessage,
6
+ hashTypedData,
7
+ hexToBigInt,
8
+ keccak256,
9
+ parseAccount,
10
+ publicKeyToAddress,
11
+ serializeTransaction,
12
+ toHex
13
+ } from "../chunk-FSIBCQFR.mjs";
14
+
15
+ // src/accounts/index.ts
16
+ import { HDKey } from "@scure/bip32";
17
+
18
+ // src/accounts/generateMnemonic.ts
19
+ import { generateMnemonic as generateMnemonic_ } from "@scure/bip39";
20
+ function generateMnemonic(wordlist10) {
21
+ return generateMnemonic_(wordlist10);
22
+ }
23
+
24
+ // src/accounts/generatePrivateKey.ts
25
+ import { secp256k1 } from "@noble/curves/secp256k1";
26
+ function generatePrivateKey() {
27
+ return toHex(secp256k1.utils.randomPrivateKey());
28
+ }
29
+
30
+ // src/accounts/privateKeyToAccount.ts
31
+ import { secp256k1 as secp256k14 } from "@noble/curves/secp256k1";
32
+
33
+ // src/accounts/utils/sign.ts
34
+ import { secp256k1 as secp256k12 } from "@noble/curves/secp256k1";
35
+ async function sign({
36
+ hash,
37
+ privateKey
38
+ }) {
39
+ const { r, s, recovery } = secp256k12.sign(hash.slice(2), privateKey.slice(2));
40
+ return {
41
+ r: toHex(r),
42
+ s: toHex(s),
43
+ v: recovery ? 28n : 27n
44
+ };
45
+ }
46
+
47
+ // src/accounts/utils/signatureToHex.ts
48
+ import { secp256k1 as secp256k13 } from "@noble/curves/secp256k1";
49
+ function signatureToHex({ r, s, v }) {
50
+ return `0x${new secp256k13.Signature(
51
+ hexToBigInt(r),
52
+ hexToBigInt(s)
53
+ ).toCompactHex()}${toHex(v).slice(2)}`;
54
+ }
55
+
56
+ // src/accounts/utils/signMessage.ts
57
+ async function signMessage({
58
+ message,
59
+ privateKey
60
+ }) {
61
+ const signature = await sign({ hash: hashMessage(message), privateKey });
62
+ return signatureToHex(signature);
63
+ }
64
+
65
+ // src/accounts/utils/signTransaction.ts
66
+ async function signTransaction({
67
+ privateKey,
68
+ transaction
69
+ }) {
70
+ const signature = await sign({
71
+ hash: keccak256(serializeTransaction(transaction)),
72
+ privateKey
73
+ });
74
+ return serializeTransaction(transaction, signature);
75
+ }
76
+
77
+ // src/accounts/utils/signTypedData.ts
78
+ async function signTypedData({
79
+ privateKey,
80
+ ...typedData
81
+ }) {
82
+ const signature = await sign({
83
+ hash: hashTypedData(typedData),
84
+ privateKey
85
+ });
86
+ return signatureToHex(signature);
87
+ }
88
+
89
+ // src/accounts/privateKeyToAccount.ts
90
+ function privateKeyToAccount(privateKey) {
91
+ const publicKey = toHex(secp256k14.getPublicKey(privateKey.slice(2), false));
92
+ const address = publicKeyToAddress(publicKey);
93
+ const account = toAccount({
94
+ address,
95
+ async signMessage({ message }) {
96
+ return signMessage({ message, privateKey });
97
+ },
98
+ async signTransaction(transaction) {
99
+ return signTransaction({ privateKey, transaction });
100
+ },
101
+ async signTypedData(typedData) {
102
+ return signTypedData({ ...typedData, privateKey });
103
+ }
104
+ });
105
+ return {
106
+ ...account,
107
+ publicKey,
108
+ source: "privateKey"
109
+ };
110
+ }
111
+
112
+ // src/accounts/wordlists.ts
113
+ import { wordlist } from "@scure/bip39/wordlists/czech";
114
+ import { wordlist as wordlist2 } from "@scure/bip39/wordlists/english";
115
+ import { wordlist as wordlist3 } from "@scure/bip39/wordlists/french";
116
+ import { wordlist as wordlist4 } from "@scure/bip39/wordlists/italian";
117
+ import { wordlist as wordlist5 } from "@scure/bip39/wordlists/japanese";
118
+ import { wordlist as wordlist6 } from "@scure/bip39/wordlists/korean";
119
+ import { wordlist as wordlist7 } from "@scure/bip39/wordlists/simplified-chinese";
120
+ import { wordlist as wordlist8 } from "@scure/bip39/wordlists/spanish";
121
+ import { wordlist as wordlist9 } from "@scure/bip39/wordlists/traditional-chinese";
122
+ export {
123
+ HDKey,
124
+ wordlist as czech,
125
+ wordlist2 as english,
126
+ wordlist3 as french,
127
+ generateMnemonic,
128
+ generatePrivateKey,
129
+ wordlist4 as italian,
130
+ wordlist5 as japanese,
131
+ wordlist6 as korean,
132
+ parseAccount,
133
+ privateKeyToAccount,
134
+ publicKeyToAddress,
135
+ signMessage,
136
+ signTypedData,
137
+ wordlist7 as simplifiedChinese,
138
+ wordlist8 as spanish,
139
+ toAccount,
140
+ wordlist9 as traditionalChinese
141
+ };
142
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/accounts/index.ts","../../src/accounts/generateMnemonic.ts","../../src/accounts/generatePrivateKey.ts","../../src/accounts/privateKeyToAccount.ts","../../src/accounts/utils/sign.ts","../../src/accounts/utils/signatureToHex.ts","../../src/accounts/utils/signMessage.ts","../../src/accounts/utils/signTransaction.ts","../../src/accounts/utils/signTypedData.ts","../../src/accounts/wordlists.ts"],"sourcesContent":["import { HDKey } from '@scure/bip32'\n\nexport { HDKey }\n\nexport { generateMnemonic } from './generateMnemonic'\n\nexport { generatePrivateKey } from './generatePrivateKey'\n\nexport { privateKeyToAccount } from './privateKeyToAccount'\n\nexport { toAccount } from './toAccount'\n\nexport type {\n Account,\n AccountSource,\n CustomSource,\n HDOptions,\n JsonRpcAccount,\n LocalAccount,\n HDAccount,\n PrivateKeyAccount,\n} from './types'\n\nexport type {\n SignMessageParameters,\n SignMessageReturnType,\n SignTypedDataParameters,\n SignTypedDataReturnType,\n} from './utils'\nexport {\n parseAccount,\n publicKeyToAddress,\n signMessage,\n signTypedData,\n} from './utils'\n\nexport {\n czech,\n english,\n french,\n italian,\n japanese,\n korean,\n simplifiedChinese,\n spanish,\n traditionalChinese,\n} from './wordlists'\n","import { generateMnemonic as generateMnemonic_ } from '@scure/bip39'\n\n/**\n * @description Generates a random mnemonic phrase with a given wordlist.\n *\n * @param wordlist The wordlist to use for generating the mnemonic phrase.\n *\n * @returns A randomly generated mnemonic phrase.\n */\nexport function generateMnemonic(wordlist: string[]): string {\n return generateMnemonic_(wordlist)\n}\n","import { secp256k1 } from '@noble/curves/secp256k1'\n\nimport type { Hex } from '../types'\nimport { toHex } from '../utils'\n\n/**\n * @description Generates a random private key.\n *\n * @returns A randomly generated private key.\n */\nexport function generatePrivateKey(): Hex {\n return toHex(secp256k1.utils.randomPrivateKey())\n}\n","import { secp256k1 } from '@noble/curves/secp256k1'\n\nimport type { Hex } from '../types'\nimport { toHex } from '../utils'\nimport {\n publicKeyToAddress,\n signMessage,\n signTransaction,\n signTypedData,\n} from './utils'\nimport { toAccount } from './toAccount'\nimport type { PrivateKeyAccount } from './types'\n\n/**\n * @description Creates an Account from a private key.\n *\n * @returns A Private Key Account.\n */\nexport function privateKeyToAccount(privateKey: Hex): PrivateKeyAccount {\n const publicKey = toHex(secp256k1.getPublicKey(privateKey.slice(2), false))\n const address = publicKeyToAddress(publicKey)\n\n const account = toAccount({\n address,\n async signMessage({ message }) {\n return signMessage({ message, privateKey })\n },\n async signTransaction(transaction) {\n return signTransaction({ privateKey, transaction })\n },\n async signTypedData(typedData) {\n return signTypedData({ ...typedData, privateKey })\n },\n })\n\n return {\n ...account,\n publicKey,\n source: 'privateKey',\n }\n}\n","import { secp256k1 } from '@noble/curves/secp256k1'\n\nimport type { Hex, Signature } from '../../types'\nimport { toHex } from '../../utils'\n\nexport type SignParameters = {\n hash: Hex\n privateKey: Hex\n}\nexport type SignReturnType = Signature\n\n/**\n * @description Signs a hash with a given private key.\n *\n * @param hash The hash to sign.\n * @param privateKey The private key to sign with.\n *\n * @returns The signature.\n */\nexport async function sign({\n hash,\n privateKey,\n}: SignParameters): Promise<SignReturnType> {\n const { r, s, recovery } = secp256k1.sign(hash.slice(2), privateKey.slice(2))\n return {\n r: toHex(r),\n s: toHex(s),\n v: recovery ? 28n : 27n,\n }\n}\n","import { secp256k1 } from '@noble/curves/secp256k1'\n\nimport type { Hex, Signature } from '../../types'\nimport { hexToBigInt, toHex } from '../../utils'\n\nexport function signatureToHex({ r, s, v }: Signature): Hex {\n return `0x${new secp256k1.Signature(\n hexToBigInt(r),\n hexToBigInt(s),\n ).toCompactHex()}${toHex(v).slice(2)}`\n}\n","import type { Hex } from '../../types'\nimport { hashMessage } from '../../utils'\nimport { sign } from './sign'\nimport { signatureToHex } from './signatureToHex'\n\nexport type SignMessageParameters = {\n /** The message to sign. */\n message: string\n /** The private key to sign with. */\n privateKey: Hex\n}\nexport type SignMessageReturnType = Hex\n\n/**\n * @description Calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191):\n * `keccak256(\"\\x19Ethereum Signed Message:\\n\" + len(message) + message))`.\n *\n * @returns The signature.\n */\nexport async function signMessage({\n message,\n privateKey,\n}: SignMessageParameters): Promise<SignMessageReturnType> {\n const signature = await sign({ hash: hashMessage(message), privateKey })\n return signatureToHex(signature)\n}\n","import type {\n Hex,\n TransactionSerializable,\n TransactionSerialized,\n TransactionType,\n} from '../../types'\nimport {\n GetTransactionType,\n keccak256,\n serializeTransaction,\n} from '../../utils'\nimport { sign } from './sign'\n\nexport type SignTransactionArgs<\n TTransactionSerializable extends TransactionSerializable = TransactionSerializable,\n> = {\n privateKey: Hex\n transaction: TTransactionSerializable\n}\nexport type SignTransactionReturnType<\n TTransactionSerializable extends TransactionSerializable = TransactionSerializable,\n TTransactionType extends TransactionType = GetTransactionType<TTransactionSerializable>,\n> = TransactionSerialized<TTransactionType>\n\nexport async function signTransaction<\n TTransactionSerializable extends TransactionSerializable,\n>({\n privateKey,\n transaction,\n}: SignTransactionArgs<TTransactionSerializable>): Promise<\n SignTransactionReturnType<TTransactionSerializable>\n> {\n const signature = await sign({\n hash: keccak256(serializeTransaction(transaction)),\n privateKey,\n })\n return serializeTransaction(transaction, signature)\n}\n","import type { TypedData } from 'abitype'\n\nimport type { Hex, TypedDataDefinition } from '../../types'\nimport { HashTypedDataParameters, hashTypedData } from '../../utils'\nimport { sign } from './sign'\nimport { signatureToHex } from './signatureToHex'\n\nexport type SignTypedDataParameters<\n TTypedData extends TypedData | { [key: string]: unknown } = TypedData,\n TPrimaryType extends string = string,\n> = TypedDataDefinition<TTypedData, TPrimaryType> & {\n /** The private key to sign with. */\n privateKey: Hex\n}\n\nexport type SignTypedDataReturnType = Hex\n\n/**\n * @description Signs typed data and calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191):\n * `keccak256(\"\\x19Ethereum Signed Message:\\n\" + len(message) + message))`.\n *\n * @returns The signature.\n */\nexport async function signTypedData<\n TTypedData extends TypedData | { [key: string]: unknown },\n TPrimaryType extends string = string,\n>({\n privateKey,\n ...typedData\n}: SignTypedDataParameters<\n TTypedData,\n TPrimaryType\n>): Promise<SignTypedDataReturnType> {\n const signature = await sign({\n hash: hashTypedData(typedData as HashTypedDataParameters),\n privateKey,\n })\n return signatureToHex(signature)\n}\n","export { wordlist as czech } from '@scure/bip39/wordlists/czech'\nexport { wordlist as english } from '@scure/bip39/wordlists/english'\nexport { wordlist as french } from '@scure/bip39/wordlists/french'\nexport { wordlist as italian } from '@scure/bip39/wordlists/italian'\nexport { wordlist as japanese } from '@scure/bip39/wordlists/japanese'\nexport { wordlist as korean } from '@scure/bip39/wordlists/korean'\nexport { wordlist as simplifiedChinese } from '@scure/bip39/wordlists/simplified-chinese'\nexport { wordlist as spanish } from '@scure/bip39/wordlists/spanish'\nexport { wordlist as traditionalChinese } from '@scure/bip39/wordlists/traditional-chinese'\n"],"mappings":";;;;;;;;;;;;;;;AAAA,SAAS,aAAa;;;ACAtB,SAAS,oBAAoB,yBAAyB;AAS/C,SAAS,iBAAiBA,YAA4B;AAC3D,SAAO,kBAAkBA,UAAQ;AACnC;;;ACXA,SAAS,iBAAiB;AAUnB,SAAS,qBAA0B;AACxC,SAAO,MAAM,UAAU,MAAM,iBAAiB,CAAC;AACjD;;;ACZA,SAAS,aAAAC,kBAAiB;;;ACA1B,SAAS,aAAAC,kBAAiB;AAmB1B,eAAsB,KAAK;AAAA,EACzB;AAAA,EACA;AACF,GAA4C;AAC1C,QAAM,EAAE,GAAG,GAAG,SAAS,IAAIC,WAAU,KAAK,KAAK,MAAM,CAAC,GAAG,WAAW,MAAM,CAAC,CAAC;AAC5E,SAAO;AAAA,IACL,GAAG,MAAM,CAAC;AAAA,IACV,GAAG,MAAM,CAAC;AAAA,IACV,GAAG,WAAW,MAAM;AAAA,EACtB;AACF;;;AC7BA,SAAS,aAAAC,kBAAiB;AAKnB,SAAS,eAAe,EAAE,GAAG,GAAG,EAAE,GAAmB;AAC1D,SAAO,KAAK,IAAIC,WAAU;AAAA,IACxB,YAAY,CAAC;AAAA,IACb,YAAY,CAAC;AAAA,EACf,EAAE,aAAa,IAAI,MAAM,CAAC,EAAE,MAAM,CAAC;AACrC;;;ACSA,eAAsB,YAAY;AAAA,EAChC;AAAA,EACA;AACF,GAA0D;AACxD,QAAM,YAAY,MAAM,KAAK,EAAE,MAAM,YAAY,OAAO,GAAG,WAAW,CAAC;AACvE,SAAO,eAAe,SAAS;AACjC;;;ACDA,eAAsB,gBAEpB;AAAA,EACA;AAAA,EACA;AACF,GAEE;AACA,QAAM,YAAY,MAAM,KAAK;AAAA,IAC3B,MAAM,UAAU,qBAAqB,WAAW,CAAC;AAAA,IACjD;AAAA,EACF,CAAC;AACD,SAAO,qBAAqB,aAAa,SAAS;AACpD;;;ACdA,eAAsB,cAGpB;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAGqC;AACnC,QAAM,YAAY,MAAM,KAAK;AAAA,IAC3B,MAAM,cAAc,SAAoC;AAAA,IACxD;AAAA,EACF,CAAC;AACD,SAAO,eAAe,SAAS;AACjC;;;ALpBO,SAAS,oBAAoB,YAAoC;AACtE,QAAM,YAAY,MAAMC,WAAU,aAAa,WAAW,MAAM,CAAC,GAAG,KAAK,CAAC;AAC1E,QAAM,UAAU,mBAAmB,SAAS;AAE5C,QAAM,UAAU,UAAU;AAAA,IACxB;AAAA,IACA,MAAM,YAAY,EAAE,QAAQ,GAAG;AAC7B,aAAO,YAAY,EAAE,SAAS,WAAW,CAAC;AAAA,IAC5C;AAAA,IACA,MAAM,gBAAgB,aAAa;AACjC,aAAO,gBAAgB,EAAE,YAAY,YAAY,CAAC;AAAA,IACpD;AAAA,IACA,MAAM,cAAc,WAAW;AAC7B,aAAO,cAAc,EAAE,GAAG,WAAW,WAAW,CAAC;AAAA,IACnD;AAAA,EACF,CAAC;AAED,SAAO;AAAA,IACL,GAAG;AAAA,IACH;AAAA,IACA,QAAQ;AAAA,EACV;AACF;;;AMxCA,SAAqB,gBAAa;AAClC,SAAqB,YAAZC,iBAA2B;AACpC,SAAqB,YAAZA,iBAA0B;AACnC,SAAqB,YAAZA,iBAA2B;AACpC,SAAqB,YAAZA,iBAA4B;AACrC,SAAqB,YAAZA,iBAA0B;AACnC,SAAqB,YAAZA,iBAAqC;AAC9C,SAAqB,YAAZA,iBAA2B;AACpC,SAAqB,YAAZA,iBAAsC;","names":["wordlist","secp256k1","secp256k1","secp256k1","secp256k1","secp256k1","secp256k1","wordlist"]}