viem 2.55.1 → 2.55.4

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 (115) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/_cjs/chains/definitions/mainnet.js +1 -1
  3. package/_cjs/chains/definitions/mainnet.js.map +1 -1
  4. package/_cjs/chains/definitions/robinhood.js +1 -0
  5. package/_cjs/chains/definitions/robinhood.js.map +1 -1
  6. package/_cjs/chains/definitions/xLayer.js +1 -0
  7. package/_cjs/chains/definitions/xLayer.js.map +1 -1
  8. package/_cjs/clients/createClient.js +1 -0
  9. package/_cjs/clients/createClient.js.map +1 -1
  10. package/_cjs/errors/version.js +1 -1
  11. package/_cjs/tempo/Decorator.js.map +1 -1
  12. package/_cjs/tempo/actions/zone.js +78 -14
  13. package/_cjs/tempo/actions/zone.js.map +1 -1
  14. package/_cjs/tempo/chainConfig.js +9 -0
  15. package/_cjs/tempo/chainConfig.js.map +1 -1
  16. package/_cjs/tempo/internal/utils.js +5 -0
  17. package/_cjs/tempo/internal/utils.js.map +1 -1
  18. package/_cjs/utils/abi/decodeAbiParameters.js +1 -2
  19. package/_cjs/utils/abi/decodeAbiParameters.js.map +1 -1
  20. package/_cjs/utils/unit/Value.js +118 -0
  21. package/_cjs/utils/unit/Value.js.map +1 -0
  22. package/_cjs/utils/unit/formatEther.js +2 -3
  23. package/_cjs/utils/unit/formatEther.js.map +1 -1
  24. package/_cjs/utils/unit/formatGwei.js +2 -3
  25. package/_cjs/utils/unit/formatGwei.js.map +1 -1
  26. package/_cjs/utils/unit/formatUnits.js +2 -11
  27. package/_cjs/utils/unit/formatUnits.js.map +1 -1
  28. package/_cjs/utils/unit/parseEther.js +2 -3
  29. package/_cjs/utils/unit/parseEther.js.map +1 -1
  30. package/_cjs/utils/unit/parseGwei.js +2 -3
  31. package/_cjs/utils/unit/parseGwei.js.map +1 -1
  32. package/_cjs/utils/unit/parseUnits.js +2 -34
  33. package/_cjs/utils/unit/parseUnits.js.map +1 -1
  34. package/_esm/chains/definitions/mainnet.js +1 -1
  35. package/_esm/chains/definitions/mainnet.js.map +1 -1
  36. package/_esm/chains/definitions/robinhood.js +1 -0
  37. package/_esm/chains/definitions/robinhood.js.map +1 -1
  38. package/_esm/chains/definitions/xLayer.js +1 -0
  39. package/_esm/chains/definitions/xLayer.js.map +1 -1
  40. package/_esm/clients/createClient.js +4 -3
  41. package/_esm/clients/createClient.js.map +1 -1
  42. package/_esm/errors/version.js +1 -1
  43. package/_esm/tempo/Decorator.js.map +1 -1
  44. package/_esm/tempo/actions/zone.js +141 -17
  45. package/_esm/tempo/actions/zone.js.map +1 -1
  46. package/_esm/tempo/chainConfig.js +10 -0
  47. package/_esm/tempo/chainConfig.js.map +1 -1
  48. package/_esm/tempo/internal/utils.js +5 -0
  49. package/_esm/tempo/internal/utils.js.map +1 -1
  50. package/_esm/utils/abi/decodeAbiParameters.js +1 -2
  51. package/_esm/utils/abi/decodeAbiParameters.js.map +1 -1
  52. package/_esm/utils/unit/Value.js +240 -0
  53. package/_esm/utils/unit/Value.js.map +1 -0
  54. package/_esm/utils/unit/formatEther.js +2 -3
  55. package/_esm/utils/unit/formatEther.js.map +1 -1
  56. package/_esm/utils/unit/formatGwei.js +2 -3
  57. package/_esm/utils/unit/formatGwei.js.map +1 -1
  58. package/_esm/utils/unit/formatUnits.js +2 -11
  59. package/_esm/utils/unit/formatUnits.js.map +1 -1
  60. package/_esm/utils/unit/parseEther.js +2 -3
  61. package/_esm/utils/unit/parseEther.js.map +1 -1
  62. package/_esm/utils/unit/parseGwei.js +2 -3
  63. package/_esm/utils/unit/parseGwei.js.map +1 -1
  64. package/_esm/utils/unit/parseUnits.js +2 -36
  65. package/_esm/utils/unit/parseUnits.js.map +1 -1
  66. package/_types/chains/definitions/mainnet.d.ts +1 -1
  67. package/_types/chains/definitions/robinhood.d.ts +1 -1
  68. package/_types/chains/definitions/robinhood.d.ts.map +1 -1
  69. package/_types/chains/definitions/xLayer.d.ts +1 -1
  70. package/_types/chains/definitions/xLayer.d.ts.map +1 -1
  71. package/_types/clients/createClient.d.ts +3 -3
  72. package/_types/clients/createClient.d.ts.map +1 -1
  73. package/_types/errors/version.d.ts +1 -1
  74. package/_types/tempo/Decorator.d.ts +7 -1
  75. package/_types/tempo/Decorator.d.ts.map +1 -1
  76. package/_types/tempo/actions/zone.d.ts +133 -11
  77. package/_types/tempo/actions/zone.d.ts.map +1 -1
  78. package/_types/tempo/chainConfig.d.ts.map +1 -1
  79. package/_types/tempo/internal/types.d.ts +1 -0
  80. package/_types/tempo/internal/types.d.ts.map +1 -1
  81. package/_types/tempo/internal/utils.d.ts +5 -0
  82. package/_types/tempo/internal/utils.d.ts.map +1 -1
  83. package/_types/utils/abi/decodeAbiParameters.d.ts +1 -2
  84. package/_types/utils/abi/decodeAbiParameters.d.ts.map +1 -1
  85. package/_types/utils/unit/Value.d.ts +115 -0
  86. package/_types/utils/unit/Value.d.ts.map +1 -0
  87. package/_types/utils/unit/formatEther.d.ts +1 -1
  88. package/_types/utils/unit/formatEther.d.ts.map +1 -1
  89. package/_types/utils/unit/formatGwei.d.ts +1 -1
  90. package/_types/utils/unit/formatGwei.d.ts.map +1 -1
  91. package/_types/utils/unit/formatUnits.d.ts.map +1 -1
  92. package/_types/utils/unit/parseEther.d.ts +1 -1
  93. package/_types/utils/unit/parseEther.d.ts.map +1 -1
  94. package/_types/utils/unit/parseGwei.d.ts +1 -1
  95. package/_types/utils/unit/parseGwei.d.ts.map +1 -1
  96. package/_types/utils/unit/parseUnits.d.ts.map +1 -1
  97. package/chains/definitions/mainnet.ts +1 -1
  98. package/chains/definitions/robinhood.ts +1 -0
  99. package/chains/definitions/xLayer.ts +1 -0
  100. package/clients/createClient.ts +4 -3
  101. package/errors/version.ts +1 -1
  102. package/package.json +1 -1
  103. package/tempo/Decorator.ts +21 -2
  104. package/tempo/actions/zone.ts +305 -33
  105. package/tempo/chainConfig.ts +10 -0
  106. package/tempo/internal/types.ts +8 -0
  107. package/tempo/internal/utils.ts +6 -0
  108. package/utils/abi/decodeAbiParameters.ts +1 -3
  109. package/utils/unit/Value.ts +278 -0
  110. package/utils/unit/formatEther.ts +3 -4
  111. package/utils/unit/formatGwei.ts +3 -4
  112. package/utils/unit/formatUnits.ts +2 -15
  113. package/utils/unit/parseEther.ts +3 -4
  114. package/utils/unit/parseGwei.ts +3 -4
  115. package/utils/unit/parseUnits.ts +2 -40
