wallaby-cash 3.8.0 → 3.10.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.
@@ -1264,7 +1264,7 @@ export interface AuthSignatureMessageResponseDto {
1264
1264
  * @pattern ^(0x)?[0-9a-fA-F]+$
1265
1265
  * @example "4ecb720b1392468c75803d6252ac987c113206955070b96df1208c1c480338168e1407cec4b5af2f91d12af9b725cbd85af994b29c6364971a7ef8d955be83dc"
1266
1266
  */
1267
- wallabyAuthPubKey: string;
1267
+ wallabyAuthPubKey?: string;
1268
1268
  }
1269
1269
  export interface AuthUserResponseDto {
1270
1270
  /**
@@ -6129,7 +6129,10 @@ export interface UserActivity {
6129
6129
  export interface UserAsset {
6130
6130
  /** The percentage change in the price of the asset in the last 24 hours */
6131
6131
  changePercentageLast24h?: string;
6132
- /** Addresses */
6132
+ /**
6133
+ * Deprecated, do not rely on this. Use the wallet_address or defaultAddress instead.
6134
+ * @deprecated
6135
+ */
6133
6136
  addresses: UserAssetAddress[];
6134
6137
  /** Asset Name */
6135
6138
  assetName: string;
@@ -6245,7 +6248,10 @@ export interface UserAssetAddress {
6245
6248
  export interface UserAssetDto {
6246
6249
  /** The percentage change in the price of the asset in the last 24 hours */
6247
6250
  changePercentageLast24h?: string;
6248
- /** Addresses */
6251
+ /**
6252
+ * Deprecated, do not rely on this. Use the wallet_address or defaultAddress instead.
6253
+ * @deprecated
6254
+ */
6249
6255
  addresses: UserAssetAddress[];
6250
6256
  /** Asset Name */
6251
6257
  assetName: string;
@@ -10687,12 +10693,12 @@ export declare class HttpClient<SecurityDataType = unknown> {
10687
10693
  request: <T = any, E = any>({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise<T>;
10688
10694
  }
10689
10695
  /**
10690
- * @title STAGING
10691
- * @version 1.0
10696
+ * @title NCW Wallets Service
10697
+ * @version 0.0.1
10692
10698
  * @baseUrl https://dev-testnet.wallaby.cash
10693
10699
  * @contact
10694
10700
  *
10695
- * The STAGING is an API that manages the wallets of the Republic Crypto
10701
+ * The NCW Wallets Service is an API that manages the wallets of the Republic Crypto
10696
10702
  */
10697
10703
  export declare class Api<SecurityDataType extends unknown> {
10698
10704
  http: HttpClient<SecurityDataType>;
@@ -1,4 +1,22 @@
1
1
  import { WallabyConfig } from '../types';
2
2
  export declare function isValidInput(input: string): boolean;
3
3
  export declare function isValidJwt(token: string): boolean;
4
+ /**
5
+ * BIP-39 only recognises the canonical form: NFKD-normalized, lowercase, single-space separated.
6
+ * Pasted phrases routinely carry newlines, double spaces or capitalization, none of which the
7
+ * enclave accepts, so normalize before validating and before sending. A phrase that only differs
8
+ * in those characters derives the same wallet, so this rescues the input rather than rejecting it.
9
+ */
10
+ export declare function normalizeSeedPhrase(seedPhrase: string): string;
11
+ /**
12
+ * True when the phrase is a valid BIP-39 mnemonic (checksum included) once normalized.
13
+ * Exposed so a UI can validate the field before submitting instead of catching a thrown error.
14
+ */
15
+ export declare function isValidSeedPhrase(seedPhrase: string): boolean;
16
+ /**
17
+ * Returns the normalized phrase, or throws the same 400 the enclave would return for it.
18
+ * Validating here keeps an invalid seed phrase off the wire and gives the caller an error that
19
+ * names the problem, instead of an opaque `Bad Request` from the far side of the API.
20
+ */
21
+ export declare function assertValidSeedPhrase(seedPhrase: string, message?: string): string;
4
22
  export declare function sanitizeConfig(config: WallabyConfig): WallabyConfig;