viem 0.2.4 → 0.2.6

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 (62) hide show
  1. package/dist/abi.d.ts +3 -3
  2. package/dist/abi.js +2 -2
  3. package/dist/abi.mjs +1 -1
  4. package/dist/accounts/index.d.ts +14 -23
  5. package/dist/accounts/index.js +29 -38
  6. package/dist/accounts/index.js.map +1 -1
  7. package/dist/accounts/index.mjs +22 -31
  8. package/dist/accounts/index.mjs.map +1 -1
  9. package/dist/{chain-5507c6f0.d.ts → chain-892805a2.d.ts} +1 -1
  10. package/dist/{chain-fe47467d.d.ts → chain-d06e2a80.d.ts} +1 -1
  11. package/dist/chains.d.ts +3 -3
  12. package/dist/chains.js +89 -89
  13. package/dist/chains.mjs +1 -1
  14. package/dist/{chunk-ZEA2O6V2.mjs → chunk-AWZ7ROLD.mjs} +6 -7
  15. package/dist/chunk-AWZ7ROLD.mjs.map +1 -0
  16. package/dist/{chunk-QISMTRQF.js → chunk-GEN2W3H2.js} +6 -7
  17. package/dist/chunk-GEN2W3H2.js.map +1 -0
  18. package/dist/{chunk-NNNKKACJ.js → chunk-IPKAMASI.js} +6 -6
  19. package/dist/{chunk-VOEF3A53.mjs → chunk-UOOOQDP7.mjs} +2 -2
  20. package/dist/contract.d.ts +9 -8
  21. package/dist/contract.js +2 -2
  22. package/dist/contract.mjs +1 -1
  23. package/dist/{createTransport-21a0d2b3.d.ts → createTransport-9692876d.d.ts} +2 -2
  24. package/dist/{eip1193-2f3a9cd2.d.ts → eip1193-16c1b134.d.ts} +1 -1
  25. package/dist/{encodeFunctionResult-c5185b98.d.ts → encodeFunctionResult-5b30ddf1.d.ts} +12 -8
  26. package/dist/{encodePacked-98f67d09.d.ts → encodePacked-0ac1e458.d.ts} +1 -1
  27. package/dist/ens.d.ts +5 -5
  28. package/dist/ens.js +2 -2
  29. package/dist/ens.mjs +1 -1
  30. package/dist/ethers.d.ts +2 -2
  31. package/dist/ethers.js +4 -4
  32. package/dist/ethers.mjs +2 -2
  33. package/dist/{formatAbiItem-56dff508.d.ts → formatAbiItem-c722de85.d.ts} +1 -1
  34. package/dist/{getAbiItem-bfba73d1.d.ts → getAbiItem-6223ab36.d.ts} +1 -1
  35. package/dist/{getEnsResolver-ce85735b.d.ts → getEnsResolver-af3ad3a8.d.ts} +4 -4
  36. package/dist/index.d.ts +17 -16
  37. package/dist/index.js +95 -95
  38. package/dist/index.js.map +1 -1
  39. package/dist/index.mjs +2 -2
  40. package/dist/index.mjs.map +1 -1
  41. package/dist/{parseGwei-280a3ff7.d.ts → parseGwei-3bead650.d.ts} +5 -5
  42. package/dist/public.d.ts +5 -5
  43. package/dist/public.js +2 -2
  44. package/dist/public.mjs +1 -1
  45. package/dist/{publicKeyToAddress-623eb398.d.ts → publicKeyToAddress-2e49b7cb.d.ts} +2 -2
  46. package/dist/{test-b67569fe.d.ts → test-1cc18fdd.d.ts} +3 -3
  47. package/dist/test.d.ts +5 -5
  48. package/dist/test.js +2 -2
  49. package/dist/test.mjs +1 -1
  50. package/dist/{typedData-46b4d81f.d.ts → typedData-969116ac.d.ts} +2 -2
  51. package/dist/utils/index.d.ts +16 -15
  52. package/dist/utils/index.js +2 -2
  53. package/dist/utils/index.mjs +1 -1
  54. package/dist/wallet.d.ts +5 -5
  55. package/dist/wallet.js +2 -2
  56. package/dist/wallet.mjs +1 -1
  57. package/dist/window.d.ts +2 -2
  58. package/package.json +1 -1
  59. package/dist/chunk-QISMTRQF.js.map +0 -1
  60. package/dist/chunk-ZEA2O6V2.mjs.map +0 -1
  61. /package/dist/{chunk-NNNKKACJ.js.map → chunk-IPKAMASI.js.map} +0 -0
  62. /package/dist/{chunk-VOEF3A53.mjs.map → chunk-UOOOQDP7.mjs.map} +0 -0
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-bfba73d1.js';
3
- export { e as encodePacked } from './encodePacked-98f67d09.js';
4
- import './chain-5507c6f0.js';
2
+ export { D as DecodeAbiParametersReturnType, E as EncodeAbiParametersReturnType, G as GetAbiItemParameters, d as decodeAbiParameters, e as encodeAbiParameters, g as getAbiItem } from './getAbiItem-6223ab36.js';
3
+ export { e as encodePacked } from './encodePacked-0ac1e458.js';
4
+ import './chain-892805a2.js';
5
5
  import '@wagmi/chains';
package/dist/abi.js CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
 
9
9
 
10
- var _chunkQISMTRQFjs = require('./chunk-QISMTRQF.js');
10
+ var _chunkGEN2W3H2js = require('./chunk-GEN2W3H2.js');
11
11
 
12
12
 
13
13
 
@@ -17,5 +17,5 @@ var _chunkQISMTRQFjs = require('./chunk-QISMTRQF.js');
17
17
 
18
18
 
19
19
 
