@florent-uzio/custody 2.1.0 → 2.3.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.
Files changed (53) hide show
  1. package/dist/index.d.ts +2 -1
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +2 -0
  4. package/dist/index.js.map +1 -1
  5. package/dist/models/custody-types.d.ts +565 -338
  6. package/dist/models/custody-types.d.ts.map +1 -1
  7. package/dist/namespaces/intents.d.ts.map +1 -1
  8. package/dist/namespaces/intents.js +31 -36
  9. package/dist/namespaces/intents.js.map +1 -1
  10. package/dist/ripple-custody.d.ts +55 -10
  11. package/dist/ripple-custody.d.ts.map +1 -1
  12. package/dist/ripple-custody.js +54 -21
  13. package/dist/ripple-custody.js.map +1 -1
  14. package/dist/services/intents/intents.types.d.ts +5 -10
  15. package/dist/services/intents/intents.types.d.ts.map +1 -1
  16. package/dist/services/xrpl/index.d.ts +1 -0
  17. package/dist/services/xrpl/index.d.ts.map +1 -1
  18. package/dist/services/xrpl/index.js +1 -4
  19. package/dist/services/xrpl/index.js.map +1 -1
  20. package/dist/services/xrpl/xrpl.adapters.d.ts +23 -5
  21. package/dist/services/xrpl/xrpl.adapters.d.ts.map +1 -1
  22. package/dist/services/xrpl/xrpl.adapters.js +244 -161
  23. package/dist/services/xrpl/xrpl.adapters.js.map +1 -1
  24. package/dist/services/xrpl/xrpl.builders.d.ts +22 -0
  25. package/dist/services/xrpl/xrpl.builders.d.ts.map +1 -0
  26. package/dist/services/xrpl/xrpl.builders.js +107 -0
  27. package/dist/services/xrpl/xrpl.builders.js.map +1 -0
  28. package/dist/services/xrpl/xrpl.crypto.d.ts +6 -0
  29. package/dist/services/xrpl/xrpl.crypto.d.ts.map +1 -0
  30. package/dist/services/xrpl/xrpl.crypto.js +19 -0
  31. package/dist/services/xrpl/xrpl.crypto.js.map +1 -0
  32. package/dist/services/xrpl/xrpl.http-adapters.d.ts.map +1 -1
  33. package/dist/services/xrpl/xrpl.http-adapters.js +5 -0
  34. package/dist/services/xrpl/xrpl.http-adapters.js.map +1 -1
  35. package/dist/services/xrpl/xrpl.ports.d.ts +7 -1
  36. package/dist/services/xrpl/xrpl.ports.d.ts.map +1 -1
  37. package/dist/services/xrpl/xrpl.service.d.ts +79 -36
  38. package/dist/services/xrpl/xrpl.service.d.ts.map +1 -1
  39. package/dist/services/xrpl/xrpl.service.js +178 -182
  40. package/dist/services/xrpl/xrpl.service.js.map +1 -1
  41. package/dist/services/xrpl/xrpl.types.d.ts +108 -7
  42. package/dist/services/xrpl/xrpl.types.d.ts.map +1 -1
  43. package/dist/services/xrpl/xrpl.types.js +0 -28
  44. package/dist/services/xrpl/xrpl.types.js.map +1 -1
  45. package/package.json +2 -1
  46. package/dist/main.d.ts +0 -2
  47. package/dist/main.d.ts.map +0 -1
  48. package/dist/main.helpers.d.ts +0 -2
  49. package/dist/main.helpers.d.ts.map +0 -1
  50. package/dist/main.helpers.js +0 -99
  51. package/dist/main.helpers.js.map +0 -1
  52. package/dist/main.js +0 -41
  53. package/dist/main.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"intents.d.ts","sourceRoot":"","sources":["../../src/namespaces/intents.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,mCAAmC,EACxC,KAAK,oCAAoC,EACzC,KAAK,kBAAkB,EACvB,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC5B,MAAM,sCAAsC,CAAA;AAC7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AA8E3D,wBAAgB,aAAa,CAAC,CAAC,EAAE,cAAc;+BAEzB,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,KACjC,OAAO,CAAC,mBAAmB,CAAC;8BAEd,wBAAwB,KAAG,OAAO,CAAC,yBAAyB,CAAC;sCAIpE,mCAAmC,UACnC,oCAAoC,KAC3C,OAAO,CAAC,yBAAyB,CAAC;kCAG3B,wBAAwB,YACtB,uBAAuB,KAChC,OAAO,CAAC,sBAAsB,CAAC;EAErC"}
