wallaby-cash 1.5.2 → 1.6.1
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 +1 -1
- package/dist/base.d.ts +20 -10
- package/dist/documentation/auth.doc.d.ts +58 -0
- package/dist/documentation/merchants.doc.d.ts +59 -0
- package/dist/documentation/system.doc.d.ts +32 -0
- package/dist/documentation/transactions.doc.d.ts +80 -0
- package/dist/documentation/wallet.doc.d.ts +157 -0
- package/dist/helpers/object-to-params.d.ts +7 -0
- package/dist/index.cjs.js +235 -107
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +235 -107
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +235 -107
- package/dist/index.js.map +1 -1
- package/dist/lib/auth/index.d.ts +17 -13
- package/dist/lib/merchants/index.d.ts +6 -6
- package/dist/lib/system/index.d.ts +3 -3
- package/dist/lib/utils/storage.service.d.ts +2 -2
- package/dist/lib/wallet/index.d.ts +40 -17
- package/dist/routes/auth.d.ts +1 -1
- package/dist/routes/wallet.d.ts +11 -1
- package/dist/types/base.d.ts +61 -2
- package/dist/types/common.d.ts +14 -0
- package/dist/types/storage.d.ts +2 -2
- package/dist/types/wallet.d.ts +7 -1
- package/package.json +9 -3
package/README.md
CHANGED
|
@@ -42,7 +42,7 @@ const config = {
|
|
|
42
42
|
const wallaby = new Wallaby(config)
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
|
-
*
|
|
45
|
+
* This will return all domains supported by wallaby (i.e auth, wallets, merchants, ...)
|
|
46
46
|
* Then it can be called like the example below
|
|
47
47
|
*/
|
|
48
48
|
|
package/dist/base.d.ts
CHANGED
|
@@ -10,22 +10,32 @@ export declare abstract class Base {
|
|
|
10
10
|
options?: WallabyConfigOptions;
|
|
11
11
|
constructor(config: WallabyConfig);
|
|
12
12
|
/**
|
|
13
|
-
|
|
13
|
+
* This library uses `localStorage` as the default storage.
|
|
14
14
|
* If you want to use a different storage, you can pass it in the options object of the Wallaby config.
|
|
15
|
-
|
|
15
|
+
* storage: new CustomStorage()
|
|
16
16
|
* {
|
|
17
17
|
* }
|
|
18
|
-
*
|
|
19
18
|
*/
|
|
20
19
|
get deviceStorage(): LocalStorage;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
/**
|
|
21
|
+
* @protected
|
|
22
|
+
*/
|
|
23
|
+
protected get device(): Promise<import("./types").DeviceInformation>;
|
|
24
|
+
/**
|
|
25
|
+
* @private
|
|
26
|
+
*/
|
|
27
|
+
private get settings();
|
|
28
|
+
/**
|
|
29
|
+
* @protected
|
|
30
|
+
*/
|
|
28
31
|
get storageService(): StorageService;
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* This is the main request method that is used to make requests to the Wallaby API.
|
|
35
|
+
* @param { RequestRoute } route full route object to the request endpoint.
|
|
36
|
+
* @param { RequestOptions } options Extends the `RequestInit` interface to include a payload and queryParams.
|
|
37
|
+
* @returns Promise of <T> where T is the type of the response.
|
|
38
|
+
*/
|
|
29
39
|
protected request<T>(route: RequestRoute, options?: RequestOptions): Promise<T | any>;
|
|
30
40
|
private getRequestHeaders;
|
|
31
41
|
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Base } from 'src/base';
|
|
2
|
+
import { SignatureMessageResponse, AuthRequest, AuthResponse, WallabyConfig, ClientAuthPubKeyRequest, RefreshAccessTokenResponse, ClientAuthPubKeyResponse } from 'src/types';
|
|
3
|
+
export declare class Auth extends Base {
|
|
4
|
+
constructor(config: WallabyConfig);
|
|
5
|
+
/**
|
|
6
|
+
* Authenticates a user by either signing them in or signing them up based on the presence of existing credentials.
|
|
7
|
+
*
|
|
8
|
+
* @param { string } password - The user's password.
|
|
9
|
+
* @returns {Promise<AuthResponse>} - A promise that resolves to the authentication response.
|
|
10
|
+
*/
|
|
11
|
+
authenticate({ password }: AuthRequest): Promise<AuthResponse>;
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @public
|
|
15
|
+
* The returned message will be used to authorize the user to sign operations
|
|
16
|
+
* @param {string} password
|
|
17
|
+
* @returns {SignatureMessageResponse} The returned message will be used for sign up and sign in signature
|
|
18
|
+
*/
|
|
19
|
+
signatureMessage({ password }: AuthRequest): Promise<SignatureMessageResponse>;
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
* @public
|
|
23
|
+
* Users will be able to sign in by providing a signature and message. Use the same key pair used on sign up'
|
|
24
|
+
* @param { string } password
|
|
25
|
+
* @param { string } firstName
|
|
26
|
+
* @param { string } lastName
|
|
27
|
+
* @param { string } email
|
|
28
|
+
* @returns { AuthResponse | undefined }
|
|
29
|
+
*/
|
|
30
|
+
signUp({ password, firstName, lastName, email }: AuthRequest): Promise<AuthResponse | undefined>;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @public
|
|
34
|
+
* Users will be able to sign in by providing a signature and message, the device auth public key and their signature.
|
|
35
|
+
* @param { string } password password is used decrypt the device auth private key.
|
|
36
|
+
* @returns { AuthResponse | undefined } Once the user is signed in, the response will contain the user object and the access token.
|
|
37
|
+
*/
|
|
38
|
+
signIn({ password }: AuthRequest): Promise<AuthResponse | undefined>;
|
|
39
|
+
/**
|
|
40
|
+
*
|
|
41
|
+
* @public
|
|
42
|
+
* Refreshes the access token stored in local storage.
|
|
43
|
+
* @returns {string} The new access token
|
|
44
|
+
*/
|
|
45
|
+
refreshAccessToken(): Promise<RefreshAccessTokenResponse | undefined>;
|
|
46
|
+
/**
|
|
47
|
+
* This method is used to refresh the device auth key pair.
|
|
48
|
+
* @param {string} password
|
|
49
|
+
* @returns {User} User object
|
|
50
|
+
*/
|
|
51
|
+
updateClientAuthPubKey({ password, }: Pick<ClientAuthPubKeyRequest, 'password'>): Promise<ClientAuthPubKeyResponse | undefined>;
|
|
52
|
+
/**
|
|
53
|
+
* The user salt is used to double encrypt the seed phrase before being stored
|
|
54
|
+
* in local storage.
|
|
55
|
+
* @returns {string} Returns user's salt that is generated by Wallaby system
|
|
56
|
+
*/
|
|
57
|
+
getUserSalt(): Promise<string>;
|
|
58
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Base } from 'src/base';
|
|
2
|
+
import { WallabyConfig } from 'src/types';
|
|
3
|
+
import { ListMerchantsResponse, Merchant, MerchantAsset, MerchantStatus } from 'src/types/merchants';
|
|
4
|
+
export declare class Merchants extends Base {
|
|
5
|
+
constructor(config: WallabyConfig);
|
|
6
|
+
/**
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
9
|
+
* List of all merchants in the system
|
|
10
|
+
* @returns { ListMerchantsResponse } Array of all merchants
|
|
11
|
+
*/
|
|
12
|
+
list(): Promise<ListMerchantsResponse>;
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @public
|
|
16
|
+
* Allows to create a new merchant
|
|
17
|
+
* @returns { Merchant } Merchant data
|
|
18
|
+
*/
|
|
19
|
+
create({ name }: {
|
|
20
|
+
name: string;
|
|
21
|
+
}): Promise<Merchant>;
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @public
|
|
25
|
+
* Allows to update merchant data
|
|
26
|
+
* @returns { Merchant } Merchant data
|
|
27
|
+
*/
|
|
28
|
+
update({ merchantId, name, status }: {
|
|
29
|
+
merchantId: string;
|
|
30
|
+
name?: string;
|
|
31
|
+
status?: MerchantStatus;
|
|
32
|
+
}): Promise<Merchant>;
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
* @public
|
|
36
|
+
* @param merchantId Merchant ID
|
|
37
|
+
* @returns { Merchant } Merchant data
|
|
38
|
+
*/
|
|
39
|
+
getMerchantData({ merchantId }: {
|
|
40
|
+
merchantId: string;
|
|
41
|
+
}): Promise<Merchant>;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @public
|
|
45
|
+
* @param merchantId Merchant ID
|
|
46
|
+
* @returns { MerchantAsset[] } List of merchant assets
|
|
47
|
+
*/
|
|
48
|
+
getAssets({ merchantId }: {
|
|
49
|
+
merchantId: string;
|
|
50
|
+
}): Promise<MerchantAsset[]>;
|
|
51
|
+
addAsset({ merchantId, configId }: {
|
|
52
|
+
merchantId: string;
|
|
53
|
+
configId: string;
|
|
54
|
+
}): Promise<any>;
|
|
55
|
+
deleteAsset({ merchantId, configId }: {
|
|
56
|
+
merchantId: string;
|
|
57
|
+
configId: string;
|
|
58
|
+
}): Promise<any>;
|
|
59
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Base } from 'src/base';
|
|
2
|
+
import { WallabyConfig, Blockchain, AssetConfig, User } from 'src/types';
|
|
3
|
+
export declare class System extends Base {
|
|
4
|
+
constructor(config: WallabyConfig);
|
|
5
|
+
/**
|
|
6
|
+
* @public
|
|
7
|
+
* Get all supported chains
|
|
8
|
+
* @param {null}
|
|
9
|
+
* @returns {Array<Blockchain>} Array of supported chains
|
|
10
|
+
*/
|
|
11
|
+
getSupportedBlockchains(): Promise<Array<Blockchain> | undefined>;
|
|
12
|
+
/**
|
|
13
|
+
* @public
|
|
14
|
+
* Get all supported assets configuration
|
|
15
|
+
* @param {null}
|
|
16
|
+
* @returns {Array<AssetConfig>} Array of supported tokens
|
|
17
|
+
*/
|
|
18
|
+
getSupportedTokens(): Promise<AssetConfig[] | undefined>;
|
|
19
|
+
/**
|
|
20
|
+
* @public
|
|
21
|
+
* @param {string} userId
|
|
22
|
+
* @returns {User} Returns user public data
|
|
23
|
+
*/
|
|
24
|
+
getUserData(userId: string): Promise<User | undefined>;
|
|
25
|
+
/**
|
|
26
|
+
* @public
|
|
27
|
+
* This returns essential data by the external user ID provided at sign up.
|
|
28
|
+
* @param {string} externalUserId
|
|
29
|
+
* @returns {User} Returns user public data
|
|
30
|
+
*/
|
|
31
|
+
getUserByExternalUserId(externalUserId: string): Promise<User | undefined>;
|
|
32
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { Base } from 'src/base';
|
|
2
|
+
import { WallabyConfig, BlockchainName, TokenStandard } from 'src/types';
|
|
3
|
+
import { CreateAllowanceRequest, FeeEstimateRequest, FeeEstimatesResponse, Transaction, TransactionStatusResponse, TransferRequest, TransactionResponse } from 'src/types';
|
|
4
|
+
export declare class Transactions extends Base {
|
|
5
|
+
private auth;
|
|
6
|
+
private utils;
|
|
7
|
+
constructor(config: WallabyConfig);
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* @public
|
|
11
|
+
* @param {string} originAddress
|
|
12
|
+
* @param {string} recipientAddress
|
|
13
|
+
* @param {number} amount
|
|
14
|
+
* @param {string} assetSymbol
|
|
15
|
+
* @param {TransactionType} transactionType
|
|
16
|
+
* @param {TokenStandard} tokenStandard
|
|
17
|
+
* @param {BlockchainName} blockchain
|
|
18
|
+
* @returns {FeeEstimateRequest}
|
|
19
|
+
*/
|
|
20
|
+
estimateFee({ originAddress, recipientAddress, amount, assetSymbol, transactionType, tokenStandard, blockchain, }: FeeEstimateRequest): Promise<FeeEstimatesResponse | undefined>;
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @public
|
|
24
|
+
* @param {string} originAddress
|
|
25
|
+
* @param {string} recipientAddress
|
|
26
|
+
* @param {number} amount
|
|
27
|
+
* @param {string} assetId
|
|
28
|
+
* @param {string} reference
|
|
29
|
+
* @param {string} memo
|
|
30
|
+
* @param {string} password
|
|
31
|
+
* @returns {TransactionResponse} Transaction object which contains the transaction hash and status
|
|
32
|
+
*/
|
|
33
|
+
transfer({ originAddress, recipientAddress, amount, assetId, reference, memo, password, }: TransferRequest): Promise<TransactionResponse | undefined>;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @public
|
|
37
|
+
* @param {string} transactionHash the transaction hash from the blockchain
|
|
38
|
+
* @param {string} reference a uuid unique to the transaction that links it with external systems
|
|
39
|
+
* @param {BlockchainName} blockchain blockchain name
|
|
40
|
+
* @returns {TransactionStatusResponse} Includes the status, the hash and other attributes.
|
|
41
|
+
*/
|
|
42
|
+
getTransactionStatus({ transactionHash, reference, blockchain, }: {
|
|
43
|
+
transactionHash: string;
|
|
44
|
+
reference: string;
|
|
45
|
+
blockchain: BlockchainName;
|
|
46
|
+
password: string;
|
|
47
|
+
}): Promise<TransactionStatusResponse | undefined>;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @public
|
|
51
|
+
* @param {string} address
|
|
52
|
+
* @param {string} symbol
|
|
53
|
+
* @param {TokenStandard} tokenStandard an optional param used when dealing with non native assets
|
|
54
|
+
* @returns {Promise<{ address: string; transactions: Transaction[] }>}
|
|
55
|
+
*/
|
|
56
|
+
getTransactions({ address, symbol, tokenStandard, }: {
|
|
57
|
+
address: string;
|
|
58
|
+
symbol: string;
|
|
59
|
+
tokenStandard?: TokenStandard;
|
|
60
|
+
}): Promise<{
|
|
61
|
+
address: string;
|
|
62
|
+
transactions: Transaction[];
|
|
63
|
+
error?: any;
|
|
64
|
+
} | undefined>;
|
|
65
|
+
/**
|
|
66
|
+
*
|
|
67
|
+
* @public
|
|
68
|
+
* @param {string} password
|
|
69
|
+
* @param {string} ownerAddress
|
|
70
|
+
* @param {string} spenderAddress
|
|
71
|
+
* @param {string} amount
|
|
72
|
+
* @param {string} assetId
|
|
73
|
+
* @param {string} contractAddress
|
|
74
|
+
* @param {string} reference
|
|
75
|
+
* @param {string} memo
|
|
76
|
+
* @returns {CreateAllowanceResponse}
|
|
77
|
+
*
|
|
78
|
+
*/
|
|
79
|
+
createAllowance({ password, ownerAddress, spenderAddress, amount, assetId, contractAddress, reference, memo, }: CreateAllowanceRequest): Promise<TransactionResponse | undefined>;
|
|
80
|
+
}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { Base } from 'src/base';
|
|
2
|
+
import { QueryUserRequest, CreateWalletRequest, CreateWalletResponse, RecoverWalletRequest, RecoverWalletResponse, TokenBalanceRequest, TokenBalanceResponse, WallabyError, QueryWalletRequest, UserAssetsResponse, UserWalletsResponse, WalletAssetsResponse, WallabyConfig, ConvertMnemonicSeedPhraseRequest, ConvertMnemonicSeedPhraseResponse, CreateMultisigAssetRequest, CreateMultisigAssetResponse, ImportWalletRequest, ImportWalletResponse } from 'src/types';
|
|
3
|
+
export declare class Wallet extends Base {
|
|
4
|
+
private auth;
|
|
5
|
+
constructor(config: WallabyConfig);
|
|
6
|
+
/**
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
9
|
+
* Retrieve the user's mnemonic seed phrases
|
|
10
|
+
* @param password User's wallet password
|
|
11
|
+
* @returns { Promise<{standardSeedPhrase: string, algorandSeedPhrase: string}> }
|
|
12
|
+
* @deprecated This function has been renamed to `export` and will be removed in the next major release.
|
|
13
|
+
* It returns the user's standard (24 words) and algorand (25 words) seed phrases
|
|
14
|
+
*/
|
|
15
|
+
mnemonicSeedPhrase({ password, }: {
|
|
16
|
+
password: string;
|
|
17
|
+
}): Promise<{
|
|
18
|
+
standardSeedPhrase: string;
|
|
19
|
+
algorandSeedPhrase: string;
|
|
20
|
+
}>;
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @public
|
|
24
|
+
* Create a newly fresh wallet, returns asset list and encrypted seedPhrase
|
|
25
|
+
* @param { string } address Wallet address
|
|
26
|
+
* @param { string } symbol Token symbol
|
|
27
|
+
* @param { BlockchainName } chainName the chain name enum. i.e. 'ETHEREUM', 'BITCOIN'
|
|
28
|
+
* @returns { CreateWalletResponse } The wallet has been created successfully
|
|
29
|
+
*/
|
|
30
|
+
getTokenBalance({ address, symbol, tokenStandard, chainName, }: TokenBalanceRequest): Promise<TokenBalanceResponse | undefined>;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @public
|
|
34
|
+
* Fetches the balances for a group of tokens in bulk.
|
|
35
|
+
* Takes an array of addresses and tokens and return their balances.
|
|
36
|
+
* @param { string } address Wallet address
|
|
37
|
+
* @param { string } symbol Token symbol
|
|
38
|
+
* @param { BlockchainName } chainName the chain name enum. i.e. 'ETHEREUM', 'BITCOIN'
|
|
39
|
+
* @returns { TokenBalanceResponse[] } Returns an array of the requested tokens balances.
|
|
40
|
+
*/
|
|
41
|
+
getMultiTokenBalances(tokensAndAddressesList: TokenBalanceRequest[]): Promise<TokenBalanceResponse | undefined>;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @public
|
|
45
|
+
* Fetches the balances for all tokens in a specific wallet.
|
|
46
|
+
* @param { string } walletId Wallet address
|
|
47
|
+
* @returns { TokenBalanceResponse[] } Returns an array of the requested tokens balances.
|
|
48
|
+
*/
|
|
49
|
+
getWalletBalances({ walletId }: {
|
|
50
|
+
walletId: string;
|
|
51
|
+
}): Promise<TokenBalanceResponse[]>;
|
|
52
|
+
/**
|
|
53
|
+
*`
|
|
54
|
+
* @public
|
|
55
|
+
* Create a newly fresh wallet, returns asset list and encrypted seedPhrase
|
|
56
|
+
* @param {string} password The user's chosen password
|
|
57
|
+
* @param {string} firstName The user's first name
|
|
58
|
+
* @param {string} lastName The user's last name
|
|
59
|
+
* @param {email} email The user's email
|
|
60
|
+
* @returns {CreateWalletResponse} The wallet has been created successfully
|
|
61
|
+
*/
|
|
62
|
+
create({ password, firstName, lastName, email, }: Pick<CreateWalletRequest, 'firstName' | 'lastName' | 'email' | 'password'>): Promise<CreateWalletResponse | WallabyError>;
|
|
63
|
+
/**
|
|
64
|
+
*
|
|
65
|
+
* @public
|
|
66
|
+
* Creates a fresh wallet and always signs user up with using a new external user ID
|
|
67
|
+
* @param {string} password The user's chosen password
|
|
68
|
+
* @returns {CreateWalletResponse} Assets list and encrypted seedPhrase.
|
|
69
|
+
*/
|
|
70
|
+
createWithNewAccount({ password }: Pick<CreateWalletRequest, 'password'>): Promise<CreateWalletResponse | WallabyError>;
|
|
71
|
+
/**
|
|
72
|
+
*
|
|
73
|
+
* @public
|
|
74
|
+
* Import an existing wallet, returns asset list and encrypted seedPhrase
|
|
75
|
+
* @param {string} password The user's chosen password
|
|
76
|
+
* @param {string} seedPhrase The user's seed phrase
|
|
77
|
+
* @returns {ImportWalletResponse} The wallet has been imported successfully
|
|
78
|
+
* The return includes the wallet, wallet assets, and the encrypted seedphrase
|
|
79
|
+
*/
|
|
80
|
+
import({ password, seedPhrase }: ImportWalletRequest): Promise<ImportWalletResponse>;
|
|
81
|
+
/**
|
|
82
|
+
*
|
|
83
|
+
* @public
|
|
84
|
+
* Retrieve the user's mnemonic seed phrases
|
|
85
|
+
* @param password User's wallet password
|
|
86
|
+
* @returns { Promise<{standardSeedPhrase: string, algorandSeedPhrase: string}> }
|
|
87
|
+
* It returns the user's standard (24 words) and algorand (25 words) seed phrases
|
|
88
|
+
*/
|
|
89
|
+
export({ password }: {
|
|
90
|
+
password: string;
|
|
91
|
+
}): Promise<{
|
|
92
|
+
standardSeedPhrase: string;
|
|
93
|
+
algorandSeedPhrase: string;
|
|
94
|
+
}>;
|
|
95
|
+
/**
|
|
96
|
+
*
|
|
97
|
+
* @public
|
|
98
|
+
* Removes all Wallaby data from local storage.
|
|
99
|
+
* @returns {Boolean}
|
|
100
|
+
*/
|
|
101
|
+
clearDevice(): Promise<Boolean>;
|
|
102
|
+
/**
|
|
103
|
+
*
|
|
104
|
+
* @public
|
|
105
|
+
* Convert BIP39 Standard seed phrase to Algorand fixed 25 words mnemonic phrase
|
|
106
|
+
* @param {string} password
|
|
107
|
+
* @param {Encrypted} encryptedSeedPhrase It needs to be encypted using wallabyAuthPubKey
|
|
108
|
+
* @returns {ConvertMnemonicSeedPhraseResponse} The mnemonic seed phrase has been converted successfully.
|
|
109
|
+
*/
|
|
110
|
+
convertToAlgorandSeedPhrase({ password, encryptedSeedPhrase, }: Pick<ConvertMnemonicSeedPhraseRequest, 'password' | 'encryptedSeedPhrase'>): Promise<ConvertMnemonicSeedPhraseResponse>;
|
|
111
|
+
/**
|
|
112
|
+
*
|
|
113
|
+
* @public
|
|
114
|
+
* Recover the lost wallet and its assets.
|
|
115
|
+
* @param {string} newPassword User need to set a new password while recovering the wallet
|
|
116
|
+
* @param {string} seedPhrase It needs to be encypted using wallabyAuthPubKey
|
|
117
|
+
* @returns {RecoverWalletResponse} The wallet has been recovered successfully.
|
|
118
|
+
*/
|
|
119
|
+
recover({ newPassword, seedPhrase, }: Omit<RecoverWalletRequest, 'clientAuthPubKey'>): Promise<RecoverWalletResponse | undefined>;
|
|
120
|
+
/**
|
|
121
|
+
*
|
|
122
|
+
* Get all user assets across all wallets by specifying user id
|
|
123
|
+
* @param userId Wallaby's user ID
|
|
124
|
+
* @param queryOptions Optional query options
|
|
125
|
+
* @returns {UserWalletsResponse} Returns an array of user assets by specifying user id
|
|
126
|
+
*/
|
|
127
|
+
getUserAssets({ userId, queryOptions }: QueryUserRequest): Promise<UserAssetsResponse | undefined>;
|
|
128
|
+
/**
|
|
129
|
+
*
|
|
130
|
+
* Get all wallets belonging to a user.
|
|
131
|
+
* @param userId Wallaby's user ID
|
|
132
|
+
* @returns {UserWalletsResponse} Returns an array of user wallets by specifying user ID
|
|
133
|
+
*/
|
|
134
|
+
getUserWallets({ userId, queryOptions }: QueryUserRequest): Promise<UserWalletsResponse | undefined>;
|
|
135
|
+
/**
|
|
136
|
+
*
|
|
137
|
+
* Get all assets that exist in a certain wallet, by specifying a wallet ID
|
|
138
|
+
* @param walletId Wallaby's wallet ID
|
|
139
|
+
* @param { BasicQueryOptions } queryOptions Optional query options
|
|
140
|
+
* @returns { WalletAssetsResponse } Returns all assets belonging in a certain wallet ID
|
|
141
|
+
*/
|
|
142
|
+
getWalletAssets({ walletId, queryOptions }: QueryWalletRequest): Promise<WalletAssetsResponse | undefined>;
|
|
143
|
+
/**
|
|
144
|
+
*
|
|
145
|
+
* @public
|
|
146
|
+
* Initiate creation for a new multisig asset, by specifying participants and the threshold
|
|
147
|
+
* @param {string} assetSymbol Asset symbol
|
|
148
|
+
* @param {string} tokenType Optional value only used when dealing with non native assets (aka tokens), If native asset, keep the field empty
|
|
149
|
+
* @param {number} threshold The threshold is the number of signatures required to sign a transaction
|
|
150
|
+
* @param {string} creatorAddress The address of the account that is initiating the multisig asset creation
|
|
151
|
+
* @param {Array} participants The array containing the addresses of the users requested to participate in the multisig
|
|
152
|
+
* @param {number} version Version of the multi-sig
|
|
153
|
+
* @returns {CreateMultisigAssetResponse} Multisig asset was created successfully
|
|
154
|
+
*/
|
|
155
|
+
createMultisigAsset({ assetSymbol, tokenType, threshold, creatorAddress, participants, version, }: CreateMultisigAssetRequest): Promise<CreateMultisigAssetResponse>;
|
|
156
|
+
private initRecoveryFlow;
|
|
157
|
+
}
|