@asgcard/sdk 1.0.4 → 1.0.6
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 +80 -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,19 @@ 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
|
+
// Auth entry valid for ~1 minute (12 ledgers at ~5s each)
|
|
19
|
+
// Keep this small — facilitator rejects "too far" expirations
|
|
20
|
+
const AUTH_ENTRY_LEDGER_OFFSET = 12;
|
|
21
|
+
const RPC_URL = "https://mainnet.sorobanrpc.com";
|
|
14
22
|
// ── Challenge parsing ────────────────────────────────────
|
|
15
23
|
const isChallenge = (input) => {
|
|
16
24
|
if (!input || typeof input !== "object")
|
|
@@ -27,13 +35,13 @@ const parseChallenge = (input) => {
|
|
|
27
35
|
exports.parseChallenge = parseChallenge;
|
|
28
36
|
// ── Balance check ────────────────────────────────────────
|
|
29
37
|
const checkBalance = async (params) => {
|
|
30
|
-
const
|
|
38
|
+
const c = new stellar_sdk_1.Contract(params.asset);
|
|
31
39
|
const account = await params.rpcServer.getAccount(params.publicKey);
|
|
32
40
|
const tx = new stellar_sdk_1.TransactionBuilder(account, {
|
|
33
41
|
fee: DEFAULT_FEE,
|
|
34
42
|
networkPassphrase: stellar_sdk_1.Networks.PUBLIC,
|
|
35
43
|
})
|
|
36
|
-
.addOperation(
|
|
44
|
+
.addOperation(c.call("balance", new stellar_sdk_1.Address(params.publicKey).toScVal()))
|
|
37
45
|
.setTimeout(30)
|
|
38
46
|
.build();
|
|
39
47
|
const sim = await params.rpcServer.simulateTransaction(tx);
|
|
@@ -67,76 +75,79 @@ const checkBalance = async (params) => {
|
|
|
67
75
|
exports.checkBalance = checkBalance;
|
|
68
76
|
// ── Build + sign payment transaction ─────────────────────
|
|
69
77
|
/**
|
|
70
|
-
* Build a Soroban SAC USDC transfer transaction
|
|
71
|
-
*
|
|
78
|
+
* Build a Soroban SAC USDC transfer transaction using AssembledTransaction,
|
|
79
|
+
* then sign auth entries with signAuthEntries().
|
|
72
80
|
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
81
|
+
* This is the canonical x402 Stellar approach:
|
|
82
|
+
* 1. AssembledTransaction.build() — simulates in Recording mode
|
|
83
|
+
* 2. signAuthEntries() — converts SourceAccount → Address credentials
|
|
84
|
+
* 3. simulate() — re-simulates in Enforcing mode to validate
|
|
85
|
+
* 4. Return XDR (unsigned envelope — facilitator signs at settle)
|
|
77
86
|
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
87
|
+
* Reference:
|
|
88
|
+
* - https://developers.stellar.org/docs/build/guides/transactions/signing-soroban-invocations#method-2-auth-entry-signing
|
|
89
|
+
* - @x402/stellar exact/client/scheme.ts
|
|
80
90
|
*/
|
|
81
91
|
const buildPaymentTransaction = async (params) => {
|
|
82
|
-
const
|
|
83
|
-
|
|
84
|
-
const tx =
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
92
|
+
const networkPassphrase = stellar_sdk_1.Networks.PUBLIC;
|
|
93
|
+
// Step 1: Build + simulate (Recording Mode) via AssembledTransaction
|
|
94
|
+
const tx = await stellar_sdk_1.contract.AssembledTransaction.build({
|
|
95
|
+
contractId: params.accept.asset,
|
|
96
|
+
method: "transfer",
|
|
97
|
+
args: [
|
|
98
|
+
(0, stellar_sdk_1.nativeToScVal)(params.publicKey, { type: "address" }),
|
|
99
|
+
(0, stellar_sdk_1.nativeToScVal)(params.accept.payTo, { type: "address" }),
|
|
100
|
+
(0, stellar_sdk_1.nativeToScVal)(BigInt(params.accept.amount), { type: "i128" }),
|
|
101
|
+
],
|
|
102
|
+
networkPassphrase,
|
|
103
|
+
rpcUrl: RPC_URL,
|
|
104
|
+
parseResultXdr: (result) => result,
|
|
105
|
+
});
|
|
106
|
+
// Check simulation result
|
|
107
|
+
if (!tx.simulation ||
|
|
108
|
+
stellar_sdk_1.rpc.Api.isSimulationError(tx.simulation)) {
|
|
109
|
+
const errMsg = tx.simulation
|
|
110
|
+
? tx.simulation.error
|
|
111
|
+
: "No simulation result";
|
|
97
112
|
throw new errors_1.PaymentError(`Transaction simulation failed: ${errMsg}`);
|
|
98
113
|
}
|
|
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");
|
|
114
|
+
// Step 2: Verify who needs to sign
|
|
115
|
+
const missingSigners = tx.needsNonInvokerSigningBy();
|
|
116
|
+
if (!missingSigners.includes(params.publicKey)) {
|
|
117
|
+
throw new errors_1.PaymentError(`Expected to sign with ${params.publicKey}, but got [${missingSigners.join(", ")}]`);
|
|
118
|
+
}
|
|
119
|
+
// Step 3: Sign auth entries — this converts SourceAccount → Address credentials
|
|
120
|
+
const signer = stellar_sdk_1.contract.basicNodeSigner(params.signer, networkPassphrase);
|
|
121
|
+
const latestLedger = tx.simulation.latestLedger;
|
|
122
|
+
const expiration = latestLedger + AUTH_ENTRY_LEDGER_OFFSET;
|
|
123
|
+
await tx.signAuthEntries({
|
|
124
|
+
address: params.publicKey,
|
|
125
|
+
signAuthEntry: signer.signAuthEntry,
|
|
126
|
+
expiration,
|
|
127
|
+
});
|
|
128
|
+
// Step 4: Re-simulate in Enforcing Mode to validate signatures
|
|
129
|
+
await tx.simulate();
|
|
130
|
+
if (!tx.simulation ||
|
|
131
|
+
stellar_sdk_1.rpc.Api.isSimulationError(tx.simulation)) {
|
|
132
|
+
const errMsg = tx.simulation
|
|
133
|
+
? tx.simulation.error
|
|
134
|
+
: "No enforcing simulation result";
|
|
135
|
+
throw new errors_1.PaymentError(`Enforcing simulation failed: ${errMsg}`);
|
|
136
|
+
}
|
|
137
|
+
// Step 5: Verify all signatures collected
|
|
138
|
+
const remainingSigners = tx.needsNonInvokerSigningBy();
|
|
139
|
+
if (remainingSigners.length > 0) {
|
|
140
|
+
throw new errors_1.PaymentError(`Missing signatures from: [${remainingSigners.join(", ")}]`);
|
|
136
141
|
}
|
|
137
|
-
//
|
|
138
|
-
|
|
139
|
-
|
|
142
|
+
// Step 6: Build final TX with correct fee from Enforcing simulation
|
|
143
|
+
const successSim = tx.simulation;
|
|
144
|
+
const finalTx = stellar_sdk_1.TransactionBuilder.cloneFrom(tx.built, {
|
|
145
|
+
fee: (DEFAULT_BASE_FEE_STROOPS + parseInt(successSim.minResourceFee, 10)).toString(),
|
|
146
|
+
sorobanData: tx.simulationData.transactionData,
|
|
147
|
+
networkPassphrase,
|
|
148
|
+
}).build();
|
|
149
|
+
// Return unsigned envelope XDR — facilitator signs at settle time
|
|
150
|
+
return finalTx.toXDR();
|
|
140
151
|
};
|
|
141
152
|
exports.buildPaymentTransaction = buildPaymentTransaction;
|
|
142
153
|
// ── Execute payment ──────────────────────────────────────
|
|
@@ -161,7 +172,7 @@ const executePayment = async (params) => {
|
|
|
161
172
|
throw error;
|
|
162
173
|
// Swallow non-balance errors — facilitator will verify
|
|
163
174
|
}
|
|
164
|
-
// Build, simulate,
|
|
175
|
+
// Build, simulate, sign auth entries
|
|
165
176
|
if (params.keypair) {
|
|
166
177
|
return (0, exports.buildPaymentTransaction)({
|
|
167
178
|
rpcServer: params.rpcServer,
|
|
@@ -170,15 +181,15 @@ const executePayment = async (params) => {
|
|
|
170
181
|
signer: params.keypair,
|
|
171
182
|
});
|
|
172
183
|
}
|
|
173
|
-
// WalletAdapter path
|
|
184
|
+
// WalletAdapter path — wallet must support signAuthEntry (SEP-43)
|
|
174
185
|
const adapter = params.walletAdapter;
|
|
175
|
-
const
|
|
186
|
+
const c = new stellar_sdk_1.Contract(params.accept.asset);
|
|
176
187
|
const sourceAccount = await params.rpcServer.getAccount(publicKey);
|
|
177
188
|
const tx = new stellar_sdk_1.TransactionBuilder(sourceAccount, {
|
|
178
189
|
fee: DEFAULT_FEE,
|
|
179
190
|
networkPassphrase: stellar_sdk_1.Networks.PUBLIC,
|
|
180
191
|
})
|
|
181
|
-
.addOperation(
|
|
192
|
+
.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
193
|
.setTimeout(SOROBAN_TIMEOUT)
|
|
183
194
|
.build();
|
|
184
195
|
const sim = await params.rpcServer.simulateTransaction(tx);
|
package/dist/utils/x402.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"x402.js","sourceRoot":"","sources":["../../src/utils/x402.ts"],"names":[],"mappings":";;;AAAA
|
|
1
|
+
{"version":3,"file":"x402.js","sourceRoot":"","sources":["../../src/utils/x402.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;GAQG;AACH,sDAS8B;AAC9B,sCAAmE;AAQnE,MAAM,WAAW,GAAG,OAAO,CAAC;AAC5B,MAAM,wBAAwB,GAAG,MAAM,CAAC;AACxC,MAAM,eAAe,GAAG,GAAG,CAAC;AAC5B,0DAA0D;AAC1D,8DAA8D;AAC9D,MAAM,wBAAwB,GAAG,EAAE,CAAC;AACpC,MAAM,OAAO,GAAG,gCAAgC,CAAC;AAEjD,4DAA4D;AAE5D,MAAM,WAAW,GAAG,CAAC,KAAc,EAA0B,EAAE;IAC7D,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IACtD,MAAM,CAAC,GAAG,KAAgC,CAAC;IAC3C,OAAO,CAAC,CAAC,WAAW,KAAK,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;AACzD,CAAC,CAAC;AAEK,MAAM,cAAc,GAAG,CAAC,KAAc,EAAc,EAAE;IAC3D,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACtD,MAAM,IAAI,qBAAY,CAAC,gCAAgC,CAAC,CAAC;IAC3D,CAAC;IACD,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAC1B,CAAC,CAAC;AALW,QAAA,cAAc,kBAKzB;AAEF,4DAA4D;AAErD,MAAM,YAAY,GAAG,KAAK,EAAE,MAKlC,EAAiB,EAAE;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