@@ -3,56 +3,51 @@ import { sleep } from "../helpers/index.js";
3
3
  import { CustodyError } from "../models/index.js";
4
4
  import { TERMINAL_STATUSES, } from "../services/intents/intents.types.js";
5
5
  /**
6
- * Fetches an intent with retry logic for 404 errors.
7
- * Useful when the intent might not be immediately available after creation.
6
+ * Wait for an intent to reach a terminal status (Executed, Failed, Expired, or Rejected).
7
+ * Polls the intent status at regular intervals until it completes or max retries is reached.
8
+ *
9
+ * A 404 is treated as "not available yet" (e.g. when called immediately after proposing)
10
+ * and is retried within the same polling loop rather than aborting the wait.
8
11
  */
9
- async function getIntentWithRetry(t, params, maxRetries, intervalMs) {
10
- let lastError;
12
+ async function waitForExecution(t, params, options = {}) {
13
+ const { maxRetries = 10, intervalMs = 3000, onStatusCheck } = options;
14
+ let lastIntent;
11
15
  for (let attempt = 1; attempt <= maxRetries; attempt++) {
12
16
  try {
13
- return await t.get(URLs.getIntent, params);
17
+ const intent = await t.get(URLs.getIntent, params);
18
+ lastIntent = intent;
19
+ const status = intent.data.state.status;
20
+ onStatusCheck?.(status, attempt);
21
+ if (TERMINAL_STATUSES.includes(status)) {
22
+ return {
23
+ status,
24
+ isTerminal: true,
25
+ isSuccess: status === "Executed",
26
+ intent,
27
+ };
28
+ }
14
29
  }
15
30
  catch (error) {
16
- if (error instanceof CustodyError && error.statusCode === 404) {
17
- lastError = error;
18
- if (attempt < maxRetries) {
19
- await sleep(intervalMs);
20
- }
21
- continue;
31
+ if (!(error instanceof CustodyError && error.statusCode === 404)) {
32
+ throw error;
22
33
  }
23
- throw error;
24
- }
25
- }
26
- throw lastError;
27
- }
28
- /**
29
- * Wait for an intent to reach a terminal status (Executed, Failed, Expired, or Rejected).
30
- * Polls the intent status at regular intervals until it completes or max retries is reached.
31
- */
32
- async function waitForExecution(t, params, options = {}) {
33
- const { maxRetries = 10, intervalMs = 3000, notFoundRetries = 3, notFoundIntervalMs = 1000, onStatusCheck, } = options;
34
- for (let attempt = 1; attempt <= maxRetries; attempt++) {
35
- const intent = await getIntentWithRetry(t, params, notFoundRetries, notFoundIntervalMs);
36
- const status = intent.data.state.status;
37
- onStatusCheck?.(status, attempt);
38
- if (TERMINAL_STATUSES.includes(status)) {
39
- return {
40
- status,
41
- isTerminal: true,
42
- isSuccess: status === "Executed",
43
- intent,
44
- };
34
+ // 404 → the intent is not available yet, keep polling.
45
35
  }
46
36
  if (attempt < maxRetries) {
47
37
  await sleep(intervalMs);
48
38
  }
49
39
  }
50
- const finalIntent = await getIntentWithRetry(t, params, notFoundRetries, notFoundIntervalMs);
40
+ // Retries exhausted. If the intent never materialized, surface that as a 404.
41
+ if (!lastIntent) {
42
+ throw new CustodyError({ reason: `Intent ${params.intentId} not found after ${maxRetries} attempts` }, 404);
43
+ }
44
+ // The loop returns early on any terminal status, so the last observed intent is
45
+ // necessarily non-terminal here.
51
46
  return {
52
- status: finalIntent.data.state.status,
47
+ status: lastIntent.data.state.status,
53
48
  isTerminal: false,
54
49
  isSuccess: false,
55
- intent: finalIntent,
50
+ intent: lastIntent,
56
51
  };
57
52
  }
58
53
  export function createIntents(t) {
@@ -1 +1 @@
1
- {"version":3,"file":"intents.js","sourceRoot":"","sources":["../../src/namespaces/intents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EACL,iBAAiB,GAgBlB,MAAM,sCAAsC,CAAA;AAG7C;;;GAGG;AACH,KAAK,UAAU,kBAAkB,CAC/B,CAAi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C,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,CAAC;QAEtE,IAAI,EAAE,CACJ,MAAiC,EACjC,KAAkC,EACJ,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,EAAE,MAAM,EAAE,KAAK,CAAC;QAE3E,MAAM,EAAE,CAAC,MAAgC,EAAsC,EAAE,CAC/E,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,MAAM,CAAC;QAEpC,cAAc,EAAE,CACd,MAA2C,EAC3C,KAA4C,EACR,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,oBAAoB,EAAE,MAAM,EAAE,KAAK,CAAC;QAExF,UAAU,EAAE,CACV,MAAgC,EAChC,OAAiC,EACA,EAAE,CAAC,gBAAgB,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC;KAClE,CAAA;AACZ,CAAC"}
@@ -2,7 +2,7 @@ import type { SubmittableTransaction } from "xrpl";
2
2
  import { createAccounts, createChannels, createDomains, createEndpoints, createEvents, createGenesis, createIntents, createLedgers, createPolicies, createRequests, createTickers, createTransactions, createUserInvitations, createUsers, createVaults } from "./namespaces/index.js";
3
3
  import type { RippleCustodyClientOptions } from "./ripple-custody.types.js";
4
4
  import type { Core_IntentResponse } from "./services/intents/intents.types.js";
5
- import { type Core_XrplOperation, type RawSignAndWaitOptions, type RawSignAndWaitResult, type XrplIntentOptions } from "./services/xrpl/index.js";
5
+ import { type BatchPayloadInput, type Core_ApiBatchSigningData, type Core_BatchSigner, type Core_XrplOperation, type GetBatchSignatureParams, type RawSignAndWaitOptions, type RawSignAndWaitResult, type SignBatchPayloadHandle, type SignBatchPayloadOptions, type SignBatchPayloadResult, type WaitForSignatureOptions, type XrplIntentOptions } from "./services/xrpl/index.js";
6
6
  export declare class RippleCustody {
7
7
  private readonly apiService;
8
8
  private readonly authService;
@@ -67,20 +67,65 @@ export declare class RippleCustody {
67
67
  */
68
68
  rawSignAndWait: (xrplTransaction: SubmittableTransaction, options?: RawSignAndWaitOptions) => Promise<RawSignAndWaitResult>;
69
69
  /**
70
- * Proposes a raw sign intent for a Batch transaction envelope for a single inner account.
71
- * @param batch - The autofilled Batch transaction
72
- * @param signerAddress - The XRPL address of the inner account to sign for
73
- * @param options - Optional configuration for the raw sign intent
74
- * @returns The proposed intent response
70
+ * Step 1 of the XLS-56 Batch flow dry-runs a Batch and returns the
71
+ * canonical signing data. Each participant signs `signingPayload` with
72
+ * their own XRPL key; collect signatures and pass them to `proposeBatch`.
73
+ *
74
+ * @param payload - Submitter, execution mode, and inner entries
75
+ * @param options - Optional configuration for the dry-run intent
76
+ * @returns The batch signing data (signingPayload, hash, resolved transactions)
75
77
  */
78
+ dryRunBatch: (payload: BatchPayloadInput, options?: XrplIntentOptions) => Promise<Core_ApiBatchSigningData>;
76
79
  /**
77
- * Signs a Batch transaction envelope for a single inner account and waits
78
- * for the manifest signature. Call once per inner account.
79
- * @param batch - The autofilled Batch transaction
80
+ * Step 2 of the XLS-56 Batch flow signs the `signingPayload` from a dry
81
+ * run for an inner account managed by this custody instance and waits for
82
+ * the manifest signature. Call once per locally-managed signer.
83
+ *
84
+ * @param signingPayload - Hex-encoded payload from `dryRunBatch`
80
85
  * @param signerAddress - The XRPL address of the inner account to sign for
81
86
  * @param options - Optional configuration for the raw sign intent and polling
82
- * @returns The signature and signing public key in uppercase hex
87
+ * @returns Signature, public key, and pre-built BatchSigner shapes
88
+ */
89
+ signBatchPayloadAndWait: (signingPayload: string, signerAddress: string, options?: SignBatchPayloadOptions) => Promise<SignBatchPayloadResult>;
90
+ /**
91
+ * Step 2 of the XLS-56 Batch flow (non-blocking) — proposes the raw sign
92
+ * intent for an inner account managed by this custody instance and returns
93
+ * immediately, without waiting for the manifest signature.
94
+ *
95
+ * Use when the operator approves signatures out-of-band: persist the
96
+ * returned handle and pass it to `getBatchSignature` later to fetch the
97
+ * signature once available.
98
+ *
99
+ * @param signingPayload - Hex-encoded payload from `dryRunBatch`
100
+ * @param signerAddress - The XRPL address of the inner account to sign for
101
+ * @param options - Optional configuration for the raw sign intent
102
+ * @returns A handle with the manifest ID and fields needed to retrieve the signature
103
+ */
104
+ signBatchPayload: (signingPayload: string, signerAddress: string, options?: SignBatchPayloadOptions) => Promise<SignBatchPayloadHandle>;
105
+ /**
106
+ * Retrieves the signature for a payload proposed via `signBatchPayload`,
107
+ * building the BatchSigner shapes when available.
108
+ *
109
+ * Performs a single fetch by default; returns `undefined` if the operator
110
+ * has not approved the signature yet. Pass `maxRetries`/`intervalMs` to opt
111
+ * into light polling.
112
+ *
113
+ * @param params - Fields from the `signBatchPayload` handle (a handle may be passed directly)
114
+ * @param options - Optional polling configuration (defaults to a single attempt)
115
+ * @returns Signature and BatchSigner shapes, or `undefined` if not yet signed
116
+ */
117
+ getBatchSignature: (params: GetBatchSignatureParams, options?: WaitForSignatureOptions) => Promise<SignBatchPayloadResult | undefined>;
118
+ /**
119
+ * Step 3 of the XLS-56 Batch flow — submits the Batch with collected
120
+ * `batchSigners`. Reuse `options.payloadId`/`options.requestId` if you
121
+ * need referential identity with the dry-run.
122
+ *
123
+ * @param payload - Same submitter, execution mode, and entries as the dry-run
124
+ * @param batchSigners - Signatures collected in Step 2
125
+ * @param options - Optional configuration for the intent
126
+ * @returns The proposed intent response
83
127
  */
128
+ proposeBatch: (payload: BatchPayloadInput, batchSigners: Core_BatchSigner[], options?: XrplIntentOptions) => Promise<Core_IntentResponse>;
84
129
  /**
85
130
  * Get the compressed secp256k1 public key for an XRPL account.
86
131
  * @param params - The domain ID and account ID
@@ -1 +1 @@
1
- {"version":3,"file":"ripple-custody.d.ts","sourceRoot":"","sources":["../src/ripple-custody.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,MAAM,CAAA;AAClD,OAAO,EACL,cAAc,EACd,cAAc,EACd,aAAa,EACb,eAAe,EACf,YAAY,EACZ,aAAa,EACb,aAA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,CAAC;QAG/B;;;;WAIG;+BAC0B;YAAE,QAAQ,EAAE,MAAM,CAAC;YAAC,SAAS,EAAE,MAAM,CAAA;SAAE,KAAG,OAAO,CAAC,MAAM,CAAC;MAEvF;CACF"}
@@ -101,32 +101,65 @@ export class RippleCustody {
101
101
  */
102
102
  rawSignAndWait: async (xrplTransaction, options) => this.xrplService.rawSignAndWait(xrplTransaction, options),
103
103
  /**
104
- * Proposes a raw sign intent for a Batch transaction envelope for a single inner account.
105
- * @param batch - The autofilled Batch transaction
106
- * @param signerAddress - The XRPL address of the inner account to sign for
107
- * @param options - Optional configuration for the raw sign intent
108
- * @returns The proposed intent response
104
+ * Step 1 of the XLS-56 Batch flow dry-runs a Batch and returns the
105
+ * canonical signing data. Each participant signs `signingPayload` with
106
+ * their own XRPL key; collect signatures and pass them to `proposeBatch`.
107
+ *
108
+ * @param payload - Submitter, execution mode, and inner entries
109
+ * @param options - Optional configuration for the dry-run intent
110
+ * @returns The batch signing data (signingPayload, hash, resolved transactions)
109
111
  */
110
- // rawSignInnerBatch: async (
111
- // batch: Batch,
112
- // signerAddress: string,
113
- // options?: RawSignInnerBatchOptions,
114
- // ): Promise<Core_IntentResponse> =>
115
- // this.xrplService.rawSignInnerBatch(batch, signerAddress, options),
112
+ dryRunBatch: async (payload, options) => this.xrplService.dryRunBatch(payload, options),
116
113
  /**
117
- * Signs a Batch transaction envelope for a single inner account and waits
118
- * for the manifest signature. Call once per inner account.
119
- * @param batch - The autofilled Batch transaction
114
+ * Step 2 of the XLS-56 Batch flow signs the `signingPayload` from a dry
115
+ * run for an inner account managed by this custody instance and waits for
116
+ * the manifest signature. Call once per locally-managed signer.
117
+ *
118
+ * @param signingPayload - Hex-encoded payload from `dryRunBatch`
120
119
  * @param signerAddress - The XRPL address of the inner account to sign for
121
120
  * @param options - Optional configuration for the raw sign intent and polling
122
- * @returns The signature and signing public key in uppercase hex
121
+ * @returns Signature, public key, and pre-built BatchSigner shapes
122
+ */
123
+ signBatchPayloadAndWait: async (signingPayload, signerAddress, options) => this.xrplService.signBatchPayloadAndWait(signingPayload, signerAddress, options),
124
+ /**
125
+ * Step 2 of the XLS-56 Batch flow (non-blocking) — proposes the raw sign
126
+ * intent for an inner account managed by this custody instance and returns
127
+ * immediately, without waiting for the manifest signature.
128
+ *
129
+ * Use when the operator approves signatures out-of-band: persist the
130
+ * returned handle and pass it to `getBatchSignature` later to fetch the
131
+ * signature once available.
132
+ *
133
+ * @param signingPayload - Hex-encoded payload from `dryRunBatch`
134
+ * @param signerAddress - The XRPL address of the inner account to sign for
135
+ * @param options - Optional configuration for the raw sign intent
136
+ * @returns A handle with the manifest ID and fields needed to retrieve the signature
137
+ */
138
+ signBatchPayload: async (signingPayload, signerAddress, options) => this.xrplService.signBatchPayload(signingPayload, signerAddress, options),
139
+ /**
140
+ * Retrieves the signature for a payload proposed via `signBatchPayload`,
141
+ * building the BatchSigner shapes when available.
142
+ *
143
+ * Performs a single fetch by default; returns `undefined` if the operator
144
+ * has not approved the signature yet. Pass `maxRetries`/`intervalMs` to opt
145
+ * into light polling.
146
+ *
147
+ * @param params - Fields from the `signBatchPayload` handle (a handle may be passed directly)
148
+ * @param options - Optional polling configuration (defaults to a single attempt)
149
+ * @returns Signature and BatchSigner shapes, or `undefined` if not yet signed
150
+ */
151
+ getBatchSignature: async (params, options) => this.xrplService.getBatchSignature(params, options),
152
+ /**
153
+ * Step 3 of the XLS-56 Batch flow — submits the Batch with collected
154
+ * `batchSigners`. Reuse `options.payloadId`/`options.requestId` if you
155
+ * need referential identity with the dry-run.
156
+ *
157
+ * @param payload - Same submitter, execution mode, and entries as the dry-run
158
+ * @param batchSigners - Signatures collected in Step 2
159
+ * @param options - Optional configuration for the intent
160
+ * @returns The proposed intent response
123
161
  */
124
- // rawSignInnerBatchAndWait: async (
125
- // batch: Batch,
126
- // signerAddress: string,
127
- // options?: RawSignInnerBatchOptions,
128
- // ): Promise<RawSignInnerBatchAndWaitResult> =>
129
- // this.xrplService.rawSignInnerBatchAndWait(batch, signerAddress, options),
162
+ proposeBatch: async (payload, batchSigners, options) => this.xrplService.proposeBatch(payload, batchSigners, options),
130
163
  /**
131
164
  * Get the compressed secp256k1 public key for an XRPL account.
132
165
  * @param params - The domain ID and account ID
@@ -1 +1 @@
1
- {"version":3,"file":"ripple-custody.js","sourceRoot":"","sources":["../src/ripple-custody.ts"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,EACd,cAAc,EACd,aAAa,EACb,eAAe,EACf,YAAY,EACZ,aAAa,EACb,aAAa,EACb,aAAa,EACb,cAAc,EACd,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,qBAAqB,EACrB,WAAW,EACX,YAAY,GACb,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAEtD,OAAO,EACL,eAAe,EACf,WAAW,GAKZ,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAErD,MAAM,OAAO,aAAa;IACxB,qEAAqE;IACpD,UAAU,CAAY;IACtB,WAAW,CAAa;IACxB,SAAS,CAAgB;IAE1C,qCAAqC;IAC7B,YAAY,CAAc;IAElC,IAAY,WAAW;QACrB,OAAO,CAAC,IAAI,CAAC,YAAY,KAAK,IAAI,WAAW,CAAC,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAA;IACjF,CAAC;IAED,iDAAiD;IACjC,QAAQ,CAAmC;IAC3C,OAAO,CAAkC;IACzC,SAAS,CAAoC;IAC7C,MAAM,CAAiC;IACvC,OAAO,CAAkC;IACzC,OAAO,CAAkC;IACzC,YAAY,CAAuC;IACnD,QAAQ,CAAmC;IAC3C,KAAK,CAAgC;IACrC,eAAe,CAA0C;IACzD,OAAO,CAAkC;IACzC,OAAO,CAAkC;IACzC,QAAQ,CAAmC;IAC3C,MAAM,CAAiC;IACvC,Q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,EAAE,OAAO,CAAC;QAEtF;;;;;;;;;WASG;QACH,uBAAuB,EAAE,KAAK,EAC5B,cAAsB,EACtB,aAAqB,EACrB,OAAiC,EACA,EAAE,CACnC,IAAI,CAAC,WAAW,CAAC,uBAAuB,CAAC,cAAc,EAAE,aAAa,EAAE,OAAO,CAAC;QAElF;;;;;;;;;;;;;WAaG;QACH,gBAAgB,EAAE,KAAK,EACrB,cAAsB,EACtB,aAAqB,EACrB,OAAiC,EACA,EAAE,CACnC,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,cAAc,EAAE,aAAa,EAAE,OAAO,CAAC;QAE3E;;;;;;;;;;;WAWG;QACH,iBAAiB,EAAE,KAAK,EACtB,MAA+B,EAC/B,OAAiC,EACY,EAAE,CAC/C,IAAI,CAAC,WAAW,CAAC,iBAAiB,CAAC,MAAM,EAAE,OAAO,CAAC;QAErD;;;;;;;;;WASG;QACH,YAAY,EAAE,KAAK,EACjB,OAA0B,EAC1B,YAAgC,EAChC,OAA2B,EACG,EAAE,CAChC,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,CAAC;QAE/D;;;;WAIG;QACH,YAAY,EAAE,KAAK,EAAE,MAA+C,EAAmB,EAAE,CACvF,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,MAAM,CAAC;KACxC,CAAA;CACF"}
@@ -9,19 +9,14 @@ export declare const PENDING_STATUSES: Core_IntentStatus[];
9
9
  * Options for waiting for intent execution
10
10
  */
11
11
  export type WaitForExecutionOptions = {
12
- /** Maximum number of polling attempts (default: 10) */
12
+ /**
13
+ * Maximum number of polling attempts (default: 10). Also bounds how long a
14
+ * not-yet-available (404) intent is waited for, since 404s are retried within
15
+ * the same loop.
16
+ */
13
17
  maxRetries?: number;
14
18
  /** Interval between polling attempts in milliseconds (default: 3000) */
15
19
  intervalMs?: number;
16
- /**
17
- * Maximum number of retries when the intent is not found (404).
18
- * Useful when calling immediately after proposeIntent. (default: 3)
19
- */
20
- notFoundRetries?: number;
21
- /**
22
- * Interval between retries when the intent is not found in milliseconds (default: 1000)
23
- */
24
- notFoundIntervalMs?: number;
25
20
  /**
26
21
  * Callback function called on each status check.
27
22
  * Useful for logging or updating UI.
@@ -1 +1 @@
1
- {"version":3,"file":"intents.types.d.ts","sourceRoot":"","sources":["../../../src/services/intents/intents.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAA;AAC3E,OAAO,KAAK,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAG5E,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,mBAAmB,CAAC,CAAA;AAE1E,yEAAyE;AACzE,eAAO,MAAM,iBAAiB,EAAE,iBAAiB,EAAkD,CAAA;AAEnG,wEAAwE;AACxE,eAAO,MAAM,gBAAgB,EAAE,iBAAiB,EAAsC,CAAA;AAEtF;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC,uDAAuD;IACvD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,wEAAwE;IACxE,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;CACrE,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC,qCAAqC;IACrC,MAAM,EAAE,iBAAiB,CAAA;IACzB,mDAAmD;IACnD,UAAU,EAAE,OAAO,CAAA;IACnB,mDAAmD;IACnD,SAAS,EAAE,OAAO,CAAA;IAClB,6BAA6B;IAC7B,MAAM,EAAE,kBAAkB,CAAA;CAC3B,CAAA;AAED;;GAEG;AACH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CustodyBatchSigners, batchToCustodyBatchPayload, batchToCustodyInnerTransactions, } from "./xrpl.adapters.js";
1
2
  export { createHttpPorts } from "./xrpl.http-adapters.js";
2
3
  export type { XrplPorts } from "./xrpl.ports.js";
3
4
  export * from "./xrpl.service.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/xrpl/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AACzD,YAAY,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAChD,cAAc,mBAAmB,CAAA;AACjC,cAAc,iBAAiB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/xrpl/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iCAAiC,EACjC,0BAA0B,EAC1B,+BAA+B,GAChC,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AACzD,YAAY,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAChD,cAAc,mBAAmB,CAAA;AACjC,cAAc,iBAAiB,CAAA"}
@@ -1,7 +1,4 @@
1
- // export {
2
- // batchSignersToCustodyBatchSigners,
3
- // rawTransactionsToInnerTransactions,
4
- // } from "./xrpl.adapters.js"
1
+ export { batchSignersToCustodyBatchSigners, batchToCustodyBatchPayload, batchToCustodyInnerTransactions, } from "./xrpl.adapters.js";
5
2
  export { createHttpPorts } from "./xrpl.http-adapters.js";
6
3
  export * from "./xrpl.service.js";
7
4
  export * from "./xrpl.types.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/services/xrpl/index.ts"],"names":[],"mappings":"AAAA,WAAW;AACX,uCAAuC;AACvC,wCAAwC;AACxC,8BAA8B;AAC9B,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAEzD,cAAc,mBAAmB,CAAA;AACjC,cAAc,iBAAiB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/services/xrpl/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iCAAiC,EACjC,0BAA0B,EAC1B,+BAA+B,GAChC,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAEzD,cAAc,mBAAmB,CAAA;AACjC,cAAc,iBAAiB,CAAA"}
@@ -1,13 +1,31 @@
1
- export {};
1
+ import { type Batch, type BatchSigner } from "xrpl";
2
+ import type { BatchPayloadInput, CustodyBatchSigner, CustodyInnerTransaction } from "./xrpl.types.js";
2
3
  /**
3
4
  * Converts an XRPL SDK BatchSigners array (from a signed Batch transaction)
4
5
  * to the batchSigners format required by the Ripple Custody API.
5
6
  */
7
+ export declare const batchSignersToCustodyBatchSigners: (batchSigners: BatchSigner[]) => CustodyBatchSigner[];
6
8
  /**
7
- * Converts an XRPL SDK Batch.RawTransactions array to the innerTransactions
8
- * format required by the Ripple Custody API.
9
+ * Converts an autofilled xrpl.js Batch into a `BatchPayloadInput` for
10
+ * `dryRunBatch` / `proposeBatch`.
9
11
  *
10
- * Supported transaction types: Payment, OfferCreate, TrustSet, AccountSet, TicketCreate.
11
- * Throws for any other type.
12
+ * - `Flags` is required and must set exactly one execution-mode flag
13
+ * (`tfAllOrNothing` / `tfOnlyOne` / `tfUntilFailure` / `tfIndependent`)
14
+ * - When `Sequence` is present on the outer Batch, it is mapped to
15
+ * `{ type: "AccountSequence", value: Sequence }`; otherwise `sequencing`
16
+ * is omitted so the service default `{ type: "PlatformManaged" }` applies
17
+ * - `LastLedgerSequence` is passed through when present
18
+ * - `BatchSigners` on the input is ignored — collect signatures separately
19
+ * and pass them to `proposeBatch`
12
20
  */
21
+ export declare const batchToCustodyBatchPayload: (batch: Batch) => BatchPayloadInput;
22
+ /**
23
+ * Converts an xrpl.js Batch transaction to the inner transactions array
24
+ * required by the Ripple Custody API.
25
+ *
26
+ * Each inner transaction is emitted as a `SubmitterOperation` when its
27
+ * `Account` matches the outer `Batch.Account` (the submitter), and as a
28
+ * `ParticipantOperation` otherwise.
29
+ */
30
+ export declare const batchToCustodyInnerTransactions: (batch: Pick<Batch, "Account" | "RawTransactions">) => CustodyInnerTransaction[];
13
31
  //# sourceMappingURL=xrpl.adapters.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"xrpl.adapters.d.ts","sourceRoot":"","sources":["../../../src/services/xrpl/xrpl.adapters.ts"],"names":[],"mappings":";AAiRA;;;GAGG;AAWH;;;;;;GAMG"}
1
+ {"version":3,"file":"xrpl.adapters.d.ts","sourceRoot":"","sources":["../../../src/services/xrpl/xrpl.adapters.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,KAAK,EAEV,KAAK,WAAW,EAOjB,MAAM,MAAM,CAAA;AAGb,OAAO,KAAK,EACV,iBAAiB,EAIjB,kBAAkB,EAClB,uBAAuB,EAGxB,MAAM,iBAAiB,CAAA;AAkQxB;;;GAGG;AACH,eAAO,MAAM,iCAAiC,GAC5C,cAAc,WAAW,EAAE,KAC1B,kBAAkB,EASpB,CAAA;AAyCD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,0BAA0B,GAAI,OAAO,KAAK,KAAG,iBAYzD,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,+BAA+B,GAC1C,OAAO,IAAI,CAAC,KAAK,EAAE,SAAS,GAAG,iBAAiB,CAAC,KAChD,uBAAuB,EAmBzB,CAAA"}