ox 0.13.2 → 0.14.1

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 (85) hide show
  1. package/Bech32m/package.json +6 -0
  2. package/CHANGELOG.md +25 -0
  3. package/_cjs/core/Bech32m.js +205 -0
  4. package/_cjs/core/Bech32m.js.map +1 -0
  5. package/_cjs/index.js +3 -2
  6. package/_cjs/index.js.map +1 -1
  7. package/_cjs/tempo/AuthorizationTempo.js +7 -2
  8. package/_cjs/tempo/AuthorizationTempo.js.map +1 -1
  9. package/_cjs/tempo/KeyAuthorization.js +22 -8
  10. package/_cjs/tempo/KeyAuthorization.js.map +1 -1
  11. package/_cjs/tempo/SignatureEnvelope.js +39 -4
  12. package/_cjs/tempo/SignatureEnvelope.js.map +1 -1
  13. package/_cjs/tempo/TempoAddress.js +49 -41
  14. package/_cjs/tempo/TempoAddress.js.map +1 -1
  15. package/_cjs/tempo/TokenId.js +8 -5
  16. package/_cjs/tempo/TokenId.js.map +1 -1
  17. package/_cjs/tempo/TransactionRequest.js +2 -1
  18. package/_cjs/tempo/TransactionRequest.js.map +1 -1
  19. package/_cjs/tempo/TxEnvelopeTempo.js +17 -4
  20. package/_cjs/tempo/TxEnvelopeTempo.js.map +1 -1
  21. package/_cjs/tempo/index.js.map +1 -1
  22. package/_cjs/version.js +1 -1
  23. package/_esm/core/Bech32m.js +238 -0
  24. package/_esm/core/Bech32m.js.map +1 -0
  25. package/_esm/index.js +24 -0
  26. package/_esm/index.js.map +1 -1
  27. package/_esm/tempo/AuthorizationTempo.js +24 -19
  28. package/_esm/tempo/AuthorizationTempo.js.map +1 -1
  29. package/_esm/tempo/KeyAuthorization.js +38 -13
  30. package/_esm/tempo/KeyAuthorization.js.map +1 -1
  31. package/_esm/tempo/SignatureEnvelope.js +43 -6
  32. package/_esm/tempo/SignatureEnvelope.js.map +1 -1
  33. package/_esm/tempo/TempoAddress.js +79 -48
  34. package/_esm/tempo/TempoAddress.js.map +1 -1
  35. package/_esm/tempo/TokenId.js +9 -6
  36. package/_esm/tempo/TokenId.js.map +1 -1
  37. package/_esm/tempo/TransactionRequest.js +2 -1
  38. package/_esm/tempo/TransactionRequest.js.map +1 -1
  39. package/_esm/tempo/TxEnvelopeTempo.js +66 -15
  40. package/_esm/tempo/TxEnvelopeTempo.js.map +1 -1
  41. package/_esm/tempo/index.js +11 -10
  42. package/_esm/tempo/index.js.map +1 -1
  43. package/_esm/version.js +1 -1
  44. package/_types/core/Bech32m.d.ts +93 -0
  45. package/_types/core/Bech32m.d.ts.map +1 -0
  46. package/_types/index.d.ts +24 -0
  47. package/_types/index.d.ts.map +1 -1
  48. package/_types/tempo/AuthorizationTempo.d.ts +19 -19
  49. package/_types/tempo/AuthorizationTempo.d.ts.map +1 -1
  50. package/_types/tempo/KeyAuthorization.d.ts +21 -9
  51. package/_types/tempo/KeyAuthorization.d.ts.map +1 -1
  52. package/_types/tempo/SignatureEnvelope.d.ts +30 -7
  53. package/_types/tempo/SignatureEnvelope.d.ts.map +1 -1
  54. package/_types/tempo/TempoAddress.d.ts +51 -15
  55. package/_types/tempo/TempoAddress.d.ts.map +1 -1
  56. package/_types/tempo/TokenId.d.ts +6 -5
  57. package/_types/tempo/TokenId.d.ts.map +1 -1
  58. package/_types/tempo/TransactionRequest.d.ts +2 -1
  59. package/_types/tempo/TransactionRequest.d.ts.map +1 -1
  60. package/_types/tempo/TxEnvelopeTempo.d.ts +64 -17
  61. package/_types/tempo/TxEnvelopeTempo.d.ts.map +1 -1
  62. package/_types/tempo/index.d.ts +11 -10
  63. package/_types/tempo/index.d.ts.map +1 -1
  64. package/_types/version.d.ts +1 -1
  65. package/core/Bech32m.ts +263 -0
  66. package/index.ts +24 -2
  67. package/package.json +6 -1
  68. package/tempo/AuthorizationTempo.test.ts +13 -0
  69. package/tempo/AuthorizationTempo.ts +27 -21
  70. package/tempo/KeyAuthorization.test.ts +95 -23
  71. package/tempo/KeyAuthorization.ts +44 -25
  72. package/tempo/PoolId.test.ts +9 -0
  73. package/tempo/SignatureEnvelope.test.ts +123 -8
  74. package/tempo/SignatureEnvelope.ts +82 -9
  75. package/tempo/TempoAddress.test.ts +70 -14
  76. package/tempo/TempoAddress.ts +95 -67
  77. package/tempo/TokenId.test.ts +14 -0
  78. package/tempo/TokenId.ts +13 -10
  79. package/tempo/Transaction.test.ts +4 -2
  80. package/tempo/TransactionRequest.ts +3 -2
  81. package/tempo/TxEnvelopeTempo.test.ts +79 -3
  82. package/tempo/TxEnvelopeTempo.ts +86 -19
  83. package/tempo/e2e.test.ts +33 -9
  84. package/tempo/index.ts +15 -10
  85. package/version.ts +1 -1
