@txnod/sdk 1.0.1 → 1.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/AGENTS.md +1 -1
- package/CHANGELOG.md +33 -0
- package/dist/_shared/index.d.ts +26 -16
- package/dist/client-sandbox.d.ts +181 -6
- package/dist/client-sandbox.d.ts.map +1 -1
- package/dist/client-sandbox.js +216 -5
- package/dist/client-sandbox.js.map +1 -1
- package/dist/client.d.ts +59 -9
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +58 -6
- package/dist/client.js.map +1 -1
- package/dist/errors.d.ts +187 -4
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +208 -4
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/internals/error-ctor-map.d.ts +4 -3
- package/dist/internals/error-ctor-map.d.ts.map +1 -1
- package/dist/internals/error-ctor-map.js +5 -1
- package/dist/internals/error-ctor-map.js.map +1 -1
- package/dist/verify/chains/bsc.d.ts +1 -7
- package/dist/verify/chains/bsc.d.ts.map +1 -1
- package/dist/verify/chains/bsc.js +1 -7
- package/dist/verify/chains/bsc.js.map +1 -1
- package/dist/verify/chains/btc.d.ts +1 -8
- package/dist/verify/chains/btc.d.ts.map +1 -1
- package/dist/verify/chains/btc.js +1 -8
- package/dist/verify/chains/btc.js.map +1 -1
- package/dist/verify/chains/cardano.d.ts +6 -13
- package/dist/verify/chains/cardano.d.ts.map +1 -1
- package/dist/verify/chains/cardano.js +6 -13
- package/dist/verify/chains/cardano.js.map +1 -1
- package/dist/verify/chains/evm.d.ts +1 -6
- package/dist/verify/chains/evm.d.ts.map +1 -1
- package/dist/verify/chains/evm.js +8 -7
- package/dist/verify/chains/evm.js.map +1 -1
- package/dist/verify/chains/polygon.d.ts +1 -7
- package/dist/verify/chains/polygon.d.ts.map +1 -1
- package/dist/verify/chains/polygon.js +1 -7
- package/dist/verify/chains/polygon.js.map +1 -1
- package/dist/verify/chains/secp256k1-bip32.d.ts +2 -8
- package/dist/verify/chains/secp256k1-bip32.d.ts.map +1 -1
- package/dist/verify/chains/secp256k1-bip32.js +5 -13
- package/dist/verify/chains/secp256k1-bip32.js.map +1 -1
- package/dist/verify/chains/ton-cell.d.ts.map +1 -1
- package/dist/verify/chains/ton-cell.js +4 -7
- package/dist/verify/chains/ton-cell.js.map +1 -1
- package/dist/verify/chains/ton.d.ts +3 -7
- package/dist/verify/chains/ton.d.ts.map +1 -1
- package/dist/verify/chains/ton.js +1 -3
- package/dist/verify/chains/ton.js.map +1 -1
- package/dist/verify/chains/tron.d.ts +1 -7
- package/dist/verify/chains/tron.d.ts.map +1 -1
- package/dist/verify/chains/tron.js +1 -7
- package/dist/verify/chains/tron.js.map +1 -1
- package/dist/verify/errors.d.ts +6 -8
- package/dist/verify/errors.d.ts.map +1 -1
- package/dist/verify/errors.js +6 -8
- package/dist/verify/errors.js.map +1 -1
- package/dist/verify/index.d.ts +1 -1
- package/dist/verify/index.js +2 -2
- package/dist/verify/index.js.map +1 -1
- package/docs/02-invoices.md +46 -2
- package/docs/04-webhooks.md +4 -1
- package/docs/05-errors.md +24 -4
- package/docs/05-sandbox.md +13 -5
- package/docs/examples/sandbox-vitest-suite.md +2 -2
- package/docs/reference/client.md +39 -2
- package/docs/reference/errors.md +13 -2
- package/docs/reference/types.md +5 -4
- package/package.json +13 -13
package/dist/client-sandbox.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Thin HTTP-wrapper class for the
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
2
|
+
* Thin HTTP-wrapper class for the sandbox-mode endpoints. Constructed lazily
|
|
3
|
+
* by `TxnodClient.sandbox` so unused sandbox code is dead-code-eliminated by
|
|
4
|
+
* the bundler. Methods sign requests with the underlying HMAC scheme, parse
|
|
5
|
+
* RFC 7807 errors into typed sandbox-* error classes, and return JSON-decoded
|
|
6
|
+
* result envelopes.
|
|
7
7
|
*
|
|
8
8
|
* **Do not instantiate this class directly.** Always go through
|
|
9
9
|
* `client.sandbox` so the client's HMAC + retry + telemetry pipeline is
|
|
@@ -31,6 +31,185 @@ export class TxnodClientSandbox {
|
|
|
31
31
|
constructor(request) {
|
|
32
32
|
this.#request = request;
|
|
33
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* `POST /api/v1/sandbox/invoices` — create an invoice on a sandbox project.
|
|
36
|
+
* The sandbox mirror of `client.createInvoice` (the production endpoint is
|
|
37
|
+
* kind-locked and rejects sandbox projects with
|
|
38
|
+
* `production_project_required`). Idempotent on `(project_id, external_id)`.
|
|
39
|
+
* Subject to the sandbox 10k active-invoice cap
|
|
40
|
+
* (`TxnodSandboxActiveInvoiceCapReachedError`).
|
|
41
|
+
*
|
|
42
|
+
* Unlike `client.createInvoice`, no xpub address-verification runs on the
|
|
43
|
+
* response — sandbox addresses derive from server-provisioned testnet xpubs
|
|
44
|
+
* and never carry real funds; use `client.sandbox.listWallets` if you want
|
|
45
|
+
* to verify derivation in a test harness.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```ts
|
|
49
|
+
* import { TxnodClient } from '@txnod/sdk';
|
|
50
|
+
*
|
|
51
|
+
* const client = new TxnodClient({
|
|
52
|
+
* projectId: process.env.TXNOD_PROJECT_ID!,
|
|
53
|
+
* apiSecret: process.env.TXNOD_API_SECRET!, // sk_sandbox_...
|
|
54
|
+
* environment: 'non-production',
|
|
55
|
+
* });
|
|
56
|
+
*
|
|
57
|
+
* const invoice = await client.sandbox.createInvoice({
|
|
58
|
+
* amount_usd: 9.99,
|
|
59
|
+
* coin: 'usdt_trc20',
|
|
60
|
+
* external_id: 'order-42',
|
|
61
|
+
* });
|
|
62
|
+
* await client.sandbox.simulateDetect(invoice.id, { seed: 'order-42' });
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
createInvoice(body) {
|
|
66
|
+
return this.#request({
|
|
67
|
+
method: 'POST',
|
|
68
|
+
path: '/api/v1/sandbox/invoices',
|
|
69
|
+
body,
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* `GET /api/v1/sandbox/invoices/{invoiceId}` — fetch a sandbox invoice by
|
|
74
|
+
* ULID. The sandbox mirror of `client.getInvoice`; same
|
|
75
|
+
* `TxnodInvoiceNotFoundError` semantics on cross-project lookups.
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* ```ts
|
|
79
|
+
* import { TxnodClient } from '@txnod/sdk';
|
|
80
|
+
*
|
|
81
|
+
* const client = new TxnodClient({
|
|
82
|
+
* projectId: process.env.TXNOD_PROJECT_ID!,
|
|
83
|
+
* apiSecret: process.env.TXNOD_API_SECRET!,
|
|
84
|
+
* environment: 'non-production',
|
|
85
|
+
* });
|
|
86
|
+
*
|
|
87
|
+
* const invoice = await client.sandbox.getInvoice(
|
|
88
|
+
* '01HK8MAR2QEXAMPLE000000000',
|
|
89
|
+
* );
|
|
90
|
+
* console.log(invoice.status, invoice.confirmations);
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
getInvoice(id) {
|
|
94
|
+
return this.#request({
|
|
95
|
+
method: 'GET',
|
|
96
|
+
path: `/api/v1/sandbox/invoices/${id}`,
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* `GET /api/v1/sandbox/invoices` — cursor-paginated search over the sandbox
|
|
101
|
+
* project's invoices. The sandbox mirror of `client.searchInvoices`; takes
|
|
102
|
+
* the same snake_case query filters.
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* ```ts
|
|
106
|
+
* import { TxnodClient } from '@txnod/sdk';
|
|
107
|
+
*
|
|
108
|
+
* const client = new TxnodClient({
|
|
109
|
+
* projectId: process.env.TXNOD_PROJECT_ID!,
|
|
110
|
+
* apiSecret: process.env.TXNOD_API_SECRET!,
|
|
111
|
+
* environment: 'non-production',
|
|
112
|
+
* });
|
|
113
|
+
*
|
|
114
|
+
* const page = await client.sandbox.listInvoices({ status: 'paid', limit: 20 });
|
|
115
|
+
* for (const invoice of page.items) console.log(invoice.id);
|
|
116
|
+
* ```
|
|
117
|
+
*/
|
|
118
|
+
listInvoices(query = {}) {
|
|
119
|
+
return this.#request({
|
|
120
|
+
method: 'GET',
|
|
121
|
+
path: '/api/v1/sandbox/invoices',
|
|
122
|
+
query: query,
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* `POST /api/v1/sandbox/invoices/{invoiceId}/cancel` — cancel a sandbox
|
|
127
|
+
* invoice in `pending` or `detected` state. The sandbox mirror of
|
|
128
|
+
* `client.cancelInvoice`; throws `TxnodInvoiceNotCancellableError` on
|
|
129
|
+
* terminal-status invoices.
|
|
130
|
+
*
|
|
131
|
+
* @example
|
|
132
|
+
* ```ts
|
|
133
|
+
* import { TxnodClient } from '@txnod/sdk';
|
|
134
|
+
*
|
|
135
|
+
* const client = new TxnodClient({
|
|
136
|
+
* projectId: process.env.TXNOD_PROJECT_ID!,
|
|
137
|
+
* apiSecret: process.env.TXNOD_API_SECRET!,
|
|
138
|
+
* environment: 'non-production',
|
|
139
|
+
* });
|
|
140
|
+
*
|
|
141
|
+
* const cancelled = await client.sandbox.cancelInvoice(
|
|
142
|
+
* '01HK8MAR2QEXAMPLE000000000',
|
|
143
|
+
* );
|
|
144
|
+
* console.log(cancelled.status); // 'cancelled'
|
|
145
|
+
* ```
|
|
146
|
+
*/
|
|
147
|
+
cancelInvoice(id) {
|
|
148
|
+
return this.#request({
|
|
149
|
+
method: 'POST',
|
|
150
|
+
path: `/api/v1/sandbox/invoices/${id}/cancel`,
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* `GET /api/v1/sandbox/webhooks/events` — cursor-paginated delivery log for
|
|
155
|
+
* the sandbox project's outbound webhook events. The sandbox mirror of
|
|
156
|
+
* `client.listWebhookEvents` (the production endpoint is kind-locked and
|
|
157
|
+
* rejects sandbox projects); takes the same snake_case query filters. Every
|
|
158
|
+
* row corresponds to an envelope with `mode: 'sandbox'`.
|
|
159
|
+
*
|
|
160
|
+
* @example
|
|
161
|
+
* ```ts
|
|
162
|
+
* import { TxnodClient } from '@txnod/sdk';
|
|
163
|
+
*
|
|
164
|
+
* const client = new TxnodClient({
|
|
165
|
+
* projectId: process.env.TXNOD_PROJECT_ID!,
|
|
166
|
+
* apiSecret: process.env.TXNOD_API_SECRET!, // sk_sandbox_...
|
|
167
|
+
* environment: 'non-production',
|
|
168
|
+
* });
|
|
169
|
+
*
|
|
170
|
+
* const page = await client.sandbox.listWebhookEvents({
|
|
171
|
+
* invoice_id: '01HK8MAR2QEXAMPLE000000000',
|
|
172
|
+
* limit: 50,
|
|
173
|
+
* });
|
|
174
|
+
* for (const event of page.items) console.log(event.id, event.event_type);
|
|
175
|
+
* ```
|
|
176
|
+
*/
|
|
177
|
+
listWebhookEvents(query = {}) {
|
|
178
|
+
return this.#request({
|
|
179
|
+
method: 'GET',
|
|
180
|
+
path: '/api/v1/sandbox/webhooks/events',
|
|
181
|
+
query: query,
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* `POST /api/v1/sandbox/webhooks/events/{eventId}/resend` — re-enqueue a
|
|
186
|
+
* previously-delivered sandbox webhook event. The sandbox mirror of
|
|
187
|
+
* `client.resendWebhookEvent`; the resend mints a fresh `event_id` and the
|
|
188
|
+
* response carries `original_event_id` for lineage. In-flight or
|
|
189
|
+
* dead-lettered events throw `TxnodEventNotResendableError`.
|
|
190
|
+
*
|
|
191
|
+
* @example
|
|
192
|
+
* ```ts
|
|
193
|
+
* import { TxnodClient } from '@txnod/sdk';
|
|
194
|
+
*
|
|
195
|
+
* const client = new TxnodClient({
|
|
196
|
+
* projectId: process.env.TXNOD_PROJECT_ID!,
|
|
197
|
+
* apiSecret: process.env.TXNOD_API_SECRET!,
|
|
198
|
+
* environment: 'non-production',
|
|
199
|
+
* });
|
|
200
|
+
*
|
|
201
|
+
* const resent = await client.sandbox.resendWebhookEvent(
|
|
202
|
+
* '01HK8MAR2QEXAMPLE000000000',
|
|
203
|
+
* );
|
|
204
|
+
* console.log(resent.event_id, resent.original_event_id);
|
|
205
|
+
* ```
|
|
206
|
+
*/
|
|
207
|
+
resendWebhookEvent(eventId) {
|
|
208
|
+
return this.#request({
|
|
209
|
+
method: 'POST',
|
|
210
|
+
path: `/api/v1/sandbox/webhooks/events/${eventId}/resend`,
|
|
211
|
+
});
|
|
212
|
+
}
|
|
34
213
|
/**
|
|
35
214
|
* `POST /api/v1/sandbox/invoices/{invoiceId}/simulate-detect` — synthesize
|
|
36
215
|
* an `invoice.detected` event (status `pending` → `detected`) and write a
|
|
@@ -334,6 +513,38 @@ export class TxnodClientSandbox {
|
|
|
334
513
|
body: eventInput,
|
|
335
514
|
});
|
|
336
515
|
}
|
|
516
|
+
/**
|
|
517
|
+
* `POST /api/v1/sandbox/invoices/{invoiceId}/claim-by-tx` — sandbox parity
|
|
518
|
+
* for `client.claimInvoiceByTx`. Skips the real chain-provider lookup and
|
|
519
|
+
* synthesises resolved facts from the invoice itself, so the full manual
|
|
520
|
+
* tx-hash claim lifecycle (auto-attribution, pending-review, rejection)
|
|
521
|
+
* can be exercised without on-chain spend. Response shape is identical to
|
|
522
|
+
* the production endpoint.
|
|
523
|
+
*
|
|
524
|
+
* @example
|
|
525
|
+
* ```ts
|
|
526
|
+
* import { TxnodClient } from '@txnod/sdk';
|
|
527
|
+
*
|
|
528
|
+
* const client = new TxnodClient({
|
|
529
|
+
* projectId: process.env.TXNOD_PROJECT_ID!,
|
|
530
|
+
* apiSecret: process.env.TXNOD_API_SECRET!,
|
|
531
|
+
* environment: 'non-production',
|
|
532
|
+
* });
|
|
533
|
+
*
|
|
534
|
+
* const result = await client.sandbox.simulateClaimByTx(
|
|
535
|
+
* '01HK8MAR2QEXAMPLE000000000',
|
|
536
|
+
* { txHash: '0xabc...def', chain: 'eth' },
|
|
537
|
+
* );
|
|
538
|
+
* console.log(result.status);
|
|
539
|
+
* ```
|
|
540
|
+
*/
|
|
541
|
+
simulateClaimByTx(invoiceId, args) {
|
|
542
|
+
return this.#request({
|
|
543
|
+
method: 'POST',
|
|
544
|
+
path: `/api/v1/sandbox/invoices/${invoiceId}/claim-by-tx`,
|
|
545
|
+
body: { tx_hash: args.txHash, chain: args.chain },
|
|
546
|
+
});
|
|
547
|
+
}
|
|
337
548
|
/**
|
|
338
549
|
* `POST /api/v1/sandbox/{projectId}/clock/advance` — bump the
|
|
339
550
|
* `confirmations` counter on every `detected` invoice for the given chain
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-sandbox.js","sourceRoot":"","sources":["../src/client-sandbox.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"client-sandbox.js","sourceRoot":"","sources":["../src/client-sandbox.ts"],"names":[],"mappings":"AAkDA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,OAAO,kBAAkB;IACpB,QAAQ,CAAY;IAE7B,YAAY,OAAkB;QAC5B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IAC1B,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,aAAa,CAAC,IAA0B;QACtC,OAAO,IAAI,CAAC,QAAQ,CAAkB;YACpC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,0BAA0B;YAChC,IAAI;SACL,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,UAAU,CAAC,EAAU;QACnB,OAAO,IAAI,CAAC,QAAQ,CAAwB;YAC1C,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,4BAA4B,EAAE,EAAE;SACvC,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,YAAY,CACV,QAA4B,EAA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d,IAAI,EAAE,mBAAmB,SAAS,gBAAgB;YAClD,IAAI,EAAE,MAAM;SACb,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,KAAK,CAAC,SAAiB;QACrB,OAAO,IAAI,CAAC,QAAQ,CAAyB;YAC3C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,mBAAmB,SAAS,QAAQ;YAC1C,IAAI,EAAE,EAAE;SACT,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,OAAO,CAAC,SAAiB;QACvB,OAAO,IAAI,CAAC,QAAQ,CAAyB;YAC3C,MAAM,EAAE,QAAQ;YAChB,IAAI,EAAE,mBAAmB,SAAS,EAAE;YACpC,IAAI,EAAE,EAAE;SACT,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,WAAW,CAAC,SAAiB;QAC3B,OAAO,IAAI,CAAC,QAAQ,CAAsB;YACxC,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,mBAAmB,SAAS,UAAU;SAC7C,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/dist/client.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { InvoiceCreateRequest, InvoiceResponse, InvoiceSearchQuery, CursorPaginatedInvoiceResponse, OrphanPaymentListQuery, CursorPaginatedOrphanPaymentResponse, OrphanAttributeRequest, WebhookEventListApiQuery, WebhookEventListResponse, WebhookEventResendResponse, RatesQuery, RatesResponse, QuoteQuery, QuoteResponse } from './_shared/index.js';
|
|
1
|
+
import type { Chain, ClaimByTxResponse, InvoiceCreateRequest, InvoiceDetailResponse, InvoiceResponse, InvoiceSearchQuery, CursorPaginatedInvoiceResponse, OrphanPaymentListQuery, CursorPaginatedOrphanPaymentResponse, OrphanAttributeRequest, WebhookEventListApiQuery, WebhookEventListResponse, WebhookEventResendResponse, RatesQuery, RatesResponse, QuoteQuery, QuoteResponse } from './_shared/index.js';
|
|
2
2
|
import { type SignedFetchRequestLogEntry, type SignedFetchRequestLogger } from './internals/fetch-with-retry.js';
|
|
3
3
|
import { TxnodClientSandbox } from './client-sandbox.js';
|
|
4
4
|
/**
|
|
@@ -93,16 +93,16 @@ export declare class TxnodClient {
|
|
|
93
93
|
lastRequestId: string | undefined;
|
|
94
94
|
constructor(options: TxnodClientOptions);
|
|
95
95
|
/**
|
|
96
|
-
* Lazy accessor for the `client.sandbox.*` namespace exposing
|
|
96
|
+
* Lazy accessor for the `client.sandbox.*` namespace exposing the thin HTTP
|
|
97
97
|
* wrappers around `/api/v1/sandbox/...` endpoints. The namespace class is
|
|
98
98
|
* only constructed on first access — when an integrator never references
|
|
99
99
|
* `client.sandbox`, the bundler's tree-shaker drops the entire
|
|
100
100
|
* `TxnodClientSandbox` class graph from the produced bundle.
|
|
101
101
|
*
|
|
102
102
|
* Methods throw the typed sandbox-specific error classes (e.g.
|
|
103
|
-
* `TxnodSandboxInvoiceTransitionInvalidError`) on 4xx/5xx server responses
|
|
104
|
-
*
|
|
105
|
-
*
|
|
103
|
+
* `TxnodSandboxInvoiceTransitionInvalidError`) on 4xx/5xx server responses.
|
|
104
|
+
* See `docs/05-sandbox.md` in the bundled tarball for the full surface and
|
|
105
|
+
* code examples.
|
|
106
106
|
*
|
|
107
107
|
* @example
|
|
108
108
|
* ```ts
|
|
@@ -231,7 +231,7 @@ export declare class TxnodClient {
|
|
|
231
231
|
* }
|
|
232
232
|
* ```
|
|
233
233
|
*/
|
|
234
|
-
getInvoice(id: string): Promise<
|
|
234
|
+
getInvoice(id: string): Promise<InvoiceDetailResponse>;
|
|
235
235
|
/**
|
|
236
236
|
* Search invoices with snake_case query filters.
|
|
237
237
|
*
|
|
@@ -278,7 +278,57 @@ export declare class TxnodClient {
|
|
|
278
278
|
* }
|
|
279
279
|
* ```
|
|
280
280
|
*/
|
|
281
|
-
cancelInvoice(id: string): Promise<
|
|
281
|
+
cancelInvoice(id: string): Promise<InvoiceDetailResponse>;
|
|
282
|
+
/**
|
|
283
|
+
* Submit a manual tx-hash claim for an open invoice.
|
|
284
|
+
*
|
|
285
|
+
* Forwards an end-customer-submitted tx hash; txnod resolves the tx via the
|
|
286
|
+
* chain provider, verifies sender / recipient / amount / timestamp, and
|
|
287
|
+
* either auto-attributes the tx (response `status: 'auto_attributed'`) or
|
|
288
|
+
* queues the claim for operator review (`pending_review`) — or, when the
|
|
289
|
+
* tx is not yet finalised, returns `pending_finality` and re-checks
|
|
290
|
+
* asynchronously.
|
|
291
|
+
*
|
|
292
|
+
* The two non-auto-attributed rejection paths (`tx_not_found_or_incomplete`
|
|
293
|
+
* and `tx_already_attributed`) are returned in the response body
|
|
294
|
+
* (`status: 'rejected'`, `rejection_reason`) — NOT thrown — so that callers
|
|
295
|
+
* can pattern-match on `response.rejection_reason`. The
|
|
296
|
+
* `manual_claim_rate_limit_exceeded` exhaustion path IS thrown via the
|
|
297
|
+
* standard `TxnodError`.
|
|
298
|
+
*
|
|
299
|
+
* @example
|
|
300
|
+
* ```ts
|
|
301
|
+
* import { TxnodClient, TxnodError } from '@txnod/sdk';
|
|
302
|
+
*
|
|
303
|
+
* const client = new TxnodClient({
|
|
304
|
+
* projectId: process.env.TXNOD_PROJECT_ID!,
|
|
305
|
+
* apiSecret: process.env.TXNOD_API_SECRET!,
|
|
306
|
+
* });
|
|
307
|
+
*
|
|
308
|
+
* try {
|
|
309
|
+
* const result = await client.claimInvoiceByTx({
|
|
310
|
+
* invoiceId: '01HK8MAR2QEXAMPLE000000000',
|
|
311
|
+
* txHash: '0xabc...def',
|
|
312
|
+
* chain: 'eth',
|
|
313
|
+
* });
|
|
314
|
+
* if (result.status === 'auto_attributed') {
|
|
315
|
+
* console.log('attributed; terminal_status:', result.terminal_status);
|
|
316
|
+
* } else if (result.status === 'rejected') {
|
|
317
|
+
* console.log('rejected:', result.rejection_reason);
|
|
318
|
+
* } else {
|
|
319
|
+
* console.log('queued; status:', result.status);
|
|
320
|
+
* }
|
|
321
|
+
* } catch (err) {
|
|
322
|
+
* if (err instanceof TxnodError) console.error(err.error_code);
|
|
323
|
+
* throw err;
|
|
324
|
+
* }
|
|
325
|
+
* ```
|
|
326
|
+
*/
|
|
327
|
+
claimInvoiceByTx(args: {
|
|
328
|
+
invoiceId: string;
|
|
329
|
+
txHash: string;
|
|
330
|
+
chain: Chain;
|
|
331
|
+
}): Promise<ClaimByTxResponse>;
|
|
282
332
|
/**
|
|
283
333
|
* List on-chain receipts that did not match any invoice address.
|
|
284
334
|
*
|
|
@@ -377,7 +427,7 @@ export declare class TxnodClient {
|
|
|
377
427
|
/**
|
|
378
428
|
* Returns an indicative rate for pre-invoice pricing. The binding rate is
|
|
379
429
|
* captured by `createInvoice` in `rate_snapshot`; any delta between this
|
|
380
|
-
* quote and the invoice is the partner's responsibility
|
|
430
|
+
* quote and the invoice is the partner's responsibility.
|
|
381
431
|
*
|
|
382
432
|
* @example
|
|
383
433
|
* ```ts
|
|
@@ -401,7 +451,7 @@ export declare class TxnodClient {
|
|
|
401
451
|
/**
|
|
402
452
|
* Returns an indicative rate for pre-invoice pricing. The binding rate is
|
|
403
453
|
* captured by `createInvoice` in `rate_snapshot`; any delta between this
|
|
404
|
-
* quote and the invoice is the partner's responsibility
|
|
454
|
+
* quote and the invoice is the partner's responsibility.
|
|
405
455
|
*
|
|
406
456
|
* @example
|
|
407
457
|
* ```ts
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EACL,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACrB,eAAe,EACf,kBAAkB,EAClB,8BAA8B,EAC9B,sBAAsB,EACtB,oCAAoC,EACpC,sBAAsB,EACtB,wBAAwB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;;;;;;;;OAyBG;IACH,WAAW,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,aAAa,CAAC;CAOvD"}
|
package/dist/client.js
CHANGED
|
@@ -123,16 +123,16 @@ export class TxnodClient {
|
|
|
123
123
|
assertNoTestnetXpubsInProduction(this.#xpubConfig, getSdkEnv(this.#environmentOption));
|
|
124
124
|
}
|
|
125
125
|
/**
|
|
126
|
-
* Lazy accessor for the `client.sandbox.*` namespace exposing
|
|
126
|
+
* Lazy accessor for the `client.sandbox.*` namespace exposing the thin HTTP
|
|
127
127
|
* wrappers around `/api/v1/sandbox/...` endpoints. The namespace class is
|
|
128
128
|
* only constructed on first access — when an integrator never references
|
|
129
129
|
* `client.sandbox`, the bundler's tree-shaker drops the entire
|
|
130
130
|
* `TxnodClientSandbox` class graph from the produced bundle.
|
|
131
131
|
*
|
|
132
132
|
* Methods throw the typed sandbox-specific error classes (e.g.
|
|
133
|
-
* `TxnodSandboxInvoiceTransitionInvalidError`) on 4xx/5xx server responses
|
|
134
|
-
*
|
|
135
|
-
*
|
|
133
|
+
* `TxnodSandboxInvoiceTransitionInvalidError`) on 4xx/5xx server responses.
|
|
134
|
+
* See `docs/05-sandbox.md` in the bundled tarball for the full surface and
|
|
135
|
+
* code examples.
|
|
136
136
|
*
|
|
137
137
|
* @example
|
|
138
138
|
* ```ts
|
|
@@ -403,6 +403,58 @@ export class TxnodClient {
|
|
|
403
403
|
path: `/api/v1/invoices/${id}/cancel`,
|
|
404
404
|
});
|
|
405
405
|
}
|
|
406
|
+
/**
|
|
407
|
+
* Submit a manual tx-hash claim for an open invoice.
|
|
408
|
+
*
|
|
409
|
+
* Forwards an end-customer-submitted tx hash; txnod resolves the tx via the
|
|
410
|
+
* chain provider, verifies sender / recipient / amount / timestamp, and
|
|
411
|
+
* either auto-attributes the tx (response `status: 'auto_attributed'`) or
|
|
412
|
+
* queues the claim for operator review (`pending_review`) — or, when the
|
|
413
|
+
* tx is not yet finalised, returns `pending_finality` and re-checks
|
|
414
|
+
* asynchronously.
|
|
415
|
+
*
|
|
416
|
+
* The two non-auto-attributed rejection paths (`tx_not_found_or_incomplete`
|
|
417
|
+
* and `tx_already_attributed`) are returned in the response body
|
|
418
|
+
* (`status: 'rejected'`, `rejection_reason`) — NOT thrown — so that callers
|
|
419
|
+
* can pattern-match on `response.rejection_reason`. The
|
|
420
|
+
* `manual_claim_rate_limit_exceeded` exhaustion path IS thrown via the
|
|
421
|
+
* standard `TxnodError`.
|
|
422
|
+
*
|
|
423
|
+
* @example
|
|
424
|
+
* ```ts
|
|
425
|
+
* import { TxnodClient, TxnodError } from '@txnod/sdk';
|
|
426
|
+
*
|
|
427
|
+
* const client = new TxnodClient({
|
|
428
|
+
* projectId: process.env.TXNOD_PROJECT_ID!,
|
|
429
|
+
* apiSecret: process.env.TXNOD_API_SECRET!,
|
|
430
|
+
* });
|
|
431
|
+
*
|
|
432
|
+
* try {
|
|
433
|
+
* const result = await client.claimInvoiceByTx({
|
|
434
|
+
* invoiceId: '01HK8MAR2QEXAMPLE000000000',
|
|
435
|
+
* txHash: '0xabc...def',
|
|
436
|
+
* chain: 'eth',
|
|
437
|
+
* });
|
|
438
|
+
* if (result.status === 'auto_attributed') {
|
|
439
|
+
* console.log('attributed; terminal_status:', result.terminal_status);
|
|
440
|
+
* } else if (result.status === 'rejected') {
|
|
441
|
+
* console.log('rejected:', result.rejection_reason);
|
|
442
|
+
* } else {
|
|
443
|
+
* console.log('queued; status:', result.status);
|
|
444
|
+
* }
|
|
445
|
+
* } catch (err) {
|
|
446
|
+
* if (err instanceof TxnodError) console.error(err.error_code);
|
|
447
|
+
* throw err;
|
|
448
|
+
* }
|
|
449
|
+
* ```
|
|
450
|
+
*/
|
|
451
|
+
claimInvoiceByTx(args) {
|
|
452
|
+
return this.#request({
|
|
453
|
+
method: 'POST',
|
|
454
|
+
path: `/api/v1/invoices/${args.invoiceId}/claim-by-tx`,
|
|
455
|
+
body: { tx_hash: args.txHash, chain: args.chain },
|
|
456
|
+
});
|
|
457
|
+
}
|
|
406
458
|
/**
|
|
407
459
|
* List on-chain receipts that did not match any invoice address.
|
|
408
460
|
*
|
|
@@ -524,7 +576,7 @@ export class TxnodClient {
|
|
|
524
576
|
/**
|
|
525
577
|
* Returns an indicative rate for pre-invoice pricing. The binding rate is
|
|
526
578
|
* captured by `createInvoice` in `rate_snapshot`; any delta between this
|
|
527
|
-
* quote and the invoice is the partner's responsibility
|
|
579
|
+
* quote and the invoice is the partner's responsibility.
|
|
528
580
|
*
|
|
529
581
|
* @example
|
|
530
582
|
* ```ts
|
|
@@ -554,7 +606,7 @@ export class TxnodClient {
|
|
|
554
606
|
/**
|
|
555
607
|
* Returns an indicative rate for pre-invoice pricing. The binding rate is
|
|
556
608
|
* captured by `createInvoice` in `rate_snapshot`; any delta between this
|
|
557
|
-
* quote and the invoice is the partner's responsibility
|
|
609
|
+
* quote and the invoice is the partner's responsibility.
|
|
558
610
|
*
|
|
559
611
|
* @example
|
|
560
612
|
* ```ts
|
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAmBA,OAAO,EACL,WAAW,GAIZ,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,cAAc,EAAsB,MAAM,oBAAoB,CAAC;AACzF,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,gCAAgC,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EACL,4BAA4B,EAC5B,4BAA4B,EAC5B,gCAAgC,GACjC,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,kBAAkB,EAAE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