ox 0.9.5 → 0.9.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 (50) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/_cjs/core/AbiConstructor.js +16 -2
  3. package/_cjs/core/AbiConstructor.js.map +1 -1
  4. package/_cjs/core/AbiError.js.map +1 -1
  5. package/_cjs/core/AbiEvent.js.map +1 -1
  6. package/_cjs/core/AbiFunction.js.map +1 -1
  7. package/_cjs/core/AbiItem.js +24 -3
  8. package/_cjs/core/AbiItem.js.map +1 -1
  9. package/_cjs/version.js +1 -1
  10. package/_esm/core/Abi.js +2 -2
  11. package/_esm/core/Abi.js.map +1 -1
  12. package/_esm/core/AbiConstructor.js +18 -56
  13. package/_esm/core/AbiConstructor.js.map +1 -1
  14. package/_esm/core/AbiError.js.map +1 -1
  15. package/_esm/core/AbiEvent.js.map +1 -1
  16. package/_esm/core/AbiFunction.js.map +1 -1
  17. package/_esm/core/AbiItem.js +27 -93
  18. package/_esm/core/AbiItem.js.map +1 -1
  19. package/_esm/erc6492/SignatureErc6492.js +2 -2
  20. package/_esm/erc6492/index.js +2 -2
  21. package/_esm/erc8010/SignatureErc8010.js +2 -2
  22. package/_esm/erc8010/index.js +2 -2
  23. package/_esm/version.js +1 -1
  24. package/_types/core/AbiConstructor.d.ts +43 -4
  25. package/_types/core/AbiConstructor.d.ts.map +1 -1
  26. package/_types/core/AbiError.d.ts +20 -29
  27. package/_types/core/AbiError.d.ts.map +1 -1
  28. package/_types/core/AbiEvent.d.ts +58 -0
  29. package/_types/core/AbiEvent.d.ts.map +1 -1
  30. package/_types/core/AbiFunction.d.ts +49 -6
  31. package/_types/core/AbiFunction.d.ts.map +1 -1
  32. package/_types/core/AbiItem.d.ts +36 -0
  33. package/_types/core/AbiItem.d.ts.map +1 -1
  34. package/_types/erc6492/SignatureErc6492.d.ts +2 -2
  35. package/_types/erc6492/index.d.ts +2 -2
  36. package/_types/erc8010/SignatureErc8010.d.ts +2 -2
  37. package/_types/erc8010/index.d.ts +2 -2
  38. package/_types/version.d.ts +1 -1
  39. package/core/Abi.ts +2 -2
  40. package/core/AbiConstructor.ts +96 -12
  41. package/core/AbiError.ts +20 -29
  42. package/core/AbiEvent.ts +58 -0
  43. package/core/AbiFunction.ts +49 -6
  44. package/core/AbiItem.ts +87 -3
  45. package/erc6492/SignatureErc6492.ts +2 -2
  46. package/erc6492/index.ts +2 -2
  47. package/erc8010/SignatureErc8010.ts +2 -2
  48. package/erc8010/index.ts +2 -2
  49. package/package.json +1 -1
  50. package/version.ts +1 -1
