wallaby-cash 2.0.3 → 2.0.5

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,6 +1,5 @@
1
1
  import { Base } from '../../base';
2
- import { WallabyConfig, BlockchainName, TokenStandard } from '../../types';
3
- import { CreateAllowanceRequest, FeeEstimatesResponse, Transaction, TransactionStatusResponse, TransferRequest, TransactionResponse } from '../../types';
2
+ import { BlockchainName, CreateAllowanceRequestWithAmends, FeeEstimatesResponse, TokenStandard, Transaction, TransactionResponse, TransactionStatusResponse, TransferRequest, WallabyConfig } from '../../types';
4
3
  import { FeeEstimateRequest } from './transactions.model';
5
4
  export declare class Transactions extends Base {
6
5
  private authService;
@@ -78,7 +77,7 @@ export declare class Transactions extends Base {
78
77
  * @returns {CreateAllowanceResponse}
79
78
  *
80
79
  */
81
- createAllowance({ authenticationOptions, walletId, ownerAddress, spenderAddress, amount, assetId, suiObjectId, contractAddress, chainName, assetSymbol, reference, memo, }: CreateAllowanceRequest): Promise<TransactionResponse | undefined>;
80
+ createAllowance({ authenticationOptions, walletId, ownerAddress, spenderAddress, amount, assetId, suiObjectId, contractAddress, chainName, assetSymbol, reference, memo, }: CreateAllowanceRequestWithAmends): Promise<TransactionResponse | undefined>;
82
81
  /**
83
82
  * Prepares authentication data and encrypted payload for transaction requests
84
83
  * @private
@@ -30,11 +30,11 @@ export declare class WalletHandlersService extends Base {
30
30
  privateKey: string;
31
31
  }, walletCreationInput: CreateWalletRequest): Promise<{
32
32
  standardSeedPhrase: string | undefined;
33
+ error?: any;
33
34
  reference: string;
35
+ encryptedSeed?: Encrypted | undefined;
34
36
  wallet: import("../../types").Wallet;
35
- error?: any;
36
37
  wallabyAuthPubKey: string;
37
- encryptedSeed?: Encrypted | undefined;
38
38
  assets: Array<import("../../types").UserAsset>;
39
39
  shares?: Array<Share> | undefined;
40
40
  }>;
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wallaby-cash",
3
- "version": "2.0.3",
3
+ "version": "2.0.5",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git@github.com:WALLABY-WaaS/wallaby-sdk-js.git"
@@ -6,6 +6,7 @@ export declare type GetDecryptedSeedPhraseResponse = {
6
6
  standardSeedPhrase: UtilsResponse;
7
7
  algorandSeedPhrase: UtilsResponse;
8
8
  };
9
+ export declare const isWallabyError: (obj: unknown) => obj is WallabyError;
9
10
  export declare type WallabyError = {
10
11
  error?: any;
11
12
  statusCode: number;
@@ -1,5 +1,6 @@
1
+ import { AllowanceTransactionRequestDto, TransactionsControllerCreateAllowanceTranasctionData } from 'src/generated/api';
1
2
  import { AuthResponse } from './auth';
2
- import { AssetConfig, BlockchainName, BlockchainSlip44, OwnershipType, TokenStandard, User } from './common';
3
+ import { AssetConfig, BlockchainName, BlockchainSlip44, OwnershipType, TokenStandard, User, WallabyError } from './common';
3
4
  import { Merchant } from './merchants';
4
5
  export declare type Transaction = {
5
6
  id: string;
@@ -95,17 +96,15 @@ export declare type TransferRequest = BaseTransactionRequest & {
95
96
  originAddress: string;
96
97
  recipientAddress: string;
97
98
  };
98
- export declare type CreateAllowanceRequest = BaseTransactionRequest & {
99
- ownerAddress: string;
100
- spenderAddress: string;
101
- contractAddress?: string;
99
+ export declare type CreateAllowanceRequest = Omit<BaseTransactionRequest, 'amount'> & Omit<AllowanceTransactionRequestDto, 'chainName' | 'amount'> & {
102
100
  chainName?: BlockchainName;
103
- assetSymbol?: string;
101
+ amount?: AllowanceTransactionRequestDto['amount'];
104
102
  };
105
- export declare type TransactionResponse = {
106
- transaction: Transaction;
107
- error?: any;
103
+ export declare type CreateAllowanceRequestWithAmends = Omit<CreateAllowanceRequest, 'encryptedSeed' | 'encryptedShares'> & {
104
+ encryptedSeed?: CreateAllowanceRequest['encryptedSeed'];
105
+ encryptedShares?: CreateAllowanceRequest['encryptedShares'];
108
106
  };
107
+ export declare type TransactionResponse = TransactionsControllerCreateAllowanceTranasctionData | WallabyError;
109
108
  export declare type TransactionStatusResponse = {
110
109
  status: TransactionStatus;
111
110
  transactionHash: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wallaby-cash",
3
- "version": "2.0.3",
3
+ "version": "2.0.5",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git@github.com:WALLABY-WaaS/wallaby-sdk-js.git"