wallaby-cash 1.3.8 → 1.3.9
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Base } from '../../base';
|
|
2
|
-
import { QueryUserRequest, CreateWalletRequest, CreateWalletResponse, RecoverWalletRequest, RecoverWalletResponse, TokenBalanceRequest,
|
|
2
|
+
import { QueryUserRequest, CreateWalletRequest, CreateWalletResponse, RecoverWalletRequest, RecoverWalletResponse, TokenBalanceRequest, TokenBalanceResponse, WallabyError, QueryWalletRequest, UserAssetsResponse, UserWalletsResponse, WalletAssetsResponse, WallabyConfig, ConvertMnemonicSeedPhraseRequest, ConvertMnemonicSeedPhraseResponse, CreateMultisigAssetRequest, CreateMultisigAssetResponse, ImportWalletRequest, ImportWalletResponse } from '../../types';
|
|
3
3
|
export declare class Wallet extends Base {
|
|
4
4
|
private auth;
|
|
5
5
|
constructor(config: WallabyConfig);
|
|
@@ -26,7 +26,7 @@ export declare class Wallet extends Base {
|
|
|
26
26
|
* @param {TokenStandard} tokenStandard Token standard. Leave as null if the token is native to the blockchain. i.e ALGO BTC or ETH
|
|
27
27
|
* @returns {CreateWalletResponse} The wallet has been created successfully
|
|
28
28
|
*/
|
|
29
|
-
getTokenBalance({ address, symbol, tokenStandard }: TokenBalanceRequest): Promise<
|
|
29
|
+
getTokenBalance({ address, symbol, tokenStandard }: TokenBalanceRequest): Promise<TokenBalanceResponse | undefined>;
|
|
30
30
|
/**
|
|
31
31
|
*
|
|
32
32
|
* @public
|
package/dist/types/wallet.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wallaby-cash",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.9",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@semantic-release/commit-analyzer": "^9.0.2",
|
|
39
39
|
"@semantic-release/git": "^10.0.1",
|
|
40
40
|
"@semantic-release/github": "^8.0.7",
|
|
41
|
-
"@semantic-release/npm": "^
|
|
41
|
+
"@semantic-release/npm": "^12.0.0",
|
|
42
42
|
"@semantic-release/release-notes-generator": "^11.0.1",
|
|
43
43
|
"@size-limit/preset-small-lib": "^8.2.4",
|
|
44
44
|
"@types/crypto-js": "^4.1.1",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"jest-environment-jsdom": "^29.5.0",
|
|
65
65
|
"microbundle": "^0.15.1",
|
|
66
66
|
"prettier": "^2.8.5",
|
|
67
|
-
"semantic-release": "^
|
|
67
|
+
"semantic-release": "^23.0.8",
|
|
68
68
|
"size-limit": "^8.2.4",
|
|
69
69
|
"ts-jest": "^29.1.0",
|
|
70
70
|
"tslib": "^2.5.0",
|
package/src/lib/wallet/index.ts
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
RecoverWalletRequest,
|
|
8
8
|
RecoverWalletResponse,
|
|
9
9
|
TokenBalanceRequest,
|
|
10
|
-
|
|
10
|
+
TokenBalanceResponse,
|
|
11
11
|
WallabyError,
|
|
12
12
|
QueryWalletRequest,
|
|
13
13
|
UserAssetsResponse,
|
|
@@ -90,7 +90,7 @@ export class Wallet extends Base {
|
|
|
90
90
|
* @param {TokenStandard} tokenStandard Token standard. Leave as null if the token is native to the blockchain. i.e ALGO BTC or ETH
|
|
91
91
|
* @returns {CreateWalletResponse} The wallet has been created successfully
|
|
92
92
|
*/
|
|
93
|
-
async getTokenBalance({ address, symbol, tokenStandard }: TokenBalanceRequest): Promise<
|
|
93
|
+
async getTokenBalance({ address, symbol, tokenStandard }: TokenBalanceRequest): Promise<TokenBalanceResponse | undefined> {
|
|
94
94
|
try {
|
|
95
95
|
const response = await this.request(WalletRoutes.getTokenBalance, {
|
|
96
96
|
method: WalletRoutes.getTokenBalance.method,
|
|
@@ -477,9 +477,11 @@ export class Wallet extends Base {
|
|
|
477
477
|
// Create new key pair to use with the new (recovered) wallet
|
|
478
478
|
const { publicKey, privateKey } = createIdentity();
|
|
479
479
|
const initRecovery = await this.initRecoveryFlow({ clientAuthPubKey: publicKey });
|
|
480
|
+
|
|
480
481
|
if (!initRecovery || initRecovery.error) {
|
|
481
482
|
throw new Error(initRecovery?.error);
|
|
482
483
|
}
|
|
484
|
+
|
|
483
485
|
const { signatureMessage, wallabyAuthPubKey } = initRecovery;
|
|
484
486
|
|
|
485
487
|
const hashedMessage = hash.keccak256(signatureMessage);
|
package/src/types/wallet.ts
CHANGED