edge-currency-accountbased 0.7.72
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/CHANGELOG.md +713 -0
- package/LICENSE +29 -0
- package/README.md +63 -0
- package/index.js +3 -0
- package/lib/binance/bnbEngine.js +591 -0
- package/lib/binance/bnbInfo.js +43 -0
- package/lib/binance/bnbPlugin.js +168 -0
- package/lib/binance/bnbSchema.js +83 -0
- package/lib/binance/bnbTypes.js +39 -0
- package/lib/common/engine.js +918 -0
- package/lib/common/plugin.js +152 -0
- package/lib/common/schema.js +108 -0
- package/lib/common/types.js +85 -0
- package/lib/common/utils.js +378 -0
- package/lib/eos/eosEngine.js +1216 -0
- package/lib/eos/eosInfo.js +98 -0
- package/lib/eos/eosPlugin.js +314 -0
- package/lib/eos/eosSchema.js +190 -0
- package/lib/eos/eosTypes.js +88 -0
- package/lib/eos/telosInfo.js +94 -0
- package/lib/eos/waxInfo.js +95 -0
- package/lib/ethereum/etcInfo.js +121 -0
- package/lib/ethereum/ethEngine.js +832 -0
- package/lib/ethereum/ethInfo.js +1300 -0
- package/lib/ethereum/ethMiningFees.js +157 -0
- package/lib/ethereum/ethNetwork.js +2195 -0
- package/lib/ethereum/ethPlugin.js +377 -0
- package/lib/ethereum/ethSchema.js +61 -0
- package/lib/ethereum/ethTypes.js +461 -0
- package/lib/ethereum/ftminfo.js +102 -0
- package/lib/ethereum/rskInfo.js +101 -0
- package/lib/fio/fioConst.js +38 -0
- package/lib/fio/fioEngine.js +1250 -0
- package/lib/fio/fioError.js +38 -0
- package/lib/fio/fioInfo.js +72 -0
- package/lib/fio/fioPlugin.js +486 -0
- package/lib/fio/fioSchema.js +56 -0
- package/lib/index.js +44 -0
- package/lib/pluginError.js +32 -0
- package/lib/react-native/edge-currency-accountbased.js +239635 -0
- package/lib/react-native/edge-currency-accountbased.js.map +1 -0
- package/lib/react-native-io.js +41 -0
- package/lib/stellar/stellarEngine.js +563 -0
- package/lib/stellar/stellarInfo.js +37 -0
- package/lib/stellar/stellarPlugin.js +215 -0
- package/lib/stellar/stellarSchema.js +54 -0
- package/lib/stellar/stellarTypes.js +66 -0
- package/lib/tezos/tezosEngine.js +497 -0
- package/lib/tezos/tezosInfo.js +60 -0
- package/lib/tezos/tezosPlugin.js +174 -0
- package/lib/tezos/tezosTypes.js +110 -0
- package/lib/xrp/xrpEngine.js +583 -0
- package/lib/xrp/xrpInfo.js +47 -0
- package/lib/xrp/xrpPlugin.js +229 -0
- package/lib/xrp/xrpSchema.js +74 -0
- package/lib/xrp/xrpTypes.js +38 -0
- package/package.json +139 -0
- package/postinstall.sh +7 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
import { makeEosBasedPluginInner } from './eosPlugin'
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
// ----TELOS MAIN NET----
|
|
16
|
+
export const eosJsConfig = {
|
|
17
|
+
chainId: '4667b205c6838ef70ff7988f6e8257e8be0e1284a2f59699054a018f743b1d11', // Telos main net
|
|
18
|
+
keyProvider: [],
|
|
19
|
+
httpEndpoint: '', // main net
|
|
20
|
+
fetch: fetch,
|
|
21
|
+
verbose: false // verbose logging such as API activity
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const denominations = [
|
|
25
|
+
{
|
|
26
|
+
name: 'TLOS',
|
|
27
|
+
multiplier: '10000',
|
|
28
|
+
symbol: 'T'
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
const otherSettings = {
|
|
33
|
+
eosActivationServers: [
|
|
34
|
+
'https://eospay.edge.app',
|
|
35
|
+
'https://account.teloscrew.com'
|
|
36
|
+
],
|
|
37
|
+
// used for the following routines, is Hyperion v2:
|
|
38
|
+
|
|
39
|
+
// getIncomingTransactions
|
|
40
|
+
// `/v2/history/get_transfers?to=${acct}&symbol=${currencyCode}&skip=${skip}&limit=${limit}&sort=desc`
|
|
41
|
+
|
|
42
|
+
// getOutgoingTransactions
|
|
43
|
+
// `/v2/history/get_actions?transfer.from=${acct}&transfer.symbol=${currencyCode}&skip=${skip}&limit=${limit}&sort=desc`
|
|
44
|
+
|
|
45
|
+
// getKeyAccounts
|
|
46
|
+
// `${server}/v2/state/get_key_accounts?public_key=${params[0]}`
|
|
47
|
+
|
|
48
|
+
eosHyperionNodes: ['https://telos.caleos.io'],
|
|
49
|
+
|
|
50
|
+
// used for eosjs fetch routines
|
|
51
|
+
// getCurrencyBalance
|
|
52
|
+
// getInfo
|
|
53
|
+
// transaction
|
|
54
|
+
eosNodes: ['https://telos.caleos.io'],
|
|
55
|
+
eosFuelServers: [], // this will need to be fixed
|
|
56
|
+
eosDfuseServers: [],
|
|
57
|
+
uriProtocol: 'telos'
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const defaultSettings = {
|
|
61
|
+
otherSettings
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export const telosCurrencyInfo = {
|
|
65
|
+
// Basic currency information:
|
|
66
|
+
currencyCode: 'TLOS',
|
|
67
|
+
displayName: 'Telos',
|
|
68
|
+
pluginId: 'telos',
|
|
69
|
+
pluginName: 'telos',
|
|
70
|
+
// do we need plugin name?
|
|
71
|
+
walletType: 'wallet:telos',
|
|
72
|
+
|
|
73
|
+
defaultSettings,
|
|
74
|
+
|
|
75
|
+
addressExplorer: 'https://telos.bloks.io/account/%s',
|
|
76
|
+
transactionExplorer: 'https://telos.bloks.io/transaction/%s',
|
|
77
|
+
|
|
78
|
+
denominations,
|
|
79
|
+
metaTokens: [
|
|
80
|
+
{
|
|
81
|
+
name: 'TLOS',
|
|
82
|
+
currencyName: 'TLOS',
|
|
83
|
+
multiplier: '10000',
|
|
84
|
+
symbol: 'T',
|
|
85
|
+
currencyCode: 'TLOS',
|
|
86
|
+
contractAddress: 'eosio.token',
|
|
87
|
+
denominations
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export const makeTelosPlugin = (opts) => {
|
|
93
|
+
return makeEosBasedPluginInner(opts, telosCurrencyInfo, eosJsConfig)
|
|
94
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
import { makeEosBasedPluginInner } from './eosPlugin'
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
const denominations = [
|
|
16
|
+
// An array of Objects of the possible denominations for this currency
|
|
17
|
+
{
|
|
18
|
+
name: 'WAX',
|
|
19
|
+
multiplier: '100000000',
|
|
20
|
+
symbol: 'W'
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
// ----WAX MAIN NET----
|
|
25
|
+
export const eosJsConfig = {
|
|
26
|
+
chainId: '1064487b3cd1a897ce03ae5b6a865651747e2e152090f99c1d19d44e01aea5a4', // Wax main net
|
|
27
|
+
keyProvider: [],
|
|
28
|
+
httpEndpoint: '', // main net
|
|
29
|
+
fetch: fetch,
|
|
30
|
+
verbose: false // verbose logging such as API activity
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const otherSettings = {
|
|
34
|
+
eosActivationServers: [],
|
|
35
|
+
// used for the following routines, is Hyperion v2:
|
|
36
|
+
|
|
37
|
+
// getIncomingTransactions
|
|
38
|
+
// `/v2/history/get_transfers?to=${acct}&symbol=${currencyCode}&skip=${skip}&limit=${limit}&sort=desc`
|
|
39
|
+
|
|
40
|
+
// getOutgoingTransactions
|
|
41
|
+
// `/v2/history/get_actions?transfer.from=${acct}&transfer.symbol=${currencyCode}&skip=${skip}&limit=${limit}&sort=desc`
|
|
42
|
+
|
|
43
|
+
// getKeyAccounts
|
|
44
|
+
// `${server}/v2/state/get_key_accounts?public_key=${params[0]}`
|
|
45
|
+
|
|
46
|
+
eosHyperionNodes: ['https://api.waxsweden.org'],
|
|
47
|
+
|
|
48
|
+
// used for eosjs fetch routines
|
|
49
|
+
// getCurrencyBalance
|
|
50
|
+
// getInfo
|
|
51
|
+
// transaction
|
|
52
|
+
eosNodes: ['https://api.waxsweden.org'],
|
|
53
|
+
eosFuelServers: [], // this will need to be fixed
|
|
54
|
+
eosDfuseServers: [],
|
|
55
|
+
uriProtocol: 'wax',
|
|
56
|
+
createAccountViaSingleApiEndpoints: [
|
|
57
|
+
'https://edge.maltablock.org/api/v1/activateAccount'
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const defaultSettings = {
|
|
62
|
+
otherSettings
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export const waxCurrencyInfo = {
|
|
66
|
+
// Basic currency information:
|
|
67
|
+
currencyCode: 'WAX',
|
|
68
|
+
displayName: 'Wax',
|
|
69
|
+
pluginId: 'wax',
|
|
70
|
+
pluginName: 'wax',
|
|
71
|
+
// do we need plugin name?
|
|
72
|
+
walletType: 'wallet:wax',
|
|
73
|
+
|
|
74
|
+
defaultSettings,
|
|
75
|
+
|
|
76
|
+
addressExplorer: 'https://wax.bloks.io/account/%s',
|
|
77
|
+
transactionExplorer: 'https://wax.bloks.io/transaction/%s',
|
|
78
|
+
|
|
79
|
+
denominations,
|
|
80
|
+
metaTokens: [
|
|
81
|
+
{
|
|
82
|
+
name: 'WAX',
|
|
83
|
+
currencyName: 'WAX',
|
|
84
|
+
multiplier: '100000000',
|
|
85
|
+
symbol: 'W',
|
|
86
|
+
currencyCode: 'WAX',
|
|
87
|
+
contractAddress: 'eosio.token',
|
|
88
|
+
denominations
|
|
89
|
+
}
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export const makeWaxPlugin = (opts) => {
|
|
94
|
+
return makeEosBasedPluginInner(opts, waxCurrencyInfo, eosJsConfig)
|
|
95
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
import { makeEthereumBasedPluginInner } from './ethPlugin'
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
const defaultNetworkFees = {
|
|
13
|
+
default: {
|
|
14
|
+
baseFeeMultiplier: undefined,
|
|
15
|
+
gasLimit: {
|
|
16
|
+
regularTransaction: '21000',
|
|
17
|
+
tokenTransaction: '200000',
|
|
18
|
+
minGasLimit: '21000'
|
|
19
|
+
},
|
|
20
|
+
gasPrice: {
|
|
21
|
+
lowFee: '1000000001',
|
|
22
|
+
standardFeeLow: '40000000001',
|
|
23
|
+
standardFeeHigh: '300000000001',
|
|
24
|
+
standardFeeLowAmount: '100000000000000000',
|
|
25
|
+
standardFeeHighAmount: '10000000000000000000',
|
|
26
|
+
highFee: '40000000001',
|
|
27
|
+
minGasPrice: '1000000000'
|
|
28
|
+
},
|
|
29
|
+
minPriorityFee: undefined
|
|
30
|
+
},
|
|
31
|
+
'1983987abc9837fbabc0982347ad828': {
|
|
32
|
+
baseFeeMultiplier: undefined,
|
|
33
|
+
gasLimit: {
|
|
34
|
+
regularTransaction: '21002',
|
|
35
|
+
tokenTransaction: '37124'
|
|
36
|
+
},
|
|
37
|
+
gasPrice: {
|
|
38
|
+
lowFee: '1000000002',
|
|
39
|
+
standardFeeLow: '40000000002',
|
|
40
|
+
standardFeeHigh: '300000000002',
|
|
41
|
+
standardFeeLowAmount: '200000000000000000',
|
|
42
|
+
standardFeeHighAmount: '20000000000000000000',
|
|
43
|
+
highFee: '40000000002'
|
|
44
|
+
},
|
|
45
|
+
minPriorityFee: undefined
|
|
46
|
+
},
|
|
47
|
+
'2983987abc9837fbabc0982347ad828': {
|
|
48
|
+
baseFeeMultiplier: undefined,
|
|
49
|
+
gasLimit: {
|
|
50
|
+
regularTransaction: '21002',
|
|
51
|
+
tokenTransaction: '37124'
|
|
52
|
+
},
|
|
53
|
+
gasPrice: undefined,
|
|
54
|
+
minPriorityFee: undefined
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const otherSettings = {
|
|
59
|
+
rpcServers: ['https://www.ethercluster.com/etc'],
|
|
60
|
+
etherscanApiServers: ['https://blockscout.com/etc/mainnet'],
|
|
61
|
+
blockcypherApiServers: [],
|
|
62
|
+
blockbookServers: [],
|
|
63
|
+
uriNetworks: ['ethereumclassic', 'etherclass'],
|
|
64
|
+
ercTokenStandard: 'ERC20',
|
|
65
|
+
chainParams: {
|
|
66
|
+
chainId: 61,
|
|
67
|
+
name: 'Ethereum Classic'
|
|
68
|
+
},
|
|
69
|
+
hdPathCoinType: 61,
|
|
70
|
+
checkUnconfirmedTransactions: false,
|
|
71
|
+
iosAllowedTokens: {},
|
|
72
|
+
blockchairApiServers: [],
|
|
73
|
+
alethioApiServers: [],
|
|
74
|
+
alethioCurrencies: null, // object or null
|
|
75
|
+
amberdataRpcServers: [],
|
|
76
|
+
amberdataApiServers: [],
|
|
77
|
+
amberDataBlockchainId: '', // ETH mainnet
|
|
78
|
+
pluginMnemonicKeyName: 'ethereumclassicMnemonic',
|
|
79
|
+
pluginRegularKeyName: 'ethereumclassicKey',
|
|
80
|
+
ethGasStationUrl: null,
|
|
81
|
+
defaultNetworkFees
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const defaultSettings = {
|
|
85
|
+
customFeeSettings: ['gasLimit', 'gasPrice'],
|
|
86
|
+
otherSettings
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export const currencyInfo = {
|
|
90
|
+
// Basic currency information:
|
|
91
|
+
currencyCode: 'ETC',
|
|
92
|
+
displayName: 'Ethereum Classic',
|
|
93
|
+
pluginId: 'ethereumclassic',
|
|
94
|
+
walletType: 'wallet:ethereumclassic',
|
|
95
|
+
|
|
96
|
+
defaultSettings,
|
|
97
|
+
|
|
98
|
+
addressExplorer: 'https://blockscout.com/etc/mainnet/address/%s',
|
|
99
|
+
transactionExplorer: 'https://blockscout.com/etc/mainnet/tx/%s',
|
|
100
|
+
|
|
101
|
+
denominations: [
|
|
102
|
+
// An array of Objects of the possible denominations for this currency
|
|
103
|
+
{
|
|
104
|
+
name: 'ETC',
|
|
105
|
+
multiplier: '1000000000000000000',
|
|
106
|
+
symbol: 'Ξ'
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
name: 'mETC',
|
|
110
|
+
multiplier: '1000000000000000',
|
|
111
|
+
symbol: 'mΞ'
|
|
112
|
+
}
|
|
113
|
+
],
|
|
114
|
+
metaTokens: [
|
|
115
|
+
// Array of objects describing the supported metatokens
|
|
116
|
+
]
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export const makeEthereumClassicPlugin = (opts) => {
|
|
120
|
+
return makeEthereumBasedPluginInner(opts, currencyInfo)
|
|
121
|
+
}
|