@@ -0,0 +1,263 @@
1
+ import type * as Errors from './Errors.js'
2
+ import { BaseError } from './Errors.js'
3
+
4
+ /**
5
+ * Encodes data bytes with a human-readable part (HRP) into a bech32m string (BIP-350).
6
+ *
7
+ * @example
8
+ * ```ts twoslash
9
+ * import { Bech32m } from 'ox'
10
+ *
11
+ * const encoded = Bech32m.encode('tempo', new Uint8Array(20))
12
+ * // @log: 'tempo1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqwa7xtm'
13
+ * ```
14
+ *
15
+ * @param hrp - The human-readable part (e.g. `"tempo"`, `"tempoz"`).
16
+ * @param data - The data bytes to encode.
17
+ * @returns The bech32m-encoded string.
18
+ */
19
+ export function encode(
20
+ hrp: string,
21
+ data: Uint8Array,
22
+ options: encode.Options = {},
23
+ ): string {
24
+ const { limit = 90 } = options
25
+
26
+ hrp = hrp.toLowerCase()
27
+
28
+ if (hrp.length === 0) throw new InvalidHrpError()
29
+ for (let i = 0; i < hrp.length; i++) {
30
+ const c = hrp.charCodeAt(i)
31
+ if (c < 33 || c > 126) throw new InvalidHrpError()
32
+ }
33
+
34
+ const data5 = convertBits(data, 8, 5, true)
35
+
36
+ if (hrp.length + 1 + data5.length + 6 > limit)
37
+ throw new ExceedsLengthError({ limit })
38
+
39
+ const checksum = createChecksum(hrp, data5)
40
+ let result = hrp + '1'
41
+ for (const d of data5.concat(checksum)) result += alphabet[d]
42
+ return result
43
+ }
44
+
45
+ export declare namespace encode {
46
+ type Options = {
47
+ /** Maximum length of the encoded string. @default 90 */
48
+ limit?: number | undefined
49
+ }
50
+
51
+ type ErrorType = InvalidHrpError | ExceedsLengthError | Errors.GlobalErrorType
52
+ }
53
+
54
+ /**
55
+ * Decodes a bech32m string (BIP-350) into a human-readable part and data bytes.
56
+ *
57
+ * @example
58
+ * ```ts twoslash
59
+ * import { Bech32m } from 'ox'
60
+ *
61
+ * const { hrp, data } = Bech32m.decode('tempo1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqwa7xtm')
62
+ * // @log: { hrp: 'tempo', data: Uint8Array(20) }
63
+ * ```
64
+ *
65
+ * @param str - The bech32m-encoded string to decode.
66
+ * @returns The decoded HRP and data bytes.
67
+ */
68
+ export function decode(
69
+ str: string,
70
+ options: decode.Options = {},
71
+ ): decode.ReturnType {
72
+ const { limit = 90 } = options
73
+
74
+ if (str.length > limit) throw new ExceedsLengthError({ limit })
75
+
76
+ if (str !== str.toLowerCase() && str !== str.toUpperCase())
77
+ throw new MixedCaseError()
78
+
79
+ const lower = str.toLowerCase()
80
+ const pos = lower.lastIndexOf('1')
81
+ if (pos === -1) throw new NoSeparatorError()
82
+ if (pos === 0) throw new InvalidHrpError()
83
+ if (pos + 7 > lower.length) throw new InvalidChecksumError()
84
+
85
+ const hrp = lower.slice(0, pos)
86
+ for (let i = 0; i < hrp.length; i++) {
87
+ const c = hrp.charCodeAt(i)
88
+ if (c < 33 || c > 126) throw new InvalidHrpError()
89
+ }
90
+
91
+ const dataChars = lower.slice(pos + 1)
92
+
93
+ const data5: number[] = []
94
+ for (const c of dataChars) {
95
+ const v = alphabetMap[c]
96
+ if (v === undefined) throw new InvalidCharacterError({ character: c })
97
+ data5.push(v)
98
+ }
99
+
100
+ if (!verifyChecksum(hrp, data5)) throw new InvalidChecksumError()
101
+
102
+ const data8 = convertBits(data5.slice(0, -6), 5, 8, false)
103
+ return { hrp, data: new Uint8Array(data8) }
104
+ }
105
+
106
+ export declare namespace decode {
107
+ type Options = {
108
+ /** Maximum length of the encoded string. @default 90 */
109
+ limit?: number | undefined
110
+ }
111
+
112
+ type ReturnType = {
113
+ /** The human-readable part. */
114
+ hrp: string
115
+ /** The decoded data bytes. */
116
+ data: Uint8Array
117
+ }
118
+
119
+ type ErrorType =
120
+ | NoSeparatorError
121
+ | InvalidChecksumError
122
+ | InvalidCharacterError
123
+ | InvalidPaddingError
124
+ | MixedCaseError
125
+ | InvalidHrpError
126
+ | ExceedsLengthError
127
+ | Errors.GlobalErrorType
128
+ }
129
+
130
+ /** Thrown when a bech32m string has no separator. */
131
+ export class NoSeparatorError extends BaseError {
132
+ override readonly name = 'Bech32m.NoSeparatorError'
133
+ constructor() {
134
+ super('Bech32m string has no separator.')
135
+ }
136
+ }
137
+
138
+ /** Thrown when a bech32m string has an invalid checksum. */
139
+ export class InvalidChecksumError extends BaseError {
140
+ override readonly name = 'Bech32m.InvalidChecksumError'
141
+ constructor() {
142
+ super('Invalid bech32m checksum.')
143
+ }
144
+ }
145
+
146
+ /** Thrown when a bech32m string contains an invalid character. */
147
+ export class InvalidCharacterError extends BaseError {
148
+ override readonly name = 'Bech32m.InvalidCharacterError'
149
+ constructor({ character }: { character: string }) {
150
+ super(`Invalid bech32m character: "${character}".`)
151
+ }
152
+ }
153
+
154
+ /** Thrown when the padding bits are invalid during base32 conversion. */
155
+ export class InvalidPaddingError extends BaseError {
156
+ override readonly name = 'Bech32m.InvalidPaddingError'
157
+ constructor() {
158
+ super('Invalid padding in bech32m data.')
159
+ }
160
+ }
161
+
162
+ /** Thrown when a bech32m string contains mixed case. */
163
+ export class MixedCaseError extends BaseError {
164
+ override readonly name = 'Bech32m.MixedCaseError'
165
+ constructor() {
166
+ super('Bech32m string must not contain mixed case.')
167
+ }
168
+ }
169
+
170
+ /** Thrown when the HRP is invalid (empty or contains non-ASCII characters). */
171
+ export class InvalidHrpError extends BaseError {
172
+ override readonly name = 'Bech32m.InvalidHrpError'
173
+ constructor() {
174
+ super(
175
+ 'Invalid bech32m human-readable part (HRP). Must be 1+ characters in ASCII range 33-126.',
176
+ )
177
+ }
178
+ }
179
+
180
+ /** Thrown when the encoded string exceeds the length limit. */
181
+ export class ExceedsLengthError extends BaseError {
182
+ override readonly name = 'Bech32m.ExceedsLengthError'
183
+ constructor({ limit }: { limit: number }) {
184
+ super(`Bech32m string exceeds length limit of ${limit}.`)
185
+ }
186
+ }
187
+
188
+ /** @internal */
189
+ const alphabet = 'qpzry9x8gf2tvdw0s3jn54khce6mua7l'
190
+
191
+ /** @internal */
192
+ const alphabetMap = /*#__PURE__*/ (() => {
193
+ const map: Record<string, number> = {}
194
+ for (let i = 0; i < alphabet.length; i++) map[alphabet[i]!] = i
195
+ return map
196
+ })()
197
+
198
+ /** @internal */
199
+ const BECH32M_CONST = 0x2bc830a3
200
+
201
+ /** @internal */
202
+ const GEN = [0x3b6a57b2, 0x26508e6d, 0x1ea119fa, 0x3d4233dd, 0x2a1462b3]
203
+
204
+ /** @internal */
205
+ function polymod(values: number[]): number {
206
+ let chk = 1
207
+ for (const v of values) {
208
+ const b = chk >> 25
209
+ chk = ((chk & 0x1ffffff) << 5) ^ v
210
+ for (let i = 0; i < 5; i++) if ((b >> i) & 1) chk ^= GEN[i]!
211
+ }
212
+ return chk
213
+ }
214
+
215
+ /** @internal */
216
+ function hrpExpand(hrp: string): number[] {
217
+ const ret: number[] = []
218
+ for (let i = 0; i < hrp.length; i++) ret.push(hrp.charCodeAt(i) >> 5)
219
+ ret.push(0)
220
+ for (let i = 0; i < hrp.length; i++) ret.push(hrp.charCodeAt(i) & 31)
221
+ return ret
222
+ }
223
+
224
+ /** @internal */
225
+ function createChecksum(hrp: string, data: number[]): number[] {
226
+ const values = hrpExpand(hrp).concat(data).concat([0, 0, 0, 0, 0, 0])
227
+ const mod = polymod(values) ^ BECH32M_CONST
228
+ const ret: number[] = []
229
+ for (let i = 0; i < 6; i++) ret.push((mod >> (5 * (5 - i))) & 31)
230
+ return ret
231
+ }
232
+
233
+ /** @internal */
234
+ function verifyChecksum(hrp: string, data: number[]): boolean {
235
+ return polymod(hrpExpand(hrp).concat(data)) === BECH32M_CONST
236
+ }
237
+
238
+ /** @internal */
239
+ function convertBits(
240
+ data: Iterable<number>,
241
+ fromBits: number,
242
+ toBits: number,
243
+ pad: boolean,
244
+ ): number[] {
245
+ let acc = 0
246
+ let bits = 0
247
+ const maxv = (1 << toBits) - 1
248
+ const ret: number[] = []
249
+ for (const value of data) {
250
+ acc = (acc << fromBits) | value
251
+ bits += fromBits
252
+ while (bits >= toBits) {
253
+ bits -= toBits
254
+ ret.push((acc >> bits) & maxv)
255
+ }
256
+ }
257
+ if (pad) {
258
+ if (bits > 0) ret.push((acc << (toBits - bits)) & maxv)
259
+ } else if (bits >= fromBits || (acc << (toBits - bits)) & maxv) {
260
+ throw new InvalidPaddingError()
261
+ }
262
+ return ret
263
+ }
package/index.ts CHANGED
@@ -862,7 +862,6 @@ export * as Authorization from './core/Authorization.js'
862
862
  * @category Data
