@perkos/agent-sdk 0.1.0 → 0.2.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 +48 -0
- package/README.md +175 -5
- package/dist/errors.d.ts +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/x402-direct.d.ts +100 -0
- package/dist/x402-direct.d.ts.map +1 -0
- package/dist/x402-direct.js +576 -0
- package/dist/x402-direct.js.map +1 -0
- package/dist/x402-facilitator.d.ts +86 -0
- package/dist/x402-facilitator.d.ts.map +1 -0
- package/dist/x402-facilitator.js +480 -0
- package/dist/x402-facilitator.js.map +1 -0
- package/dist/x402.d.ts +60 -0
- package/dist/x402.d.ts.map +1 -0
- package/dist/x402.js +306 -0
- package/dist/x402.js.map +1 -0
- package/docs/ARCHITECTURE.md +25 -1
- package/docs/plans/2026-08-25-stacks-x402-direct-profile-design.md +68 -0
- package/docs/plans/2026-08-25-stacks-x402-facilitator-design.md +143 -0
- package/docs/plans/2026-08-25-stacks-x402-v2-design.md +139 -0
- package/examples/x402-facilitator.ts +69 -0
- package/examples/x402-foundation.ts +30 -0
- package/package.json +10 -5
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,54 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@perkos/agent-sdk` are documented here.
|
|
4
4
|
|
|
5
|
+
## Unreleased
|
|
6
|
+
|
|
7
|
+
No changes yet.
|
|
8
|
+
|
|
9
|
+
## 0.2.0 - 2026-08-26
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- Renamed the existing GitHub repository from `PerkOS-Agent-SDK` to
|
|
14
|
+
`PerkOS-Nayori-Agent-SDK` without changing the public npm package name or its API. GitHub
|
|
15
|
+
history, releases, issues, pull requests, and legacy URL redirects remain intact.
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
- A compatibility-first `stacks-signed-tx-v1` x402 profile for direct STX, sBTC, and USDCx
|
|
20
|
+
payments, with canonical internal CAIP-19 identities and explicit `upfront` semantics.
|
|
21
|
+
- Short-lived canonical request quotes and deterministic 31-byte memo fingerprints binding method,
|
|
22
|
+
URL, body digest, network, asset, exact amount, recipient, merchant, and expiry.
|
|
23
|
+
- A side-effect-free signed-transaction verifier for canonical Stacks encoding, origin signature,
|
|
24
|
+
payer, network, exact STX/SIP-010 transfer templates, memo, deny mode, and exact post-conditions.
|
|
25
|
+
- Deterministic quote vectors and adversarial coverage for request, requirement, network, signature,
|
|
26
|
+
asset, recipient, amount, memo, contract, function, and post-condition tampering.
|
|
27
|
+
|
|
28
|
+
- Official x402 v2 payment-requirement, signature, and response header codecs through
|
|
29
|
+
`@x402/core`.
|
|
30
|
+
- Strict Stacks CAIP-2, escrow-contract, asset, job, and amount validation for STX and sBTC x402
|
|
31
|
+
requirements.
|
|
32
|
+
- A client scheme adapter that validates the on-chain job, reuses SDK signing and spending policy,
|
|
33
|
+
confirms escrow funding, and returns a transaction proof.
|
|
34
|
+
- A safe x402 header quickstart, protocol design record, and regression coverage.
|
|
35
|
+
- A Stacks x402 facilitator that independently verifies current Hiro v3 transaction/event
|
|
36
|
+
evidence, exact escrow funding and confirmation freshness before settlement.
|
|
37
|
+
- An injected atomic replay-store contract, process-local implementation for demos/tests, and a
|
|
38
|
+
public fail-closed facilitator quickstart using historical mainnet evidence.
|
|
39
|
+
|
|
40
|
+
### Security
|
|
41
|
+
|
|
42
|
+
- Kept direct-payment verification separate from merchant authentication, signed-quote trust,
|
|
43
|
+
durable replay/idempotency, balance/nonce preflight, simulation, sponsorship, broadcast,
|
|
44
|
+
confirmation, and resource delivery; those remain mandatory hosted-facilitator boundaries.
|
|
45
|
+
- Omit a final `transactionId` for origin-signed sponsored payments until the sponsor adds its
|
|
46
|
+
signature, preventing an incomplete transaction hash from being represented as a network txid.
|
|
47
|
+
|
|
48
|
+
- Documented that the client proof requires independent Stacks transaction verification and replay
|
|
49
|
+
protection before a production resource server can authorize access.
|
|
50
|
+
- Documented the remaining bearer-proof front-running boundary and the requirement for durable
|
|
51
|
+
shared replay storage and request binding before high-value production use.
|
|
52
|
+
|
|
5
53
|
## 0.1.0 - 2026-08-24
|
|
6
54
|
|
|
7
55
|
### Added
|
package/README.md
CHANGED
|
@@ -5,10 +5,16 @@ TypeScript SDK for agent identity, escrow settlement, and reputation on Stacks.
|
|
|
5
5
|
PerkOS gives AI agents a programmable path to register, hire, fund work with STX or sBTC,
|
|
6
6
|
submit deliverables, settle escrow, and build job-linked reputation.
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
This repository is the continuation of `PerkOS-xyz/PerkOS-Agent-SDK`, renamed to connect the
|
|
9
|
+
public SDK with the Nayori product identity. The npm package remains `@perkos/agent-sdk` and the
|
|
10
|
+
complete Git history, releases, issues, and pull requests are preserved.
|
|
11
|
+
|
|
12
|
+
> Status: 0.2.0 developer release. Read clients, transaction builders, browser and headless signer
|
|
9
13
|
> adapters, confirmation receipts, safety policies, and a transactional testnet quickstart are
|
|
10
|
-
> implemented. x402
|
|
11
|
-
>
|
|
14
|
+
> implemented. The x402 v2 client and Stacks facilitator foundations are implemented; durable
|
|
15
|
+
> hosting, settlement, replay storage, MCP adapters, external review, and adoption evidence remain
|
|
16
|
+
> before Milestone 2 completion. The direct x402 profile includes request-bound pure verification
|
|
17
|
+
> for STX, sBTC, and USDCx but does not broadcast transactions.
|
|
12
18
|
|
|
13
19
|
## Requirements
|
|
14
20
|
|
|
@@ -24,8 +30,8 @@ npm install @perkos/agent-sdk
|
|
|
24
30
|
To develop from source:
|
|
25
31
|
|
|
26
32
|
```bash
|
|
27
|
-
git clone https://github.com/PerkOS-xyz/PerkOS-Agent-SDK.git
|
|
28
|
-
cd PerkOS-Agent-SDK
|
|
33
|
+
git clone https://github.com/PerkOS-xyz/PerkOS-Nayori-Agent-SDK.git
|
|
34
|
+
cd PerkOS-Nayori-Agent-SDK
|
|
29
35
|
npm install
|
|
30
36
|
npm run verify
|
|
31
37
|
npm run quickstart
|
|
@@ -34,6 +40,21 @@ npm run quickstart
|
|
|
34
40
|
The quickstart performs public read-only calls and does not require a wallet or private key.
|
|
35
41
|
Set `PERKOS_NETWORK=testnet` to read the testnet deployment.
|
|
36
42
|
|
|
43
|
+
The x402 foundation example is also read-only and requires no wallet. It creates and round-trips
|
|
44
|
+
the official v2 `PAYMENT-REQUIRED` header for an existing PerkOS escrow job:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npm run quickstart:x402
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
The facilitator example uses public Hiro v3 transaction and event data to inspect the historical
|
|
51
|
+
M1 mainnet funding transaction. It proves the verifier fails closed when that otherwise matching
|
|
52
|
+
proof is outside its payment window; it does not write replay state or submit a transaction:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
npm run quickstart:x402:facilitator
|
|
56
|
+
```
|
|
57
|
+
|
|
37
58
|
The transactional quickstart is also safe by default: it only prints a seven-step sBTC testnet
|
|
38
59
|
lifecycle and its funding-policy decision.
|
|
39
60
|
|
|
@@ -184,6 +205,153 @@ await perkos.fundJob({
|
|
|
184
205
|
The policy also limits networks and contract principals. Funding attempts without explicit
|
|
185
206
|
per-transaction and per-session limits are rejected before the signer is called.
|
|
186
207
|
|
|
208
|
+
## x402 v2 client foundation
|
|
209
|
+
|
|
210
|
+
The SDK uses the official `@x402/core` v2 envelope and header codecs while preserving the PerkOS
|
|
211
|
+
escrow lifecycle. A protected resource describes an existing, open job and its exact atomic
|
|
212
|
+
budget. The scheme client validates that quote against on-chain state, funds it through the
|
|
213
|
+
configured SDK signer and spending policy, waits for successful confirmation, and produces the
|
|
214
|
+
`PAYMENT-SIGNATURE` payload.
|
|
215
|
+
|
|
216
|
+
```ts
|
|
217
|
+
import { x402Client } from "@x402/core/client";
|
|
218
|
+
import {
|
|
219
|
+
PerkOSClient,
|
|
220
|
+
PerkOSX402SchemeClient,
|
|
221
|
+
createPerkOSX402PaymentRequired,
|
|
222
|
+
encodePaymentRequiredHeader,
|
|
223
|
+
toStacksX402Network,
|
|
224
|
+
} from "@perkos/agent-sdk";
|
|
225
|
+
|
|
226
|
+
const perkos = new PerkOSClient({
|
|
227
|
+
network: "mainnet",
|
|
228
|
+
signer,
|
|
229
|
+
spendingPolicy: {
|
|
230
|
+
allowedAssets: ["sbtc"],
|
|
231
|
+
maxPerTransaction: { sbtc: 25_000n },
|
|
232
|
+
maxPerSession: { sbtc: 50_000n },
|
|
233
|
+
},
|
|
234
|
+
});
|
|
235
|
+
|
|
236
|
+
const required = createPerkOSX402PaymentRequired(perkos.config, {
|
|
237
|
+
resource: {
|
|
238
|
+
url: "https://agent.example/jobs/7/fund",
|
|
239
|
+
description: "Fund job 7 escrow",
|
|
240
|
+
mimeType: "application/json",
|
|
241
|
+
},
|
|
242
|
+
asset: "sbtc",
|
|
243
|
+
jobId: 7n,
|
|
244
|
+
amount: 25_000n,
|
|
245
|
+
});
|
|
246
|
+
|
|
247
|
+
const network = toStacksX402Network(perkos.config.network);
|
|
248
|
+
const paymentClient = new x402Client()
|
|
249
|
+
.setSpendControls({
|
|
250
|
+
allowedAssets: [
|
|
251
|
+
{ network, asset: required.accepts[0].asset, maxAmountPerPayment: "25000" },
|
|
252
|
+
],
|
|
253
|
+
})
|
|
254
|
+
.register(network, new PerkOSX402SchemeClient({ client: perkos }));
|
|
255
|
+
|
|
256
|
+
const paymentPayload = await paymentClient.createPaymentPayload(required);
|
|
257
|
+
console.log(encodePaymentRequiredHeader(required), paymentPayload);
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
The proof produced here is client-side confirmation evidence, not authorization by itself. Use the
|
|
261
|
+
facilitator below to independently inspect the Stacks transaction, match its payment fields, apply
|
|
262
|
+
a confirmation policy, and consume it through a replay store.
|
|
263
|
+
|
|
264
|
+
## Direct x402 payments on Stacks
|
|
265
|
+
|
|
266
|
+
The separate `stacks-signed-tx-v1` profile covers immediate pay-per-call resources. It uses the
|
|
267
|
+
official x402 v2 `exact` scheme and explicit `upfront` flow because the facilitator must commit the
|
|
268
|
+
signed Stacks transaction before the resource handler runs. It supports:
|
|
269
|
+
|
|
270
|
+
| Asset | Wire `asset` | Canonical internal identity | Atomic unit |
|
|
271
|
+
|---|---|---|---|
|
|
272
|
+
| STX | `STX` | CAIP-19 `slip44:5757` | micro-STX |
|
|
273
|
+
| sBTC | canonical `address.contract` | CAIP-19 SIP-010 | satoshi |
|
|
274
|
+
| USDCx | canonical `address.contract` | CAIP-19 SIP-010 | 10^-6 USDCx |
|
|
275
|
+
|
|
276
|
+
Create a short-lived request quote and compatibility-first requirement without a wallet or network
|
|
277
|
+
call:
|
|
278
|
+
|
|
279
|
+
```ts
|
|
280
|
+
import {
|
|
281
|
+
createNayoriX402PaymentRequirements,
|
|
282
|
+
createNayoriX402Quote,
|
|
283
|
+
} from "@perkos/agent-sdk";
|
|
284
|
+
|
|
285
|
+
const quote = await createNayoriX402Quote({
|
|
286
|
+
quoteId: "quote-weather-001",
|
|
287
|
+
merchantId: "merchant-weather",
|
|
288
|
+
network: "testnet",
|
|
289
|
+
asset: "usdcx",
|
|
290
|
+
amount: 100_000n,
|
|
291
|
+
payTo: "ST...",
|
|
292
|
+
method: "POST",
|
|
293
|
+
url: "https://api.example.com/v1/weather",
|
|
294
|
+
body: JSON.stringify({ city: "Miami" }),
|
|
295
|
+
issuedAt: Math.floor(Date.now() / 1000),
|
|
296
|
+
expiresAt: Math.floor(Date.now() / 1000) + 300,
|
|
297
|
+
});
|
|
298
|
+
|
|
299
|
+
const requirement = await createNayoriX402PaymentRequirements(quote);
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
The quote fingerprint is placed in the 34-byte Stacks/SIP-010 memo, so the origin signature binds
|
|
303
|
+
the transaction to the HTTP method, canonical URL, body digest, network, asset, exact amount,
|
|
304
|
+
recipient, merchant, and expiry. `verifyNayoriX402DirectPayment` then validates the x402 envelope,
|
|
305
|
+
trusted quote, actual request, canonical transaction encoding, origin signature, payer, network,
|
|
306
|
+
memo, transfer template, amount, recipient, token contract, function arguments, deny mode, and
|
|
307
|
+
exact post-condition.
|
|
308
|
+
|
|
309
|
+
The verifier is intentionally pure: it does not authenticate the merchant, validate a quote
|
|
310
|
+
signature, read balances/nonces, simulate, persist replay state, sponsor, broadcast, confirm, or
|
|
311
|
+
deliver a resource. A hosted facilitator must perform those controls before using the verified
|
|
312
|
+
plan. For origin-signed sponsored transactions the result omits `transactionId` until a sponsor
|
|
313
|
+
adds its signature; `transactionHash` identifies only the supplied serialization.
|
|
314
|
+
|
|
315
|
+
Direct payments and `perkos-escrow-v1` are complementary. Use direct payments for immediate
|
|
316
|
+
resources and escrow for jobs that require delivery, evaluation, payout, or reputation.
|
|
317
|
+
|
|
318
|
+
## x402 v2 Stacks facilitator
|
|
319
|
+
|
|
320
|
+
`PerkOSX402Facilitator` implements the official `SchemeNetworkFacilitator` interface. It reloads
|
|
321
|
+
the transaction and events from Hiro, then matches the successful contract call, payer, commerce
|
|
322
|
+
contract, decoded `job-funded` event, exact STX/sBTC transfer, job, amount, token, block metadata,
|
|
323
|
+
confirmation depth, and payment-window freshness. Its `settle` method does not broadcast another
|
|
324
|
+
transaction: for the upfront flow it atomically consumes the already-confirmed funding proof.
|
|
325
|
+
|
|
326
|
+
```ts
|
|
327
|
+
import { x402Facilitator } from "@x402/core/facilitator";
|
|
328
|
+
import {
|
|
329
|
+
InMemoryX402ReplayStore,
|
|
330
|
+
PerkOSX402Facilitator,
|
|
331
|
+
STACKS_X402_NETWORKS,
|
|
332
|
+
} from "@perkos/agent-sdk";
|
|
333
|
+
|
|
334
|
+
const stacks = new PerkOSX402Facilitator({
|
|
335
|
+
config: perkos.config,
|
|
336
|
+
replayStore: new InMemoryX402ReplayStore(),
|
|
337
|
+
minConfirmations: 2,
|
|
338
|
+
});
|
|
339
|
+
const facilitator = new x402Facilitator().register(
|
|
340
|
+
STACKS_X402_NETWORKS.mainnet,
|
|
341
|
+
stacks
|
|
342
|
+
);
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
The in-memory replay store is only for tests, examples, local development, and a single-process
|
|
346
|
+
demo. Production must inject a durable shared implementation whose `consume` operation is atomic,
|
|
347
|
+
such as a database unique constraint or Redis `SET NX`.
|
|
348
|
+
|
|
349
|
+
The current Stacks proof is an already-public funding transaction rather than a request-bound
|
|
350
|
+
off-chain authorization. Freshness and one-time consumption prevent stale reuse, but a party that
|
|
351
|
+
obtains the proof before settlement could try to consume it first. Do not use this release for a
|
|
352
|
+
high-value production paywall until request binding is added through a payer signature/challenge
|
|
353
|
+
or facilitator-submitted signed transaction.
|
|
354
|
+
|
|
187
355
|
## Supported lifecycle
|
|
188
356
|
|
|
189
357
|
- Register, update, and deactivate agents.
|
|
@@ -205,6 +373,8 @@ per-transaction and per-session limits are rejected before the signer is called.
|
|
|
205
373
|
- `execute` refuses plans created for a different network or signer.
|
|
206
374
|
- Broadcast receipts require a valid 32-byte Stacks transaction ID.
|
|
207
375
|
- Automated workflows can wait for an explicit terminal confirmation before their next action.
|
|
376
|
+
- x402 quotes are bound to the configured network, escrow contract, asset, job, and exact budget.
|
|
377
|
+
- x402 settlement verifies current chain evidence and atomically consumes each funding txid once.
|
|
208
378
|
|
|
209
379
|
This package has not yet completed the external security review required for PerkOS Milestone 2.
|
|
210
380
|
Do not treat the developer release as audited software.
|
package/dist/errors.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type PerkOSErrorCode = "CONFIG_INVALID" | "INPUT_INVALID" | "CONTRACT_ERROR" | "READ_FAILED" | "SIGNER_REQUIRED" | "SIGNER_MISMATCH" | "POLICY_DENIED" | "POLICY_LIMIT_REQUIRED" | "SIGNING_FAILED" | "BROADCAST_REJECTED" | "CONFIRMATION_FAILED";
|
|
1
|
+
export type PerkOSErrorCode = "CONFIG_INVALID" | "INPUT_INVALID" | "CONTRACT_ERROR" | "READ_FAILED" | "SIGNER_REQUIRED" | "SIGNER_MISMATCH" | "POLICY_DENIED" | "POLICY_LIMIT_REQUIRED" | "SIGNING_FAILED" | "BROADCAST_REJECTED" | "CONFIRMATION_FAILED" | "X402_INVALID" | "X402_PAYMENT_FAILED";
|
|
2
2
|
export interface PerkOSErrorDetails {
|
|
3
3
|
readonly clarityCode?: bigint;
|
|
4
4
|
readonly contract?: string;
|
package/dist/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GACvB,gBAAgB,GAChB,eAAe,GACf,gBAAgB,GAChB,aAAa,GACb,iBAAiB,GACjB,iBAAiB,GACjB,eAAe,GACf,uBAAuB,GACvB,gBAAgB,GAChB,oBAAoB,GACpB,qBAAqB,CAAC;AAE1B,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACjC;AAED,qBAAa,WAAY,SAAQ,KAAK;IACpC,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,kBAAkB,GAAG,SAAS,CAAC;gBAErC,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,kBAAkB;CAMjF"}
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GACvB,gBAAgB,GAChB,eAAe,GACf,gBAAgB,GAChB,aAAa,GACb,iBAAiB,GACjB,iBAAiB,GACjB,eAAe,GACf,uBAAuB,GACvB,gBAAgB,GAChB,oBAAoB,GACpB,qBAAqB,GACrB,cAAc,GACd,qBAAqB,CAAC;AAE1B,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACjC;AAED,qBAAa,WAAY,SAAQ,KAAK;IACpC,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,kBAAkB,GAAG,SAAS,CAAC;gBAErC,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,kBAAkB;CAMjF"}
|
package/dist/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAuBA,MAAM,OAAO,WAAY,SAAQ,KAAK;IAC3B,IAAI,CAAkB;IACtB,OAAO,CAAiC;IAEjD,YAAY,IAAqB,EAAE,OAAe,EAAE,OAA4B;QAC9E,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC;QAC1B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;CACF"}
|
package/dist/index.d.ts
CHANGED
|
@@ -7,8 +7,14 @@ export { PerkOSError } from "./errors.js";
|
|
|
7
7
|
export { DEFAULT_DEPLOYMENTS, JOB_STATUS, CLARITY_ERROR_MESSAGES } from "./constants.js";
|
|
8
8
|
export { resolveConfig, toUint } from "./validation.js";
|
|
9
9
|
export { normalizeTxid } from "./txid.js";
|
|
10
|
+
export { PERKOS_X402_ASSET_TRANSFER_METHOD, PERKOS_X402_PAYMENT_FLOW, PERKOS_X402_SCHEME, PerkOSX402SchemeClient, STACKS_X402_NETWORKS, X402_VERSION, createPerkOSX402PaymentRequired, decodePaymentRequiredHeader, decodePaymentResponseHeader, decodePaymentSignatureHeader, encodePaymentRequiredHeader, encodePaymentResponseHeader, encodePaymentSignatureHeader, fromStacksX402Network, parsePerkOSX402PaymentPayload, parsePerkOSX402Requirement, toStacksX402Network, } from "./x402.js";
|
|
11
|
+
export { HiroX402TransactionSource, InMemoryX402ReplayStore, PerkOSX402Facilitator, PerkOSX402VerificationError, perkosX402ReplayKey, } from "./x402-facilitator.js";
|
|
12
|
+
export { NAYORI_X402_DIRECT_ASSETS, NAYORI_X402_DIRECT_ASSET_TRANSFER_METHOD, NAYORI_X402_DIRECT_PAYMENT_FLOW, NAYORI_X402_QUOTE_FINGERPRINT_PREFIX, NAYORI_X402_QUOTE_VERSION, NayoriX402DirectVerificationError, canonicalizeNayoriX402Quote, canonicalizeNayoriX402ResourceUrl, createNayoriX402DirectPaymentPayload, createNayoriX402PaymentRequirements, createNayoriX402Quote, createNayoriX402QuoteFingerprint, getNayoriX402Asset, hashNayoriX402RequestBody, verifyNayoriX402DirectPayment, } from "./x402-direct.js";
|
|
10
13
|
export type { HeadlessSignerOptions, HeadlessTransactionExecutor, HeadlessTransactionRequest, PrivateKeyMaterial, PrivateKeyProvider, StacksConnectContractCallParams, StacksConnectRequest, StacksConnectSignerOptions, } from "./signers.js";
|
|
11
14
|
export type { TrackerFetch, TransactionTrackerOptions, } from "./tracker.js";
|
|
12
15
|
export type { AgentEndpoint, AgentRecord, Amount, AmountLike, AssignProviderInput, ConfirmationOptions, ConfirmedTransactionReceipt, ContractCallPlan, ContractId, CreateJobInput, FundJobInput, JobAmountInput, JobRecord, JobStatus, PaymentAsset, PerkOSConfig, PerkOSContracts, PerkOSNetwork, PerkOSOperation, PerkOSSigner, RateProviderInput, ReadOnlyCall, ReadOnlyTransport, RegisterAgentInput, ReputationRecord, ResolvedPerkOSConfig, SettleJobInput, SignerResult, SpendingApproval, SpendingPolicyInput, SubmitWorkInput, TransactionIntent, TransactionConfirmation, TransactionConfirmationStatus, TransactionReceipt, TransactionResultValue, TransactionTrackerLike, UpdateAgentInput, } from "./types.js";
|
|
13
16
|
export type { PerkOSErrorCode, PerkOSErrorDetails } from "./errors.js";
|
|
17
|
+
export type { ParsedPerkOSX402Requirement, PaymentPayload, PaymentRequired, PaymentRequirements, PerkOSX402ClientLike, PerkOSX402PaymentProof, PerkOSX402PaymentRequiredInput, PerkOSX402SchemeClientOptions, ResourceInfo, SettleResponse, } from "./x402.js";
|
|
18
|
+
export type { HiroX402TransactionSourceOptions, PerkOSX402FacilitatorOptions, PerkOSX402ReplayRecord, PerkOSX402ReplayStore, PerkOSX402TransactionSource, PerkOSX402VerifiedPayment, X402VerifierFetch, } from "./x402-facilitator.js";
|
|
19
|
+
export type { NayoriStacksX402Network, NayoriX402AssetDefinition, NayoriX402DirectPaymentPayloadInput, NayoriX402PaymentAsset, NayoriX402ProtectedRequest, NayoriX402Quote, NayoriX402QuoteInput, NayoriX402VerifiedDirectPayment, VerifyNayoriX402DirectPaymentInput, } from "./x402-direct.js";
|
|
14
20
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,O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B,sBAAsB,EACtB,8BAA8B,EAC9B,6BAA6B,EAC7B,YAAY,EACZ,cAAc,GACf,MAAM,WAAW,CAAC;AACnB,YAAY,EACV,gCAAgC,EAChC,4BAA4B,EAC5B,sBAAsB,EACtB,qBAAqB,EACrB,2BAA2B,EAC3B,yBAAyB,EACzB,iBAAiB,GAClB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EACV,uBAAuB,EACvB,yBAAyB,EACzB,mCAAmC,EACnC,sBAAsB,EACtB,0BAA0B,EAC1B,eAAe,EACf,oBAAoB,EACpB,+BAA+B,EAC/B,kCAAkC,GACnC,MAAM,kBAAkB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -7,4 +7,7 @@ export { PerkOSError } from "./errors.js";
|
|
|
7
7
|
export { DEFAULT_DEPLOYMENTS, JOB_STATUS, CLARITY_ERROR_MESSAGES } from "./constants.js";
|
|
8
8
|
export { resolveConfig, toUint } from "./validation.js";
|
|
9
9
|
export { normalizeTxid } from "./txid.js";
|
|
10
|
+
export { PERKOS_X402_ASSET_TRANSFER_METHOD, PERKOS_X402_PAYMENT_FLOW, PERKOS_X402_SCHEME, PerkOSX402SchemeClient, STACKS_X402_NETWORKS, X402_VERSION, createPerkOSX402PaymentRequired, decodePaymentRequiredHeader, decodePaymentResponseHeader, decodePaymentSignatureHeader, encodePaymentRequiredHeader, encodePaymentResponseHeader, encodePaymentSignatureHeader, fromStacksX402Network, parsePerkOSX402PaymentPayload, parsePerkOSX402Requirement, toStacksX402Network, } from "./x402.js";
|
|
11
|
+
export { HiroX402TransactionSource, InMemoryX402ReplayStore, PerkOSX402Facilitator, PerkOSX402VerificationError, perkosX402ReplayKey, } from "./x402-facilitator.js";
|
|
12
|
+
export { NAYORI_X402_DIRECT_ASSETS, NAYORI_X402_DIRECT_ASSET_TRANSFER_METHOD, NAYORI_X402_DIRECT_PAYMENT_FLOW, NAYORI_X402_QUOTE_FINGERPRINT_PREFIX, NAYORI_X402_QUOTE_VERSION, NayoriX402DirectVerificationError, canonicalizeNayoriX402Quote, canonicalizeNayoriX402ResourceUrl, createNayoriX402DirectPaymentPayload, createNayoriX402PaymentRequirements, createNayoriX402Quote, createNayoriX402QuoteFingerprint, getNayoriX402Asset, hashNayoriX402RequestBody, verifyNayoriX402DirectPayment, } from "./x402-direct.js";
|
|
10
13
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACzF,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACzF,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EACL,iCAAiC,EACjC,wBAAwB,EACxB,kBAAkB,EAClB,sBAAsB,EACtB,oBAAoB,EACpB,YAAY,EACZ,+BAA+B,EAC/B,2BAA2B,EAC3B,2BAA2B,EAC3B,4BAA4B,EAC5B,2BAA2B,EAC3B,2BAA2B,EAC3B,4BAA4B,EAC5B,qBAAqB,EACrB,6BAA6B,EAC7B,0BAA0B,EAC1B,mBAAmB,GACpB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,yBAAyB,EACzB,uBAAuB,EACvB,qBAAqB,EACrB,2BAA2B,EAC3B,mBAAmB,GACpB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,yBAAyB,EACzB,wCAAwC,EACxC,+BAA+B,EAC/B,oCAAoC,EACpC,yBAAyB,EACzB,iCAAiC,EACjC,2BAA2B,EAC3B,iCAAiC,EACjC,oCAAoC,EACpC,mCAAmC,EACnC,qBAAqB,EACrB,gCAAgC,EAChC,kBAAkB,EAClB,yBAAyB,EACzB,6BAA6B,GAC9B,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import type { PaymentPayload, PaymentRequirements, ResourceInfo } from "@x402/core/types";
|
|
2
|
+
import type { AmountLike, PerkOSNetwork } from "./types.js";
|
|
3
|
+
import { STACKS_X402_NETWORKS } from "./x402.js";
|
|
4
|
+
export declare const NAYORI_X402_DIRECT_ASSET_TRANSFER_METHOD = "stacks-signed-tx-v1";
|
|
5
|
+
export declare const NAYORI_X402_DIRECT_PAYMENT_FLOW = "upfront";
|
|
6
|
+
export declare const NAYORI_X402_QUOTE_VERSION = 1;
|
|
7
|
+
export declare const NAYORI_X402_QUOTE_FINGERPRINT_PREFIX = "ny1_";
|
|
8
|
+
export type NayoriX402PaymentAsset = "stx" | "sbtc" | "usdcx";
|
|
9
|
+
export type NayoriStacksX402Network = (typeof STACKS_X402_NETWORKS)[keyof typeof STACKS_X402_NETWORKS];
|
|
10
|
+
export interface NayoriX402AssetDefinition {
|
|
11
|
+
readonly network: PerkOSNetwork;
|
|
12
|
+
readonly x402Network: NayoriStacksX402Network;
|
|
13
|
+
readonly paymentAsset: NayoriX402PaymentAsset;
|
|
14
|
+
readonly symbol: "STX" | "sBTC" | "USDCx";
|
|
15
|
+
readonly decimals: 6 | 8;
|
|
16
|
+
readonly wireAsset: string;
|
|
17
|
+
readonly canonicalAssetId: string;
|
|
18
|
+
readonly kind: "stx" | "sip010";
|
|
19
|
+
readonly contract?: string;
|
|
20
|
+
readonly tokenName?: string;
|
|
21
|
+
readonly postConditionAsset?: string;
|
|
22
|
+
}
|
|
23
|
+
export declare const NAYORI_X402_DIRECT_ASSETS: Readonly<Record<PerkOSNetwork, Readonly<Record<NayoriX402PaymentAsset, NayoriX402AssetDefinition>>>>;
|
|
24
|
+
export interface NayoriX402ProtectedRequest {
|
|
25
|
+
readonly method: string;
|
|
26
|
+
readonly url: string;
|
|
27
|
+
readonly body?: string | Uint8Array;
|
|
28
|
+
}
|
|
29
|
+
export interface NayoriX402QuoteInput extends NayoriX402ProtectedRequest {
|
|
30
|
+
readonly quoteId: string;
|
|
31
|
+
readonly merchantId: string;
|
|
32
|
+
readonly network: PerkOSNetwork;
|
|
33
|
+
readonly asset: NayoriX402PaymentAsset;
|
|
34
|
+
readonly amount: AmountLike;
|
|
35
|
+
readonly payTo: string;
|
|
36
|
+
readonly issuedAt: number;
|
|
37
|
+
readonly expiresAt: number;
|
|
38
|
+
}
|
|
39
|
+
export interface NayoriX402Quote {
|
|
40
|
+
readonly version: typeof NAYORI_X402_QUOTE_VERSION;
|
|
41
|
+
readonly quoteId: string;
|
|
42
|
+
readonly merchantId: string;
|
|
43
|
+
readonly method: string;
|
|
44
|
+
readonly url: string;
|
|
45
|
+
readonly bodySha256: string;
|
|
46
|
+
readonly network: NayoriStacksX402Network;
|
|
47
|
+
readonly paymentAsset: NayoriX402PaymentAsset;
|
|
48
|
+
readonly asset: string;
|
|
49
|
+
readonly amount: string;
|
|
50
|
+
readonly payTo: string;
|
|
51
|
+
readonly issuedAt: number;
|
|
52
|
+
readonly expiresAt: number;
|
|
53
|
+
}
|
|
54
|
+
export interface NayoriX402DirectPaymentPayloadInput {
|
|
55
|
+
readonly paymentRequirements: PaymentRequirements;
|
|
56
|
+
readonly transaction: string;
|
|
57
|
+
readonly resource?: ResourceInfo;
|
|
58
|
+
}
|
|
59
|
+
export interface VerifyNayoriX402DirectPaymentInput {
|
|
60
|
+
readonly paymentPayload: PaymentPayload;
|
|
61
|
+
readonly paymentRequirements: PaymentRequirements;
|
|
62
|
+
/** The hosted layer must authenticate the merchant and validate the quote signature first. */
|
|
63
|
+
readonly trustedQuote: NayoriX402Quote;
|
|
64
|
+
readonly request: NayoriX402ProtectedRequest;
|
|
65
|
+
readonly nowSeconds?: number;
|
|
66
|
+
readonly clockSkewSeconds?: number;
|
|
67
|
+
}
|
|
68
|
+
export interface NayoriX402VerifiedDirectPayment {
|
|
69
|
+
readonly network: PerkOSNetwork;
|
|
70
|
+
readonly x402Network: NayoriStacksX402Network;
|
|
71
|
+
readonly asset: NayoriX402PaymentAsset;
|
|
72
|
+
readonly assetDefinition: NayoriX402AssetDefinition;
|
|
73
|
+
readonly amount: bigint;
|
|
74
|
+
readonly payer: string;
|
|
75
|
+
readonly payTo: string;
|
|
76
|
+
readonly transaction: string;
|
|
77
|
+
/** Hash of the supplied serialization; sponsor signing changes it for sponsored payments. */
|
|
78
|
+
readonly transactionHash: string;
|
|
79
|
+
/** Final network transaction ID for standard payments; omitted until a sponsor signs. */
|
|
80
|
+
readonly transactionId?: string;
|
|
81
|
+
readonly originNonce: bigint;
|
|
82
|
+
readonly sponsored: boolean;
|
|
83
|
+
readonly quoteId: string;
|
|
84
|
+
readonly quoteFingerprint: string;
|
|
85
|
+
}
|
|
86
|
+
export declare class NayoriX402DirectVerificationError extends Error {
|
|
87
|
+
readonly reason: string;
|
|
88
|
+
readonly details: Readonly<Record<string, unknown>> | undefined;
|
|
89
|
+
constructor(reason: string, message: string, details?: Readonly<Record<string, unknown>>);
|
|
90
|
+
}
|
|
91
|
+
export declare function canonicalizeNayoriX402ResourceUrl(value: string): string;
|
|
92
|
+
export declare function hashNayoriX402RequestBody(body?: string | Uint8Array): Promise<string>;
|
|
93
|
+
export declare function getNayoriX402Asset(network: PerkOSNetwork, asset: NayoriX402PaymentAsset): NayoriX402AssetDefinition;
|
|
94
|
+
export declare function createNayoriX402Quote(input: NayoriX402QuoteInput): Promise<NayoriX402Quote>;
|
|
95
|
+
export declare function canonicalizeNayoriX402Quote(quote: NayoriX402Quote): string;
|
|
96
|
+
export declare function createNayoriX402QuoteFingerprint(quote: NayoriX402Quote): Promise<string>;
|
|
97
|
+
export declare function createNayoriX402PaymentRequirements(quoteInput: NayoriX402Quote): Promise<PaymentRequirements>;
|
|
98
|
+
export declare function createNayoriX402DirectPaymentPayload(input: NayoriX402DirectPaymentPayloadInput): PaymentPayload;
|
|
99
|
+
export declare function verifyNayoriX402DirectPayment(input: VerifyNayoriX402DirectPaymentInput): Promise<NayoriX402VerifiedDirectPayment>;
|
|
100
|
+
//# sourceMappingURL=x402-direct.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"x402-direct.d.ts","sourceRoot":"","sources":["../src/x402-direct.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EACV,cAAc,EACd,mBAAmB,EACnB,YAAY,EACb,MAAM,kBAAkB,CAAC;AAK1B,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE5D,OAAO,EAEL,oBAAoB,EAIrB,MAAM,WAAW,CAAC;AAEnB,eAAO,MAAM,wCAAwC,wBAAwB,CAAC;AAC9E,eAA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