@asgcard/sdk 1.0.4 → 1.0.5
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/dist/utils/x402.d.ts +13 -8
- package/dist/utils/x402.js +77 -69
- package/dist/utils/x402.js.map +1 -1
- package/package.json +1 -1
package/dist/utils/x402.d.ts
CHANGED
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Builds and signs Soroban SAC USDC transfer transactions
|
|
5
5
|
* for the x402 payment protocol.
|
|
6
|
+
*
|
|
7
|
+
* Uses the canonical AssembledTransaction + signAuthEntries() approach
|
|
8
|
+
* as documented in the official Stellar docs and @x402/stellar.
|
|
6
9
|
*/
|
|
7
10
|
import { Keypair, rpc as StellarRpc } from "@stellar/stellar-sdk";
|
|
8
11
|
import type { WalletAdapter, X402Accept } from "../types";
|
|
@@ -14,16 +17,18 @@ export declare const checkBalance: (params: {
|
|
|
14
17
|
requiredAtomic: bigint;
|
|
15
18
|
}) => Promise<void>;
|
|
16
19
|
/**
|
|
17
|
-
* Build a Soroban SAC USDC transfer transaction
|
|
18
|
-
*
|
|
20
|
+
* Build a Soroban SAC USDC transfer transaction using AssembledTransaction,
|
|
21
|
+
* then sign auth entries with signAuthEntries().
|
|
19
22
|
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
23
|
+
* This is the canonical x402 Stellar approach:
|
|
24
|
+
* 1. AssembledTransaction.build() — simulates in Recording mode
|
|
25
|
+
* 2. signAuthEntries() — converts SourceAccount → Address credentials
|
|
26
|
+
* 3. simulate() — re-simulates in Enforcing mode to validate
|
|
27
|
+
* 4. Return XDR (unsigned envelope — facilitator signs at settle)
|
|
24
28
|
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
29
|
+
* Reference:
|
|
30
|
+
* - https://developers.stellar.org/docs/build/guides/transactions/signing-soroban-invocations#method-2-auth-entry-signing
|
|
31
|
+
* - @x402/stellar exact/client/scheme.ts
|
|
27
32
|
*/
|
|
28
33
|
export declare const buildPaymentTransaction: (params: {
|
|
29
34
|
rpcServer: StellarRpc.Server;
|
package/dist/utils/x402.js
CHANGED
|
@@ -6,11 +6,16 @@ exports.handleX402Payment = exports.buildPaymentPayload = exports.executePayment
|
|
|
6
6
|
*
|
|
7
7
|
* Builds and signs Soroban SAC USDC transfer transactions
|
|
8
8
|
* for the x402 payment protocol.
|
|
9
|
+
*
|
|
10
|
+
* Uses the canonical AssembledTransaction + signAuthEntries() approach
|
|
11
|
+
* as documented in the official Stellar docs and @x402/stellar.
|
|
9
12
|
*/
|
|
10
13
|
const stellar_sdk_1 = require("@stellar/stellar-sdk");
|
|
11
14
|
const errors_1 = require("../errors");
|
|
12
15
|
const DEFAULT_FEE = "50000";
|
|
16
|
+
const DEFAULT_BASE_FEE_STROOPS = 10_000;
|
|
13
17
|
const SOROBAN_TIMEOUT = 300;
|
|
18
|
+
const RPC_URL = "https://mainnet.sorobanrpc.com";
|
|
14
19
|
// ── Challenge parsing ────────────────────────────────────
|
|
15
20
|
const isChallenge = (input) => {
|
|
16
21
|
if (!input || typeof input !== "object")
|
|
@@ -27,13 +32,13 @@ const parseChallenge = (input) => {
|
|
|
27
32
|
exports.parseChallenge = parseChallenge;
|
|
28
33
|
// ── Balance check ────────────────────────────────────────
|
|
29
34
|
const checkBalance = async (params) => {
|
|
30
|
-
const
|
|
35
|
+
const c = new stellar_sdk_1.Contract(params.asset);
|
|
31
36
|
const account = await params.rpcServer.getAccount(params.publicKey);
|
|
32
37
|
const tx = new stellar_sdk_1.TransactionBuilder(account, {
|
|
33
38
|
fee: DEFAULT_FEE,
|
|
34
39
|
networkPassphrase: stellar_sdk_1.Networks.PUBLIC,
|
|
35
40
|
})
|
|
36
|
-
.addOperation(
|
|
41
|
+
.addOperation(c.call("balance", new stellar_sdk_1.Address(params.publicKey).toScVal()))
|
|
37
42
|
.setTimeout(30)
|
|
38
43
|
.build();
|
|
39
44
|
const sim = await params.rpcServer.simulateTransaction(tx);
|
|
@@ -67,76 +72,79 @@ const checkBalance = async (params) => {
|
|
|
67
72
|
exports.checkBalance = checkBalance;
|
|
68
73
|
// ── Build + sign payment transaction ─────────────────────
|
|
69
74
|
/**
|
|
70
|
-
* Build a Soroban SAC USDC transfer transaction
|
|
71
|
-
*
|
|
75
|
+
* Build a Soroban SAC USDC transfer transaction using AssembledTransaction,
|
|
76
|
+
* then sign auth entries with signAuthEntries().
|
|
72
77
|
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
78
|
+
* This is the canonical x402 Stellar approach:
|
|
79
|
+
* 1. AssembledTransaction.build() — simulates in Recording mode
|
|
80
|
+
* 2. signAuthEntries() — converts SourceAccount → Address credentials
|
|
81
|
+
* 3. simulate() — re-simulates in Enforcing mode to validate
|
|
82
|
+
* 4. Return XDR (unsigned envelope — facilitator signs at settle)
|
|
77
83
|
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
84
|
+
* Reference:
|
|
85
|
+
* - https://developers.stellar.org/docs/build/guides/transactions/signing-soroban-invocations#method-2-auth-entry-signing
|
|
86
|
+
* - @x402/stellar exact/client/scheme.ts
|
|
80
87
|
*/
|
|
81
88
|
const buildPaymentTransaction = async (params) => {
|
|
82
|
-
const
|
|
83
|
-
|
|
84
|
-
const tx =
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
89
|
+
const networkPassphrase = stellar_sdk_1.Networks.PUBLIC;
|
|
90
|
+
// Step 1: Build + simulate (Recording Mode) via AssembledTransaction
|
|
91
|
+
const tx = await stellar_sdk_1.contract.AssembledTransaction.build({
|
|
92
|
+
contractId: params.accept.asset,
|
|
93
|
+
method: "transfer",
|
|
94
|
+
args: [
|
|
95
|
+
(0, stellar_sdk_1.nativeToScVal)(params.publicKey, { type: "address" }),
|
|
96
|
+
(0, stellar_sdk_1.nativeToScVal)(params.accept.payTo, { type: "address" }),
|
|
97
|
+
(0, stellar_sdk_1.nativeToScVal)(BigInt(params.accept.amount), { type: "i128" }),
|
|
98
|
+
],
|
|
99
|
+
networkPassphrase,
|
|
100
|
+
rpcUrl: RPC_URL,
|
|
101
|
+
parseResultXdr: (result) => result,
|
|
102
|
+
});
|
|
103
|
+
// Check simulation result
|
|
104
|
+
if (!tx.simulation ||
|
|
105
|
+
stellar_sdk_1.rpc.Api.isSimulationError(tx.simulation)) {
|
|
106
|
+
const errMsg = tx.simulation
|
|
107
|
+
? tx.simulation.error
|
|
108
|
+
: "No simulation result";
|
|
97
109
|
throw new errors_1.PaymentError(`Transaction simulation failed: ${errMsg}`);
|
|
98
110
|
}
|
|
99
|
-
//
|
|
100
|
-
const
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
finalOp.auth = signedAuthEntries;
|
|
127
|
-
// We need to rebuild the XDR with the signed auth entries.
|
|
128
|
-
// The envelope itself stays unsigned — facilitator signs at settle time.
|
|
129
|
-
const env = finalAssembled.toEnvelope();
|
|
130
|
-
const txBody = env.v1().tx();
|
|
131
|
-
const ops = txBody.operations();
|
|
132
|
-
// Replace the auth in the XDR
|
|
133
|
-
const invokeHostFn = ops[0].body().invokeHostFunctionOp();
|
|
134
|
-
invokeHostFn.auth(signedAuthEntries);
|
|
135
|
-
return env.toXDR("base64");
|
|
111
|
+
// Step 2: Verify who needs to sign
|
|
112
|
+
const missingSigners = tx.needsNonInvokerSigningBy();
|
|
113
|
+
if (!missingSigners.includes(params.publicKey)) {
|
|
114
|
+
throw new errors_1.PaymentError(`Expected to sign with ${params.publicKey}, but got [${missingSigners.join(", ")}]`);
|
|
115
|
+
}
|
|
116
|
+
// Step 3: Sign auth entries — this converts SourceAccount → Address credentials
|
|
117
|
+
const signer = stellar_sdk_1.contract.basicNodeSigner(params.signer, networkPassphrase);
|
|
118
|
+
const latestLedger = tx.simulation.latestLedger;
|
|
119
|
+
const expiration = latestLedger + 60; // ~5 minutes
|
|
120
|
+
await tx.signAuthEntries({
|
|
121
|
+
address: params.publicKey,
|
|
122
|
+
signAuthEntry: signer.signAuthEntry,
|
|
123
|
+
expiration,
|
|
124
|
+
});
|
|
125
|
+
// Step 4: Re-simulate in Enforcing Mode to validate signatures
|
|
126
|
+
await tx.simulate();
|
|
127
|
+
if (!tx.simulation ||
|
|
128
|
+
stellar_sdk_1.rpc.Api.isSimulationError(tx.simulation)) {
|
|
129
|
+
const errMsg = tx.simulation
|
|
130
|
+
? tx.simulation.error
|
|
131
|
+
: "No enforcing simulation result";
|
|
132
|
+
throw new errors_1.PaymentError(`Enforcing simulation failed: ${errMsg}`);
|
|
133
|
+
}
|
|
134
|
+
// Step 5: Verify all signatures collected
|
|
135
|
+
const remainingSigners = tx.needsNonInvokerSigningBy();
|
|
136
|
+
if (remainingSigners.length > 0) {
|
|
137
|
+
throw new errors_1.PaymentError(`Missing signatures from: [${remainingSigners.join(", ")}]`);
|
|
136
138
|
}
|
|
137
|
-
//
|
|
138
|
-
|
|
139
|
-
|
|
139
|
+
// Step 6: Build final TX with correct fee from Enforcing simulation
|
|
140
|
+
const successSim = tx.simulation;
|
|
141
|
+
const finalTx = stellar_sdk_1.TransactionBuilder.cloneFrom(tx.built, {
|
|
142
|
+
fee: (DEFAULT_BASE_FEE_STROOPS + parseInt(successSim.minResourceFee, 10)).toString(),
|
|
143
|
+
sorobanData: tx.simulationData.transactionData,
|
|
144
|
+
networkPassphrase,
|
|
145
|
+
}).build();
|
|
146
|
+
// Return unsigned envelope XDR — facilitator signs at settle time
|
|
147
|
+
return finalTx.toXDR();
|
|
140
148
|
};
|
|
141
149
|
exports.buildPaymentTransaction = buildPaymentTransaction;
|
|
142
150
|
// ── Execute payment ──────────────────────────────────────
|
|
@@ -161,7 +169,7 @@ const executePayment = async (params) => {
|
|
|
161
169
|
throw error;
|
|
162
170
|
// Swallow non-balance errors — facilitator will verify
|
|
163
171
|
}
|
|
164
|
-
// Build, simulate,
|
|
172
|
+
// Build, simulate, sign auth entries
|
|
165
173
|
if (params.keypair) {
|
|
166
174
|
return (0, exports.buildPaymentTransaction)({
|
|
167
175
|
rpcServer: params.rpcServer,
|
|
@@ -170,15 +178,15 @@ const executePayment = async (params) => {
|
|
|
170
178
|
signer: params.keypair,
|
|
171
179
|
});
|
|
172
180
|
}
|
|
173
|
-
// WalletAdapter path
|
|
181
|
+
// WalletAdapter path — wallet must support signAuthEntry (SEP-43)
|
|
174
182
|
const adapter = params.walletAdapter;
|
|
175
|
-
const
|
|
183
|
+
const c = new stellar_sdk_1.Contract(params.accept.asset);
|
|
176
184
|
const sourceAccount = await params.rpcServer.getAccount(publicKey);
|
|
177
185
|
const tx = new stellar_sdk_1.TransactionBuilder(sourceAccount, {
|
|
178
186
|
fee: DEFAULT_FEE,
|
|
179
187
|
networkPassphrase: stellar_sdk_1.Networks.PUBLIC,
|
|
180
188
|
})
|
|
181
|
-
.addOperation(
|
|
189
|
+
.addOperation(c.call("transfer", new stellar_sdk_1.Address(publicKey).toScVal(), new stellar_sdk_1.Address(params.accept.payTo).toScVal(), (0, stellar_sdk_1.nativeToScVal)(BigInt(params.accept.amount), { type: "i128" })))
|
|
182
190
|
.setTimeout(SOROBAN_TIMEOUT)
|
|
183
191
|
.build();
|
|
184
192
|
const sim = await params.rpcServer.simulateTransaction(tx);
|
package/dist/utils/x402.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"x402.js","sourceRoot":"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