863
863
  */
864
864
  export * as Base32 from './core/Base32.js'
865
-
866
865
  /**
867
866
  * Utility functions for working with [Base58](https://digitalbazaar.github.io/base58-spec/) values.
868
867
  *
@@ -917,7 +916,6 @@ export * as Base32 from './core/Base32.js'
917
916
  * @category Data
918
917
  */
919
918
  export * as Base58 from './core/Base58.js'
920
-
921
919
  /**
922
920
  * Utility functions for working with [RFC-4648](https://datatracker.ietf.org/doc/html/rfc4648) Base64.
923
921
  *
@@ -971,6 +969,30 @@ export * as Base58 from './core/Base58.js'
971
969
  * @category Data
972
970
  */
973
971
  export * as Base64 from './core/Base64.js'
972
+ /**
973
+ * Utility functions for [BIP-350](https://github.com/bitcoin/bips/blob/master/bip-0350.mediawiki) bech32m encoding and decoding.
974
+ *
975
+ * @example
976
+ * ### Encoding
977
+ *
978
+ * ```ts twoslash
979
+ * import { Bech32m } from 'ox'
980
+ *
981
+ * const encoded = Bech32m.encode('tempo', new Uint8Array(20))
982
+ * ```
983
+ *
984
+ * @example
985
+ * ### Decoding
986
+ *
987
+ * ```ts twoslash
988
+ * import { Bech32m } from 'ox'
989
+ *
990
+ * const { hrp, data } = Bech32m.decode('tempo1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq7w9gdx')
991
+ * ```
992
+ *
993
+ * @category Data
994
+ */
995
+ export * as Bech32m from './core/Bech32m.js'
974
996
 
