@pioneer-platform/pioneer-sdk 8.15.9 → 8.15.13
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/index.cjs +12 -11
- package/dist/index.es.js +12 -11
- package/dist/index.js +12 -11
- package/package.json +4 -4
- package/src/fees/index.ts +2 -0
- package/src/getPubkey.ts +6 -5
- package/src/index.ts +2 -0
- package/src/supportedCaips.ts +2 -0
- package/src/txbuilder/createUnsignedRippleTx.ts +10 -9
package/dist/index.cjs
CHANGED
|
@@ -972,6 +972,7 @@ var getPubkey = async (networkId, path, sdk, context) => {
|
|
|
972
972
|
"bip122:000007d91d1254d60e2dd1ae58038307": "UTXO",
|
|
973
973
|
"bip122:00000000001a91e3dace36e2be3bf030": "UTXO",
|
|
974
974
|
"bip122:12a765e31ffd4059bada1e25190f6e98": "UTXO",
|
|
975
|
+
"bip122:4da631f2ac1bed857bd968c67c913978": "UTXO",
|
|
975
976
|
"cosmos:mayachain-mainnet-v1": "MAYACHAIN",
|
|
976
977
|
"cosmos:osmosis-1": "OSMOSIS",
|
|
977
978
|
"cosmos:cosmoshub-4": "COSMOS",
|
|
@@ -1406,7 +1407,8 @@ var UTXO_SUPPORT = [
|
|
|
1406
1407
|
"bip122:000000000000000000651ef99cb9fcbe/slip44:145",
|
|
1407
1408
|
"bip122:000007d91d1254d60e2dd1ae58038307/slip44:5",
|
|
1408
1409
|
"bip122:00000000001a91e3dace36e2be3bf030/slip44:3",
|
|
1409
|
-
"bip122:12a765e31ffd4059bada1e25190f6e98/slip44:2"
|
|
1410
|
+
"bip122:12a765e31ffd4059bada1e25190f6e98/slip44:2",
|
|
1411
|
+
"bip122:4da631f2ac1bed857bd968c67c913978/slip44:20"
|
|
1410
1412
|
];
|
|
1411
1413
|
var TENDERMINT_SUPPORT = [
|
|
1412
1414
|
"cosmos:mayachain-mainnet-v1/slip44:931",
|
|
@@ -1421,7 +1423,8 @@ var CAIP_TO_COIN_MAP = {
|
|
|
1421
1423
|
"bip122:000000000000000000651ef99cb9fcbe/slip44:145": "BitcoinCash",
|
|
1422
1424
|
"bip122:000007d91d1254d60e2dd1ae58038307/slip44:5": "Dash",
|
|
1423
1425
|
"bip122:00000000001a91e3dace36e2be3bf030/slip44:3": "Dogecoin",
|
|
1424
|
-
"bip122:12a765e31ffd4059bada1e25190f6e98/slip44:2": "Litecoin"
|
|
1426
|
+
"bip122:12a765e31ffd4059bada1e25190f6e98/slip44:2": "Litecoin",
|
|
1427
|
+
"bip122:4da631f2ac1bed857bd968c67c913978/slip44:20": "DigiByte"
|
|
1425
1428
|
};
|
|
1426
1429
|
var OTHER_SUPPORT = ["ripple:4109c6f2045fc7eff4cde8f9905d19c2/slip44:144"];
|
|
1427
1430
|
var SUPPORTED_CAIPS = {
|
|
@@ -2027,9 +2030,6 @@ async function createUnsignedRippleTx(caip, to, amount, memo, pubkeys, pioneer,
|
|
|
2027
2030
|
to_address: to
|
|
2028
2031
|
}
|
|
2029
2032
|
};
|
|
2030
|
-
if (desttag !== undefined) {
|
|
2031
|
-
msg.DestinationTag = desttag;
|
|
2032
|
-
}
|
|
2033
2033
|
let tx = {
|
|
2034
2034
|
type: "auth/StdTx",
|
|
2035
2035
|
value: {
|
|
@@ -2042,18 +2042,16 @@ async function createUnsignedRippleTx(caip, to, amount, memo, pubkeys, pioneer,
|
|
|
2042
2042
|
],
|
|
2043
2043
|
gas: "28000"
|
|
2044
2044
|
},
|
|
2045
|
-
memo:
|
|
2045
|
+
memo: " ",
|
|
2046
2046
|
msg: [msg],
|
|
2047
2047
|
signatures: null
|
|
2048
2048
|
}
|
|
2049
2049
|
};
|
|
2050
2050
|
const payment = {
|
|
2051
2051
|
amount,
|
|
2052
|
-
destination: to
|
|
2052
|
+
destination: to,
|
|
2053
|
+
destinationTag: desttag ? String(desttag) : "undefined"
|
|
2053
2054
|
};
|
|
2054
|
-
if (desttag !== undefined) {
|
|
2055
|
-
payment.destinationTag = desttag;
|
|
2056
|
-
}
|
|
2057
2055
|
let unsignedTx = {
|
|
2058
2056
|
addressNList: [2147483692, 2147483792, 2147483648, 0, 0],
|
|
2059
2057
|
tx,
|
|
@@ -3306,6 +3304,7 @@ function getNetworkName(networkId) {
|
|
|
3306
3304
|
"bip122:00000000001a91e3dace36e2be3bf030": "Dogecoin",
|
|
3307
3305
|
"bip122:000000000000000000651ef99cb9fcbe": "Bitcoin Cash",
|
|
3308
3306
|
"bip122:000007d91d1254d60e2dd1ae58038307": "Dash",
|
|
3307
|
+
"bip122:4da631f2ac1bed857bd968c67c913978": "DigiByte",
|
|
3309
3308
|
"eip155:1": "Ethereum",
|
|
3310
3309
|
"eip155:56": "BNB Smart Chain",
|
|
3311
3310
|
"eip155:137": "Polygon",
|
|
@@ -3470,7 +3469,8 @@ function normalizeFeeData(feeData, networkType, networkName, networkId) {
|
|
|
3470
3469
|
"bip122:12a765e31ffd4059bada1e25190f6e98": 500,
|
|
3471
3470
|
"bip122:000000000000000000651ef99cb9fcbe": 50,
|
|
3472
3471
|
"bip122:000007d91d1254d60e2dd1ae58038307": 50,
|
|
3473
|
-
"bip122:000000000019d6689c085ae165831e93": 5000
|
|
3472
|
+
"bip122:000000000019d6689c085ae165831e93": 5000,
|
|
3473
|
+
"bip122:4da631f2ac1bed857bd968c67c913978": 50
|
|
3474
3474
|
};
|
|
3475
3475
|
const matchedNetworkId = networkId && sanityLimits[networkId] ? networkId : Object.keys(sanityLimits).find((id) => networkName.toLowerCase().includes(id.split(":")[1]?.substring(0, 8)));
|
|
3476
3476
|
if (matchedNetworkId && sanityLimits[matchedNetworkId]) {
|
|
@@ -3995,6 +3995,7 @@ var ASSET_COLORS = {
|
|
|
3995
3995
|
"bip122:00000000001a91e3dace36e2be3bf030/slip44:3": "#C2A633",
|
|
3996
3996
|
"bip122:000000000000000000651ef99cb9fcbe/slip44:145": "#8DC351",
|
|
3997
3997
|
"bip122:000007d91d1254d60e2dd1ae58038307/slip44:5": "#008CE7",
|
|
3998
|
+
"bip122:4da631f2ac1bed857bd968c67c913978/slip44:20": "#006AD2",
|
|
3998
3999
|
"cosmos:cosmoshub-4/slip44:118": "#2E3148",
|
|
3999
4000
|
"cosmos:osmosis-1/slip44:118": "#9B1FD7",
|
|
4000
4001
|
"ripple:4109c6f2045fc7eff4cde8f9905d19c2/slip44:144": "#23292F",
|
package/dist/index.es.js
CHANGED
|
@@ -1156,6 +1156,7 @@ var getPubkey = async (networkId, path, sdk, context) => {
|
|
|
1156
1156
|
"bip122:000007d91d1254d60e2dd1ae58038307": "UTXO",
|
|
1157
1157
|
"bip122:00000000001a91e3dace36e2be3bf030": "UTXO",
|
|
1158
1158
|
"bip122:12a765e31ffd4059bada1e25190f6e98": "UTXO",
|
|
1159
|
+
"bip122:4da631f2ac1bed857bd968c67c913978": "UTXO",
|
|
1159
1160
|
"cosmos:mayachain-mainnet-v1": "MAYACHAIN",
|
|
1160
1161
|
"cosmos:osmosis-1": "OSMOSIS",
|
|
1161
1162
|
"cosmos:cosmoshub-4": "COSMOS",
|
|
@@ -1590,7 +1591,8 @@ var UTXO_SUPPORT = [
|
|
|
1590
1591
|
"bip122:000000000000000000651ef99cb9fcbe/slip44:145",
|
|
1591
1592
|
"bip122:000007d91d1254d60e2dd1ae58038307/slip44:5",
|
|
1592
1593
|
"bip122:00000000001a91e3dace36e2be3bf030/slip44:3",
|
|
1593
|
-
"bip122:12a765e31ffd4059bada1e25190f6e98/slip44:2"
|
|
1594
|
+
"bip122:12a765e31ffd4059bada1e25190f6e98/slip44:2",
|
|
1595
|
+
"bip122:4da631f2ac1bed857bd968c67c913978/slip44:20"
|
|
1594
1596
|
];
|
|
1595
1597
|
var TENDERMINT_SUPPORT = [
|
|
1596
1598
|
"cosmos:mayachain-mainnet-v1/slip44:931",
|
|
@@ -1605,7 +1607,8 @@ var CAIP_TO_COIN_MAP = {
|
|
|
1605
1607
|
"bip122:000000000000000000651ef99cb9fcbe/slip44:145": "BitcoinCash",
|
|
1606
1608
|
"bip122:000007d91d1254d60e2dd1ae58038307/slip44:5": "Dash",
|
|
1607
1609
|
"bip122:00000000001a91e3dace36e2be3bf030/slip44:3": "Dogecoin",
|
|
1608
|
-
"bip122:12a765e31ffd4059bada1e25190f6e98/slip44:2": "Litecoin"
|
|
1610
|
+
"bip122:12a765e31ffd4059bada1e25190f6e98/slip44:2": "Litecoin",
|
|
1611
|
+
"bip122:4da631f2ac1bed857bd968c67c913978/slip44:20": "DigiByte"
|
|
1609
1612
|
};
|
|
1610
1613
|
var OTHER_SUPPORT = ["ripple:4109c6f2045fc7eff4cde8f9905d19c2/slip44:144"];
|
|
1611
1614
|
var SUPPORTED_CAIPS = {
|
|
@@ -2211,9 +2214,6 @@ async function createUnsignedRippleTx(caip, to, amount, memo, pubkeys, pioneer,
|
|
|
2211
2214
|
to_address: to
|
|
2212
2215
|
}
|
|
2213
2216
|
};
|
|
2214
|
-
if (desttag !== undefined) {
|
|
2215
|
-
msg.DestinationTag = desttag;
|
|
2216
|
-
}
|
|
2217
2217
|
let tx = {
|
|
2218
2218
|
type: "auth/StdTx",
|
|
2219
2219
|
value: {
|
|
@@ -2226,18 +2226,16 @@ async function createUnsignedRippleTx(caip, to, amount, memo, pubkeys, pioneer,
|
|
|
2226
2226
|
],
|
|
2227
2227
|
gas: "28000"
|
|
2228
2228
|
},
|
|
2229
|
-
memo:
|
|
2229
|
+
memo: " ",
|
|
2230
2230
|
msg: [msg],
|
|
2231
2231
|
signatures: null
|
|
2232
2232
|
}
|
|
2233
2233
|
};
|
|
2234
2234
|
const payment = {
|
|
2235
2235
|
amount,
|
|
2236
|
-
destination: to
|
|
2236
|
+
destination: to,
|
|
2237
|
+
destinationTag: desttag ? String(desttag) : "undefined"
|
|
2237
2238
|
};
|
|
2238
|
-
if (desttag !== undefined) {
|
|
2239
|
-
payment.destinationTag = desttag;
|
|
2240
|
-
}
|
|
2241
2239
|
let unsignedTx = {
|
|
2242
2240
|
addressNList: [2147483692, 2147483792, 2147483648, 0, 0],
|
|
2243
2241
|
tx,
|
|
@@ -3490,6 +3488,7 @@ function getNetworkName(networkId) {
|
|
|
3490
3488
|
"bip122:00000000001a91e3dace36e2be3bf030": "Dogecoin",
|
|
3491
3489
|
"bip122:000000000000000000651ef99cb9fcbe": "Bitcoin Cash",
|
|
3492
3490
|
"bip122:000007d91d1254d60e2dd1ae58038307": "Dash",
|
|
3491
|
+
"bip122:4da631f2ac1bed857bd968c67c913978": "DigiByte",
|
|
3493
3492
|
"eip155:1": "Ethereum",
|
|
3494
3493
|
"eip155:56": "BNB Smart Chain",
|
|
3495
3494
|
"eip155:137": "Polygon",
|
|
@@ -3654,7 +3653,8 @@ function normalizeFeeData(feeData, networkType, networkName, networkId) {
|
|
|
3654
3653
|
"bip122:12a765e31ffd4059bada1e25190f6e98": 500,
|
|
3655
3654
|
"bip122:000000000000000000651ef99cb9fcbe": 50,
|
|
3656
3655
|
"bip122:000007d91d1254d60e2dd1ae58038307": 50,
|
|
3657
|
-
"bip122:000000000019d6689c085ae165831e93": 5000
|
|
3656
|
+
"bip122:000000000019d6689c085ae165831e93": 5000,
|
|
3657
|
+
"bip122:4da631f2ac1bed857bd968c67c913978": 50
|
|
3658
3658
|
};
|
|
3659
3659
|
const matchedNetworkId = networkId && sanityLimits[networkId] ? networkId : Object.keys(sanityLimits).find((id) => networkName.toLowerCase().includes(id.split(":")[1]?.substring(0, 8)));
|
|
3660
3660
|
if (matchedNetworkId && sanityLimits[matchedNetworkId]) {
|
|
@@ -4179,6 +4179,7 @@ var ASSET_COLORS = {
|
|
|
4179
4179
|
"bip122:00000000001a91e3dace36e2be3bf030/slip44:3": "#C2A633",
|
|
4180
4180
|
"bip122:000000000000000000651ef99cb9fcbe/slip44:145": "#8DC351",
|
|
4181
4181
|
"bip122:000007d91d1254d60e2dd1ae58038307/slip44:5": "#008CE7",
|
|
4182
|
+
"bip122:4da631f2ac1bed857bd968c67c913978/slip44:20": "#006AD2",
|
|
4182
4183
|
"cosmos:cosmoshub-4/slip44:118": "#2E3148",
|
|
4183
4184
|
"cosmos:osmosis-1/slip44:118": "#9B1FD7",
|
|
4184
4185
|
"ripple:4109c6f2045fc7eff4cde8f9905d19c2/slip44:144": "#23292F",
|
package/dist/index.js
CHANGED
|
@@ -1156,6 +1156,7 @@ var getPubkey = async (networkId, path, sdk, context) => {
|
|
|
1156
1156
|
"bip122:000007d91d1254d60e2dd1ae58038307": "UTXO",
|
|
1157
1157
|
"bip122:00000000001a91e3dace36e2be3bf030": "UTXO",
|
|
1158
1158
|
"bip122:12a765e31ffd4059bada1e25190f6e98": "UTXO",
|
|
1159
|
+
"bip122:4da631f2ac1bed857bd968c67c913978": "UTXO",
|
|
1159
1160
|
"cosmos:mayachain-mainnet-v1": "MAYACHAIN",
|
|
1160
1161
|
"cosmos:osmosis-1": "OSMOSIS",
|
|
1161
1162
|
"cosmos:cosmoshub-4": "COSMOS",
|
|
@@ -1590,7 +1591,8 @@ var UTXO_SUPPORT = [
|
|
|
1590
1591
|
"bip122:000000000000000000651ef99cb9fcbe/slip44:145",
|
|
1591
1592
|
"bip122:000007d91d1254d60e2dd1ae58038307/slip44:5",
|
|
1592
1593
|
"bip122:00000000001a91e3dace36e2be3bf030/slip44:3",
|
|
1593
|
-
"bip122:12a765e31ffd4059bada1e25190f6e98/slip44:2"
|
|
1594
|
+
"bip122:12a765e31ffd4059bada1e25190f6e98/slip44:2",
|
|
1595
|
+
"bip122:4da631f2ac1bed857bd968c67c913978/slip44:20"
|
|
1594
1596
|
];
|
|
1595
1597
|
var TENDERMINT_SUPPORT = [
|
|
1596
1598
|
"cosmos:mayachain-mainnet-v1/slip44:931",
|
|
@@ -1605,7 +1607,8 @@ var CAIP_TO_COIN_MAP = {
|
|
|
1605
1607
|
"bip122:000000000000000000651ef99cb9fcbe/slip44:145": "BitcoinCash",
|
|
1606
1608
|
"bip122:000007d91d1254d60e2dd1ae58038307/slip44:5": "Dash",
|
|
1607
1609
|
"bip122:00000000001a91e3dace36e2be3bf030/slip44:3": "Dogecoin",
|
|
1608
|
-
"bip122:12a765e31ffd4059bada1e25190f6e98/slip44:2": "Litecoin"
|
|
1610
|
+
"bip122:12a765e31ffd4059bada1e25190f6e98/slip44:2": "Litecoin",
|
|
1611
|
+
"bip122:4da631f2ac1bed857bd968c67c913978/slip44:20": "DigiByte"
|
|
1609
1612
|
};
|
|
1610
1613
|
var OTHER_SUPPORT = ["ripple:4109c6f2045fc7eff4cde8f9905d19c2/slip44:144"];
|
|
1611
1614
|
var SUPPORTED_CAIPS = {
|
|
@@ -2211,9 +2214,6 @@ async function createUnsignedRippleTx(caip, to, amount, memo, pubkeys, pioneer,
|
|
|
2211
2214
|
to_address: to
|
|
2212
2215
|
}
|
|
2213
2216
|
};
|
|
2214
|
-
if (desttag !== undefined) {
|
|
2215
|
-
msg.DestinationTag = desttag;
|
|
2216
|
-
}
|
|
2217
2217
|
let tx = {
|
|
2218
2218
|
type: "auth/StdTx",
|
|
2219
2219
|
value: {
|
|
@@ -2226,18 +2226,16 @@ async function createUnsignedRippleTx(caip, to, amount, memo, pubkeys, pioneer,
|
|
|
2226
2226
|
],
|
|
2227
2227
|
gas: "28000"
|
|
2228
2228
|
},
|
|
2229
|
-
memo:
|
|
2229
|
+
memo: " ",
|
|
2230
2230
|
msg: [msg],
|
|
2231
2231
|
signatures: null
|
|
2232
2232
|
}
|
|
2233
2233
|
};
|
|
2234
2234
|
const payment = {
|
|
2235
2235
|
amount,
|
|
2236
|
-
destination: to
|
|
2236
|
+
destination: to,
|
|
2237
|
+
destinationTag: desttag ? String(desttag) : "undefined"
|
|
2237
2238
|
};
|
|
2238
|
-
if (desttag !== undefined) {
|
|
2239
|
-
payment.destinationTag = desttag;
|
|
2240
|
-
}
|
|
2241
2239
|
let unsignedTx = {
|
|
2242
2240
|
addressNList: [2147483692, 2147483792, 2147483648, 0, 0],
|
|
2243
2241
|
tx,
|
|
@@ -3490,6 +3488,7 @@ function getNetworkName(networkId) {
|
|
|
3490
3488
|
"bip122:00000000001a91e3dace36e2be3bf030": "Dogecoin",
|
|
3491
3489
|
"bip122:000000000000000000651ef99cb9fcbe": "Bitcoin Cash",
|
|
3492
3490
|
"bip122:000007d91d1254d60e2dd1ae58038307": "Dash",
|
|
3491
|
+
"bip122:4da631f2ac1bed857bd968c67c913978": "DigiByte",
|
|
3493
3492
|
"eip155:1": "Ethereum",
|
|
3494
3493
|
"eip155:56": "BNB Smart Chain",
|
|
3495
3494
|
"eip155:137": "Polygon",
|
|
@@ -3654,7 +3653,8 @@ function normalizeFeeData(feeData, networkType, networkName, networkId) {
|
|
|
3654
3653
|
"bip122:12a765e31ffd4059bada1e25190f6e98": 500,
|
|
3655
3654
|
"bip122:000000000000000000651ef99cb9fcbe": 50,
|
|
3656
3655
|
"bip122:000007d91d1254d60e2dd1ae58038307": 50,
|
|
3657
|
-
"bip122:000000000019d6689c085ae165831e93": 5000
|
|
3656
|
+
"bip122:000000000019d6689c085ae165831e93": 5000,
|
|
3657
|
+
"bip122:4da631f2ac1bed857bd968c67c913978": 50
|
|
3658
3658
|
};
|
|
3659
3659
|
const matchedNetworkId = networkId && sanityLimits[networkId] ? networkId : Object.keys(sanityLimits).find((id) => networkName.toLowerCase().includes(id.split(":")[1]?.substring(0, 8)));
|
|
3660
3660
|
if (matchedNetworkId && sanityLimits[matchedNetworkId]) {
|
|
@@ -4179,6 +4179,7 @@ var ASSET_COLORS = {
|
|
|
4179
4179
|
"bip122:00000000001a91e3dace36e2be3bf030/slip44:3": "#C2A633",
|
|
4180
4180
|
"bip122:000000000000000000651ef99cb9fcbe/slip44:145": "#8DC351",
|
|
4181
4181
|
"bip122:000007d91d1254d60e2dd1ae58038307/slip44:5": "#008CE7",
|
|
4182
|
+
"bip122:4da631f2ac1bed857bd968c67c913978/slip44:20": "#006AD2",
|
|
4182
4183
|
"cosmos:cosmoshub-4/slip44:118": "#2E3148",
|
|
4183
4184
|
"cosmos:osmosis-1/slip44:118": "#9B1FD7",
|
|
4184
4185
|
"ripple:4109c6f2045fc7eff4cde8f9905d19c2/slip44:144": "#23292F",
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"author": "highlander",
|
|
3
3
|
"name": "@pioneer-platform/pioneer-sdk",
|
|
4
|
-
"version": "8.15.
|
|
4
|
+
"version": "8.15.13",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@keepkey/keepkey-sdk": "^0.2.62",
|
|
7
7
|
"@pioneer-platform/loggerdog": "^8.11.0",
|
|
8
|
-
"@pioneer-platform/pioneer-caip": "^9.10.
|
|
8
|
+
"@pioneer-platform/pioneer-caip": "^9.10.1",
|
|
9
9
|
"@pioneer-platform/pioneer-client": "^9.10.11",
|
|
10
|
-
"@pioneer-platform/pioneer-coins": "^9.11.
|
|
11
|
-
"@pioneer-platform/pioneer-discovery": "^8.
|
|
10
|
+
"@pioneer-platform/pioneer-coins": "^9.11.1",
|
|
11
|
+
"@pioneer-platform/pioneer-discovery": "^8.15.13",
|
|
12
12
|
"@pioneer-platform/pioneer-events": "^8.12.0",
|
|
13
13
|
"coinselect": "^3.1.13",
|
|
14
14
|
"eventemitter3": "^5.0.1",
|
package/src/fees/index.ts
CHANGED
|
@@ -48,6 +48,7 @@ function getNetworkName(networkId: string): string {
|
|
|
48
48
|
'bip122:00000000001a91e3dace36e2be3bf030': 'Dogecoin',
|
|
49
49
|
'bip122:000000000000000000651ef99cb9fcbe': 'Bitcoin Cash',
|
|
50
50
|
'bip122:000007d91d1254d60e2dd1ae58038307': 'Dash',
|
|
51
|
+
'bip122:4da631f2ac1bed857bd968c67c913978': 'DigiByte',
|
|
51
52
|
'eip155:1': 'Ethereum',
|
|
52
53
|
'eip155:56': 'BNB Smart Chain',
|
|
53
54
|
'eip155:137': 'Polygon',
|
|
@@ -293,6 +294,7 @@ function normalizeFeeData(
|
|
|
293
294
|
'bip122:000000000000000000651ef99cb9fcbe': 50, // BCH max 50 sat/byte (low fee chain)
|
|
294
295
|
'bip122:000007d91d1254d60e2dd1ae58038307': 50, // DASH max 50 sat/byte (low fee chain)
|
|
295
296
|
'bip122:000000000019d6689c085ae165831e93': 5000, // BTC max 5000 sat/byte (can spike during congestion)
|
|
297
|
+
'bip122:4da631f2ac1bed857bd968c67c913978': 50, // DGB max 50 sat/byte (low fee chain)
|
|
296
298
|
};
|
|
297
299
|
|
|
298
300
|
const matchedNetworkId = networkId && sanityLimits[networkId] ? networkId :
|
package/src/getPubkey.ts
CHANGED
|
@@ -22,11 +22,12 @@ export const getPubkey = async (networkId: string, path: any, sdk: any, context:
|
|
|
22
22
|
script_type: path.script_type,
|
|
23
23
|
};
|
|
24
24
|
const networkIdToType: any = {
|
|
25
|
-
'bip122:000000000019d6689c085ae165831e93': 'UTXO',
|
|
26
|
-
'bip122:000000000000000000651ef99cb9fcbe': 'UTXO',
|
|
27
|
-
'bip122:000007d91d1254d60e2dd1ae58038307': 'UTXO',
|
|
28
|
-
'bip122:00000000001a91e3dace36e2be3bf030': 'UTXO',
|
|
29
|
-
'bip122:12a765e31ffd4059bada1e25190f6e98': 'UTXO',
|
|
25
|
+
'bip122:000000000019d6689c085ae165831e93': 'UTXO', // Bitcoin
|
|
26
|
+
'bip122:000000000000000000651ef99cb9fcbe': 'UTXO', // Bitcoin Cash
|
|
27
|
+
'bip122:000007d91d1254d60e2dd1ae58038307': 'UTXO', // Dash
|
|
28
|
+
'bip122:00000000001a91e3dace36e2be3bf030': 'UTXO', // Dogecoin
|
|
29
|
+
'bip122:12a765e31ffd4059bada1e25190f6e98': 'UTXO', // Litecoin
|
|
30
|
+
'bip122:4da631f2ac1bed857bd968c67c913978': 'UTXO', // DigiByte
|
|
30
31
|
'cosmos:mayachain-mainnet-v1': 'MAYACHAIN',
|
|
31
32
|
'cosmos:osmosis-1': 'OSMOSIS',
|
|
32
33
|
'cosmos:cosmoshub-4': 'COSMOS',
|
package/src/index.ts
CHANGED
|
@@ -44,6 +44,8 @@ const ASSET_COLORS: Record<string, string> = {
|
|
|
44
44
|
'bip122:000000000000000000651ef99cb9fcbe/slip44:145': '#8DC351',
|
|
45
45
|
// Dash
|
|
46
46
|
'bip122:000007d91d1254d60e2dd1ae58038307/slip44:5': '#008CE7',
|
|
47
|
+
// DigiByte
|
|
48
|
+
'bip122:4da631f2ac1bed857bd968c67c913978/slip44:20': '#006AD2',
|
|
47
49
|
// Cosmos
|
|
48
50
|
'cosmos:cosmoshub-4/slip44:118': '#2E3148',
|
|
49
51
|
// Osmosis
|
package/src/supportedCaips.ts
CHANGED
|
@@ -6,6 +6,7 @@ export const UTXO_SUPPORT = [
|
|
|
6
6
|
'bip122:000007d91d1254d60e2dd1ae58038307/slip44:5', // DASH
|
|
7
7
|
'bip122:00000000001a91e3dace36e2be3bf030/slip44:3', // DOGE
|
|
8
8
|
'bip122:12a765e31ffd4059bada1e25190f6e98/slip44:2', // LTC
|
|
9
|
+
'bip122:4da631f2ac1bed857bd968c67c913978/slip44:20', // DGB
|
|
9
10
|
];
|
|
10
11
|
|
|
11
12
|
export const TENDERMINT_SUPPORT = [
|
|
@@ -24,6 +25,7 @@ export const CAIP_TO_COIN_MAP: { [key: string]: string } = {
|
|
|
24
25
|
'bip122:000007d91d1254d60e2dd1ae58038307/slip44:5': 'Dash',
|
|
25
26
|
'bip122:00000000001a91e3dace36e2be3bf030/slip44:3': 'Dogecoin',
|
|
26
27
|
'bip122:12a765e31ffd4059bada1e25190f6e98/slip44:2': 'Litecoin',
|
|
28
|
+
'bip122:4da631f2ac1bed857bd968c67c913978/slip44:20': 'DigiByte',
|
|
27
29
|
};
|
|
28
30
|
|
|
29
31
|
export const OTHER_SUPPORT = ['ripple:4109c6f2045fc7eff4cde8f9905d19c2/slip44:144'];
|
|
@@ -79,7 +79,8 @@ export async function createUnsignedRippleTx(
|
|
|
79
79
|
amount = amount.toString();
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
// Build message -
|
|
82
|
+
// Build message - destination tag is NOT part of the msg structure
|
|
83
|
+
// It's only used in the payment object for KeepKey signing
|
|
83
84
|
const msg: any = {
|
|
84
85
|
type: 'ripple-sdk/MsgSend',
|
|
85
86
|
value: {
|
|
@@ -93,9 +94,7 @@ export async function createUnsignedRippleTx(
|
|
|
93
94
|
to_address: to,
|
|
94
95
|
},
|
|
95
96
|
};
|
|
96
|
-
|
|
97
|
-
msg.DestinationTag = desttag;
|
|
98
|
-
}
|
|
97
|
+
// Note: DestinationTag is handled in the payment object, NOT in msg
|
|
99
98
|
|
|
100
99
|
let tx = {
|
|
101
100
|
type: 'auth/StdTx',
|
|
@@ -109,20 +108,22 @@ export async function createUnsignedRippleTx(
|
|
|
109
108
|
],
|
|
110
109
|
gas: '28000',
|
|
111
110
|
},
|
|
112
|
-
|
|
111
|
+
// memo is NOT used for destination tags on XRP
|
|
112
|
+
// Destination tags are numeric IDs, not memos
|
|
113
|
+
memo: ' ',
|
|
113
114
|
msg: [msg],
|
|
114
115
|
signatures: null,
|
|
115
116
|
},
|
|
116
117
|
};
|
|
117
118
|
|
|
118
|
-
// Build payment object -
|
|
119
|
+
// Build payment object - destinationTag required by desktop, try "undefined" string
|
|
120
|
+
// CRITICAL: Desktop parses to number causing NaN for empty strings
|
|
121
|
+
// Try "undefined" string to see if desktop has special handling
|
|
119
122
|
const payment: any = {
|
|
120
123
|
amount,
|
|
121
124
|
destination: to,
|
|
125
|
+
destinationTag: desttag ? String(desttag) : 'undefined' // Try undefined as string
|
|
122
126
|
};
|
|
123
|
-
if (desttag !== undefined) {
|
|
124
|
-
payment.destinationTag = desttag;
|
|
125
|
-
}
|
|
126
127
|
|
|
127
128
|
//Unsigned TX
|
|
128
129
|
let unsignedTx = {
|