tempo.ts 0.7.5 → 0.8.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 (147) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/chains.d.ts +6 -20
  3. package/dist/chains.d.ts.map +1 -1
  4. package/dist/chains.js +14 -15
  5. package/dist/chains.js.map +1 -1
  6. package/dist/ox/KeyAuthorization.d.ts +356 -0
  7. package/dist/ox/KeyAuthorization.d.ts.map +1 -0
  8. package/dist/ox/KeyAuthorization.js +360 -0
  9. package/dist/ox/KeyAuthorization.js.map +1 -0
  10. package/dist/ox/SignatureEnvelope.d.ts +21 -6
  11. package/dist/ox/SignatureEnvelope.d.ts.map +1 -1
  12. package/dist/ox/SignatureEnvelope.js +43 -3
  13. package/dist/ox/SignatureEnvelope.js.map +1 -1
  14. package/dist/ox/Transaction.d.ts +5 -1
  15. package/dist/ox/Transaction.d.ts.map +1 -1
  16. package/dist/ox/Transaction.js +5 -0
  17. package/dist/ox/Transaction.js.map +1 -1
  18. package/dist/ox/TransactionEnvelopeAA.d.ts +9 -0
  19. package/dist/ox/TransactionEnvelopeAA.d.ts.map +1 -1
  20. package/dist/ox/TransactionEnvelopeAA.js +17 -4
  21. package/dist/ox/TransactionEnvelopeAA.js.map +1 -1
  22. package/dist/ox/TransactionRequest.d.ts +7 -1
  23. package/dist/ox/TransactionRequest.d.ts.map +1 -1
  24. package/dist/ox/TransactionRequest.js +12 -0
  25. package/dist/ox/TransactionRequest.js.map +1 -1
  26. package/dist/ox/index.d.ts +1 -0
  27. package/dist/ox/index.d.ts.map +1 -1
  28. package/dist/ox/index.js +1 -0
  29. package/dist/ox/index.js.map +1 -1
  30. package/dist/prool/Instance.js +1 -1
  31. package/dist/prool/Instance.js.map +1 -1
  32. package/{src/prool/internal → dist/prool}/chain.json +4 -2
  33. package/dist/viem/Abis.d.ts +319 -6
  34. package/dist/viem/Abis.d.ts.map +1 -1
  35. package/dist/viem/Abis.js +199 -7
  36. package/dist/viem/Abis.js.map +1 -1
  37. package/dist/viem/Account.d.ts +103 -14
  38. package/dist/viem/Account.d.ts.map +1 -1
  39. package/dist/viem/Account.js +177 -23
  40. package/dist/viem/Account.js.map +1 -1
  41. package/dist/viem/Actions/account.d.ts.map +1 -1
  42. package/dist/viem/Actions/account.js +4 -5
  43. package/dist/viem/Actions/account.js.map +1 -1
  44. package/dist/viem/Actions/amm.d.ts +84 -32
  45. package/dist/viem/Actions/amm.d.ts.map +1 -1
  46. package/dist/viem/Actions/amm.js +12 -32
  47. package/dist/viem/Actions/amm.js.map +1 -1
  48. package/dist/viem/Actions/dex.d.ts +156 -4
  49. package/dist/viem/Actions/dex.d.ts.map +1 -1
  50. package/dist/viem/Actions/fee.d.ts +4 -0
  51. package/dist/viem/Actions/fee.d.ts.map +1 -1
  52. package/dist/viem/Actions/reward.d.ts +78 -0
  53. package/dist/viem/Actions/reward.d.ts.map +1 -1
  54. package/dist/viem/Actions/token.d.ts +585 -0
  55. package/dist/viem/Actions/token.d.ts.map +1 -1
  56. package/dist/viem/Actions/token.js +2 -2
  57. package/dist/viem/Actions/token.js.map +1 -1
  58. package/dist/viem/Addresses.d.ts +1 -1
  59. package/dist/viem/Addresses.d.ts.map +1 -1
  60. package/dist/viem/Addresses.js +1 -1
  61. package/dist/viem/Addresses.js.map +1 -1
  62. package/dist/viem/Chain.d.ts +35 -0
  63. package/dist/viem/Chain.d.ts.map +1 -1
  64. package/dist/viem/Chain.js +37 -0
  65. package/dist/viem/Chain.js.map +1 -1
  66. package/dist/viem/Decorator.d.ts +193 -16
  67. package/dist/viem/Decorator.d.ts.map +1 -1
  68. package/dist/viem/Decorator.js +7 -0
  69. package/dist/viem/Decorator.js.map +1 -1
  70. package/dist/viem/Formatters.d.ts.map +1 -1
  71. package/dist/viem/Formatters.js +8 -7
  72. package/dist/viem/Formatters.js.map +1 -1
  73. package/dist/viem/Storage.d.ts +1 -0
  74. package/dist/viem/Storage.d.ts.map +1 -1
  75. package/dist/viem/Storage.js +21 -0
  76. package/dist/viem/Storage.js.map +1 -1
  77. package/dist/viem/TokenIds.d.ts +1 -1
  78. package/dist/viem/TokenIds.d.ts.map +1 -1
  79. package/dist/viem/TokenIds.js +1 -1
  80. package/dist/viem/TokenIds.js.map +1 -1
  81. package/dist/viem/Transaction.d.ts +9 -1
  82. package/dist/viem/Transaction.d.ts.map +1 -1
  83. package/dist/viem/Transaction.js +2 -1
  84. package/dist/viem/Transaction.js.map +1 -1
  85. package/dist/viem/WebAuthnP256.d.ts +4 -1
  86. package/dist/viem/WebAuthnP256.d.ts.map +1 -1
  87. package/dist/viem/WebAuthnP256.js +3 -1
  88. package/dist/viem/WebAuthnP256.js.map +1 -1
  89. package/dist/wagmi/Actions/amm.d.ts +6 -16
  90. package/dist/wagmi/Actions/amm.d.ts.map +1 -1
  91. package/dist/wagmi/Actions/amm.js +6 -16
  92. package/dist/wagmi/Actions/amm.js.map +1 -1
  93. package/dist/wagmi/Connector.d.ts +25 -8
  94. package/dist/wagmi/Connector.d.ts.map +1 -1
  95. package/dist/wagmi/Connector.js +120 -27
  96. package/dist/wagmi/Connector.js.map +1 -1
  97. package/dist/wagmi/Hooks/amm.d.ts +6 -16
  98. package/dist/wagmi/Hooks/amm.d.ts.map +1 -1
  99. package/dist/wagmi/Hooks/amm.js +6 -16
  100. package/dist/wagmi/Hooks/amm.js.map +1 -1
  101. package/package.json +3 -2
  102. package/src/chains.ts +14 -15
  103. package/src/ox/KeyAuthorization.test.ts +1332 -0
  104. package/src/ox/KeyAuthorization.ts +542 -0
  105. package/src/ox/SignatureEnvelope.test.ts +624 -0
  106. package/src/ox/SignatureEnvelope.ts +89 -9
  107. package/src/ox/Transaction.test.ts +214 -0
  108. package/src/ox/Transaction.ts +13 -1
  109. package/src/ox/TransactionEnvelopeAA.test.ts +164 -4
  110. package/src/ox/TransactionEnvelopeAA.ts +36 -3
  111. package/src/ox/TransactionRequest.ts +22 -1
  112. package/src/ox/e2e.test.ts +612 -5
  113. package/src/ox/index.ts +1 -0
  114. package/src/prool/Instance.ts +1 -1
  115. package/src/prool/chain.json +238 -0
  116. package/src/server/Handler.test.ts +20 -36
  117. package/src/viem/Abis.ts +200 -7
  118. package/src/viem/Account.test.ts +444 -0
  119. package/src/viem/Account.ts +355 -42
  120. package/src/viem/Actions/account.ts +3 -5
  121. package/src/viem/Actions/amm.test.ts +220 -1
  122. package/src/viem/Actions/amm.ts +12 -32
  123. package/src/viem/Actions/token.test.ts +8 -8
  124. package/src/viem/Actions/token.ts +2 -2
  125. package/src/viem/Addresses.ts +1 -1
  126. package/src/viem/Chain.test.ts +168 -0
  127. package/src/viem/Chain.ts +37 -1
  128. package/src/viem/Decorator.ts +214 -16
  129. package/src/viem/Formatters.ts +8 -7
  130. package/src/viem/Storage.ts +22 -0
  131. package/src/viem/TokenIds.ts +1 -1
  132. package/src/viem/Transaction.ts +14 -2
  133. package/src/viem/WebAuthnP256.ts +8 -2
  134. package/src/viem/e2e.test.ts +299 -96
  135. package/src/wagmi/Actions/amm.test.ts +93 -2
  136. package/src/wagmi/Actions/amm.ts +6 -16
  137. package/src/wagmi/Connector.test.ts +1 -1
  138. package/src/wagmi/Connector.ts +184 -54
  139. package/src/wagmi/Hooks/amm.test.ts +335 -0
  140. package/src/wagmi/Hooks/amm.ts +6 -16
  141. package/src/wagmi/Hooks/fee.test.ts +10 -4
  142. package/src/wagmi/Hooks/token.test.ts +0 -488
  143. package/dist/viem/internal/account.d.ts +0 -21
  144. package/dist/viem/internal/account.d.ts.map +0 -1
  145. package/dist/viem/internal/account.js +0 -61
  146. package/dist/viem/internal/account.js.map +0 -1
  147. package/src/viem/internal/account.ts +0 -89