975
997
  /**
976
998
  * Utility functions for working with [EIP-7864](https://eips.ethereum.org/EIPS/eip-7864) Binary State Trees.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ox",
3
3
  "description": "Ethereum Standard Library",
4
- "version": "0.13.2",
4
+ "version": "0.14.1",
5
5
  "main": "./_cjs/index.js",
6
6
  "module": "./_esm/index.js",
7
7
  "types": "./_types/index.d.ts",
@@ -128,6 +128,11 @@
128
128
  "import": "./_esm/core/Base64.js",
129
129
  "default": "./_cjs/core/Base64.js"
130
130
  },
131
+ "./Bech32m": {
132
+ "types": "./_types/core/Bech32m.d.ts",
133
+ "import": "./_esm/core/Bech32m.js",
134
+ "default": "./_cjs/core/Bech32m.js"
135
+ },
131
136
  "./BinaryStateTree": {
132
137
  "types": "./_types/core/BinaryStateTree.d.ts",
133
138
  "import": "./_esm/core/BinaryStateTree.js",
@@ -84,6 +84,19 @@ describe('from', () => {
84
84
  }
85
85
  })
86
86
 
87
+ test('tempo address input', () => {
88
+ const tempoAddr = 'tempo1qzlftsl42n5lep0v2xlxng7cq7sd2k709sxlwnsu'
89
+
90
+ const authorization = AuthorizationTempo.from({
91
+ address: tempoAddr,
92
+ chainId: 1,
93
+ nonce: 40n,
94
+ })
95
+ expect(authorization.address).toBe(
96
+ '0xBE95c3f554e9Fc85ec51bE69a3D807A0D55BCF2C',
97
+ )
98
+ })
99
+
87
100
  test('options: signature (secp256k1)', () => {
88
101
  const authorization = AuthorizationTempo.from({
89
102
  address: '0xbe95c3f554e9fc85ec51be69a3d807a0d55bcf2c',
@@ -1,10 +1,10 @@
1
- import type * as Address from '../core/Address.js'
2
1
  import type * as Errors from '../core/Errors.js'
3
2
  import * as Hash from '../core/Hash.js'
4
3
  import * as Hex from '../core/Hex.js'
5
4
  import type { Compute, Mutable } from '../core/internal/types.js'
6
5
  import * as Rlp from '../core/Rlp.js'
7
6
  import * as SignatureEnvelope from './SignatureEnvelope.js'
7
+ import * as TempoAddress from './TempoAddress.js'
8
8
 
9
9
  /**
10
10
  * Root type for a Tempo Authorization.
@@ -21,7 +21,7 @@ export type AuthorizationTempo<
21
21
  > = Compute<
22
22
  {
23
23
  /** Address of the contract to set as code for the Authority. */
