wallaby-cash 3.2.1 → 3.3.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.
@@ -1,5 +1,6 @@
1
1
  import { Base } from '../../base';
2
- import { WallabyConfig, TokenStandard, FeeEstimatesResponse, Transaction, BlockchainName, GetPendingTransactionsRequest, GetPendingTransactionsResponse, ResolvePendingTransactionRequest, ResolvePendingTransactionResponse, TransactionResponse, FeeEstimateRequest } from '../../types';
2
+ import { WallabyConfig, FeeEstimatesResponse, BlockchainName, GetPendingTransactionsRequest, GetPendingTransactionsResponse, ResolvePendingTransactionRequest, ResolvePendingTransactionResponse, TransactionResponse, FeeEstimateRequest } from '../../types';
3
+ import { DetectRestrictionResponseDto, GetRestrictionParams, GetTransactionsParams, GetTransactionsResponseDto } from '../../generated/api';
3
4
  import { CreateAllowanceRequest, TransactionStatusResponse, TransferRequest } from '../../types';
4
5
  export declare class Transactions extends Base {
5
6
  private authService;
@@ -35,19 +36,24 @@ export declare class Transactions extends Base {
35
36
  /**
36
37
  *
37
38
  * @public
38
- * @param {string} address
39
- * @param {string} symbol
40
- * @param {TokenStandard} tokenStandard an optional param used when dealing with non native assets
41
- * @returns {Promise<{ address: string; transactions: Transaction[] }>}
39
+ * @param {GetTransactionsParams} params - Query parameters for filtering and paginating transactions
40
+ * @returns {GetTransactionsResponseDto} Paginated list of transactions matching the given criteria
42
41
  */
43
- getTransactions({ address, symbol, tokenStandard, }: {
44
- address: string;
45
- symbol: string;
46
- tokenStandard?: TokenStandard;
47
- }): Promise<{
48
- address: string;
49
- transactions: Transaction[];
50
- } | undefined>;
42
+ getTransactions(params: GetTransactionsParams): Promise<GetTransactionsResponseDto>;
43
+ /**
44
+ *
45
+ * @public
46
+ * @param {GetRestrictionParams} params - Parameters to detect transfer restrictions (addresses, asset, value)
47
+ * - {string} fromAddress
48
+ * - {string} toAddress
49
+ * - {string} amount
50
+ * - [string] assetId
51
+ * - [string] contractAddress
52
+ * - [BlockchainName] blockchainName
53
+ * @returns {Promise<DetectRestrictionResponseDto>}
54
+ * Detection result; when transfer is blocked, also includes the human-readable restriction message and a boolean canTransfer
55
+ */
56
+ getRestriction(params: GetRestrictionParams): Promise<DetectRestrictionResponseDto>;
51
57
  /**
52
58
  *
53
59
  * @public
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wallaby-cash",
3
- "version": "3.2.1",
3
+ "version": "3.3.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/WALLABY-WaaS/wallaby-sdk-js"
@@ -36,7 +36,9 @@
36
36
  "build": "rollup --config --sourcemap --validate --bundleConfigAsCjs",
37
37
  "build:prod": "npm run build --compact --environment production",
38
38
  "build:dev": "npm run generate:types && rollup --config --bundleConfigAsCjs --watch",
39
+ "pretest": "node scripts/check-test-guards.mjs",
39
40
  "test": "NODE_ENV=test jest",
41
+ "check:no-skips": "node scripts/check-test-guards.mjs",
40
42
  "merge-coverage": "mkdir -p .nyc_output && npx istanbul-merge --out .nyc_output/out.json coverage/coverage-final.json && npx nyc report --reporter=json-summary --reporter=text-summary --report-dir=coverage && npx nyc check-coverage",
41
43
  "test:coverage": "NODE_ENV=test npm run test --coverage",
42
44
  "test:watch": "NODE_ENV=test jest --watch",
@@ -168,9 +170,9 @@
168
170
  ],
169
171
  "nyc": {
170
172
  "check-coverage": true,
171
- "lines": 70,
172
- "statements": 71,
173
- "functions": 61,
174
- "branches": 38
173
+ "lines": 88,
174
+ "statements": 88,
175
+ "functions": 92,
176
+ "branches": 82
175
177
  }
176
178
  }
@@ -30,6 +30,21 @@ export declare const TransactionsRoutes: {
30
30
  method: RequestMethod;
31
31
  requiresAccessToken: boolean;
32
32
  };
33
+ detectTransferRestrictions: {
34
+ fullPath: string;
35
+ method: RequestMethod;
36
+ requiresAccessToken: boolean;
37
+ };
38
+ transferRestrictionMessage: {
39
+ fullPath: string;
40
+ method: RequestMethod;
41
+ requiresAccessToken: boolean;
42
+ };
43
+ restriction: {
44
+ fullPath: string;
45
+ method: RequestMethod;
46
+ requiresAccessToken: boolean;
47
+ };
33
48
  getPendingTransactions: {
34
49
  fullPath: string;
35
50
  method: RequestMethod;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wallaby-cash",
3
- "version": "3.2.1",
3
+ "version": "3.3.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/WALLABY-WaaS/wallaby-sdk-js"
@@ -36,7 +36,9 @@
36
36
  "build": "rollup --config --sourcemap --validate --bundleConfigAsCjs",
37
37
  "build:prod": "npm run build --compact --environment production",
38
38
  "build:dev": "npm run generate:types && rollup --config --bundleConfigAsCjs --watch",
39
+ "pretest": "node scripts/check-test-guards.mjs",
39
40
  "test": "NODE_ENV=test jest",
41
+ "check:no-skips": "node scripts/check-test-guards.mjs",
40
42
  "merge-coverage": "mkdir -p .nyc_output && npx istanbul-merge --out .nyc_output/out.json coverage/coverage-final.json && npx nyc report --reporter=json-summary --reporter=text-summary --report-dir=coverage && npx nyc check-coverage",
41
43
  "test:coverage": "NODE_ENV=test npm run test --coverage",
42
44
  "test:watch": "NODE_ENV=test jest --watch",
@@ -168,9 +170,9 @@
168
170
  ],
169
171
  "nyc": {
170
172
  "check-coverage": true,
171
- "lines": 70,
172
- "statements": 71,
173
- "functions": 61,
174
- "branches": 38
173
+ "lines": 88,
174
+ "statements": 88,
175
+ "functions": 92,
176
+ "branches": 82
175
177
  }
176
178
  }