uvd-x402-sdk 2.0.2 → 2.1.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.
- package/README.md +58 -1
- package/dist/adapters/index.d.mts +139 -0
- package/dist/adapters/index.d.ts +139 -0
- package/dist/adapters/index.js +556 -0
- package/dist/adapters/index.js.map +1 -0
- package/dist/adapters/index.mjs +552 -0
- package/dist/adapters/index.mjs.map +1 -0
- package/dist/providers/solana/index.js +1 -1
- package/dist/providers/solana/index.js.map +1 -1
- package/dist/providers/solana/index.mjs +1 -1
- package/dist/providers/solana/index.mjs.map +1 -1
- package/package.json +6 -1
- package/src/adapters/index.ts +13 -0
- package/src/adapters/wagmi.ts +294 -0
- package/src/providers/solana/index.ts +8 -2
|
@@ -318,9 +318,11 @@ export class SVMProvider implements WalletAdapter {
|
|
|
318
318
|
);
|
|
319
319
|
|
|
320
320
|
// Instruction 1: SetComputeUnitPrice
|
|
321
|
+
// Use 100k microlamports/CU for fast landing on mainnet
|
|
322
|
+
// Lower values (like 1) cause transactions to be deprioritized and time out
|
|
321
323
|
instructions.push(
|
|
322
324
|
ComputeBudgetProgram.setComputeUnitPrice({
|
|
323
|
-
microLamports:
|
|
325
|
+
microLamports: 100_000,
|
|
324
326
|
})
|
|
325
327
|
);
|
|
326
328
|
|
|
@@ -362,6 +364,9 @@ export class SVMProvider implements WalletAdapter {
|
|
|
362
364
|
const transaction = new VersionedTransaction(messageV0);
|
|
363
365
|
|
|
364
366
|
// User signs (partial signature - facilitator will co-sign)
|
|
367
|
+
// IMPORTANT: Phantom may modify the transaction (add memo instruction).
|
|
368
|
+
// We send the FULL signed transaction to the facilitator, which will use it
|
|
369
|
+
// exactly as signed (not reconstruct it). This ensures signature validity.
|
|
365
370
|
let signedTransaction: InstanceType<typeof VersionedTransaction>;
|
|
366
371
|
try {
|
|
367
372
|
signedTransaction = await this.provider.signTransaction(transaction);
|
|
@@ -376,7 +381,8 @@ export class SVMProvider implements WalletAdapter {
|
|
|
376
381
|
);
|
|
377
382
|
}
|
|
378
383
|
|
|
379
|
-
// Serialize
|
|
384
|
+
// Serialize the FULL signed transaction (including any wallet modifications)
|
|
385
|
+
// The facilitator will use this exact transaction, adding only its signature
|
|
380
386
|
const serialized = signedTransaction.serialize();
|
|
381
387
|
|
|
382
388
|
const payload: SolanaPaymentPayload = {
|