@cityofzion/blockchain-service 1.10.1 → 1.11.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.
@@ -8,3 +8,4 @@ export declare function hasLedger<BSName extends string = string>(service: Block
8
8
  export declare function waitForTransaction<BSName extends string = string>(service: BlockchainService<BSName>, txId: string): Promise<boolean>;
9
9
  export declare function waitForAccountTransaction<BSName extends string = string>(service: BlockchainService<BSName>, txId: string, account: Account<BSName>, maxAttempts?: number): Promise<boolean>;
10
10
  export declare function fetchAccountsForBlockchainServices<BSName extends string = string>(blockchainServices: BlockchainService<BSName>[], getAccountCallback: (service: BlockchainService<BSName>, index: number) => Promise<Account<BSName>>): Promise<Map<BSName, Account<BSName>[]>>;
11
+ export declare function normalizeHash(hash: string): string;
package/dist/functions.js CHANGED
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.fetchAccountsForBlockchainServices = exports.waitForAccountTransaction = exports.waitForTransaction = exports.hasLedger = exports.hasExplorerService = exports.hasNft = exports.isCalculableFee = exports.isClaimable = exports.hasNameService = void 0;
12
+ exports.normalizeHash = exports.fetchAccountsForBlockchainServices = exports.waitForAccountTransaction = exports.waitForTransaction = exports.hasLedger = exports.hasExplorerService = exports.hasNft = exports.isCalculableFee = exports.isClaimable = exports.hasNameService = void 0;
13
13
  function hasNameService(service) {
14
14
  return 'resolveNameServiceDomain' in service && 'validateNameServiceDomainFormat' in service;
15
15
  }
@@ -108,3 +108,7 @@ function fetchAccountsForBlockchainServices(blockchainServices, getAccountCallba
108
108
  });
109
109
  }
110
110
  exports.fetchAccountsForBlockchainServices = fetchAccountsForBlockchainServices;
111
+ function normalizeHash(hash) {
112
+ return hash.replace('0x', '').toLowerCase();
113
+ }
114
+ exports.normalizeHash = normalizeHash;
@@ -259,14 +259,15 @@ export type SwapServiceEvents<BSName extends string = string> = {
259
259
  availableTokensToReceive: (tokens: SwapServiceLoadableValue<SwapServiceToken<BSName>[]>) => void | Promise<void>;
260
260
  };
261
261
  export type SwapServiceSwapResult = {
262
- transactionHash: string;
263
- numberOfTransactions: number;
264
262
  id: string;
263
+ txFrom?: string;
264
+ log?: string;
265
265
  };
266
266
  export type SwapServiceStatusResponse = {
267
267
  status: 'finished' | 'confirming' | 'exchanging' | 'failed' | 'refunded';
268
268
  txFrom?: string;
269
269
  txTo?: string;
270
+ log?: string;
270
271
  };
271
272
  export interface SwapServiceHelper {
272
273
  getStatus(id: string): Promise<SwapServiceStatusResponse>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cityofzion/blockchain-service",
3
- "version": "1.10.1",
3
+ "version": "1.11.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "repository": "https://github.com/CityOfZion/blockchain-services",