package/src/viem/Abis.ts CHANGED
@@ -1,20 +1,120 @@
1
1
  // Generated with `pnpm gen:abis`. Do not modify manually.
2
2
 
3
- export const linkingUsd = [
3
+ export const accountKeychain = [
4
4
  {
5
- name: 'TRANSFER_ROLE',
5
+ name: 'authorizeKey',
6
+ type: 'function',
7
+ stateMutability: 'nonpayable',
8
+ inputs: [
9
+ { type: 'address', name: 'keyId' },
10
+ { type: 'uint8', name: 'signatureType' },
11
+ { type: 'uint64', name: 'expiry' },
12
+ { type: 'bool', name: 'enforceLimits' },
13
+ {
14
+ type: 'tuple[]',
15
+ name: 'limits',
16
+ components: [
17
+ { type: 'address', name: 'token' },
18
+ { type: 'uint256', name: 'amount' },
19
+ ],
20
+ },
21
+ ],
22
+ outputs: [],
23
+ },
24
+ {
25
+ name: 'revokeKey',
26
+ type: 'function',
27
+ stateMutability: 'nonpayable',
28
+ inputs: [{ type: 'address', name: 'keyId' }],
29
+ outputs: [],
30
+ },
31
+ {
32
+ name: 'updateSpendingLimit',
33
+ type: 'function',
34
+ stateMutability: 'nonpayable',
35
+ inputs: [
36
+ { type: 'address', name: 'keyId' },
37
+ { type: 'address', name: 'token' },
38
+ { type: 'uint256', name: 'newLimit' },
39
+ ],
40
+ outputs: [],
41
+ },
42
+ {
43
+ name: 'getKey',
6
44
  type: 'function',
7
45
  stateMutability: 'view',
8
- inputs: [],
9
- outputs: [{ type: 'bytes32' }],
46
+ inputs: [
47
+ { type: 'address', name: 'account' },
48
+ { type: 'address', name: 'keyId' },
49
+ ],
50
+ outputs: [
51
+ {
52
+ type: 'tuple',
53
+ components: [
54
+ { type: 'uint8', name: 'signatureType' },
55
+ { type: 'address', name: 'keyId' },
56
+ { type: 'uint64', name: 'expiry' },
57
+ { type: 'bool', name: 'enforceLimits' },
58
+ { type: 'bool', name: 'isRevoked' },
59
+ ],
60
+ },
61
+ ],
10
62
  },
11
63
  {
12
- name: 'RECEIVE_WITH_MEMO_ROLE',
64
+ name: 'getRemainingLimit',
65
+ type: 'function',
66
+ stateMutability: 'view',
67
+ inputs: [
68
+ { type: 'address', name: 'account' },
69
+ { type: 'address', name: 'keyId' },
70
+ { type: 'address', name: 'token' },
71
+ ],
72
+ outputs: [{ type: 'uint256' }],
73
+ },
74
+ {
75
+ name: 'getTransactionKey',
13
76
  type: 'function',
14
77
  stateMutability: 'view',
15
78
  inputs: [],
16
- outputs: [{ type: 'bytes32' }],
79
+ outputs: [{ type: 'address' }],
80
+ },
81
+ {
82
+ name: 'KeyAuthorized',
83
+ type: 'event',
84
+ inputs: [
85
+ { type: 'address', name: 'account', indexed: true },
86
+ { type: 'bytes32', name: 'publicKey', indexed: true },
87
+ { type: 'uint8', name: 'signatureType' },
88
+ { type: 'uint64', name: 'expiry' },
89
+ ],
17
90
  },
91
+ {
92
+ name: 'KeyRevoked',
93
+ type: 'event',
94
+ inputs: [
95
+ { type: 'address', name: 'account', indexed: true },
96
+ { type: 'bytes32', name: 'publicKey', indexed: true },
97
+ ],
98
+ },
99
+ {
100
+ name: 'SpendingLimitUpdated',
101
+ type: 'event',
102
+ inputs: [
103
+ { type: 'address', name: 'account', indexed: true },
104
+ { type: 'bytes32', name: 'publicKey', indexed: true },
105
+ { type: 'address', name: 'token', indexed: true },
106
+ { type: 'uint256', name: 'newLimit' },
107
+ ],
108
+ },
109
+ { name: 'UnauthorizedCaller', type: 'error', inputs: [] },
110
+ { name: 'KeyAlreadyExists', type: 'error', inputs: [] },
111
+ { name: 'KeyNotFound', type: 'error', inputs: [] },
112
+ { name: 'KeyExpired', type: 'error', inputs: [] },
113
+ { name: 'SpendingLimitExceeded', type: 'error', inputs: [] },
114
+ { name: 'InvalidSignatureType', type: 'error', inputs: [] },
115
+ { name: 'ZeroPublicKey', type: 'error', inputs: [] },
116
+ { name: 'ExpiryInPast', type: 'error', inputs: [] },
117
+ { name: 'KeyAlreadyRevoked', type: 'error', inputs: [] },
18
118
  ] as const
19
119
 
20
120
  export const nonce = [
@@ -57,6 +157,23 @@ export const nonce = [
57
157
  { name: 'NonceOverflow', type: 'error', inputs: [] },
58
158
  ] as const
59
159
 
160
+ export const pathUsd = [
161
+ {
162
+ name: 'TRANSFER_ROLE',
163
+ type: 'function',
164
+ stateMutability: 'view',
165
+ inputs: [],
166
+ outputs: [{ type: 'bytes32' }],
167
+ },
168
+ {
169
+ name: 'RECEIVE_WITH_MEMO_ROLE',
170
+ type: 'function',
171
+ stateMutability: 'view',
172
+ inputs: [],
173
+ outputs: [{ type: 'bytes32' }],
174
+ },
175
+ ] as const
176
+
60
177
  export const stablecoinExchange = [
61
178
  {
62
179
  name: 'createPair',
@@ -212,7 +329,7 @@ export const stablecoinExchange = [
212
329
  {
213
330
  name: 'pairKey',
214
331
  type: 'function',
215
- stateMutability: 'view',
332
+ stateMutability: 'pure',
216
333
  inputs: [
217
334
  { type: 'address', name: 'tokenA' },
218
335
  { type: 'address', name: 'tokenB' },
@@ -264,6 +381,13 @@ export const stablecoinExchange = [
264
381
  inputs: [],
265
382
  outputs: [{ type: 'int16' }],
266
383
  },
384
+ {
385
+ name: 'TICK_SPACING',
386
+ type: 'function',
387
+ stateMutability: 'pure',
388
+ inputs: [],
389
+ outputs: [{ type: 'int16' }],
390
+ },
267
391
  {
268
392
  name: 'PRICE_SCALE',
269
393
  type: 'function',
@@ -343,6 +467,17 @@ export const stablecoinExchange = [
343
467
  { type: 'bool', name: 'partialFill' },
344
468
  ],
345
469
  },
470
+ {
471
+ name: 'OrderFilled',
472
+ type: 'event',
473
+ inputs: [
474
+ { type: 'uint128', name: 'orderId', indexed: true },
475
+ { type: 'address', name: 'maker', indexed: true },
476
+ { type: 'address', name: 'taker', indexed: true },
477
+ { type: 'uint128', name: 'amountFilled' },
478
+ { type: 'bool', name: 'partialFill' },
479
+ ],
480
+ },
346
481
  {
347
482
  name: 'OrderCancelled',
348
483
  type: 'event',
@@ -353,6 +488,7 @@ export const stablecoinExchange = [
353
488
  { name: 'PairAlreadyExists', type: 'error', inputs: [] },
354
489
  { name: 'OrderDoesNotExist', type: 'error', inputs: [] },
355
490
  { name: 'IdenticalTokens', type: 'error', inputs: [] },
491
+ { name: 'InvalidToken', type: 'error', inputs: [] },
356
492
  {
357
493
  name: 'TickOutOfBounds',
358
494
  type: 'error',
@@ -369,6 +505,7 @@ export const stablecoinExchange = [
369
505
  type: 'error',
370
506
  inputs: [{ type: 'uint128', name: 'amount' }],
371
507
  },
508
+ { name: 'InvalidBaseToken', type: 'error', inputs: [] },
372
509
  ] as const
373
510
 
374
511
  export const tip20 = [
@@ -561,6 +698,20 @@ export const tip20 = [
561
698
  ],
562
699
  outputs: [{ type: 'bool' }],
563
700
  },
701
+ {
702
+ name: 'feeRecipient',
703
+ type: 'function',
704
+ stateMutability: 'view',
705
+ inputs: [],
706
+ outputs: [{ type: 'address' }],
707
+ },
708
+ {
709
+ name: 'setFeeRecipient',
710
+ type: 'function',
711
+ stateMutability: 'view',
712
+ inputs: [{ type: 'address', name: 'newRecipient' }],
713
+ outputs: [{ type: 'address' }],
714
+ },
564
715
  {
565
716
  name: 'changeTransferPolicyId',
566
717
  type: 'function',
@@ -843,6 +994,14 @@ export const tip20 = [
843
994
  { type: 'address', name: 'recipient', indexed: true },
844
995
  ],
845
996
  },
997
+ {
998
+ name: 'FeeRecipientUpdated',
999
+ type: 'event',
1000
+ inputs: [
1001
+ { type: 'address', name: 'updater', indexed: true },
1002
+ { type: 'address', name: 'newRecipient', indexed: true },
1003
+ ],
1004
+ },
846
1005
  {
847
1006
  name: 'InsufficientBalance',
848
1007
  type: 'error',
@@ -869,6 +1028,8 @@ export const tip20 = [
869
1028
  { name: 'NoOptedInSupply', type: 'error', inputs: [] },
870
1029
  { name: 'Unauthorized', type: 'error', inputs: [] },
871
1030
  { name: 'RewardsDisabled', type: 'error', inputs: [] },
1031
+ { name: 'ScheduledRewardsDisabled', type: 'error', inputs: [] },
1032
+ { name: 'ProtectedAddress', type: 'error', inputs: [] },
872
1033
  {
873
1034
  name: 'hasRole',
874
1035
  type: 'function',
@@ -1135,6 +1296,16 @@ export const tipAccountRegistrar = [
1135
1296
  ],
1136
1297
  outputs: [{ type: 'address', name: 'authority' }],
1137
1298
  },
1299
+ {
1300
+ name: 'delegateToDefault',
1301
+ type: 'function',
1302
+ stateMutability: 'nonpayable',
1303
+ inputs: [
1304
+ { type: 'bytes', name: 'message' },
1305
+ { type: 'bytes', name: 'signature' },
1306
+ ],
1307
+ outputs: [{ type: 'address', name: 'authority' }],
1308
+ },
1138
1309
  { name: 'InvalidSignature', type: 'error', inputs: [] },
1139
1310
  { name: 'CodeNotEmpty', type: 'error', inputs: [] },
1140
1311
  { name: 'NonceNotZero', type: 'error', inputs: [] },
@@ -1209,10 +1380,32 @@ export const feeManager = [
1209
1380
  { name: 'InsufficientFeeTokenBalance', type: 'error', inputs: [] },
1210
1381
  { name: 'InternalError', type: 'error', inputs: [] },
1211
1382
  { name: 'CannotChangeWithinBlock', type: 'error', inputs: [] },
1383
+ { name: 'CannotChangeWithPendingFees', type: 'error', inputs: [] },
1212
1384
  { name: 'TokenPolicyForbids', type: 'error', inputs: [] },
1213
1385
  ] as const
1214
1386
 
1215
1387
  export const feeAmm = [
1388
+ {
1389
+ name: 'M',
1390
+ type: 'function',
1391
+ stateMutability: 'view',
1392
+ inputs: [],
1393
+ outputs: [{ type: 'uint256' }],
1394
+ },
1395
+ {
1396
+ name: 'N',
1397
+ type: 'function',
1398
+ stateMutability: 'view',
1399
+ inputs: [],
1400
+ outputs: [{ type: 'uint256' }],
1401
+ },
1402
+ {
1403
+ name: 'SCALE',
1404
+ type: 'function',
1405
+ stateMutability: 'view',
1406
+ inputs: [],
1407
+ outputs: [{ type: 'uint256' }],
1408
+ },
1216
1409
  {
1217
1410
  name: 'MIN_LIQUIDITY',
1218
1411
  type: 'function',