20
- exports.decodeAbiParameters = _chunkQISMTRQFjs.decodeAbiParameters; exports.encodeAbiParameters = _chunkQISMTRQFjs.encodeAbiParameters; exports.encodePacked = _chunkQISMTRQFjs.encodePacked; exports.getAbiItem = _chunkQISMTRQFjs.getAbiItem; exports.parseAbi = _chunkQISMTRQFjs.parseAbi; exports.parseAbiItem = _chunkQISMTRQFjs.parseAbiItem; exports.parseAbiParameter = _chunkQISMTRQFjs.parseAbiParameter; exports.parseAbiParameters = _chunkQISMTRQFjs.parseAbiParameters;
20
+ exports.decodeAbiParameters = _chunkGEN2W3H2js.decodeAbiParameters; exports.encodeAbiParameters = _chunkGEN2W3H2js.encodeAbiParameters; exports.encodePacked = _chunkGEN2W3H2js.encodePacked; exports.getAbiItem = _chunkGEN2W3H2js.getAbiItem; exports.parseAbi = _chunkGEN2W3H2js.parseAbi; exports.parseAbiItem = _chunkGEN2W3H2js.parseAbiItem; exports.parseAbiParameter = _chunkGEN2W3H2js.parseAbiParameter; exports.parseAbiParameters = _chunkGEN2W3H2js.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-ZEA2O6V2.mjs";
10
+ } from "./chunk-AWZ7ROLD.mjs";
11
11
  export {
12
12
  decodeAbiParameters,
13
13
  encodeAbiParameters,
@@ -1,10 +1,19 @@
1
1
  import { HDKey } from '@scure/bip32';
2
2
  export { HDKey } from '@scure/bip32';
3
- import { H as Hex } from '../chain-5507c6f0.js';
4
- import { b as HDOptions, H as HDAccount, P as PrivateKeyAccount, a as AccountSource, J as JsonRpcAccount, C as CustomSource, L as LocalAccount, T as TypedDataDefinition } from '../typedData-46b4d81f.js';
5
- 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';
3
+ import { H as Hex } from '../chain-892805a2.js';
4
+ import { e as HDOptions, H as HDAccount, P as PrivateKeyAccount, a as AccountSource, J as JsonRpcAccount, C as CustomSource, L as LocalAccount, T as TypedDataDefinition } from '../typedData-969116ac.js';
5
+ export { A as Account, a as AccountSource, C as CustomSource, H as HDAccount, e as HDOptions, J as JsonRpcAccount, L as LocalAccount, P as PrivateKeyAccount } from '../typedData-969116ac.js';
6
6
  import { Address, TypedData } from 'abitype';
7
- export { p as parseAccount, a as publicKeyToAddress } from '../publicKeyToAddress-623eb398.js';
7
+ export { p as parseAccount, a as publicKeyToAddress } from '../publicKeyToAddress-2e49b7cb.js';
8
+ export { wordlist as czech } from '@scure/bip39/wordlists/czech.js';
9
+ export { wordlist as english } from '@scure/bip39/wordlists/english.js';
10
+ export { wordlist as french } from '@scure/bip39/wordlists/french.js';
11
+ export { wordlist as italian } from '@scure/bip39/wordlists/italian.js';
12
+ export { wordlist as japanese } from '@scure/bip39/wordlists/japanese.js';
13
+ export { wordlist as korean } from '@scure/bip39/wordlists/korean.js';
14
+ export { wordlist as simplifiedChinese } from '@scure/bip39/wordlists/simplified-chinese.js';
15
+ export { wordlist as spanish } from '@scure/bip39/wordlists/spanish.js';
16
+ export { wordlist as traditionalChinese } from '@scure/bip39/wordlists/traditional-chinese.js';
8
17
  import '@wagmi/chains';
9
18
 
10
19
  /**
@@ -84,22 +93,4 @@ declare function signTypedData<TTypedData extends TypedData | {
84
93
  [key: string]: unknown;
85
94
  }, TPrimaryType extends string = string>({ privateKey, ...typedData }: SignTypedDataParameters<TTypedData, TPrimaryType>): Promise<SignTypedDataReturnType>;
86
95
 
87
- declare const czech: string[];
88
-
89
- declare const english: string[];
90
-
91
- declare const french: string[];
92
-
93
- declare const italian: string[];
94
-
95
- declare const japanese: string[];
96
-
97
- declare const korean: string[];
98
-
99
- declare const simplifiedChinese: string[];
100
-
101
- declare const spanish: string[];
102
-
103
- declare const traditionalChinese: string[];
104
-
105
- export { SignMessageParameters, SignMessageReturnType, SignTypedDataParameters, SignTypedDataReturnType, czech, english, french, generateMnemonic, generatePrivateKey, hdKeyToAccount, italian, japanese, korean, mnemonicToAccount, privateKeyToAccount, signMessage, signTypedData, simplifiedChinese, spanish, toAccount, traditionalChinese };
96
+ export { SignMessageParameters, SignMessageReturnType, SignTypedDataParameters, SignTypedDataReturnType, generateMnemonic, generatePrivateKey, hdKeyToAccount, mnemonicToAccount, privateKeyToAccount, signMessage, signTypedData, toAccount };
@@ -1,6 +1,6 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkNNNKKACJjs = require('../chunk-NNNKKACJ.js');
3
+ var _chunkIPKAMASIjs = require('../chunk-IPKAMASI.js');
4
4
 
5
5
 
6
6
 
@@ -10,21 +10,21 @@ var _chunkNNNKKACJjs = require('../chunk-NNNKKACJ.js');
10
10
 
11
11
 
12
12
 
13
- var _chunkQISMTRQFjs = require('../chunk-QISMTRQF.js');
13
+ var _chunkGEN2W3H2js = require('../chunk-GEN2W3H2.js');
14
14
 
15
15
  // src/accounts/index.ts
16
16
  var _bip32 = require('@scure/bip32');
17
17
 
18
18
  // src/accounts/generateMnemonic.ts
19
19
  var _bip39 = require('@scure/bip39');
20
- function generateMnemonic(wordlist) {
21
- return _bip39.generateMnemonic.call(void 0, wordlist);
20
+ function generateMnemonic(wordlist10) {
21
+ return _bip39.generateMnemonic.call(void 0, wordlist10);
22
22
  }
23
23
 
24
24
  // src/accounts/generatePrivateKey.ts
25
25
  var _secp256k1 = require('@noble/curves/secp256k1');
26
26
  function generatePrivateKey() {
27
- return _chunkQISMTRQFjs.toHex.call(void 0, _secp256k1.secp256k1.utils.randomPrivateKey());
27
+ return _chunkGEN2W3H2js.toHex.call(void 0, _secp256k1.secp256k1.utils.randomPrivateKey());
28
28
  }
29
29
 
30
30
  // src/accounts/privateKeyToAccount.ts
@@ -38,8 +38,8 @@ async function sign({
38
38
  }) {
39
39
  const { r, s, recovery } = _secp256k1.secp256k1.sign(hash.slice(2), privateKey.slice(2));
40
40
  return {
41
- r: _chunkQISMTRQFjs.toHex.call(void 0, r),
42
- s: _chunkQISMTRQFjs.toHex.call(void 0, s),
41
+ r: _chunkGEN2W3H2js.toHex.call(void 0, r),
42
+ s: _chunkGEN2W3H2js.toHex.call(void 0, s),
43
43
  v: recovery ? 28n : 27n
44
44
  };
45
45
  }
@@ -48,9 +48,9 @@ async function sign({
48
48
 
49
49
  function signatureToHex({ r, s, v }) {
50
50
  return `0x${new _secp256k1.secp256k1.Signature(
51
- _chunkQISMTRQFjs.hexToBigInt.call(void 0, r),
52
- _chunkQISMTRQFjs.hexToBigInt.call(void 0, s)
53
- ).toCompactHex()}${_chunkQISMTRQFjs.toHex.call(void 0, v).slice(2)}`;
51
+ _chunkGEN2W3H2js.hexToBigInt.call(void 0, r),
52
+ _chunkGEN2W3H2js.hexToBigInt.call(void 0, s)
53
+ ).toCompactHex()}${_chunkGEN2W3H2js.toHex.call(void 0, v).slice(2)}`;
54
54
  }
55
55
 
56
56
  // src/accounts/utils/signMessage.ts
@@ -58,7 +58,7 @@ async function signMessage({
58
58
  message,
59
59
  privateKey
60
60
  }) {
61
- const signature = await sign({ hash: _chunkQISMTRQFjs.hashMessage.call(void 0, message), privateKey });
61
+ const signature = await sign({ hash: _chunkGEN2W3H2js.hashMessage.call(void 0, message), privateKey });
62
62
  return signatureToHex(signature);
63
63
  }
64
64
 
@@ -68,10 +68,10 @@ async function signTransaction({
68
68
  transaction
69
69
  }) {
70
70
  const signature = await sign({
71
- hash: _chunkQISMTRQFjs.keccak256.call(void 0, _chunkQISMTRQFjs.serializeTransaction.call(void 0, transaction)),
71
+ hash: _chunkGEN2W3H2js.keccak256.call(void 0, _chunkGEN2W3H2js.serializeTransaction.call(void 0, transaction)),
72
72
  privateKey
73
73
  });
74
- return _chunkQISMTRQFjs.serializeTransaction.call(void 0, transaction, signature);
74
+ return _chunkGEN2W3H2js.serializeTransaction.call(void 0, transaction, signature);
75
75
  }
76
76
 
77
77
  // src/accounts/utils/signTypedData.ts
@@ -80,7 +80,7 @@ async function signTypedData({
80
80
  ...typedData
81
81
  }) {
82
82
  const signature = await sign({
83
- hash: _chunkQISMTRQFjs.hashTypedData.call(void 0, typedData),
83
+ hash: _chunkGEN2W3H2js.hashTypedData.call(void 0, typedData),
84
84
  privateKey
85
85
  });
86
86
  return signatureToHex(signature);
@@ -88,9 +88,9 @@ async function signTypedData({
88
88
 
89
89
  // src/accounts/privateKeyToAccount.ts
90
90
  function privateKeyToAccount(privateKey) {
91
- const publicKey = _chunkQISMTRQFjs.toHex.call(void 0, _secp256k1.secp256k1.getPublicKey(privateKey.slice(2), false));
92
- const address = _chunkQISMTRQFjs.publicKeyToAddress.call(void 0, publicKey);
93
- const account = _chunkNNNKKACJjs.toAccount.call(void 0, {
91
+ const publicKey = _chunkGEN2W3H2js.toHex.call(void 0, _secp256k1.secp256k1.getPublicKey(privateKey.slice(2), false));
92
+ const address = _chunkGEN2W3H2js.publicKeyToAddress.call(void 0, publicKey);
93
+ const account = _chunkIPKAMASIjs.toAccount.call(void 0, {
94
94
  address,
95
95
  async signMessage({ message }) {
96
96
  return signMessage({ message, privateKey });
@@ -114,7 +114,7 @@ function hdKeyToAccount(hdKey_, { accountIndex = 0, addressIndex = 0, changeInde
114
114
  const hdKey = hdKey_.derive(
115
115
  path || `m/44'/60'/${accountIndex}'/${changeIndex}/${addressIndex}`
116
116
  );
117
- const account = privateKeyToAccount(_chunkQISMTRQFjs.toHex.call(void 0, hdKey.privateKey));
117
+ const account = privateKeyToAccount(_chunkGEN2W3H2js.toHex.call(void 0, hdKey.privateKey));
118
118
  return {
119
119
  ...account,
120
120
  getHdKey: () => hdKey,
@@ -131,40 +131,31 @@ function mnemonicToAccount(mnemonic, opts = {}) {
131
131
  }
132
132
 
133
133
  // src/accounts/wordlists/czech.ts
134
- var _czechjs = require('@scure/bip39/wordlists/czech.js'); var _czechjs2 = _interopRequireDefault(_czechjs);
135
- var czech = _czechjs2.default.wordlist;
134
+ var _czechjs = require('@scure/bip39/wordlists/czech.js');
136
135
 
137
136
  // src/accounts/wordlists/english.ts
138
- var _englishjs = require('@scure/bip39/wordlists/english.js'); var _englishjs2 = _interopRequireDefault(_englishjs);
139
- var english = _englishjs2.default.wordlist;
137
+ var _englishjs = require('@scure/bip39/wordlists/english.js');
140
138
 
141
139
  // src/accounts/wordlists/french.ts
142
- var _frenchjs = require('@scure/bip39/wordlists/french.js'); var _frenchjs2 = _interopRequireDefault(_frenchjs);
143
- var french = _frenchjs2.default.wordlist;
140
+ var _frenchjs = require('@scure/bip39/wordlists/french.js');
144
141
 
145
142
  // src/accounts/wordlists/italian.ts
146
- var _italianjs = require('@scure/bip39/wordlists/italian.js'); var _italianjs2 = _interopRequireDefault(_italianjs);
147
- var italian = _italianjs2.default.wordlist;
143
+ var _italianjs = require('@scure/bip39/wordlists/italian.js');
148
144
 
149
145
  // src/accounts/wordlists/japanese.ts
150
- var _japanesejs = require('@scure/bip39/wordlists/japanese.js'); var _japanesejs2 = _interopRequireDefault(_japanesejs);
151
- var japanese = _japanesejs2.default.wordlist;
146
+ var _japanesejs = require('@scure/bip39/wordlists/japanese.js');
152
147
 
153
148
  // src/accounts/wordlists/korean.ts
154
- var _koreanjs = require('@scure/bip39/wordlists/korean.js'); var _koreanjs2 = _interopRequireDefault(_koreanjs);
155
- var korean = _koreanjs2.default.wordlist;
149
+ var _koreanjs = require('@scure/bip39/wordlists/korean.js');
156
150
 
157
151
  // src/accounts/wordlists/simplifiedChinese.ts
158
- var _simplifiedchinesejs = require('@scure/bip39/wordlists/simplified-chinese.js'); var _simplifiedchinesejs2 = _interopRequireDefault(_simplifiedchinesejs);
159
- var simplifiedChinese = _simplifiedchinesejs2.default.wordlist;
152
+ var _simplifiedchinesejs = require('@scure/bip39/wordlists/simplified-chinese.js');
160
153
 
161
154
  // src/accounts/wordlists/spanish.ts
162
- var _spanishjs = require('@scure/bip39/wordlists/spanish.js'); var _spanishjs2 = _interopRequireDefault(_spanishjs);
163
- var spanish = _spanishjs2.default.wordlist;
155
+ var _spanishjs = require('@scure/bip39/wordlists/spanish.js');
164
156
 
165
157
  // src/accounts/wordlists/traditionalChinese.ts
166
- var _traditionalchinesejs = require('@scure/bip39/wordlists/traditional-chinese.js'); var _traditionalchinesejs2 = _interopRequireDefault(_traditionalchinesejs);
167
- var traditionalChinese = _traditionalchinesejs2.default.wordlist;
158
+ var _traditionalchinesejs = require('@scure/bip39/wordlists/traditional-chinese.js');
168
159
 
169
160
 
170
161
 
@@ -186,5 +177,5 @@ var traditionalChinese = _traditionalchinesejs2.default.wordlist;
186
177
 
187
178
 
188
179
 
189
- exports.HDKey = _bip32.HDKey; exports.czech = czech; exports.english = english; exports.french = french; exports.generateMnemonic = generateMnemonic; exports.generatePrivateKey = generatePrivateKey; exports.hdKeyToAccount = hdKeyToAccount; exports.italian = italian; exports.japanese = japanese; exports.korean = korean; exports.mnemonicToAccount = mnemonicToAccount; exports.parseAccount = _chunkQISMTRQFjs.parseAccount; exports.privateKeyToAccount = privateKeyToAccount; exports.publicKeyToAddress = _chunkQISMTRQFjs.publicKeyToAddress; exports.signMessage = signMessage; exports.signTypedData = signTypedData; exports.simplifiedChinese = simplifiedChinese; exports.spanish = spanish; exports.toAccount = _chunkNNNKKACJjs.toAccount; exports.traditionalChinese = traditionalChinese;
180
+ exports.HDKey = _bip32.HDKey; exports.czech = _czechjs.wordlist; exports.english = _englishjs.wordlist; exports.french = _frenchjs.wordlist; exports.generateMnemonic = generateMnemonic; exports.generatePrivateKey = generatePrivateKey; exports.hdKeyToAccount = hdKeyToAccount; exports.italian = _italianjs.wordlist; exports.japanese = _japanesejs.wordlist; exports.korean = _koreanjs.wordlist; exports.mnemonicToAccount = mnemonicToAccount; exports.parseAccount = _chunkGEN2W3H2js.parseAccount; exports.privateKeyToAccount = privateKeyToAccount; exports.publicKeyToAddress = _chunkGEN2W3H2js.publicKeyToAddress; exports.signMessage = signMessage; exports.signTypedData = signTypedData; exports.simplifiedChinese = _simplifiedchinesejs.wordlist; exports.spanish = _spanishjs.wordlist; exports.toAccount = _chunkIPKAMASIjs.toAccount; exports.traditionalChinese = _traditionalchinesejs.wordlist;
190
181
  //# sourceMappingURL=index.js.map
@@ -1 +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/hdKeyToAccount.ts","../../src/accounts/mnemonicToAccount.ts","../../src/accounts/wordlists/czech.ts","../../src/accounts/wordlists/english.ts","../../src/accounts/wordlists/french.ts","../../src/accounts/wordlists/italian.ts","../../src/accounts/wordlists/japanese.ts","../../src/accounts/wordlists/korean.ts","../../src/accounts/wordlists/simplifiedChinese.ts","../../src/accounts/wordlists/spanish.ts","../../src/accounts/wordlists/traditionalChinese.ts"],"names":["HDKey","secp256k1","pkg"],"mappings":";;;;;;;;;;;;;;;AAAA,SAAS,SAAAA,cAAa;;;ACAtB,SAAS,oBAAoB,yBAAyB;AAS/C,SAAS,iBAAiB,UAA4B;AAC3D,SAAO,kBAAkB,QAAQ;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,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AAQ;AACxC,SAAO,eAAe,MAAM,eAAe,IAAI,GAAG,IAAI;AACxD;;;ACjBA,OAAO,SAAS;AACT,IAAM,QAAQ,IAAI;;;ACDzB,OAAOC,UAAS;AACT,IAAM,UAAUA,KAAI;;;ACD3B,OAAOA,UAAS;AACT,IAAM,SAASA,KAAI;;;ACD1B,OAAOA,UAAS;AACT,IAAM,UAAUA,KAAI;;;ACD3B,OAAOA,UAAS;AACT,IAAM,WAAWA,KAAI;;;ACD5B,OAAOA,UAAS;AACT,IAAM,SAASA,KAAI;;;ACD1B,OAAOA,UAAS;AACT,IAAM,oBAAoBA,KAAI;;;ACDrC,OAAOA,UAAS;AACT,IAAM,UAAUA,KAAI;;;ACD3B,OAAOA,UAAS;AACT,IAAM,qBAAqBA,KAAI","sourcesContent":["import { HDKey } from '@scure/bip32'\nexport { HDKey }\n\nexport { generateMnemonic } from './generateMnemonic'\n\nexport { generatePrivateKey } from './generatePrivateKey'\n\nexport { hdKeyToAccount } from './hdKeyToAccount'\n\nexport { mnemonicToAccount } from './mnemonicToAccount'\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 { czech } from './wordlists/czech'\nexport { english } from './wordlists/english'\nexport { french } from './wordlists/french'\nexport { italian } from './wordlists/italian'\nexport { japanese } from './wordlists/japanese'\nexport { korean } from './wordlists/korean'\nexport { simplifiedChinese } from './wordlists/simplifiedChinese'\nexport { spanish } from './wordlists/spanish'\nexport { traditionalChinese } from './wordlists/traditionalChinese'\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","import type { HDKey } from '@scure/bip32'\n\nimport { toHex } from '../utils'\nimport { privateKeyToAccount } from './privateKeyToAccount'\nimport type { HDAccount, HDOptions } from './types'\n\n/**\n * @description Creates an Account from a HD Key.\n *\n * @returns A HD Account.\n */\nexport function hdKeyToAccount(\n hdKey_: HDKey,\n { accountIndex = 0, addressIndex = 0, changeIndex = 0, path }: HDOptions = {},\n): HDAccount {\n const hdKey = hdKey_.derive(\n path || `m/44'/60'/${accountIndex}'/${changeIndex}/${addressIndex}`,\n )\n const account = privateKeyToAccount(toHex(hdKey.privateKey!))\n return {\n ...account,\n getHdKey: () => hdKey,\n source: 'hd',\n }\n}\n","import { HDKey } from '@scure/bip32'\nimport { mnemonicToSeedSync } from '@scure/bip39'\nimport { hdKeyToAccount } from './hdKeyToAccount'\n\nimport type { HDAccount, HDOptions } from './types'\n\n/**\n * @description Creates an Account from a mnemonic phrase.\n *\n * @returns A HD Account.\n */\nexport function mnemonicToAccount(\n mnemonic: string,\n opts: HDOptions = {},\n): HDAccount {\n const seed = mnemonicToSeedSync(mnemonic)\n return hdKeyToAccount(HDKey.fromMasterSeed(seed), opts)\n}\n","import pkg from '@scure/bip39/wordlists/czech.js'\nexport const czech = pkg.wordlist\n","import pkg from '@scure/bip39/wordlists/english.js'\nexport const english = pkg.wordlist\n","import pkg from '@scure/bip39/wordlists/french.js'\nexport const french = pkg.wordlist\n","import pkg from '@scure/bip39/wordlists/italian.js'\nexport const italian = pkg.wordlist\n","import pkg from '@scure/bip39/wordlists/japanese.js'\nexport const japanese = pkg.wordlist\n","import pkg from '@scure/bip39/wordlists/korean.js'\nexport const korean = pkg.wordlist\n","import pkg from '@scure/bip39/wordlists/simplified-chinese.js'\nexport const simplifiedChinese = pkg.wordlist\n","import pkg from '@scure/bip39/wordlists/spanish.js'\nexport const spanish = pkg.wordlist\n","import pkg from '@scure/bip39/wordlists/traditional-chinese.js'\nexport const traditionalChinese = pkg.wordlist\n"]}
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/hdKeyToAccount.ts","../../src/accounts/mnemonicToAccount.ts","../../src/accounts/wordlists/czech.ts","../../src/accounts/wordlists/english.ts","../../src/accounts/wordlists/french.ts","../../src/accounts/wordlists/italian.ts","../../src/accounts/wordlists/japanese.ts","../../src/accounts/wordlists/korean.ts","../../src/accounts/wordlists/simplifiedChinese.ts","../../src/accounts/wordlists/spanish.ts","../../src/accounts/wordlists/traditionalChinese.ts"],"names":["HDKey","wordlist","secp256k1"],"mappings":";;;;;;;;;;;;;;;AAAA,SAAS,SAAAA,cAAa;;;ACAtB,SAAS,oBAAoB,yBAAyB;AAS/C,SAAS,iBAAiBC,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A,iBAAqC;;;ACA9C,SAAqB,YAAZA,iBAA2B;;;ACApC,SAAqB,YAAZA,iBAAsC","sourcesContent":["import { HDKey } from '@scure/bip32'\nexport { HDKey }\n\nexport { generateMnemonic } from './generateMnemonic'\n\nexport { generatePrivateKey } from './generatePrivateKey'\n\nexport { hdKeyToAccount } from './hdKeyToAccount'\n\nexport { mnemonicToAccount } from './mnemonicToAccount'\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 { czech } from './wordlists/czech'\nexport { english } from './wordlists/english'\nexport { french } from './wordlists/french'\nexport { italian } from './wordlists/italian'\nexport { japanese } from './wordlists/japanese'\nexport { korean } from './wordlists/korean'\nexport { simplifiedChinese } from './wordlists/simplifiedChinese'\nexport { spanish } from './wordlists/spanish'\nexport { traditionalChinese } from './wordlists/traditionalChinese'\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","import type { HDKey } from '@scure/bip32'\n\nimport { toHex } from '../utils'\nimport { privateKeyToAccount } from './privateKeyToAccount'\nimport type { HDAccount, HDOptions } from './types'\n\n/**\n * @description Creates an Account from a HD Key.\n *\n * @returns A HD Account.\n */\nexport function hdKeyToAccount(\n hdKey_: HDKey,\n { accountIndex = 0, addressIndex = 0, changeIndex = 0, path }: HDOptions = {},\n): HDAccount {\n const hdKey = hdKey_.derive(\n path || `m/44'/60'/${accountIndex}'/${changeIndex}/${addressIndex}`,\n )\n const account = privateKeyToAccount(toHex(hdKey.privateKey!))\n return {\n ...account,\n getHdKey: () => hdKey,\n source: 'hd',\n }\n}\n","import { HDKey } from '@scure/bip32'\nimport { mnemonicToSeedSync } from '@scure/bip39'\nimport { hdKeyToAccount } from './hdKeyToAccount'\n\nimport type { HDAccount, HDOptions } from './types'\n\n/**\n * @description Creates an Account from a mnemonic phrase.\n *\n * @returns A HD Account.\n */\nexport function mnemonicToAccount(\n mnemonic: string,\n opts: HDOptions = {},\n): HDAccount {\n const seed = mnemonicToSeedSync(mnemonic)\n return hdKeyToAccount(HDKey.fromMasterSeed(seed), opts)\n}\n","export { wordlist as czech } from '@scure/bip39/wordlists/czech.js'\n","export { wordlist as english } from '@scure/bip39/wordlists/english.js'\n","export { wordlist as french } from '@scure/bip39/wordlists/french.js'\n","export { wordlist as italian } from '@scure/bip39/wordlists/italian.js'\n","export { wordlist as japanese } from '@scure/bip39/wordlists/japanese.js'\n","export { wordlist as korean } from '@scure/bip39/wordlists/korean.js'\n","export { wordlist as simplifiedChinese } from '@scure/bip39/wordlists/simplified-chinese.js'\n","export { wordlist as spanish } from '@scure/bip39/wordlists/spanish.js'\n","export { wordlist as traditionalChinese } from '@scure/bip39/wordlists/traditional-chinese.js'\n"]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  toAccount
3
- } from "../chunk-VOEF3A53.mjs";
3
+ } from "../chunk-UOOOQDP7.mjs";
4
4
  import {
5
5
  hashMessage,
6
6
  hashTypedData,
@@ -10,15 +10,15 @@ import {
10
10
  publicKeyToAddress,
11
11
  serializeTransaction,
12
12
  toHex
13
- } from "../chunk-ZEA2O6V2.mjs";
13
+ } from "../chunk-AWZ7ROLD.mjs";
14
14
 
