@cityofzion/bs-neox 1.4.7 → 1.5.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.
- package/dist/BSNeoX.d.ts +2 -1
- package/dist/BSNeoX.js +125 -4
- package/dist/assets/abis/consensus.d.ts +46 -0
- package/dist/assets/abis/consensus.js +1009 -0
- package/dist/assets/abis/key-management.d.ts +39 -0
- package/dist/assets/abis/key-management.js +805 -0
- package/dist/constants/BSNeoXConstants.d.ts +4 -0
- package/dist/constants/BSNeoXConstants.js +14 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/services/wallet-connect/WalletConnectServiceNeoX.d.ts +8 -0
- package/dist/services/wallet-connect/WalletConnectServiceNeoX.js +32 -0
- package/package.json +8 -6
|
@@ -3,8 +3,12 @@ import { TBSNeoXNetworkId } from '../types';
|
|
|
3
3
|
export declare class BSNeoXConstants {
|
|
4
4
|
static readonly NATIVE_ASSET: TBSToken;
|
|
5
5
|
static readonly NEO_TOKEN: TBSToken;
|
|
6
|
+
static readonly ANTI_MEV_RPC_LIST_BY_NETWORK_ID: Record<TBSNeoXNetworkId, string[]>;
|
|
6
7
|
static readonly RPC_LIST_BY_NETWORK_ID: Record<TBSNeoXNetworkId, string[]>;
|
|
7
8
|
static readonly MAINNET_NETWORK: TBSNetwork<TBSNeoXNetworkId>;
|
|
8
9
|
static readonly TESTNET_NETWORK: TBSNetwork<TBSNeoXNetworkId>;
|
|
9
10
|
static readonly ALL_NETWORKS: TBSNetwork<TBSNeoXNetworkId>[];
|
|
11
|
+
static readonly CONSENSUS_SCRIPT_HASH = "0x1212000000000000000000000000000000000001";
|
|
12
|
+
static readonly KEY_MANAGEMENT_SCRIPT_HASH = "0x1212000000000000000000000000000000000008";
|
|
13
|
+
static readonly GOVERNANCE_REWARD_SCRIPT_HASH = "0x1212000000000000000000000000000000000003";
|
|
10
14
|
}
|
|
@@ -18,9 +18,18 @@ BSNeoXConstants.NEO_TOKEN = {
|
|
|
18
18
|
decimals: 18,
|
|
19
19
|
hash: '0xc28736dc83f4fd43d6fb832Fd93c3eE7bB26828f',
|
|
20
20
|
};
|
|
21
|
+
BSNeoXConstants.ANTI_MEV_RPC_LIST_BY_NETWORK_ID = {
|
|
22
|
+
'47763': ['https://mainnet-5.rpc.banelabs.org'],
|
|
23
|
+
'12227332': ['https://neoxt4seed5.ngd.network'],
|
|
24
|
+
};
|
|
21
25
|
BSNeoXConstants.RPC_LIST_BY_NETWORK_ID = {
|
|
22
|
-
'47763': [
|
|
23
|
-
|
|
26
|
+
'47763': [
|
|
27
|
+
'https://mainnet-1.rpc.banelabs.org',
|
|
28
|
+
'https://mainnet-2.rpc.banelabs.org',
|
|
29
|
+
'https://mainnet-3.rpc.banelabs.org',
|
|
30
|
+
..._a.ANTI_MEV_RPC_LIST_BY_NETWORK_ID['47763'],
|
|
31
|
+
],
|
|
32
|
+
'12227332': ['https://testnet.rpc.banelabs.org', ..._a.ANTI_MEV_RPC_LIST_BY_NETWORK_ID['12227332']],
|
|
24
33
|
};
|
|
25
34
|
BSNeoXConstants.MAINNET_NETWORK = {
|
|
26
35
|
id: '47763',
|
|
@@ -35,3 +44,6 @@ BSNeoXConstants.TESTNET_NETWORK = {
|
|
|
35
44
|
type: 'testnet',
|
|
36
45
|
};
|
|
37
46
|
BSNeoXConstants.ALL_NETWORKS = [_a.MAINNET_NETWORK, _a.TESTNET_NETWORK];
|
|
47
|
+
BSNeoXConstants.CONSENSUS_SCRIPT_HASH = '0x1212000000000000000000000000000000000001';
|
|
48
|
+
BSNeoXConstants.KEY_MANAGEMENT_SCRIPT_HASH = '0x1212000000000000000000000000000000000008';
|
|
49
|
+
BSNeoXConstants.GOVERNANCE_REWARD_SCRIPT_HASH = '0x1212000000000000000000000000000000000003';
|
package/dist/index.d.ts
CHANGED
|
@@ -4,4 +4,5 @@ export * from './services/blockchain-data/BlockscoutBDSNeoX';
|
|
|
4
4
|
export * from './services/exchange-data/FlamingoForthewinEDSNeoX';
|
|
5
5
|
export * from './services/explorer/BlockscoutESNeoX';
|
|
6
6
|
export * from './services/nft-data/GhostMarketNDSNeoX';
|
|
7
|
+
export * from './services/wallet-connect/WalletConnectServiceNeoX';
|
|
7
8
|
export * from './types';
|
package/dist/index.js
CHANGED
|
@@ -20,4 +20,5 @@ __exportStar(require("./services/blockchain-data/BlockscoutBDSNeoX"), exports);
|
|
|
20
20
|
__exportStar(require("./services/exchange-data/FlamingoForthewinEDSNeoX"), exports);
|
|
21
21
|
__exportStar(require("./services/explorer/BlockscoutESNeoX"), exports);
|
|
22
22
|
__exportStar(require("./services/nft-data/GhostMarketNDSNeoX"), exports);
|
|
23
|
+
__exportStar(require("./services/wallet-connect/WalletConnectServiceNeoX"), exports);
|
|
23
24
|
__exportStar(require("./types"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IWalletConnectService, TBSNetworkId, TWalletConnectServiceRequestMethodParams } from '@cityofzion/blockchain-service';
|
|
2
|
+
import { ethers } from 'ethers';
|
|
3
|
+
import { IBSEthereum, WalletConnectServiceEthereum } from '@cityofzion/bs-ethereum';
|
|
4
|
+
export declare class WalletConnectServiceNeoX<N extends string, A extends TBSNetworkId> extends WalletConnectServiceEthereum<N, A> implements IWalletConnectService {
|
|
5
|
+
constructor(service: IBSEthereum<N, A>);
|
|
6
|
+
eth_getTransactionCount(args: TWalletConnectServiceRequestMethodParams<N>): Promise<number>;
|
|
7
|
+
eth_getCachedTransaction(args: TWalletConnectServiceRequestMethodParams<N>): Promise<ethers.providers.TransactionResponse>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.WalletConnectServiceNeoX = void 0;
|
|
13
|
+
const bs_ethereum_1 = require("@cityofzion/bs-ethereum");
|
|
14
|
+
class WalletConnectServiceNeoX extends bs_ethereum_1.WalletConnectServiceEthereum {
|
|
15
|
+
constructor(service) {
|
|
16
|
+
super(service);
|
|
17
|
+
this.supportedMethods.push('eth_getTransactionCount', 'eth_getCachedTransaction');
|
|
18
|
+
}
|
|
19
|
+
eth_getTransactionCount(args) {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
const { wallet } = yield this._resolveParams(args);
|
|
22
|
+
return yield wallet.getTransactionCount();
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
eth_getCachedTransaction(args) {
|
|
26
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
27
|
+
const { provider } = yield this._resolveParams(args);
|
|
28
|
+
return yield provider.getTransaction(args.params[0]);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.WalletConnectServiceNeoX = WalletConnectServiceNeoX;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cityofzion/bs-neox",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"repository": "https://github.com/CityOfZion/blockchain-services",
|
|
@@ -13,13 +13,15 @@
|
|
|
13
13
|
"@cityofzion/dora-ts": "0.6.2",
|
|
14
14
|
"axios": "~1.12.2",
|
|
15
15
|
"ethers": "~5.7.2",
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"@cityofzion/blockchain-service": "1.22.
|
|
16
|
+
"neox-tpke": "~1.0.5",
|
|
17
|
+
"viem": "~2.38.5",
|
|
18
|
+
"@cityofzion/blockchain-service": "1.22.6",
|
|
19
|
+
"@cityofzion/bs-ethereum": "2.14.8",
|
|
20
|
+
"@cityofzion/bs-neo3": "1.17.7"
|
|
19
21
|
},
|
|
20
22
|
"devDependencies": {
|
|
21
|
-
"@ledgerhq/hw-transport": "~6.31.
|
|
22
|
-
"@ledgerhq/hw-transport-node-hid": "~6.29.
|
|
23
|
+
"@ledgerhq/hw-transport": "~6.31.14",
|
|
24
|
+
"@ledgerhq/hw-transport-node-hid": "~6.29.15",
|
|
23
25
|
"@types/jest": "~30.0.0",
|
|
24
26
|
"date-fns": "~4.1.0",
|
|
25
27
|
"dotenv": "~17.2.2",
|