24
- address: Address.Address
24
+ address: TempoAddress.Address
25
25
  /** Chain ID to authorize. */
26
26
  chainId: numberType
27
27
  /** Nonce of the Authority to authorize. */
@@ -100,7 +100,7 @@ export type TupleListSigned = TupleList<true>
100
100
  * import { AuthorizationTempo } from 'ox/tempo'
101
101
  *
102
102
  * const authorization = AuthorizationTempo.from({
103
- * address: '0x1234567890abcdef1234567890abcdef12345678',
103
+ * address: 'tempo1qqfrg4ncjz4ummcjx3t83y9tehh3ydzk0qhcg00y',
104
104
  * chainId: 1,
105
105
  * nonce: 69n,
106
106
  * })
@@ -118,7 +118,7 @@ export type TupleListSigned = TupleList<true>
118
118
  * const privateKey = Secp256k1.randomPrivateKey()
119
119
  *
120
120
  * const authorization = AuthorizationTempo.from({
121
- * address: '0xbe95c3f554e9fc85ec51be69a3d807a0d55bcf2c',
121
+ * address: 'tempo1qzlftsl42n5lep0v2xlxng7cq7sd2k709sxlwnsu',
122
122
  * chainId: 1,
123
123
  * nonce: 40n,
124
124
  * })