15
15
  // src/accounts/index.ts
16
16
  import { HDKey as HDKey2 } from "@scure/bip32";
17
17
 
18
18
  // src/accounts/generateMnemonic.ts
19
19
  import { generateMnemonic as generateMnemonic_ } from "@scure/bip39";
20
- function generateMnemonic(wordlist) {
21
- return generateMnemonic_(wordlist);
20
+ function generateMnemonic(wordlist10) {
21
+ return generateMnemonic_(wordlist10);
22
22
  }
23
23
 
24
24
  // src/accounts/generatePrivateKey.ts
@@ -131,60 +131,51 @@ function mnemonicToAccount(mnemonic, opts = {}) {
131
131
  }
132
132
 
133
133
  // src/accounts/wordlists/czech.ts
134
- import pkg from "@scure/bip39/wordlists/czech.js";
135
- var czech = pkg.wordlist;
134
+ import { wordlist } from "@scure/bip39/wordlists/czech.js";
136
135
 
137
136
  // src/accounts/wordlists/english.ts
138
- import pkg2 from "@scure/bip39/wordlists/english.js";
139
- var english = pkg2.wordlist;
137
+ import { wordlist as wordlist2 } from "@scure/bip39/wordlists/english.js";
140
138
 
141
139
  // src/accounts/wordlists/french.ts
142
- import pkg3 from "@scure/bip39/wordlists/french.js";
143
- var french = pkg3.wordlist;
140
+ import { wordlist as wordlist3 } from "@scure/bip39/wordlists/french.js";
144
141
 
145
142
  // src/accounts/wordlists/italian.ts
146
- import pkg4 from "@scure/bip39/wordlists/italian.js";
147
- var italian = pkg4.wordlist;
143
+ import { wordlist as wordlist4 } from "@scure/bip39/wordlists/italian.js";
148
144
 
149
145
  // src/accounts/wordlists/japanese.ts
150
- import pkg5 from "@scure/bip39/wordlists/japanese.js";
151
- var japanese = pkg5.wordlist;
146
+ import { wordlist as wordlist5 } from "@scure/bip39/wordlists/japanese.js";
152
147
 
153
148
  // src/accounts/wordlists/korean.ts
154
- import pkg6 from "@scure/bip39/wordlists/korean.js";
155
- var korean = pkg6.wordlist;
149
+ import { wordlist as wordlist6 } from "@scure/bip39/wordlists/korean.js";
156
150
 
157
151
  // src/accounts/wordlists/simplifiedChinese.ts
158
- import pkg7 from "@scure/bip39/wordlists/simplified-chinese.js";
159
- var simplifiedChinese = pkg7.wordlist;
152
+ import { wordlist as wordlist7 } from "@scure/bip39/wordlists/simplified-chinese.js";
160
153
 
161
154
  // src/accounts/wordlists/spanish.ts
162
- import pkg8 from "@scure/bip39/wordlists/spanish.js";
163
- var spanish = pkg8.wordlist;
155
+ import { wordlist as wordlist8 } from "@scure/bip39/wordlists/spanish.js";
164
156
 
165
157
  // src/accounts/wordlists/traditionalChinese.ts
166
- import pkg9 from "@scure/bip39/wordlists/traditional-chinese.js";
167
- var traditionalChinese = pkg9.wordlist;
158
+ import { wordlist as wordlist9 } from "@scure/bip39/wordlists/traditional-chinese.js";
168
159
  export {
169
160
  HDKey2 as HDKey,
170
- czech,
171
- english,
172
- french,
161
+ wordlist as czech,
162
+ wordlist2 as english,
163
+ wordlist3 as french,
173
164
  generateMnemonic,
174
165
  generatePrivateKey,
175
166
  hdKeyToAccount,
176
- italian,
177
- japanese,
178
- korean,
167
+ wordlist4 as italian,
168
+ wordlist5 as japanese,
169
+ wordlist6 as korean,
179
170
  mnemonicToAccount,
180
171
  parseAccount,
181
172
  privateKeyToAccount,
182
173
  publicKeyToAddress,
183
174
  signMessage,
184
175
  signTypedData,
185
- simplifiedChinese,
186
- spanish,
176
+ wordlist7 as simplifiedChinese,
177
+ wordlist8 as spanish,
187
178
  toAccount,
188
- traditionalChinese
179
+ wordlist9 as traditionalChinese
189
180
  };
190
181
  //# sourceMappingURL=index.mjs.map
@@ -1 +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/hdKeyToAccount.ts","../../src/accounts/mnemonicToAccount.ts","../../src/accounts/wordlists/czech.ts","../../src/accounts/wordlists/english.ts","../../src/accounts/wordlists/french.ts","../../src/accounts/wordlists/italian.ts","../../src/accounts/wordlists/japanese.ts","../../src/accounts/wordlists/korean.ts","../../src/accounts/wordlists/simplifiedChinese.ts","../../src/accounts/wordlists/spanish.ts","../../src/accounts/wordlists/traditionalChinese.ts"],"sourcesContent":["import { HDKey } from '@scure/bip32'\nexport { HDKey }\n\nexport { generateMnemonic } from './generateMnemonic'\n\nexport { generatePrivateKey } from './generatePrivateKey'\n\nexport { hdKeyToAccount } from './hdKeyToAccount'\n\nexport { mnemonicToAccount } from './mnemonicToAccount'\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 { czech } from './wordlists/czech'\nexport { english } from './wordlists/english'\nexport { french } from './wordlists/french'\nexport { italian } from './wordlists/italian'\nexport { japanese } from './wordlists/japanese'\nexport { korean } from './wordlists/korean'\nexport { simplifiedChinese } from './wordlists/simplifiedChinese'\nexport { spanish } from './wordlists/spanish'\nexport { traditionalChinese } from './wordlists/traditionalChinese'\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","import type { HDKey } from '@scure/bip32'\n\nimport { toHex } from '../utils'\nimport { privateKeyToAccount } from './privateKeyToAccount'\nimport type { HDAccount, HDOptions } from './types'\n\n/**\n * @description Creates an Account from a HD Key.\n *\n * @returns A HD Account.\n */\nexport function hdKeyToAccount(\n hdKey_: HDKey,\n { accountIndex = 0, addressIndex = 0, changeIndex = 0, path }: HDOptions = {},\n): HDAccount {\n const hdKey = hdKey_.derive(\n path || `m/44'/60'/${accountIndex}'/${changeIndex}/${addressIndex}`,\n )\n const account = privateKeyToAccount(toHex(hdKey.privateKey!))\n return {\n ...account,\n getHdKey: () => hdKey,\n source: 'hd',\n }\n}\n","import { HDKey } from '@scure/bip32'\nimport { mnemonicToSeedSync } from '@scure/bip39'\nimport { hdKeyToAccount } from './hdKeyToAccount'\n\nimport type { HDAccount, HDOptions } from './types'\n\n/**\n * @description Creates an Account from a mnemonic phrase.\n *\n * @returns A HD Account.\n */\nexport function mnemonicToAccount(\n mnemonic: string,\n opts: HDOptions = {},\n): HDAccount {\n const seed = mnemonicToSeedSync(mnemonic)\n return hdKeyToAccount(HDKey.fromMasterSeed(seed), opts)\n}\n","import pkg from '@scure/bip39/wordlists/czech.js'\nexport const czech = pkg.wordlist\n","import pkg from '@scure/bip39/wordlists/english.js'\nexport const english = pkg.wordlist\n","import pkg from '@scure/bip39/wordlists/french.js'\nexport const french = pkg.wordlist\n","import pkg from '@scure/bip39/wordlists/italian.js'\nexport const italian = pkg.wordlist\n","import pkg from '@scure/bip39/wordlists/japanese.js'\nexport const japanese = pkg.wordlist\n","import pkg from '@scure/bip39/wordlists/korean.js'\nexport const korean = pkg.wordlist\n","import pkg from '@scure/bip39/wordlists/simplified-chinese.js'\nexport const simplifiedChinese = pkg.wordlist\n","import pkg from '@scure/bip39/wordlists/spanish.js'\nexport const spanish = pkg.wordlist\n","import pkg from '@scure/bip39/wordlists/traditional-chinese.js'\nexport const traditionalChinese = pkg.wordlist\n"],"mappings":";;;;;;;;;;;;;;;AAAA,SAAS,SAAAA,cAAa;;;ACAtB,SAAS,oBAAoB,yBAAyB;AAS/C,SAAS,iBAAiB,UAA4B;AAC3D,SAAO,kBAAkB,QAAQ;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,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A,EACF,CAAC;AAED,SAAO;AAAA,IACL,GAAG;AAAA,IACH;AAAA,IACA,QAAQ;AAAA,EACV;AACF;;;AM7BO,SAAS,eACd,QACA,EAAE,eAAe,GAAG,eAAe,GAAG,cAAc,GAAG,KAAK,IAAe,CAAC,GACjE;AACX,QAAM,QAAQ,OAAO;AAAA,IACnB,QAAQ,aAAa,iBAAiB,eAAe;AAAA,EACvD;AACA,QAAM,UAAU,oBAAoB,MAAM,MAAM,UAAW,CAAC;AAC5D,SAAO;AAAA,IACL,GAAG;AAAA,IACH,UAAU,MAAM;AAAA,IAChB,QAAQ;AAAA,EACV;AACF;;;ACxBA,SAAS,aAAa;AACtB,SAAS,0BAA0B;AAU5B,SAAS,kBACd,UACA,OAAkB,CAAC,GACR;AACX,QAAM,OAAO,mBAAmB,QAAQ;AACxC,SAAO,eAAe,MAAM,eAAe,IAAI,GAAG,IAAI;AACxD;;;ACjBA,OAAO,SAAS;AACT,IAAM,QAAQ,IAAI;;;ACDzB,OAAOC,UAAS;AACT,IAAM,UAAUA,KAAI;;;ACD3B,OAAOC,UAAS;AACT,IAAM,SAASA,KAAI;;;ACD1B,OAAOC,UAAS;AACT,IAAM,UAAUA,KAAI;;;ACD3B,OAAOC,UAAS;AACT,IAAM,WAAWA,KAAI;;;ACD5B,OAAOC,UAAS;AACT,IAAM,SAASA,KAAI;;;ACD1B,OAAOC,UAAS;AACT,IAAM,oBAAoBA,KAAI;;;ACDrC,OAAOC,UAAS;AACT,IAAM,UAAUA,KAAI;;;ACD3B,OAAOC,UAAS;AACT,IAAM,qBAAqBA,KAAI;","names":["HDKey","secp256k1","secp256k1","secp256k1","secp256k1","secp256k1","secp256k1","pkg","pkg","pkg","pkg","pkg","pkg","pkg","pkg"]}
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/hdKeyToAccount.ts","../../src/accounts/mnemonicToAccount.ts","../../src/accounts/wordlists/czech.ts","../../src/accounts/wordlists/english.ts","../../src/accounts/wordlists/french.ts","../../src/accounts/wordlists/italian.ts","../../src/accounts/wordlists/japanese.ts","../../src/accounts/wordlists/korean.ts","../../src/accounts/wordlists/simplifiedChinese.ts","../../src/accounts/wordlists/spanish.ts","../../src/accounts/wordlists/traditionalChinese.ts"],"sourcesContent":["import { HDKey } from '@scure/bip32'\nexport { HDKey }\n\nexport { generateMnemonic } from './generateMnemonic'\n\nexport { generatePrivateKey } from './generatePrivateKey'\n\nexport { hdKeyToAccount } from './hdKeyToAccount'\n\nexport { mnemonicToAccount } from './mnemonicToAccount'\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 { czech } from './wordlists/czech'\nexport { english } from './wordlists/english'\nexport { french } from './wordlists/french'\nexport { italian } from './wordlists/italian'\nexport { japanese } from './wordlists/japanese'\nexport { korean } from './wordlists/korean'\nexport { simplifiedChinese } from './wordlists/simplifiedChinese'\nexport { spanish } from './wordlists/spanish'\nexport { traditionalChinese } from './wordlists/traditionalChinese'\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","import type { HDKey } from '@scure/bip32'\n\nimport { toHex } from '../utils'\nimport { privateKeyToAccount } from './privateKeyToAccount'\nimport type { HDAccount, HDOptions } from './types'\n\n/**\n * @description Creates an Account from a HD Key.\n *\n * @returns A HD Account.\n */\nexport function hdKeyToAccount(\n hdKey_: HDKey,\n { accountIndex = 0, addressIndex = 0, changeIndex = 0, path }: HDOptions = {},\n): HDAccount {\n const hdKey = hdKey_.derive(\n path || `m/44'/60'/${accountIndex}'/${changeIndex}/${addressIndex}`,\n )\n const account = privateKeyToAccount(toHex(hdKey.privateKey!))\n return {\n ...account,\n getHdKey: () => hdKey,\n source: 'hd',\n }\n}\n","import { HDKey } from '@scure/bip32'\nimport { mnemonicToSeedSync } from '@scure/bip39'\nimport { hdKeyToAccount } from './hdKeyToAccount'\n\nimport type { HDAccount, HDOptions } from './types'\n\n/**\n * @description Creates an Account from a mnemonic phrase.\n *\n * @returns A HD Account.\n */\nexport function mnemonicToAccount(\n mnemonic: string,\n opts: HDOptions = {},\n): HDAccount {\n const seed = mnemonicToSeedSync(mnemonic)\n return hdKeyToAccount(HDKey.fromMasterSeed(seed), opts)\n}\n","export { wordlist as czech } from '@scure/bip39/wordlists/czech.js'\n","export { wordlist as english } from '@scure/bip39/wordlists/english.js'\n","export { wordlist as french } from '@scure/bip39/wordlists/french.js'\n","export { wordlist as italian } from '@scure/bip39/wordlists/italian.js'\n","export { wordlist as japanese } from '@scure/bip39/wordlists/japanese.js'\n","export { wordlist as korean } from '@scure/bip39/wordlists/korean.js'\n","export { wordlist as simplifiedChinese } from '@scure/bip39/wordlists/simplified-chinese.js'\n","export { wordlist as spanish } from '@scure/bip39/wordlists/spanish.js'\n","export { wordlist as traditionalChinese } from '@scure/bip39/wordlists/traditional-chinese.js'\n"],"mappings":";;;;;;;;;;;;;;;AAAA,SAAS,SAAAA,cAAa;;;ACAtB,SAAS,oBAAoB,yBAAyB;AAS/C,SAAS,iBAAiBC,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,QAA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AC5D,SAAO;AAAA,IACL,GAAG;AAAA,IACH,UAAU,MAAM;AAAA,IAChB,QAAQ;AAAA,EACV;AACF;;;ACxBA,SAAS,aAAa;AACtB,SAAS,0BAA0B;AAU5B,SAAS,kBACd,UACA,OAAkB,CAAC,GACR;AACX,QAAM,OAAO,mBAAmB,QAAQ;AACxC,SAAO,eAAe,MAAM,eAAe,IAAI,GAAG,IAAI;AACxD;;;ACjBA,SAAqB,gBAAa;;;ACAlC,SAAqB,YAAZC,iBAA2B;;;ACApC,SAAqB,YAAZC,iBAA0B;;;ACAnC,SAAqB,YAAZC,iBAA2B;;;ACApC,SAAqB,YAAZC,iBAA4B;;;ACArC,SAAqB,YAAZC,iBAA0B;;;ACAnC,SAAqB,YAAZC,iBAAqC;;;ACA9C,SAAqB,YAAZC,iBAA2B;;;ACApC,SAAqB,YAAZC,iBAAsC;","names":["HDKey","wordlist","secp256k1","secp256k1","secp256k1","secp256k1","secp256k1","secp256k1","wordlist","wordlist","wordlist","wordlist","wordlist","wordlist","wordlist","wordlist"]}
@@ -590,4 +590,4 @@ type GetChain<TChain extends Chain | undefined, TChainOverride extends Chain | u
590
590
  chain?: TChainOverride | null;
591
591
  };