@@ -0,0 +1,115 @@
1
+ /**
2
+ * Formats a `bigint` Value to its string representation (divided by the given exponent).
3
+ *
4
+ * @example
5
+ * ```ts twoslash
6
+ * import { Value } from 'ox'
7
+ *
8
+ * Value.format(420_000_000_000n, 9)
9
+ * // @log: '420'
10
+ * ```
11
+ *
12
+ * @param value - The `bigint` Value to format.
13
+ * @param decimals - The exponent to divide the `bigint` Value by.
14
+ * @returns The string representation of the Value.
15
+ */
16
+ export declare function format(value: bigint, decimals?: number): string;
17
+ export declare namespace format {
18
+ type ErrorType = Error;
19
+ }
20
+ /**
21
+ * Formats a `bigint` Value (default: wei) to a string representation of Ether.
22
+ *
23
+ * @example
24
+ * ```ts twoslash
25
+ * import { Value } from 'ox'
26
+ *
27
+ * Value.formatEther(1_000_000_000_000_000_000n)
28
+ * // @log: '1'
29
+ * ```
30
+ *
31
+ * @param wei - The Value to format.
32
+ * @param unit - The unit to format the Value in. @default 'wei'.
33
+ * @returns The Ether string representation of the Value.
34
+ */
35
+ export declare function formatEther(wei: bigint, unit?: 'wei' | 'gwei' | 'szabo' | 'finney'): string;
36
+ export declare namespace formatEther {
37
+ type ErrorType = format.ErrorType | Error;
38
+ }
39
+ /**
40
+ * Formats a `bigint` Value (default: wei) to a string representation of Gwei.
41
+ *
42
+ * @example
43
+ * ```ts twoslash
44
+ * import { Value } from 'ox'
45
+ *
46
+ * Value.formatGwei(1_000_000_000n)
47
+ * // @log: '1'
48
+ * ```
49
+ *
50
+ * @param wei - The Value to format.
51
+ * @param unit - The unit to format the Value in. @default 'wei'.
52
+ * @returns The Gwei string representation of the Value.
53
+ */
54
+ export declare function formatGwei(wei: bigint, unit?: 'wei'): string;
55
+ export declare namespace formatGwei {
56
+ type ErrorType = format.ErrorType | Error;
57
+ }
58
+ /**
59
+ * Parses a `string` representation of a Value to `bigint` (multiplied by the given exponent).
60
+ *
61
+ * @example
62
+ * ```ts twoslash
63
+ * import { Value } from 'ox'
64
+ *
65
+ * Value.from('420', 9)
66
+ * // @log: 420000000000n
67
+ * ```
68
+ *
69
+ * @param value - The string representation of the Value.
70
+ * @param decimals - The exponent to multiply the Value by.
71
+ * @returns The `bigint` representation of the Value.
72
+ */
73
+ export declare function from(value: string, decimals?: number): bigint;
74
+ export declare namespace from {
75
+ type ErrorType = Error;
76
+ }
77
+ /**
78
+ * Parses a string representation of Ether to a `bigint` Value (default: wei).
79
+ *
80
+ * @example
81
+ * ```ts twoslash
82
+ * import { Value } from 'ox'
83
+ *
84
+ * Value.fromEther('420')
85
+ * // @log: 420000000000000000000n
86
+ * ```
87
+ *
88
+ * @param ether - String representation of Ether.
89
+ * @param unit - The unit to parse to. @default 'wei'.
90
+ * @returns A `bigint` Value.
91
+ */
92
+ export declare function fromEther(ether: string, unit?: 'wei' | 'gwei' | 'szabo' | 'finney'): bigint;
93
+ export declare namespace fromEther {
94
+ type ErrorType = from.ErrorType | Error;
95
+ }
96
+ /**
97
+ * Parses a string representation of Gwei to a `bigint` Value (default: wei).
98
+ *
99
+ * @example
100
+ * ```ts twoslash
101
+ * import { Value } from 'ox'
102
+ *
103
+ * Value.fromGwei('420')
104
+ * // @log: 420000000000n
105
+ * ```
106
+ *
107
+ * @param gwei - String representation of Gwei.
108
+ * @param unit - The unit to parse to. @default 'wei'.
109
+ * @returns A `bigint` Value.
110
+ */
111
+ export declare function fromGwei(gwei: string, unit?: 'wei'): bigint;
112
+ export declare namespace fromGwei {
113
+ type ErrorType = from.ErrorType | Error;
114
+ }
115
+ //# sourceMappingURL=Value.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Value.d.ts","sourceRoot":"","sources":["../../../utils/unit/Value.ts"],"names":[],"mappings":"AAWA;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,SAAI,UAmBjD;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,KAAK,SAAS,GAAG,KAAK,CAAA;CACvB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,WAAW,CACzB,GAAG,EAAE,MAAM,EACX,IAAI,GAAE,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,QAAgB,UAGlD;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,KAAK,SAAS,GAAG,MAAM,CAAC,SAAS,GAAG,KAAK,CAAA;CAC1C;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,KAAa,UAE1D;AAED,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,KAAK,SAAS,GAAG,MAAM,CAAC,SAAS,GAAG,KAAK,CAAA;CAC1C;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,SAAI,UAmD/C;AAwBD,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,KAAK,SAAS,GAAG,KAAK,CAAA;CACvB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,SAAS,CACvB,KAAK,EAAE,MAAM,EACb,IAAI,GAAE,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,QAAgB,UAGlD;AAED,MAAM,CAAC,OAAO,WAAW,SAAS,CAAC;IACjC,KAAK,SAAS,GAAG,IAAI,CAAC,SAAS,GAAG,KAAK,CAAA;CACxC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,KAAa,UAEzD;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,KAAK,SAAS,GAAG,IAAI,CAAC,SAAS,GAAG,KAAK,CAAA;CACxC"}
@@ -1,4 +1,4 @@
1
- import { type FormatUnitsErrorType } from './formatUnits.js';
1
+ import type { FormatUnitsErrorType } from './formatUnits.js';
2
2
  export type FormatEtherErrorType = FormatUnitsErrorType;
