tempo.ts 0.10.5 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (224) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +0 -41
  3. package/dist/viem/Account.d.ts +8 -3
  4. package/dist/viem/Account.d.ts.map +1 -1
  5. package/dist/viem/Account.js +9 -2
  6. package/dist/viem/Account.js.map +1 -1
  7. package/dist/viem/Actions/amm.d.ts +1 -1
  8. package/dist/viem/Actions/amm.d.ts.map +1 -1
  9. package/dist/viem/Actions/amm.js +1 -2
  10. package/dist/viem/Actions/amm.js.map +1 -1
  11. package/dist/viem/Actions/dex.d.ts +0 -35
  12. package/dist/viem/Actions/dex.d.ts.map +1 -1
  13. package/dist/viem/Actions/dex.js +0 -43
  14. package/dist/viem/Actions/dex.js.map +1 -1
  15. package/dist/viem/Actions/fee.d.ts +1 -1
  16. package/dist/viem/Actions/fee.d.ts.map +1 -1
  17. package/dist/viem/Actions/fee.js +1 -1
  18. package/dist/viem/Actions/fee.js.map +1 -1
  19. package/dist/viem/Actions/nonce.d.ts.map +1 -1
  20. package/dist/viem/Actions/nonce.js +6 -4
  21. package/dist/viem/Actions/nonce.js.map +1 -1
  22. package/dist/viem/Actions/token.d.ts +1 -2
  23. package/dist/viem/Actions/token.d.ts.map +1 -1
  24. package/dist/viem/Actions/token.js +1 -2
  25. package/dist/viem/Actions/token.js.map +1 -1
  26. package/dist/viem/Chain.d.ts +34 -34
  27. package/dist/viem/Chain.d.ts.map +1 -1
  28. package/dist/viem/Chain.js +2 -0
  29. package/dist/viem/Chain.js.map +1 -1
  30. package/dist/viem/Formatters.d.ts.map +1 -1
  31. package/dist/viem/Formatters.js +5 -3
  32. package/dist/viem/Formatters.js.map +1 -1
  33. package/dist/viem/Transaction.d.ts +8 -5
  34. package/dist/viem/Transaction.d.ts.map +1 -1
  35. package/dist/viem/Transaction.js +13 -3
  36. package/dist/viem/Transaction.js.map +1 -1
  37. package/dist/viem/internal/types.d.ts +1 -1
  38. package/dist/viem/internal/types.d.ts.map +1 -1
  39. package/dist/wagmi/Actions/dex.d.ts +1 -45
  40. package/dist/wagmi/Actions/dex.d.ts.map +1 -1
  41. package/dist/wagmi/Actions/dex.js +0 -55
  42. package/dist/wagmi/Actions/dex.js.map +1 -1
  43. package/dist/wagmi/Connector.d.ts +1 -1
  44. package/dist/wagmi/Connector.d.ts.map +1 -1
  45. package/dist/wagmi/Connector.js +1 -2
  46. package/dist/wagmi/Connector.js.map +1 -1
  47. package/dist/wagmi/Hooks/dex.d.ts +3 -46
  48. package/dist/wagmi/Hooks/dex.d.ts.map +1 -1
  49. package/dist/wagmi/Hooks/dex.js +2 -54
  50. package/dist/wagmi/Hooks/dex.js.map +1 -1
  51. package/dist/wagmi/index.d.ts +1 -1
  52. package/dist/wagmi/index.d.ts.map +1 -1
  53. package/dist/wagmi/index.js +1 -1
  54. package/dist/wagmi/index.js.map +1 -1
  55. package/package.json +5 -23
  56. package/src/viem/Account.test.ts +1 -1
  57. package/src/viem/Account.ts +11 -2
  58. package/src/viem/Actions/account.ts +1 -1
  59. package/src/viem/Actions/amm.ts +1 -2
  60. package/src/viem/Actions/dex.test.ts +1 -195
  61. package/src/viem/Actions/dex.ts +0 -53
  62. package/src/viem/Actions/fee.test.ts +2 -2
  63. package/src/viem/Actions/fee.ts +1 -1
  64. package/src/viem/Actions/nonce.test.ts +27 -14
  65. package/src/viem/Actions/nonce.ts +6 -4
  66. package/src/viem/Actions/token.test.ts +18 -52
  67. package/src/viem/Actions/token.ts +1 -2
  68. package/src/viem/Chain.ts +3 -1
  69. package/src/viem/Decorator.ts +0 -30
  70. package/src/viem/Formatters.ts +9 -3
  71. package/src/viem/Transaction.ts +23 -7
  72. package/src/viem/e2e.test.ts +19 -0
  73. package/src/viem/index.ts +12 -1
  74. package/src/viem/internal/types.ts +1 -1
  75. package/src/wagmi/Actions/dex.test.ts +0 -26
  76. package/src/wagmi/Actions/dex.ts +1 -111
  77. package/src/wagmi/Actions/nonce.test.ts +8 -4
  78. package/src/wagmi/Actions/token.test.ts +2 -2
  79. package/src/wagmi/Connector.ts +1 -2
  80. package/src/wagmi/Hooks/dex.test.ts +0 -26
  81. package/src/wagmi/Hooks/dex.ts +1 -88
  82. package/src/wagmi/Hooks/nonce.test.ts +3 -3
  83. package/src/wagmi/index.ts +4 -1
  84. package/dist/chains.d.ts +0 -73
  85. package/dist/chains.d.ts.map +0 -1
  86. package/dist/chains.js +0 -51
  87. package/dist/chains.js.map +0 -1
  88. package/dist/ox/AuthorizationTempo.d.ts +0 -450
  89. package/dist/ox/AuthorizationTempo.d.ts.map +0 -1
  90. package/dist/ox/AuthorizationTempo.js +0 -433
  91. package/dist/ox/AuthorizationTempo.js.map +0 -1
  92. package/dist/ox/KeyAuthorization.d.ts +0 -356
  93. package/dist/ox/KeyAuthorization.d.ts.map +0 -1
  94. package/dist/ox/KeyAuthorization.js +0 -359
  95. package/dist/ox/KeyAuthorization.js.map +0 -1
  96. package/dist/ox/Order.d.ts +0 -92
  97. package/dist/ox/Order.d.ts.map +0 -1
  98. package/dist/ox/Order.js +0 -88
  99. package/dist/ox/Order.js.map +0 -1
  100. package/dist/ox/OrdersFilters.d.ts +0 -72
  101. package/dist/ox/OrdersFilters.d.ts.map +0 -1
  102. package/dist/ox/OrdersFilters.js +0 -100
  103. package/dist/ox/OrdersFilters.js.map +0 -1
  104. package/dist/ox/Pagination.d.ts +0 -128
  105. package/dist/ox/Pagination.d.ts.map +0 -1
  106. package/dist/ox/Pagination.js +0 -78
  107. package/dist/ox/Pagination.js.map +0 -1
  108. package/dist/ox/PoolId.d.ts +0 -18
  109. package/dist/ox/PoolId.d.ts.map +0 -1
  110. package/dist/ox/PoolId.js +0 -13
  111. package/dist/ox/PoolId.js.map +0 -1
  112. package/dist/ox/RpcSchema.d.ts +0 -32
  113. package/dist/ox/RpcSchema.d.ts.map +0 -1
  114. package/dist/ox/RpcSchema.js +0 -2
  115. package/dist/ox/RpcSchema.js.map +0 -1
  116. package/dist/ox/SignatureEnvelope.d.ts +0 -260
  117. package/dist/ox/SignatureEnvelope.d.ts.map +0 -1
  118. package/dist/ox/SignatureEnvelope.js +0 -477
  119. package/dist/ox/SignatureEnvelope.js.map +0 -1
  120. package/dist/ox/Tick.d.ts +0 -115
  121. package/dist/ox/Tick.d.ts.map +0 -1
  122. package/dist/ox/Tick.js +0 -127
  123. package/dist/ox/Tick.js.map +0 -1
  124. package/dist/ox/TokenId.d.ts +0 -25
  125. package/dist/ox/TokenId.d.ts.map +0 -1
  126. package/dist/ox/TokenId.js +0 -41
  127. package/dist/ox/TokenId.js.map +0 -1
  128. package/dist/ox/TokenRole.d.ts +0 -11
  129. package/dist/ox/TokenRole.d.ts.map +0 -1
  130. package/dist/ox/TokenRole.js +0 -22
  131. package/dist/ox/TokenRole.js.map +0 -1
  132. package/dist/ox/Transaction.d.ts +0 -201
  133. package/dist/ox/Transaction.d.ts.map +0 -1
  134. package/dist/ox/Transaction.js +0 -167
  135. package/dist/ox/Transaction.js.map +0 -1
  136. package/dist/ox/TransactionEnvelopeTempo.d.ts +0 -470
  137. package/dist/ox/TransactionEnvelopeTempo.d.ts.map +0 -1
  138. package/dist/ox/TransactionEnvelopeTempo.js +0 -547
  139. package/dist/ox/TransactionEnvelopeTempo.js.map +0 -1
  140. package/dist/ox/TransactionReceipt.d.ts +0 -155
  141. package/dist/ox/TransactionReceipt.d.ts.map +0 -1
  142. package/dist/ox/TransactionReceipt.js +0 -136
  143. package/dist/ox/TransactionReceipt.js.map +0 -1
  144. package/dist/ox/TransactionRequest.d.ts +0 -76
  145. package/dist/ox/TransactionRequest.d.ts.map +0 -1
  146. package/dist/ox/TransactionRequest.js +0 -93
  147. package/dist/ox/TransactionRequest.js.map +0 -1
  148. package/dist/ox/index.d.ts +0 -14
  149. package/dist/ox/index.d.ts.map +0 -1
  150. package/dist/ox/index.js +0 -14
  151. package/dist/ox/index.js.map +0 -1
  152. package/dist/prool/Instance.d.ts +0 -101
  153. package/dist/prool/Instance.d.ts.map +0 -1
  154. package/dist/prool/Instance.js +0 -136
  155. package/dist/prool/Instance.js.map +0 -1
  156. package/dist/prool/chain.json +0 -238
  157. package/dist/prool/index.d.ts +0 -2
  158. package/dist/prool/index.d.ts.map +0 -1
  159. package/dist/prool/index.js +0 -2
  160. package/dist/prool/index.js.map +0 -1
  161. package/dist/viem/Actions/account.d.ts +0 -40
  162. package/dist/viem/Actions/account.d.ts.map +0 -1
  163. package/dist/viem/Actions/account.js +0 -86
  164. package/dist/viem/Actions/account.js.map +0 -1
  165. package/dist/viem/Actions/index.d.ts +0 -10
  166. package/dist/viem/Actions/index.d.ts.map +0 -1
  167. package/dist/viem/Actions/index.js +0 -10
  168. package/dist/viem/Actions/index.js.map +0 -1
  169. package/dist/viem/Decorator.d.ts +0 -2810
  170. package/dist/viem/Decorator.d.ts.map +0 -1
  171. package/dist/viem/Decorator.js +0 -138
  172. package/dist/viem/Decorator.js.map +0 -1
  173. package/dist/viem/P256.d.ts +0 -2
  174. package/dist/viem/P256.d.ts.map +0 -1
  175. package/dist/viem/P256.js +0 -2
  176. package/dist/viem/P256.js.map +0 -1
  177. package/dist/viem/Secp256k1.d.ts +0 -2
  178. package/dist/viem/Secp256k1.d.ts.map +0 -1
  179. package/dist/viem/Secp256k1.js +0 -2
  180. package/dist/viem/Secp256k1.js.map +0 -1
  181. package/dist/viem/TokenIds.d.ts +0 -2
  182. package/dist/viem/TokenIds.d.ts.map +0 -1
  183. package/dist/viem/TokenIds.js +0 -2
  184. package/dist/viem/TokenIds.js.map +0 -1
  185. package/dist/viem/index.d.ts +0 -17
  186. package/dist/viem/index.d.ts.map +0 -1
  187. package/dist/viem/index.js +0 -17
  188. package/dist/viem/index.js.map +0 -1
  189. package/src/ox/AuthorizationTempo.test.ts +0 -1256
  190. package/src/ox/AuthorizationTempo.ts +0 -648
  191. package/src/ox/KeyAuthorization.test.ts +0 -1332
  192. package/src/ox/KeyAuthorization.ts +0 -540
  193. package/src/ox/Order.test.ts +0 -78
  194. package/src/ox/Order.ts +0 -125
  195. package/src/ox/OrdersFilters.test.ts +0 -182
  196. package/src/ox/OrdersFilters.ts +0 -125
  197. package/src/ox/Pagination.test.ts +0 -162
  198. package/src/ox/Pagination.ts +0 -164
  199. package/src/ox/PoolId.test.ts +0 -33
  200. package/src/ox/PoolId.ts +0 -27
  201. package/src/ox/RpcSchema.ts +0 -35
  202. package/src/ox/SignatureEnvelope.test.ts +0 -1876
  203. package/src/ox/SignatureEnvelope.ts +0 -791
  204. package/src/ox/Tick.test.ts +0 -281
  205. package/src/ox/Tick.ts +0 -181
  206. package/src/ox/TokenId.test.ts +0 -40
  207. package/src/ox/TokenId.ts +0 -50
  208. package/src/ox/TokenRole.test.ts +0 -16
  209. package/src/ox/TokenRole.ts +0 -27
  210. package/src/ox/Transaction.test.ts +0 -523
  211. package/src/ox/Transaction.ts +0 -332
  212. package/src/ox/TransactionEnvelopeTempo.test.ts +0 -1352
  213. package/src/ox/TransactionEnvelopeTempo.ts +0 -905
  214. package/src/ox/TransactionReceipt.ts +0 -190
  215. package/src/ox/TransactionRequest.ts +0 -147
  216. package/src/ox/e2e.test.ts +0 -1393
  217. package/src/ox/index.ts +0 -13
  218. package/src/prool/Instance.test.ts +0 -43
  219. package/src/prool/Instance.ts +0 -247
  220. package/src/prool/chain.json +0 -238
  221. package/src/prool/index.ts +0 -1
  222. package/src/viem/Actions/__snapshots__/dex.test.ts.snap +0 -850
  223. package/src/wagmi/Actions/__snapshots__/dex.test.ts.snap +0 -310
  224. package/src/wagmi/Hooks/__snapshots__/dex.test.ts.snap +0 -457
