wallaby-cash 3.5.0 → 3.5.2
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/base.d.ts +2 -4
- package/dist/index.cjs.js +487 -147
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.esm.js +487 -147
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +487 -147
- package/dist/index.js.map +1 -1
- package/dist/lib/api/api.d.ts +1 -2
- package/dist/lib/auth/auth.service.d.ts +1 -2
- package/dist/lib/auth/passkey.service.base.d.ts +1 -2
- package/dist/lib/swap/index.d.ts +1 -2
- package/dist/lib/system/index.d.ts +6 -3
- package/dist/lib/transactions/index.d.ts +1 -2
- package/dist/lib/utils/cipher-core.d.ts +74 -0
- package/dist/lib/utils/cipher.service.d.ts +7 -2
- package/dist/lib/utils/extract-sui-asset-symbol.d.ts +12 -0
- package/dist/lib/utils/index.d.ts +1 -2
- package/dist/lib/utils/is-jwt-expired.d.ts +3 -3
- package/dist/lib/utils/storage.service.d.ts +13 -0
- package/dist/lib/wallet/wallet-data.service.d.ts +1 -2
- package/dist/lib/wallet/wallet-handlers.service.d.ts +1 -2
- package/dist/lib/wallet/wallet.service.d.ts +8 -2
- package/dist/package.json +3 -3
- package/dist/types/storage.d.ts +3 -1
- package/dist/types/wallet.d.ts +2 -7
- package/package.json +2 -2
- package/dist/lib/utils/ports.d.ts +0 -22
package/dist/lib/api/api.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { WallabyConfig } from '../../types';
|
|
2
2
|
import { Base } from '../../base';
|
|
3
|
-
import { Ports } from '../utils/ports';
|
|
4
3
|
/**
|
|
5
4
|
* HttpApi provides direct access to all REST API endpoints.
|
|
6
5
|
* This class extends the Base class and includes the generated API client
|
|
@@ -15,5 +14,5 @@ export declare class HttpApi extends Base {
|
|
|
15
14
|
* @param config - The Wallaby configuration object
|
|
16
15
|
* @public
|
|
17
16
|
*/
|
|
18
|
-
constructor(config: WallabyConfig
|
|
17
|
+
constructor(config: WallabyConfig);
|
|
19
18
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { Base } from '../../base';
|
|
2
|
-
import { Ports } from '../utils/ports';
|
|
3
2
|
import { SignatureMessageResponse, WallabyConfig, AuthenticationResponse, AsymmetricKeyPair, GetSignatureOptions, AuthenticationRequest } from '../../types';
|
|
4
3
|
import { GetPasskeyCredentialsData, IssueJWTTokenResponseDto } from '../../generated/api';
|
|
5
4
|
export declare class AuthService extends Base {
|
|
6
5
|
private passkeyService;
|
|
7
|
-
constructor(config: WallabyConfig
|
|
6
|
+
constructor(config: WallabyConfig);
|
|
8
7
|
/**
|
|
9
8
|
* @description
|
|
10
9
|
* This method is used to check if the user is on a device that supports PRF.
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { AsymmetricKeyPair, Encrypted, SignatureMessageResponse, AuthenticationResponse, RequestOptions, RequestRoute } from '../../types';
|
|
2
|
-
import { Cipher } from '../utils/cipher.service';
|
|
3
2
|
import { StorageService } from '../utils/storage.service';
|
|
4
3
|
import { AuthService } from './auth.service';
|
|
5
4
|
export declare class PasskeyService {
|
|
@@ -8,7 +7,7 @@ export declare class PasskeyService {
|
|
|
8
7
|
private userId;
|
|
9
8
|
private request;
|
|
10
9
|
private authenticator;
|
|
11
|
-
constructor(userId: string, storageService: StorageService, request: <T = any>(route: RequestRoute, options?: RequestOptions) => Promise<T
|
|
10
|
+
constructor(userId: string, storageService: StorageService, request: <T = any>(route: RequestRoute, options?: RequestOptions) => Promise<T>);
|
|
12
11
|
private preparePasskeyRequestOptions;
|
|
13
12
|
private preparePasskeyCreationOptions;
|
|
14
13
|
/**
|
package/dist/lib/swap/index.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { Base } from '../../base';
|
|
2
|
-
import { Ports } from '../utils/ports';
|
|
3
2
|
import { WallabyConfig, SwapQuoteRequest, SwapQuoteResponse, ExecuteSwapRequest, ExecuteSwapResponse, GetSwapsRequest, GetSwapsResponse } from '../../types';
|
|
4
3
|
export declare class Swap extends Base {
|
|
5
4
|
private authService;
|
|
6
5
|
private walletService;
|
|
7
|
-
constructor(config: WallabyConfig
|
|
6
|
+
constructor(config: WallabyConfig);
|
|
8
7
|
/**
|
|
9
8
|
* Gets a swap quote between two assets, including fees, min output, and slippage limits.
|
|
10
9
|
*
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Base } from '../../base';
|
|
2
|
-
import { Ports } from '../utils/ports';
|
|
3
2
|
import { WallabyConfig, Blockchain, AssetConfig, User, BlockchainName } from '../../types';
|
|
4
3
|
export declare class System extends Base {
|
|
5
|
-
constructor(config: WallabyConfig
|
|
4
|
+
constructor(config: WallabyConfig);
|
|
6
5
|
/**
|
|
7
6
|
* @public
|
|
8
7
|
* Get all supported chains
|
|
@@ -40,6 +39,9 @@ export declare class System extends Base {
|
|
|
40
39
|
* @param {BlockchainName} blockchain - The name of the blockchain.
|
|
41
40
|
* @param {string} contractAddress - The contract address of the token (optional for non-SUI blockchains).
|
|
42
41
|
* @param {string} suiObjectId - The SUI object ID of the token (optional for SUI blockchain).
|
|
42
|
+
* @param {string} assetSymbol - The asset symbol; disambiguates new SUI assets. For SUI it is
|
|
43
|
+
* optional: when omitted, it is derived from the `::module::TYPE` suffix of `suiObjectId`
|
|
44
|
+
* (which is otherwise trimmed off before the request is sent).
|
|
43
45
|
*
|
|
44
46
|
* @returns {Promise<{ decimals: number; symbol: string; name: string; tokenContractAddress: string }>} A promise that resolves to an object containing token information.
|
|
45
47
|
*
|
|
@@ -48,10 +50,11 @@ export declare class System extends Base {
|
|
|
48
50
|
* @throws Will throw an error if `contractAddress` is not provided for non-SUI blockchains.
|
|
49
51
|
* @throws Will throw an error if the response is invalid or contains an error.
|
|
50
52
|
*/
|
|
51
|
-
fetchTokenInfo({ blockchain, contractAddress, suiObjectId, }: {
|
|
53
|
+
fetchTokenInfo({ blockchain, contractAddress, suiObjectId, assetSymbol, }: {
|
|
52
54
|
blockchain: BlockchainName;
|
|
53
55
|
contractAddress?: string;
|
|
54
56
|
suiObjectId?: string;
|
|
57
|
+
assetSymbol?: string;
|
|
55
58
|
}): Promise<{
|
|
56
59
|
decimals: number;
|
|
57
60
|
symbol: string;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { Base } from '../../base';
|
|
2
|
-
import { Ports } from '../utils/ports';
|
|
3
2
|
import { WallabyConfig, FeeEstimatesResponse, BlockchainName, GetPendingTransactionsRequest, GetPendingTransactionsResponse, ResolvePendingTransactionRequest, ResolvePendingTransactionResponse, TransactionResponse, FeeEstimateRequest } from '../../types';
|
|
4
3
|
import { DetectRestrictionResponseDto, GetRestrictionParams, GetTransactionsParams, GetTransactionsResponseDto } from '../../generated/api';
|
|
5
4
|
import { CreateAllowanceRequest, TransactionStatusResponse, TransferRequest } from '../../types';
|
|
6
5
|
export declare class Transactions extends Base {
|
|
7
6
|
private authService;
|
|
8
7
|
private walletService;
|
|
9
|
-
constructor(config: WallabyConfig
|
|
8
|
+
constructor(config: WallabyConfig);
|
|
10
9
|
/**
|
|
11
10
|
*
|
|
12
11
|
* @public
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { Encrypted } from '../../types';
|
|
2
|
+
export declare const MASTER_KEY_WRAP_PREFIX = "wsdkmk:v1:";
|
|
3
|
+
export declare const LEGACY_CRYPTOJS_PREFIX = "U2FsdGVkX1";
|
|
4
|
+
export declare const ENCRYPTED_PAYLOAD_FIELDS: readonly ["iv", "ephemPublicKey", "ciphertext", "mac"];
|
|
5
|
+
export declare const SYMMETRIC_PAYLOAD_FIELDS: readonly ["iv", "ciphertext", "tag"];
|
|
6
|
+
export declare function hasNonEmptyStringFields(payload: unknown, fields: readonly string[]): payload is Record<string, unknown>;
|
|
7
|
+
/**
|
|
8
|
+
* True when the payload matches the ECIES envelope { iv, ephemPublicKey, ciphertext, mac }.
|
|
9
|
+
*/
|
|
10
|
+
export declare function isEciesPayload(payload: unknown): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* True when the payload matches the symmetric envelope { v, iv, ciphertext, tag } with numeric v.
|
|
13
|
+
*/
|
|
14
|
+
export declare function isSymmetricPayload(payload: unknown): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Validate that a private key is the correct length and not weak.
|
|
17
|
+
*/
|
|
18
|
+
export declare function validatePrivateKey(privateKey: string): void;
|
|
19
|
+
/**
|
|
20
|
+
* Validate that a public key is the correct length and format.
|
|
21
|
+
*/
|
|
22
|
+
export declare function validatePublicKey(publicKey: string): void;
|
|
23
|
+
/**
|
|
24
|
+
* Validate that a salt is sufficiently long and not weak.
|
|
25
|
+
*/
|
|
26
|
+
export declare function validateSalt(salt: string): void;
|
|
27
|
+
/**
|
|
28
|
+
* Accept an Encrypted payload either as the object or its JSON.stringify'd storage form.
|
|
29
|
+
*/
|
|
30
|
+
export declare function parseEncrypted(value: string | Encrypted): Encrypted;
|
|
31
|
+
/**
|
|
32
|
+
* Derives a key pair from a password and salt: NFKC-normalize + trim, then
|
|
33
|
+
* PBKDF2-SHA256 (PBKDF2_ITERATIONS) into a createIdentity keypair.
|
|
34
|
+
*/
|
|
35
|
+
export declare function deriveKeyPairFromPassword({ password, salt }: {
|
|
36
|
+
password: string;
|
|
37
|
+
salt: string;
|
|
38
|
+
}): {
|
|
39
|
+
privateKey: string;
|
|
40
|
+
publicKey: string;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Derives a key pair from passkey PRF input key material.
|
|
44
|
+
*/
|
|
45
|
+
export declare function deriveKeyPairFromPasskey({ inputKeyMaterial }: {
|
|
46
|
+
inputKeyMaterial: Uint8Array;
|
|
47
|
+
}): {
|
|
48
|
+
privateKey: string;
|
|
49
|
+
publicKey: string;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* crypto-js AES with a string passphrase (OpenSSL salted format). This is the legacy
|
|
53
|
+
* V1 storage cipher and the primitive under the master-key wrap; kept only for
|
|
54
|
+
* backward compatibility with data already encrypted in the field.
|
|
55
|
+
*/
|
|
56
|
+
export declare function legacyAesEncrypt(data: string, passphrase: string): string;
|
|
57
|
+
export declare function legacyAesDecrypt(cipherText: string, passphrase: string): string;
|
|
58
|
+
/**
|
|
59
|
+
* Wraps a value with the master key, prefixed with the format version marker.
|
|
60
|
+
*/
|
|
61
|
+
export declare function wrapWithMasterKey(data: string | object, masterKey: string): string;
|
|
62
|
+
/**
|
|
63
|
+
* Determines deterministically whether a stored value was wrapped by the master key,
|
|
64
|
+
* without inferring from decrypt behavior. Returns true for values carrying the version
|
|
65
|
+
* marker, or legacy crypto-js ciphertext stored before the marker existed.
|
|
66
|
+
*/
|
|
67
|
+
export declare function isMasterKeyWrapped(value: string): boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Unwraps a master-key-wrapped value (current prefixed format or legacy unprefixed blob).
|
|
70
|
+
* Returns the parsed object for JSON payloads, the raw string otherwise, and undefined
|
|
71
|
+
* when the ciphertext decrypts to nothing. Throws on malformed ciphertext (crypto-js
|
|
72
|
+
* "Malformed UTF-8 data") — callers translate/log.
|
|
73
|
+
*/
|
|
74
|
+
export declare function unwrapWithMasterKey<T>(cipherText: string, masterKey: string): T | string | undefined;
|
|
@@ -5,12 +5,17 @@ type KeyDerivationOptions = {
|
|
|
5
5
|
salt?: string;
|
|
6
6
|
prfValue?: Uint8Array;
|
|
7
7
|
};
|
|
8
|
+
/**
|
|
9
|
+
* Impure shell over the pure crypto core (./cipher-core). This class only adds
|
|
10
|
+
* logging, user-facing error translation, and the master-key constant; all crypto
|
|
11
|
+
* and format logic lives in cipher-core and is pinned by the KATs in src/tests/kat/.
|
|
12
|
+
*/
|
|
8
13
|
export declare class Cipher {
|
|
9
14
|
constructor();
|
|
10
15
|
/**
|
|
11
16
|
* Validate that a private key is the correct length and not weak.
|
|
12
17
|
*/
|
|
13
|
-
|
|
18
|
+
validatePrivateKey(privateKey: string): void;
|
|
14
19
|
/**
|
|
15
20
|
* @description For an additional layer of security, this function returns a master key from a constant MASTER_ENCRYPTION_KEY.
|
|
16
21
|
* The key material returned is used to encrypt important, but not too sensitive data such as access tokens and passkey credentials.
|
|
@@ -35,7 +40,7 @@ export declare class Cipher {
|
|
|
35
40
|
isWrappedByMasterKey(value: string): boolean;
|
|
36
41
|
decryptWithMasterKey<T>({ cipherText }: {
|
|
37
42
|
cipherText: string;
|
|
38
|
-
}): string | T | undefined;
|
|
43
|
+
}): string | (T & ({} | null)) | undefined;
|
|
39
44
|
/**
|
|
40
45
|
* Validate that a public key is the correct length and format.
|
|
41
46
|
*/
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extracts the asset symbol from a fully-qualified Sui coin type.
|
|
3
|
+
*
|
|
4
|
+
* A Sui coin type has the shape `<package>::<module>::<TYPE>`, where the final
|
|
5
|
+
* segment is the coin's struct name and doubles as its symbol.
|
|
6
|
+
*
|
|
7
|
+
* @param objectId - The Sui object id / coin type. Example input:
|
|
8
|
+
* "0xc91acfb75009c5ff2fd57c54f3caaee12ad1fbe997681334adc0b574fc277a07::icorgi::ICORGI"
|
|
9
|
+
* @returns The symbol (e.g. "ICORGI"), or undefined when the id carries no
|
|
10
|
+
* `::module::TYPE` suffix to derive it from.
|
|
11
|
+
*/
|
|
12
|
+
export declare const extractSuiAssetSymbol: (objectId?: string) => string | undefined;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { UtilsResponse, PasswordValidatorResponse, WallabyConfig, RequestMethod } from '../../types';
|
|
2
2
|
import { Base } from '../../base';
|
|
3
|
-
import { Ports } from './ports';
|
|
4
3
|
export declare class Utils extends Base {
|
|
5
4
|
private auth;
|
|
6
|
-
constructor(config: WallabyConfig
|
|
5
|
+
constructor(config: WallabyConfig);
|
|
7
6
|
/**
|
|
8
7
|
*
|
|
9
8
|
* @param { string } password
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @param jwt - The JWT string to check. If null, the function will return true.
|
|
5
5
|
* @returns `true` if the JWT has expired or is null, otherwise `false`.
|
|
6
6
|
*/
|
|
7
|
-
export declare function jwtHasExpired(jwt: string | null
|
|
7
|
+
export declare function jwtHasExpired(jwt: string | null): boolean;
|
|
8
8
|
export declare function jwtHasSameUser(jwt: string | null, userId: string): boolean;
|
|
9
9
|
export declare function userIsMfaVerified(jwt: string): boolean;
|
|
10
10
|
/**
|
|
@@ -14,11 +14,11 @@ export declare function userIsMfaVerified(jwt: string): boolean;
|
|
|
14
14
|
* @param thresholdSeconds - Number of seconds before expiry to consider "near expiry".
|
|
15
15
|
* @returns `true` if the JWT expires within `thresholdSeconds` seconds, otherwise `false`.
|
|
16
16
|
*/
|
|
17
|
-
export declare function isJwtNearExpiry(jwt: string | null, thresholdSeconds: number
|
|
17
|
+
export declare function isJwtNearExpiry(jwt: string | null, thresholdSeconds: number): boolean;
|
|
18
18
|
/**
|
|
19
19
|
* Calculates the remaining time in milliseconds until a given JWT expires.
|
|
20
20
|
*
|
|
21
21
|
* @param jwt - The JWT string to decode and check.
|
|
22
22
|
* @returns The number of milliseconds until the JWT expires. If the JWT has already expired, the returned value will be less than or equal to 0.
|
|
23
23
|
*/
|
|
24
|
-
export declare function millisecondsToJWTTimeout(jwt: string
|
|
24
|
+
export declare function millisecondsToJWTTimeout(jwt: string): number;
|
|
@@ -6,6 +6,7 @@ export declare class StorageService {
|
|
|
6
6
|
private userId;
|
|
7
7
|
private cipher;
|
|
8
8
|
private deviceLocalStorage;
|
|
9
|
+
private _walRecovery?;
|
|
9
10
|
constructor({ deviceStorage, userId, environment }: {
|
|
10
11
|
deviceStorage: LocalStorage;
|
|
11
12
|
userId: string;
|
|
@@ -26,6 +27,18 @@ export declare class StorageService {
|
|
|
26
27
|
value: any;
|
|
27
28
|
walletId?: string;
|
|
28
29
|
}[]): Promise<void>;
|
|
30
|
+
private _computeRawKey;
|
|
31
|
+
private _serializeValue;
|
|
32
|
+
private _applyWAL;
|
|
33
|
+
commitBatch(writes: {
|
|
34
|
+
key: LocalStorageItems | V2KeyNames;
|
|
35
|
+
value: any;
|
|
36
|
+
walletId?: string;
|
|
37
|
+
}[], deletes?: {
|
|
38
|
+
key: LocalStorageItems | V2KeyNames;
|
|
39
|
+
walletId?: string;
|
|
40
|
+
}[]): Promise<void>;
|
|
41
|
+
recoverCommit(): Promise<void>;
|
|
29
42
|
delete(key: LocalStorageItems | V2KeyNames | V1KeyNames | LegacyKeyNames, options?: {
|
|
30
43
|
walletId?: string;
|
|
31
44
|
}): Promise<void>;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { Base } from '../../base';
|
|
2
|
-
import { Ports } from '../utils/ports';
|
|
3
2
|
import { AddTokenToWalletRequest, BlockchainName, QueryUserRequest, QueryWalletRequest, TokenBalanceRequest, UpdateAssetRequest, WallabyConfig, WalletAddressesInfoEntry, AuthenticationResponse, AddTokenToWalletResponse, TokenBalanceResponse, TokenBalance, UpdateAssetResponse } from '../../types';
|
|
4
3
|
import { FetchBalanceData, GetAllWalletsFromUserIdData, GetAssetsByUserIdData, GetUserAssetsByWalletIdData } from '../../generated/api';
|
|
5
4
|
export declare class WalletDataService extends Base {
|
|
6
5
|
private walletService;
|
|
7
|
-
constructor(config: WallabyConfig
|
|
6
|
+
constructor(config: WallabyConfig);
|
|
8
7
|
/**
|
|
9
8
|
* @description Validates the wallet address info for a given blockchain.
|
|
10
9
|
* @param { WalletAddressesInfoEntry } walletAddressesInfo The wallet address info array containing addresses for different blockchains.
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { Base } from '../../base';
|
|
2
|
-
import { Ports } from '../utils/ports';
|
|
3
2
|
import { ImportWalletRequest, CreateWalletRequest, Encrypted, WallabyConfig, ImportWalletResponse, RecoverWalletResponse, SymmetricEncrypted } from '../../types';
|
|
4
3
|
import { KeyShareDto } from '../../generated/api';
|
|
5
4
|
export declare class WalletHandlersService extends Base {
|
|
6
5
|
private authService;
|
|
7
|
-
constructor(config: WallabyConfig
|
|
6
|
+
constructor(config: WallabyConfig);
|
|
8
7
|
handleImportWallet(deviceAuthKeys: {
|
|
9
8
|
publicKey: string;
|
|
10
9
|
privateKey: string;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Base } from '../../base';
|
|
2
|
-
import { Ports } from '../utils/ports';
|
|
3
2
|
import { CreateWalletRequest, CreateWalletResponse, Encrypted, WallabyConfig, ExportWalletRequest, ImportWalletRequest, AddNewDeviceRequest, RecoverWalletRequest, InitAddNewDeviceResponse, GenerateMissingAddressResponseDto, AuthenticationResponse, BlockchainName, ImportWalletResponse, RecoverWalletResponse } from '../../types';
|
|
4
3
|
export declare class WalletService extends Base {
|
|
5
4
|
private authService;
|
|
@@ -7,7 +6,7 @@ export declare class WalletService extends Base {
|
|
|
7
6
|
private passkeyService;
|
|
8
7
|
private static readonly RATE_LIMIT_MAX;
|
|
9
8
|
private static readonly RATE_LIMIT_WINDOW_MS;
|
|
10
|
-
constructor(config: WallabyConfig
|
|
9
|
+
constructor(config: WallabyConfig);
|
|
11
10
|
/**
|
|
12
11
|
* Reads the persisted sliding-window rate-limit state for a counter key.
|
|
13
12
|
* Returns a fresh window ({ count: 0 }) when none is stored or the window has expired.
|
|
@@ -173,6 +172,12 @@ export declare class WalletService extends Base {
|
|
|
173
172
|
password: string;
|
|
174
173
|
walletId: string;
|
|
175
174
|
}): Promise<void>;
|
|
175
|
+
/**
|
|
176
|
+
* Assert a decrypted private key is valid secp256k1 key material. If it isn't, the stored value is
|
|
177
|
+
* corrupted (or a wrong password decrypted to non-key garbage) — surface a clear, distinct error
|
|
178
|
+
* instead of letting the raw validation message escape or collapsing into a misleading "wrong password".
|
|
179
|
+
*/
|
|
180
|
+
private assertValidDeviceKey;
|
|
176
181
|
/**
|
|
177
182
|
* Detects and migrates legacy/v1 storage items to v2 format.
|
|
178
183
|
* This function should be called in methods that use password as input when v2 items are missing.
|
|
@@ -228,4 +233,5 @@ export declare class WalletService extends Base {
|
|
|
228
233
|
authentication: AuthenticationResponse;
|
|
229
234
|
seedPhrase: string;
|
|
230
235
|
}>;
|
|
236
|
+
private assertRoundTrip;
|
|
231
237
|
}
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wallaby-cash",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.2",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/WALLABY-WaaS/wallaby-sdk-js"
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
}
|
|
128
128
|
},
|
|
129
129
|
"overrides": {
|
|
130
|
-
"sigstore"
|
|
130
|
+
"sigstore": "^4.1.1",
|
|
131
131
|
"@babel/core": "^7.29.6",
|
|
132
132
|
"lodash": "^4.18.0",
|
|
133
133
|
"@tootallnate/once": "^3.0.1",
|
|
@@ -176,4 +176,4 @@
|
|
|
176
176
|
"functions": 92,
|
|
177
177
|
"branches": 82
|
|
178
178
|
}
|
|
179
|
-
}
|
|
179
|
+
}
|
package/dist/types/storage.d.ts
CHANGED
|
@@ -60,5 +60,7 @@ export declare enum V2KeyNames {
|
|
|
60
60
|
MigrationVersion = "wsdk_migrated_with_version",
|
|
61
61
|
LastMigratedAt = "wsdk_last_migrated_at",
|
|
62
62
|
PasswordResetAttempts = "wsdk_password_reset_attempts",
|
|
63
|
-
MigrationAttempts = "wsdk_migration_attempts"
|
|
63
|
+
MigrationAttempts = "wsdk_migration_attempts",
|
|
64
|
+
CredentialConversionInProgress = "credential-conversion-in-progress",
|
|
65
|
+
PendingCommit = "pending-commit"
|
|
64
66
|
}
|
package/dist/types/wallet.d.ts
CHANGED
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
import { KeyShareDto, UpdateUserAssetRequestDto, WalletAddress } from '../generated/api';
|
|
1
|
+
import { KeyShareDto, SymmetricEncryptedDto, UpdateUserAssetRequestDto, WalletAddress } from '../generated/api';
|
|
2
2
|
import { AuthenticationResponse, AuthResponse } from './auth';
|
|
3
3
|
import { UserAsset, TokenStandard, User, BlockchainName, Encrypted, BasicQueryOptions, AssetConfig } from './common';
|
|
4
4
|
import { Merchant } from './merchants';
|
|
5
5
|
export declare type UpdateAssetRequest = {
|
|
6
6
|
assetConfigId: string;
|
|
7
7
|
} & UpdateUserAssetRequestDto;
|
|
8
|
-
export type SymmetricEncrypted =
|
|
9
|
-
iv: string;
|
|
10
|
-
ciphertext: string;
|
|
11
|
-
mac: string;
|
|
12
|
-
tag: string;
|
|
13
|
-
};
|
|
8
|
+
export type SymmetricEncrypted = SymmetricEncryptedDto;
|
|
14
9
|
export type Share = {
|
|
15
10
|
encrypted: Encrypted;
|
|
16
11
|
wrappingPublicKey: string;
|
package/package.json
CHANGED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { Cipher } from './cipher.service';
|
|
2
|
-
/**
|
|
3
|
-
* Internal boundary ports injected into {@link Base} and the service tree.
|
|
4
|
-
*
|
|
5
|
-
* These are *not* part of the public SDK config. They exist so tests can supply
|
|
6
|
-
* in-memory fakes (a route-backed transport, a fixed clock, a stub cipher)
|
|
7
|
-
* instead of intercepting the network or relying on real crypto/time.
|
|
8
|
-
*
|
|
9
|
-
* Storage is intentionally absent: it already rides on `config.options.storage`,
|
|
10
|
-
* which propagates through every `new XService(config)` for free.
|
|
11
|
-
*
|
|
12
|
-
* Every port is optional; {@link Base} fills in the real adapter (global `fetch`,
|
|
13
|
-
* `Date.now`, `new Cipher()`) when a port is not provided.
|
|
14
|
-
*/
|
|
15
|
-
export interface Clock {
|
|
16
|
-
now(): number;
|
|
17
|
-
}
|
|
18
|
-
export interface Ports {
|
|
19
|
-
transport: typeof fetch;
|
|
20
|
-
clock: Clock;
|
|
21
|
-
cipher: Cipher;
|
|
22
|
-
}
|