3
3
  /**
4
4
  * Converts numerical wei to a string representation of ether.
@@ -1 +1 @@
1
- {"version":3,"file":"formatEther.d.ts","sourceRoot":"","sources":["../../../utils/unit/formatEther.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,oBAAoB,EAAe,MAAM,kBAAkB,CAAA;AAEzE,MAAM,MAAM,oBAAoB,GAAG,oBAAoB,CAAA;AAEvD;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,KAAK,GAAG,MAAc,UAEpE"}
1
+ {"version":3,"file":"formatEther.d.ts","sourceRoot":"","sources":["../../../utils/unit/formatEther.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AAG5D,MAAM,MAAM,oBAAoB,GAAG,oBAAoB,CAAA;AAEvD;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,KAAK,GAAG,MAAc,UAEpE"}
@@ -1,4 +1,4 @@
1
- import { type FormatUnitsErrorType } from './formatUnits.js';
1
+ import type { FormatUnitsErrorType } from './formatUnits.js';
2
2
  export type FormatGweiErrorType = FormatUnitsErrorType;
3
3
  /**
4
4
  * Converts numerical wei to a string representation of gwei.
@@ -1 +1 @@
1
- {"version":3,"file":"formatGwei.d.ts","sourceRoot":"","sources":["../../../utils/unit/formatGwei.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,oBAAoB,EAAe,MAAM,kBAAkB,CAAA;AAEzE,MAAM,MAAM,mBAAmB,GAAG,oBAAoB,CAAA;AAEtD;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,KAAa,UAE1D"}
1
+ {"version":3,"file":"formatGwei.d.ts","sourceRoot":"","sources":["../../../utils/unit/formatGwei.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AAG5D,MAAM,MAAM,mBAAmB,GAAG,oBAAoB,CAAA;AAEtD;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,KAAa,UAE1D"}
@@ -1 +1 @@
1
- {"version":3,"file":"formatUnits.d.ts","sourceRoot":"","sources":["../../../utils/unit/formatUnits.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEtD,MAAM,MAAM,oBAAoB,GAAG,SAAS,CAAA;AAE5C;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,UAgB1D"}
1
+ {"version":3,"file":"formatUnits.d.ts","sourceRoot":"","sources":["../../../utils/unit/formatUnits.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAGtD,MAAM,MAAM,oBAAoB,GAAG,SAAS,CAAA;AAE5C;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,UAE1D"}
@@ -1,5 +1,5 @@
1
1
  import type { ErrorType } from '../../errors/utils.js';
2
- import { type ParseUnitsErrorType } from './parseUnits.js';
2
+ import type { ParseUnitsErrorType } from './parseUnits.js';
3
3
  export type ParseEtherErrorType = ParseUnitsErrorType | ErrorType;
4
4
  /**
5
5
  * Converts a string representation of ether to numerical wei.
@@ -1 +1 @@
1
- {"version":3,"file":"parseEther.d.ts","sourceRoot":"","sources":["../../../utils/unit/parseEther.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEtD,OAAO,EAAE,KAAK,mBAAmB,EAAc,MAAM,iBAAiB,CAAA;AAEtE,MAAM,MAAM,mBAAmB,GAAG,mBAAmB,GAAG,SAAS,CAAA;AAEjE;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,GAAE,KAAK,GAAG,MAAc,UAErE"}
1
+ {"version":3,"file":"parseEther.d.ts","sourceRoot":"","sources":["../../../utils/unit/parseEther.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAG1D,MAAM,MAAM,mBAAmB,GAAG,mBAAmB,GAAG,SAAS,CAAA;AAEjE;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,GAAE,KAAK,GAAG,MAAc,UAErE"}
@@ -1,5 +1,5 @@
1
1
  import type { ErrorType } from '../../errors/utils.js';
2
- import { type ParseUnitsErrorType } from './parseUnits.js';
2
+ import type { ParseUnitsErrorType } from './parseUnits.js';
3
3
  export type ParseGweiErrorType = ParseUnitsErrorType | ErrorType;
4
4
  /**
5
5
  * Converts a string representation of gwei to numerical wei.
@@ -1 +1 @@
1
- {"version":3,"file":"parseGwei.d.ts","sourceRoot":"","sources":["../../../utils/unit/parseGwei.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEtD,OAAO,EAAE,KAAK,mBAAmB,EAAc,MAAM,iBAAiB,CAAA;AAEtE,MAAM,MAAM,kBAAkB,GAAG,mBAAmB,GAAG,SAAS,CAAA;AAEhE;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,GAAE,KAAa,UAE3D"}
1
+ {"version":3,"file":"parseGwei.d.ts","sourceRoot":"","sources":["../../../utils/unit/parseGwei.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAG1D,MAAM,MAAM,kBAAkB,GAAG,mBAAmB,GAAG,SAAS,CAAA;AAEhE;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,GAAE,KAAa,UAE3D"}
@@ -1 +1 @@
1
- {"version":3,"file":"parseUnits.d.ts","sourceRoot":"","sources":["../../../utils/unit/parseUnits.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEtD,MAAM,MAAM,mBAAmB,GAAG,SAAS,CAAA;AAE3C;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,UAwCzD"}
1
+ {"version":3,"file":"parseUnits.d.ts","sourceRoot":"","sources":["../../../utils/unit/parseUnits.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAGtD,MAAM,MAAM,mBAAmB,GAAG,SAAS,CAAA;AAE3C;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,UAEzD"}
@@ -7,7 +7,7 @@ export const mainnet = /*#__PURE__*/ defineChain({
7
7
  blockTime: 12_000,
8
8
  rpcUrls: {
9
9
  default: {
10
- http: ['https://eth.merkle.io'],
10
+ http: ['https://ethereum.reth.rs/rpc'],
11
11
  },
12
12
  },
13
13
  blockExplorers: {
@@ -4,6 +4,7 @@ export const robinhood = /*#__PURE__*/ defineChain({
4
4
  id: 4663,
5
5
  name: 'Robinhood Chain',
6
6
  nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },
7
+ blockTime: 100,
7
8
  rpcUrls: {
8
9
  default: {
9
10
  http: ['https://rpc.mainnet.chain.robinhood.com'],
@@ -8,6 +8,7 @@ export const xLayer = /*#__PURE__*/ defineChain({
8
8
  name: 'OKB',
9
9
  symbol: 'OKB',
10
10
  },
11
+ blockTime: 1_000,
11
12
  rpcUrls: {
12
13
  default: { http: ['https://xlayerrpc.okx.com'] },
13
14
  },
@@ -350,9 +350,9 @@ function isPlainObject(value: unknown): value is Record<string, unknown> {
350
350
  * Binds an action function to a `client`, returning a parameter-only version
351
351
  * along with any helpers the action exposes. Helpers that need a client
352
352
  * (`.call`, `.calls`, `.callWithPeriod`, `.estimateGas`, `.prepare`,
353
- * `.simulate`) are bound to `client`; pure helpers (`.extractEvent`,
354
- * `.extractEvents`) are copied as-is. Used by decorators that attach
355
- * namespaced actions to a Client.
353
+ * `.prepareRecipient`, `.simulate`) are bound to `client`; pure helpers
354
+ * (`.extractEvent`, `.extractEvents`) are copied as-is. Used by decorators
355
+ * that attach namespaced actions to a Client.
356
356
  * @internal
357
357
  */
358
358
  export function bindActionDecorators(
@@ -366,6 +366,7 @@ export function bindActionDecorators(
366
366
  'callWithPeriod',
367
367
  'estimateGas',
368
368
  'prepare',
369
+ 'prepareRecipient',
369
370
  'simulate',
370
371
  ] as const)
371
372
  if (Object.hasOwn(action, key)) {
package/errors/version.ts CHANGED
@@ -1 +1 @@
1
- export const version = '2.55.1'
1
+ export const version = '2.55.4'
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "viem",
3
3
  "description": "TypeScript Interface for Ethereum",
4
- "version": "2.55.1",
4
+ "version": "2.55.4",
5
5
  "main": "./_cjs/index.js",
6
6
  "module": "./_esm/index.js",
7
7
  "types": "./_types/index.d.ts",
@@ -5036,9 +5036,25 @@ type DecoratorBase<
5036
5036
  * @param parameters - Parameters.
5037
5037
  * @returns The transaction hash.
5038
5038
  */
5039
- requestWithdrawal: (
5039
+ requestWithdrawal: ((
5040
5040
  parameters: zoneActions.requestWithdrawal.Parameters<chain, account>,
5041
- ) => Promise<zoneActions.requestWithdrawal.ReturnValue>
5041
+ ) => Promise<zoneActions.requestWithdrawal.ReturnValue>) & {
5042
+ prepare: (
5043
+ parameters: zoneActions.requestWithdrawal.prepare.Parameters<
5044
+ chain,
5045
+ account,
5046
+ undefined,
5047
+ undefined
5048
+ >,
5049
+ ) => Promise<
5050
+ zoneActions.requestWithdrawal.prepare.ReturnType<
5051
+ chain,
5052
+ account,
5053
+ undefined,
5054
+ undefined
5055
+ >
5056
+ >
5057
+ }
5042
5058
  /**
5043
5059
  * Requests a withdrawal and waits for the transaction receipt.
5044
5060
  *
@@ -5164,6 +5180,9 @@ type BoundActionHelpers<action> = (action extends { call: infer helper }
5164
5180
  (action extends { prepare: infer helper }
5165
5181
  ? { prepare: BoundHelper<helper> }
5166
5182
  : {}) &
5183
+ (action extends { prepareRecipient: infer helper }
5184
+ ? { prepareRecipient: BoundHelper<helper> }
5185
+ : {}) &
5167
5186
  (action extends { simulate: infer helper }
5168
5187
  ? { simulate: BoundHelper<helper> }
5169
5188
  : {}) &