@atumlabs/mppx-atum-escrow 0.3.0 → 0.4.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/CHANGELOG.md +31 -0
- package/README.md +85 -9
- package/THIRD-PARTY-NOTICES.txt +7 -0
- package/dist/{chunk-ZFA5SSUP.js → chunk-KRSFEITH.js} +3364 -409
- package/dist/{chunk-Z3AUNEU5.js → chunk-OEEC5P3E.js} +1295 -282
- package/dist/{chunk-4YD6566T.js → chunk-TPLD2L6B.js} +17 -7
- package/dist/client.d.ts +180 -42
- package/dist/client.js +9 -4
- package/dist/index.d.ts +3 -77
- package/dist/index.js +10 -5
- package/dist/{internal-9tB7y-A7.d.ts → internal-CJEu9yUF.d.ts} +113 -24
- package/dist/server.d.ts +38 -42
- package/dist/server.js +2 -2
- package/package.json +10 -8
|
@@ -3,35 +3,34 @@ import { PaymentRequest } from './generated/index.js';
|
|
|
3
3
|
import { Challenge, Credential } from 'mppx';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* A message that has been cryptographically signed to prove authorization.
|
|
7
|
-
* The signature proves you control the wallet that's sending funds.
|
|
8
|
-
*
|
|
6
|
+
* A message that has been cryptographically signed to prove authorization. The signature proves you control the wallet that's sending funds.
|
|
9
7
|
*/
|
|
10
8
|
type SignedMessage = {
|
|
11
9
|
/**
|
|
12
10
|
* The data that was signed. Format depends on the blockchain:
|
|
13
11
|
* - EVM: Hex-encoded message hash (with 0x prefix)
|
|
14
|
-
* - Solana:
|
|
12
|
+
* - Solana: Hex-encoded message hash (with 0x prefix)
|
|
15
13
|
* - Tron: Hex-encoded message hash (possibly without 0x prefix)
|
|
16
|
-
*
|
|
17
14
|
*/
|
|
18
15
|
message: string;
|
|
19
16
|
/**
|
|
20
|
-
* Optional: If 'message' contains a hash, this field contains the original data
|
|
21
|
-
* before it was hashed. Useful for verification and debugging.
|
|
22
|
-
*
|
|
17
|
+
* Optional: If 'message' contains a hash, this field contains the original data before it was hashed. Useful for verification and debugging.
|
|
23
18
|
*/
|
|
24
19
|
message_prehash?: string;
|
|
25
20
|
/**
|
|
26
|
-
* The cryptographic signature proving you authorized this message.
|
|
27
|
-
* Format varies by blockchain (hex for EVM/Tron, base58 for Solana).
|
|
28
|
-
*
|
|
21
|
+
* The cryptographic signature proving you authorized this message. Hex-encoded with a 0x prefix on every supported chain. The signer's own public key is base58 on Solana, but the signature itself is not.
|
|
29
22
|
*/
|
|
30
23
|
signature: string;
|
|
24
|
+
/**
|
|
25
|
+
* Optional chain-specific payload containing additional signing context (e.g., delegate_signer for Solana). Preserved through the pipeline for downstream consumers.
|
|
26
|
+
*/
|
|
27
|
+
payload?: {
|
|
28
|
+
[key: string]: unknown;
|
|
29
|
+
};
|
|
31
30
|
};
|
|
32
31
|
|
|
33
32
|
/**
|
|
34
|
-
* Chain defaults returned by the payment gateway /defaults endpoint.
|
|
33
|
+
* Chain defaults returned by the payment gateway /v1/defaults endpoint.
|
|
35
34
|
*/
|
|
36
35
|
interface ChainDefaults {
|
|
37
36
|
escrowContract: string;
|
|
@@ -40,9 +39,22 @@ interface ChainDefaults {
|
|
|
40
39
|
fulfillmentVerifierEndpoint: string;
|
|
41
40
|
fulfillmentProxy: string;
|
|
42
41
|
permit2Contract?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Which deposit witness the escrow deployed on this chain pins, surfaced by payment-gw
|
|
44
|
+
* `/v1/defaults` as `deposit_witness_version` (CORE-2033). EVM/Tron only — Solana carries the
|
|
45
|
+
* same fact in `svmSignatureDomainVersion` below.
|
|
46
|
+
*
|
|
47
|
+
* `4` and above select the CORE-2120 four-member witness
|
|
48
|
+
* (`depositRequestHash`, `destination`, `reserver`, `releaser`); `3` selects the two-member
|
|
49
|
+
* witness a not-yet-redeployed escrow pins. ABSENT means four — see the sender-auth package's
|
|
50
|
+
* `ChainDefaults.depositWitnessVersion` for why absence is the permissive default.
|
|
51
|
+
*
|
|
52
|
+
* Passed through to the sender_auth adapter verbatim; this type only has to carry it.
|
|
53
|
+
*/
|
|
54
|
+
depositWitnessVersion?: number;
|
|
43
55
|
/**
|
|
44
56
|
* V3 Solana escrow domain-separation fields, surfaced by payment-gw
|
|
45
|
-
* `/defaults` for Solana source chains. Used to build the EscrowDomain that the
|
|
57
|
+
* `/v1/defaults` for Solana source chains. Used to build the EscrowDomain that the
|
|
46
58
|
* V3 deposit hash binds to. Absent for EVM/Tron.
|
|
47
59
|
*/
|
|
48
60
|
svmSignatureClusterId?: string;
|
|
@@ -115,7 +127,8 @@ interface TurnkeyConfig {
|
|
|
115
127
|
/**
|
|
116
128
|
* Chain-native address the signer is expected to resolve to. Verified against
|
|
117
129
|
* the address Turnkey returns at initialize(); a mismatch fails fast rather
|
|
118
|
-
* than signing as the wrong depositor.
|
|
130
|
+
* than signing as the wrong depositor. Omit it to skip the check; an empty
|
|
131
|
+
* value is rejected rather than treated as omitted.
|
|
119
132
|
*/
|
|
120
133
|
pinnedAddress?: string;
|
|
121
134
|
/**
|
|
@@ -125,7 +138,10 @@ interface TurnkeyConfig {
|
|
|
125
138
|
logger?: Logger;
|
|
126
139
|
meter?: Meter;
|
|
127
140
|
}
|
|
128
|
-
/**
|
|
141
|
+
/**
|
|
142
|
+
* Options selecting a sender-signing provider. Defaults to the private-key provider.
|
|
143
|
+
* `pinnedAddress` behaves the same on both: omitted skips the sender check, empty is rejected.
|
|
144
|
+
*/
|
|
129
145
|
type SenderSignerOptions = {
|
|
130
146
|
provider?: 'raw';
|
|
131
147
|
privateKey: string;
|
|
@@ -134,6 +150,74 @@ type SenderSignerOptions = {
|
|
|
134
150
|
provider: 'turnkey';
|
|
135
151
|
} & TurnkeyConfig);
|
|
136
152
|
|
|
153
|
+
/**
|
|
154
|
+
* This file was automatically generated by json-schema-to-typescript.
|
|
155
|
+
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
|
156
|
+
* and run json-schema-to-typescript to regenerate this file.
|
|
157
|
+
*/
|
|
158
|
+
/**
|
|
159
|
+
* The `extra.atum` object carried inside an atum-escrow x402 PaymentRequirements entry (accepts[]): the merchant's receive-side plus the contract/role addresses and deadline budgets. Scheme-specific data the standard x402 `extra` bag treats as opaque, so it is owned here and shared by all role mechanisms. Addresses are chain-general: an EVM `0x`-hex address (20 bytes) or a base58-encoded address (Solana/Tron), per the field's CAIP-2 chain.
|
|
160
|
+
*/
|
|
161
|
+
interface AtumEscrowExtra$1 {
|
|
162
|
+
/**
|
|
163
|
+
* Where the merchant receives (CAIP-2 chain, token, address).
|
|
164
|
+
*/
|
|
165
|
+
destination: {
|
|
166
|
+
/**
|
|
167
|
+
* CAIP-2 destination chain id (e.g. eip155:42161).
|
|
168
|
+
*/
|
|
169
|
+
network: string;
|
|
170
|
+
/**
|
|
171
|
+
* Destination token contract address (EVM hex or base58, per the destination chain).
|
|
172
|
+
*/
|
|
173
|
+
asset: string;
|
|
174
|
+
/**
|
|
175
|
+
* Merchant receive address (EVM hex or base58, per the destination chain).
|
|
176
|
+
*/
|
|
177
|
+
address: string;
|
|
178
|
+
};
|
|
179
|
+
/**
|
|
180
|
+
* Exact amount the merchant receives, in atomic token units.
|
|
181
|
+
*/
|
|
182
|
+
fulfillmentAmount: string;
|
|
183
|
+
/**
|
|
184
|
+
* Source-chain escrow contract (the x402 payTo); EVM hex or base58, per the source chain.
|
|
185
|
+
*/
|
|
186
|
+
escrow: string;
|
|
187
|
+
/**
|
|
188
|
+
* Destination-chain fulfillment proxy contract (EVM hex or base58, per the destination chain).
|
|
189
|
+
*/
|
|
190
|
+
fulfillmentProxy: string;
|
|
191
|
+
/**
|
|
192
|
+
* Atum reserver role address (escrow deposit witness); EVM hex or base58, per the source chain.
|
|
193
|
+
*/
|
|
194
|
+
reserver: string;
|
|
195
|
+
/**
|
|
196
|
+
* Atum releaser role address (escrow deposit witness); EVM hex or base58, per the source chain.
|
|
197
|
+
*/
|
|
198
|
+
releaser: string;
|
|
199
|
+
/**
|
|
200
|
+
* Source-chain fulfillment-verifier endpoint the payment request carries. The verifier account and the quote_selector are the releaser and reserver respectively (the network derives the deposit witness roles from them), so only the endpoint is not otherwise present in this object.
|
|
201
|
+
*/
|
|
202
|
+
fulfillmentVerifierEndpoint: string;
|
|
203
|
+
/**
|
|
204
|
+
* Recommended quote-deadline budget in seconds, relative to signing time.
|
|
205
|
+
*/
|
|
206
|
+
quoteDeadlineSeconds: number;
|
|
207
|
+
/**
|
|
208
|
+
* Recommended fulfillment-deadline budget in seconds, relative to signing time.
|
|
209
|
+
*/
|
|
210
|
+
fulfillmentDeadlineSeconds: number;
|
|
211
|
+
/**
|
|
212
|
+
* Solana source only: cluster name used to build the 32-byte cluster_id in the V3 escrow signature domain. Optional; the facilitator requires it for a Solana source.
|
|
213
|
+
*/
|
|
214
|
+
svmSignatureClusterId?: string;
|
|
215
|
+
/**
|
|
216
|
+
* Solana source only: escrow signature-domain version (V3 domain separation). Optional; required for a Solana source.
|
|
217
|
+
*/
|
|
218
|
+
svmSignatureDomainVersion?: number;
|
|
219
|
+
}
|
|
220
|
+
|
|
137
221
|
/**
|
|
138
222
|
* This file was automatically generated by json-schema-to-typescript.
|
|
139
223
|
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
|
@@ -223,10 +307,6 @@ interface AtumEscrowExtra {
|
|
|
223
307
|
* Solana source only: escrow signature-domain version (V3 domain separation). Optional; required for a Solana source.
|
|
224
308
|
*/
|
|
225
309
|
svmSignatureDomainVersion?: number;
|
|
226
|
-
/**
|
|
227
|
-
* Solana source only: merchant-stamped issue time in epoch seconds. The merchant reads the cluster clock so the client makes no RPC and the 402 stays self-contained. Optional; required for a Solana source.
|
|
228
|
-
*/
|
|
229
|
-
issuedAt?: string;
|
|
230
310
|
}
|
|
231
311
|
|
|
232
312
|
/**
|
|
@@ -304,10 +384,19 @@ declare const CredentialPayloadSchema: z.ZodMiniObject<{
|
|
|
304
384
|
}, z.core.$strip>;
|
|
305
385
|
/**
|
|
306
386
|
* The `charge` challenge request — the canonical `AtumEscrowRequest` shape (source option
|
|
307
|
-
* + the destination/corridor `extra`)
|
|
308
|
-
*
|
|
387
|
+
* + the destination/corridor `extra`), plus the Solana issue time this scheme stamps.
|
|
388
|
+
*
|
|
389
|
+
* `issuedAt` is declared here rather than borrowed, because the shared x402 `extra` contract
|
|
390
|
+
* does not carry it: an x402 resource server rebuilds its requirements on the paid request and
|
|
391
|
+
* compares them against what the payer echoed, which no clock reading survives. MPP has no such
|
|
392
|
+
* rebuild, so a merchant-stamped issue time remains coherent here — and is declared where it is
|
|
393
|
+
* emitted ({@link buildChargeRequest}) rather than inherited from a contract that dropped it.
|
|
309
394
|
*/
|
|
310
|
-
type ChargeRequest = AtumEscrowRequest
|
|
395
|
+
type ChargeRequest = Omit<AtumEscrowRequest, 'extra'> & {
|
|
396
|
+
extra: AtumEscrowExtra$1 & {
|
|
397
|
+
issuedAt?: string;
|
|
398
|
+
};
|
|
399
|
+
};
|
|
311
400
|
/** The `charge` credential payload, carrying the signed Atum payment request. */
|
|
312
401
|
interface ChargeCredentialPayload {
|
|
313
402
|
/** The signed Atum payment request: source/destination, amounts, and authorizations. */
|
|
@@ -318,7 +407,7 @@ interface ChargeCredentialPayload {
|
|
|
318
407
|
* (equal to {@link ChargeRequest} by the compile-time guard above, and compatible with
|
|
319
408
|
* the framework's `Record<string, unknown>` request constraint).
|
|
320
409
|
*/
|
|
321
|
-
type AtumEscrowChallenge = Challenge.Challenge<z.infer<typeof ChargeRequestSchema>,
|
|
410
|
+
type AtumEscrowChallenge = Challenge.Challenge<z.infer<typeof ChargeRequestSchema>, 'charge', 'atum-escrow'>;
|
|
322
411
|
/** The MPP credential for this method. */
|
|
323
412
|
type AtumEscrowCredential = Credential.Credential<ChargeCredentialPayload, AtumEscrowChallenge>;
|
|
324
413
|
/**
|
|
@@ -362,4 +451,4 @@ declare const atumEscrowChargeMethod: {
|
|
|
362
451
|
};
|
|
363
452
|
};
|
|
364
453
|
|
|
365
|
-
export { type AtumEscrowChallenge as A, type ChargeCredentialPayload as C, INTENT as I, METHOD_NAME as M, type SenderSigner as S, type AtumEscrowCredential as a, type
|
|
454
|
+
export { type AtumEscrowChallenge as A, type ChargeCredentialPayload as C, INTENT as I, METHOD_NAME as M, type SenderSigner as S, type AtumEscrowCredential as a, type AtumEscrowExtra$1 as b, type AtumEscrowRequest as c, type ChargeRequest as d, ChargeRequestSchema as e, CredentialPayloadSchema as f, INTENT_ID_META_KEY as g, type SenderSignerOptions as h, atumEscrowChargeMethod as i, type ChainDefaults as j, type SolanaClusterUnixTimeReader as k };
|
package/dist/server.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { j as ChainDefaults, c as ChargeRequest } from './internal-9tB7y-A7.js';
|
|
4
|
-
export { A as AtumEscrowChallenge, a as AtumEscrowCredential, C as ChargeCredentialPayload, d as ChargeRequestSchema, e as CredentialPayloadSchema, I as INTENT, f as INTENT_ID_META_KEY, M as METHOD_NAME, h as atumEscrowChargeMethod } from './internal-9tB7y-A7.js';
|
|
1
|
+
import { i as atumEscrowChargeMethod, j as ChainDefaults, d as ChargeRequest } from './internal-CJEu9yUF.js';
|
|
2
|
+
export { A as AtumEscrowChallenge, a as AtumEscrowCredential, C as ChargeCredentialPayload, e as ChargeRequestSchema, f as CredentialPayloadSchema, I as INTENT, g as INTENT_ID_META_KEY, M as METHOD_NAME } from './internal-CJEu9yUF.js';
|
|
5
3
|
import { Errors, Receipt, Method } from 'mppx';
|
|
6
4
|
import { PaymentRequest } from './generated/index.js';
|
|
7
5
|
export { PaymentRequest } from './generated/index.js';
|
|
6
|
+
import 'zod/mini';
|
|
8
7
|
|
|
9
8
|
/**
|
|
10
9
|
* This file was automatically generated by json-schema-to-typescript.
|
|
@@ -178,6 +177,26 @@ declare class PaymentRejectedError extends Errors.BadRequestError {
|
|
|
178
177
|
});
|
|
179
178
|
}
|
|
180
179
|
|
|
180
|
+
/**
|
|
181
|
+
* Merchant-side entry point for the Atum escrow MPP payment method.
|
|
182
|
+
*
|
|
183
|
+
* Register the returned method into your `mppx` server to accept `atum-escrow`
|
|
184
|
+
* payments, and use {@link buildChargeRequest} / {@link corridorFromDefaults} to construct
|
|
185
|
+
* the `402` challenges. Verification recovers the source-chain deposit authorization per
|
|
186
|
+
* chain (EVM, Tron, Solana) and settles through the Atum Payment Gateway.
|
|
187
|
+
*
|
|
188
|
+
* @example
|
|
189
|
+
* ```ts
|
|
190
|
+
* import { Mppx } from 'mppx/server'
|
|
191
|
+
* import { registerServer } from '@atumlabs/mppx-atum-escrow/server'
|
|
192
|
+
*
|
|
193
|
+
* const method = registerServer({ submitter })
|
|
194
|
+
* const mppx = Mppx.create({ realm: 'api.example.com', secretKey, methods: [method] })
|
|
195
|
+
* ```
|
|
196
|
+
*
|
|
197
|
+
* @packageDocumentation
|
|
198
|
+
*/
|
|
199
|
+
|
|
181
200
|
/** One source chain/token the merchant accepts payment from. */
|
|
182
201
|
interface AtumEscrowSource {
|
|
183
202
|
/** CAIP-2 source chain id (e.g. `eip155:8453`, `tron:mainnet`, `solana:<genesis>`). */
|
|
@@ -221,7 +240,7 @@ interface AtumEscrowCorridor {
|
|
|
221
240
|
sources: AtumEscrowSource[];
|
|
222
241
|
}
|
|
223
242
|
/** Lifecycle state the gateway reports for a payment. */
|
|
224
|
-
type PaymentSettlementStatus =
|
|
243
|
+
type PaymentSettlementStatus = 'pending' | 'completed' | 'failed' | 'cancelled';
|
|
225
244
|
/** What a {@link PaymentSubmitter} resolves with. */
|
|
226
245
|
interface PaymentSubmitResult {
|
|
227
246
|
/** The gateway's payment id. Present whenever the payment was accepted. */
|
|
@@ -269,6 +288,18 @@ type AtumEscrowReceipt = Receipt.Receipt & {
|
|
|
269
288
|
/** The full settlement confirmation. */
|
|
270
289
|
fulfillmentConfirmation: FulfillmentConfirmation;
|
|
271
290
|
};
|
|
291
|
+
/**
|
|
292
|
+
* The merchant-side method {@link registerServer} returns, ready to register into an
|
|
293
|
+
* `mppx` server via `Mppx.create({ methods: [method] })`.
|
|
294
|
+
*
|
|
295
|
+
* Name this type when the method is built in one place and registered in another — for
|
|
296
|
+
* example a factory that assembles the corridor and submitter for your environment. Its
|
|
297
|
+
* `verify()` resolves with an {@link AtumEscrowReceipt}, so the settlement confirmation is
|
|
298
|
+
* available directly on the result.
|
|
299
|
+
*/
|
|
300
|
+
type AtumEscrowServer = Omit<Method.Server<typeof atumEscrowChargeMethod, {}, undefined, {}, undefined>, 'verify'> & {
|
|
301
|
+
verify: (parameters: Method.VerifyContext<typeof atumEscrowChargeMethod>) => Promise<AtumEscrowReceipt>;
|
|
302
|
+
};
|
|
272
303
|
/**
|
|
273
304
|
* Configure the merchant side of the method.
|
|
274
305
|
*
|
|
@@ -284,42 +315,7 @@ type AtumEscrowReceipt = Receipt.Receipt & {
|
|
|
284
315
|
*
|
|
285
316
|
* @param config - the gateway submitter and options.
|
|
286
317
|
*/
|
|
287
|
-
declare function registerServer(config: AtumEscrowServerConfig):
|
|
288
|
-
readonly name: "atum-escrow";
|
|
289
|
-
readonly intent: "charge";
|
|
290
|
-
readonly schema: {
|
|
291
|
-
readonly request: z.ZodMiniObject<{
|
|
292
|
-
source: z.ZodMiniObject<{
|
|
293
|
-
network: z.ZodMiniString<string>;
|
|
294
|
-
asset: z.ZodMiniString<string>;
|
|
295
|
-
amount: z.ZodMiniString<string>;
|
|
296
|
-
}, zod_v4_core.$strip>;
|
|
297
|
-
extra: z.ZodMiniObject<{
|
|
298
|
-
destination: z.ZodMiniObject<{
|
|
299
|
-
network: z.ZodMiniString<string>;
|
|
300
|
-
asset: z.ZodMiniString<string>;
|
|
301
|
-
address: z.ZodMiniString<string>;
|
|
302
|
-
}, zod_v4_core.$strip>;
|
|
303
|
-
fulfillmentAmount: z.ZodMiniString<string>;
|
|
304
|
-
escrow: z.ZodMiniString<string>;
|
|
305
|
-
fulfillmentProxy: z.ZodMiniString<string>;
|
|
306
|
-
reserver: z.ZodMiniString<string>;
|
|
307
|
-
releaser: z.ZodMiniString<string>;
|
|
308
|
-
fulfillmentVerifierEndpoint: z.ZodMiniString<string>;
|
|
309
|
-
quoteDeadlineSeconds: z.ZodMiniNumber<number>;
|
|
310
|
-
fulfillmentDeadlineSeconds: z.ZodMiniNumber<number>;
|
|
311
|
-
svmSignatureClusterId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
312
|
-
svmSignatureDomainVersion: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
313
|
-
issuedAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
314
|
-
}, zod_v4_core.$strip>;
|
|
315
|
-
}, zod_v4_core.$strip>;
|
|
316
|
-
readonly credential: {
|
|
317
|
-
readonly payload: z.ZodMiniObject<{
|
|
318
|
-
paymentRequest: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>;
|
|
319
|
-
}, zod_v4_core.$strip>;
|
|
320
|
-
};
|
|
321
|
-
};
|
|
322
|
-
}, {}, undefined, {}, undefined>;
|
|
318
|
+
declare function registerServer(config: AtumEscrowServerConfig): AtumEscrowServer;
|
|
323
319
|
/**
|
|
324
320
|
* Validate a corridor's shape and per-source addresses. Run automatically by
|
|
325
321
|
* {@link buildChargeRequest}; call it directly to fail fast at merchant startup.
|
|
@@ -444,4 +440,4 @@ declare function corridorFromDefaults(defaults: ChainDefaultsSource, params: {
|
|
|
444
440
|
fulfillmentDeadlineSeconds: number;
|
|
445
441
|
}): Promise<AtumEscrowCorridor>;
|
|
446
442
|
|
|
447
|
-
export { type AtumEscrowCorridor, type AtumEscrowReceipt, type AtumEscrowServerConfig, type AtumEscrowSource, type ChainDefaultsSource, type ChargeChallenge, ChargeRequest, type FulfillmentConfirmation, PaymentRejectedError, type PaymentSettlementStatus, type PaymentSubmitResult, type PaymentSubmitter, type SettlementErrorDetails, SettlementFailedError, SettlementPendingError, buildChargeChallenge, buildChargeRequest, corridorFromDefaults, isPaymentRejected, isSettlementFailed, isSettlementPending, registerServer, validateCorridor };
|
|
443
|
+
export { type AtumEscrowCorridor, type AtumEscrowReceipt, type AtumEscrowServer, type AtumEscrowServerConfig, type AtumEscrowSource, type ChainDefaultsSource, type ChargeChallenge, ChargeRequest, type FulfillmentConfirmation, PaymentRejectedError, type PaymentSettlementStatus, type PaymentSubmitResult, type PaymentSubmitter, type SettlementErrorDetails, SettlementFailedError, SettlementPendingError, atumEscrowChargeMethod, buildChargeChallenge, buildChargeRequest, corridorFromDefaults, isPaymentRejected, isSettlementFailed, isSettlementPending, registerServer, validateCorridor };
|
package/dist/server.js
CHANGED
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
isSettlementPending,
|
|
18
18
|
registerServer,
|
|
19
19
|
validateCorridor
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-TPLD2L6B.js";
|
|
21
21
|
import {
|
|
22
22
|
ChargeRequestSchema,
|
|
23
23
|
CredentialPayloadSchema,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
INTENT_ID_META_KEY,
|
|
26
26
|
METHOD_NAME,
|
|
27
27
|
atumEscrowChargeMethod
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-OEEC5P3E.js";
|
|
29
29
|
export {
|
|
30
30
|
ChargeRequestSchema,
|
|
31
31
|
CredentialPayloadSchema,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atumlabs/mppx-atum-escrow",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Atum cross-chain escrow payment method for the Machine Payments Protocol (MPP).",
|
|
5
5
|
"author": "Atum Labs, Inc.",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -54,13 +54,14 @@
|
|
|
54
54
|
"THIRD-PARTY-NOTICES.txt"
|
|
55
55
|
],
|
|
56
56
|
"scripts": {
|
|
57
|
-
"prebuild:deps": "node -e \"
|
|
58
|
-
"build:deps": "
|
|
59
|
-
"build": "
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
57
|
+
"prebuild:deps": "node -e \"if(!require('fs').existsSync('../pnpm-workspace.yaml')){console.error('protocol workspace not found at ../pnpm-workspace.yaml. Is this checked out inside the protocol monorepo?');process.exit(1)}\"",
|
|
58
|
+
"build:deps": "pnpm --filter \"@atum-labs/mppx-atum-escrow^...\" run build",
|
|
59
|
+
"build": "tsup && node scripts/stamp-entry-headers.mjs",
|
|
60
|
+
"lint": "eslint . --max-warnings 0",
|
|
61
|
+
"typecheck": "tsc --noEmit",
|
|
62
|
+
"typecheck:tests": "tsc -p tsconfig.test.json",
|
|
63
|
+
"test": "pnpm run typecheck:tests && vitest run",
|
|
64
|
+
"clean": "rm -rf dist && pnpm --filter \"@atum-labs/mppx-atum-escrow^...\" run clean",
|
|
64
65
|
"check:publishable": "node scripts/check-publishable.mjs",
|
|
65
66
|
"gen:notices": "node scripts/gen-third-party-notices.mjs",
|
|
66
67
|
"prepare": "pnpm run build",
|
|
@@ -82,6 +83,7 @@
|
|
|
82
83
|
"@atum-labs/fulfillment-confirmation": "workspace:*",
|
|
83
84
|
"@atum-labs/payment-gateway-client": "workspace:*",
|
|
84
85
|
"@atum-labs/payment-request-sender-auth": "workspace:*",
|
|
86
|
+
"@atum-labs/payment-request-token-approval": "workspace:*",
|
|
85
87
|
"@atum-labs/publish-guard": "workspace:*",
|
|
86
88
|
"@atum-labs/schema-declarations": "workspace:*",
|
|
87
89
|
"@atum-labs/solana-escrow-encoding": "workspace:*",
|