wallaby-cash 2.1.1-alpha.1 → 2.2.1-alpha.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/README.md +16 -0
- package/dist/base.d.ts +16 -9
- package/dist/eth-crypto-utils/createIdentity.d.ts +1 -0
- package/dist/generated/api.d.ts +9167 -0
- package/dist/helpers/json-safe-parse.d.ts +2 -1
- package/dist/helpers/lock-manager.service.d.ts +20 -0
- package/dist/helpers/logger.d.ts +2 -1
- package/dist/helpers/validation.d.ts +4 -0
- package/dist/helpers/with-lock.d.ts +5 -0
- package/dist/index.cjs.js +6359 -5890
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +11 -2
- package/dist/index.esm.js +6328 -5890
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +6328 -5890
- package/dist/index.js.map +1 -1
- package/dist/lib/api/api.d.ts +18 -0
- package/dist/lib/api/index.d.ts +1 -0
- package/dist/lib/auth/auth.model.d.ts +5 -1
- package/dist/lib/auth/auth.service.d.ts +14 -24
- package/dist/lib/auth/authenticator.d.ts +3 -1
- package/dist/lib/auth/passkey.service.d.ts +14 -11
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/merchants/index.d.ts +2 -2
- package/dist/lib/transactions/index.d.ts +6 -7
- package/dist/lib/utils/cipher.service.d.ts +34 -3
- package/dist/lib/utils/constants.d.ts +12 -1
- package/dist/lib/utils/index.d.ts +10 -1
- package/dist/lib/utils/storage.service.d.ts +9 -2
- package/dist/lib/wallet/wallet-data.service.d.ts +20 -19
- package/dist/lib/wallet/wallet-handlers.service.d.ts +8 -16
- package/dist/lib/wallet/wallet.service.d.ts +40 -19
- package/dist/package.json +31 -9
- package/dist/types/auth.d.ts +13 -6
- package/dist/types/base.d.ts +2 -2
- package/dist/types/common.d.ts +50 -12
- package/dist/types/error-response-codes.d.ts +17 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/merchants.d.ts +1 -0
- package/dist/types/passkey-error-codes.d.ts +3 -0
- package/dist/types/storage.d.ts +1 -4
- package/dist/types/transactions.d.ts +20 -9
- package/dist/types/wallet.d.ts +67 -18
- package/package.json +31 -9
- package/dist/helpers/base64.d.ts +0 -3
package/README.md
CHANGED
|
@@ -10,13 +10,19 @@ The SDK leverages Wallaby API as a gateway to web3 and the blockchain.
|
|
|
10
10
|
The SDK currently supports the following blockchains:
|
|
11
11
|
|
|
12
12
|
- Algorand
|
|
13
|
+
- Aptos
|
|
13
14
|
- Avalanche
|
|
14
15
|
- Base
|
|
15
16
|
- Binance chain
|
|
16
17
|
- Bitcoin
|
|
17
18
|
- Bsc
|
|
19
|
+
- Canton
|
|
18
20
|
- Ethereum
|
|
21
|
+
- Hedera
|
|
22
|
+
- Injective
|
|
19
23
|
- Polygon
|
|
24
|
+
- Polymesh
|
|
25
|
+
- Sei
|
|
20
26
|
- Sui
|
|
21
27
|
|
|
22
28
|
## Install the SDK
|
|
@@ -60,3 +66,13 @@ wallaby.wallets.getTokenBalance()
|
|
|
60
66
|
wallaby.transactions.transfer()
|
|
61
67
|
wallaby.system.getSupportedBlockchains()
|
|
62
68
|
```
|
|
69
|
+
|
|
70
|
+
## Generated API
|
|
71
|
+
|
|
72
|
+
The `wallaby-sdk-js` includes automatically generated TypeScript types from the API Swagger specification:
|
|
73
|
+
|
|
74
|
+
- **Types are generated automatically** during build process from `https://staging-testnet.wallaby.cash/swagger-json`
|
|
75
|
+
- **Generated files location**: `src/generated/`
|
|
76
|
+
- **Error codes included**: All API error codes are available as TypeScript enums
|
|
77
|
+
- **Local development**: Use `npm run generate:types:local` to generate from local `swagger.json`
|
|
78
|
+
- **Custom API endpoint**: Set `WALLABY_SWAGGER_URL` environment variable
|
package/dist/base.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { WallabyConfig, RequestOptions, RequestRoute, WallabyConfigOptions
|
|
1
|
+
import { AuthType, WallabyConfig, RequestOptions, RequestRoute, WallabyConfigOptions } from './types';
|
|
2
2
|
import { StorageService } from './lib/utils/storage.service';
|
|
3
3
|
import { LocalStorage } from './types/storage';
|
|
4
|
+
import { LockManagerService } from './helpers/lock-manager.service';
|
|
5
|
+
import { Cipher } from './lib/utils/cipher.service';
|
|
6
|
+
import { Api as GeneratedApiClient } from './generated/api';
|
|
4
7
|
export declare abstract class Base {
|
|
5
8
|
userId: string;
|
|
6
9
|
private apiKey;
|
|
@@ -8,6 +11,9 @@ export declare abstract class Base {
|
|
|
8
11
|
private clientAuthToken;
|
|
9
12
|
protected deviceAuthType: AuthType;
|
|
10
13
|
protected options?: WallabyConfigOptions;
|
|
14
|
+
protected lockManager: LockManagerService;
|
|
15
|
+
protected cipher: Cipher;
|
|
16
|
+
protected api: GeneratedApiClient<any>;
|
|
11
17
|
constructor(config: WallabyConfig);
|
|
12
18
|
set setClientAuthToken(token: string);
|
|
13
19
|
private _initializeClientAuthToken;
|
|
@@ -18,7 +24,7 @@ export declare abstract class Base {
|
|
|
18
24
|
* {
|
|
19
25
|
* }
|
|
20
26
|
*/
|
|
21
|
-
get
|
|
27
|
+
get deviceLocalStorage(): LocalStorage;
|
|
22
28
|
/**
|
|
23
29
|
* @private
|
|
24
30
|
*/
|
|
@@ -26,14 +32,15 @@ export declare abstract class Base {
|
|
|
26
32
|
/**
|
|
27
33
|
* @protected
|
|
28
34
|
*/
|
|
29
|
-
get
|
|
35
|
+
get localStorageService(): StorageService;
|
|
30
36
|
/**
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
* @param
|
|
34
|
-
* @
|
|
35
|
-
* @
|
|
37
|
+
* Main request method for making API calls to the Wallaby API.
|
|
38
|
+
* @param route - Route configuration object containing the endpoint path and HTTP method
|
|
39
|
+
* @param options - Optional request options including payload and query parameters
|
|
40
|
+
* @returns Promise resolving to the typed response data
|
|
41
|
+
* @throws Error if the API returns an error response or network failure occurs
|
|
36
42
|
*/
|
|
37
|
-
protected request<T>(route: RequestRoute, options?: RequestOptions): Promise<T
|
|
43
|
+
protected request<T>(route: RequestRoute, options?: RequestOptions): Promise<T>;
|
|
38
44
|
private _getRequestHeaders;
|
|
45
|
+
protected securityWorker(securityData: any): Promise<any>;
|
|
39
46
|
}
|