@@ -148,7 +148,7 @@ export type TupleListSigned = TupleList<true>
148
148
  * const { privateKey, publicKey } = P256.createKeyPair()
149
149
  *
150
150
  * const authorization = AuthorizationTempo.from({
151
- * address: '0xbe95c3f554e9fc85ec51be69a3d807a0d55bcf2c',
151
+ * address: 'tempo1qzlftsl42n5lep0v2xlxng7cq7sd2k709sxlwnsu',
152
152
  * chainId: 1,
153
153
  * nonce: 40n,
154
154
  * })
@@ -183,7 +183,7 @@ export type TupleListSigned = TupleList<true>
183
183
  * const { privateKey, publicKey } = await WebCryptoP256.createKeyPair()
184
184
  *
185
185
  * const authorization = AuthorizationTempo.from({
186
- * address: '0xbe95c3f554e9fc85ec51be69a3d807a0d55bcf2c',
186
+ * address: 'tempo1qzlftsl42n5lep0v2xlxng7cq7sd2k709sxlwnsu',
187
187
  * chainId: 1,
188
188
  * nonce: 40n,
189
189
  * })
@@ -219,7 +219,7 @@ export type TupleListSigned = TupleList<true>
219
219
  * const credential = await WebAuthnP256.createCredential({ name: 'Example' })
220
220
  *
221
221
  * const authorization = AuthorizationTempo.from({
222
- * address: '0xbe95c3f554e9fc85ec51be69a3d807a0d55bcf2c',
222
+ * address: 'tempo1qzlftsl42n5lep0v2xlxng7cq7sd2k709sxlwnsu',
223
223
  * chainId: 1,
224
224
  * nonce: 40n,
225
225
  * })
@@ -253,10 +253,16 @@ export function from<
253
253
  ): from.ReturnType<authorization, signature> {
254
254
  if (typeof authorization.chainId === 'string')
255
255
  return fromRpc(authorization as Rpc) as never
256
+ const resolved = {
257
+ ...authorization,
258
+ address: TempoAddress.resolve(
259
+ authorization.address as TempoAddress.Address,
260
+ ),
261
+ }
256
262
  if (options.signature) {
257
- return { ...authorization, signature: options.signature } as never
263
+ return { ...resolved, signature: options.signature } as never
258
264
  }
259
- return authorization as never
265
+ return resolved as never
260
266
  }
261
267
 
