@cityofzion/bs-neox 3.1.8 → 3.1.10
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/BSNeoX.js +1 -0
- package/dist/services/blockchain-data/BlockscoutBDSNeoX.js +1 -0
- package/dist/services/full-transactions-data/BlockscoutFullTransactionsDataService.js +1 -0
- package/dist/services/neo3-neox-bridge/Neo3NeoXBridgeService.d.ts +2 -2
- package/dist/services/nft-data/GhostMarketNDSNeoX.d.ts +3 -2
- package/dist/services/nft-data/GhostMarketNDSNeoX.js +19 -1
- package/package.json +5 -5
package/dist/BSNeoX.js
CHANGED
|
@@ -146,6 +146,7 @@ class BSNeoX extends bs_ethereum_1.BSEthereum {
|
|
|
146
146
|
transactions.push({
|
|
147
147
|
blockchain: this.name,
|
|
148
148
|
isPending: true,
|
|
149
|
+
relatedAddress: address,
|
|
149
150
|
txId: transactionHash,
|
|
150
151
|
txIdUrl: this.explorerService.buildTransactionUrl(transactionHash),
|
|
151
152
|
date: new Date().toJSON(),
|
|
@@ -194,6 +194,7 @@ class BlockscoutBDSNeoX extends bs_ethereum_1.RpcBDSEthereum {
|
|
|
194
194
|
const transaction = {
|
|
195
195
|
blockchain: this._service.name,
|
|
196
196
|
isPending: false,
|
|
197
|
+
relatedAddress: params.address,
|
|
197
198
|
txId,
|
|
198
199
|
txIdUrl: this._service.explorerService.buildTransactionUrl(txId),
|
|
199
200
|
block: item.block,
|
|
@@ -42,6 +42,7 @@ class BlockscoutFullTransactionsDataService {
|
|
|
42
42
|
const txIdUrl = __classPrivateFieldGet(this, _BlockscoutFullTransactionsDataService_service, "f").explorerService.buildTransactionUrl(txId);
|
|
43
43
|
let newItem = {
|
|
44
44
|
blockchain: __classPrivateFieldGet(this, _BlockscoutFullTransactionsDataService_service, "f").name,
|
|
45
|
+
relatedAddress: params.address,
|
|
45
46
|
isPending: false,
|
|
46
47
|
txId,
|
|
47
48
|
txIdUrl,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { INeo3NeoXBridgeService, TBridgeToken, TNeo3NeoXBridgeServiceBridgeParam, TNeo3NeoXBridgeServiceConstants, TNeo3NeoXBridgeServiceGetApprovalParam, TNeo3NeoXBridgeServiceGetNonceParams, TNeo3NeoXBridgeServiceGetTransactionHashByNonceParams, type TNeo3NeoXBridgeTransactionData, type
|
|
1
|
+
import { INeo3NeoXBridgeService, TBridgeToken, TNeo3NeoXBridgeServiceBridgeParam, TNeo3NeoXBridgeServiceConstants, TNeo3NeoXBridgeServiceGetApprovalParam, TNeo3NeoXBridgeServiceGetNonceParams, TNeo3NeoXBridgeServiceGetTransactionHashByNonceParams, type TNeo3NeoXBridgeTransactionData, type TTransactionBase } from '@cityofzion/blockchain-service';
|
|
2
2
|
import type { IBSNeoX, TBSNeoXName, TBlockscoutBDSNeoXTransactionApiResponse } from '../../types';
|
|
3
3
|
export declare class Neo3NeoXBridgeService implements INeo3NeoXBridgeService<TBSNeoXName> {
|
|
4
4
|
#private;
|
|
@@ -15,5 +15,5 @@ export declare class Neo3NeoXBridgeService implements INeo3NeoXBridgeService<TBS
|
|
|
15
15
|
getNonce(params: TNeo3NeoXBridgeServiceGetNonceParams<TBSNeoXName>): Promise<string>;
|
|
16
16
|
getTransactionHashByNonce(params: TNeo3NeoXBridgeServiceGetTransactionHashByNonceParams<TBSNeoXName>): Promise<string>;
|
|
17
17
|
getTokenByMultichainId(multichainId: string): TBridgeToken<TBSNeoXName> | undefined;
|
|
18
|
-
getTransactionData(transaction:
|
|
18
|
+
getTransactionData(transaction: TTransactionBase): TNeo3NeoXBridgeTransactionData<TBSNeoXName> | undefined;
|
|
19
19
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GhostMarketNDS, type THasTokenParams } from '@cityofzion/blockchain-service';
|
|
2
2
|
import type { IBSNeoX, TBSNeoXName, TBSNeoXNetworkId } from '../../types';
|
|
3
|
-
export declare class GhostMarketNDSNeoX extends
|
|
3
|
+
export declare class GhostMarketNDSNeoX extends GhostMarketNDS<TBSNeoXName, TBSNeoXNetworkId, IBSNeoX> {
|
|
4
4
|
static readonly CHAIN_BY_NETWORK_ID: Partial<Record<TBSNeoXNetworkId, string>>;
|
|
5
5
|
constructor(service: IBSNeoX);
|
|
6
|
+
hasToken({ address, collectionHash }: THasTokenParams): Promise<boolean>;
|
|
6
7
|
getChain(): string;
|
|
7
8
|
}
|
|
@@ -2,10 +2,28 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GhostMarketNDSNeoX = void 0;
|
|
4
4
|
const bs_ethereum_1 = require("@cityofzion/bs-ethereum");
|
|
5
|
-
|
|
5
|
+
const blockchain_service_1 = require("@cityofzion/blockchain-service");
|
|
6
|
+
const ethers_1 = require("ethers");
|
|
7
|
+
class GhostMarketNDSNeoX extends blockchain_service_1.GhostMarketNDS {
|
|
6
8
|
constructor(service) {
|
|
7
9
|
super(service);
|
|
8
10
|
}
|
|
11
|
+
async hasToken({ address, collectionHash }) {
|
|
12
|
+
try {
|
|
13
|
+
if (!collectionHash)
|
|
14
|
+
return false;
|
|
15
|
+
const provider = new ethers_1.ethers.providers.JsonRpcProvider(this._service.network.url);
|
|
16
|
+
const contract = new ethers_1.ethers.Contract(collectionHash, bs_ethereum_1.ERC20_ABI, provider);
|
|
17
|
+
const response = await contract.balanceOf(address);
|
|
18
|
+
if (!response)
|
|
19
|
+
return false;
|
|
20
|
+
const parsedResponse = response;
|
|
21
|
+
return parsedResponse.gt(0);
|
|
22
|
+
}
|
|
23
|
+
catch {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
9
27
|
getChain() {
|
|
10
28
|
const chain = GhostMarketNDSNeoX.CHAIN_BY_NETWORK_ID[this._service.network.id];
|
|
11
29
|
if (!chain)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cityofzion/bs-neox",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.10",
|
|
4
4
|
"repository": "https://github.com/CityOfZion/blockchain-services",
|
|
5
5
|
"license": "GPL-3.0-only",
|
|
6
6
|
"author": "Coz",
|
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
],
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@cityofzion/dora-ts": "0.6.2",
|
|
14
|
-
"axios": "~1.
|
|
14
|
+
"axios": "~1.15.0",
|
|
15
15
|
"ethers": "~5.7.2",
|
|
16
16
|
"neox-tpke": "~1.0.5",
|
|
17
17
|
"viem": "~2.38.5",
|
|
18
|
-
"@cityofzion/
|
|
19
|
-
"@cityofzion/bs-neo3": "3.1.
|
|
20
|
-
"@cityofzion/
|
|
18
|
+
"@cityofzion/bs-ethereum": "3.1.10",
|
|
19
|
+
"@cityofzion/bs-neo3": "3.1.10",
|
|
20
|
+
"@cityofzion/blockchain-service": "3.1.10"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@ledgerhq/hw-transport": "~6.32.0",
|