@cityofzion/bs-neo3 3.1.7 → 3.1.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.
package/dist/BSNeo3.d.ts CHANGED
@@ -18,7 +18,7 @@ export declare class BSNeo3 implements IBSNeo3 {
18
18
  networkUrls: string[];
19
19
  readonly defaultNetwork: TBSNetwork<TBSNeo3NetworkId>;
20
20
  readonly availableNetworks: TBSNetwork<TBSNeo3NetworkId>[];
21
- blockchainDataService: IBlockchainDataService;
21
+ blockchainDataService: IBlockchainDataService<TBSNeo3Name>;
22
22
  nftDataService: INftDataService;
23
23
  ledgerService: NeonDappKitLedgerServiceNeo3;
24
24
  exchangeDataService: IExchangeDataService;
@@ -28,7 +28,7 @@ export declare class BSNeo3 implements IBSNeo3 {
28
28
  tokenService: ITokenService;
29
29
  claimService: ClaimServiceNeo3;
30
30
  walletConnectService: IWalletConnectService<TBSNeo3Name>;
31
- fullTransactionsDataService: IFullTransactionsDataService;
31
+ fullTransactionsDataService: IFullTransactionsDataService<TBSNeo3Name>;
32
32
  constructor(network?: TBSNetwork<TBSNeo3NetworkId>, getLedgerTransport?: TGetLedgerTransport<TBSNeo3Name>);
33
33
  setNetwork(network: TBSNetwork<TBSNeo3NetworkId>): void;
34
34
  pingNetwork(url: string): Promise<TPingNetworkResponse>;
@@ -46,6 +46,6 @@ export declare class BSNeo3 implements IBSNeo3 {
46
46
  decrypt(encryptedKey: string, password: string): Promise<TBSAccount<TBSNeo3Name>>;
47
47
  encrypt(key: string, password: string): Promise<string>;
48
48
  calculateTransferFee(params: TTransferParams<TBSNeo3Name>): Promise<string>;
49
- transfer(params: TTransferParams<TBSNeo3Name>): Promise<TTransactionDefault[]>;
49
+ transfer(params: TTransferParams<TBSNeo3Name>): Promise<TTransactionDefault<TBSNeo3Name>[]>;
50
50
  resolveNameServiceDomain(domainName: string): Promise<string>;
51
51
  }
package/dist/BSNeo3.js CHANGED
@@ -219,6 +219,9 @@ class BSNeo3 {
219
219
  }
220
220
  return [
221
221
  {
222
+ isPending: true,
223
+ relatedAddress: address,
224
+ blockchain: this.name,
222
225
  txId,
223
226
  txIdUrl: this.explorerService.buildTransactionUrl(txId),
224
227
  date: new Date().toJSON(),
@@ -1,13 +1,13 @@
1
1
  import { type TBalanceResponse, type TBSToken, type TGetTransactionsByAddressParams, type TGetTransactionsByAddressResponse, type TContractResponse, type TTransactionDefault } from '@cityofzion/blockchain-service';
2
2
  import { api } from '@cityofzion/dora-ts';
3
3
  import { RpcBDSNeo3 } from './RpcBDSNeo3';
4
- import type { IBSNeo3 } from '../../types';
4
+ import type { IBSNeo3, TBSNeo3Name } from '../../types';
5
5
  export declare class DoraBDSNeo3 extends RpcBDSNeo3 {
6
6
  #private;
7
7
  static getClient(): api.NeoRESTApi;
8
8
  constructor(service: IBSNeo3);
9
- getTransaction(hash: string): Promise<TTransactionDefault>;
10
- getTransactionsByAddress({ address, nextPageParams, }: TGetTransactionsByAddressParams): Promise<TGetTransactionsByAddressResponse<TTransactionDefault>>;
9
+ getTransaction(hash: string): Promise<TTransactionDefault<TBSNeo3Name>>;
10
+ getTransactionsByAddress({ address, nextPageParams, }: TGetTransactionsByAddressParams): Promise<TGetTransactionsByAddressResponse<TBSNeo3Name, TTransactionDefault<TBSNeo3Name>>>;
11
11
  getContract(contractHash: string): Promise<TContractResponse>;
12
12
  getTokenInfo(tokenHash: string): Promise<TBSToken>;
13
13
  getBalance(address: string): Promise<TBalanceResponse[]>;
@@ -45,6 +45,8 @@ class DoraBDSNeo3 extends RpcBDSNeo3_1.RpcBDSNeo3 {
45
45
  ...this._service.voteService._getTransactionDataFromEvents(events),
46
46
  };
47
47
  const transaction = {
48
+ blockchain: this._service.name,
49
+ isPending: false,
48
50
  txId,
49
51
  txIdUrl,
50
52
  block: response.block,
@@ -80,6 +82,9 @@ class DoraBDSNeo3 extends RpcBDSNeo3_1.RpcBDSNeo3 {
80
82
  ...this._service.voteService._getTransactionDataFromEvents(events),
81
83
  };
82
84
  const transaction = {
85
+ blockchain: this._service.name,
86
+ isPending: false,
87
+ relatedAddress: address,
83
88
  txId,
84
89
  txIdUrl,
85
90
  block: item.block,
@@ -1,14 +1,14 @@
1
1
  import { type TBalanceResponse, type IBlockchainDataService, type TBSToken, type TGetTransactionsByAddressParams, type TGetTransactionsByAddressResponse, type TContractResponse, type TTransactionDefault, type TTransactionDefaultEvent } from '@cityofzion/blockchain-service';
2
- import type { IBSNeo3, TRpcBDSNeo3Notification } from '../../types';
3
- export declare class RpcBDSNeo3 implements IBlockchainDataService {
2
+ import type { IBSNeo3, TBSNeo3Name, TRpcBDSNeo3Notification } from '../../types';
3
+ export declare class RpcBDSNeo3 implements IBlockchainDataService<TBSNeo3Name> {
4
4
  #private;
5
5
  readonly maxTimeToConfirmTransactionInMs: number;
6
6
  readonly _tokenCache: Map<string, TBSToken>;
7
7
  readonly _service: IBSNeo3;
8
8
  constructor(service: IBSNeo3);
9
9
  _extractEventsFromNotifications(notifications?: TRpcBDSNeo3Notification[]): Promise<TTransactionDefaultEvent[]>;
10
- getTransaction(hash: string): Promise<TTransactionDefault>;
11
- getTransactionsByAddress(_params: TGetTransactionsByAddressParams): Promise<TGetTransactionsByAddressResponse<TTransactionDefault>>;
10
+ getTransaction(hash: string): Promise<TTransactionDefault<TBSNeo3Name>>;
11
+ getTransactionsByAddress(_params: TGetTransactionsByAddressParams): Promise<TGetTransactionsByAddressResponse<TBSNeo3Name, TTransactionDefault<TBSNeo3Name>>>;
12
12
  getContract(contractHash: string): Promise<TContractResponse>;
13
13
  getTokenInfo(tokenHash: string): Promise<TBSToken>;
14
14
  getBalance(address: string): Promise<TBalanceResponse[]>;
@@ -53,6 +53,8 @@ class RpcBDSNeo3 {
53
53
  ...this._service.voteService._getTransactionDataFromEvents(events),
54
54
  };
55
55
  const transaction = {
56
+ blockchain: this._service.name,
57
+ isPending: false,
56
58
  txId,
57
59
  txIdUrl,
58
60
  block: response.validuntilblock,
@@ -1,5 +1,5 @@
1
1
  import type { IBSNeo3, TBSNeo3Name } from '../../types';
2
- import type { IClaimService, TBSAccount, TClaimServiceTransactionData, TTransaction, TTransactionDefault, TTransactionDefaultEvent, TTransactionDefaultTokenEvent } from '@cityofzion/blockchain-service';
2
+ import type { IClaimService, TBSAccount, TClaimServiceTransactionData, TTransactionBase, TTransactionDefault, TTransactionDefaultEvent, TTransactionDefaultTokenEvent } from '@cityofzion/blockchain-service';
3
3
  export declare class ClaimServiceNeo3 implements IClaimService<TBSNeo3Name> {
4
4
  #private;
5
5
  readonly _service: IBSNeo3;
@@ -10,6 +10,6 @@ export declare class ClaimServiceNeo3 implements IClaimService<TBSNeo3Name> {
10
10
  _buildTransactionEvent(address: string): Promise<TTransactionDefaultTokenEvent>;
11
11
  getUnclaimed(address: string): Promise<string>;
12
12
  calculateFee(senderAccount: TBSAccount<TBSNeo3Name>): Promise<string>;
13
- claim(senderAccount: TBSAccount<TBSNeo3Name>): Promise<TTransactionDefault>;
14
- getTransactionData(transaction: TTransaction): TClaimServiceTransactionData | undefined;
13
+ claim(senderAccount: TBSAccount<TBSNeo3Name>): Promise<TTransactionDefault<TBSNeo3Name>>;
14
+ getTransactionData(transaction: TTransactionBase): TClaimServiceTransactionData | undefined;
15
15
  }
@@ -1,10 +1,10 @@
1
1
  import { type IFullTransactionsDataService, type TExportFullTransactionsByAddressParams, type TGetFullTransactionsByAddressParams, type TGetTransactionsByAddressResponse, type TTransactionDefault } from '@cityofzion/blockchain-service';
2
- import type { IBSNeo3, TBSNeo3NetworkId } from '../../types';
3
- export declare class DoraFullTransactionsDataServiceNeo3 implements IFullTransactionsDataService {
2
+ import type { IBSNeo3, TBSNeo3Name, TBSNeo3NetworkId } from '../../types';
3
+ export declare class DoraFullTransactionsDataServiceNeo3 implements IFullTransactionsDataService<TBSNeo3Name> {
4
4
  #private;
5
5
  static readonly SUPPORTED_NEP11_STANDARDS: string[];
6
6
  static readonly SUPPORTED_NETWORKS_IDS: TBSNeo3NetworkId[];
7
7
  constructor(service: IBSNeo3);
8
- getFullTransactionsByAddress({ nextPageParams, ...params }: TGetFullTransactionsByAddressParams): Promise<TGetTransactionsByAddressResponse<TTransactionDefault>>;
8
+ getFullTransactionsByAddress({ nextPageParams, ...params }: TGetFullTransactionsByAddressParams): Promise<TGetTransactionsByAddressResponse<TBSNeo3Name, TTransactionDefault<TBSNeo3Name>>>;
9
9
  exportFullTransactionsByAddress(params: TExportFullTransactionsByAddressParams): Promise<string>;
10
10
  }
@@ -98,6 +98,9 @@ class DoraFullTransactionsDataServiceNeo3 {
98
98
  }
99
99
  }
100
100
  const newItem = {
101
+ blockchain: __classPrivateFieldGet(this, _DoraFullTransactionsDataServiceNeo3_service, "f").name,
102
+ isPending: false,
103
+ relatedAddress: params.address,
101
104
  txId,
102
105
  txIdUrl,
103
106
  block: item.block,
@@ -1,4 +1,4 @@
1
- import { INeo3NeoXBridgeService, TBridgeToken, TNeo3NeoXBridgeServiceBridgeParam, TNeo3NeoXBridgeServiceConstants, TNeo3NeoXBridgeServiceGetNonceParams, TNeo3NeoXBridgeServiceGetTransactionHashByNonceParams, type TNeo3NeoXBridgeTransactionData, type TTransaction } from '@cityofzion/blockchain-service';
1
+ import { INeo3NeoXBridgeService, TBridgeToken, TNeo3NeoXBridgeServiceBridgeParam, TNeo3NeoXBridgeServiceConstants, TNeo3NeoXBridgeServiceGetNonceParams, TNeo3NeoXBridgeServiceGetTransactionHashByNonceParams, type TNeo3NeoXBridgeTransactionData, type TTransactionBase } from '@cityofzion/blockchain-service';
2
2
  import type { IBSNeo3, TBSNeo3Name, TRpcBDSNeo3Notification } from '../../types';
3
3
  export declare class Neo3NeoXBridgeService implements INeo3NeoXBridgeService<TBSNeo3Name> {
4
4
  #private;
@@ -13,5 +13,5 @@ export declare class Neo3NeoXBridgeService implements INeo3NeoXBridgeService<TBS
13
13
  getNonce(params: TNeo3NeoXBridgeServiceGetNonceParams<TBSNeo3Name>): Promise<string>;
14
14
  getTransactionHashByNonce(params: TNeo3NeoXBridgeServiceGetTransactionHashByNonceParams<TBSNeo3Name>): Promise<string>;
15
15
  getTokenByMultichainId(multichainId: string): TBridgeToken<TBSNeo3Name> | undefined;
16
- getTransactionData(transaction: TTransaction): TNeo3NeoXBridgeTransactionData<TBSNeo3Name> | undefined;
16
+ getTransactionData(transaction: TTransactionBase): TNeo3NeoXBridgeTransactionData<TBSNeo3Name> | undefined;
17
17
  }
@@ -1,14 +1,14 @@
1
- import { TTransactionDefault, type TTransaction, type TTransactionDefaultEvent, type TTransactionDefaultGenericEvent } from '@cityofzion/blockchain-service';
2
- import type { IBSNeo3, IVoteService, TVoteServiceCandidate, TVoteServiceDetailsByAddressResponse, TVoteServiceNeo3TransactionData, TVoteServiceVoteParams } from '../../types';
1
+ import { TTransactionDefault, type TTransactionBase, type TTransactionDefaultEvent, type TTransactionDefaultGenericEvent } from '@cityofzion/blockchain-service';
2
+ import type { IBSNeo3, IVoteService, TBSNeo3Name, TVoteServiceCandidate, TVoteServiceDetailsByAddressResponse, TVoteServiceNeo3TransactionData, TVoteServiceVoteParams } from '../../types';
3
3
  export declare class VoteServiceNeo3 implements IVoteService {
4
4
  #private;
5
5
  readonly _service: IBSNeo3;
6
6
  constructor(service: IBSNeo3);
7
7
  _buildTransactionEvent(address: string, candidate: string): TTransactionDefaultGenericEvent;
8
8
  _getTransactionDataFromEvents(events: TTransactionDefaultEvent[]): TVoteServiceNeo3TransactionData | undefined;
9
- getTransactionData(transaction: TTransaction): TVoteServiceNeo3TransactionData | undefined;
9
+ getTransactionData(transaction: TTransactionBase): TVoteServiceNeo3TransactionData | undefined;
10
10
  getCandidatesToVote(): Promise<TVoteServiceCandidate[]>;
11
11
  getVoteDetailsByAddress(address: string): Promise<TVoteServiceDetailsByAddressResponse>;
12
- vote({ account, candidatePubKey }: TVoteServiceVoteParams): Promise<TTransactionDefault>;
12
+ vote({ account, candidatePubKey }: TVoteServiceVoteParams): Promise<TTransactionDefault<TBSNeo3Name>>;
13
13
  calculateVoteFee({ account, candidatePubKey }: TVoteServiceVoteParams): Promise<string>;
14
14
  }
@@ -108,6 +108,9 @@ class VoteServiceNeo3 {
108
108
  const invocationCount = invocationMulti.invocations.length;
109
109
  const data = { isVote: true };
110
110
  return {
111
+ isPending: true,
112
+ relatedAddress: account.address,
113
+ blockchain: this._service.name,
111
114
  txId,
112
115
  txIdUrl: this._service.explorerService.buildTransactionUrl(txId),
113
116
  date: new Date().toJSON(),
package/dist/types.d.ts CHANGED
@@ -1,15 +1,15 @@
1
- import type { TBSAccount, IBlockchainService, IBSWithClaim, IBSWithEncryption, IBSWithExplorer, IBSWithFee, IBSWithLedger, IBSWithNameService, IBSWithNeo3NeoXBridge, IBSWithNft, TBSNetworkId, IBSWithWalletConnect, IBSWithFullTransactions, TTransactionDefault, TTransferParams, TTransaction } from '@cityofzion/blockchain-service';
1
+ import type { TBSAccount, IBlockchainService, IBSWithClaim, IBSWithEncryption, IBSWithExplorer, IBSWithFee, IBSWithLedger, IBSWithNameService, IBSWithNeo3NeoXBridge, IBSWithNft, TBSNetworkId, IBSWithWalletConnect, IBSWithFullTransactions, TTransactionDefault, TTransferParams, TTransactionBase } from '@cityofzion/blockchain-service';
2
2
  import { wallet, api } from './helpers/BSNeo3NeonJsSingletonHelper';
3
3
  import type { Neo3NeoXBridgeService } from './services/neo3-neox-bridge/Neo3NeoXBridgeService';
4
4
  import type { ClaimServiceNeo3 } from './services/claim/ClaimServiceNeo3';
5
5
  import type { VoteServiceNeo3 } from './services/vote/VoteServiceNeo3';
6
6
  export type TBSNeo3NetworkId = TBSNetworkId<'mainnet' | 'testnet'>;
7
7
  export type TBSNeo3Name = 'neo3';
8
- export interface IBSNeo3 extends IBlockchainService<TBSNeo3Name, TBSNeo3NetworkId>, IBSWithNameService, IBSWithClaim<TBSNeo3Name>, IBSWithFee<TBSNeo3Name>, IBSWithNft, IBSWithExplorer, IBSWithLedger<TBSNeo3Name>, IBSWithNeo3NeoXBridge<TBSNeo3Name>, IBSWithEncryption<TBSNeo3Name>, IBSWithWalletConnect<TBSNeo3Name>, IBSWithFullTransactions {
8
+ export interface IBSNeo3 extends IBlockchainService<TBSNeo3Name, TBSNeo3NetworkId>, IBSWithNameService, IBSWithClaim<TBSNeo3Name>, IBSWithFee<TBSNeo3Name>, IBSWithNft, IBSWithExplorer, IBSWithLedger<TBSNeo3Name>, IBSWithNeo3NeoXBridge<TBSNeo3Name>, IBSWithEncryption<TBSNeo3Name>, IBSWithWalletConnect<TBSNeo3Name>, IBSWithFullTransactions<TBSNeo3Name> {
9
9
  neo3NeoXBridgeService: Neo3NeoXBridgeService;
10
10
  claimService: ClaimServiceNeo3;
11
11
  voteService: VoteServiceNeo3;
12
- transfer(params: TTransferParams<TBSNeo3Name>): Promise<TTransactionDefault[]>;
12
+ transfer(params: TTransferParams<TBSNeo3Name>): Promise<TTransactionDefault<TBSNeo3Name>[]>;
13
13
  _generateSigningCallback(account: TBSAccount<TBSNeo3Name>): Promise<{
14
14
  neonJsAccount: wallet.Account;
15
15
  signingCallback: api.SigningFunction;
@@ -68,9 +68,9 @@ export type TVoteServiceNeo3TransactionData = {
68
68
  export interface IVoteService {
69
69
  getCandidatesToVote(): Promise<TVoteServiceCandidate[]>;
70
70
  getVoteDetailsByAddress(address: string): Promise<TVoteServiceDetailsByAddressResponse>;
71
- vote(params: TVoteServiceVoteParams): Promise<TTransactionDefault>;
71
+ vote(params: TVoteServiceVoteParams): Promise<TTransactionDefault<TBSNeo3Name>>;
72
72
  calculateVoteFee(params: TVoteServiceVoteParams): Promise<string>;
73
- getTransactionData(transaction: TTransaction): TVoteServiceNeo3TransactionData | undefined;
73
+ getTransactionData(transaction: TTransactionBase): TVoteServiceNeo3TransactionData | undefined;
74
74
  }
75
75
  export type TRpcVoteServiceNeo3GetVoteCIMParams = {
76
76
  address: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cityofzion/bs-neo3",
3
- "version": "3.1.7",
3
+ "version": "3.1.9",
4
4
  "repository": "https://github.com/CityOfZion/blockchain-services",
5
5
  "license": "GPL-3.0-only",
6
6
  "author": "Coz",
@@ -19,7 +19,7 @@
19
19
  "@cityofzion/neon-dappkit": "~0.6.0",
20
20
  "@cityofzion/neon-js": "~5.7.0",
21
21
  "axios": "~1.13.5",
22
- "@cityofzion/blockchain-service": "3.1.7"
22
+ "@cityofzion/blockchain-service": "3.1.9"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@cityofzion/neon-dappkit-types": "~0.5.0",