@cityofzion/bs-neo-legacy 0.9.3 → 0.10.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/CryptoCompareEDSNeoLegacy.d.ts +1 -1
- package/dist/CryptoCompareEDSNeoLegacy.js +16 -2
- package/dist/DoraBDSNeoLegacy.d.ts +1 -4
- package/dist/DoraBDSNeoLegacy.js +33 -17
- package/dist/DoraESNeoLegacy.d.ts +1 -1
- package/dist/DoraESNeoLegacy.js +17 -3
- package/package.json +6 -3
- package/.eslintignore +0 -13
- package/.eslintrc.cjs +0 -22
- package/.rush/temp/operation/build/all.log +0 -1
- package/.rush/temp/operation/build/state.json +0 -3
- package/.rush/temp/package-deps_build.json +0 -27
- package/.rush/temp/shrinkwrap-deps.json +0 -435
- package/CHANGELOG.json +0 -64
- package/CHANGELOG.md +0 -30
- package/bs-neo-legacy.build.log +0 -1
- package/jest.config.ts +0 -13
- package/jest.setup.ts +0 -1
- package/src/BSNeoLegacy.ts +0 -202
- package/src/CryptoCompareEDSNeoLegacy.ts +0 -50
- package/src/DoraBDSNeoLegacy.ts +0 -176
- package/src/DoraESNeoLegacy.ts +0 -18
- package/src/__tests__/BDSNeoLegacy.spec.ts +0 -123
- package/src/__tests__/BSNeoLegacy.spec.ts +0 -134
- package/src/__tests__/CryptoCompareExchange.spec.ts +0 -48
- package/src/__tests__/DoraESNeoLegacy.spec.ts +0 -15
- package/src/assets/tokens/common.json +0 -14
- package/src/assets/tokens/mainnet.json +0 -466
- package/src/constants.ts +0 -23
- package/src/index.ts +0 -4
- package/tsconfig.build.json +0 -4
- package/tsconfig.json +0 -14
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import { BSNeoLegacy } from '../BSNeoLegacy'
|
|
2
|
-
import { generateMnemonic } from '@cityofzion/bs-asteroid-sdk'
|
|
3
|
-
|
|
4
|
-
let bsNeoLegacy: BSNeoLegacy
|
|
5
|
-
|
|
6
|
-
describe('BSNeoLegacy', () => {
|
|
7
|
-
beforeEach(() => {
|
|
8
|
-
bsNeoLegacy = new BSNeoLegacy('neoLegacy', { type: 'testnet', url: 'http://seed5.ngd.network:20332' })
|
|
9
|
-
})
|
|
10
|
-
|
|
11
|
-
it('Should be able to validate an address', () => {
|
|
12
|
-
const validAddress = 'AJDZ8QP7ydjFicpcXCkG7wczeWEAKxpF69'
|
|
13
|
-
const invalidAddress = 'invalid address'
|
|
14
|
-
|
|
15
|
-
expect(bsNeoLegacy.validateAddress(validAddress)).toBeTruthy()
|
|
16
|
-
expect(bsNeoLegacy.validateAddress(invalidAddress)).toBeFalsy()
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
it('Should be able to validate an encrypted key', () => {
|
|
20
|
-
const validEncryptedKey = '6PYSsRjFn1v5uu79h5vXGZEYvvRkioHmd1Fd5bUyVp9Gt2wJcLKWHgD6Hy'
|
|
21
|
-
const invalidEncryptedKey = 'invalid encrypted key'
|
|
22
|
-
|
|
23
|
-
expect(bsNeoLegacy.validateEncrypted(validEncryptedKey)).toBeTruthy()
|
|
24
|
-
expect(bsNeoLegacy.validateEncrypted(invalidEncryptedKey)).toBeFalsy()
|
|
25
|
-
})
|
|
26
|
-
|
|
27
|
-
it('Should be able to validate a wif', () => {
|
|
28
|
-
const validWif = 'L4ZnhLegkFV9FTys1wBJDHUykn5hLnr15cPqvfuy4E1kzWTE6iRM'
|
|
29
|
-
const invalidWif = 'invalid wif'
|
|
30
|
-
|
|
31
|
-
expect(bsNeoLegacy.validateKey(validWif)).toBeTruthy()
|
|
32
|
-
expect(bsNeoLegacy.validateKey(invalidWif)).toBeFalsy()
|
|
33
|
-
})
|
|
34
|
-
|
|
35
|
-
it('Should be able to gererate a account from mnemonic', () => {
|
|
36
|
-
const mnemonic = generateMnemonic()
|
|
37
|
-
const account = bsNeoLegacy.generateAccountFromMnemonic(mnemonic, 0)
|
|
38
|
-
|
|
39
|
-
expect(bsNeoLegacy.validateAddress(account.address)).toBeTruthy()
|
|
40
|
-
expect(bsNeoLegacy.validateKey(account.key)).toBeTruthy()
|
|
41
|
-
})
|
|
42
|
-
|
|
43
|
-
it('Should be able to generate a account from wif', () => {
|
|
44
|
-
const mnemonic = generateMnemonic()
|
|
45
|
-
const account = bsNeoLegacy.generateAccountFromMnemonic(mnemonic, 0)
|
|
46
|
-
|
|
47
|
-
const accountFromWif = bsNeoLegacy.generateAccountFromKey(account.key)
|
|
48
|
-
expect(account).toEqual(expect.objectContaining(accountFromWif))
|
|
49
|
-
})
|
|
50
|
-
|
|
51
|
-
it('Should be able to decrypt a encrypted key', async () => {
|
|
52
|
-
const mnemonic = generateMnemonic()
|
|
53
|
-
const account = bsNeoLegacy.generateAccountFromMnemonic(mnemonic, 0)
|
|
54
|
-
const password = 'TestPassword'
|
|
55
|
-
const encryptedKey = await bsNeoLegacy.encrypt(account.key, password)
|
|
56
|
-
const decryptedAccount = await bsNeoLegacy.decrypt(encryptedKey, password)
|
|
57
|
-
expect(account).toEqual(expect.objectContaining(decryptedAccount))
|
|
58
|
-
}, 10000)
|
|
59
|
-
|
|
60
|
-
it('Should be able to encrypt a key', async () => {
|
|
61
|
-
const mnemonic = generateMnemonic()
|
|
62
|
-
const account = bsNeoLegacy.generateAccountFromMnemonic(mnemonic, 0)
|
|
63
|
-
const password = 'TestPassword'
|
|
64
|
-
const encryptedKey = await bsNeoLegacy.encrypt(account.key, password)
|
|
65
|
-
expect(encryptedKey).toEqual(expect.any(String))
|
|
66
|
-
})
|
|
67
|
-
|
|
68
|
-
it.skip('Should be able to transfer a native asset', async () => {
|
|
69
|
-
const account = bsNeoLegacy.generateAccountFromKey(process.env.TESTNET_PRIVATE_KEY as string)
|
|
70
|
-
const balance = await bsNeoLegacy.blockchainDataService.getBalance(account.address)
|
|
71
|
-
const gasBalance = balance.find(b => b.token.symbol === 'GAS')!
|
|
72
|
-
expect(Number(gasBalance?.amount)).toBeGreaterThan(0.00000001)
|
|
73
|
-
|
|
74
|
-
const transactionHash = await bsNeoLegacy.transfer({
|
|
75
|
-
senderAccount: account,
|
|
76
|
-
intent: {
|
|
77
|
-
amount: '0.00000001',
|
|
78
|
-
receiverAddress: 'AQEQdmCcitFbE6oJU5Epa7dNxhTkCmTZST',
|
|
79
|
-
tokenHash: gasBalance.token.hash,
|
|
80
|
-
tokenDecimals: gasBalance.token.decimals,
|
|
81
|
-
},
|
|
82
|
-
})
|
|
83
|
-
|
|
84
|
-
expect(transactionHash).toEqual(expect.any(String))
|
|
85
|
-
})
|
|
86
|
-
|
|
87
|
-
it.skip('Should be able to transfer a nep5 asset', async () => {
|
|
88
|
-
bsNeoLegacy.setNetwork({ type: 'mainnet', url: 'http://seed9.ngd.network:10332' })
|
|
89
|
-
const account = bsNeoLegacy.generateAccountFromKey(process.env.TESTNET_PRIVATE_KEY as string)
|
|
90
|
-
const balance = await bsNeoLegacy.blockchainDataService.getBalance(account.address)
|
|
91
|
-
const LXBalance = balance.find(item => item.token.symbol === 'LX')!
|
|
92
|
-
expect(Number(LXBalance?.amount)).toBeGreaterThan(0.00000001)
|
|
93
|
-
|
|
94
|
-
const transactionHash = await bsNeoLegacy.transfer({
|
|
95
|
-
senderAccount: account,
|
|
96
|
-
intent: {
|
|
97
|
-
amount: '0.00000001',
|
|
98
|
-
receiverAddress: 'AQEQdmCcitFbE6oJU5Epa7dNxhTkCmTZST',
|
|
99
|
-
tokenHash: LXBalance.token.hash,
|
|
100
|
-
tokenDecimals: LXBalance.token.decimals,
|
|
101
|
-
},
|
|
102
|
-
})
|
|
103
|
-
|
|
104
|
-
expect(transactionHash).toEqual(expect.any(String))
|
|
105
|
-
})
|
|
106
|
-
|
|
107
|
-
it.skip('Should be able to transfer a asset with tip', async () => {
|
|
108
|
-
bsNeoLegacy.setNetwork({ type: 'mainnet', url: 'http://seed9.ngd.network:10332' })
|
|
109
|
-
const account = bsNeoLegacy.generateAccountFromKey(process.env.TESTNET_PRIVATE_KEY as string)
|
|
110
|
-
const balance = await bsNeoLegacy.blockchainDataService.getBalance(account.address)
|
|
111
|
-
const LXBalance = balance.find(item => item.token.symbol === 'LX')!
|
|
112
|
-
expect(Number(LXBalance?.amount)).toBeGreaterThan(0.00000001)
|
|
113
|
-
const gasBalance = balance.find(item => item.token.symbol === bsNeoLegacy.feeToken.symbol)!
|
|
114
|
-
expect(Number(gasBalance?.amount)).toBeGreaterThan(0.00000001)
|
|
115
|
-
|
|
116
|
-
const transactionHash = await bsNeoLegacy.transfer({
|
|
117
|
-
senderAccount: account,
|
|
118
|
-
intent: {
|
|
119
|
-
amount: '0.00000001',
|
|
120
|
-
receiverAddress: 'AQEQdmCcitFbE6oJU5Epa7dNxhTkCmTZST',
|
|
121
|
-
tokenHash: LXBalance.token.hash,
|
|
122
|
-
tokenDecimals: LXBalance.token.decimals,
|
|
123
|
-
},
|
|
124
|
-
tipIntent: {
|
|
125
|
-
amount: '0.00000001',
|
|
126
|
-
receiverAddress: 'AQEQdmCcitFbE6oJU5Epa7dNxhTkCmTZST',
|
|
127
|
-
tokenHash: gasBalance.token.hash,
|
|
128
|
-
tokenDecimals: gasBalance.token.decimals,
|
|
129
|
-
},
|
|
130
|
-
})
|
|
131
|
-
|
|
132
|
-
expect(transactionHash).toEqual(expect.any(String))
|
|
133
|
-
})
|
|
134
|
-
})
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { CryptoCompareEDSNeoLegacy } from '../CryptoCompareEDSNeoLegacy'
|
|
2
|
-
|
|
3
|
-
let cryptoCompareEDSNeoLegacy: CryptoCompareEDSNeoLegacy
|
|
4
|
-
|
|
5
|
-
describe('FlamingoEDSNeo3', () => {
|
|
6
|
-
beforeAll(() => {
|
|
7
|
-
cryptoCompareEDSNeoLegacy = new CryptoCompareEDSNeoLegacy('mainnet')
|
|
8
|
-
})
|
|
9
|
-
|
|
10
|
-
it('Should return a list with prices of tokens using USD', async () => {
|
|
11
|
-
const tokenPriceList = await cryptoCompareEDSNeoLegacy.getTokenPrices('USD')
|
|
12
|
-
tokenPriceList.forEach(tokenPrice => {
|
|
13
|
-
expect(tokenPrice).toEqual({
|
|
14
|
-
price: expect.any(Number),
|
|
15
|
-
symbol: expect.any(String),
|
|
16
|
-
hash: expect.any(String),
|
|
17
|
-
})
|
|
18
|
-
})
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
it('Should return a list with prices of tokens using BRL', async () => {
|
|
22
|
-
const tokenPriceListInUSD = await cryptoCompareEDSNeoLegacy.getTokenPrices('USD')
|
|
23
|
-
const tokenPriceList = await cryptoCompareEDSNeoLegacy.getTokenPrices('BRL')
|
|
24
|
-
|
|
25
|
-
tokenPriceList.forEach((tokenPrice, index) => {
|
|
26
|
-
expect(tokenPrice.price).toBeGreaterThan(tokenPriceListInUSD[index].price)
|
|
27
|
-
expect(tokenPrice).toEqual({
|
|
28
|
-
price: expect.any(Number),
|
|
29
|
-
symbol: expect.any(String),
|
|
30
|
-
hash: expect.any(String),
|
|
31
|
-
})
|
|
32
|
-
})
|
|
33
|
-
})
|
|
34
|
-
|
|
35
|
-
it('Should return a list with prices of tokens using EUR', async () => {
|
|
36
|
-
const tokenPriceListInUSD = await cryptoCompareEDSNeoLegacy.getTokenPrices('USD')
|
|
37
|
-
const tokenPriceList = await cryptoCompareEDSNeoLegacy.getTokenPrices('EUR')
|
|
38
|
-
|
|
39
|
-
tokenPriceList.forEach((tokenPrice, index) => {
|
|
40
|
-
expect(tokenPrice.price).toBeLessThan(tokenPriceListInUSD[index].price)
|
|
41
|
-
expect(tokenPrice).toEqual({
|
|
42
|
-
price: expect.any(Number),
|
|
43
|
-
symbol: expect.any(String),
|
|
44
|
-
hash: expect.any(String),
|
|
45
|
-
})
|
|
46
|
-
})
|
|
47
|
-
})
|
|
48
|
-
})
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { DoraESNeoLegacy } from '../DoraESNeoLegacy'
|
|
2
|
-
|
|
3
|
-
let doraESNeoLegacy: DoraESNeoLegacy
|
|
4
|
-
|
|
5
|
-
describe('doraESNeoLegacy', () => {
|
|
6
|
-
beforeAll(() => {
|
|
7
|
-
doraESNeoLegacy = new DoraESNeoLegacy('mainnet')
|
|
8
|
-
})
|
|
9
|
-
it('Should return a transaction url', async () => {
|
|
10
|
-
const hash = '0x0cd2d834d910dcb74c19bbbb1c986a94e292e1160f0d9f138b97ac950a5ac700'
|
|
11
|
-
const url = doraESNeoLegacy.buildTransactionUrl(hash)
|
|
12
|
-
|
|
13
|
-
expect(url).toEqual(`https://dora.coz.io/transaction/neo2/mainnet/${hash}`)
|
|
14
|
-
})
|
|
15
|
-
})
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"symbol": "GAS",
|
|
4
|
-
"name": "GAS",
|
|
5
|
-
"hash": "602c79718b16e442de58778e148d0b1084e3b2dffd5de6b7b16cee7969282de7",
|
|
6
|
-
"decimals": 8
|
|
7
|
-
},
|
|
8
|
-
{
|
|
9
|
-
"symbol": "NEO",
|
|
10
|
-
"name": "NEO",
|
|
11
|
-
"hash": "c56f33fc6ecfcd0c225c4ab356fee59390af8560be0e930faebe74a6daff7c9b",
|
|
12
|
-
"decimals": 0
|
|
13
|
-
}
|
|
14
|
-
]
|
|
@@ -1,466 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"symbol": "ACAT",
|
|
4
|
-
"name": "ACAT Token",
|
|
5
|
-
"hash": "7f86d61ff377f1b12e589a5907152b57e2ad9a7a",
|
|
6
|
-
"decimals": 8
|
|
7
|
-
},
|
|
8
|
-
{
|
|
9
|
-
"symbol": "APH",
|
|
10
|
-
"name": "Aphelion",
|
|
11
|
-
"hash": "a0777c3ce2b169d4a23bcba4565e3225a0122d95",
|
|
12
|
-
"decimals": 8
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"symbol": "APT",
|
|
16
|
-
"name": "APPOSTOKEN",
|
|
17
|
-
"hash": "7cd338644833db2fd8824c410e364890d179e6f8",
|
|
18
|
-
"decimals": 8
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"symbol": "ASA",
|
|
22
|
-
"name": "Asura World Coin",
|
|
23
|
-
"hash": "a58b56b30425d3d1f8902034996fcac4168ef71d",
|
|
24
|
-
"decimals": 8
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"symbol": "AVA",
|
|
28
|
-
"cryptocompareSymbol": "AVALA",
|
|
29
|
-
"name": "Travala",
|
|
30
|
-
"hash": "de2ed49b691e76754c20fe619d891b78ef58e537",
|
|
31
|
-
"decimals": 8
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
"symbol": "BCS",
|
|
35
|
-
"name": "Block chain store",
|
|
36
|
-
"hash": "546c5872a992b2754ef327154f4c119baabff65f",
|
|
37
|
-
"decimals": 8
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"symbol": "BDN",
|
|
41
|
-
"name": "Business Data Network",
|
|
42
|
-
"hash": "d0394dd3ee1cdd8ae18665a22c7ca3af52aafd7a",
|
|
43
|
-
"decimals": 6
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
"symbol": "CGAS",
|
|
47
|
-
"name": "NEP5 GAS",
|
|
48
|
-
"hash": "74f2dc36a68fdc4682034178eb2220729231db76",
|
|
49
|
-
"decimals": 8
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
"symbol": "CGE",
|
|
53
|
-
"name": "Concierge Token",
|
|
54
|
-
"hash": "34579e4614ac1a7bd295372d3de8621770c76cdc",
|
|
55
|
-
"decimals": 8
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
"symbol": "SWTH (OLD)",
|
|
59
|
-
"name": "Switcheo Legacy V2",
|
|
60
|
-
"hash": "ab38352559b8b203bde5fddfa0b07d8b2525e132",
|
|
61
|
-
"decimals": 8
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"symbol": "CGL",
|
|
65
|
-
"name": "CrazyGladiator",
|
|
66
|
-
"hash": "cbbe4c3c0d2a3622e9e8d65fe9f6240078f356c9",
|
|
67
|
-
"decimals": 0
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"symbol": "CNEO",
|
|
71
|
-
"name": "NEP5 NEO",
|
|
72
|
-
"hash": "c074a05e9dcf0141cbe6b4b3475dd67baf4dcb60",
|
|
73
|
-
"decimals": 8
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
"symbol": "COUP",
|
|
77
|
-
"name": "Coupit",
|
|
78
|
-
"hash": "87d6c2ae68d6a6f411eb72232e75133b2ffc7142",
|
|
79
|
-
"decimals": 8
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
"symbol": "CPX",
|
|
83
|
-
"name": "CPX Token",
|
|
84
|
-
"hash": "45d493a6f73fa5f404244a5fb8472fc014ca5885",
|
|
85
|
-
"decimals": 8
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
"symbol": "DAD",
|
|
89
|
-
"name": "DAD",
|
|
90
|
-
"hash": "bb23c20466c21600b3e38a615c691d15ef251f9c",
|
|
91
|
-
"decimals": 8
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
"symbol": "DBC",
|
|
95
|
-
"name": "DeepBrain Coin",
|
|
96
|
-
"hash": "b951ecbbc5fe37a9c280a76cb0ce0014827294cf",
|
|
97
|
-
"decimals": 8
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
"symbol": "EDS",
|
|
101
|
-
"name": "Endorsit Shares",
|
|
102
|
-
"hash": "81c089ab996fc89c468a26c0a88d23ae2f34b5c0",
|
|
103
|
-
"decimals": 8
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
"symbol": "EFX",
|
|
107
|
-
"name": "Effect.AI Token",
|
|
108
|
-
"hash": "acbc532904b6b51b5ea6d19b803d78af70e7e6f9",
|
|
109
|
-
"decimals": 8
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
"symbol": "EPN",
|
|
113
|
-
"name": "Epiphany",
|
|
114
|
-
"hash": "a79cb7b4e85c8b23940d47bb3ddef76a5f13e449",
|
|
115
|
-
"decimals": 8
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
"symbol": "EXT",
|
|
119
|
-
"name": "Experience Token",
|
|
120
|
-
"hash": "e8f98440ad0d7a6e76d84fb1c3d3f8a16e162e97",
|
|
121
|
-
"decimals": 8
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
"symbol": "FLM",
|
|
125
|
-
"name": "Flamingo Finance",
|
|
126
|
-
"hash": "4d9eab13620fe3569ba3b0e56e2877739e4145e3",
|
|
127
|
-
"decimals": 8
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
"symbol": "FTW",
|
|
131
|
-
"name": "For The Win",
|
|
132
|
-
"hash": "11dbc2316f35ea031449387f615d9e4b0cbafe8b",
|
|
133
|
-
"decimals": 8
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
"symbol": "FTX",
|
|
137
|
-
"name": "For The Win X",
|
|
138
|
-
"hash": "aac66f9779ca67d819d05492805d251dab02fc7b",
|
|
139
|
-
"decimals": 8
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
"symbol": "GALA",
|
|
143
|
-
"name": "Galaxy Token",
|
|
144
|
-
"hash": "9577c3f972d769220d69d1c4ddbd617c44d067aa",
|
|
145
|
-
"decimals": 8
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
"symbol": "GDM",
|
|
149
|
-
"name": "Guardium",
|
|
150
|
-
"hash": "d1e37547d88bc9607ff9d73116ebd9381c156f79",
|
|
151
|
-
"decimals": 8
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
"symbol": "GTA",
|
|
155
|
-
"name": "GagaPay network token",
|
|
156
|
-
"hash": "06f4b1235f6300477d56b9a1f1de5b0172dfe103",
|
|
157
|
-
"decimals": 8
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
"symbol": "GUARD",
|
|
161
|
-
"name": "Guardium GUARD",
|
|
162
|
-
"hash": "591f92493cd6dd003470e41376f79a515abc707f",
|
|
163
|
-
"decimals": 8
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
"symbol": "IAM",
|
|
167
|
-
"name": "Bridge Token",
|
|
168
|
-
"hash": "891daf0e1750a1031ebe23030828ad7781d874d6",
|
|
169
|
-
"decimals": 8
|
|
170
|
-
},
|
|
171
|
-
{
|
|
172
|
-
"symbol": "JWT",
|
|
173
|
-
"name": "Jarvis+ World cup 2018 Token",
|
|
174
|
-
"hash": "b4cf9f4af5272d209b80ad1a06885e21568a4bfa",
|
|
175
|
-
"decimals": 8
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
"symbol": "LRN",
|
|
179
|
-
"name": "Loopring Neo Token",
|
|
180
|
-
"hash": "06fa8be9b6609d963e8fc63977b9f8dc5f10895f",
|
|
181
|
-
"decimals": 8
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
"symbol": "LX",
|
|
185
|
-
"name": "Moonlight Lux",
|
|
186
|
-
"hash": "cea5a3963a5813a26accc6bc67e9be9d14d395f0",
|
|
187
|
-
"decimals": 8
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
"symbol": "MCT",
|
|
191
|
-
"name": "Master Contract Token",
|
|
192
|
-
"hash": "a87cc2a513f5d8b4a42432343687c2127c60bc3f",
|
|
193
|
-
"decimals": 8
|
|
194
|
-
},
|
|
195
|
-
{
|
|
196
|
-
"symbol": "MRG",
|
|
197
|
-
"name": "merge",
|
|
198
|
-
"hash": "5a3973149608ddbc9b509fc951b3ff2c47419774",
|
|
199
|
-
"decimals": 8
|
|
200
|
-
},
|
|
201
|
-
{
|
|
202
|
-
"symbol": "MRW",
|
|
203
|
-
"name": "MirrorRoid World Coin",
|
|
204
|
-
"hash": "02f5f3c6e6bd07c8ff07ad779bb4f7bf9dc735e3",
|
|
205
|
-
"decimals": 8
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
"symbol": "NEX",
|
|
209
|
-
"name": "NEX Token",
|
|
210
|
-
"hash": "3a4acd3647086e7c44398aac0349802e6a171129",
|
|
211
|
-
"decimals": 8
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
"symbol": "NKN",
|
|
215
|
-
"name": "NKN",
|
|
216
|
-
"hash": "c36aee199dbba6c3f439983657558cfb67629599",
|
|
217
|
-
"decimals": 8
|
|
218
|
-
},
|
|
219
|
-
{
|
|
220
|
-
"symbol": "NNC",
|
|
221
|
-
"name": "NEO Name Credit",
|
|
222
|
-
"hash": "fc732edee1efdf968c23c20a9628eaa5a6ccb934",
|
|
223
|
-
"decimals": 2
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
"symbol": "NNN",
|
|
227
|
-
"name": "Novem Gold Token",
|
|
228
|
-
"hash": "53b7577befb37d4d3b95a02f60f5da8933ab5f04",
|
|
229
|
-
"decimals": 8
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
"symbol": "NOS",
|
|
233
|
-
"name": "nOS",
|
|
234
|
-
"hash": "c9c0fc5a2b66a29d6b14601e752e6e1a445e088d",
|
|
235
|
-
"decimals": 8
|
|
236
|
-
},
|
|
237
|
-
{
|
|
238
|
-
"symbol": "NRVE",
|
|
239
|
-
"name": "Narrative Token",
|
|
240
|
-
"hash": "a721d5893480260bd28ca1f395f2c465d0b5b1c2",
|
|
241
|
-
"decimals": 8
|
|
242
|
-
},
|
|
243
|
-
{
|
|
244
|
-
"symbol": "NVL",
|
|
245
|
-
"name": "Nevula Token",
|
|
246
|
-
"hash": "6c5fa71d1cfb37eb579458af8accd3128e6b1fca",
|
|
247
|
-
"decimals": 4
|
|
248
|
-
},
|
|
249
|
-
{
|
|
250
|
-
"symbol": "NVM",
|
|
251
|
-
"name": "Novem Token",
|
|
252
|
-
"hash": "2077a653306adb450516ea4813aebfbcdf594c97",
|
|
253
|
-
"decimals": 8
|
|
254
|
-
},
|
|
255
|
-
{
|
|
256
|
-
"symbol": "OBT",
|
|
257
|
-
"name": "Orbis",
|
|
258
|
-
"hash": "0e86a40588f715fcaf7acd1812d50af478e6e917",
|
|
259
|
-
"decimals": 8
|
|
260
|
-
},
|
|
261
|
-
{
|
|
262
|
-
"symbol": "ONT",
|
|
263
|
-
"name": "Ontology Token",
|
|
264
|
-
"hash": "ceab719b8baa2310f232ee0d277c061704541cfb",
|
|
265
|
-
"decimals": 8
|
|
266
|
-
},
|
|
267
|
-
{
|
|
268
|
-
"symbol": "PEGCNY",
|
|
269
|
-
"name": "FiatPeg CNY",
|
|
270
|
-
"hash": "dc054310dfdb455e58fea2b05d085924708065b8",
|
|
271
|
-
"decimals": 8
|
|
272
|
-
},
|
|
273
|
-
{
|
|
274
|
-
"symbol": "PEGUSD",
|
|
275
|
-
"name": "FiatPeg USD",
|
|
276
|
-
"hash": "ce150fa3ded336886871664e827f16fb70c45ceb",
|
|
277
|
-
"decimals": 8
|
|
278
|
-
},
|
|
279
|
-
{
|
|
280
|
-
"symbol": "PHX",
|
|
281
|
-
"name": "Red Pulse Phoenix Token",
|
|
282
|
-
"hash": "1578103c13e39df15d0d29826d957e85d770d8c9",
|
|
283
|
-
"decimals": 8
|
|
284
|
-
},
|
|
285
|
-
{
|
|
286
|
-
"symbol": "PKC",
|
|
287
|
-
"name": "Pikcio Token",
|
|
288
|
-
"hash": "af7c7328eee5a275a3bcaee2bf0cf662b5e739be",
|
|
289
|
-
"decimals": 8
|
|
290
|
-
},
|
|
291
|
-
{
|
|
292
|
-
"symbol": "PROQ",
|
|
293
|
-
"name": "Quarteria Token",
|
|
294
|
-
"hash": "2199c8dd506f73afddcbd6146c6271626931f735",
|
|
295
|
-
"decimals": 8
|
|
296
|
-
},
|
|
297
|
-
{
|
|
298
|
-
"symbol": "QLC",
|
|
299
|
-
"name": "Qlink Token",
|
|
300
|
-
"hash": "0d821bd7b6d53f5c2b40e217c6defc8bbe896cf5",
|
|
301
|
-
"decimals": 8
|
|
302
|
-
},
|
|
303
|
-
{
|
|
304
|
-
"symbol": "RCPT",
|
|
305
|
-
"name": "Recoupit",
|
|
306
|
-
"hash": "0dc27e3977160128c0dd6077a4b5a8b088eed151",
|
|
307
|
-
"decimals": 8
|
|
308
|
-
},
|
|
309
|
-
{
|
|
310
|
-
"symbol": "RHT",
|
|
311
|
-
"name": "Redeemable HashPuppy Token",
|
|
312
|
-
"hash": "2328008e6f6c7bd157a342e789389eb034d9cbc4",
|
|
313
|
-
"decimals": 0
|
|
314
|
-
},
|
|
315
|
-
{
|
|
316
|
-
"symbol": "RPX",
|
|
317
|
-
"name": "Red Pulse Token",
|
|
318
|
-
"hash": "ecc6b20d3ccac1ee9ef109af5a7cdb85706b1df9",
|
|
319
|
-
"decimals": 8
|
|
320
|
-
},
|
|
321
|
-
{
|
|
322
|
-
"symbol": "SCC",
|
|
323
|
-
"name": "Stem Cell Coin",
|
|
324
|
-
"hash": "323571cfc42a40d48d64832a7da594039fbac76a",
|
|
325
|
-
"decimals": 8
|
|
326
|
-
},
|
|
327
|
-
{
|
|
328
|
-
"symbol": "SDS",
|
|
329
|
-
"name": "Standards",
|
|
330
|
-
"hash": "6fad54d8cc692fc808fd97a207836a846c217705",
|
|
331
|
-
"decimals": 8
|
|
332
|
-
},
|
|
333
|
-
{
|
|
334
|
-
"symbol": "SDT",
|
|
335
|
-
"name": "Special Drawing Token",
|
|
336
|
-
"hash": "a4f408df2a1ec2a950ec5fd06d7b9dc5f83b9e73",
|
|
337
|
-
"decimals": 8
|
|
338
|
-
},
|
|
339
|
-
{
|
|
340
|
-
"symbol": "SENNO",
|
|
341
|
-
"name": "The Senno Token",
|
|
342
|
-
"hash": "d3526b437d65f8c12c902e14320abd440ad1f726",
|
|
343
|
-
"decimals": 8
|
|
344
|
-
},
|
|
345
|
-
{
|
|
346
|
-
"symbol": "SGAS",
|
|
347
|
-
"name": "NEP5.5 Coin With GAS 1:1",
|
|
348
|
-
"hash": "961e628cc93d61bf636dc0443cf0548947a50dbe",
|
|
349
|
-
"decimals": 8
|
|
350
|
-
},
|
|
351
|
-
{
|
|
352
|
-
"symbol": "SGT",
|
|
353
|
-
"name": "Safeguard Token",
|
|
354
|
-
"hash": "02728be64b898d1af733aa7f3f00f33b1b209dae",
|
|
355
|
-
"decimals": 8
|
|
356
|
-
},
|
|
357
|
-
{
|
|
358
|
-
"symbol": "SOUL",
|
|
359
|
-
"cryptocompareSymbol": "SOUL*",
|
|
360
|
-
"name": "Phantasma",
|
|
361
|
-
"hash": "ed07cffad18f1308db51920d99a2af60ac66a7b3",
|
|
362
|
-
"decimals": 8
|
|
363
|
-
},
|
|
364
|
-
{
|
|
365
|
-
"symbol": "SPOT",
|
|
366
|
-
"name": "Spotcoin",
|
|
367
|
-
"hash": "0a91cdc3c5ff89983c79e3c72e1ccd9e5beaa5d5",
|
|
368
|
-
"decimals": 8
|
|
369
|
-
},
|
|
370
|
-
{
|
|
371
|
-
"symbol": "SWH",
|
|
372
|
-
"name": "Switcheo",
|
|
373
|
-
"hash": "78e6d16b914fe15bc16150aeb11d0c2a8e532bdd",
|
|
374
|
-
"decimals": 8
|
|
375
|
-
},
|
|
376
|
-
{
|
|
377
|
-
"symbol": "THOR",
|
|
378
|
-
"name": "Thor Token",
|
|
379
|
-
"hash": "67a5086bac196b67d5fd20745b0dc9db4d2930ed",
|
|
380
|
-
"decimals": 8
|
|
381
|
-
},
|
|
382
|
-
{
|
|
383
|
-
"symbol": "TKY",
|
|
384
|
-
"name": "THEKEY Token",
|
|
385
|
-
"hash": "132947096727c84c7f9e076c90f08fec3bc17f18",
|
|
386
|
-
"decimals": 8
|
|
387
|
-
},
|
|
388
|
-
{
|
|
389
|
-
"symbol": "TMN",
|
|
390
|
-
"name": "TranslateMe Network Token",
|
|
391
|
-
"hash": "d613223fa138a1555ff711581982462acde209c5",
|
|
392
|
-
"decimals": 8
|
|
393
|
-
},
|
|
394
|
-
{
|
|
395
|
-
"symbol": "TNC",
|
|
396
|
-
"name": "Trinity Network Credit",
|
|
397
|
-
"hash": "08e8c4400f1af2c20c28e0018f29535eb85d15b6",
|
|
398
|
-
"decimals": 8
|
|
399
|
-
},
|
|
400
|
-
{
|
|
401
|
-
"symbol": "BRDG",
|
|
402
|
-
"name": "Bridge Protocol",
|
|
403
|
-
"hash": "bac0d143a547dc66a1d6a2b7d66b06de42614971",
|
|
404
|
-
"decimals": 8
|
|
405
|
-
},
|
|
406
|
-
{
|
|
407
|
-
"symbol": "UTD",
|
|
408
|
-
"name": "AIRDROP UNITED",
|
|
409
|
-
"hash": "8399031038683d2867fbe1ba06fb26965ccd1de0",
|
|
410
|
-
"decimals": 8
|
|
411
|
-
},
|
|
412
|
-
{
|
|
413
|
-
"symbol": "WANDN",
|
|
414
|
-
"name": "WAND NEO",
|
|
415
|
-
"hash": "7703bf394b5f884ebf57b9c6d22f106035e2c029",
|
|
416
|
-
"decimals": 8
|
|
417
|
-
},
|
|
418
|
-
{
|
|
419
|
-
"symbol": "WHT",
|
|
420
|
-
"name": "World Hideout Coin",
|
|
421
|
-
"hash": "25bd2b29636fed5945d26e1d03d279e1d9259320",
|
|
422
|
-
"decimals": 8
|
|
423
|
-
},
|
|
424
|
-
{
|
|
425
|
-
"symbol": "WWB",
|
|
426
|
-
"name": "Wowbit",
|
|
427
|
-
"hash": "40bb36a54bf28872b6ffdfa7fbc6480900e58448",
|
|
428
|
-
"decimals": 8
|
|
429
|
-
},
|
|
430
|
-
{
|
|
431
|
-
"symbol": "XQT",
|
|
432
|
-
"name": "Quarteria Token",
|
|
433
|
-
"hash": "7ac4a2bb052a047506f2f2d3d1528b89cc38e8d4",
|
|
434
|
-
"decimals": 8
|
|
435
|
-
},
|
|
436
|
-
{
|
|
437
|
-
"symbol": "XQTA",
|
|
438
|
-
"name": "Quarteria Token",
|
|
439
|
-
"hash": "6eca2c4bd2b3ed97b2aa41b26128a40ce2bd8d1a",
|
|
440
|
-
"decimals": 8
|
|
441
|
-
},
|
|
442
|
-
{
|
|
443
|
-
"symbol": "YEZ",
|
|
444
|
-
"name": "Yezcoin",
|
|
445
|
-
"hash": "b0036a6e8cf172146c7e71a3b53912556d5788e3",
|
|
446
|
-
"decimals": 8
|
|
447
|
-
},
|
|
448
|
-
{
|
|
449
|
-
"symbol": "LFX",
|
|
450
|
-
"name": "LIFEX",
|
|
451
|
-
"hash": "c54fc1e02a674ce2de52493b3138fb80ccff5a6e",
|
|
452
|
-
"decimals": 8
|
|
453
|
-
},
|
|
454
|
-
{
|
|
455
|
-
"symbol": "ZPT",
|
|
456
|
-
"name": "Zeepin Token",
|
|
457
|
-
"hash": "ac116d4b8d4ca55e6b6d4ecce2192039b51cccc5",
|
|
458
|
-
"decimals": 8
|
|
459
|
-
},
|
|
460
|
-
{
|
|
461
|
-
"symbol": "SWTH",
|
|
462
|
-
"name": "Switcheo V3",
|
|
463
|
-
"hash": "3e09e602eeeb401a2fec8e8ea137d59aae54a139",
|
|
464
|
-
"decimals": 8
|
|
465
|
-
}
|
|
466
|
-
]
|
package/src/constants.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { NetworkType, Token } from '@cityofzion/blockchain-service'
|
|
2
|
-
import commom from './assets/tokens/common.json'
|
|
3
|
-
import mainnet from './assets/tokens/mainnet.json'
|
|
4
|
-
|
|
5
|
-
export const TOKENS: Record<NetworkType, Token[]> = {
|
|
6
|
-
mainnet: [...commom, ...mainnet],
|
|
7
|
-
testnet: commom,
|
|
8
|
-
custom: commom,
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export const LEGACY_NETWORK_BY_NETWORK_TYPE: Record<Exclude<NetworkType, 'custom'>, string> = {
|
|
12
|
-
mainnet: 'MainNet',
|
|
13
|
-
testnet: 'TestNet',
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export const NATIVE_ASSETS = commom
|
|
17
|
-
|
|
18
|
-
export const DEFAULT_URL_BY_NETWORK_TYPE: Record<Exclude<NetworkType, 'custom'>, string> = {
|
|
19
|
-
mainnet: 'http://seed9.ngd.network:10332',
|
|
20
|
-
testnet: 'http://seed5.ngd.network:20332',
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export const DERIVATION_PATH = "m/44'/888'/0'/0/?"
|