@unifold/core 0.1.81 → 0.1.82
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -1
- package/dist/index.mjs +6 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -988,7 +988,7 @@ interface VerifyAddressRequest {
|
|
|
988
988
|
* Standard error codes for address validation failures.
|
|
989
989
|
* Used by frontend to display localized error messages.
|
|
990
990
|
*/
|
|
991
|
-
type AddressValidationFailureCode = 'token_not_supported' | 'not_opted_in' | 'insufficient_balance' | 'account_not_found' | 'validation_error';
|
|
991
|
+
type AddressValidationFailureCode = 'token_not_supported' | 'not_opted_in' | 'insufficient_balance' | 'account_not_found' | 'destination_tag_required' | 'validation_error';
|
|
992
992
|
interface AddressValidationMetadata {
|
|
993
993
|
chain_name?: string;
|
|
994
994
|
token_symbol?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -988,7 +988,7 @@ interface VerifyAddressRequest {
|
|
|
988
988
|
* Standard error codes for address validation failures.
|
|
989
989
|
* Used by frontend to display localized error messages.
|
|
990
990
|
*/
|
|
991
|
-
type AddressValidationFailureCode = 'token_not_supported' | 'not_opted_in' | 'insufficient_balance' | 'account_not_found' | 'validation_error';
|
|
991
|
+
type AddressValidationFailureCode = 'token_not_supported' | 'not_opted_in' | 'insufficient_balance' | 'account_not_found' | 'destination_tag_required' | 'validation_error';
|
|
992
992
|
interface AddressValidationMetadata {
|
|
993
993
|
chain_name?: string;
|
|
994
994
|
token_symbol?: string;
|
package/dist/index.js
CHANGED
|
@@ -192,7 +192,7 @@ function generatePrefixedKSUID(prefix) {
|
|
|
192
192
|
}
|
|
193
193
|
|
|
194
194
|
// src/lib/client-headers.ts
|
|
195
|
-
var SDK_VERSION = true ? "0.1.
|
|
195
|
+
var SDK_VERSION = true ? "0.1.82" : "0.0.0-dev";
|
|
196
196
|
var CLIENT_VERSION_HEADER = "x-unifold-client-version";
|
|
197
197
|
var CLIENT_USER_AGENT_HEADER = "x-unifold-client-user-agent";
|
|
198
198
|
function detectRuntime() {
|
|
@@ -355,6 +355,11 @@ async function createDepositAddress(overrides, publishableKey) {
|
|
|
355
355
|
const firstError = Array.isArray(body.details?.errors) ? body.details?.errors[0] : void 0;
|
|
356
356
|
throw new DepositAddressValidationError(firstError ?? "Invalid recipient address");
|
|
357
357
|
}
|
|
358
|
+
if (body?.error_type === "xrpl_destination_tag_required") {
|
|
359
|
+
throw new DepositAddressValidationError(
|
|
360
|
+
body.message ?? "Recipient address requires a destination tag"
|
|
361
|
+
);
|
|
362
|
+
}
|
|
358
363
|
}
|
|
359
364
|
throw new Error(`Failed to create EOA: ${response.statusText}`);
|
|
360
365
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -41,7 +41,7 @@ function generatePrefixedKSUID(prefix) {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
// src/lib/client-headers.ts
|
|
44
|
-
var SDK_VERSION = true ? "0.1.
|
|
44
|
+
var SDK_VERSION = true ? "0.1.82" : "0.0.0-dev";
|
|
45
45
|
var CLIENT_VERSION_HEADER = "x-unifold-client-version";
|
|
46
46
|
var CLIENT_USER_AGENT_HEADER = "x-unifold-client-user-agent";
|
|
47
47
|
function detectRuntime() {
|
|
@@ -204,6 +204,11 @@ async function createDepositAddress(overrides, publishableKey) {
|
|
|
204
204
|
const firstError = Array.isArray(body.details?.errors) ? body.details?.errors[0] : void 0;
|
|
205
205
|
throw new DepositAddressValidationError(firstError ?? "Invalid recipient address");
|
|
206
206
|
}
|
|
207
|
+
if (body?.error_type === "xrpl_destination_tag_required") {
|
|
208
|
+
throw new DepositAddressValidationError(
|
|
209
|
+
body.message ?? "Recipient address requires a destination tag"
|
|
210
|
+
);
|
|
211
|
+
}
|
|
207
212
|
}
|
|
208
213
|
throw new Error(`Failed to create EOA: ${response.statusText}`);
|
|
209
214
|
}
|