mppx 0.6.26 → 0.6.27
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.
- package/CHANGELOG.md +7 -0
- package/dist/cli/cli.js +1 -1
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/utils.js +2 -2
- package/dist/cli/utils.js.map +1 -1
- package/dist/stripe/server/internal/html.gen.d.ts +1 -1
- package/dist/stripe/server/internal/html.gen.js +1 -1
- package/dist/tempo/client/ChannelOps.d.ts.map +1 -1
- package/dist/tempo/client/ChannelOps.js +7 -2
- package/dist/tempo/client/ChannelOps.js.map +1 -1
- package/dist/tempo/client/Charge.d.ts.map +1 -1
- package/dist/tempo/client/Charge.js +6 -4
- package/dist/tempo/client/Charge.js.map +1 -1
- package/dist/tempo/client/Session.js +1 -1
- package/dist/tempo/client/Session.js.map +1 -1
- package/dist/tempo/client/Subscription.js +1 -1
- package/dist/tempo/client/Subscription.js.map +1 -1
- package/dist/tempo/server/Charge.js +1 -1
- package/dist/tempo/server/Charge.js.map +1 -1
- package/dist/tempo/server/Session.js +1 -1
- package/dist/tempo/server/Session.js.map +1 -1
- package/dist/tempo/server/Subscription.js +1 -1
- package/dist/tempo/server/Subscription.js.map +1 -1
- package/dist/tempo/server/internal/html.gen.d.ts +1 -1
- package/dist/tempo/server/internal/html.gen.d.ts.map +1 -1
- package/dist/tempo/server/internal/html.gen.js +1 -1
- package/dist/tempo/server/internal/html.gen.js.map +1 -1
- package/dist/tempo/session/Chain.d.ts.map +1 -1
- package/dist/tempo/session/Chain.js +6 -1
- package/dist/tempo/session/Chain.js.map +1 -1
- package/package.json +3 -3
- package/src/cli/cli.ts +1 -1
- package/src/cli/utils.test.ts +1 -1
- package/src/cli/utils.ts +2 -2
- package/src/stripe/server/internal/html.gen.ts +1 -1
- package/src/tempo/client/ChannelOps.ts +6 -2
- package/src/tempo/client/Charge.ts +5 -4
- package/src/tempo/client/Session.ts +1 -1
- package/src/tempo/client/Subscription.ts +1 -1
- package/src/tempo/server/Charge.ts +1 -1
- package/src/tempo/server/Session.ts +1 -1
- package/src/tempo/server/Subscription.test.ts +1 -1
- package/src/tempo/server/Subscription.ts +1 -1
- package/src/tempo/server/internal/html/main.ts +1 -1
- package/src/tempo/server/internal/html/package.json +1 -1
- package/src/tempo/server/internal/html.gen.ts +1 -1
- package/src/tempo/session/Chain.test.ts +16 -8
- package/src/tempo/session/Chain.ts +6 -1
- package/src/viem/Account.test.ts +1 -1
- package/src/viem/Client.test.ts +1 -1
|
@@ -498,10 +498,12 @@ describe.runIf(isLocalnet)('on-chain', () => {
|
|
|
498
498
|
{ to: currency, data: approveData },
|
|
499
499
|
{ to: escrowContract, data: openData },
|
|
500
500
|
],
|
|
501
|
-
feePayer: true,
|
|
502
501
|
feeToken: currency,
|
|
502
|
+
nonceKey: 'expiring',
|
|
503
|
+
validBefore: Math.floor(Date.now() / 1_000) + 25,
|
|
503
504
|
} as never)
|
|
504
|
-
prepared.gas = prepared.gas
|
|
505
|
+
prepared.gas = (prepared.gas ?? 0n) + 5_000n
|
|
506
|
+
;(prepared as Record<string, unknown>).feePayer = true
|
|
505
507
|
const serializedTransaction = await signTransaction(client, prepared as never)
|
|
506
508
|
|
|
507
509
|
await broadcastOpenTransaction({
|
|
@@ -561,10 +563,12 @@ describe.runIf(isLocalnet)('on-chain', () => {
|
|
|
561
563
|
{ to: escrowContract, data: openData },
|
|
562
564
|
{ to: escrowContract, data: smuggledOpenData },
|
|
563
565
|
],
|
|
564
|
-
feePayer: true,
|
|
565
566
|
feeToken: currency,
|
|
567
|
+
nonceKey: 'expiring',
|
|
568
|
+
validBefore: Math.floor(Date.now() / 1_000) + 25,
|
|
566
569
|
} as never)
|
|
567
|
-
prepared.gas = prepared.gas
|
|
570
|
+
prepared.gas = (prepared.gas ?? 0n) + 5_000n
|
|
571
|
+
;(prepared as Record<string, unknown>).feePayer = true
|
|
568
572
|
|
|
569
573
|
const serializedTransaction = await signTransaction(client, prepared as never)
|
|
570
574
|
|
|
@@ -1006,10 +1010,12 @@ describe.runIf(isLocalnet)('on-chain', () => {
|
|
|
1006
1010
|
{ to: currency, data: approveData },
|
|
1007
1011
|
{ to: escrowContract, data: topUpData },
|
|
1008
1012
|
],
|
|
1009
|
-
feePayer: true,
|
|
1010
1013
|
feeToken: currency,
|
|
1014
|
+
nonceKey: 'expiring',
|
|
1015
|
+
validBefore: Math.floor(Date.now() / 1_000) + 25,
|
|
1011
1016
|
} as never)
|
|
1012
|
-
prepared.gas = prepared.gas
|
|
1017
|
+
prepared.gas = (prepared.gas ?? 0n) + 5_000n
|
|
1018
|
+
;(prepared as Record<string, unknown>).feePayer = true
|
|
1013
1019
|
const serializedTransaction = await signTransaction(client, prepared as never)
|
|
1014
1020
|
|
|
1015
1021
|
await broadcastTopUpTransaction({
|
|
@@ -1069,10 +1075,12 @@ describe.runIf(isLocalnet)('on-chain', () => {
|
|
|
1069
1075
|
{ to: escrowContract, data: topUpData },
|
|
1070
1076
|
{ to: escrowContract, data: smuggledTopUpData },
|
|
1071
1077
|
],
|
|
1072
|
-
feePayer: true,
|
|
1073
1078
|
feeToken: currency,
|
|
1079
|
+
nonceKey: 'expiring',
|
|
1080
|
+
validBefore: Math.floor(Date.now() / 1_000) + 25,
|
|
1074
1081
|
} as never)
|
|
1075
|
-
prepared.gas = prepared.gas
|
|
1082
|
+
prepared.gas = (prepared.gas ?? 0n) + 5_000n
|
|
1083
|
+
;(prepared as Record<string, unknown>).feePayer = true
|
|
1076
1084
|
|
|
1077
1085
|
const serializedTransaction = await signTransaction(client, prepared as never)
|
|
1078
1086
|
|
|
@@ -258,9 +258,14 @@ async function sendFeePayerTx(
|
|
|
258
258
|
const prepared = await prepareTransactionRequest(client, {
|
|
259
259
|
account,
|
|
260
260
|
calls: [{ to, data }],
|
|
261
|
-
feePayer: true,
|
|
262
261
|
...(feeToken ? { feeToken } : {}),
|
|
262
|
+
nonceKey: 'expiring',
|
|
263
|
+
validBefore: Math.floor(Date.now() / 1_000) + 25,
|
|
263
264
|
} as never)
|
|
265
|
+
// Estimate before enabling fee-payer mode so Tempo includes sender
|
|
266
|
+
// signature verification costs in the gas budget.
|
|
267
|
+
prepared.gas = (prepared.gas ?? 0n) + 5_000n
|
|
268
|
+
;(prepared as Record<string, unknown>).feePayer = true
|
|
264
269
|
|
|
265
270
|
const serialized = (await signTransaction(client, {
|
|
266
271
|
...prepared,
|
package/src/viem/Account.test.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createClient, http } from 'viem'
|
|
2
2
|
import { privateKeyToAccount } from 'viem/accounts'
|
|
3
|
-
import { mainnet } from 'viem/chains'
|
|
3
|
+
import { tempo as mainnet } from 'viem/tempo/chains'
|
|
4
4
|
import { describe, expect, test } from 'vp/test'
|
|
5
5
|
|
|
6
6
|
import * as Account from './Account.js'
|
package/src/viem/Client.test.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createClient, custom, defineChain, type Hex } from 'viem'
|
|
2
2
|
import { privateKeyToAccount } from 'viem/accounts'
|
|
3
3
|
import { signTransaction } from 'viem/actions'
|
|
4
|
-
import { tempoLocalnet } from 'viem/chains'
|
|
5
4
|
import { Account as TempoAccount, Transaction } from 'viem/tempo'
|
|
5
|
+
import { tempoLocalnet } from 'viem/tempo/chains'
|
|
6
6
|
import { describe, expect, test } from 'vp/test'
|
|
7
7
|
|
|
8
8
|
import * as Client from './Client.js'
|