262
268
  export declare namespace from {
@@ -294,7 +300,7 @@ export declare namespace from {
294
300
  * import { AuthorizationTempo } from 'ox/tempo'
295
301
  *
296
302
  * const authorization = AuthorizationTempo.fromRpc({
297
- * address: '0x0000000000000000000000000000000000000000',
303
+ * address: 'tempo1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj97hme',
298
304
  * chainId: '0x1',
299
305
  * nonce: '0x1',
300
306
  * signature: {
@@ -332,7 +338,7 @@ export declare namespace fromRpc {
332
338
  * import { AuthorizationTempo } from 'ox/tempo'
333
339
  *
334
340
  * const authorizationList = AuthorizationTempo.fromRpcList([{
335
- * address: '0x0000000000000000000000000000000000000000',
341
+ * address: 'tempo1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj97hme',
336
342
  * chainId: '0x1',
337
343
  * nonce: '0x1',
338
344
  * signature: {
@@ -516,7 +522,7 @@ export declare namespace fromTupleList {
516
522
  * const privateKey = Secp256k1.randomPrivateKey()
517
523
  *
518
524
  * const authorization = AuthorizationTempo.from({
519
- * address: '0x1234567890abcdef1234567890abcdef12345678',
525
+ * address: 'tempo1qqfrg4ncjz4ummcjx3t83y9tehh3ydzk0qhcg00y',
520
526
  * chainId: 1,
521
527
  * nonce: 69n,
522
528
  * })
@@ -544,7 +550,7 @@ export declare namespace fromTupleList {
544
550
  * const { privateKey, publicKey } = P256.createKeyPair()
545
551
  *
546
552
  * const authorization = AuthorizationTempo.from({
547
- * address: '0x1234567890abcdef1234567890abcdef12345678',
553
+ * address: 'tempo1qqfrg4ncjz4ummcjx3t83y9tehh3ydzk0qhcg00y',
548
554
  * chainId: 1,
549
555
  * nonce: 69n,
550
556
  * })
@@ -577,7 +583,7 @@ export declare namespace fromTupleList {
577
583
  * const { privateKey, publicKey } = await WebCryptoP256.createKeyPair()
578
584
  *
579
585
  * const authorization = AuthorizationTempo.from({
580
- * address: '0x1234567890abcdef1234567890abcdef12345678',
586
+ * address: 'tempo1qqfrg4ncjz4ummcjx3t83y9tehh3ydzk0qhcg00y',
581
587
  * chainId: 1,
582
588
  * nonce: 69n,
583
589
  * })
@@ -611,7 +617,7 @@ export declare namespace fromTupleList {
611
617
  * const credential = await WebAuthnP256.createCredential({ name: 'Example' })
612
618
  *
613
619
  * const authorization = AuthorizationTempo.from({
614
- * address: '0x1234567890abcdef1234567890abcdef12345678',
620
+ * address: 'tempo1qqfrg4ncjz4ummcjx3t83y9tehh3ydzk0qhcg00y',
615
621
  * chainId: 1,
616
622
  * nonce: 69n,
617
623
  * })
@@ -652,7 +658,7 @@ export declare namespace getSignPayload {
652
658
  * import { AuthorizationTempo } from 'ox/tempo'
653
659
  *
654
660
  * const authorization = AuthorizationTempo.from({
655
- * address: '0x1234567890abcdef1234567890abcdef12345678',
661
+ * address: 'tempo1qqfrg4ncjz4ummcjx3t83y9tehh3ydzk0qhcg00y',
656
662
  * chainId: 1,
657
663
  * nonce: 69n,
658
664
  * })
@@ -708,7 +714,7 @@ export declare namespace hash {
708
714
  * import { AuthorizationTempo } from 'ox/tempo'
709
715
  *
710
716
  * const authorization = AuthorizationTempo.toRpc({
711
- * address: '0x0000000000000000000000000000000000000000',
717
+ * address: 'tempo1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj97hme',
712
718
  * chainId: 1,
713
719
  * nonce: 1n,
714
720
  * signature: {
@@ -748,7 +754,7 @@ export declare namespace toRpc {
748
754
  * import { AuthorizationTempo } from 'ox/tempo'
749
755
  *
750
756
  * const authorization = AuthorizationTempo.toRpcList([{
751
- * address: '0x0000000000000000000000000000000000000000',
757
+ * address: 'tempo1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj97hme',
752
758
  * chainId: 1,
753
759
  * nonce: 1n,
754
760
  * signature: {
@@ -781,7 +787,7 @@ export declare namespace toRpcList {
781
787
  * import { AuthorizationTempo } from 'ox/tempo'
782
788
  *
783
789
  * const authorization = AuthorizationTempo.from({
784
- * address: '0x1234567890abcdef1234567890abcdef12345678',
790
+ * address: 'tempo1qqfrg4ncjz4ummcjx3t83y9tehh3ydzk0qhcg00y',
785
791
  * chainId: 1,
786
792
  * nonce: 69n,
787
793
  * })
@@ -830,12 +836,12 @@ export declare namespace toTuple {
830
836
  * import { AuthorizationTempo } from 'ox/tempo'
831
837
  *
832
838
  * const authorization_1 = AuthorizationTempo.from({
833
- * address: '0x1234567890abcdef1234567890abcdef12345678',
839
+ * address: 'tempo1qqfrg4ncjz4ummcjx3t83y9tehh3ydzk0qhcg00y',
834
840
  * chainId: 1,
835
841
  * nonce: 69n,
836
842
  * })
837
843
  * const authorization_2 = AuthorizationTempo.from({
838
- * address: '0x1234567890abcdef1234567890abcdef12345678',
844
+ * address: 'tempo1qqfrg4ncjz4ummcjx3t83y9tehh3ydzk0qhcg00y',
839
845
  * chainId: 3,
840
846
  * nonce: 20n,
841
847
  * })