592
592
 
593
- export { TransactionSerializable as $, AbiItem as A, ByteArray as B, Chain as C, RpcLog as D, RpcTransaction as E, FeeHistory as F, GetConstructorArgs as G, Hex as H, IsNarrowable as I, RpcTransactionReceipt as J, RpcTransactionRequest as K, Log as L, MaybeExtractEventArgsFromAbi as M, RpcUncle as N, TransactionBase as O, Prettify as P, TransactionEIP1559 as Q, RpcBlock as R, TransactionEIP2930 as S, Transaction as T, TransactionLegacy as U, TransactionReceipt as V, TransactionRequest as W, TransactionRequestBase as X, TransactionRequestEIP1559 as Y, TransactionRequestEIP2930 as Z, TransactionRequestLegacy as _, Hash as a, TransactionSerializableBase as a0, TransactionSerializableEIP1559 as a1, TransactionSerializableEIP2930 as a2, TransactionSerializableLegacy as a3, TransactionSerialized as a4, TransactionSerializedEIP1559 as a5, TransactionSerializedEIP2930 as a6, TransactionSerializedLegacy as a7, TransactionType$1 as a8, Uncle as a9, ExtractFormatter as aa, Formatted as ab, FormattedTransaction as ac, TransactionFormatter as ad, defineTransaction as ae, formatTransaction as af, transactionType as ag, Formatters as ah, Formatter as ai, GetChain as aj, MergeIntersectionProperties as ak, GetValue as al, MaybeAbiEventName as am, Quantity as an, EventDefinition as ao, Signature as ap, LogTopic as aq, defineFormatter as ar, format as as, IsNever as b, IsUndefined as c, AbiEventParametersToPrimitiveTypes as d, AccessList as e, Block as f, BlockIdentifier as g, BlockNumber as h, BlockTag as i, ContractFunctionConfig as j, ContractFunctionResult as k, FeeValues as l, FeeValuesEIP1559 as m, FeeValuesLegacy as n, GetErrorArgs as o, GetEventArgs as p, GetEventArgsFromTopics as q, GetFunctionArgs as r, InferErrorName as s, InferEventName as t, InferFunctionName as u, InferItemName as v, RpcBlockIdentifier as w, RpcBlockNumber as x, RpcFeeHistory as y, RpcFeeValues as z };
593
+ export { TransactionRequestLegacy as $, AbiItem as A, ByteArray as B, Chain as C, RpcFeeValues as D, RpcLog as E, FeeHistory as F, GetConstructorArgs as G, Hex as H, IsNarrowable as I, RpcTransaction as J, RpcTransactionReceipt as K, Log as L, MaybeExtractEventArgsFromAbi as M, RpcTransactionRequest as N, RpcUncle as O, Prettify as P, TransactionBase as Q, RpcBlock as R, TransactionEIP1559 as S, Transaction as T, TransactionEIP2930 as U, TransactionLegacy as V, TransactionReceipt as W, TransactionRequest as X, TransactionRequestBase as Y, TransactionRequestEIP1559 as Z, TransactionRequestEIP2930 as _, Hash as a, TransactionSerializable as a0, TransactionSerializableBase as a1, TransactionSerializableEIP1559 as a2, TransactionSerializableEIP2930 as a3, TransactionSerializableLegacy as a4, TransactionSerialized as a5, TransactionSerializedEIP1559 as a6, TransactionSerializedEIP2930 as a7, TransactionSerializedLegacy as a8, TransactionType$1 as a9, Uncle as aa, ExtractFormatter as ab, Formatted as ac, FormattedTransaction as ad, TransactionFormatter as ae, defineTransaction as af, formatTransaction as ag, transactionType as ah, Formatters as ai, Formatter as aj, GetChain as ak, MergeIntersectionProperties as al, MaybeAbiEventName as am, Quantity as an, EventDefinition as ao, Signature as ap, LogTopic as aq, defineFormatter as ar, format as as, IsNever as b, IsUndefined as c, AbiEventParametersToPrimitiveTypes as d, AccessList as e, Block as f, BlockIdentifier as g, BlockNumber as h, BlockTag as i, ContractFunctionConfig as j, ContractFunctionResult as k, FeeValues as l, FeeValuesEIP1559 as m, FeeValuesLegacy as n, GetErrorArgs as o, GetEventArgs as p, GetEventArgsFromTopics as q, GetFunctionArgs as r, GetValue as s, InferErrorName as t, InferEventName as u, InferFunctionName as v, InferItemName as w, RpcBlockIdentifier as x, RpcBlockNumber as y, RpcFeeHistory as z };
@@ -1,4 +1,4 @@
1
- import { ah as Formatters, C as Chain } from './chain-5507c6f0.js';
1
+ import { ai as Formatters, C as Chain } from './chain-892805a2.js';
2
2
 
3
3
  declare function defineChain<TFormatters extends Formatters = Formatters, TChain extends Chain<TFormatters> = Chain<TFormatters>>(chain: TChain): TChain;
4
4
  declare function getChainContractAddress({ blockNumber, chain, contract: name, }: {
package/dist/chains.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- export { d as defineChain } from './chain-fe47467d.js';
2
- import { R as RpcBlock, f as Block, T as Transaction, H as Hex, E as RpcTransaction, J as RpcTransactionReceipt, V as TransactionReceipt, a8 as TransactionType, W as TransactionRequest, K as RpcTransactionRequest } from './chain-5507c6f0.js';
3
- export { C as Chain } from './chain-5507c6f0.js';
1
+ export { d as defineChain } from './chain-d06e2a80.js';
2
+ import { R as RpcBlock, f as Block, T as Transaction, H as Hex, J as RpcTransaction, K as RpcTransactionReceipt, W as TransactionReceipt, a9 as TransactionType, X as TransactionRequest, N as RpcTransactionRequest } from './chain-892805a2.js';
3
+ export { C as Chain } from './chain-892805a2.js';
4
4
  import * as chains from '@wagmi/chains';
5
5
  import 'abitype';
6
6