@cityofzion/bs-ethereum 0.8.0 → 0.8.2

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.
Files changed (42) hide show
  1. package/.rush/temp/operation/build/all.log +1 -1
  2. package/.rush/temp/operation/build/state.json +1 -1
  3. package/.rush/temp/package-deps_build.json +4 -6
  4. package/.rush/temp/shrinkwrap-deps.json +2 -1
  5. package/bs-ethereum.build.log +1 -1
  6. package/dist/BSEthereum.d.ts +23 -23
  7. package/dist/BSEthereum.js +178 -178
  8. package/dist/BitqueryBDSEthereum.d.ts +14 -14
  9. package/dist/BitqueryBDSEthereum.js +197 -186
  10. package/dist/BitqueryEDSEthereum.d.ts +8 -8
  11. package/dist/BitqueryEDSEthereum.js +73 -73
  12. package/dist/GhostMarketNDSEthereum.d.ts +10 -10
  13. package/dist/GhostMarketNDSEthereum.js +77 -77
  14. package/dist/RpcBDSEthereum.d.ts +12 -12
  15. package/dist/RpcBDSEthereum.js +89 -89
  16. package/dist/assets/tokens/common.json +8 -8
  17. package/dist/constants.d.ts +16 -16
  18. package/dist/constants.js +33 -33
  19. package/dist/graphql.d.ts +124 -123
  20. package/dist/graphql.js +163 -162
  21. package/dist/index.d.ts +6 -6
  22. package/dist/index.js +22 -22
  23. package/jest.config.ts +13 -13
  24. package/jest.setup.ts +1 -1
  25. package/package.json +34 -34
  26. package/src/BSEthereum.ts +184 -184
  27. package/src/BitqueryBDSEthereum.ts +230 -220
  28. package/src/BitqueryEDSEthereum.ts +67 -67
  29. package/src/GhostMarketNDSEthereum.ts +122 -122
  30. package/src/RpcBDSEthereum.ts +88 -88
  31. package/src/__tests__/BDSEthereum.spec.ts +123 -123
  32. package/src/__tests__/BSEthereum.spec.ts +123 -123
  33. package/src/__tests__/BitqueryEDSEthereum.spec.ts +49 -49
  34. package/src/__tests__/GhostMarketNDSEthereum.spec.ts +45 -45
  35. package/src/assets/tokens/common.json +7 -7
  36. package/src/constants.ts +37 -37
  37. package/src/graphql.ts +291 -289
  38. package/src/index.ts +6 -6
  39. package/tsconfig.build.json +4 -4
  40. package/tsconfig.json +15 -15
  41. package/CHANGELOG.json +0 -22
  42. package/CHANGELOG.md +0 -11
