edge-currency-plugins 3.8.3 → 3.8.5
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/android/build.gradle +8 -8
- package/android/src/main/assets/edge-currency-plugins/edge-currency-plugins.js +47 -47
- package/lib/common/utxobased/engine/UtxoEngine.js +2 -0
- package/lib/common/utxobased/engine/types.js +2 -0
- package/lib/common/utxobased/info/bitcoin.js +3 -2
- package/lib/common/utxobased/info/bitcoincash.js +2 -2
- package/lib/common/utxobased/info/dash.js +1 -1
- package/lib/common/utxobased/info/digibyte.js +5 -0
- package/lib/common/utxobased/info/dogecoin.js +2 -2
- package/lib/common/utxobased/info/litecoin.js +1 -1
- package/lib/common/utxobased/info/pivx.js +2 -2
- package/lib/common/utxobased/info/qtum.js +7 -1
- package/lib/common/utxobased/info/vertcoin.js +7 -0
- package/lib/common/utxobased/info/zcoin.js +3 -3
- package/lib/common/utxobased/keymanager/keymanager.js +12 -1
- package/lib/src/common/utxobased/engine/types.d.ts +1 -0
- package/lib/src/common/utxobased/keymanager/keymanager.d.ts +1 -0
- package/package.json +1 -1
|
@@ -541,6 +541,7 @@ var _UtxoWalletTools = require('./UtxoWalletTools');
|
|
|
541
541
|
)
|
|
542
542
|
const txOptions = _nullishCoalesce(spendInfoOtherParams.txOptions, () => ( {}))
|
|
543
543
|
const {
|
|
544
|
+
memoIndex,
|
|
544
545
|
outputSort,
|
|
545
546
|
utxoSourceAddress,
|
|
546
547
|
forceChangeAddress
|
|
@@ -669,6 +670,7 @@ var _UtxoWalletTools = require('./UtxoWalletTools');
|
|
|
669
670
|
freshChangeAddress,
|
|
670
671
|
subtractFee,
|
|
671
672
|
log,
|
|
673
|
+
memoIndex,
|
|
672
674
|
outputSort
|
|
673
675
|
})
|
|
674
676
|
if (tx.changeUsed) {
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
+
|
|
9
10
|
var _cleaners = require('cleaners');
|
|
10
11
|
|
|
11
12
|
|
|
@@ -53,6 +54,7 @@ const asOutputSort = _cleaners.asValue.call(void 0, 'bip69', 'targets')
|
|
|
53
54
|
/** @deprecated use `EdgeSpendInfo['enableRbf']` */
|
|
54
55
|
enableRbf: _cleaners.asOptional.call(void 0, _cleaners.asBoolean),
|
|
55
56
|
forceChangeAddress: _cleaners.asOptional.call(void 0, _cleaners.asString),
|
|
57
|
+
memoIndex: _cleaners.asOptional.call(void 0, _cleaners.asNumber),
|
|
56
58
|
outputSort: _cleaners.asOptional.call(void 0, asOutputSort, 'bip69'),
|
|
57
59
|
txOptions: _cleaners.asOptional.call(void 0, _types3.asTxOptions),
|
|
58
60
|
utxoSourceAddress: _cleaners.asOptional.call(void 0, _cleaners.asString)
|
|
@@ -35,12 +35,13 @@ const currencyInfo = {
|
|
|
35
35
|
defaultSettings: {
|
|
36
36
|
customFeeSettings: ['satPerByte'],
|
|
37
37
|
blockbookServers: [
|
|
38
|
+
'wss://btc-wusa1.edge.app',
|
|
39
|
+
'wss://btc-eu1.edge.app',
|
|
38
40
|
'wss://btc1.trezor.io',
|
|
39
41
|
'wss://btc2.trezor.io',
|
|
40
42
|
'wss://btc3.trezor.io',
|
|
41
43
|
'wss://btc4.trezor.io',
|
|
42
44
|
'wss://btc5.trezor.io',
|
|
43
|
-
'wss://btc-wusa1.edge.app',
|
|
44
45
|
'wss://btcbook.nownodes.io/wss/%{nowNodesApiKey}'
|
|
45
46
|
],
|
|
46
47
|
enableCustomServers: false
|
|
@@ -53,7 +54,7 @@ const engineInfo = {
|
|
|
53
54
|
serverConfigs: [
|
|
54
55
|
{
|
|
55
56
|
type: 'blockbook-nownode',
|
|
56
|
-
uris: ['https://btc-wusa1.edge.app']
|
|
57
|
+
uris: ['https://btc-wusa1.edge.app', 'https://btc-eu1.edge.app']
|
|
57
58
|
},
|
|
58
59
|
{
|
|
59
60
|
type: 'blockbook-nownode',
|
|
@@ -36,12 +36,12 @@ const currencyInfo = {
|
|
|
36
36
|
defaultSettings: {
|
|
37
37
|
customFeeSettings: ['satPerByte'],
|
|
38
38
|
blockbookServers: [
|
|
39
|
+
'wss://bch-eusa1.edge.app',
|
|
39
40
|
'wss://bch1.trezor.io',
|
|
40
41
|
'wss://bch2.trezor.io',
|
|
41
42
|
'wss://bch3.trezor.io',
|
|
42
43
|
'wss://bch4.trezor.io',
|
|
43
44
|
'wss://bch5.trezor.io',
|
|
44
|
-
'wss://bch-wusa1.edge.app',
|
|
45
45
|
'wss://bchbook.nownodes.io/wss/%{nowNodesApiKey}'
|
|
46
46
|
],
|
|
47
47
|
enableCustomServers: false
|
|
@@ -54,7 +54,7 @@ const engineInfo = {
|
|
|
54
54
|
serverConfigs: [
|
|
55
55
|
{
|
|
56
56
|
type: 'blockbook-nownode',
|
|
57
|
-
uris: ['https://bch-
|
|
57
|
+
uris: ['https://bch-eusa1.edge.app']
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
60
|
type: 'blockbook-nownode',
|
|
@@ -35,12 +35,12 @@ const currencyInfo = {
|
|
|
35
35
|
defaultSettings: {
|
|
36
36
|
customFeeSettings: ['satPerByte'],
|
|
37
37
|
blockbookServers: [
|
|
38
|
+
'wss://dash-wusa1.edge.app',
|
|
38
39
|
'wss://dash1.trezor.io',
|
|
39
40
|
'wss://dash2.trezor.io',
|
|
40
41
|
'wss://dash3.trezor.io',
|
|
41
42
|
'wss://dash4.trezor.io',
|
|
42
43
|
'wss://dash5.trezor.io',
|
|
43
|
-
'wss://dash-eusa1.edge.app',
|
|
44
44
|
'wss://dash.nownodes.io/wss/%{nowNodesApiKey}'
|
|
45
45
|
],
|
|
46
46
|
enableCustomServers: false
|
|
@@ -32,6 +32,7 @@ const currencyInfo = {
|
|
|
32
32
|
defaultSettings: {
|
|
33
33
|
customFeeSettings: ['satPerByte'],
|
|
34
34
|
blockbookServers: [
|
|
35
|
+
'wss://dgb-eu1.edge.app',
|
|
35
36
|
'wss://dgb1.trezor.io',
|
|
36
37
|
'wss://dgb2.trezor.io',
|
|
37
38
|
'wss://dgbbook.nownodes.io/wss/%{nowNodesApiKey}'
|
|
@@ -44,6 +45,10 @@ const currencyInfo = {
|
|
|
44
45
|
|
|
45
46
|
const engineInfo = {
|
|
46
47
|
serverConfigs: [
|
|
48
|
+
{
|
|
49
|
+
type: 'blockbook-nownode',
|
|
50
|
+
uris: ['https://dgb-eu1.edge.app']
|
|
51
|
+
},
|
|
47
52
|
{
|
|
48
53
|
type: 'blockbook-nownode',
|
|
49
54
|
uris: ['https://dgbbook.nownodes.io']
|
|
@@ -31,12 +31,12 @@ const currencyInfo = {
|
|
|
31
31
|
defaultSettings: {
|
|
32
32
|
customFeeSettings: ['satPerByte'],
|
|
33
33
|
blockbookServers: [
|
|
34
|
+
'wss://doge-eusa1.edge.app',
|
|
34
35
|
'wss://doge1.trezor.io',
|
|
35
36
|
'wss://doge2.trezor.io',
|
|
36
37
|
'wss://doge3.trezor.io',
|
|
37
38
|
'wss://doge4.trezor.io',
|
|
38
39
|
'wss://doge5.trezor.io',
|
|
39
|
-
'wss://doge-wusa1.edge.app',
|
|
40
40
|
'wss://dogebook.nownodes.io/wss/%{nowNodesApiKey}'
|
|
41
41
|
],
|
|
42
42
|
enableCustomServers: false
|
|
@@ -49,7 +49,7 @@ const engineInfo = {
|
|
|
49
49
|
serverConfigs: [
|
|
50
50
|
{
|
|
51
51
|
type: 'blockbook-nownode',
|
|
52
|
-
uris: ['https://doge-
|
|
52
|
+
uris: ['https://doge-eusa1.edge.app']
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
type: 'blockbook-nownode',
|
|
@@ -33,12 +33,12 @@ var _commonInfo = require('./commonInfo');
|
|
|
33
33
|
defaultSettings: {
|
|
34
34
|
customFeeSettings: ['satPerByte'],
|
|
35
35
|
blockbookServers: [
|
|
36
|
+
'wss://ltc-wusa1.edge.app',
|
|
36
37
|
'wss://ltc1.trezor.io',
|
|
37
38
|
'wss://ltc2.trezor.io',
|
|
38
39
|
'wss://ltc3.trezor.io',
|
|
39
40
|
'wss://ltc4.trezor.io',
|
|
40
41
|
'wss://ltc5.trezor.io',
|
|
41
|
-
'wss://ltc-eusa1.edge.app',
|
|
42
42
|
'wss://ltcbook.nownodes.io/wss/%{nowNodesApiKey}'
|
|
43
43
|
],
|
|
44
44
|
enableCustomServers: false
|
|
@@ -34,7 +34,7 @@ const currencyInfo = {
|
|
|
34
34
|
..._commonInfo.legacyMemoInfo,
|
|
35
35
|
defaultSettings: {
|
|
36
36
|
customFeeSettings: ['satPerByte'],
|
|
37
|
-
blockbookServers: ['wss://pivx-
|
|
37
|
+
blockbookServers: ['wss://pivx-wusa1.edge.app', 'wss://zkbitcoin.com'],
|
|
38
38
|
enableCustomServers: false
|
|
39
39
|
},
|
|
40
40
|
displayName: 'PIVX',
|
|
@@ -45,7 +45,7 @@ const engineInfo = {
|
|
|
45
45
|
serverConfigs: [
|
|
46
46
|
{
|
|
47
47
|
type: 'blockbook-nownode',
|
|
48
|
-
uris: ['https://
|
|
48
|
+
uris: ['https://pivx-wusa1.edge.app']
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
type: 'blockbook-nownode',
|
|
@@ -29,7 +29,7 @@ const currencyInfo = {
|
|
|
29
29
|
defaultSettings: {
|
|
30
30
|
customFeeSettings: ['satPerByte'],
|
|
31
31
|
blockbookServers: [
|
|
32
|
-
'wss://qtum-
|
|
32
|
+
'wss://qtum-wusa1.edge.app',
|
|
33
33
|
'wss://blockv3.qtum.info',
|
|
34
34
|
'wss://qtum.atomicwallet.io'
|
|
35
35
|
],
|
|
@@ -40,6 +40,12 @@ const currencyInfo = {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
const engineInfo = {
|
|
43
|
+
serverConfigs: [
|
|
44
|
+
{
|
|
45
|
+
type: 'blockbook-nownode',
|
|
46
|
+
uris: ['https://qtum-wusa1.edge.app']
|
|
47
|
+
}
|
|
48
|
+
],
|
|
43
49
|
formats: ['bip44', 'bip32'],
|
|
44
50
|
gapLimit: 10,
|
|
45
51
|
feeUpdateInterval: 60000,
|
|
@@ -32,6 +32,7 @@ const currencyInfo = {
|
|
|
32
32
|
defaultSettings: {
|
|
33
33
|
customFeeSettings: ['satPerByte'],
|
|
34
34
|
blockbookServers: [
|
|
35
|
+
'wss://vtc-wusa1.edge.app',
|
|
35
36
|
'wss://vtc1.trezor.io',
|
|
36
37
|
'wss://vtc2.trezor.io',
|
|
37
38
|
'wss://vtc3.trezor.io',
|
|
@@ -45,6 +46,12 @@ const currencyInfo = {
|
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
const engineInfo = {
|
|
49
|
+
serverConfigs: [
|
|
50
|
+
{
|
|
51
|
+
type: 'blockbook-nownode',
|
|
52
|
+
uris: ['https://vtc-wusa1.edge.app']
|
|
53
|
+
}
|
|
54
|
+
],
|
|
48
55
|
formats: ['bip49', 'bip84', 'bip44', 'bip32'],
|
|
49
56
|
forks: [],
|
|
50
57
|
gapLimit: 10,
|
|
@@ -32,8 +32,8 @@ var _commonInfo = require('./commonInfo');
|
|
|
32
32
|
defaultSettings: {
|
|
33
33
|
customFeeSettings: ['satPerByte'],
|
|
34
34
|
blockbookServers: [
|
|
35
|
-
|
|
36
|
-
'wss://firo
|
|
35
|
+
'wss://firo-eusa1.edge.app',
|
|
36
|
+
'wss://blockbook.firo.org'
|
|
37
37
|
// 'wss://firo.nownodes.io/wss/%{nowNodesApiKey}'
|
|
38
38
|
],
|
|
39
39
|
enableCustomServers: false
|
|
@@ -46,7 +46,7 @@ var _commonInfo = require('./commonInfo');
|
|
|
46
46
|
serverConfigs: [
|
|
47
47
|
{
|
|
48
48
|
type: 'blockbook-nownode',
|
|
49
|
-
uris: ['https://firo-
|
|
49
|
+
uris: ['https://firo-eusa1.edge.app']
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
52
|
type: 'blockbook-nownode',
|
|
@@ -272,6 +272,7 @@ var VerifyAddressEnum; (function (VerifyAddressEnum) {
|
|
|
272
272
|
|
|
273
273
|
|
|
274
274
|
|
|
275
|
+
|
|
275
276
|
|
|
276
277
|
|
|
277
278
|
function bip43PurposeNumberToTypeEnum(
|
|
@@ -949,7 +950,7 @@ const wifToPrivateKeyEncodingInternal = (
|
|
|
949
950
|
} exports.signMessageBase64 = signMessageBase64;
|
|
950
951
|
|
|
951
952
|
function makeTx(args) {
|
|
952
|
-
const { log, outputSort, memos } = args
|
|
953
|
+
const { log, outputSort, memos, memoIndex } = args
|
|
953
954
|
let sequence = 0xffffffff
|
|
954
955
|
if (args.enableRbf) {
|
|
955
956
|
sequence -= 2
|
|
@@ -1102,6 +1103,16 @@ const wifToPrivateKeyEncodingInternal = (
|
|
|
1102
1103
|
}
|
|
1103
1104
|
})()
|
|
1104
1105
|
|
|
1106
|
+
if (memoIndex != null) {
|
|
1107
|
+
const currentMemoIndex = sortedOutputs.findIndex(
|
|
1108
|
+
output => output.value === 0
|
|
1109
|
+
)
|
|
1110
|
+
if (currentMemoIndex !== -1) {
|
|
1111
|
+
const memoOutput = sortedOutputs.splice(currentMemoIndex, 1)
|
|
1112
|
+
sortedOutputs.splice(memoIndex, 0, memoOutput[0])
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1105
1116
|
const psbt = new (0, _altcoinjs.Psbt)()
|
|
1106
1117
|
try {
|
|
1107
1118
|
psbt.addInputs(sortedInputs)
|
|
@@ -28,6 +28,7 @@ export declare type UtxoSpendInfoOtherParams = ReturnType<typeof asUtxoSpendInfo
|
|
|
28
28
|
export declare const asUtxoSpendInfoOtherParams: import("cleaners").ObjectCleaner<{
|
|
29
29
|
enableRbf: boolean | undefined;
|
|
30
30
|
forceChangeAddress: string | undefined;
|
|
31
|
+
memoIndex: number | undefined;
|
|
31
32
|
outputSort: "targets" | "bip69";
|
|
32
33
|
txOptions: import("../../plugin/types").TxOptions | undefined;
|
|
33
34
|
utxoSourceAddress: string | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "edge-currency-plugins",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.5",
|
|
4
4
|
"description": "Edge currency plugins to fetch and process wallet accounts, balances and transactions.",
|
|
5
5
|
"homepage": "https://edge.app/",
|
|
6
6
|
"repository": "https://github.com/EdgeApp/edge-currency-plugins",
|