@@ -187,7 +187,7 @@ export declare namespace unwrap {
187
187
  *
188
188
  * @example
189
189
  * ```ts twoslash
190
- * import { Secp256k1 } from 'ox'
190
+ * import { Secp256k1, Signature } from 'ox'
191
191
  * import { SignatureErc6492 } from 'ox/erc6492' // [!code focus]
192
192
  *
193
193
  * const signature = Secp256k1.sign({
@@ -197,7 +197,7 @@ export declare namespace unwrap {
197
197
  *
198
198
  * const wrapped = SignatureErc6492.wrap({ // [!code focus]
199
199
  * data: '0xdeadbeef', // [!code focus]
200
- * signature, // [!code focus]
200
+ * signature: Signature.toHex(signature), // [!code focus]
201
201
  * to: '0x00000000219ab540356cBB839Cbe05303d7705Fa', // [!code focus]
202
202
  * }) // [!code focus]
203
203
  * ```
package/erc6492/index.ts CHANGED
@@ -7,7 +7,7 @@ export type {}
7
7
  *
8
8
  * @example
9
9
  * ```ts twoslash
10
- * import { Secp256k1, PersonalMessage } from 'ox'
10
+ * import { PersonalMessage, Secp256k1, Signature } from 'ox'
11
11
  * import { SignatureErc6492 } from 'ox/erc6492' // [!code focus]
12
12
  *
13
13
  * const signature = Secp256k1.sign({
@@ -17,7 +17,7 @@ export type {}
17
17
  *
18
18
  * const wrapped = SignatureErc6492.wrap({ // [!code focus]
19
19
  * data: '0xcafebabe', // [!code focus]
20
- * signature, // [!code focus]
20
+ * signature: Signature.toHex(signature), // [!code focus]
21
21
  * to: '0xcafebabecafebabecafebabecafebabecafebabe', // [!code focus]
22
22
  * }) // [!code focus]
23
23
  * // @log: '0x000000000000000000000000cafebabecafebabecafebabecafebabecafebabe000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000004deadbeef000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000041fa78c5905fb0b9d6066ef531f962a62bc6ef0d5eb59ecb134056d206f75aaed7780926ff2601a935c2c79707d9e1799948c9f19dcdde1e090e903b19a07923d01c000000000000000000000000000000000000000000000000000000000000006492649264926492649264926492649264926492649264926492649264926492'
@@ -146,7 +146,7 @@ export declare namespace unwrap {
146
146
  * @example
147
147
  * ```ts twoslash
148
148
  * // @noErrors
149
- * import { Secp256k1 } from 'ox'
149
+ * import { Secp256k1, Signature } from 'ox'
150
150
  * import { SignatureErc8010 } from 'ox/erc8010' // [!code focus]
151
151
  *
152
152
  * const signature = Secp256k1.sign({
@@ -157,7 +157,7 @@ export declare namespace unwrap {
157
157
  * const wrapped = SignatureErc8010.wrap({ // [!code focus]
158
158
  * authorization: { ... }, // [!code focus]
159
159
  * data: '0xdeadbeef', // [!code focus]
160
- * signature, // [!code focus]
160
+ * signature: Signature.toHex(signature), // [!code focus]
161
161
  * }) // [!code focus]
162
162
  * ```
163
163
  *
package/erc8010/index.ts CHANGED
@@ -7,7 +7,7 @@ export type {}
7
7
  *
8
8
  * @example
9
9
  * ```ts twoslash
10
- * import { Authorization, Secp256k1, PersonalMessage } from 'ox'
10
+ * import { Authorization, PersonalMessage, Secp256k1, Signature } from 'ox'
11
11
  * import { SignatureErc8010 } from 'ox/erc8010' // [!code focus]
12
12
  *
13
13
  * const authorization = Authorization.from({
@@ -33,7 +33,7 @@ export type {}
33
33
  * const wrapped = SignatureErc8010.wrap({ // [!code focus]
34
34
  * authorization: authorizationSigned, // [!code focus]
35
35
  * data: '0xcafebabe', // [!code focus]
36
- * signature, // [!code focus]
36
+ * signature: Signature.toHex(signature), // [!code focus]
37
37
  * }) // [!code focus]
38
38
  * // @log: '0x000000000000000000000000cafebabecafebabecafebabecafebabecafebabe000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000004deadbeef000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000041fa78c5905fb0b9d6066ef531f962a62bc6ef0d5eb59ecb134056d206f75aaed7780926ff2601a935c2c79707d9e1799948c9f19dcdde1e090e903b19a07923d01c000000000000000000000000000000000000000000000000000000000000008010801080108010801080108010801080108010801080108010801080108010'
39
39
  * ```
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ox",
3
3
  "description": "Ethereum Standard Library",
4
- "version": "0.9.5",
4
+ "version": "0.9.6",
5
5
  "main": "./_cjs/index.js",
6
6
  "module": "./_esm/index.js",
7
7
  "types": "./_types/index.d.ts",
package/version.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  /** @internal */
2
- export const version = '0.9.5'
2
+ export const version = '0.9.6'