@@ -1,123 +1,123 @@
1
- import { ethers } from 'ethers'
2
- import { BSEthereum } from '../BSEthereum'
3
- import { Account } from '@cityofzion/blockchain-service'
4
-
5
- let bsEthereum: BSEthereum
6
- let wallet: ethers.Wallet
7
- let account: Account
8
-
9
- describe('BSEthereum', () => {
10
- beforeAll(() => {
11
- bsEthereum = new BSEthereum('neo3', { type: 'testnet' })
12
- wallet = ethers.Wallet.createRandom()
13
- account = {
14
- key: wallet.privateKey,
15
- type: 'privateKey',
16
- address: wallet.address,
17
- }
18
- })
19
-
20
- it('Should be able to validate an address', () => {
21
- const validAddress = '0xD81a8F3c3f8b006Ef1ae4a2Fd28699AD7E3e21C5'
22
- const invalidAddress = 'invalid address'
23
-
24
- expect(bsEthereum.validateAddress(validAddress)).toBeTruthy()
25
- expect(bsEthereum.validateAddress(invalidAddress)).toBeFalsy()
26
- })
27
-
28
- it('Should be able to validate an encrypted key', async () => {
29
- const validEncryptedJson = await wallet.encrypt('password')
30
- const invalidEncryptedJson = '{ invalid: json }'
31
-
32
- expect(bsEthereum.validateEncrypted(validEncryptedJson)).toBeTruthy()
33
- expect(bsEthereum.validateEncrypted(invalidEncryptedJson)).toBeFalsy()
34
- })
35
-
36
- it('Should be able to validate a private key', () => {
37
- const validKey = wallet.privateKey
38
- const invalidKey = 'invalid key'
39
-
40
- expect(bsEthereum.validateKey(validKey)).toBeTruthy()
41
- expect(bsEthereum.validateKey(invalidKey)).toBeFalsy()
42
- })
43
-
44
- it('Should be able to validate an domain', () => {
45
- const validDomain = 'alice.eth'
46
- const invalidDomain = 'invalid domain'
47
-
48
- expect(bsEthereum.validateNameServiceDomainFormat(validDomain)).toBeTruthy()
49
- expect(bsEthereum.validateNameServiceDomainFormat(invalidDomain)).toBeFalsy()
50
- })
51
-
52
- it('Should be able to generate a account from mnemonic', () => {
53
- const account = bsEthereum.generateAccountFromMnemonic(wallet.mnemonic.phrase, 0)
54
-
55
- expect(bsEthereum.validateAddress(account.address)).toBeTruthy()
56
- expect(bsEthereum.validateKey(account.key)).toBeTruthy()
57
- })
58
-
59
- it('Should be able to generate a account from wif', () => {
60
- const accountFromWif = bsEthereum.generateAccountFromKey(wallet.privateKey)
61
- expect(accountFromWif).toEqual(account)
62
- })
63
-
64
- it('Should be able to decrypt a encrypted key', async () => {
65
- const password = 'TestPassword'
66
- const validEncryptedJson = await wallet.encrypt(password)
67
- const decryptedAccount = await bsEthereum.decrypt(validEncryptedJson, password)
68
- expect(decryptedAccount).toEqual(account)
69
- })
70
-
71
- it.skip('Should be able to calculate transfer fee', async () => {
72
- const account = bsEthereum.generateAccountFromKey(process.env.TESTNET_PRIVATE_KEY as string)
73
-
74
- const fee = await bsEthereum.calculateTransferFee({
75
- senderAccount: account,
76
- intent: {
77
- amount: '0.1',
78
- receiverAddress: '0xFACf5446B71dB33E920aB1769d9427146183aEcd',
79
- tokenDecimals: 18,
80
- tokenHash: '0xBA62BCfcAaFc6622853cca2BE6Ac7d845BC0f2Dc',
81
- },
82
- })
83
-
84
- expect(fee).toEqual(expect.any(Number))
85
- })
86
-
87
- it.skip('Should be able to transfer a native token', async () => {
88
- const account = bsEthereum.generateAccountFromKey(process.env.TESTNET_PRIVATE_KEY as string)
89
-
90
- const transactionHash = await bsEthereum.transfer({
91
- senderAccount: account,
92
- intent: {
93
- amount: '0.00000001',
94
- receiverAddress: '0xFACf5446B71dB33E920aB1769d9427146183aEcd',
95
- tokenDecimals: 18,
96
- tokenHash: '-',
97
- },
98
- })
99
-
100
- expect(transactionHash).toEqual(expect.any(String))
101
- }, 50000)
102
-
103
- it.skip('Should be able to transfer a ERC20 token', async () => {
104
- const account = bsEthereum.generateAccountFromKey(process.env.TESTNET_PRIVATE_KEY as string)
105
-
106
- const transactionHash = await bsEthereum.transfer({
107
- senderAccount: account,
108
- intent: {
109
- amount: '0.00000001',
110
- receiverAddress: '0xFACf5446B71dB33E920aB1769d9427146183aEcd',
111
- tokenDecimals: 18,
112
- tokenHash: '0xba62bcfcaafc6622853cca2be6ac7d845bc0f2dc',
113
- },
114
- })
115
-
116
- expect(transactionHash).toEqual(expect.any(String))
117
- }, 50000)
118
-
119
- it('Should be able to resolve a name service domain', async () => {
120
- const address = await bsEthereum.resolveNameServiceDomain('alice.eth')
121
- expect(address).toEqual('0xa974890156A3649A23a6C0f2ebd77D6F7A7333d4')
122
- }, 10000)
123
- })
1
+ import { ethers } from 'ethers'
2
+ import { BSEthereum } from '../BSEthereum'
3
+ import { Account } from '@cityofzion/blockchain-service'
4
+
5
+ let bsEthereum: BSEthereum
6
+ let wallet: ethers.Wallet
7
+ let account: Account
8
+
9
+ describe('BSEthereum', () => {
10
+ beforeAll(() => {
11
+ bsEthereum = new BSEthereum('neo3', { type: 'testnet' })
12
+ wallet = ethers.Wallet.createRandom()
13
+ account = {
14
+ key: wallet.privateKey,
15
+ type: 'privateKey',
16
+ address: wallet.address,
17
+ }
18
+ })
19
+
20
+ it('Should be able to validate an address', () => {
21
+ const validAddress = '0xD81a8F3c3f8b006Ef1ae4a2Fd28699AD7E3e21C5'
22
+ const invalidAddress = 'invalid address'
23
+
24
+ expect(bsEthereum.validateAddress(validAddress)).toBeTruthy()
25
+ expect(bsEthereum.validateAddress(invalidAddress)).toBeFalsy()
26
+ })
27
+
28
+ it('Should be able to validate an encrypted key', async () => {
29
+ const validEncryptedJson = await wallet.encrypt('password')
30
+ const invalidEncryptedJson = '{ invalid: json }'
31
+
32
+ expect(bsEthereum.validateEncrypted(validEncryptedJson)).toBeTruthy()
33
+ expect(bsEthereum.validateEncrypted(invalidEncryptedJson)).toBeFalsy()
34
+ })
35
+
36
+ it('Should be able to validate a private key', () => {
37
+ const validKey = wallet.privateKey
38
+ const invalidKey = 'invalid key'
39
+
40
+ expect(bsEthereum.validateKey(validKey)).toBeTruthy()
41
+ expect(bsEthereum.validateKey(invalidKey)).toBeFalsy()
42
+ })
43
+
44
+ it('Should be able to validate an domain', () => {
45
+ const validDomain = 'alice.eth'
46
+ const invalidDomain = 'invalid domain'
47
+
48
+ expect(bsEthereum.validateNameServiceDomainFormat(validDomain)).toBeTruthy()
49
+ expect(bsEthereum.validateNameServiceDomainFormat(invalidDomain)).toBeFalsy()
50
+ })
51
+
52
+ it('Should be able to generate a account from mnemonic', () => {
53
+ const account = bsEthereum.generateAccountFromMnemonic(wallet.mnemonic.phrase, 0)
54
+
55
+ expect(bsEthereum.validateAddress(account.address)).toBeTruthy()
56
+ expect(bsEthereum.validateKey(account.key)).toBeTruthy()
57
+ })
58
+
59
+ it('Should be able to generate a account from wif', () => {
60
+ const accountFromWif = bsEthereum.generateAccountFromKey(wallet.privateKey)
61
+ expect(accountFromWif).toEqual(account)
62
+ })
63
+
64
+ it('Should be able to decrypt a encrypted key', async () => {
65
+ const password = 'TestPassword'
66
+ const validEncryptedJson = await wallet.encrypt(password)
67
+ const decryptedAccount = await bsEthereum.decrypt(validEncryptedJson, password)
68
+ expect(decryptedAccount).toEqual(account)
69
+ })
70
+
71
+ it.skip('Should be able to calculate transfer fee', async () => {
72
+ const account = bsEthereum.generateAccountFromKey(process.env.TESTNET_PRIVATE_KEY as string)
73
+
74
+ const fee = await bsEthereum.calculateTransferFee({
75
+ senderAccount: account,
76
+ intent: {
77
+ amount: '0.1',
78
+ receiverAddress: '0xFACf5446B71dB33E920aB1769d9427146183aEcd',
79
+ tokenDecimals: 18,
80
+ tokenHash: '0xBA62BCfcAaFc6622853cca2BE6Ac7d845BC0f2Dc',
81
+ },
82
+ })
83
+
84
+ expect(fee).toEqual(expect.any(Number))
85
+ })
86
+
87
+ it.skip('Should be able to transfer a native token', async () => {
88
+ const account = bsEthereum.generateAccountFromKey(process.env.TESTNET_PRIVATE_KEY as string)
89
+
90
+ const transactionHash = await bsEthereum.transfer({
91
+ senderAccount: account,
92
+ intent: {
93
+ amount: '0.00000001',
94
+ receiverAddress: '0xFACf5446B71dB33E920aB1769d9427146183aEcd',
95
+ tokenDecimals: 18,
96
+ tokenHash: '-',
97
+ },
98
+ })
99
+
100
+ expect(transactionHash).toEqual(expect.any(String))
101
+ }, 50000)
102
+
103
+ it.skip('Should be able to transfer a ERC20 token', async () => {
104
+ const account = bsEthereum.generateAccountFromKey(process.env.TESTNET_PRIVATE_KEY as string)
105
+
106
+ const transactionHash = await bsEthereum.transfer({
107
+ senderAccount: account,
108
+ intent: {
109
+ amount: '0.00000001',
110
+ receiverAddress: '0xFACf5446B71dB33E920aB1769d9427146183aEcd',
111
+ tokenDecimals: 18,
112
+ tokenHash: '0xba62bcfcaafc6622853cca2be6ac7d845bc0f2dc',
113
+ },
114
+ })
115
+
116
+ expect(transactionHash).toEqual(expect.any(String))
117
+ }, 50000)
118
+
119
+ it('Should be able to resolve a name service domain', async () => {
120
+ const address = await bsEthereum.resolveNameServiceDomain('alice.eth')
121
+ expect(address).toEqual('0xa974890156A3649A23a6C0f2ebd77D6F7A7333d4')
122
+ }, 10000)
123
+ })
@@ -1,49 +1,49 @@
1
- import { BitqueryEDSEthereum } from '../BitqueryEDSEthereum'
2
-
3
- let bitqueryEDSEthereum: BitqueryEDSEthereum
4
-
5
- describe('FlamingoEDSNeo3', () => {
6
- beforeAll(() => {
7
- bitqueryEDSEthereum = new BitqueryEDSEthereum('mainnet')
8
- })
9
-
10
- it('Should return a list with prices of tokens using USD', async () => {
11
- const tokenPriceList = await bitqueryEDSEthereum.getTokenPrices('USD')
12
-
13
- tokenPriceList.forEach(tokenPrice => {
14
- expect(tokenPrice).toEqual({
15
- price: expect.any(Number),
16
- symbol: expect.any(String),
17
- hash: expect.any(String),
18
- })
19
- })
20
- })
21
-
22
- it('Should return a list with prices of tokens using BRL', async () => {
23
- const tokenPriceListInUSD = await bitqueryEDSEthereum.getTokenPrices('USD')
24
- const tokenPriceList = await bitqueryEDSEthereum.getTokenPrices('BRL')
25
-
26
- tokenPriceList.forEach((tokenPrice, index) => {
27
- expect(tokenPrice.price).toBeGreaterThan(tokenPriceListInUSD[index].price)
28
- expect(tokenPrice).toEqual({
29
- price: expect.any(Number),
30
- symbol: expect.any(String),
31
- hash: expect.any(String),
32
- })
33
- })
34
- })
35
-
36
- it('Should return a list with prices of tokens using EUR', async () => {
37
- const tokenPriceListInUSD = await bitqueryEDSEthereum.getTokenPrices('USD')
38
- const tokenPriceList = await bitqueryEDSEthereum.getTokenPrices('EUR')
39
-
40
- tokenPriceList.forEach((tokenPrice, index) => {
41
- expect(tokenPrice.price).toBeLessThan(tokenPriceListInUSD[index].price)
42
- expect(tokenPrice).toEqual({
43
- price: expect.any(Number),
44
- symbol: expect.any(String),
45
- hash: expect.any(String),
46
- })
47
- })
48
- })
49
- })
1
+ import { BitqueryEDSEthereum } from '../BitqueryEDSEthereum'
2
+
3
+ let bitqueryEDSEthereum: BitqueryEDSEthereum
4
+
5
+ describe('FlamingoEDSNeo3', () => {
6
+ beforeAll(() => {
7
+ bitqueryEDSEthereum = new BitqueryEDSEthereum('mainnet')
8
+ })
9
+
10
+ it('Should return a list with prices of tokens using USD', async () => {
11
+ const tokenPriceList = await bitqueryEDSEthereum.getTokenPrices('USD')
12
+
13
+ tokenPriceList.forEach(tokenPrice => {
14
+ expect(tokenPrice).toEqual({
15
+ price: expect.any(Number),
16
+ symbol: expect.any(String),
17
+ hash: expect.any(String),
18
+ })
19
+ })
20
+ })
21
+
22
+ it('Should return a list with prices of tokens using BRL', async () => {
23
+ const tokenPriceListInUSD = await bitqueryEDSEthereum.getTokenPrices('USD')
24
+ const tokenPriceList = await bitqueryEDSEthereum.getTokenPrices('BRL')
25
+
26
+ tokenPriceList.forEach((tokenPrice, index) => {
27
+ expect(tokenPrice.price).toBeGreaterThan(tokenPriceListInUSD[index].price)
28
+ expect(tokenPrice).toEqual({
29
+ price: expect.any(Number),
30
+ symbol: expect.any(String),
31
+ hash: expect.any(String),
32
+ })
33
+ })
34
+ })
35
+
36
+ it('Should return a list with prices of tokens using EUR', async () => {
37
+ const tokenPriceListInUSD = await bitqueryEDSEthereum.getTokenPrices('USD')
38
+ const tokenPriceList = await bitqueryEDSEthereum.getTokenPrices('EUR')
39
+
40
+ tokenPriceList.forEach((tokenPrice, index) => {
41
+ expect(tokenPrice.price).toBeLessThan(tokenPriceListInUSD[index].price)
42
+ expect(tokenPrice).toEqual({
43
+ price: expect.any(Number),
44
+ symbol: expect.any(String),
45
+ hash: expect.any(String),
46
+ })
47
+ })
48
+ })
49
+ })
@@ -1,45 +1,45 @@
1
- import { GhostMarketNDSEthereum } from '../GhostMarketNDSEthereum'
2
-
3
- let ghostMarketNDSEthereum: GhostMarketNDSEthereum
4
-
5
- describe('GhostMarketNDSEthereum', () => {
6
- beforeAll(() => {
7
- ghostMarketNDSEthereum = new GhostMarketNDSEthereum('mainnet')
8
- })
9
-
10
- it('Get NFT', async () => {
11
- const nft = await ghostMarketNDSEthereum.getNft({
12
- contractHash: '0xeb3a9a839dfeeaf71db1b4ed6a8ae0ccb171b227',
13
- tokenId: '379',
14
- })
15
-
16
- expect(nft).toEqual(
17
- expect.objectContaining({
18
- id: '379',
19
- contractHash: '0xeb3a9a839dfeeaf71db1b4ed6a8ae0ccb171b227',
20
- symbol: 'MOAR',
21
- collectionImage: expect.any(String),
22
- collectionName: '"MOAR" by Joan Cornella',
23
- image: expect.any(String),
24
- isSVG: expect.any(Boolean),
25
- name: 'MOAR #379',
26
- })
27
- )
28
- })
29
-
30
- it('Get NFTS by address', async () => {
31
- const nfts = await ghostMarketNDSEthereum.getNftsByAddress({
32
- address: '0xd773c81a4a855556ce2f2372b12272710b95b26c',
33
- })
34
- expect(nfts.items.length).toBeGreaterThan(0)
35
- nfts.items.forEach(nft => {
36
- expect(nft).toEqual(
37
- expect.objectContaining({
38
- symbol: expect.any(String),
39
- id: expect.any(String),
40
- contractHash: expect.any(String),
41
- })
42
- )
43
- })
44
- })
45
- })
1
+ import { GhostMarketNDSEthereum } from '../GhostMarketNDSEthereum'
2
+
3
+ let ghostMarketNDSEthereum: GhostMarketNDSEthereum
4
+
5
+ describe('GhostMarketNDSEthereum', () => {
6
+ beforeAll(() => {
7
+ ghostMarketNDSEthereum = new GhostMarketNDSEthereum('mainnet')
8
+ })
9
+
10
+ it('Get NFT', async () => {
11
+ const nft = await ghostMarketNDSEthereum.getNft({
12
+ contractHash: '0xeb3a9a839dfeeaf71db1b4ed6a8ae0ccb171b227',
13
+ tokenId: '379',
14
+ })
15
+
16
+ expect(nft).toEqual(
17
+ expect.objectContaining({
18
+ id: '379',
19
+ contractHash: '0xeb3a9a839dfeeaf71db1b4ed6a8ae0ccb171b227',
20
+ symbol: 'MOAR',
21
+ collectionImage: expect.any(String),
22
+ collectionName: '"MOAR" by Joan Cornella',
23
+ image: expect.any(String),
24
+ isSVG: expect.any(Boolean),
25
+ name: 'MOAR #379',
26
+ })
27
+ )
28
+ })
29
+
30
+ it('Get NFTS by address', async () => {
31
+ const nfts = await ghostMarketNDSEthereum.getNftsByAddress({
32
+ address: '0xd773c81a4a855556ce2f2372b12272710b95b26c',
33
+ })
34
+ expect(nfts.items.length).toBeGreaterThan(0)
35
+ nfts.items.forEach(nft => {
36
+ expect(nft).toEqual(
37
+ expect.objectContaining({
38
+ symbol: expect.any(String),
39
+ id: expect.any(String),
40
+ contractHash: expect.any(String),
41
+ })
42
+ )
43
+ })
44
+ })
45
+ })
@@ -1,8 +1,8 @@
1
- [
2
- {
3
- "symbol": "ETH",
4
- "name": "Ethereum",
5
- "hash": "-",
6
- "decimals": 16
7
- }
1
+ [
2
+ {
3
+ "symbol": "ETH",
4
+ "name": "Ethereum",
5
+ "hash": "-",
6
+ "decimals": 16
7
+ }
8
8
  ]
package/src/constants.ts CHANGED
@@ -1,37 +1,37 @@
1
- import { NetworkType, Token } from '@cityofzion/blockchain-service'
2
- import commom from './assets/tokens/common.json'
3
-
4
- export type BitqueryNetwork = 'ethereum' | 'goerli'
5
-
6
- export const TOKENS: Record<NetworkType, Token[]> = {
7
- mainnet: [...commom],
8
- testnet: commom,
9
- custom: commom,
10
- }
11
-
12
- export const NATIVE_ASSETS = commom
13
-
14
- export const DEFAULT_URL_BY_NETWORK_TYPE: Record<NetworkType, string> = {
15
- mainnet: 'https://ethereum-mainnet-rpc.allthatnode.com',
16
- testnet: 'https://ethereum-goerli-rpc.allthatnode.com',
17
- custom: 'http://127.0.0.1:8545',
18
- }
19
-
20
- export const BITQUERY_API_KEY = 'BQYMp76Ny15C8ORbI2BOstFUhoMCahLI'
21
- export const BITQUERY_URL = 'https://graphql.bitquery.io'
22
- export const BITQUERY_NETWORK_BY_NETWORK_TYPE: Record<Exclude<NetworkType, 'custom'>, BitqueryNetwork> = {
23
- mainnet: 'ethereum',
24
- testnet: 'goerli',
25
- }
26
-
27
- export const GHOSTMARKET_URL_BY_NETWORK_TYPE: Partial<Record<NetworkType, string>> = {
28
- mainnet: 'https://api.ghostmarket.io/api/v2',
29
- testnet: 'https://api-testnet.ghostmarket.io/api/v2',
30
- }
31
-
32
- export const GHOSTMARKET_CHAIN_BY_NETWORK_TYPE: Partial<Record<NetworkType, string>> = {
33
- mainnet: 'eth',
34
- testnet: 'etht',
35
- }
36
-
37
- export const DERIVATION_PATH = "m/44'/60'/0'/0/?"
1
+ import { NetworkType, Token } from '@cityofzion/blockchain-service'
2
+ import commom from './assets/tokens/common.json'
3
+
4
+ export type BitqueryNetwork = 'ethereum' | 'goerli'
5
+
6
+ export const TOKENS: Record<NetworkType, Token[]> = {
7
+ mainnet: [...commom],
8
+ testnet: commom,
9
+ custom: commom,
10
+ }
11
+
12
+ export const NATIVE_ASSETS = commom
13
+
14
+ export const DEFAULT_URL_BY_NETWORK_TYPE: Record<NetworkType, string> = {
15
+ mainnet: 'https://ethereum-mainnet-rpc.allthatnode.com',
16
+ testnet: 'https://ethereum-goerli-rpc.allthatnode.com',
17
+ custom: 'http://127.0.0.1:8545',
18
+ }
19
+
20
+ export const BITQUERY_API_KEY = 'BQYMp76Ny15C8ORbI2BOstFUhoMCahLI'
21
+ export const BITQUERY_URL = 'https://graphql.bitquery.io'
22
+ export const BITQUERY_NETWORK_BY_NETWORK_TYPE: Record<Exclude<NetworkType, 'custom'>, BitqueryNetwork> = {
23
+ mainnet: 'ethereum',
24
+ testnet: 'goerli',
25
+ }
26
+
27
+ export const GHOSTMARKET_URL_BY_NETWORK_TYPE: Partial<Record<NetworkType, string>> = {
28
+ mainnet: 'https://api.ghostmarket.io/api/v2',
29
+ testnet: 'https://api-testnet.ghostmarket.io/api/v2',
30
+ }
31
+
32
+ export const GHOSTMARKET_CHAIN_BY_NETWORK_TYPE: Partial<Record<NetworkType, string>> = {
33
+ mainnet: 'eth',
34
+ testnet: 'etht',
35
+ }
36
+
37
+ export const DERIVATION_PATH = "m/44'/60'/0'/0/?"