@@ -1,155 +0,0 @@
1
- import type * as Address from 'ox/Address';
2
- import type * as Hex from 'ox/Hex';
3
- import * as ox_TransactionReceipt from 'ox/TransactionReceipt';
4
- import type { Compute } from '../internal/types.js';
5
- export type TransactionReceipt<status = ox_TransactionReceipt.Status, type = ox_TransactionReceipt.Type, bigintType = bigint, numberType = number> = Compute<ox_TransactionReceipt.TransactionReceipt<status, type, bigintType, numberType> & {
6
- /** Address of the fee payer. */
7
- feePayer?: Address.Address | undefined;
8
- /** Address of the fee token. */
9
- feeToken?: Address.Address | undefined;
10
- }>;
11
- export type Rpc = TransactionReceipt<ox_TransactionReceipt.RpcStatus, ox_TransactionReceipt.RpcType, Hex.Hex, Hex.Hex>;
12
- export type Type = 'tempo' | ox_TransactionReceipt.Type;
13
- export type RpcType = '0x76' | ox_TransactionReceipt.RpcType;
14
- export type Status = ox_TransactionReceipt.Status;
15
- export type RpcStatus = ox_TransactionReceipt.RpcStatus;
16
- /** RPC type to type mapping. */
17
- export declare const fromRpcType: {
18
- readonly '0x76': "tempo";
19
- readonly '0x0': "legacy";
20
- readonly '0x1': "eip2930";
21
- readonly '0x2': "eip1559";
22
- readonly '0x3': "eip4844";
23
- readonly '0x4': "eip7702";
24
- };
25
- /** Type to RPC type mapping. */
26
- export declare const toRpcType: {
27
- readonly tempo: "0x76";
28
- readonly legacy: "0x0";
29
- readonly eip2930: "0x1";
30
- readonly eip1559: "0x2";
31
- readonly eip4844: "0x3";
32
- readonly eip7702: "0x4";
33
- };
34
- /**
35
- * Converts an RPC receipt to a TransactionReceipt.
36
- *
37
- * @example
38
- * ```ts twoslash
39
- * import { TransactionReceipt } from 'ox/tempo'
40
- *
41
- * const receipt = TransactionReceipt.fromRpc({
42
- * blobGasPrice: '0x42069',
43
- * blobGasUsed: '0x1337',
44
- * blockHash:
45
- * '0xc350d807505fb835650f0013632c5515592987ba169bbc6626d9fc54d91f0f0b',
46
- * blockNumber: '0x12f296f',
47
- * contractAddress: null,
48
- * cumulativeGasUsed: '0x82515',
49
- * effectiveGasPrice: '0x21c2f6c09',
50
- * feePayer: '0x814e5e0e31016b9a7f138c76b7e7b2bb5c1ab6a6',
51
- * feeToken: '0x20c0000000000000000000000000000000000001',
52
- * from: '0x814e5e0e31016b9a7f138c76b7e7b2bb5c1ab6a6',
53
- * gasUsed: '0x2abba',
54
- * logs: [],
55
- * logsBloom:
56
- * '0x00200000000000000000008080000000000000000040000000000000000000000000000000000000000000000000000022000000080000000000000000000000000000080000000000000008000000200000000000000000000200008020400000000000000000280000000000100000000000000000000000000010000000000000000000020000000000000020000000000001000000080000004000000000000000000000000000000000000000000000400000000000001000000000000000000002000000000000000020000000000000000000001000000000000000000000200000000000000000000000000000001000000000c00000000000000000',
57
- * status: '0x1',
58
- * to: '0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad',
59
- * transactionHash:
60
- * '0x353fdfc38a2f26115daadee9f5b8392ce62b84f410957967e2ed56b35338cdd0',
61
- * transactionIndex: '0x2',
62
- * type: '0x2',
63
- * })
64
- * // @log: {
65
- * // @log: blobGasPrice: 270441n,
66
- * // @log: blobGasUsed: 4919n,
67
- * // @log: blockHash: "0xc350d807505fb835650f0013632c5515592987ba169bbc6626d9fc54d91f0f0b",
68
- * // @log: blockNumber: 19868015n,
69
- * // @log: contractAddress: null,
70
- * // @log: cumulativeGasUsed: 533781n,
71
- * // @log: effectiveGasPrice: 9062804489n,
72
- * // @log: feePayer: "0x814e5e0e31016b9a7f138c76b7e7b2bb5c1ab6a6",
73
- * // @log: feeToken: "0x20c0000000000000000000000000000000000001",
74
- * // @log: from: "0x814e5e0e31016b9a7f138c76b7e7b2bb5c1ab6a6",
75
- * // @log: gasUsed: 175034n,
76
- * // @log: logs: [],
77
- * // @log: logsBloom: "0x00200000000000000000008080000000000000000040000000000000000000000000000000000000000000000000000022000000080000000000000000000000000000080000000000000008000000200000000000000000000200008020400000000000000000280000000000100000000000000000000000000010000000000000000000020000000000000020000000000001000000080000004000000000000000000000000000000000000000000000400000000000001000000000000000000002000000000000000020000000000000000000001000000000000000000000200000000000000000000000000000001000000000c00000000000000000",
78
- * // @log: root: undefined,
79
- * // @log: status: "success",
80
- * // @log: to: "0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",
81
- * // @log: transactionHash: "0x353fdfc38a2f26115daadee9f5b8392ce62b84f410957967e2ed56b35338cdd0",
82
- * // @log: transactionIndex: 2,
83
- * // @log: type: "eip1559",
84
- * // @log: }
85
- * ```
86
- *
87
- * @param receipt - The RPC receipt to convert.
88
- * @returns A TransactionReceipt.
89
- */
90
- export declare function fromRpc<const receipt extends Rpc | null>(receipt: receipt | Rpc | null): receipt extends Rpc ? TransactionReceipt : null;
91
- export declare namespace fromRpc {
92
- type ErrorType = ox_TransactionReceipt.fromRpc.ErrorType;
93
- }
94
- /**
95
- * Converts a TransactionReceipt to an RPC receipt.
96
- *
97
- * @example
98
- * ```ts twoslash
99
- * import { TransactionReceipt } from 'ox/tempo'
100
- *
101
- * const receipt = TransactionReceipt.toRpc({
102
- * blobGasPrice: 270441n,
103
- * blobGasUsed: 4919n,
104
- * blockHash:
105
- * '0xc350d807505fb835650f0013632c5515592987ba169bbc6626d9fc54d91f0f0b',
106
- * blockNumber: 19868015n,
107
- * contractAddress: null,
108
- * cumulativeGasUsed: 533781n,
109
- * effectiveGasPrice: 9062804489n,
110
- * feePayer: '0x814e5e0e31016b9a7f138c76b7e7b2bb5c1ab6a6',
111
- * feeToken: '0x20c0000000000000000000000000000000000001',
112
- * from: '0x814e5e0e31016b9a7f138c76b7e7b2bb5c1ab6a6',
113
- * gasUsed: 175034n,
114
- * logs: [],
115
- * logsBloom:
116
- * '0x00200000000000000000008080000000000000000040000000000000000000000000000000000000000000000000000022000000080000000000000000000000000000080000000000000008000000200000000000000000000200008020400000000000000000280000000000100000000000000000000000000010000000000000000000020000000000000020000000000001000000080000004000000000000000000000000000000000000000000000400000000000001000000000000000000002000000000000000020000000000000000000001000000000000000000000200000000000000000000000000000001000000000c00000000000000000',
117
- * root: undefined,
118
- * status: 'success',
119
- * to: '0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad',
120
- * transactionHash:
121
- * '0x353fdfc38a2f26115daadee9f5b8392ce62b84f410957967e2ed56b35338cdd0',
122
- * transactionIndex: 2,
123
- * type: 'eip1559',
124
- * })
125
- * // @log: {
126
- * // @log: blobGasPrice: "0x042069",
127
- * // @log: blobGasUsed: "0x1337",
128
- * // @log: blockHash: "0xc350d807505fb835650f0013632c5515592987ba169bbc6626d9fc54d91f0f0b",
129
- * // @log: blockNumber: "0x012f296f",
130
- * // @log: contractAddress: null,
131
- * // @log: cumulativeGasUsed: "0x082515",
132
- * // @log: effectiveGasPrice: "0x021c2f6c09",
133
- * // @log: feePayer: "0x814e5e0e31016b9a7f138c76b7e7b2bb5c1ab6a6",
134
- * // @log: feeToken: "0x20c0000000000000000000000000000000000001",
135
- * // @log: from: "0x814e5e0e31016b9a7f138c76b7e7b2bb5c1ab6a6",
136
- * // @log: gasUsed: "0x02abba",
137
- * // @log: logs: [],
138
- * // @log: logsBloom: "0x00200000000000000000008080000000000000000040000000000000000000000000000000000000000000000000000022000000080000000000000000000000000000080000000000000008000000200000000000000000000200008020400000000000000000280000000000100000000000000000000000000010000000000000000000020000000000000020000000000001000000080000004000000000000000000000000000000000000000000000400000000000001000000000000000000002000000000000000020000000000000000000001000000000000000000000200000000000000000000000000000001000000000c00000000000000000",
139
- * // @log: root: undefined,
140
- * // @log: status: "0x1",
141
- * // @log: to: "0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",
142
- * // @log: transactionHash: "0x353fdfc38a2f26115daadee9f5b8392ce62b84f410957967e2ed56b35338cdd0",
143
- * // @log: transactionIndex: "0x02",
144
- * // @log: type: "eip1559",
145
- * // @log: }
146
- * ```
147
- *
148
- * @param receipt - The receipt to convert.
149
- * @returns An RPC receipt.
150
- */
151
- export declare function toRpc(receipt: TransactionReceipt): Rpc;
152
- export declare namespace toRpc {
153
- type ErrorType = ox_TransactionReceipt.toRpc.ErrorType;
154
- }
155
- //# sourceMappingURL=TransactionReceipt.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TransactionReceipt.d.ts","sourceRoot":"","sources":["../../src/ox/TransactionReceipt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,OAAO,MAAM,YAAY,CAAA;AAC1C,OAAO,KA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AO,EAAE,OAAO,GAAG,GAAG,GAAG,IAAI,GAC5B,OAAO,SAAS,GAAG,GAAG,kBAAkB,GAAG,IAAI,CAIjD;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,KAAY,SAAS,GAAG,qBAAqB,CAAC,OAAO,CAAC,SAAS,CAAA;CAChE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,wBAAgB,KAAK,CAAC,OAAO,EAAE,kBAAkB,GAAG,GAAG,CAStD;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,KAAY,SAAS,GAAG,qBAAqB,CAAC,KAAK,CAAC,SAAS,CAAA;CAC9D"}
@@ -1,136 +0,0 @@
1
- import * as ox_TransactionReceipt from 'ox/TransactionReceipt';
2
- /** RPC type to type mapping. */
3
- export const fromRpcType = {
4
- ...ox_TransactionReceipt.fromRpcType,
5
- '0x76': 'tempo',
6
- };
7
- /** Type to RPC type mapping. */
8
- export const toRpcType = {
9
- ...ox_TransactionReceipt.toRpcType,
10
- tempo: '0x76',
11
- };
12
- /**
13
- * Converts an RPC receipt to a TransactionReceipt.
14
- *
15
- * @example
16
- * ```ts twoslash
17
- * import { TransactionReceipt } from 'ox/tempo'
18
- *
19
- * const receipt = TransactionReceipt.fromRpc({
20
- * blobGasPrice: '0x42069',
21
- * blobGasUsed: '0x1337',
22
- * blockHash:
23
- * '0xc350d807505fb835650f0013632c5515592987ba169bbc6626d9fc54d91f0f0b',
24
- * blockNumber: '0x12f296f',
25
- * contractAddress: null,
26
- * cumulativeGasUsed: '0x82515',
27
- * effectiveGasPrice: '0x21c2f6c09',
28
- * feePayer: '0x814e5e0e31016b9a7f138c76b7e7b2bb5c1ab6a6',
29
- * feeToken: '0x20c0000000000000000000000000000000000001',
30
- * from: '0x814e5e0e31016b9a7f138c76b7e7b2bb5c1ab6a6',
31
- * gasUsed: '0x2abba',
32
- * logs: [],
33
- * logsBloom:
34
- * '0x00200000000000000000008080000000000000000040000000000000000000000000000000000000000000000000000022000000080000000000000000000000000000080000000000000008000000200000000000000000000200008020400000000000000000280000000000100000000000000000000000000010000000000000000000020000000000000020000000000001000000080000004000000000000000000000000000000000000000000000400000000000001000000000000000000002000000000000000020000000000000000000001000000000000000000000200000000000000000000000000000001000000000c00000000000000000',
35
- * status: '0x1',
36
- * to: '0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad',
37
- * transactionHash:
38
- * '0x353fdfc38a2f26115daadee9f5b8392ce62b84f410957967e2ed56b35338cdd0',
39
- * transactionIndex: '0x2',
40
- * type: '0x2',
41
- * })
42
- * // @log: {
43
- * // @log: blobGasPrice: 270441n,
44
- * // @log: blobGasUsed: 4919n,
45
- * // @log: blockHash: "0xc350d807505fb835650f0013632c5515592987ba169bbc6626d9fc54d91f0f0b",
46
- * // @log: blockNumber: 19868015n,
47
- * // @log: contractAddress: null,
48
- * // @log: cumulativeGasUsed: 533781n,
49
- * // @log: effectiveGasPrice: 9062804489n,
50
- * // @log: feePayer: "0x814e5e0e31016b9a7f138c76b7e7b2bb5c1ab6a6",
51
- * // @log: feeToken: "0x20c0000000000000000000000000000000000001",
52
- * // @log: from: "0x814e5e0e31016b9a7f138c76b7e7b2bb5c1ab6a6",
53
- * // @log: gasUsed: 175034n,
54
- * // @log: logs: [],
55
- * // @log: logsBloom: "0x00200000000000000000008080000000000000000040000000000000000000000000000000000000000000000000000022000000080000000000000000000000000000080000000000000008000000200000000000000000000200008020400000000000000000280000000000100000000000000000000000000010000000000000000000020000000000000020000000000001000000080000004000000000000000000000000000000000000000000000400000000000001000000000000000000002000000000000000020000000000000000000001000000000000000000000200000000000000000000000000000001000000000c00000000000000000",
56
- * // @log: root: undefined,
57
- * // @log: status: "success",
58
- * // @log: to: "0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",
59
- * // @log: transactionHash: "0x353fdfc38a2f26115daadee9f5b8392ce62b84f410957967e2ed56b35338cdd0",
60
- * // @log: transactionIndex: 2,
61
- * // @log: type: "eip1559",
62
- * // @log: }
63
- * ```
64
- *
65
- * @param receipt - The RPC receipt to convert.
66
- * @returns A TransactionReceipt.
67
- */
68
- export function fromRpc(receipt) {
69
- return ox_TransactionReceipt.fromRpc(receipt);
70
- }
71
- /**
72
- * Converts a TransactionReceipt to an RPC receipt.
73
- *
74
- * @example
75
- * ```ts twoslash
76
- * import { TransactionReceipt } from 'ox/tempo'
77
- *
78
- * const receipt = TransactionReceipt.toRpc({
79
- * blobGasPrice: 270441n,
80
- * blobGasUsed: 4919n,
81
- * blockHash:
82
- * '0xc350d807505fb835650f0013632c5515592987ba169bbc6626d9fc54d91f0f0b',
83
- * blockNumber: 19868015n,
84
- * contractAddress: null,
85
- * cumulativeGasUsed: 533781n,
86
- * effectiveGasPrice: 9062804489n,
87
- * feePayer: '0x814e5e0e31016b9a7f138c76b7e7b2bb5c1ab6a6',
88
- * feeToken: '0x20c0000000000000000000000000000000000001',
89
- * from: '0x814e5e0e31016b9a7f138c76b7e7b2bb5c1ab6a6',
90
- * gasUsed: 175034n,
91
- * logs: [],
92
- * logsBloom:
93
- * '0x00200000000000000000008080000000000000000040000000000000000000000000000000000000000000000000000022000000080000000000000000000000000000080000000000000008000000200000000000000000000200008020400000000000000000280000000000100000000000000000000000000010000000000000000000020000000000000020000000000001000000080000004000000000000000000000000000000000000000000000400000000000001000000000000000000002000000000000000020000000000000000000001000000000000000000000200000000000000000000000000000001000000000c00000000000000000',
94
- * root: undefined,
95
- * status: 'success',
96
- * to: '0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad',
97
- * transactionHash:
98
- * '0x353fdfc38a2f26115daadee9f5b8392ce62b84f410957967e2ed56b35338cdd0',
99
- * transactionIndex: 2,
100
- * type: 'eip1559',
101
- * })
102
- * // @log: {
103
- * // @log: blobGasPrice: "0x042069",
104
- * // @log: blobGasUsed: "0x1337",
105
- * // @log: blockHash: "0xc350d807505fb835650f0013632c5515592987ba169bbc6626d9fc54d91f0f0b",
106
- * // @log: blockNumber: "0x012f296f",
107
- * // @log: contractAddress: null,
108
- * // @log: cumulativeGasUsed: "0x082515",
109
- * // @log: effectiveGasPrice: "0x021c2f6c09",
110
- * // @log: feePayer: "0x814e5e0e31016b9a7f138c76b7e7b2bb5c1ab6a6",
111
- * // @log: feeToken: "0x20c0000000000000000000000000000000000001",
112
- * // @log: from: "0x814e5e0e31016b9a7f138c76b7e7b2bb5c1ab6a6",
113
- * // @log: gasUsed: "0x02abba",
114
- * // @log: logs: [],
115
- * // @log: logsBloom: "0x00200000000000000000008080000000000000000040000000000000000000000000000000000000000000000000000022000000080000000000000000000000000000080000000000000008000000200000000000000000000200008020400000000000000000280000000000100000000000000000000000000010000000000000000000020000000000000020000000000001000000080000004000000000000000000000000000000000000000000000400000000000001000000000000000000002000000000000000020000000000000000000001000000000000000000000200000000000000000000000000000001000000000c00000000000000000",
116
- * // @log: root: undefined,
117
- * // @log: status: "0x1",
118
- * // @log: to: "0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",
119
- * // @log: transactionHash: "0x353fdfc38a2f26115daadee9f5b8392ce62b84f410957967e2ed56b35338cdd0",
120
- * // @log: transactionIndex: "0x02",
121
- * // @log: type: "eip1559",
122
- * // @log: }
123
- * ```
124
- *
125
- * @param receipt - The receipt to convert.
126
- * @returns An RPC receipt.
127
- */
128
- export function toRpc(receipt) {
129
- const rpc = ox_TransactionReceipt.toRpc(receipt);
130
- return {
131
- ...rpc,
132
- feePayer: receipt.feePayer,
133
- feeToken: receipt.feeToken,
134
- };
135
- }
136
- //# sourceMappingURL=TransactionReceipt.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TransactionReceipt.js","sourceRoot":"","sources":["../../src/ox/TransactionReceipt.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,qBAAqB,MAAM,uBAAuB,CAAA;AAqC9D,gCAAgC;AAChC,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,GAAG,qBAAqB,CAAC,WAAW;IACpC,MAAM,EAAE,OAAO;CACP,CAAA;AAEV,gCAAgC;AAChC,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,GAAG,qBAAqB,CAAC,SAAS;IAClC,KAAK,EAAE,MAAM;CACL,CAAA;AAEV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,MAAM,UAAU,OAAO,CACrB,OAA6B;IAE7B,OAAO,qBAAqB,CAAC,OAAO,CAClC,OAAoC,CAC5B,CAAA;AACZ,CAAC;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,MAAM,UAAU,KAAK,CAAC,OAA2B;IAC/C,MAAM,GAAG,GAAG,qBAAqB,CAAC,KAAK,CACrC,OAAmD,CAC7C,CAAA;IACR,OAAO;QACL,GAAG,GAAG;QACN,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,QAAQ,EAAE,OAAO,CAAC,QAAQ;KAC3B,CAAA;AACH,CAAC"}
@@ -1,76 +0,0 @@
1
- import type * as Errors from 'ox/Errors';
2
- import * as Hex from 'ox/Hex';
3
- import * as ox_TransactionRequest from 'ox/TransactionRequest';
4
- import type { Compute } from '../internal/types.js';
5
- import * as AuthorizationTempo from './AuthorizationTempo.js';
6
- import * as KeyAuthorization from './KeyAuthorization.js';
7
- import * as TokenId from './TokenId.js';
8
- import type { Call } from './TransactionEnvelopeTempo.js';
9
- type KeyType = 'secp256k1' | 'p256' | 'webAuthn';
10
- /** A Transaction Request that is generic to all transaction types, as defined in the [Execution API specification](https://github.com/ethereum/execution-apis/blob/4aca1d7a3e5aab24c8f6437131289ad386944eaa/src/schemas/transaction.yaml#L358-L423). */
11
- export type TransactionRequest<bigintType = bigint, numberType = number, type extends string = string> = Compute<Omit<ox_TransactionRequest.TransactionRequest<bigintType, numberType, type>, 'authorizationList'> & {
12
- authorizationList?: AuthorizationTempo.ListSigned<bigintType, numberType> | undefined;
13
- calls?: readonly Call<bigintType>[] | undefined;
14
- keyAuthorization?: KeyAuthorization.KeyAuthorization<true> | undefined;
15
- keyData?: Hex.Hex | undefined;
16
- keyType?: KeyType | undefined;
17
- feeToken?: TokenId.TokenIdOrAddress | undefined;
18
- nonceKey?: 'random' | bigintType | undefined;
19
- validBefore?: numberType | undefined;
20
- validAfter?: numberType | undefined;
21
- }>;
22
- /** RPC representation of a {@link ox#TransactionRequest.TransactionRequest}. */
23
- export type Rpc = Omit<TransactionRequest<Hex.Hex, Hex.Hex, string>, 'authorizationList' | 'keyAuthorization'> & {
24
- authorizationList?: AuthorizationTempo.ListRpc | undefined;
25
- keyAuthorization?: KeyAuthorization.Rpc | undefined;
26
- nonceKey?: Hex.Hex | undefined;
27
- };
28
- /**
29
- * Converts a {@link ox#TransactionRequest.TransactionRequest} to a {@link ox#TransactionRequest.Rpc}.
30
- *
31
- * @example
32
- * ```ts twoslash
33
- * import { Value } from 'ox'
34
- * import { TransactionRequest } from 'ox/tempo'
35
- *
36
- * const request = TransactionRequest.toRpc({
37
- * feeToken: '0x20c0000000000000000000000000000000000000',
38
- * to: '0x0000000000000000000000000000000000000000',
39
- * value: Value.fromEther('0.01'),
40
- * })
41
- * ```
42
- *
43
- * @example
44
- * ### Using with a Provider
45
- *
46
- * You can use {@link ox#Provider.(from:function)} to instantiate an EIP-1193 Provider and
47
- * send a transaction to the Wallet using the `eth_sendTransaction` method.
48
- *
49
- * ```ts twoslash
50
- * import 'ox/window'
51
- * import { Provider, Value } from 'ox'
52
- * import { TransactionRequest } from 'ox/tempo'
53
- *
54
- * const provider = Provider.from(window.ethereum!)
55
- *
56
- * const request = TransactionRequest.toRpc({
57
- * feeToken: '0x20c0000000000000000000000000000000000000',
58
- * to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
59
- * value: Value.fromEther('0.01'),
60
- * })
61
- *
62
- * const hash = await provider.request({ // [!code focus]
63
- * method: 'eth_sendTransaction', // [!code focus]
64
- * params: [request], // [!code focus]
65
- * }) // [!code focus]
66
- * ```
67
- *
68
- * @param request - The request to convert.
69
- * @returns An RPC request.
70
- */
71
- export declare function toRpc(request: TransactionRequest): Rpc;
72
- export declare namespace toRpc {
73
- type ErrorType = AuthorizationTempo.toRpcList.ErrorType | Hex.fromNumber.ErrorType | Errors.GlobalErrorType;
74
- }
75
- export {};
76
- //# sourceMappingURL=TransactionRequest.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TransactionRequest.d.ts","sourceRoot":"","sources":["../../src/ox/TransactionRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,MAAM,WAAW,CAAA;AACxC,OAAO,KAAK,GAAG,MAAM,QAAQ,CAAA;AAC7B,OAAO,KAAK,qBAAqB,MAAM,uBAAuB,CAAA;AAC9D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,KAAK,kBAAkB,MAAM,yBAAyB,CAAA;AAC7D,OAAO,KAAK,gBAAgB,MAAM,uBAAuB,CAAA;AACzD,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AAEvC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAA;AAEzD,KAAK,OAAO,GAAG,WAAW,GAAG,MAAM,GAAG,UAAU,CAAA;AAEhD,wPAAwP;AACxP,MAAM,MAAM,kBAAkB,CAC5B,UAAU,GAAG,MAAM,EACnB,UAAU,GAAG,MAAM,EACnB,IAAI,SAAS,MAAM,GAAG,MAAM,IAC1B,OAAO,CACT,IAAI,CACF,qBAAqB,CAAC,kBAAkB,CAAC,UAAU,EAAE,UAAU,EAAE,IAAI,CAAC,EACtE,mBAAmB,CACpB,GAAG;IACF,iBAAiB,CAAC,EACd,kBAAkB,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,GACrD,SAAS,CAAA;IACb,KAAK,CAAC,EAAE,SAAS,IAAI,CAAC,UAAU,CAAC,EAAE,GAAG,SAAS,CAAA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js';
4
- import * as KeyAuthorization from './KeyAuthorization.js';
5
- import * as TokenId from './TokenId.js';
6
- import * as Transaction from './Transaction.js';
7
- /**
8
- * Converts a {@link ox#TransactionRequest.TransactionRequest} to a {@link ox#TransactionRequest.Rpc}.
9
- *
10
- * @example
11
- * ```ts twoslash
12
- * import { Value } from 'ox'
13
- * import { TransactionRequest } from 'ox/tempo'
14
- *
15
- * const request = TransactionRequest.toRpc({
16
- * feeToken: '0x20c0000000000000000000000000000000000000',
17
- * to: '0x0000000000000000000000000000000000000000',
18
- * value: Value.fromEther('0.01'),
19
- * })
20
- * ```
21
- *
22
- * @example
23
- * ### Using with a Provider
24
- *
25
- * You can use {@link ox#Provider.(from:function)} to instantiate an EIP-1193 Provider and
26
- * send a transaction to the Wallet using the `eth_sendTransaction` method.
27
- *
28
- * ```ts twoslash
29
- * import 'ox/window'
30
- * import { Provider, Value } from 'ox'
31
- * import { TransactionRequest } from 'ox/tempo'
32
- *
33
- * const provider = Provider.from(window.ethereum!)
34
- *
35
- * const request = TransactionRequest.toRpc({
36
- * feeToken: '0x20c0000000000000000000000000000000000000',
37
- * to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
38
- * value: Value.fromEther('0.01'),
39
- * })
40
- *
41
- * const hash = await provider.request({ // [!code focus]
42
- * method: 'eth_sendTransaction', // [!code focus]
43
- * params: [request], // [!code focus]
44
- * }) // [!code focus]
45
- * ```
46
- *
47
- * @param request - The request to convert.
48
- * @returns An RPC request.
49
- */
50
- export function toRpc(request) {
51
- const request_rpc = ox_TransactionRequest.toRpc({
52
- ...request,
53
- authorizationList: undefined,
54
- });
55
- if (request.authorizationList)
56
- request_rpc.authorizationList = AuthorizationTempo.toRpcList(request.authorizationList);
57
- if (request.calls)
58
- request_rpc.calls = request.calls.map((call) => ({
59
- to: call.to ?? '0x',
60
- value: call.value ? Hex.fromNumber(call.value) : '0x',
61
- data: call.data ?? '0x',
62
- }));
63
- if (typeof request.feeToken !== 'undefined')
64
- request_rpc.feeToken = TokenId.toAddress(request.feeToken);
65
- if (request.keyAuthorization)
66
- request_rpc.keyAuthorization = KeyAuthorization.toRpc(request.keyAuthorization);
67
- if (typeof request.validBefore !== 'undefined')
68
- request_rpc.validBefore = Hex.fromNumber(request.validBefore);
69
- if (typeof request.validAfter !== 'undefined')
70
- request_rpc.validAfter = Hex.fromNumber(request.validAfter);
71
- const nonceKey = (() => {
72
- if (request.nonceKey === 'random')
73
- return Hex.random(6);
74
- if (typeof request.nonceKey === 'bigint')
75
- return Hex.fromNumber(request.nonceKey);
76
- return undefined;
77
- })();
78
- if (nonceKey)
79
- request_rpc.nonceKey = nonceKey;
80
- if (request.calls ||
81
- typeof request.feeToken !== 'undefined' ||
82
- typeof request.validBefore !== 'undefined' ||
83
- typeof request.validAfter !== 'undefined' ||
84
- request.type === 'tempo') {
85
- request_rpc.type = Transaction.toRpcType.tempo;
86
- delete request_rpc.data;
87
- delete request_rpc.input;
88
- delete request_rpc.to;
89
- delete request_rpc.value;
90
- }
91
- return request_rpc;
92
- }
93
- //# sourceMappingURL=TransactionRequest.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TransactionRequest.js","sourceRoot":"","sources":["../../src/ox/TransactionRequest.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,GAAG,MAAM,QAAQ,CAAA;AAC7B,OAAO,KAAK,qBAAqB,MAAM,uBAAuB,CAAA;AAE9D,OAAO,KAAK,kBAAkB,MAAM,yBAAyB,CAAA;AAC7D,OAAO,KAAK,gBAAgB,MAAM,uBAAuB,CAAA;AACzD,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AACvC,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAA;AAuC/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,MAAM,UAAU,KAAK,CAAC,OAA2B;IAC/C,MAAM,WAAW,GAAG,qBAAqB,CAAC,KAAK,CAAC;QAC9C,GAAG,OAAO;QACV,iBAAiB,EAAE,S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AAQ,KAAK,QAAQ;YACtC,OAAO,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;QACzC,OAAO,SAAS,CAAA;IAClB,CAAC,CAAC,EAAE,CAAA;IACJ,IAAI,QAAQ;QAAE,WAAW,CAAC,QAAQ,GAAG,QAAQ,CAAA;IAE7C,IACE,OAAO,CAAC,KAAK;QACb,OAAO,OAAO,CAAC,QAAQ,KAAK,WAAW;QACvC,OAAO,OAAO,CAAC,WAAW,KAAK,WAAW;QAC1C,OAAO,OAAO,CAAC,UAAU,KAAK,WAAW;QACzC,OAAO,CAAC,IAAI,KAAK,OAAO,EACxB,CAAC;QACD,WAAW,CAAC,IAAI,GAAG,WAAW,CAAC,SAAS,CAAC,KAAK,CAAA;QAC9C,OAAO,WAAW,CAAC,IAAI,CAAA;QACvB,OAAO,WAAW,CAAC,KAAK,CAAA;QACxB,OAAO,WAAW,CAAC,EAAE,CAAA;QACrB,OAAO,WAAW,CAAC,KAAK,CAAA;IAC1B,CAAC;IAED,OAAO,WAAW,CAAA;AACpB,CAAC"}
@@ -1,14 +0,0 @@
1
- export * as AuthorizationTempo from './AuthorizationTempo.js';
2
- export * as KeyAuthorization from './KeyAuthorization.js';
3
- export * as Order from './Order.js';
4
- export * as OrdersFilters from './OrdersFilters.js';
5
- export * as Pagination from './Pagination.js';
6
- export * as PoolId from './PoolId.js';
7
- export * as RpcSchema from './RpcSchema.js';
8
- export * as SignatureEnvelope from './SignatureEnvelope.js';
9
- export * as Tick from './Tick.js';
10
- export * as TokenId from './TokenId.js';
11
- export * as TokenRole from './TokenRole.js';
12
- export * as Transaction from './Transaction.js';
13
- export * as TransactionEnvelopeTempo from './TransactionEnvelopeTempo.js';
14
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ox/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,kBAAkB,MAAM,yBAAyB,CAAA;AAC7D,OAAO,KAAK,gBAAgB,MAAM,uBAAuB,CAAA;AACzD,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAA;AACnD,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAA;AAC7C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAA;AAC3C,OAAO,KAAK,iBAAiB,MAAM,wBAAwB,CAAA;AAC3D,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AACjC,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AACvC,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAA;AAC3C,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAA;AAC/C,OAAO,KAAK,wBAAwB,MAAM,+BAA+B,CAAA"}
package/dist/ox/index.js DELETED
@@ -1,14 +0,0 @@
1
- export * as AuthorizationTempo from './AuthorizationTempo.js';
2
- export * as KeyAuthorization from './KeyAuthorization.js';
3
- export * as Order from './Order.js';
4
- export * as OrdersFilters from './OrdersFilters.js';
5
- export * as Pagination from './Pagination.js';
6
- export * as PoolId from './PoolId.js';
7
- export * as RpcSchema from './RpcSchema.js';
8
- export * as SignatureEnvelope from './SignatureEnvelope.js';
9
- export * as Tick from './Tick.js';
10
- export * as TokenId from './TokenId.js';
11
- export * as TokenRole from './TokenRole.js';
12
- export * as Transaction from './Transaction.js';
13
- export * as TransactionEnvelopeTempo from './TransactionEnvelopeTempo.js';
14
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ox/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,kBAAkB,MAAM,yBAAyB,CAAA;AAC7D,OAAO,KAAK,gBAAgB,MAAM,uBAAuB,CAAA;AACzD,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAA;AACnD,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAA;AAC7C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAA;AAC3C,OAAO,KAAK,iBAAiB,MAAM,wBAAwB,CAAA;AAC3D,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AACjC,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AACvC,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAA;AAC3C,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAA;AAC/C,OAAO,KAAK,wBAAwB,MAAM,+BAA+B,CAAA"}
@@ -1,101 +0,0 @@
1
- /**
2
- * Defines a Tempo instance.
3
- *
4
- * @example
5
- * ```ts
6
- * const instance = tempo()
7
- * await instance.start()
8
- * // ...
9
- * await instance.stop()
10
- * ```
11
- */
12
- export declare const tempo: import("prool").DefineInstanceReturnType<{
13
- args: {
14
- /**
15
- * Host the server will listen on.
16
- */
17
- host?: string | undefined;
18
- /**
19
- * Port the server will listen on.
20
- */
21
- port?: number | undefined;
22
- };
23
- readonly process: import("prool/processes").Process_internal;
24
- }, tempo.Parameters>;
25
- export declare namespace tempo {
26
- type Parameters = {
27
- /**
28
- * Builder options.
29
- */
30
- builder?: {
31
- /**
32
- * The deadline for when the payload builder job should resolve.
33
- */
34
- deadline?: number | undefined;
35
- /**
36
- * Target gas limit for built blocks.
37
- */
38
- gaslimit?: bigint | undefined;
39
- /**
40
- * Maximum number of tasks to spawn for building a payload.
41
- */
42
- maxTasks?: number | undefined;
43
- } | undefined;
44
- /**
45
- * Chain this node is running.
46
- */
47
- chain?: string | undefined;
48
- /**
49
- * Name of the container.
50
- */
51
- containerName?: string | undefined;
52
- /**
53
- * Development options.
54
- */
55
- dev?: {
56
- /**
57
- * Interval between blocks.
58
- */
59
- blockTime?: string | undefined;
60
- } | undefined;
61
- /**
62
- * Faucet options.
63
- */
64
- faucet?: {
65
- /**
66
- * Target token addresses for the faucet to be funding with
67
- */
68
- addresses?: string[] | undefined;
69
- /**
70
- * Amount for each faucet funding transaction
71
- */
72
- amount?: bigint | undefined;
73
- /**
74
- * Faucet funding mnemonic
75
- */
76
- privateKey?: string | undefined;
77
- } | undefined;
78
- /**
79
- * Docker image to use.
80
- */
81
- image?: string | undefined;
82
- /**
83
- * Rust log level configuration (sets RUST_LOG environment variable).
84
- * Can be a log level or a custom filter string.
85
- */
86
- log?: 'trace' | 'debug' | 'info' | 'warn' | 'error' | (string & {}) | boolean | undefined;
87
- /**
88
- * Host the server will listen on.
89
- */
90
- host?: string | undefined;
91
- /**
92
- * Port the server will listen on.
93
- */
94
- port?: number | undefined;
95
- /**
96
- * Tag of the image to use.
97
- */
98
- tag?: string | undefined;
99
- };
100
- }
101
- //# sourceMappingURL=Instance.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Instance.d.ts","sourceRoot":"","sources":["../../src/prool/Instance.ts"],"names":[],"mappings":"AASA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,KAAK;;QAqNd;;WAEG;eACI,MAAM,GAAG,SAAS;QACzB;;WAEG;eACI,MAAM,GAAG,SAAS;;;oBArF3B,CAAA;AAEF,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,KAAY,UAAU,GAAG;QACvB;;WAEG;QACH,OAAO,CAAC,EACJ;YACE;;eAEG;YACH,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;YAC7B;;eAEG;YACH,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;YAC7B;;eAEG;YACH,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;SAC9B,GACD,SAAS,CAAA;QACb;;WAEG;QACH,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;QAC1B;;WAEG;QACH,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;QAClC;;WAEG;QACH,GAAG,CAAC,EACA;YACE;;eAEG;YACH,SAAS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