@ledgerhq/live-cli 24.18.1 → 24.18.2-next.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/lib/cli.js +665 -494
- package/package.json +1 -1
package/lib/cli.js
CHANGED
|
@@ -530269,7 +530269,7 @@ var require_package8 = __commonJS({
|
|
|
530269
530269
|
module2.exports = {
|
|
530270
530270
|
name: "@ledgerhq/live-common",
|
|
530271
530271
|
description: "Common ground for the Ledger Live apps",
|
|
530272
|
-
version: "34.
|
|
530272
|
+
version: "34.34.0-next.0",
|
|
530273
530273
|
repository: {
|
|
530274
530274
|
type: "git",
|
|
530275
530275
|
url: "https://github.com/LedgerHQ/ledger-live.git"
|
|
@@ -537070,7 +537070,7 @@ var require_package9 = __commonJS({
|
|
|
537070
537070
|
"package.json"(exports2, module2) {
|
|
537071
537071
|
module2.exports = {
|
|
537072
537072
|
name: "@ledgerhq/live-cli",
|
|
537073
|
-
version: "24.18.
|
|
537073
|
+
version: "24.18.2-next.0",
|
|
537074
537074
|
description: "ledger-live CLI version",
|
|
537075
537075
|
repository: {
|
|
537076
537076
|
type: "git",
|
|
@@ -547457,6 +547457,9 @@ var filecoin_erc20_default2 = filecoin_erc20_default;
|
|
|
547457
547457
|
// ../../libs/ledgerjs/packages/cryptoassets/lib-es/data/spl.json
|
|
547458
547458
|
var spl_default = [["solana/spl/27g8mtk7vttcchkpasjsddkwwyfoqt6ggeukidvjidd4", "solana", "Jupiter Perps LP", "JLP", "27G8MtK7VtTcCHkpASjSDdkWWYfoqT6ggEuKidVJidD4", 6], ["solana/spl/2fpytwczlug1mdrwsyop4d6s1tm7hakhyrjknb5w6pxk", "solana", "Wrapped Ethereum (Sollet)", "soETH", "2FPyTwcZLUg1MDrwsyoP4D6s1tM7hAkHYRjkNb5w6Pxk", 6], ["solana/spl/31k88g5mq7ptbrdf3am13haq6wrqhxhikr8hik7wpygk", "solana", "Graphite", "GP", "31k88G5Mq7ptbRDf3AM13HAq6wRQHXHikR8hik7wPygk", 9], ["solana/spl/3brtivrvsitbmctgtqwp7hxxpsybkjn4xlntpshqa3zr", "solana", "Only1 (LIKE)", "LIKE", "3bRTivrVsitbmCTGtqwp7hxXPsybkjn4XLNtPsHqa3zR", 9], ["solana/spl/3dgccb15hmqsa4pn3tfii5vrk7arqth95ljjxzsg2mug", "solana", "Honeyland", "HXD", "3dgCCb15HMQSA4Pn3Tfii5vRk7aRqTH95LJjxzsG2Mug", 9], ["solana/spl/3nz9jmvbmgaqocybic2c7lqcjscmgsaz6vqqtdzcqmjh", "solana", "Wrapped BTC (Wormhole)", "WBTC", "3NZ9JMVBmGAqocybic2c7LQCJScmgsAZ6vQqTDzcqmJh", 8], ["solana/spl/3psh1mj1f7yufad5gh6zj7epe8hhrmkmetgv5tshqa4o", "solana", "jeo boden", "boden", "3psH1Mj1f7yUfaD5gh6Zj7epE8hhrMkMETgv5TshQA4o", 9], ["solana/spl/4k3dyjzvzp8emzwuxbbcjevwskkk59s5icnly3qrkx6r", "solana", "Raydium", "RAY", "4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R", 6], ["solana/spl/4llbsb5rep3yetyzmxewygjcir5uxtkfurtaeuvc2ahs", "solana", "Parcl", "PRCL", "4LLbsb5ReP3yEtYzmXewyGjcir5uXtKFURtaEUVC2AHs", 6], ["solana/spl/4vmsout2bwatfweudnqm1xedrlfjgj7hswhcpz4xgbty", "solana", "HONEY", "HONEY", "4vMsoUT2BWatFweudnQM1xedRLfJgJ7hswhcpz4xgBTy", 9], ["solana/spl/5maydfq5yxtudahtfyumbuhzjgabas9tbeyeqyahds5y", "solana", "Access Protocol", "ACS", "5MAYDfq5yxtudAhtfyuMBuHZjgAbaS9tbEyEQYAhDS5y", 6], ["solana/spl/5ovnbeeeqvyi1cx3ir8dx5n1p7pdxydbgf2x4txvusjm", "solana", "Infinity", "INF", "5oVNBeEEQvYi1cX3ir8Dx5n1P7pdxydbGF2X4TxVusJm", 9], ["solana/spl/6dkcowjpj5mfu5gwdefdpuuebasblk3wlewhuzqpaa1e", "solana", "CHEX", "CHEX", "6dKCoWjpj5MFU5gWDEFdpUUeBasBLK3wLEwhUzQPAa1e", 8], ["solana/spl/6gncphxtlnud76hjqusypenlszdg8rvdb1ptlm5alsja", "solana", "BSKT", "BSKT", "6gnCPhXtLnUD76HjQuSYPENLSZdG8RvDB1pTLM5aLSJA", 5], ["solana/spl/7atgf8kqo4wjrd5atgx7t1v2zvvykpjbffnevf1icfv1", "solana", "catwifhat", "CWIF", "7atgF8KQo4wJrD5ATGX7t1V2zVvykPJbFfNeVf1icFv1", 2], ["solana/spl/7dhbwxmci3dt8ufywyzweblxgycu7y3il6trkn1y7arj", "solana", "Lido Staked SOL", "stSOL", "7dHbWXmci3dT8UFYWYZweBLXgycu7Y3iL6trKn1Y7ARj", 9], ["solana/spl/7gcihgdb8fe6knjn2mytkzzcrjqy3t9ghdc8uhymw2hr", "solana", "POPCAT", "POPCAT", "7GCihgDB8fe6KNjn2MYtkzZcRjQy3t9GHdC8uHYmW2hr", 9], ["solana/spl/7i5kksx2weitkry7ja4zwsuxghs5ejbejy8vvxr4pfrx", "solana", "GMT", "GMT", "7i5KKsX2weiTkry7jA4ZwSuXGhs5eJBEjY8vVxR4pfRx", 9], ["solana/spl/7q2afv64in6n6sezsaab81tjzwdod6zpqmhkzi9dcavn", "solana", "JPOOL Solana Token", "JSOL", "7Q2afV64in6N6SeZsAAB81TJzwDoD6zpqmHkzi9Dcavn", 9], ["solana/spl/7vfcxtuxx5wjv5jadk17duj4ksgau7utnkj4b963voxs", "solana", "Wrapped Ether (Wormhole)", "ETH", "7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs", 8], ["solana/spl/7xkxtg2cw87d97txjsdpbd5jbkhetqa83tzrujosgasu", "solana", "Samoyed Coin", "SAMO", "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU", 9], ["solana/spl/85vbfqzc9tzkfaptbwjvuw7ybzjy52a6mjtpgjstqamq", "solana", "Wormhole Token", "W", "85VBFQZC9TZkfaptBWjvUw7YbZjy52A6mjtPGjstQAmQ", 6], ["solana/spl/947teog318gumyjvyhranrvwpmx7fpbtdqfbojvsksg3", "solana", "Solchat", "CHAT", "947tEoG318GUmyjVYhraNRvWpMX7fpBTDQFBoJvSkSG3", 9], ["solana/spl/a11bdaauv8ib2fu7x6axavdto1qz8fxb3kk5eecdasp", "solana", "Allbridge", "ABR", "a11bdAAuV8iB2fu7X6AxAvDTo1QZ8FXB3kk5eecdasp", 9], ["solana/spl/a1klobrkbde8ty9qtnqutq3c2ortoc3u7twggz7seto6", "solana", "Ondo US Dollar Yield", "USDY", "A1KLoBrKBde8Ty9qtNQUtq3C2ortoC3u7twggz7sEto6", 6], ["solana/spl/act_i_the_ai_prophecy_gjafwwjj3vntsrqvabjbvk2tyb1ytrcqxrdfdgunpump", "solana", "Act I : The AI Prophecy", "ACT", "GJAFwWjJ3vnTsrQVabjBVK2TYB1YtRCQXRDfDgUnpump", 6], ["solana/spl/afbx8ogjgpmvfywbvouvhqsrmiw2ar1mohfahi4y2adb", "solana", "GST", "GST", "AFbX8oGjGpmVFywbVouvhQSRmiW2aR1mohfahi4Y2AdB", 9], ["solana/spl/ai16z_help6nuqkmyb4pywo2zys22meshxpqyzxbb8n4v98jwc", "solana", "ai16z", "ai16z", "HeLp6NuQkmYB4pYWo2zYs22mESHXPQYzXbB8n4V98jwC", 9], ["solana/spl/amuwxpsqwsd1fbcgzwsrrkdcnoduuwmkdr38qpdit8g8", "solana", "Amulet", "AMU", "AMUwxPsqWSd1fbCGzWsrRKDcNoduuWMkdR38qPdit8G8", 9], ["solana/spl/analos_7it1gryyheop2nv1dycwk2mgylmphq47whpgswiqcug5", "solana", "ANALOS", "ANALOS", "7iT1GRYYhEop2nV1dyCwK2MGyLmPHq47WhPGSwiqcUg5", 8], ["solana/spl/at79reyu9xthutf5vm6q4oa9k8w7918fp5su7g1mdmqy", "solana", "SpiderSwap", "SPDR", "AT79ReYU9XtHUTF5vM6Q4oa9K8w7918Fp5SU7G1MDMQY", 9], ["solana/spl/atlasxmbpqxbuybxpsv97usa3fpqyeqzqbuhgifcusxx", "solana", "Star Atlas", "ATLAS", "ATLASXmbPQxBUYbxPsV97usA3fPQYEqzQBUHgiFCUsXx", 8], ["solana/spl/atrluhph8dxnpny4wsnw7fxkhbeivbrtwby6bfb4xplj", "solana", "Artrade Token", "ATR", "ATRLuHph8dxnPny4WSNW7fxkhbeivBrtWbY6BfB4xpLj", 9], ["solana/spl/auryydfxjib1zktir1jn1j9ecyutjb6rkqvmtyaixwpp", "solana", "Aurory", "AURY", "AURYydfxJib1ZkTir1Jn1J9ECYUtjb6rKQVmtYaixWPP", 9], ["solana/spl/ava_ai_dku9kyksfbn5lbffxtnndpax35o4fv6vj9fkk7pzpump", "solana", "Ava AI", "AVA", "DKu9kykSfbN5LBfFXtNNDPaX35o4Fv6vJ9FKk7pZpump", 6], ["solana/spl/beer_aujtjj7ams8ldo3bfzoyxdwt3jbalubu4vzhzzdtzlmg", "solana", "BEER", "BEER", "AujTJJ7aMS8LDo3bFzoyXDwT3jBALUbu4VZhzZdTZLmG", 6], ["solana/spl/ben_the_dog_ahw5n8iqzobtcbepksjzz61xtauszbdcpxtrlg6kukpk", "solana", "Ben the Dog", "BENDOG", "AHW5N8iqZobTcBepkSJzZ61XtAuSzBDcpxtrLG6KUKPk", 9], ["solana/spl/bidb55p4g3n1fghwkfpxsokbmqgctl4qnzpdh1bvqxmd", "solana", "Decimated", "DIO", "BiDB55p4G3n1fGhwKFpxsokBMqgctL4qnZpDH1bVQxMD", 9], ["solana/spl/binance_staked_sol_bnso1vujnh4zcfpza6986ea66p6tcp59hvtnj8b1x85", "solana", "Binance Staked SOL", "BNSOL", "BNso1VUJnh4zcfpZa6986Ea66P6TCp59hvtNJ8b1X85", 9], ["solana/spl/bio_bioj9jtqw62mlz7ukhu69gtkhppgi1bqhccj2kmsvuj", "solana", "BIO", "BIO", "bioJ9JTqW62MLz7UKHU69gtKhPpGi1BQhccj2kmSvUJ", 9], ["solana/spl/blzeeuzubvqfhj8adccfpjvpvcicyvmh3hkjmru8kuja", "solana", "Blaze", "BLZE", "BLZEEuZUBVqFhj8adcCFPJvPVCiCyVmh3hkJMrU8KuJA", 9], ["solana/spl/bso13r4tkie4kuml71lshtppl2eubylfx6h9hp3piy1", "solana", "BlazeStake Staked SOL (bSOL)", "bSOL", "bSo13r4TkiE4KumL71LsHTPpL2euBYLFx6h9HP3piy1", 9], ["solana/spl/cat_in_a_dogs_world_mew1gqwj3nexg2qgeriku7fafj79phvqvrequzscpp5", "solana", "cat in a dogs world", "MEW", "MEW1gQWJ3nEXg2qgERiKu7FAFj79PHvQVREQUzScPP5", 5], ["solana/spl/ckaktyvz6dkpymvyq9rh3ubrnnqyzayd7if4hjtjuvks", "solana", "Gari", "GARI", "CKaKtYvz6dKPyMvYq9Rh3UBrnNqYZAyd7iF4hJtjUvks", 9], ["solana/spl/cvb1ztjvpyqpvdpbeptrzjl4aqidjydtuz61nwgcgqtp", "solana", "Epics Token", "EPCT", "CvB1ztJvpYQPvdPBePtRzjL4aQidjydtUz61NWgcgQtP", 6], ["solana/spl/daddy_tate_4cnk9epnw5ixflzatcpjjdb1putcrpvvgtqukm9epump", "solana", "DADDY TATE", "DADDY", "4Cnk9EPnW5ixfLZatCPJjDB1PUtcRpVVgTQukm9epump", 6], ["solana/spl/dezxaz8z7pnrnrjjz3wxborgixca6xjnb7yab1ppb263", "solana", "Bonk", "BONK", "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263", 5], ["solana/spl/dfl1znkagpwm1bqavqrjczvhmwtfreajtbzjwgseonjh", "solana", "DeFi Land", "DFL", "DFL1zNkaGPWm1BqAVqRjCZvHmwTFrEaJtbzJWgseoNJh", 9], ["solana/spl/echesyfxepkdltoizsl8pbe8myagyy8zrqsacncfgnvp", "solana", "Bonfida", "FIDA", "EchesyfXePKdLtoiZSL8pBe8Myagyy8ZRqsACNCFGnvp", 6], ["solana/spl/ekpqgsjtjmfqkz9kqansqyxrcf8fbopzlhyxdm65zcjm", "solana", "dogwifhat", "WIF", "EKpQGSJtjMFqKZ9KQanSqYXRcF8fBopzLHYxdM65zcjm", 6], ["solana/spl/epjfwdd5aufqssqem2qn1xzybapc8g4weggkzwytdt1v", "solana", "USD Coin", "USDC", "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", 6], ["solana/spl/es9vmfrzacermjfrf4h2fyd4kconky11mcce8benwnyb", "solana", "USDT", "USDT", "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB", 6], ["solana/spl/etatlmcmsoieekfnrhkj2kyy3moabhu6nqvpsfij5tds", "solana", "Media Network", "MEDIA", "ETAtLmCmsoiEEKfNrHKJ2kYy3MoABhU6NQvpSfij5tDs", 6], ["solana/spl/fanoyuaqzx7ahcnxqslewq6te63f6zs6enkbnccyyuzu", "solana", "SuperFans.Tech", "FAN", "FANoyuAQZx7AHCnxqsLeWq6te63F6zs6ENkbncCyYUZu", 9], ["solana/spl/fartcoin_9bb6nfecjbctnnlfko2fqvqbq8hhm13kcyycdqbgpump", "solana", "Fartcoin ", "Fartcoin", "9BB6NFEcjBCtnNLFko2FqVQBq8HHM13kCyYcdQbgpump", 6], ["solana/spl/fluxbmpht3fd1edvfdg46yreqhbenypn1h4ebntzwerx", "solana", "FluxBot", "FLUXB", "FLUXBmPhT3Fd1EDVFdg46YREqHBeNypn1h4EbnTzWERX", 5], ["solana/spl/foxymu5xwxre7zeosvzvirk3ngawhup9kuh97y2ndhcq", "solana", "Famous Fox Federation", "FOXY", "FoXyMu5xwXre7zEoSvzViRk3nGawHUp9kUh97y2NDhcq", 0], ["solana/spl/ftggsfadxbtroxq8vcausxrr2of47qbf5as1ntzcu4gd", "solana", "BRZ", "BRZ", "FtgGSFADXBtroxq8VCausXRr2of47QBf5AS1NtZCu4GD", 4], ["solana/spl/fwog_a8c3xuqscfmylrte3vmtqraq8kgmasius9afnanwpump", "solana", "FWOG", "FWOG", "A8C3xuqscfmyLrte3VmTqrAq8kgMASius9AFNANwpump", 6], ["solana/spl/gamestop_8wxtpeu6557etkp9whfy1n1ecu6nxdvbagghgsmyihsb", "solana", "GameStop", "GME", "8wXtPeU6557ETkp9WHFY1n1EcU6NxDvbAggHGsMYiHsB", 9], ["solana/spl/gdfnesia2wlaw5t8yx2x5j2mkfa74i5kwgdduzht7xmg", "solana", "CROWN Token", "CROWN", "GDfnEsia2WLAW5t8yx2X5j2mkfA74i5kwGdDuZHt7XmG", 9], ["solana/spl/geneth5amgsi8khatqoezp1xexwzj8vcuepynxdkrmyz", "solana", "Genopets", "GENE", "GENEtH5amGSi8kHAtQoezp1XEXwZJ8vcuePYnXdKrMYz", 9], ["solana/spl/gfx1zjr2p15tmrswow6fjydycekofb4p4gjcplbjaxhd", "solana", "GooseFX", "GOFX", "GFX1ZjR2P15tmrSwow6FjyDYcEkoFb4p4gJCpLBjaxHD", 9], ["solana/spl/gigachad_63lfdmnb3mq8mw9mtz2to9bea2m71kzuugq5tijxcqj9", "solana", "GIGACHAD", "GIGA", "63LfDmNb3MQ8mw9MtZ2To9bEA2M71kZUUGq5tiJxcqj9", 5], ["solana/spl/goatseus_maximus_czlsujwblfssjncfkh59rufqvafwcy5tzedwjsuypump", "solana", "Goatseus Maximus", "GOAT", "CzLSujWBLFsSjncfkh59rUFqvafWcY5tzedWJSuypump", 6], ["solana/spl/gth3wg3nerjwcf7vgcoxexkgxshvyhx5gtateem5jas1", "solana", "Whales Market", "WHALES", "GTH3wG3NErjwcf7VGCoXEXkgXSHvYhx5gtATeeM5JAS1", 6], ["solana/spl/h53ugeybrb9easo9ego8yyk7o4zq1g5cctkxd3e3hzav", "solana", "MXM", "MXM", "H53UGEyBrB9easo9ego8yYk7o4Zq1G5cCtkxD3E3hZav", 6], ["solana/spl/heyanon_9mcvh6w97oewlmpxqqeohuav3u5iymyq9aezzhguyf1t", "solana", "HeyAnon", "Anon", "9McvH6w97oewLmPxqQEoHUAv3u5iYMyQ9AeZZhguYf1T", 9], ["solana/spl/hhjoywup5au6pnrvn4s2pweerwxnzkhxkgyjrjmobjlw", "solana", "PIP", "PIP", "HHjoYwUp5aU6pnrvN4s2pwEErwXNZKhxKGYjRJMoBjLw", 9], ["solana/spl/hhjpbhrrn4g56vsylut8dl5bv31hkxqsrahttuczezg4", "solana", "Myro", "MYRO", "HhJpBhRRn4g56VsyLuT8DL5Bv31HkXqsrahTTUCZeZg4", 9], ["solana/spl/hntyvp6yfm1hg25tn9wglqm12b8tqmcknkrdu1oxwux", "solana", "Helium Network Token", "HNT", "hntyVP6YFm1Hg25TN9WGLqM12b8TQmcknKrdu1oxWux", 8], ["solana/spl/hxhwkvpk5ns4ltg5nij2g671ckxfrkpk8vy271ub4uek", "solana", "Hxro (Portal)", "HXRO", "HxhWkVpk5NS4Ltg5nij2G671CKXFRKPK8vy271Ub4uEK", 8], ["solana/spl/hz1jovnivvgrgniiyveozevgz58xau3rkwx8eacqbct3", "solana", "Pyth Network", "PYTH", "HZ1JovNiVvGrGNiiYvEozEVgZ58xaU3RKwX8eACQBCt3", 6], ["solana/spl/hzwqbkzw8hxmn6bf2yfznrht3c2ixxzpkcfu7ubedktr", "solana", "EURC", "EURC", "HzwqbKZw8HxMN6bF2yFZNrht3c2iXXzpKcFu7uBEDKtr", 6], ["solana/spl/io_bzlbgtncsffoth2gydtwr7e4imwzpr5jqcuugewr646k", "solana", "IO", "IO", "BZLbGTNCSFfoth2GYDtwr7e4imWzpR5jqcUuGEwr646K", 8], ["solana/spl/iotevvzleywotn1qdwnpddxpwszn3zfheot3mfl9fns", "solana", "Helium IOT", "IOT", "iotEVVZLEywoTn1QdwNPddxPWszn3zFhEot3MfL9fns", 6], ["solana/spl/j1toso1uck3rlmjorhttrvwy9hj7x8v9yyac6y7kgcpn", "solana", "Jito Staked SOL", "JITOSOL", "J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn", 9], ["solana/spl/j2lwssxx4r3pybj1fwux5nqo7ppxjcgppub2zhnadwka", "solana", "DePlan", "DPLN", "J2LWsSXx4r3pYbJ1fwuX5Nqo7PPxjcGPpUb2zHNadWKa", 6], ["solana/spl/jtojtomepa8bep8auqc6ext5frijwffmwqx2v2f9mcl", "solana", "JITO", "JTO", "jtojtomepa8beP8AuQc6eXt5FriJwfFMwQx2v2f9mCL", 9], ["solana/spl/jupiter_staked_sol_jupsolahxqizztsfewmtrrgpnyfm8f6szdoswbjx93v", "solana", "Jupiter Staked SOL", "JupSOL", "jupSoLaHXQiZZTSfEWMTRRgpnyFm8f6sZdosWBjx93v", 9], ["solana/spl/jupyiwryjfskupiha7hker8vutaefosybkedznsdvcn", "solana", "Jupiter", "JUP", "JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN", 6], ["solana/spl/just_a_chill_guy_df6yfrkc8kze3knkrherkzaetsxbrweniqfyjy4jpump", "solana", "Just a chill guy", "CHILLGUY", "Df6yfrKC8kZE3KNkrHERKzAetSxbrWeniQfyJY4Jpump", 6], ["solana/spl/kamino_kmno3njsbxfcpjtvhzcxlw7rmtwtt4gvfe7suubo9ss", "solana", "Kamino", "KMNO", "KMNo3nJsBXfcpJTVhZcXLW7RmTwTt4GVFE7suUBo9sS", 6], ["solana/spl/kinxdecpdqehpeuqnqmugtyykqkgvfq6cevx5iahjq6", "solana", "KIN", "KIN", "kinXdEcpDQeHPEuQnqmUgtYykqKGVFq6CeVX5iAHJq6", 5], ["solana/spl/lainetnlgpmcp9rvsf5hn8w6ehniklzqti1xfwmly6x", "solana", "Laine Stake Token", "laineSOL", "LAinEtNLgpmCP9Rvsf5Hn8W6EhNiKLZQti1xfWMLy6X", 9], ["solana/spl/lfntyraetvioapngjht4yng2auzfxr776cmen9vmjxp", "solana", "Lifinity", "LFNTY", "LFNTYraetVioAPnGJht4yNg2aUZFXR776cMeN9VMjXp", 6], ["solana/spl/lstxxxnjzkdfslr4dukpcmcf5vyryeqzplz5j4bpxfp", "solana", "Liquid Staking Token", "LST", "LSTxxxnJzKDFSLr4dUkPcmCf5VyryEqzPLz5j4bpxFp", 9], ["solana/spl/magic_eden_mefnbxixkebait3xn9bkm8wsjzxtvsajen4c8sam21u", "solana", "Magic Eden", "ME", "MEFNBXixkEbait3xn9bkm8WsJzXtVsaJEn4c8Sam21u", 6], ["solana/spl/mangoczj36ajzykwvj3vnyu4gtonjfvenjmvvwaxlac", "solana", "Mango", "MNGO", "MangoCzJ36AjZyKwVj3VnYU4GTonjfVEnJmvvWaxLac", 6], ["solana/spl/mb1eu7tzec71kxdpsmskoucssuuoglv1drys1op2jh6", "solana", "Helium Mobile", "MOBILE", "mb1eu7TzEc71KxDpsmsKoucSSuuoGLv1drys1oP2jh6", 6], ["solana/spl/melania_meme_fuafbo2jgks6gb4z4lfzkqszgznucisehqnnebarxm1p", "solana", "Melania Meme", "MELANIA", "FUAfBo2jgks6gB4Z4LfZkqSZgzNucisEHqnNebaRxM1P", 6], ["solana/spl/metaewgxypbgwsseh8t16a39cq5vyvxzi9zxidpy18m", "solana", "Metaplex Token", "MPLX", "METAewgxyPbgwsseH8T16a39CQ5VyVxZi9zXiDPY18m", 6], ["solana/spl/mndefzgvmt87ueuhvvu9vctqsap5b3ftgpshuupa5ey", "solana", "Marinade", "MNDE", "MNDEFzGvMt87ueuHvVU9VcTqsAP5b3fTGPsHuuPA5ey", 9], ["solana/spl/moo_deng_ed5nyywezpppiwimp8vym7sd7td3lat3q3grtwhzpjby", "solana", "Moo Deng", "MOODENG", "ED5nyyWEzpPPiWimP8vYm7sD7TD3LAt3Q3gRTWHzPJBY", 6], ["solana/spl/msolzycxhdygdzu16g5qsh3i5k3z3kzk7ytfqcjm7so", "solana", "Marinade staked SOL (mSOL)", "mSOL", "mSoLzYCxHdYgdzU16g5QSh3i5K3z3KZK7ytfqcJm7So", 9], ["solana/spl/neontjsjsuo3rexg9o6vhumxw62f9v7zvmu8m8zut44", "solana", "Neon EVM Token", "NEON", "NeonTjSjsuo3rexg9o6vHuMXw62f9V7zvmu8M8Zut44", 9], ["solana/spl/nftukr4u7wkxy9qlax2tgvd9ozswomo4jqsjqdmb7nk", "solana", "Blockasset", "BLOCK", "NFTUkR4u7wKxy9QLaX2TGvd9oZSWoMo4jqSJqdMb7Nk", 6], ["solana/spl/nosxbvoacttydlvky6csb4ac8jcdqkkaawytx2zmoo7", "solana", "Nosana", "NOS", "nosXBVoaCTtYdLvKY6Csb4AC8JCdQKKAaWYtx2ZMoo7", 6], ["solana/spl/nyan_nyanpap9cr7yarbnrby7xx4xu6no6jktbuohna3yscp", "solana", "NYAN", "NYAN", "NYANpAp9Cr7YarBNrby7Xx4xU6No6JKTBuohNA3yscP", 9], ["solana/spl/octo82drbedm8csdaekbymvn86tbtgmpnddme64ptqj", "solana", "Octokn", "OTK", "octo82drBEdm8CSDaEKBymVn86TBtgmPnDdmE64PTqJ", 9], ["solana/spl/official_trump_6p6xghyf7aee6tzksmfsko444wqop15icusqi2jfgipn", "solana", "OFFICIAL TRUMP", "TRUMP", "6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN", 6], ["solana/spl/orcaektdk7lkz57vaayr9qensvepfiu6qemu1kektze", "solana", "Orca", "ORCA", "orcaEKTdK7LKz57vaAYr9QeNsVEPfiu6QeMU1kektZE", 6], ["solana/spl/peanut_the_squirrel_2qehjdldlbubgryvsxhc5d6udwaivnfzgan56p1tpump", "solana", "Peanut the Squirrel ", "Pnut", "2qEHjDLDLbuBgRYvsxhc5D6uDWAivNFZGan56P1tpump", 6], ["solana/spl/poliswxnnrwc6obu1vhiukqzfjgl4xdsu4g9qjz9qvk", "solana", "Star Atlas DAO", "POLIS", "poLisWXnNRwC6oBu1vHiuKQzFjGL4XDSu4g9qjz9qVk", 8], ["solana/spl/pudgy_penguins_2zmmhcvqexdtde6vsfs7s7d5ouodfjhe8vd1gnbouauv", "solana", "Pudgy Penguins", "PENGU", "2zMMhcVQEXDtdE6vsFS7S7D5oUodfJHE8vd1gnBouauv", 6], ["solana/spl/pundu_wskzskqew3zsmrhpaevfvzb6puulzwov9mjwzsfdepc", "solana", "PUNDU", "PUNDU", "WskzsKqEW3ZsmrhPAevfVZb6PuuLzWov9mJWZsfDePC", 9], ["solana/spl/rifampicin_gjtjuwd9qycckrwmbmty1tpapv1skfb2zuv9q4aqpump", "solana", "Rifampicin", "RIF", "GJtJuWD9qYcCkrwMBmtY1tpapV1sKfB2zUv9Q4aqpump", 6], ["solana/spl/rlbxxfkseaz4rgjh3sqn8jxxhmgoz9jwxdnjmh8pl7a", "solana", "Rollbit Coin", "RLB", "RLBxxFkseAZ4RgJH3Sqn8jXxhmGoz9jWxDNJMh8pL7a", 2], ["solana/spl/rndrizkt3mk1iimdxrdwabcf7zg7ar5t4nud4ekhbof", "solana", "Render Token", "RENDER", "rndrizKT3MK1iimdxRdWabcF7Zg7AR5T4nud4EkHBof", 8], ["solana/spl/saber_protocol_token_saber2glauyim4mvftnrasomsv6nvauncvmezwclpd1", "solana", "Saber Protocol Token", "SBR", "Saber2gLauYim4Mvftnrasomsv6NvAuncvMEZwcLpD1", 6], ["solana/spl/scsuppnusyplbsv4darsryng4anpgaghkhsa3gmmyjz", "solana", "Solcasino Token", "SCS", "SCSuPPNUSypLBsV4darsrYNg4ANPgaGhKhsA3GmMyjz", 5], ["solana/spl/serum_srmuapvndxxokk5gt7xd5cuugxmbcoaz2lheuaokwrt", "solana", "Serum", "SRM", "SRMuApVNdxXokk5GT7XD5cUUgXMBCoAz2LHeuAoKWRt", 6], ["solana/spl/sharksyjjqanyxvfrpnbn9pjgkhwdhatnmyicwpnr1s", "solana", "Sharky", "SHARK", "SHARKSYJjqaNyxVfrpnBN9pjgkhwDhatnMyicWPnr1s", 6], ["solana/spl/shdwybxihqicj6yekg2gur7wqklelamk1ghzck9pl6y", "solana", "Shadow Token", "SHDW", "SHDWyBxihqiCj6YekG2GUr7wqKLeLAMK1gHZck9pL6y", 9], ["solana/spl/slerf_7bgbvyjrzx1ykz4oh9mjb8zscatkkwb8dzfx7loivkm3", "solana", "SLERF", "SLERF", "7BgBvyjrZX1YKz4oh9mjb8ZScatkkwb8DzFx7LoiVkM3", 9], ["solana/spl/slndpmowtvadgedndyvwzronl7zsi1df9pc3xhgtpwp", "solana", "Solend", "SLND", "SLNDpmoWTVADgEdndyvWzroNL7zSi1dF9PC3xHGtPwp", 6], ["solana/spl/snsnkv9zfg5zkwqs6x4hxvbrv6s8sqmfsgctecdvdmd", "solana", "SynesisOne", "SNS", "SNSNkV9zfG5ZKWQs6x4hxvBRV6s8SqMfSGCtECDvdMd", 9], ["solana/spl/so11111111111111111111111111111111111111112", "solana", "Wrapped SOL", "SOL", "So11111111111111111111111111111111111111112", 9], ["solana/spl/sols_2wme8evkw8qsfsk2b3qex4s64ac6wxhpxb3grdckekio", "solana", "sols", "sols", "2wme8EVkw8qsfSk2B3QeX4S64ac6wxHPXb3GrdckEkio", 9], ["solana/spl/spx6900_wormhole_j3nkxxxzcnnimjkw9hyb2k4luxgwb6t1ftptqvsv3kfr", "solana", "SPX6900 (Wormhole)", "SPX", "J3NKxxXZcnNiMjKw9hYb2K4LUxgwB6t1FtPtQVsv3KFr", 8], ["solana/spl/stepascqoeiofxxwgnh2slbdfp9d8rvkz2yp39idpyt", "solana", "Step", "STEP", "StepAscQoEioFxxWGnh2sLBDFp9d8rvKz2Yp39iDpyT", 9], ["solana/spl/taki7fi3zicv7du1xnawlaf6mrk7ikdn77hegzgwvo4", "solana", "Taki", "TAKI", "Taki7fi3Zicv7Du1xNAWLaf6mRK7ikdn77HeGzgwvo4", 9], ["solana/spl/test_griffain_com_kenjsuylashumfhyy5o4hp2fdnqzg1asuphfh2kyvep", "solana", "test griffain.com", "GRIFFAIN", "KENJSUYLASHUMfHyy5o4Hp2FdNqZg1AsUPhfH2kYvEP", 6], ["solana/spl/tnsrxcuxot9xbg3de7pijytdyu7ksklqcpddxnejas6", "solana", "Tensor", "TNSR", "TNSRxcUxoT9xBG3de7PiJyTDYu7kskLqcpddxnEJAS6", 9], ["solana/spl/ukhh6c7mmyiwcf1b9pnwe25tspkddt3h5pqzgz74j82", "solana", "BOOK OF MEME", "BOME", "ukHH6c7mMyiWCf1b9pnWe25TSpkDDt3H5pQZgZ74J82", 6], ["solana/spl/unicorn_fart_dust_el5fuxj2j4ciqsmw85k5fg9dvuqjjuobhoqbi2kpump", "solana", "Unicorn Fart Dust", "UFD", "eL5fUxj2J4CiQsmW85k5FG9DvuQjjUoBHoQBi2Kpump", 6], ["solana/spl/urolithin_a_fvgqhmfl9yn39v79hudpy3yundoyjpulwng2jfmqpump", "solana", "Urolithin A", "URO", "FvgqHMfL9yn39V79huDPy3YUNDoYJpuLWng2JfmQpump", 6], ["solana/spl/uxphbor3qg4ucignjfv7mqhhyfqkn68g45goyvael2m", "solana", "UXP Governance Token", "UXP", "UXPhBoR3qG4UCiGNJfV7MqhHyFqKN68g45GoYvAeL2M", 9], ["solana/spl/wenwenvqqnya429ubcdr81zmd69brwqaabyy6p3lcpk", "solana", "Wen", "WEN", "WENWENvqqNya429ubCdR81ZmD69brwQaaBYY6p3LCpk", 5], ["solana/spl/xxxxa1skngwftw2kfn8xauw9xq8hbz5kvtcsestt9fw", "solana", "Solanium", "SLIM", "xxxxa1sKNGwFtw2kFn8XauW9xq8hBZ5kVtcSesTT9fW", 6], ["solana/spl/yomfpuqz1wjwysfd5tzjuts3bnb8xs8mx9xzbv8rl39", "solana", "YOM", "YOM", "yomFPUqz1wJwYSfD5tZJUtS3bNb8xs8mx9XzBv8RL39", 9], ["solana/spl/zebeczgi5fsetbpfqkvzkcj3wgyxxjkmuknnx7flkaf", "solana", "ZEBEC", "ZBC", "zebeczgi5fSEtbpfQKVZKCJ3WgYXxjkMUkNNx7fLKAF", 9], ["solana/spl/zerebro_8x5vqbha8d7nkd52unus5nnt3pwa8pld34ymskeso2wn", "solana", "zerebro", "ZEREBRO", "8x5VqbHA8D7NkD52uNuS5nnt3PwA8pLD34ymskeSo2Wn", 6], ["solana/spl/zeus1ar7ax8dffjf5qjwj2ftdddntromngo8yoqm3gq", "solana", "ZEUS", "ZEUS", "ZEUS1aR7aX8DFFJf5QjWj2ftDDdNTroMNGo8YoQm3Gq", 6]];
|
|
547459
547459
|
|
|
547460
|
+
// ../../libs/ledgerjs/packages/cryptoassets/lib-es/data/spl-hash.json
|
|
547461
|
+
var spl_hash_default = 'W/"082078d766333b5edee7a44d13aba40837ce6bdb"';
|
|
547462
|
+
|
|
547460
547463
|
// ../../libs/ledgerjs/packages/cryptoassets/lib-es/data/spl.js
|
|
547461
547464
|
var spl_default2 = spl_default;
|
|
547462
547465
|
|
|
@@ -558492,7 +558495,7 @@ var value = "cli/0.0.0";
|
|
|
558492
558495
|
setEnv("LEDGER_CLIENT_VERSION", value);
|
|
558493
558496
|
|
|
558494
558497
|
// src/live-common-setup.ts
|
|
558495
|
-
var
|
|
558498
|
+
var import_invariant68 = __toESM(require("invariant"));
|
|
558496
558499
|
|
|
558497
558500
|
// ../../libs/ledgerjs/packages/hw-transport-mocker/lib-es/RecordStore.js
|
|
558498
558501
|
function RecordStoreInvalidSynthax(message2) {
|
|
@@ -559212,7 +559215,7 @@ var disconnect = (deviceId) => {
|
|
|
559212
559215
|
|
|
559213
559216
|
// ../../libs/ledger-live-common/lib-es/load/speculos.js
|
|
559214
559217
|
var import_sample = __toESM(require("lodash/sample"));
|
|
559215
|
-
var
|
|
559218
|
+
var import_invariant67 = __toESM(require("invariant"));
|
|
559216
559219
|
var import_path2 = __toESM(require("path"));
|
|
559217
559220
|
var import_semver13 = __toESM(require_semver2());
|
|
559218
559221
|
var import_fs2 = require("fs");
|
|
@@ -560363,7 +560366,7 @@ var getDefaultAccountName = (account3) => {
|
|
|
560363
560366
|
|
|
560364
560367
|
// ../../libs/ledger-live-common/lib-es/account/formatters.js
|
|
560365
560368
|
var import_bignumber340 = require("bignumber.js");
|
|
560366
|
-
var
|
|
560369
|
+
var import_invariant66 = __toESM(require("invariant"));
|
|
560367
560370
|
|
|
560368
560371
|
// ../../libs/ledger-live-common/lib-es/account/serialization.js
|
|
560369
560372
|
var import_memoize2 = __toESM(require("lodash/memoize"));
|
|
@@ -581508,11 +581511,11 @@ function wrapConsoleMethod(name3) {
|
|
|
581508
581511
|
}
|
|
581509
581512
|
};
|
|
581510
581513
|
}
|
|
581511
|
-
(function(
|
|
581512
|
-
|
|
581513
|
-
|
|
581514
|
-
|
|
581515
|
-
|
|
581514
|
+
(function(invariant126) {
|
|
581515
|
+
invariant126.debug = wrapConsoleMethod("debug");
|
|
581516
|
+
invariant126.log = wrapConsoleMethod("log");
|
|
581517
|
+
invariant126.warn = wrapConsoleMethod("warn");
|
|
581518
|
+
invariant126.error = wrapConsoleMethod("error");
|
|
581516
581519
|
})(invariant9 || (invariant9 = {}));
|
|
581517
581520
|
function setVerbosity(level2) {
|
|
581518
581521
|
var old = verbosityLevels[verbosityLevel];
|
|
@@ -623107,6 +623110,10 @@ var getLastERC1155Operations = async (currency24, address4, accountId2, fromBloc
|
|
|
623107
623110
|
return Object.values(opsByHash).map((events2) => events2.map((event, index) => etherscanERC1155EventToOperations(accountId2, event, index))).flat(2);
|
|
623108
623111
|
};
|
|
623109
623112
|
var getLastNftOperations = async (currency24, address4, accountId2, fromBlock, toBlock2) => {
|
|
623113
|
+
const config4 = getCoinConfig(currency24).info;
|
|
623114
|
+
if (!config4.showNfts) {
|
|
623115
|
+
return [];
|
|
623116
|
+
}
|
|
623110
623117
|
const erc721Ops = await getLastERC721Operations(currency24, address4, accountId2, fromBlock, toBlock2);
|
|
623111
623118
|
const erc1155Ops = await getLastERC1155Operations(currency24, address4, accountId2, fromBlock, toBlock2);
|
|
623112
623119
|
return [...erc721Ops, ...erc1155Ops].sort(
|
|
@@ -623215,8 +623222,8 @@ var getLastOperations2 = async (currency24, address4, accountId2, fromBlock) =>
|
|
|
623215
623222
|
ledgerExplorerOps.forEach((ledgerOp) => {
|
|
623216
623223
|
const coinOps = ledgerOperationToOperations(accountId2, ledgerOp);
|
|
623217
623224
|
const erc20Ops = ledgerOp.transfer_events.flatMap((event, index) => ledgerERC20EventToOperations(coinOps[0], event, index));
|
|
623218
|
-
const erc721Ops = isNFTActive(currency24) ? ledgerOp.erc721_transfer_events.flatMap((event, index) => ledgerERC721EventToOperations(coinOps[0], event, index)) : [];
|
|
623219
|
-
const erc1155Ops = isNFTActive(currency24) ? ledgerOp.erc1155_transfer_events.flatMap((event, index) => ledgerERC1155EventToOperations(coinOps[0], event, index)) : [];
|
|
623225
|
+
const erc721Ops = isNFTActive(currency24) && config4.showNfts ? ledgerOp.erc721_transfer_events.flatMap((event, index) => ledgerERC721EventToOperations(coinOps[0], event, index)) : [];
|
|
623226
|
+
const erc1155Ops = isNFTActive(currency24) && config4.showNfts ? ledgerOp.erc1155_transfer_events.flatMap((event, index) => ledgerERC1155EventToOperations(coinOps[0], event, index)) : [];
|
|
623220
623227
|
const internalOps = ledgerOp.actions.flatMap((action, index) => ledgerInternalTransactionToOperations(coinOps[0], action, index));
|
|
623221
623228
|
lastCoinOperations.push(...coinOps);
|
|
623222
623229
|
lastTokenOperations.push(...erc20Ops);
|
|
@@ -772999,6 +773006,14 @@ function isStakeLockUpInForce({ lockup: lockup2, custodianAddress, epoch }) {
|
|
|
772999
773006
|
}
|
|
773000
773007
|
return lockup2.unixTimestamp > Date.now() / 1e3 || lockup2.epoch > epoch;
|
|
773001
773008
|
}
|
|
773009
|
+
var CALHashByChainIdMap2 = /* @__PURE__ */ new Map();
|
|
773010
|
+
var getCALHash2 = (currency24) => {
|
|
773011
|
+
return CALHashByChainIdMap2.get(currency24) || "";
|
|
773012
|
+
};
|
|
773013
|
+
var setCALHash2 = (currency24, hash12) => {
|
|
773014
|
+
CALHashByChainIdMap2.set(currency24, hash12);
|
|
773015
|
+
return CALHashByChainIdMap2.get(currency24);
|
|
773016
|
+
};
|
|
773002
773017
|
|
|
773003
773018
|
// ../../libs/coin-modules/coin-solana/lib-es/estimateMaxSpendable.js
|
|
773004
773019
|
var import_bignumber230 = __toESM(require("bignumber.js"));
|
|
@@ -773359,7 +773374,7 @@ var estimateFeeAndSpendable = async (api8, account3, transaction) => {
|
|
|
773359
773374
|
function isTransferTx(tx) {
|
|
773360
773375
|
return !!tx && (tx.model.kind === "token.transfer" || tx.model.kind === "transfer");
|
|
773361
773376
|
}
|
|
773362
|
-
async function
|
|
773377
|
+
async function estimateTokenMaxSpendable(api8, account3, tx) {
|
|
773363
773378
|
if (isTransferTx(tx) && account3.extensions?.transferFee && account3.extensions.transferFee.feeBps > 0) {
|
|
773364
773379
|
const mint = await getMaybeTokenMint(account3.token.contractAddress, api8);
|
|
773365
773380
|
if (!mint || mint instanceof Error)
|
|
@@ -773383,7 +773398,7 @@ var estimateMaxSpendableWithAPI = async ({ account: account3, parentAccount, tra
|
|
|
773383
773398
|
case "Account":
|
|
773384
773399
|
return (await estimateFeeAndSpendable(api8, mainAccount, transaction)).spendable;
|
|
773385
773400
|
case "TokenAccount":
|
|
773386
|
-
return
|
|
773401
|
+
return estimateTokenMaxSpendable(api8, account3, transaction);
|
|
773387
773402
|
}
|
|
773388
773403
|
};
|
|
773389
773404
|
|
|
@@ -773541,7 +773556,7 @@ var deriveTokenTransferCommandDescriptor = async (mainAccount, tx, model, api8)
|
|
|
773541
773556
|
if (!tx.useAllAmount && tx.amount.lte(0)) {
|
|
773542
773557
|
errors.amount = new AmountRequired();
|
|
773543
773558
|
}
|
|
773544
|
-
const spendableBalance = await
|
|
773559
|
+
const spendableBalance = await estimateTokenMaxSpendable(api8, tokenAccount, tx);
|
|
773545
773560
|
const txAmount = tx.useAllAmount ? spendableBalance.toNumber() : tx.amount.toNumber();
|
|
773546
773561
|
if (!errors.amount && txAmount > spendableBalance.toNumber()) {
|
|
773547
773562
|
errors.amount = new NotEnoughBalance();
|
|
@@ -774109,13 +774124,15 @@ function isValidStakeCreateAccountCommandDescriptor(commandDescriptor, amount) {
|
|
|
774109
774124
|
|
|
774110
774125
|
// ../../libs/coin-modules/coin-solana/lib-es/preload.js
|
|
774111
774126
|
var import_fp3 = require("lodash/fp");
|
|
774127
|
+
init_lib_es2();
|
|
774112
774128
|
|
|
774113
774129
|
// ../../libs/coin-modules/coin-solana/lib-es/preload-data.js
|
|
774114
774130
|
var import_rxjs136 = require("rxjs");
|
|
774115
774131
|
var initialData = {
|
|
774116
774132
|
version: "1",
|
|
774117
774133
|
validatorsWithMeta: [],
|
|
774118
|
-
validators: []
|
|
774134
|
+
validators: [],
|
|
774135
|
+
splTokens: null
|
|
774119
774136
|
};
|
|
774120
774137
|
var dataByCurrency = /* @__PURE__ */ new Map([
|
|
774121
774138
|
["solana", initialData],
|
|
@@ -774181,14 +774198,47 @@ async function getValidators3(cluster) {
|
|
|
774181
774198
|
|
|
774182
774199
|
// ../../libs/coin-modules/coin-solana/lib-es/preload.js
|
|
774183
774200
|
var PRELOAD_MAX_AGE5 = 15 * 60 * 1e3;
|
|
774201
|
+
var fetchSPLTokens = async (currency24) => {
|
|
774202
|
+
const latestCALHash = getCALHash2(currency24);
|
|
774203
|
+
const calHash = latestCALHash || spl_hash_default;
|
|
774204
|
+
try {
|
|
774205
|
+
const { tokens: tokens8, hash: hash12 } = await fetchTokensFromCALService({ blockchain_name: "solana" }, ["id", "network", "name", "ticker", "contract_address", "decimals"], calHash);
|
|
774206
|
+
const splTokens = tokens8.map((token) => [
|
|
774207
|
+
token.id,
|
|
774208
|
+
token.network,
|
|
774209
|
+
token.name,
|
|
774210
|
+
token.ticker,
|
|
774211
|
+
token.contract_address,
|
|
774212
|
+
token.decimals
|
|
774213
|
+
]);
|
|
774214
|
+
setCALHash2(currency24, hash12 || "");
|
|
774215
|
+
log2("solana/preload", "preload " + splTokens.length + " tokens");
|
|
774216
|
+
addTokens(splTokens.map(convertSplTokens));
|
|
774217
|
+
return splTokens;
|
|
774218
|
+
} catch (e38) {
|
|
774219
|
+
if (e38 instanceof AxiosError2 && e38.response?.status === 304) {
|
|
774220
|
+
log2("solana/preload", `loading existing fallback tokens for solana with hash ${latestCALHash || spl_hash_default}`);
|
|
774221
|
+
if (!latestCALHash) {
|
|
774222
|
+
setCALHash2(currency24, spl_hash_default);
|
|
774223
|
+
addTokens(spl_default2.map(convertSplTokens));
|
|
774224
|
+
return spl_default2;
|
|
774225
|
+
}
|
|
774226
|
+
return null;
|
|
774227
|
+
}
|
|
774228
|
+
log2("solana/preload", `failure to retrieve tokens for solana`, e38);
|
|
774229
|
+
return null;
|
|
774230
|
+
}
|
|
774231
|
+
};
|
|
774184
774232
|
async function preloadWithAPI(currency24, getAPI2) {
|
|
774185
774233
|
const api8 = await getAPI2();
|
|
774186
774234
|
const cluster = clusterByCurrencyId(currency24.id);
|
|
774187
774235
|
const validators7 = cluster === "devnet" ? await loadDevnetValidators(api8) : await getValidators3(cluster);
|
|
774236
|
+
const splTokens = await fetchSPLTokens(currency24);
|
|
774188
774237
|
const data6 = {
|
|
774189
774238
|
version: "1",
|
|
774190
774239
|
validatorsWithMeta: [],
|
|
774191
|
-
validators: cluster === "mainnet-beta" ? preprocessMainnetValidators(validators7) : validators7
|
|
774240
|
+
validators: cluster === "mainnet-beta" ? preprocessMainnetValidators(validators7) : validators7,
|
|
774241
|
+
splTokens
|
|
774192
774242
|
};
|
|
774193
774243
|
setSolanaPreloadData(data6, currency24);
|
|
774194
774244
|
return data6;
|
|
@@ -774221,6 +774271,14 @@ function hydrate7(data6, currency24) {
|
|
|
774221
774271
|
}
|
|
774222
774272
|
}
|
|
774223
774273
|
function hydrateV1(data6, currency24) {
|
|
774274
|
+
if (Array.isArray(data6.splTokens)) {
|
|
774275
|
+
addTokens(data6.splTokens.map(convertSplTokens));
|
|
774276
|
+
log2("solana/preload", `hydrate ${data6.splTokens.length} tokens`);
|
|
774277
|
+
setSolanaPreloadData(data6, currency24);
|
|
774278
|
+
return;
|
|
774279
|
+
}
|
|
774280
|
+
addTokens(spl_default2.map(convertSplTokens));
|
|
774281
|
+
log2("solana/preload", `hydrate fallback ${spl_default2.length} embedded tokens`);
|
|
774224
774282
|
setSolanaPreloadData(data6, currency24);
|
|
774225
774283
|
}
|
|
774226
774284
|
|
|
@@ -777198,17 +777256,23 @@ function toOffChainMessage(message2, signerAddress, isLegacy) {
|
|
|
777198
777256
|
|
|
777199
777257
|
// ../../libs/coin-modules/coin-solana/lib-es/hw-signMessage.js
|
|
777200
777258
|
var import_bs587 = __toESM(require_bs58());
|
|
777259
|
+
var import_invariant41 = __toESM(require("invariant"));
|
|
777201
777260
|
var signMessage7 = (signerContext3) => async (deviceId, account3, messageOptions) => {
|
|
777202
777261
|
const message2 = messageOptions.message;
|
|
777203
777262
|
if (!message2 || typeof message2 !== "string") {
|
|
777204
777263
|
throw new Error("Sign off-chain message on Solana must be only used with DefaultMessage type");
|
|
777205
777264
|
}
|
|
777265
|
+
let signedMessage;
|
|
777206
777266
|
const result2 = await signerContext3(deviceId, async (signer) => {
|
|
777207
777267
|
const { version: version33 } = await signer.getAppConfiguration();
|
|
777208
777268
|
const isLegacy = import_semver9.default.lt(version33, config_default5.getCoinConfig().legacyOCMSMaxVersion);
|
|
777209
|
-
|
|
777269
|
+
signedMessage = toOffChainMessage(message2, account3.freshAddress, isLegacy);
|
|
777270
|
+
return signer.signMessage(account3.freshAddressPath, signedMessage.toString("hex"));
|
|
777210
777271
|
});
|
|
777211
|
-
|
|
777272
|
+
(0, import_invariant41.default)(signedMessage, "signedMessage should exist");
|
|
777273
|
+
const signatureCount = Buffer.from([1]);
|
|
777274
|
+
const envelope = Buffer.concat([signatureCount, result2.signature, signedMessage]);
|
|
777275
|
+
return { signature: import_bs587.default.encode(envelope) };
|
|
777212
777276
|
};
|
|
777213
777277
|
|
|
777214
777278
|
// ../../libs/ledger-live-common/lib-es/families/solana/setup.js
|
|
@@ -781185,7 +781249,7 @@ var getTransactionStatus16 = async (account3, transaction) => {
|
|
|
781185
781249
|
|
|
781186
781250
|
// ../../libs/coin-modules/coin-stacks/lib-es/bridge/estimateMaxSpendable.js
|
|
781187
781251
|
var import_bignumber241 = __toESM(require("bignumber.js"));
|
|
781188
|
-
var
|
|
781252
|
+
var import_invariant42 = __toESM(require("invariant"));
|
|
781189
781253
|
|
|
781190
781254
|
// ../../libs/coin-modules/coin-stacks/lib-es/bridge/createTransaction.js
|
|
781191
781255
|
var import_bignumber240 = __toESM(require("bignumber.js"));
|
|
@@ -781202,7 +781266,7 @@ var createTransaction18 = () => ({
|
|
|
781202
781266
|
var estimateMaxSpendable16 = async ({ account: account3, parentAccount, transaction }) => {
|
|
781203
781267
|
const mainAccount = getMainAccount(account3, parentAccount);
|
|
781204
781268
|
const { spendableBalance, xpub } = mainAccount;
|
|
781205
|
-
(0,
|
|
781269
|
+
(0, import_invariant42.default)(xpub, "xpub is required");
|
|
781206
781270
|
const dummyTx = {
|
|
781207
781271
|
...createTransaction18(account3),
|
|
781208
781272
|
...transaction,
|
|
@@ -781228,11 +781292,11 @@ var estimateMaxSpendable16 = async ({ account: account3, parentAccount, transact
|
|
|
781228
781292
|
// ../../libs/coin-modules/coin-stacks/lib-es/bridge/prepareTransaction.js
|
|
781229
781293
|
var import_bignumber242 = __toESM(require("bignumber.js"));
|
|
781230
781294
|
var import_c32check7 = __toESM(require_lib63());
|
|
781231
|
-
var
|
|
781295
|
+
var import_invariant43 = __toESM(require("invariant"));
|
|
781232
781296
|
var prepareTransaction17 = async (account3, transaction) => {
|
|
781233
781297
|
const { spendableBalance, pendingOperations, xpub } = account3;
|
|
781234
781298
|
const { recipient, useAllAmount } = transaction;
|
|
781235
|
-
(0,
|
|
781299
|
+
(0, import_invariant43.default)(xpub, "xpub is required");
|
|
781236
781300
|
const patch = {};
|
|
781237
781301
|
if (xpub && recipient && validateAddress3(recipient).isValid) {
|
|
781238
781302
|
const { anchorMode, memo: memo3, amount } = transaction;
|
|
@@ -781259,11 +781323,11 @@ var prepareTransaction17 = async (account3, transaction) => {
|
|
|
781259
781323
|
|
|
781260
781324
|
// ../../libs/coin-modules/coin-stacks/lib-es/bridge/synchronization.js
|
|
781261
781325
|
var import_bignumber243 = __toESM(require("bignumber.js"));
|
|
781262
|
-
var
|
|
781326
|
+
var import_invariant44 = __toESM(require("invariant"));
|
|
781263
781327
|
var getAccountShape14 = async (info6) => {
|
|
781264
781328
|
const { initialAccount, currency: currency24, rest = {}, derivationMode } = info6;
|
|
781265
781329
|
const pubKey = reconciliatePublicKey2(rest.publicKey, initialAccount);
|
|
781266
|
-
(0,
|
|
781330
|
+
(0, import_invariant44.default)(pubKey, "publicKey is required");
|
|
781267
781331
|
const accountId2 = encodeAccountId({
|
|
781268
781332
|
type: "js",
|
|
781269
781333
|
version: "2",
|
|
@@ -781297,7 +781361,7 @@ var sync13 = makeSync({ getAccountShape: getAccountShape14 });
|
|
|
781297
781361
|
|
|
781298
781362
|
// ../../libs/coin-modules/coin-stacks/lib-es/bridge/signOperation.js
|
|
781299
781363
|
init_lib_es();
|
|
781300
|
-
var
|
|
781364
|
+
var import_invariant45 = __toESM(require("invariant"));
|
|
781301
781365
|
var import_rxjs138 = require("rxjs");
|
|
781302
781366
|
|
|
781303
781367
|
// ../../libs/coin-modules/coin-stacks/lib-es/bridge/buildOptimisticOperation.js
|
|
@@ -781330,7 +781394,7 @@ var buildSignOperation17 = (signerContext3) => ({ account: account3, deviceId, t
|
|
|
781330
781394
|
async function main2() {
|
|
781331
781395
|
const { derivationPath } = getAddress7(account3);
|
|
781332
781396
|
const { xpub } = account3;
|
|
781333
|
-
(0,
|
|
781397
|
+
(0, import_invariant45.default)(xpub, "xpub is required");
|
|
781334
781398
|
const { recipient, fee, anchorMode, network, memo: memo3, amount, nonce } = transaction;
|
|
781335
781399
|
if (!xpub) {
|
|
781336
781400
|
throw new InvalidAddress("", {
|
|
@@ -781384,9 +781448,9 @@ var buildSignOperation17 = (signerContext3) => ({ account: account3, deviceId, t
|
|
|
781384
781448
|
});
|
|
781385
781449
|
|
|
781386
781450
|
// ../../libs/coin-modules/coin-stacks/lib-es/bridge/broadcast.js
|
|
781387
|
-
var
|
|
781451
|
+
var import_invariant46 = __toESM(require("invariant"));
|
|
781388
781452
|
var broadcast17 = async ({ signedOperation: { operation, signature: signature3, rawData } }) => {
|
|
781389
|
-
(0,
|
|
781453
|
+
(0, import_invariant46.default)(operation, "StacksOperation expected");
|
|
781390
781454
|
const tx = await getTxToBroadcast2(operation, signature3, rawData ?? {});
|
|
781391
781455
|
const hash12 = await broadcastTx3(tx);
|
|
781392
781456
|
const result2 = patchOperationWithHash(operation, hash12);
|
|
@@ -781433,16 +781497,16 @@ function createBridges17(signerContext3) {
|
|
|
781433
781497
|
}
|
|
781434
781498
|
|
|
781435
781499
|
// ../../libs/coin-modules/coin-stacks/lib-es/test/cli.js
|
|
781436
|
-
var
|
|
781500
|
+
var import_invariant47 = __toESM(require("invariant"));
|
|
781437
781501
|
var import_flatMap17 = __toESM(require("lodash/flatMap"));
|
|
781438
781502
|
function inferAccounts10(account3) {
|
|
781439
|
-
(0,
|
|
781503
|
+
(0, import_invariant47.default)(account3.currency.family === "stacks", "stacks family");
|
|
781440
781504
|
const accounts2 = [account3];
|
|
781441
781505
|
return accounts2;
|
|
781442
781506
|
}
|
|
781443
781507
|
function inferTransactions16(transactions3) {
|
|
781444
781508
|
return (0, import_flatMap17.default)(transactions3, ({ transaction }) => {
|
|
781445
|
-
(0,
|
|
781509
|
+
(0, import_invariant47.default)(transaction.family === "stacks", "stacks family");
|
|
781446
781510
|
return {
|
|
781447
781511
|
...transaction,
|
|
781448
781512
|
family: "stacks"
|
|
@@ -782070,10 +782134,10 @@ var getTransactionStatus17 = async (account3, transaction) => {
|
|
|
782070
782134
|
};
|
|
782071
782135
|
|
|
782072
782136
|
// ../../libs/coin-modules/coin-stellar/lib-es/bridge/prepareTransaction.js
|
|
782073
|
-
var
|
|
782137
|
+
var import_invariant48 = __toESM(require("invariant"));
|
|
782074
782138
|
var prepareTransaction18 = async (account3, transaction) => {
|
|
782075
782139
|
const networkInfo = transaction.networkInfo || await fetchAccountNetworkInfo(account3);
|
|
782076
|
-
(0,
|
|
782140
|
+
(0, import_invariant48.default)(networkInfo.family === "stellar", "stellar networkInfo expected");
|
|
782077
782141
|
const fees2 = transaction.fees || networkInfo.fees;
|
|
782078
782142
|
const baseReserve = transaction.baseReserve || networkInfo.baseReserve;
|
|
782079
782143
|
const [assetCode, assetIssuer] = getAssetCodeIssuer(transaction);
|
|
@@ -782127,7 +782191,7 @@ init_lib_es();
|
|
|
782127
782191
|
|
|
782128
782192
|
// ../../libs/coin-modules/coin-stellar/lib-es/bridge/buildTransaction.js
|
|
782129
782193
|
init_lib_es();
|
|
782130
|
-
var
|
|
782194
|
+
var import_invariant49 = __toESM(require("invariant"));
|
|
782131
782195
|
|
|
782132
782196
|
// ../../libs/coin-modules/coin-stellar/lib-es/logic/broadcast.js
|
|
782133
782197
|
async function broadcast18(signature3) {
|
|
@@ -782240,7 +782304,7 @@ function buildMemo(memoType, memoValue) {
|
|
|
782240
782304
|
// ../../libs/coin-modules/coin-stellar/lib-es/bridge/buildTransaction.js
|
|
782241
782305
|
async function buildTransaction9(account3, transaction) {
|
|
782242
782306
|
const { recipient, networkInfo, fees: fees2, memoType, memoValue, mode, assetCode, assetIssuer } = transaction;
|
|
782243
|
-
(0,
|
|
782307
|
+
(0, import_invariant49.default)(networkInfo && networkInfo.family === "stellar", "stellar family");
|
|
782244
782308
|
if (!fees2) {
|
|
782245
782309
|
throw new FeeNotLoaded();
|
|
782246
782310
|
}
|
|
@@ -782544,7 +782608,7 @@ function createBridges18(signerContext3, coinConfig17) {
|
|
|
782544
782608
|
}
|
|
782545
782609
|
|
|
782546
782610
|
// ../../libs/coin-modules/coin-stellar/lib-es/test/cli.js
|
|
782547
|
-
var
|
|
782611
|
+
var import_invariant50 = __toESM(require("invariant"));
|
|
782548
782612
|
var options14 = [
|
|
782549
782613
|
{
|
|
782550
782614
|
name: "fee",
|
|
@@ -782579,7 +782643,7 @@ var options14 = [
|
|
|
782579
782643
|
];
|
|
782580
782644
|
function inferTransactions17(transactions3, opts) {
|
|
782581
782645
|
return transactions3.map(({ transaction, account: account3 }) => {
|
|
782582
|
-
(0,
|
|
782646
|
+
(0, import_invariant50.default)(transaction.family === "stellar", "stellar family");
|
|
782583
782647
|
return {
|
|
782584
782648
|
...transaction,
|
|
782585
782649
|
subAccountId: account3.type === "TokenAccount" ? account3.id : null,
|
|
@@ -782592,7 +782656,7 @@ function inferTransactions17(transactions3, opts) {
|
|
|
782592
782656
|
});
|
|
782593
782657
|
}
|
|
782594
782658
|
function inferAccounts11(account3, opts) {
|
|
782595
|
-
(0,
|
|
782659
|
+
(0, import_invariant50.default)(account3.currency.family === "stellar", "stellar family");
|
|
782596
782660
|
if (opts.subAccountId) {
|
|
782597
782661
|
const assetSubAccount = account3.subAccounts?.find((a62) => a62.id === opts.subAccountId);
|
|
782598
782662
|
if (!assetSubAccount) {
|
|
@@ -801616,7 +801680,7 @@ var getTransactionStatus18 = async (account3, transaction) => {
|
|
|
801616
801680
|
};
|
|
801617
801681
|
|
|
801618
801682
|
// ../../libs/coin-modules/coin-tezos/lib-es/bridge/synchronization.js
|
|
801619
|
-
var
|
|
801683
|
+
var import_invariant51 = __toESM(require("invariant"));
|
|
801620
801684
|
var import_bignumber263 = require("bignumber.js");
|
|
801621
801685
|
|
|
801622
801686
|
// ../../libs/coin-modules/coin-tezos/lib-es/bridge/logic.js
|
|
@@ -801762,7 +801826,7 @@ function isStringHex(s46) {
|
|
|
801762
801826
|
// ../../libs/coin-modules/coin-tezos/lib-es/bridge/synchronization.js
|
|
801763
801827
|
var getAccountShape16 = async ({ initialAccount, rest, currency: currency24, derivationMode }) => {
|
|
801764
801828
|
const publicKey3 = reconciliatePublicKey3(rest?.publicKey, initialAccount);
|
|
801765
|
-
(0,
|
|
801829
|
+
(0, import_invariant51.default)(isStringHex(publicKey3), `Invalid public key (${publicKey3}). Please reimport your Tezos accounts`);
|
|
801766
801830
|
const hex4 = Buffer.from(publicKey3, "hex");
|
|
801767
801831
|
const address4 = encodeAddress5(hex4);
|
|
801768
801832
|
const accountId2 = encodeAccountId({
|
|
@@ -801982,7 +802046,7 @@ function createBridges19(signerContext3, coinConfig17) {
|
|
|
801982
802046
|
// ../../libs/coin-modules/coin-tezos/lib-es/test/cli.js
|
|
801983
802047
|
var import_rxjs142 = require("rxjs");
|
|
801984
802048
|
var import_operators9 = require("rxjs/operators");
|
|
801985
|
-
var
|
|
802049
|
+
var import_invariant52 = __toESM(require("invariant"));
|
|
801986
802050
|
var import_bignumber265 = require("bignumber.js");
|
|
801987
802051
|
var import_flatMap18 = __toESM(require("lodash/flatMap"));
|
|
801988
802052
|
var options15 = [
|
|
@@ -802014,22 +802078,22 @@ var options15 = [
|
|
|
802014
802078
|
}
|
|
802015
802079
|
];
|
|
802016
802080
|
function inferAccounts12(account3, opts) {
|
|
802017
|
-
(0,
|
|
802081
|
+
(0, import_invariant52.default)(account3.currency.family === "tezos", "tezos family");
|
|
802018
802082
|
if (!opts.subAccount) {
|
|
802019
802083
|
const accounts2 = [account3];
|
|
802020
802084
|
return accounts2;
|
|
802021
802085
|
}
|
|
802022
802086
|
const { subAccounts } = account3;
|
|
802023
|
-
(0,
|
|
802087
|
+
(0, import_invariant52.default)(subAccounts, "no sub accounts");
|
|
802024
802088
|
return opts.subAccount.map((i85) => {
|
|
802025
802089
|
const acc = subAccounts[i85];
|
|
802026
|
-
(0,
|
|
802090
|
+
(0, import_invariant52.default)(acc, "sub account not found (index %s)", i85);
|
|
802027
802091
|
return acc;
|
|
802028
802092
|
});
|
|
802029
802093
|
}
|
|
802030
802094
|
function inferTransactions18(transactions3, opts, { inferAmount: inferAmount2 }) {
|
|
802031
802095
|
return (0, import_flatMap18.default)(transactions3, ({ transaction, account: account3 }) => {
|
|
802032
|
-
(0,
|
|
802096
|
+
(0, import_invariant52.default)(transaction.family === "tezos", "tezos family");
|
|
802033
802097
|
let subAccountId;
|
|
802034
802098
|
return {
|
|
802035
802099
|
...transaction,
|
|
@@ -802075,7 +802139,7 @@ function makeCliTools19() {
|
|
|
802075
802139
|
}
|
|
802076
802140
|
|
|
802077
802141
|
// ../../libs/ledgerjs/packages/hw-app-tezos/lib-es/Tezos.js
|
|
802078
|
-
var
|
|
802142
|
+
var import_invariant53 = __toESM(require("invariant"));
|
|
802079
802143
|
var import_bs58check9 = __toESM(require_bs58check());
|
|
802080
802144
|
var import_blake2b6 = __toESM(require_blake2b7());
|
|
802081
802145
|
var Tezos = class {
|
|
@@ -802165,7 +802229,7 @@ var Tezos = class {
|
|
|
802165
802229
|
}
|
|
802166
802230
|
response = await this.transport.send(128, 4, code, curve2, data6);
|
|
802167
802231
|
}
|
|
802168
|
-
(0,
|
|
802232
|
+
(0, import_invariant53.default)(response, "hw-app-xtz: response is set");
|
|
802169
802233
|
const signature3 = response.slice(0, response.length - 2).toString("hex");
|
|
802170
802234
|
return {
|
|
802171
802235
|
signature: signature3
|
|
@@ -802221,7 +802285,7 @@ var curves = [
|
|
|
802221
802285
|
];
|
|
802222
802286
|
var encodeAddress6 = (publicKey3, curve2) => {
|
|
802223
802287
|
const curveData = curves[curve2];
|
|
802224
|
-
(0,
|
|
802288
|
+
(0, import_invariant53.default)(curveData, "%s curve not supported", curve2);
|
|
802225
802289
|
const publicKeyBuf = curveData.compressPublicKey(publicKey3, curve2);
|
|
802226
802290
|
const key2 = publicKeyBuf.slice(1);
|
|
802227
802291
|
const keyHashSize = 20;
|
|
@@ -803328,15 +803392,15 @@ function createBridges20(signerContext3, coinConfig17) {
|
|
|
803328
803392
|
}
|
|
803329
803393
|
|
|
803330
803394
|
// ../../libs/coin-modules/coin-ton/lib-es/cli-transaction.js
|
|
803331
|
-
var
|
|
803395
|
+
var import_invariant54 = __toESM(require("invariant"));
|
|
803332
803396
|
var import_flatMap20 = __toESM(require("lodash/flatMap"));
|
|
803333
803397
|
function inferTransactions19(transactions3, opts) {
|
|
803334
803398
|
return (0, import_flatMap20.default)(transactions3, ({ transaction, account: account3 }) => {
|
|
803335
|
-
(0,
|
|
803399
|
+
(0, import_invariant54.default)(transaction.family === "ton", "ton family");
|
|
803336
803400
|
const isTokenAccount2 = account3.type === "TokenAccount";
|
|
803337
803401
|
if (isTokenAccount2) {
|
|
803338
803402
|
const isDelisted = account3.token.delisted === true;
|
|
803339
|
-
(0,
|
|
803403
|
+
(0, import_invariant54.default)(!isDelisted, "token is delisted");
|
|
803340
803404
|
}
|
|
803341
803405
|
return {
|
|
803342
803406
|
...transaction,
|
|
@@ -803474,8 +803538,8 @@ var formatTrongridTrc20TxResponse = (tx) => {
|
|
|
803474
803538
|
// trc20 txs are succeeded if returned by trongrid,
|
|
803475
803539
|
};
|
|
803476
803540
|
} catch (e38) {
|
|
803477
|
-
log2("tron-error",
|
|
803478
|
-
|
|
803541
|
+
log2("tron-error", `could not parse transaction ${tx}`);
|
|
803542
|
+
throw e38;
|
|
803479
803543
|
}
|
|
803480
803544
|
};
|
|
803481
803545
|
var formatTrongridTxResponse = (tx) => {
|
|
@@ -803800,12 +803864,14 @@ var getTrc20 = async (url4) => {
|
|
|
803800
803864
|
};
|
|
803801
803865
|
};
|
|
803802
803866
|
var defaultFetchParams = {
|
|
803803
|
-
|
|
803804
|
-
minTimestamp: 0
|
|
803867
|
+
limitPerCall: 100,
|
|
803868
|
+
minTimestamp: 0,
|
|
803869
|
+
order: "desc"
|
|
803805
803870
|
};
|
|
803806
803871
|
async function fetchTronAccountTxs(addr, shouldFetchMoreTxs, cacheTransactionInfoById, params) {
|
|
803807
|
-
const
|
|
803808
|
-
const
|
|
803872
|
+
const adjustedLimitPerCall = params.hintGlobalLimit ? Math.min(params.limitPerCall, params.hintGlobalLimit) : params.limitPerCall;
|
|
803873
|
+
const queryParams = `limit=${adjustedLimitPerCall}&min_timestamp=${params.minTimestamp}&order_by=block_timestamp,${params.order}`;
|
|
803874
|
+
const nativeTxs = (await getAllTransactions(`${getBaseApiUrl2()}/v1/accounts/${addr}/transactions?${queryParams}`, shouldFetchMoreTxs, getTransactions4(cacheTransactionInfoById))).filter(isTransactionTronAPI).filter((tx) => {
|
|
803809
803875
|
const hasInternalTxs = tx.txID && tx.internal_transactions && tx.internal_transactions.length > 0;
|
|
803810
803876
|
const isDuplicated = tx.tx_id;
|
|
803811
803877
|
const type5 = tx.raw_data.contract[0].type;
|
|
@@ -803814,8 +803880,50 @@ async function fetchTronAccountTxs(addr, shouldFetchMoreTxs, cacheTransactionInf
|
|
|
803814
803880
|
}
|
|
803815
803881
|
return !isDuplicated && !hasInternalTxs && type5 !== "TriggerSmartContract";
|
|
803816
803882
|
}).map((tx) => formatTrongridTxResponse(tx));
|
|
803817
|
-
const
|
|
803818
|
-
|
|
803883
|
+
const callTrc20Endpoint = async () => await getAllTransactions(`${getBaseApiUrl2()}/v1/accounts/${addr}/transactions/trc20?${queryParams}&get_detail=true`, shouldFetchMoreTxs, getTrc20);
|
|
803884
|
+
function isValid5(tx) {
|
|
803885
|
+
const ret2 = tx?.detail?.ret;
|
|
803886
|
+
return Array.isArray(ret2) && ret2.length > 0;
|
|
803887
|
+
}
|
|
803888
|
+
function getInvalidTxIndexes(txs) {
|
|
803889
|
+
const invalids = [];
|
|
803890
|
+
for (let i85 = 0; i85 < txs.length; i85++) {
|
|
803891
|
+
if (!isValid5(txs[i85])) {
|
|
803892
|
+
invalids.push(i85);
|
|
803893
|
+
}
|
|
803894
|
+
}
|
|
803895
|
+
txs.filter((tx) => !isValid5(tx)).map((tx, index) => index);
|
|
803896
|
+
return invalids;
|
|
803897
|
+
}
|
|
803898
|
+
function assert10(predicate, message2) {
|
|
803899
|
+
if (!predicate) {
|
|
803900
|
+
throw new Error(message2);
|
|
803901
|
+
}
|
|
803902
|
+
}
|
|
803903
|
+
function mergeAccs(acc1, acc2) {
|
|
803904
|
+
assert10(acc1.txs.length == acc2.txs.length, "accs should have the same length");
|
|
803905
|
+
const accRet = { txs: acc1.txs, invalids: [] };
|
|
803906
|
+
acc1.invalids.forEach((invalidIndex) => {
|
|
803907
|
+
acc2.invalids.includes(invalidIndex) ? accRet.invalids.push(invalidIndex) : accRet.txs[invalidIndex] = acc2.txs[invalidIndex];
|
|
803908
|
+
});
|
|
803909
|
+
return accRet;
|
|
803910
|
+
}
|
|
803911
|
+
async function getTrc20TxsWithRetry(acc, times) {
|
|
803912
|
+
assert10(times > 0, "getTrc20TxsWithRetry: couldn't fetch trc20 transactions after several attempts");
|
|
803913
|
+
const ret2 = await callTrc20Endpoint();
|
|
803914
|
+
const thisAcc = {
|
|
803915
|
+
txs: ret2,
|
|
803916
|
+
invalids: getInvalidTxIndexes(ret2)
|
|
803917
|
+
};
|
|
803918
|
+
const newAcc = acc ? mergeAccs(acc, thisAcc) : thisAcc;
|
|
803919
|
+
if (newAcc.invalids.length == 0) {
|
|
803920
|
+
return newAcc.txs;
|
|
803921
|
+
} else {
|
|
803922
|
+
log2("coin-tron", `getTrc20TxsWithRetry: got ${newAcc.invalids.length} invalid trc20 transactions, retrying...`);
|
|
803923
|
+
return await getTrc20TxsWithRetry(newAcc, times - 1);
|
|
803924
|
+
}
|
|
803925
|
+
}
|
|
803926
|
+
const trc20Txs = (await getTrc20TxsWithRetry(null, 3)).map(formatTrongridTrc20TxResponse);
|
|
803819
803927
|
const txInfos = (0, import_compact5.default)(nativeTxs.concat(trc20Txs)).sort((a62, b19) => b19.date.getTime() - a62.date.getTime());
|
|
803820
803928
|
return txInfos;
|
|
803821
803929
|
}
|
|
@@ -805267,7 +805375,7 @@ function createBridges21(signerContext3, coinConfig17) {
|
|
|
805267
805375
|
}
|
|
805268
805376
|
|
|
805269
805377
|
// ../../libs/coin-modules/coin-tron/lib-es/test/cli.js
|
|
805270
|
-
var
|
|
805378
|
+
var import_invariant55 = __toESM(require("invariant"));
|
|
805271
805379
|
var import_flatMap21 = __toESM(require("lodash/flatMap"));
|
|
805272
805380
|
var import_zipWith2 = __toESM(require("lodash/zipWith"));
|
|
805273
805381
|
var import_rxjs145 = require("rxjs");
|
|
@@ -805308,7 +805416,7 @@ var options16 = [
|
|
|
805308
805416
|
}
|
|
805309
805417
|
];
|
|
805310
805418
|
function inferAccounts13(account3, opts) {
|
|
805311
|
-
(0,
|
|
805419
|
+
(0, import_invariant55.default)(account3.currency.family === "tron", "tron family");
|
|
805312
805420
|
if (!opts.token) {
|
|
805313
805421
|
const accounts2 = [account3];
|
|
805314
805422
|
return accounts2;
|
|
@@ -805329,7 +805437,7 @@ function inferAccounts13(account3, opts) {
|
|
|
805329
805437
|
}
|
|
805330
805438
|
function inferTransactions20(transactions3, opts) {
|
|
805331
805439
|
const mode = opts.mode || "send";
|
|
805332
|
-
(0,
|
|
805440
|
+
(0, import_invariant55.default)([
|
|
805333
805441
|
"send",
|
|
805334
805442
|
"freeze",
|
|
805335
805443
|
"unfreeze",
|
|
@@ -805341,11 +805449,11 @@ function inferTransactions20(transactions3, opts) {
|
|
|
805341
805449
|
].includes(mode), `Unexpected mode: ${mode}`);
|
|
805342
805450
|
const resource = opts.resource ? opts.resource.toUpperCase() : void 0;
|
|
805343
805451
|
if (resource) {
|
|
805344
|
-
(0,
|
|
805452
|
+
(0, import_invariant55.default)(["BANDWIDTH", "ENERGY"].includes(resource), `Unexpected resource: ${resource}`);
|
|
805345
805453
|
}
|
|
805346
805454
|
const voteAddresses = opts["tronVoteAddress"] || [];
|
|
805347
805455
|
const voteCounts = (opts["tronVoteCount"] || []).map((value6) => {
|
|
805348
|
-
(0,
|
|
805456
|
+
(0, import_invariant55.default)(Number.isInteger(Number(value6)), `Invalid integer: ${value6}`);
|
|
805349
805457
|
return parseInt(value6);
|
|
805350
805458
|
});
|
|
805351
805459
|
const votes2 = (0, import_zipWith2.default)(voteAddresses, voteCounts, (a62, c56) => ({
|
|
@@ -805353,13 +805461,13 @@ function inferTransactions20(transactions3, opts) {
|
|
|
805353
805461
|
voteCount: c56
|
|
805354
805462
|
}));
|
|
805355
805463
|
return (0, import_flatMap21.default)(transactions3, ({ transaction, account: account3 }) => {
|
|
805356
|
-
(0,
|
|
805464
|
+
(0, import_invariant55.default)(transaction.family === "tron", "tron family");
|
|
805357
805465
|
if (account3.type === "Account") {
|
|
805358
|
-
(0,
|
|
805466
|
+
(0, import_invariant55.default)(account3.tronResources, "unactivated account");
|
|
805359
805467
|
}
|
|
805360
805468
|
if (account3.type === "TokenAccount") {
|
|
805361
805469
|
const isDelisted = account3.token.delisted === true;
|
|
805362
|
-
(0,
|
|
805470
|
+
(0, import_invariant55.default)(!isDelisted, "token is delisted");
|
|
805363
805471
|
}
|
|
805364
805472
|
return {
|
|
805365
805473
|
...transaction,
|
|
@@ -807924,7 +808032,7 @@ var import_ripple_binary_codec = __toESM(require_dist32());
|
|
|
807924
808032
|
|
|
807925
808033
|
// ../../libs/coin-modules/coin-xrp/lib-es/logic/craftTransaction.js
|
|
807926
808034
|
var import_bignumber298 = __toESM(require("bignumber.js"));
|
|
807927
|
-
var
|
|
808035
|
+
var import_invariant56 = __toESM(require("invariant"));
|
|
807928
808036
|
var import_ripple_binary_codec2 = __toESM(require_dist32());
|
|
807929
808037
|
var import_definitions76 = __toESM(require_definitions());
|
|
807930
808038
|
|
|
@@ -807991,7 +808099,7 @@ async function craftTransaction4(account3, transaction, publicKey3) {
|
|
|
807991
808099
|
xrplTransaction.Memos = transaction.memos.map(memoMapper);
|
|
807992
808100
|
}
|
|
807993
808101
|
if (transaction.destinationTag) {
|
|
807994
|
-
(0,
|
|
808102
|
+
(0, import_invariant56.default)(validateTag(new import_bignumber298.default(transaction.destinationTag)), `tag is set but is not in a valid format, should be between [0 - ${UINT32_MAX.toString()}]`);
|
|
807995
808103
|
xrplTransaction.DestinationTag = transaction.destinationTag;
|
|
807996
808104
|
}
|
|
807997
808105
|
const serializedTransaction = publicKey3 ? (0, import_ripple_binary_codec2.encode)({
|
|
@@ -808443,7 +808551,7 @@ function createBridges23(signerContext3, coinConfig17) {
|
|
|
808443
808551
|
}
|
|
808444
808552
|
|
|
808445
808553
|
// ../../libs/coin-modules/coin-xrp/lib-es/test/cli.js
|
|
808446
|
-
var
|
|
808554
|
+
var import_invariant57 = __toESM(require("invariant"));
|
|
808447
808555
|
var options18 = [
|
|
808448
808556
|
{
|
|
808449
808557
|
name: "fee",
|
|
@@ -808458,7 +808566,7 @@ var options18 = [
|
|
|
808458
808566
|
];
|
|
808459
808567
|
function inferTransactions22(transactions3, opts, { inferAmount: inferAmount2 }) {
|
|
808460
808568
|
return transactions3.flatMap(({ transaction, account: account3 }) => {
|
|
808461
|
-
(0,
|
|
808569
|
+
(0, import_invariant57.default)(transaction.family === "xrp", "XRP family");
|
|
808462
808570
|
return {
|
|
808463
808571
|
...transaction,
|
|
808464
808572
|
fee: inferAmount2(account3, opts.fee || "0.001xrp"),
|
|
@@ -817701,13 +817809,13 @@ function reEncodeRawSignature(rawSignature) {
|
|
|
817701
817809
|
}
|
|
817702
817810
|
|
|
817703
817811
|
// ../../libs/coin-modules/coin-mina/lib-es/signer/getAddress.js
|
|
817704
|
-
var
|
|
817812
|
+
var import_invariant58 = __toESM(require("invariant"));
|
|
817705
817813
|
var resolver44 = (signerContext3) => {
|
|
817706
817814
|
return async (deviceId, { path: path4, verify: verify9 }) => {
|
|
817707
817815
|
const account3 = getAccountNumFromPath(path4);
|
|
817708
|
-
(0,
|
|
817816
|
+
(0, import_invariant58.default)(account3 !== void 0, "Invalid account path, supported: 44'/12586'/<account>'/0/0");
|
|
817709
817817
|
const r36 = await signerContext3(deviceId, (signer) => signer.getAddress(account3, verify9 || false));
|
|
817710
|
-
(0,
|
|
817818
|
+
(0, import_invariant58.default)(r36.publicKey, "[mina] getAddress: expected publicKey to be defined");
|
|
817711
817819
|
return {
|
|
817712
817820
|
address: r36.publicKey,
|
|
817713
817821
|
publicKey: r36.publicKey,
|
|
@@ -817933,7 +818041,7 @@ var getNonce4 = async (txn, address4) => {
|
|
|
817933
818041
|
// ../../libs/coin-modules/coin-mina/lib-es/bridge/synchronisation.js
|
|
817934
818042
|
var import_bignumber315 = __toESM(require("bignumber.js"));
|
|
817935
818043
|
init_lib_es2();
|
|
817936
|
-
var
|
|
818044
|
+
var import_invariant59 = __toESM(require("invariant"));
|
|
817937
818045
|
var mapRosettaTxnToOperation = async (accountId2, address4, txn) => {
|
|
817938
818046
|
try {
|
|
817939
818047
|
const hash12 = txn.transaction.transaction_identifier.hash;
|
|
@@ -817990,8 +818098,8 @@ var mapRosettaTxnToOperation = async (accountId2, address4, txn) => {
|
|
|
817990
818098
|
}
|
|
817991
818099
|
}
|
|
817992
818100
|
}
|
|
817993
|
-
(0,
|
|
817994
|
-
(0,
|
|
818101
|
+
(0, import_invariant59.default)(fromAccount, "mina: missing fromAccount");
|
|
818102
|
+
(0, import_invariant59.default)(toAccount, "mina: missing toAccount");
|
|
817995
818103
|
const op = {
|
|
817996
818104
|
id: "",
|
|
817997
818105
|
type: "NONE",
|
|
@@ -818204,11 +818312,11 @@ init_lib_es();
|
|
|
818204
818312
|
|
|
818205
818313
|
// ../../libs/coin-modules/coin-mina/lib-es/bridge/buildTransaction.js
|
|
818206
818314
|
init_lib_es2();
|
|
818207
|
-
var
|
|
818315
|
+
var import_invariant60 = __toESM(require("invariant"));
|
|
818208
818316
|
var buildTransaction11 = async (a62, t60) => {
|
|
818209
818317
|
try {
|
|
818210
818318
|
const accountNum = getAccountNumFromPath(a62.freshAddressPath);
|
|
818211
|
-
(0,
|
|
818319
|
+
(0, import_invariant60.default)(accountNum !== void 0, "mina: accountNum is required to build transaction");
|
|
818212
818320
|
return {
|
|
818213
818321
|
txType: MINA_PAYMENT_TYPE_ID,
|
|
818214
818322
|
senderAccount: accountNum,
|
|
@@ -818231,7 +818339,7 @@ var buildTransaction11 = async (a62, t60) => {
|
|
|
818231
818339
|
};
|
|
818232
818340
|
|
|
818233
818341
|
// ../../libs/coin-modules/coin-mina/lib-es/bridge/signOperation.js
|
|
818234
|
-
var
|
|
818342
|
+
var import_invariant61 = __toESM(require("invariant"));
|
|
818235
818343
|
var buildOptimisticOperation21 = (account3, transaction, fee) => {
|
|
818236
818344
|
let value6 = new import_bignumber319.BigNumber(transaction.amount).plus(fee);
|
|
818237
818345
|
if (transaction.fees?.accountCreationFee.gt(0)) {
|
|
@@ -818265,7 +818373,7 @@ var buildSignOperation25 = (signerContext3) => ({ account: account3, transaction
|
|
|
818265
818373
|
}
|
|
818266
818374
|
const unsigned2 = await buildTransaction11(account3, transaction);
|
|
818267
818375
|
const { signature: signature3 } = await signerContext3(deviceId, (signer) => signer.signTransaction(unsigned2));
|
|
818268
|
-
(0,
|
|
818376
|
+
(0, import_invariant61.default)(signature3, "signature should be defined if user accepted");
|
|
818269
818377
|
const encodedSignature = reEncodeRawSignature(signature3);
|
|
818270
818378
|
const signedTransaction = {
|
|
818271
818379
|
transaction: unsigned2,
|
|
@@ -818287,7 +818395,7 @@ var buildSignOperation25 = (signerContext3) => ({ account: account3, transaction
|
|
|
818287
818395
|
var signOperation_default2 = buildSignOperation25;
|
|
818288
818396
|
|
|
818289
818397
|
// ../../libs/coin-modules/coin-mina/lib-es/bridge/cli-transaction.js
|
|
818290
|
-
var
|
|
818398
|
+
var import_invariant62 = __toESM(require("invariant"));
|
|
818291
818399
|
var import_flatMap23 = __toESM(require("lodash/flatMap"));
|
|
818292
818400
|
var options20 = [
|
|
818293
818401
|
{
|
|
@@ -818297,12 +818405,12 @@ var options20 = [
|
|
|
818297
818405
|
}
|
|
818298
818406
|
];
|
|
818299
818407
|
function inferAccounts14(account3) {
|
|
818300
|
-
(0,
|
|
818408
|
+
(0, import_invariant62.default)(account3.currency.family === "mina", "mina family");
|
|
818301
818409
|
return [account3];
|
|
818302
818410
|
}
|
|
818303
818411
|
function inferTransactions23(transactions3, opts) {
|
|
818304
818412
|
return (0, import_flatMap23.default)(transactions3, ({ transaction }) => {
|
|
818305
|
-
(0,
|
|
818413
|
+
(0, import_invariant62.default)(transaction.family === "mina", "mina family");
|
|
818306
818414
|
return {
|
|
818307
818415
|
...transaction,
|
|
818308
818416
|
family: "mina",
|
|
@@ -820875,7 +820983,7 @@ function genAccount2(id5, opts = {}) {
|
|
|
820875
820983
|
}
|
|
820876
820984
|
|
|
820877
820985
|
// ../../libs/coin-modules/coin-evm/lib-es/operation.js
|
|
820878
|
-
var
|
|
820986
|
+
var import_invariant63 = __toESM(require("invariant"));
|
|
820879
820987
|
|
|
820880
820988
|
// ../../libs/ledger-live-common/lib-es/bridge/mockHelpers.js
|
|
820881
820989
|
var MOCK_DATA_SEED = getEnv("MOCK") || "MOCK";
|
|
@@ -821105,10 +821213,10 @@ init_lib_es();
|
|
|
821105
821213
|
// ../../libs/ledger-live-common/lib-es/families/bitcoin/bridge/api.js
|
|
821106
821214
|
init_lib_es();
|
|
821107
821215
|
var import_bignumber327 = require("bignumber.js");
|
|
821108
|
-
var
|
|
821216
|
+
var import_invariant64 = __toESM(require("invariant"));
|
|
821109
821217
|
var getEstimatedFees14 = makeLRUCache(async (currency24) => {
|
|
821110
821218
|
const baseURL2 = blockchainBaseURL(currency24);
|
|
821111
|
-
(0,
|
|
821219
|
+
(0, import_invariant64.default)(baseURL2, `Fees for ${currency24.id} are not supported`);
|
|
821112
821220
|
const { data: data6, status } = await network_default({
|
|
821113
821221
|
method: "GET",
|
|
821114
821222
|
url: `${baseURL2}/fees`
|
|
@@ -822916,7 +823024,7 @@ function getMockedAPIs() {
|
|
|
822916
823024
|
var mock_default14 = makeBridges(getMockedAPIs());
|
|
822917
823025
|
|
|
822918
823026
|
// ../../libs/ledger-live-common/lib-es/families/stellar/bridge/mock.js
|
|
822919
|
-
var
|
|
823027
|
+
var import_invariant65 = __toESM(require("invariant"));
|
|
822920
823028
|
var import_bignumber336 = require("bignumber.js");
|
|
822921
823029
|
init_lib_es();
|
|
822922
823030
|
var receive11 = makeAccountBridgeReceive2();
|
|
@@ -823037,7 +823145,7 @@ var prepareTransaction35 = async (a62, t60) => {
|
|
|
823037
823145
|
fees: new import_bignumber336.BigNumber("100"),
|
|
823038
823146
|
baseReserve: new import_bignumber336.BigNumber("100000")
|
|
823039
823147
|
};
|
|
823040
|
-
(0,
|
|
823148
|
+
(0, import_invariant65.default)(networkInfo.family === "stellar", "stellar networkInfo expected");
|
|
823041
823149
|
const fees2 = t60.fees || networkInfo.fees;
|
|
823042
823150
|
const baseReserve = t60.baseReserve || networkInfo.baseReserve;
|
|
823043
823151
|
if (t60.networkInfo !== networkInfo || t60.fees !== fees2 || t60.baseReserve !== baseReserve) {
|
|
@@ -823679,7 +823787,7 @@ var accountFormatters = {
|
|
|
823679
823787
|
};
|
|
823680
823788
|
function formatAccount(account3, format6 = "full") {
|
|
823681
823789
|
const f42 = accountFormatters[format6];
|
|
823682
|
-
(0,
|
|
823790
|
+
(0, import_invariant66.default)(f42, "missing account formatter=" + format6);
|
|
823683
823791
|
return f42(account3);
|
|
823684
823792
|
}
|
|
823685
823793
|
function formatOperation2(account3) {
|
|
@@ -826291,15 +826399,15 @@ function parseAppSearch(query3) {
|
|
|
826291
826399
|
}
|
|
826292
826400
|
async function createImplicitSpeculos(query3) {
|
|
826293
826401
|
const coinapps = getEnv("COINAPPS");
|
|
826294
|
-
(0,
|
|
826402
|
+
(0, import_invariant67.default)(coinapps, "COINAPPS folder is missing!");
|
|
826295
826403
|
const seed = getEnv("SEED");
|
|
826296
|
-
(0,
|
|
826404
|
+
(0, import_invariant67.default)(seed, "SEED is missing!");
|
|
826297
826405
|
const apps = await listAppCandidates(coinapps);
|
|
826298
826406
|
const match = parseAppSearch(query3);
|
|
826299
|
-
(0,
|
|
826407
|
+
(0, import_invariant67.default)(match, "speculos: invalid format of '%s'. Usage example: speculos:nanoS:bitcoin@1.3.x", query3);
|
|
826300
826408
|
const { search, dependency, appName } = match;
|
|
826301
826409
|
const appCandidate = findAppCandidate(apps, search);
|
|
826302
|
-
(0,
|
|
826410
|
+
(0, import_invariant67.default)(appCandidate, "could not find an app that matches '%s'", query3);
|
|
826303
826411
|
log2("speculos", "using app " + formatAppCandidate(appCandidate));
|
|
826304
826412
|
return appCandidate ? {
|
|
826305
826413
|
device: await createSpeculosDevice({
|
|
@@ -826689,7 +826797,8 @@ var evmConfig = {
|
|
|
826689
826797
|
config_currency_akroma: {
|
|
826690
826798
|
type: "object",
|
|
826691
826799
|
default: {
|
|
826692
|
-
status: { type: "active" }
|
|
826800
|
+
status: { type: "active" },
|
|
826801
|
+
showNfts: false
|
|
826693
826802
|
}
|
|
826694
826803
|
},
|
|
826695
826804
|
config_currency_atheios: {
|
|
@@ -826697,7 +826806,8 @@ var evmConfig = {
|
|
|
826697
826806
|
default: {
|
|
826698
826807
|
status: {
|
|
826699
826808
|
type: "active"
|
|
826700
|
-
}
|
|
826809
|
+
},
|
|
826810
|
+
showNfts: false
|
|
826701
826811
|
}
|
|
826702
826812
|
},
|
|
826703
826813
|
config_currency_avalanche_c_chain: {
|
|
@@ -826717,7 +826827,8 @@ var evmConfig = {
|
|
|
826717
826827
|
gasTracker: {
|
|
826718
826828
|
type: "ledger",
|
|
826719
826829
|
explorerId: "avax"
|
|
826720
|
-
}
|
|
826830
|
+
},
|
|
826831
|
+
showNfts: false
|
|
826721
826832
|
}
|
|
826722
826833
|
},
|
|
826723
826834
|
config_currency_bsc: {
|
|
@@ -826737,7 +826848,8 @@ var evmConfig = {
|
|
|
826737
826848
|
gasTracker: {
|
|
826738
826849
|
type: "ledger",
|
|
826739
826850
|
explorerId: "bnb"
|
|
826740
|
-
}
|
|
826851
|
+
},
|
|
826852
|
+
showNfts: false
|
|
826741
826853
|
}
|
|
826742
826854
|
},
|
|
826743
826855
|
config_currency_callisto: {
|
|
@@ -826745,7 +826857,8 @@ var evmConfig = {
|
|
|
826745
826857
|
default: {
|
|
826746
826858
|
status: {
|
|
826747
826859
|
type: "active"
|
|
826748
|
-
}
|
|
826860
|
+
},
|
|
826861
|
+
showNfts: false
|
|
826749
826862
|
}
|
|
826750
826863
|
},
|
|
826751
826864
|
config_currency_dexon: {
|
|
@@ -826753,7 +826866,8 @@ var evmConfig = {
|
|
|
826753
826866
|
default: {
|
|
826754
826867
|
status: {
|
|
826755
826868
|
type: "active"
|
|
826756
|
-
}
|
|
826869
|
+
},
|
|
826870
|
+
showNfts: false
|
|
826757
826871
|
}
|
|
826758
826872
|
},
|
|
826759
826873
|
config_currency_ellaism: {
|
|
@@ -826761,7 +826875,8 @@ var evmConfig = {
|
|
|
826761
826875
|
default: {
|
|
826762
826876
|
status: {
|
|
826763
826877
|
type: "active"
|
|
826764
|
-
}
|
|
826878
|
+
},
|
|
826879
|
+
showNfts: false
|
|
826765
826880
|
}
|
|
826766
826881
|
},
|
|
826767
826882
|
config_currency_ethereum: {
|
|
@@ -826781,7 +826896,8 @@ var evmConfig = {
|
|
|
826781
826896
|
explorer: {
|
|
826782
826897
|
type: "ledger",
|
|
826783
826898
|
explorerId: "eth"
|
|
826784
|
-
}
|
|
826899
|
+
},
|
|
826900
|
+
showNfts: false
|
|
826785
826901
|
}
|
|
826786
826902
|
},
|
|
826787
826903
|
config_currency_sonic: {
|
|
@@ -826795,7 +826911,8 @@ var evmConfig = {
|
|
|
826795
826911
|
explorer: {
|
|
826796
826912
|
type: "etherscan",
|
|
826797
826913
|
uri: "https://proxyetherscan.api.live.ledger.com/v2/api/146"
|
|
826798
|
-
}
|
|
826914
|
+
},
|
|
826915
|
+
showNfts: false
|
|
826799
826916
|
}
|
|
826800
826917
|
},
|
|
826801
826918
|
config_currency_sonic_blaze: {
|
|
@@ -826809,7 +826926,8 @@ var evmConfig = {
|
|
|
826809
826926
|
explorer: {
|
|
826810
826927
|
type: "etherscan",
|
|
826811
826928
|
uri: "https://proxyetherscan.api.live.ledger.com/v2/api/57054"
|
|
826812
|
-
}
|
|
826929
|
+
},
|
|
826930
|
+
showNfts: false
|
|
826813
826931
|
}
|
|
826814
826932
|
},
|
|
826815
826933
|
config_currency_ethereum_classic: {
|
|
@@ -826829,7 +826947,8 @@ var evmConfig = {
|
|
|
826829
826947
|
gasTracker: {
|
|
826830
826948
|
type: "ledger",
|
|
826831
826949
|
explorerId: "etc"
|
|
826832
|
-
}
|
|
826950
|
+
},
|
|
826951
|
+
showNfts: false
|
|
826833
826952
|
}
|
|
826834
826953
|
},
|
|
826835
826954
|
config_currency_ether1: {
|
|
@@ -826837,7 +826956,8 @@ var evmConfig = {
|
|
|
826837
826956
|
default: {
|
|
826838
826957
|
status: {
|
|
826839
826958
|
type: "active"
|
|
826840
|
-
}
|
|
826959
|
+
},
|
|
826960
|
+
showNfts: false
|
|
826841
826961
|
}
|
|
826842
826962
|
},
|
|
826843
826963
|
config_currency_ethergem: {
|
|
@@ -826845,7 +826965,8 @@ var evmConfig = {
|
|
|
826845
826965
|
default: {
|
|
826846
826966
|
status: {
|
|
826847
826967
|
type: "active"
|
|
826848
|
-
}
|
|
826968
|
+
},
|
|
826969
|
+
showNfts: false
|
|
826849
826970
|
}
|
|
826850
826971
|
},
|
|
826851
826972
|
config_currency_ethersocial: {
|
|
@@ -826853,7 +826974,8 @@ var evmConfig = {
|
|
|
826853
826974
|
default: {
|
|
826854
826975
|
status: {
|
|
826855
826976
|
type: "active"
|
|
826856
|
-
}
|
|
826977
|
+
},
|
|
826978
|
+
showNfts: false
|
|
826857
826979
|
}
|
|
826858
826980
|
},
|
|
826859
826981
|
config_currency_expanse: {
|
|
@@ -826861,7 +826983,8 @@ var evmConfig = {
|
|
|
826861
826983
|
default: {
|
|
826862
826984
|
status: {
|
|
826863
826985
|
type: "active"
|
|
826864
|
-
}
|
|
826986
|
+
},
|
|
826987
|
+
showNfts: false
|
|
826865
826988
|
}
|
|
826866
826989
|
},
|
|
826867
826990
|
config_currency_gochain: {
|
|
@@ -826869,7 +826992,8 @@ var evmConfig = {
|
|
|
826869
826992
|
default: {
|
|
826870
826993
|
status: {
|
|
826871
826994
|
type: "active"
|
|
826872
|
-
}
|
|
826995
|
+
},
|
|
826996
|
+
showNfts: false
|
|
826873
826997
|
}
|
|
826874
826998
|
},
|
|
826875
826999
|
config_currency_hpb: {
|
|
@@ -826877,7 +827001,8 @@ var evmConfig = {
|
|
|
826877
827001
|
default: {
|
|
826878
827002
|
status: {
|
|
826879
827003
|
type: "active"
|
|
826880
|
-
}
|
|
827004
|
+
},
|
|
827005
|
+
showNfts: false
|
|
826881
827006
|
}
|
|
826882
827007
|
},
|
|
826883
827008
|
config_currency_mix: {
|
|
@@ -826885,7 +827010,8 @@ var evmConfig = {
|
|
|
826885
827010
|
default: {
|
|
826886
827011
|
status: {
|
|
826887
827012
|
type: "active"
|
|
826888
|
-
}
|
|
827013
|
+
},
|
|
827014
|
+
showNfts: false
|
|
826889
827015
|
}
|
|
826890
827016
|
},
|
|
826891
827017
|
config_currency_musicoin: {
|
|
@@ -826893,7 +827019,8 @@ var evmConfig = {
|
|
|
826893
827019
|
default: {
|
|
826894
827020
|
status: {
|
|
826895
827021
|
type: "active"
|
|
826896
|
-
}
|
|
827022
|
+
},
|
|
827023
|
+
showNfts: false
|
|
826897
827024
|
}
|
|
826898
827025
|
},
|
|
826899
827026
|
config_currency_pirl: {
|
|
@@ -826909,7 +827036,8 @@ var evmConfig = {
|
|
|
826909
827036
|
default: {
|
|
826910
827037
|
status: {
|
|
826911
827038
|
type: "active"
|
|
826912
|
-
}
|
|
827039
|
+
},
|
|
827040
|
+
showNfts: false
|
|
826913
827041
|
}
|
|
826914
827042
|
},
|
|
826915
827043
|
config_currency_polygon: {
|
|
@@ -826930,7 +827058,8 @@ var evmConfig = {
|
|
|
826930
827058
|
gasTracker: {
|
|
826931
827059
|
type: "ledger",
|
|
826932
827060
|
explorerId: "matic"
|
|
826933
|
-
}
|
|
827061
|
+
},
|
|
827062
|
+
showNfts: false
|
|
826934
827063
|
}
|
|
826935
827064
|
},
|
|
826936
827065
|
config_currency_reosc: {
|
|
@@ -826938,7 +827067,8 @@ var evmConfig = {
|
|
|
826938
827067
|
default: {
|
|
826939
827068
|
status: {
|
|
826940
827069
|
type: "active"
|
|
826941
|
-
}
|
|
827070
|
+
},
|
|
827071
|
+
showNfts: false
|
|
826942
827072
|
}
|
|
826943
827073
|
},
|
|
826944
827074
|
config_currency_thundercore: {
|
|
@@ -826946,7 +827076,8 @@ var evmConfig = {
|
|
|
826946
827076
|
default: {
|
|
826947
827077
|
status: {
|
|
826948
827078
|
type: "active"
|
|
826949
|
-
}
|
|
827079
|
+
},
|
|
827080
|
+
showNfts: false
|
|
826950
827081
|
}
|
|
826951
827082
|
},
|
|
826952
827083
|
config_currency_tomo: {
|
|
@@ -826954,7 +827085,8 @@ var evmConfig = {
|
|
|
826954
827085
|
default: {
|
|
826955
827086
|
status: {
|
|
826956
827087
|
type: "active"
|
|
826957
|
-
}
|
|
827088
|
+
},
|
|
827089
|
+
showNfts: false
|
|
826958
827090
|
}
|
|
826959
827091
|
},
|
|
826960
827092
|
config_currency_ubiq: {
|
|
@@ -826962,7 +827094,8 @@ var evmConfig = {
|
|
|
826962
827094
|
default: {
|
|
826963
827095
|
status: {
|
|
826964
827096
|
type: "active"
|
|
826965
|
-
}
|
|
827097
|
+
},
|
|
827098
|
+
showNfts: false
|
|
826966
827099
|
}
|
|
826967
827100
|
},
|
|
826968
827101
|
config_currency_wanchain: {
|
|
@@ -826970,7 +827103,8 @@ var evmConfig = {
|
|
|
826970
827103
|
default: {
|
|
826971
827104
|
status: {
|
|
826972
827105
|
type: "active"
|
|
826973
|
-
}
|
|
827106
|
+
},
|
|
827107
|
+
showNfts: false
|
|
826974
827108
|
}
|
|
826975
827109
|
},
|
|
826976
827110
|
config_currency_arbitrum: {
|
|
@@ -826986,7 +827120,8 @@ var evmConfig = {
|
|
|
826986
827120
|
explorer: {
|
|
826987
827121
|
type: "blockscout",
|
|
826988
827122
|
uri: "https://arbitrum.blockscout.com/api"
|
|
826989
|
-
}
|
|
827123
|
+
},
|
|
827124
|
+
showNfts: false
|
|
826990
827125
|
}
|
|
826991
827126
|
},
|
|
826992
827127
|
config_currency_cronos: {
|
|
@@ -827002,7 +827137,8 @@ var evmConfig = {
|
|
|
827002
827137
|
explorer: {
|
|
827003
827138
|
type: "blockscout",
|
|
827004
827139
|
uri: "https://cronos.org/explorer/api"
|
|
827005
|
-
}
|
|
827140
|
+
},
|
|
827141
|
+
showNfts: false
|
|
827006
827142
|
}
|
|
827007
827143
|
},
|
|
827008
827144
|
config_currency_fantom: {
|
|
@@ -827018,7 +827154,8 @@ var evmConfig = {
|
|
|
827018
827154
|
explorer: {
|
|
827019
827155
|
type: "etherscan",
|
|
827020
827156
|
uri: "https://proxyetherscan.api.live.ledger.com/v2/api/250"
|
|
827021
|
-
}
|
|
827157
|
+
},
|
|
827158
|
+
showNfts: false
|
|
827022
827159
|
}
|
|
827023
827160
|
},
|
|
827024
827161
|
config_currency_flare: {
|
|
@@ -827034,7 +827171,8 @@ var evmConfig = {
|
|
|
827034
827171
|
explorer: {
|
|
827035
827172
|
type: "blockscout",
|
|
827036
827173
|
uri: "https://flare-explorer.flare.network/api"
|
|
827037
|
-
}
|
|
827174
|
+
},
|
|
827175
|
+
showNfts: false
|
|
827038
827176
|
}
|
|
827039
827177
|
},
|
|
827040
827178
|
config_currency_songbird: {
|
|
@@ -827050,7 +827188,8 @@ var evmConfig = {
|
|
|
827050
827188
|
explorer: {
|
|
827051
827189
|
type: "blockscout",
|
|
827052
827190
|
uri: "https://songbird-explorer.flare.network/api"
|
|
827053
|
-
}
|
|
827191
|
+
},
|
|
827192
|
+
showNfts: false
|
|
827054
827193
|
}
|
|
827055
827194
|
},
|
|
827056
827195
|
config_currency_moonbeam: {
|
|
@@ -827066,7 +827205,8 @@ var evmConfig = {
|
|
|
827066
827205
|
explorer: {
|
|
827067
827206
|
type: "etherscan",
|
|
827068
827207
|
uri: "https://proxyetherscan.api.live.ledger.com/v2/api/1284"
|
|
827069
|
-
}
|
|
827208
|
+
},
|
|
827209
|
+
showNfts: false
|
|
827070
827210
|
}
|
|
827071
827211
|
},
|
|
827072
827212
|
config_currency_rsk: {
|
|
@@ -827082,7 +827222,8 @@ var evmConfig = {
|
|
|
827082
827222
|
explorer: {
|
|
827083
827223
|
type: "blockscout",
|
|
827084
827224
|
uri: "https://rootstock.blockscout.com/api"
|
|
827085
|
-
}
|
|
827225
|
+
},
|
|
827226
|
+
showNfts: false
|
|
827086
827227
|
}
|
|
827087
827228
|
},
|
|
827088
827229
|
config_currency_bittorrent: {
|
|
@@ -827098,7 +827239,8 @@ var evmConfig = {
|
|
|
827098
827239
|
explorer: {
|
|
827099
827240
|
type: "etherscan",
|
|
827100
827241
|
uri: "https://proxyetherscan.api.live.ledger.com/v2/api/199"
|
|
827101
|
-
}
|
|
827242
|
+
},
|
|
827243
|
+
showNfts: false
|
|
827102
827244
|
}
|
|
827103
827245
|
},
|
|
827104
827246
|
config_currency_optimism: {
|
|
@@ -827114,7 +827256,8 @@ var evmConfig = {
|
|
|
827114
827256
|
explorer: {
|
|
827115
827257
|
type: "blockscout",
|
|
827116
827258
|
uri: "https://optimism.blockscout.com/api"
|
|
827117
|
-
}
|
|
827259
|
+
},
|
|
827260
|
+
showNfts: false
|
|
827118
827261
|
}
|
|
827119
827262
|
},
|
|
827120
827263
|
config_currency_optimism_sepolia: {
|
|
@@ -827122,7 +827265,8 @@ var evmConfig = {
|
|
|
827122
827265
|
default: {
|
|
827123
827266
|
status: { type: "active" },
|
|
827124
827267
|
node: { type: "external", uri: "https://sepolia.optimism.io" },
|
|
827125
|
-
explorer: { type: "blockscout", uri: "https://optimism-sepolia.blockscout.com/api" }
|
|
827268
|
+
explorer: { type: "blockscout", uri: "https://optimism-sepolia.blockscout.com/api" },
|
|
827269
|
+
showNfts: false
|
|
827126
827270
|
}
|
|
827127
827271
|
},
|
|
827128
827272
|
config_currency_energy_web: {
|
|
@@ -827138,7 +827282,8 @@ var evmConfig = {
|
|
|
827138
827282
|
explorer: {
|
|
827139
827283
|
type: "blockscout",
|
|
827140
827284
|
uri: "https://explorer.energyweb.org/api"
|
|
827141
|
-
}
|
|
827285
|
+
},
|
|
827286
|
+
showNfts: false
|
|
827142
827287
|
}
|
|
827143
827288
|
},
|
|
827144
827289
|
config_currency_astar: {
|
|
@@ -827154,7 +827299,8 @@ var evmConfig = {
|
|
|
827154
827299
|
explorer: {
|
|
827155
827300
|
type: "blockscout",
|
|
827156
827301
|
uri: "https://astar.blockscout.com/api"
|
|
827157
|
-
}
|
|
827302
|
+
},
|
|
827303
|
+
showNfts: false
|
|
827158
827304
|
}
|
|
827159
827305
|
},
|
|
827160
827306
|
config_currency_metis: {
|
|
@@ -827170,7 +827316,8 @@ var evmConfig = {
|
|
|
827170
827316
|
explorer: {
|
|
827171
827317
|
type: "blockscout",
|
|
827172
827318
|
uri: "https://api.routescan.io/v2/network/mainnet/evm/1088/etherscan/api"
|
|
827173
|
-
}
|
|
827319
|
+
},
|
|
827320
|
+
showNfts: false
|
|
827174
827321
|
}
|
|
827175
827322
|
},
|
|
827176
827323
|
config_currency_boba: {
|
|
@@ -827186,7 +827333,8 @@ var evmConfig = {
|
|
|
827186
827333
|
explorer: {
|
|
827187
827334
|
type: "etherscan",
|
|
827188
827335
|
uri: "https://api.routescan.io/v2/network/mainnet/evm/288/etherscan"
|
|
827189
|
-
}
|
|
827336
|
+
},
|
|
827337
|
+
showNfts: false
|
|
827190
827338
|
}
|
|
827191
827339
|
},
|
|
827192
827340
|
config_currency_moonriver: {
|
|
@@ -827202,7 +827350,8 @@ var evmConfig = {
|
|
|
827202
827350
|
explorer: {
|
|
827203
827351
|
type: "etherscan",
|
|
827204
827352
|
uri: "https://proxyetherscan.api.live.ledger.com/v2/api/1285"
|
|
827205
|
-
}
|
|
827353
|
+
},
|
|
827354
|
+
showNfts: false
|
|
827206
827355
|
}
|
|
827207
827356
|
},
|
|
827208
827357
|
config_currency_velas_evm: {
|
|
@@ -827218,7 +827367,8 @@ var evmConfig = {
|
|
|
827218
827367
|
explorer: {
|
|
827219
827368
|
type: "blockscout",
|
|
827220
827369
|
uri: "https://evmexplorer.velas.com/api"
|
|
827221
|
-
}
|
|
827370
|
+
},
|
|
827371
|
+
showNfts: false
|
|
827222
827372
|
}
|
|
827223
827373
|
},
|
|
827224
827374
|
config_currency_syscoin: {
|
|
@@ -827234,7 +827384,8 @@ var evmConfig = {
|
|
|
827234
827384
|
explorer: {
|
|
827235
827385
|
type: "blockscout",
|
|
827236
827386
|
uri: "https://explorer.syscoin.org/api"
|
|
827237
|
-
}
|
|
827387
|
+
},
|
|
827388
|
+
showNfts: false
|
|
827238
827389
|
}
|
|
827239
827390
|
},
|
|
827240
827391
|
config_currency_telos_evm: {
|
|
@@ -827250,7 +827401,8 @@ var evmConfig = {
|
|
|
827250
827401
|
explorer: {
|
|
827251
827402
|
type: "teloscan",
|
|
827252
827403
|
uri: "https://api.teloscan.io/api"
|
|
827253
|
-
}
|
|
827404
|
+
},
|
|
827405
|
+
showNfts: false
|
|
827254
827406
|
}
|
|
827255
827407
|
},
|
|
827256
827408
|
config_currency_polygon_zk_evm: {
|
|
@@ -827266,7 +827418,8 @@ var evmConfig = {
|
|
|
827266
827418
|
explorer: {
|
|
827267
827419
|
type: "blockscout",
|
|
827268
827420
|
uri: "https://explorer-ui.cardona.zkevm-rpc.com/api"
|
|
827269
|
-
}
|
|
827421
|
+
},
|
|
827422
|
+
showNfts: false
|
|
827270
827423
|
}
|
|
827271
827424
|
},
|
|
827272
827425
|
config_currency_base: {
|
|
@@ -827280,9 +827433,10 @@ var evmConfig = {
|
|
|
827280
827433
|
uri: "https://developer-access-mainnet.base.org"
|
|
827281
827434
|
},
|
|
827282
827435
|
explorer: {
|
|
827283
|
-
type: "
|
|
827284
|
-
uri: "https://
|
|
827285
|
-
}
|
|
827436
|
+
type: "etherscan",
|
|
827437
|
+
uri: "https://proxyetherscan.api.live.ledger.com/v2/api/8453"
|
|
827438
|
+
},
|
|
827439
|
+
showNfts: false
|
|
827286
827440
|
}
|
|
827287
827441
|
},
|
|
827288
827442
|
config_currency_klaytn: {
|
|
@@ -827298,7 +827452,8 @@ var evmConfig = {
|
|
|
827298
827452
|
explorer: {
|
|
827299
827453
|
type: "klaytnfinder",
|
|
827300
827454
|
uri: "https://cypress-oapi.klaytnfinder.io/api"
|
|
827301
|
-
}
|
|
827455
|
+
},
|
|
827456
|
+
showNfts: false
|
|
827302
827457
|
}
|
|
827303
827458
|
},
|
|
827304
827459
|
config_currency_neon_evm: {
|
|
@@ -827314,7 +827469,8 @@ var evmConfig = {
|
|
|
827314
827469
|
explorer: {
|
|
827315
827470
|
type: "blockscout",
|
|
827316
827471
|
uri: "https://neon.blockscout.com/api"
|
|
827317
|
-
}
|
|
827472
|
+
},
|
|
827473
|
+
showNfts: false
|
|
827318
827474
|
}
|
|
827319
827475
|
},
|
|
827320
827476
|
config_currency_lukso: {
|
|
@@ -827330,7 +827486,8 @@ var evmConfig = {
|
|
|
827330
827486
|
explorer: {
|
|
827331
827487
|
type: "blockscout",
|
|
827332
827488
|
uri: "https://explorer.execution.mainnet.lukso.network/api/v1/"
|
|
827333
|
-
}
|
|
827489
|
+
},
|
|
827490
|
+
showNfts: false
|
|
827334
827491
|
}
|
|
827335
827492
|
},
|
|
827336
827493
|
config_currency_linea: {
|
|
@@ -827346,7 +827503,8 @@ var evmConfig = {
|
|
|
827346
827503
|
explorer: {
|
|
827347
827504
|
type: "etherscan",
|
|
827348
827505
|
uri: "https://proxyetherscan.api.live.ledger.com/v2/api/59144"
|
|
827349
|
-
}
|
|
827506
|
+
},
|
|
827507
|
+
showNfts: false
|
|
827350
827508
|
}
|
|
827351
827509
|
},
|
|
827352
827510
|
// testnets
|
|
@@ -827356,7 +827514,8 @@ var evmConfig = {
|
|
|
827356
827514
|
status: { type: "active" },
|
|
827357
827515
|
node: { type: "ledger", explorerId: "eth_sepolia" },
|
|
827358
827516
|
explorer: { type: "ledger", explorerId: "eth_sepolia" },
|
|
827359
|
-
gasTracker: { type: "ledger", explorerId: "eth_sepolia" }
|
|
827517
|
+
gasTracker: { type: "ledger", explorerId: "eth_sepolia" },
|
|
827518
|
+
showNfts: false
|
|
827360
827519
|
}
|
|
827361
827520
|
},
|
|
827362
827521
|
config_currency_ethereum_holesky: {
|
|
@@ -827365,7 +827524,8 @@ var evmConfig = {
|
|
|
827365
827524
|
status: { type: "active" },
|
|
827366
827525
|
node: { type: "ledger", explorerId: "eth_holesky" },
|
|
827367
827526
|
explorer: { type: "ledger", explorerId: "eth_holesky" },
|
|
827368
|
-
gasTracker: { type: "ledger", explorerId: "eth_holesky" }
|
|
827527
|
+
gasTracker: { type: "ledger", explorerId: "eth_holesky" },
|
|
827528
|
+
showNfts: false
|
|
827369
827529
|
}
|
|
827370
827530
|
},
|
|
827371
827531
|
config_currency_arbitrum_sepolia: {
|
|
@@ -827375,7 +827535,8 @@ var evmConfig = {
|
|
|
827375
827535
|
explorer: {
|
|
827376
827536
|
type: "etherscan",
|
|
827377
827537
|
uri: "https://proxyetherscan.api.live.ledger.com/v2/api/421614"
|
|
827378
|
-
}
|
|
827538
|
+
},
|
|
827539
|
+
showNfts: false
|
|
827379
827540
|
}
|
|
827380
827541
|
},
|
|
827381
827542
|
config_currency_polygon_zk_evm_testnet: {
|
|
@@ -827386,7 +827547,8 @@ var evmConfig = {
|
|
|
827386
827547
|
explorer: {
|
|
827387
827548
|
type: "etherscan",
|
|
827388
827549
|
uri: "https://proxyetherscan.api.live.ledger.com/v2/api/1442"
|
|
827389
|
-
}
|
|
827550
|
+
},
|
|
827551
|
+
showNfts: false
|
|
827390
827552
|
}
|
|
827391
827553
|
},
|
|
827392
827554
|
config_currency_base_sepolia: {
|
|
@@ -827394,7 +827556,8 @@ var evmConfig = {
|
|
|
827394
827556
|
default: {
|
|
827395
827557
|
status: { type: "active" },
|
|
827396
827558
|
node: { type: "external", uri: "https://sepolia.base.org" },
|
|
827397
|
-
explorer: { type: "blockscout", uri: "https://base-sepolia.blockscout.com/api" }
|
|
827559
|
+
explorer: { type: "blockscout", uri: "https://base-sepolia.blockscout.com/api" },
|
|
827560
|
+
showNfts: false
|
|
827398
827561
|
}
|
|
827399
827562
|
},
|
|
827400
827563
|
config_currency_linea_sepolia: {
|
|
@@ -827405,7 +827568,8 @@ var evmConfig = {
|
|
|
827405
827568
|
explorer: {
|
|
827406
827569
|
type: "etherscan",
|
|
827407
827570
|
uri: "https://proxyetherscan.api.live.ledger.com/v2/api/59141"
|
|
827408
|
-
}
|
|
827571
|
+
},
|
|
827572
|
+
showNfts: false
|
|
827409
827573
|
}
|
|
827410
827574
|
},
|
|
827411
827575
|
config_currency_blast: {
|
|
@@ -827413,7 +827577,8 @@ var evmConfig = {
|
|
|
827413
827577
|
default: {
|
|
827414
827578
|
status: { type: "active" },
|
|
827415
827579
|
node: { type: "external", uri: "https://rpc.blast.io" },
|
|
827416
|
-
explorer: { type: "blockscout", uri: "https://blast.blockscout.com/api" }
|
|
827580
|
+
explorer: { type: "blockscout", uri: "https://blast.blockscout.com/api" },
|
|
827581
|
+
showNfts: false
|
|
827417
827582
|
}
|
|
827418
827583
|
},
|
|
827419
827584
|
config_currency_blast_sepolia: {
|
|
@@ -827421,7 +827586,8 @@ var evmConfig = {
|
|
|
827421
827586
|
default: {
|
|
827422
827587
|
status: { type: "active" },
|
|
827423
827588
|
node: { type: "external", uri: "https://sepolia.blast.io" },
|
|
827424
|
-
explorer: { type: "blockscout", uri: "https://blast-testnet.blockscout.com/api" }
|
|
827589
|
+
explorer: { type: "blockscout", uri: "https://blast-testnet.blockscout.com/api" },
|
|
827590
|
+
showNfts: false
|
|
827425
827591
|
}
|
|
827426
827592
|
},
|
|
827427
827593
|
config_currency_scroll: {
|
|
@@ -827429,7 +827595,8 @@ var evmConfig = {
|
|
|
827429
827595
|
default: {
|
|
827430
827596
|
status: { type: "active" },
|
|
827431
827597
|
node: { type: "external", uri: "https://rpc.scroll.io" },
|
|
827432
|
-
explorer: { type: "blockscout", uri: "https://scroll.blockscout.com/api" }
|
|
827598
|
+
explorer: { type: "blockscout", uri: "https://scroll.blockscout.com/api" },
|
|
827599
|
+
showNfts: false
|
|
827433
827600
|
}
|
|
827434
827601
|
},
|
|
827435
827602
|
config_currency_scroll_sepolia: {
|
|
@@ -827437,7 +827604,8 @@ var evmConfig = {
|
|
|
827437
827604
|
default: {
|
|
827438
827605
|
status: { type: "active" },
|
|
827439
827606
|
node: { type: "external", uri: "https://sepolia-rpc.scroll.io" },
|
|
827440
|
-
explorer: { type: "blockscout", uri: "https://scroll-sepolia.blockscout.com/api" }
|
|
827607
|
+
explorer: { type: "blockscout", uri: "https://scroll-sepolia.blockscout.com/api" },
|
|
827608
|
+
showNfts: false
|
|
827441
827609
|
}
|
|
827442
827610
|
},
|
|
827443
827611
|
config_currency_etherlink: {
|
|
@@ -827445,7 +827613,8 @@ var evmConfig = {
|
|
|
827445
827613
|
default: {
|
|
827446
827614
|
status: { type: "active" },
|
|
827447
827615
|
node: { type: "external", uri: "https://node.mainnet.etherlink.com" },
|
|
827448
|
-
explorer: { type: "blockscout", uri: "https://explorer.etherlink.com/api" }
|
|
827616
|
+
explorer: { type: "blockscout", uri: "https://explorer.etherlink.com/api" },
|
|
827617
|
+
showNfts: false
|
|
827449
827618
|
}
|
|
827450
827619
|
},
|
|
827451
827620
|
config_currency_zksync: {
|
|
@@ -827453,7 +827622,8 @@ var evmConfig = {
|
|
|
827453
827622
|
default: {
|
|
827454
827623
|
status: { type: "active" },
|
|
827455
827624
|
node: { type: "external", uri: "https://mainnet.era.zksync.io" },
|
|
827456
|
-
explorer: { type: "blockscout", uri: "https://zksync.blockscout.com/api" }
|
|
827625
|
+
explorer: { type: "blockscout", uri: "https://zksync.blockscout.com/api" },
|
|
827626
|
+
showNfts: false
|
|
827457
827627
|
}
|
|
827458
827628
|
},
|
|
827459
827629
|
config_currency_zksync_sepolia: {
|
|
@@ -827461,7 +827631,8 @@ var evmConfig = {
|
|
|
827461
827631
|
default: {
|
|
827462
827632
|
status: { type: "active" },
|
|
827463
827633
|
node: { type: "external", uri: "https://sepolia.era.zksync.dev" },
|
|
827464
|
-
explorer: { type: "blockscout", uri: "https://zksync-sepolia.blockscout.com/api" }
|
|
827634
|
+
explorer: { type: "blockscout", uri: "https://zksync-sepolia.blockscout.com/api" },
|
|
827635
|
+
showNfts: false
|
|
827465
827636
|
}
|
|
827466
827637
|
}
|
|
827467
827638
|
};
|
|
@@ -827861,14 +828032,14 @@ var import_bignumber393 = require("bignumber.js");
|
|
|
827861
828032
|
var import_uniq2 = __toESM(require("lodash/uniq"));
|
|
827862
828033
|
var import_groupBy6 = __toESM(require("lodash/groupBy"));
|
|
827863
828034
|
init_lib_es2();
|
|
827864
|
-
var
|
|
828035
|
+
var import_invariant102 = __toESM(require("invariant"));
|
|
827865
828036
|
var import_flatMap25 = __toESM(require("lodash/flatMap"));
|
|
827866
828037
|
|
|
827867
828038
|
// ../../libs/coin-framework/lib-es/bot/specs.js
|
|
827868
828039
|
init_lib_es2();
|
|
827869
828040
|
var import_bignumber369 = __toESM(require("bignumber.js"));
|
|
827870
828041
|
var import_expect = __toESM(require_build21());
|
|
827871
|
-
var
|
|
828042
|
+
var import_invariant69 = __toESM(require("invariant"));
|
|
827872
828043
|
var import_sample2 = __toESM(require("lodash/sample"));
|
|
827873
828044
|
var stepValueTransformDefault = (s46) => s46.trim();
|
|
827874
828045
|
function pickSiblings(siblings, maxAccount10 = 5) {
|
|
@@ -827996,7 +828167,7 @@ function formatDeviceAmount(currency24, value6, options22 = defaultFormatOptions
|
|
|
827996
828167
|
function expectSiblingsHaveSpendablePartGreaterThan(siblings, threshold) {
|
|
827997
828168
|
const spendableTotal = siblings.reduce((acc, a62) => acc.plus(a62.spendableBalance), new import_bignumber369.default(0));
|
|
827998
828169
|
const total = siblings.reduce((acc, a62) => acc.plus(a62.balance), new import_bignumber369.default(0));
|
|
827999
|
-
(0,
|
|
828170
|
+
(0, import_invariant69.default)(spendableTotal.div(total).gt(threshold), "the spendable part of accounts is sufficient (threshold: %s)", threshold);
|
|
828000
828171
|
}
|
|
828001
828172
|
var genericTestDestination = ({ destination, operation, destinationBeforeTransaction, sendingOperation }) => {
|
|
828002
828173
|
const amount = sendingOperation.value.minus(sendingOperation.fee);
|
|
@@ -828014,7 +828185,7 @@ var genericTestDestination = ({ destination, operation, destinationBeforeTransac
|
|
|
828014
828185
|
init_lib_es5();
|
|
828015
828186
|
var import_bignumber370 = require("bignumber.js");
|
|
828016
828187
|
var import_expect2 = __toESM(require_build21());
|
|
828017
|
-
var
|
|
828188
|
+
var import_invariant70 = __toESM(require("invariant"));
|
|
828018
828189
|
var import_sample3 = __toESM(require("lodash/sample"));
|
|
828019
828190
|
|
|
828020
828191
|
// ../../libs/coin-modules/coin-algorand/lib-es/speculos-deviceActions.js
|
|
@@ -828116,7 +828287,7 @@ var currency6 = getCryptoCurrencyById("algorand");
|
|
|
828116
828287
|
var minBalanceNewAccount = parseCurrencyUnit(currency6.units[0], "0.1");
|
|
828117
828288
|
var checkSendableToEmptyAccount = (amount, recipient) => {
|
|
828118
828289
|
if (isAccountEmpty(recipient) && amount.lte(minBalanceNewAccount)) {
|
|
828119
|
-
(0,
|
|
828290
|
+
(0, import_invariant70.default)(amount.gt(minBalanceNewAccount), "not enough funds to send to new account");
|
|
828120
828291
|
}
|
|
828121
828292
|
};
|
|
828122
828293
|
var getAssetsWithBalance = (account3) => {
|
|
@@ -828136,7 +828307,7 @@ var getRandomAssetId = (account3) => {
|
|
|
828136
828307
|
}, []);
|
|
828137
828308
|
const ASAs = listTokensForCryptoCurrency(account3.currency).map((asa) => asa.id);
|
|
828138
828309
|
const diff = ASAs?.filter((asa) => !optedInASA?.includes(asa));
|
|
828139
|
-
(0,
|
|
828310
|
+
(0, import_invariant70.default)(diff && diff.length > 0, "already got all optin");
|
|
828140
828311
|
return (0, import_sample3.default)(diff);
|
|
828141
828312
|
};
|
|
828142
828313
|
var algorand = {
|
|
@@ -828154,7 +828325,7 @@ var algorand = {
|
|
|
828154
828325
|
maxRun: 1,
|
|
828155
828326
|
testDestination: genericTestDestination,
|
|
828156
828327
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
828157
|
-
(0,
|
|
828328
|
+
(0, import_invariant70.default)(maxSpendable.gt(0), "Spendable balance is too low");
|
|
828158
828329
|
const sibling = pickSiblings(siblings, 4);
|
|
828159
828330
|
const recipient = sibling.freshAddress;
|
|
828160
828331
|
const transaction = bridge28.createTransaction(account3);
|
|
@@ -828184,7 +828355,7 @@ var algorand = {
|
|
|
828184
828355
|
maxRun: 1,
|
|
828185
828356
|
testDestination: genericTestDestination,
|
|
828186
828357
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
828187
|
-
(0,
|
|
828358
|
+
(0, import_invariant70.default)(maxSpendable.gt(0), "Spendable balance is too low");
|
|
828188
828359
|
const sibling = pickSiblings(siblings, 4);
|
|
828189
828360
|
const amount = maxSpendable;
|
|
828190
828361
|
checkSendableToEmptyAccount(amount, sibling);
|
|
@@ -828209,9 +828380,9 @@ var algorand = {
|
|
|
828209
828380
|
feature: "tokens",
|
|
828210
828381
|
maxRun: 1,
|
|
828211
828382
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
828212
|
-
(0,
|
|
828383
|
+
(0, import_invariant70.default)(maxSpendable.gt(0), "Spendable balance is too low");
|
|
828213
828384
|
const subAccount = (0, import_sample3.default)(getAssetsWithBalance(account3));
|
|
828214
|
-
(0,
|
|
828385
|
+
(0, import_invariant70.default)(subAccount && subAccount.type === "TokenAccount", "no subAccount with ASA");
|
|
828215
828386
|
const assetId = subAccount.token.id;
|
|
828216
828387
|
const sibling = pickSiblingsOptedIn(siblings, assetId);
|
|
828217
828388
|
const transaction = bridge28.createTransaction(account3);
|
|
@@ -828247,12 +828418,12 @@ var algorand = {
|
|
|
828247
828418
|
feature: "tokens",
|
|
828248
828419
|
maxRun: 1,
|
|
828249
828420
|
transaction: ({ account: account3, bridge: bridge28, maxSpendable }) => {
|
|
828250
|
-
(0,
|
|
828421
|
+
(0, import_invariant70.default)(maxSpendable.gt(new import_bignumber370.BigNumber(1e5)), "Spendable balance is too low");
|
|
828251
828422
|
const transaction = bridge28.createTransaction(account3);
|
|
828252
828423
|
const mode = "optIn";
|
|
828253
828424
|
const assetId = getRandomAssetId(account3);
|
|
828254
828425
|
const subAccount = account3.subAccounts ? account3.subAccounts.find((a62) => a62.id.includes(assetId)) : null;
|
|
828255
|
-
(0,
|
|
828426
|
+
(0, import_invariant70.default)(!subAccount, "already opt-in");
|
|
828256
828427
|
const updates7 = [
|
|
828257
828428
|
{
|
|
828258
828429
|
mode
|
|
@@ -828268,7 +828439,7 @@ var algorand = {
|
|
|
828268
828439
|
},
|
|
828269
828440
|
// eslint-disable-next-line no-unused-vars
|
|
828270
828441
|
test: ({ account: account3, transaction }) => {
|
|
828271
|
-
(0,
|
|
828442
|
+
(0, import_invariant70.default)(transaction.assetId, "should have an assetId");
|
|
828272
828443
|
const assetId = extractTokenId(transaction.assetId);
|
|
828273
828444
|
botTest("have sub account with asset id", () => (0, import_expect2.default)(account3.subAccounts && account3.subAccounts.some((a62) => a62.id.endsWith(assetId))).toBe(true));
|
|
828274
828445
|
}
|
|
@@ -828279,8 +828450,8 @@ var algorand = {
|
|
|
828279
828450
|
maxRun: 1,
|
|
828280
828451
|
transaction: ({ account: account3, bridge: bridge28, maxSpendable }) => {
|
|
828281
828452
|
const rewards = account3.algorandResources?.rewards;
|
|
828282
|
-
(0,
|
|
828283
|
-
(0,
|
|
828453
|
+
(0, import_invariant70.default)(rewards && rewards.gt(0), "No pending rewards");
|
|
828454
|
+
(0, import_invariant70.default)(maxSpendable.gt(0), "Spendable balance is too low");
|
|
828284
828455
|
const transaction = bridge28.createTransaction(account3);
|
|
828285
828456
|
const mode = "claimReward";
|
|
828286
828457
|
const updates7 = [
|
|
@@ -828304,7 +828475,7 @@ var specs_default = {
|
|
|
828304
828475
|
};
|
|
828305
828476
|
|
|
828306
828477
|
// ../../libs/coin-modules/coin-aptos/lib-es/test/bot-specs.js
|
|
828307
|
-
var
|
|
828478
|
+
var import_invariant71 = __toESM(require("invariant"));
|
|
828308
828479
|
var import_expect3 = __toESM(require_build21());
|
|
828309
828480
|
init_lib_es5();
|
|
828310
828481
|
var import_bignumber371 = __toESM(require("bignumber.js"));
|
|
@@ -828365,7 +828536,7 @@ var aptosSpecs = {
|
|
|
828365
828536
|
testTimeout: 6 * 60 * 1e3,
|
|
828366
828537
|
minViableAmount: MIN_SAFE,
|
|
828367
828538
|
transactionCheck: ({ maxSpendable }) => {
|
|
828368
|
-
(0,
|
|
828539
|
+
(0, import_invariant71.default)(maxSpendable.gt(MIN_SAFE), "balance is too low");
|
|
828369
828540
|
},
|
|
828370
828541
|
mutations: [
|
|
828371
828542
|
{
|
|
@@ -828374,7 +828545,7 @@ var aptosSpecs = {
|
|
|
828374
828545
|
maxRun: 1,
|
|
828375
828546
|
testDestination: genericTestDestination,
|
|
828376
828547
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
828377
|
-
(0,
|
|
828548
|
+
(0, import_invariant71.default)(maxSpendable.gt(MIN_SAFE), "balance is too low");
|
|
828378
828549
|
const sibling = pickSiblings(siblings, maxAccount);
|
|
828379
828550
|
const recipient = sibling.freshAddress;
|
|
828380
828551
|
const amount = maxSpendable.div(2).integerValue();
|
|
@@ -828426,7 +828597,7 @@ var bot_specs_default = {
|
|
|
828426
828597
|
// ../../libs/coin-modules/coin-bitcoin/lib-es/specs.js
|
|
828427
828598
|
var import_expect4 = __toESM(require_build21());
|
|
828428
828599
|
var import_bignumber372 = require("bignumber.js");
|
|
828429
|
-
var
|
|
828600
|
+
var import_invariant72 = __toESM(require("invariant"));
|
|
828430
828601
|
var import_bchaddrjs2 = __toESM(require_bchaddr());
|
|
828431
828602
|
var import_sample4 = __toESM(require("lodash/sample"));
|
|
828432
828603
|
init_lib_es2();
|
|
@@ -828493,13 +828664,13 @@ var acceptTransaction3 = deviceActionFlow({
|
|
|
828493
828664
|
|
|
828494
828665
|
// ../../libs/coin-modules/coin-bitcoin/lib-es/specs.js
|
|
828495
828666
|
var genericTest = ({ operation, account: account3, transaction, status, accountBeforeTransaction }) => {
|
|
828496
|
-
(0,
|
|
828667
|
+
(0, import_invariant72.default)(Date.now() - operation.date.getTime() < 1e6, "operation time to be recent");
|
|
828497
828668
|
botTest("account balance decreased with operation value", () => (0, import_expect4.default)(account3.balance.toString()).toBe(accountBeforeTransaction.balance.minus(operation.value).toString()));
|
|
828498
828669
|
const { txInputs, txOutputs } = status;
|
|
828499
|
-
(0,
|
|
828500
|
-
(0,
|
|
828670
|
+
(0, import_invariant72.default)(txInputs, "tx inputs defined");
|
|
828671
|
+
(0, import_invariant72.default)(txOutputs, "tx outputs defined");
|
|
828501
828672
|
const { bitcoinResources } = accountBeforeTransaction;
|
|
828502
|
-
(0,
|
|
828673
|
+
(0, import_invariant72.default)(bitcoinResources, "bitcoin resources");
|
|
828503
828674
|
const nonDeterministicPicking = transaction.utxoStrategy.strategy === bitcoinPickingStrategy.OPTIMIZE_SIZE;
|
|
828504
828675
|
const asSorted = (opShape) => ({
|
|
828505
828676
|
senders: opShape.senders.slice(0).sort(),
|
|
@@ -828528,7 +828699,7 @@ var bitcoinLikeMutations = ({ minimalAmount: minimalAmount11 = genericMinimalAmo
|
|
|
828528
828699
|
feature: "send",
|
|
828529
828700
|
maxRun: 1,
|
|
828530
828701
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
828531
|
-
(0,
|
|
828702
|
+
(0, import_invariant72.default)(maxSpendable.gt(minimalAmount11), "balance is too low");
|
|
828532
828703
|
const sibling = pickSiblings(siblings, targetAccountSize);
|
|
828533
828704
|
const recipient = recipientVariation(sibling.freshAddress);
|
|
828534
828705
|
const amount = maxSpendable.div(1.9 + 0.2 * Math.random()).integerValue();
|
|
@@ -828562,7 +828733,7 @@ var bitcoinLikeMutations = ({ minimalAmount: minimalAmount11 = genericMinimalAmo
|
|
|
828562
828733
|
feature: "send",
|
|
828563
828734
|
maxRun: 1,
|
|
828564
828735
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
828565
|
-
(0,
|
|
828736
|
+
(0, import_invariant72.default)(maxSpendable.gt(minimalAmount11), "balance is too low");
|
|
828566
828737
|
const sibling = pickSiblings(siblings, targetAccountSize);
|
|
828567
828738
|
const transaction = {
|
|
828568
828739
|
...bridge28.createTransaction(account3),
|
|
@@ -828595,16 +828766,16 @@ var bitcoinLikeMutations = ({ minimalAmount: minimalAmount11 = genericMinimalAmo
|
|
|
828595
828766
|
feature: "send",
|
|
828596
828767
|
maxRun: 1,
|
|
828597
828768
|
transaction: ({ account: account3, bridge: bridge28, siblings, maxSpendable }) => {
|
|
828598
|
-
(0,
|
|
828769
|
+
(0, import_invariant72.default)(maxSpendable.gt(minimalAmount11), "balance is too low");
|
|
828599
828770
|
const sibling = pickSiblings(siblings, targetAccountSize);
|
|
828600
828771
|
const { bitcoinResources } = account3;
|
|
828601
|
-
(0,
|
|
828772
|
+
(0, import_invariant72.default)(bitcoinResources, "bitcoin resources");
|
|
828602
828773
|
const transaction = {
|
|
828603
828774
|
...bridge28.createTransaction(account3),
|
|
828604
828775
|
feePerByte: new import_bignumber372.BigNumber(1e-4)
|
|
828605
828776
|
};
|
|
828606
828777
|
const utxo = (0, import_sample4.default)(bitcoinResources.utxos.filter((u48) => u48.blockHeight && u48.value.gt(genericMinimalAmount)));
|
|
828607
|
-
(0,
|
|
828778
|
+
(0, import_invariant72.default)(utxo, "no confirmed utxo");
|
|
828608
828779
|
return {
|
|
828609
828780
|
transaction,
|
|
828610
828781
|
updates: [
|
|
@@ -828630,7 +828801,7 @@ var bitcoinLikeMutations = ({ minimalAmount: minimalAmount11 = genericMinimalAmo
|
|
|
828630
828801
|
testDestination,
|
|
828631
828802
|
test: ({ accountBeforeTransaction, account: account3, operation, transaction }) => {
|
|
828632
828803
|
const utxo = (accountBeforeTransaction.bitcoinResources?.utxos || []).find((utxo2) => !transaction.utxoStrategy.excludeUTXOs.some((u48) => u48.hash === utxo2.hash && u48.outputIndex === utxo2.outputIndex));
|
|
828633
|
-
(0,
|
|
828804
|
+
(0, import_invariant72.default)(utxo, "utxo available");
|
|
828634
828805
|
botTest("sender is only the utxo address", () => {
|
|
828635
828806
|
let expectedSender = utxo.address;
|
|
828636
828807
|
if (account3.currency.id === "bitcoin_cash" && expectedSender) {
|
|
@@ -828648,10 +828819,10 @@ var bitcoinLikeMutations = ({ minimalAmount: minimalAmount11 = genericMinimalAmo
|
|
|
828648
828819
|
feature: "send",
|
|
828649
828820
|
maxRun: 1,
|
|
828650
828821
|
transaction: ({ account: account3, bridge: bridge28, siblings, maxSpendable }) => {
|
|
828651
|
-
(0,
|
|
828822
|
+
(0, import_invariant72.default)(maxSpendable.gt(minimalAmount11), "balance is too low");
|
|
828652
828823
|
const sibling = pickSiblings(siblings, targetAccountSize);
|
|
828653
828824
|
const { bitcoinResources } = account3;
|
|
828654
|
-
(0,
|
|
828825
|
+
(0, import_invariant72.default)(bitcoinResources, "bitcoin resources");
|
|
828655
828826
|
const transaction = {
|
|
828656
828827
|
...bridge28.createTransaction(account3),
|
|
828657
828828
|
feePerByte: new import_bignumber372.BigNumber(1e-4),
|
|
@@ -828680,7 +828851,7 @@ var bitcoinLikeMutations = ({ minimalAmount: minimalAmount11 = genericMinimalAmo
|
|
|
828680
828851
|
feature: "sendMax",
|
|
828681
828852
|
maxRun: 1,
|
|
828682
828853
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
828683
|
-
(0,
|
|
828854
|
+
(0, import_invariant72.default)(maxSpendable.gt(minimalAmount11), "balance is too low");
|
|
828684
828855
|
const sibling = pickSiblings(siblings, targetAccountSize);
|
|
828685
828856
|
const recipient = recipientVariation(sibling.freshAddress);
|
|
828686
828857
|
const transaction = {
|
|
@@ -828951,7 +829122,7 @@ var specs_default2 = {
|
|
|
828951
829122
|
var import_expect5 = __toESM(require_build21());
|
|
828952
829123
|
init_lib_es5();
|
|
828953
829124
|
var import_bignumber373 = __toESM(require("bignumber.js"));
|
|
828954
|
-
var
|
|
829125
|
+
var import_invariant73 = __toESM(require("invariant"));
|
|
828955
829126
|
var import_typhonjs13 = __toESM(require_dist7());
|
|
828956
829127
|
|
|
828957
829128
|
// ../../libs/coin-modules/coin-cardano/lib-es/speculos-deviceActions.js
|
|
@@ -829103,12 +829274,12 @@ var cardano = {
|
|
|
829103
829274
|
feature: "tokens",
|
|
829104
829275
|
maxRun: 1,
|
|
829105
829276
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
829106
|
-
(0,
|
|
829277
|
+
(0, import_invariant73.default)(maxSpendable.gte(minSpendableRequiredForTokenTx), "balance is too low");
|
|
829107
829278
|
const sibling = pickSiblings(siblings, maxAccounts);
|
|
829108
829279
|
const recipient = sibling.freshAddress;
|
|
829109
829280
|
const transaction = bridge28.createTransaction(account3);
|
|
829110
829281
|
const subAccount = account3.subAccounts?.find((subAccount2) => subAccount2.balance.gt(1));
|
|
829111
|
-
(0,
|
|
829282
|
+
(0, import_invariant73.default)(subAccount, "No token account with balance");
|
|
829112
829283
|
const updates7 = [
|
|
829113
829284
|
{ subAccountId: subAccount.id },
|
|
829114
829285
|
{ recipient },
|
|
@@ -829134,7 +829305,7 @@ var cardano = {
|
|
|
829134
829305
|
feature: "send",
|
|
829135
829306
|
maxRun: 1,
|
|
829136
829307
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
829137
|
-
(0,
|
|
829308
|
+
(0, import_invariant73.default)(maxSpendable.gt(minBalanceRequired), "balance is too low");
|
|
829138
829309
|
const sibling = pickSiblings(siblings, maxAccounts);
|
|
829139
829310
|
const recipient = sibling.freshAddress;
|
|
829140
829311
|
const transaction = bridge28.createTransaction(account3);
|
|
@@ -829171,7 +829342,7 @@ var cardano = {
|
|
|
829171
829342
|
maxRun: 1,
|
|
829172
829343
|
testDestination: genericTestDestination,
|
|
829173
829344
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
829174
|
-
(0,
|
|
829345
|
+
(0, import_invariant73.default)(maxSpendable.gt(minBalanceRequiredForMaxSend), "balance is too low");
|
|
829175
829346
|
const sibling = pickSiblings(siblings, maxAccounts);
|
|
829176
829347
|
const recipient = sibling.freshAddress;
|
|
829177
829348
|
const transaction = bridge28.createTransaction(account3);
|
|
@@ -829199,7 +829370,7 @@ var cardano = {
|
|
|
829199
829370
|
feature: "staking",
|
|
829200
829371
|
maxRun: 1,
|
|
829201
829372
|
transaction: ({ account: account3, bridge: bridge28, maxSpendable }) => {
|
|
829202
|
-
(0,
|
|
829373
|
+
(0, import_invariant73.default)(maxSpendable.gte(minBalanceRequiredForDelegate), "balance is too low");
|
|
829203
829374
|
const transaction = bridge28.createTransaction(account3);
|
|
829204
829375
|
return {
|
|
829205
829376
|
transaction,
|
|
@@ -829231,8 +829402,8 @@ var cardano = {
|
|
|
829231
829402
|
feature: "staking",
|
|
829232
829403
|
maxRun: 1,
|
|
829233
829404
|
transaction: ({ account: account3, bridge: bridge28, maxSpendable }) => {
|
|
829234
|
-
(0,
|
|
829235
|
-
(0,
|
|
829405
|
+
(0, import_invariant73.default)(maxSpendable.gte(minBalanceRequiredForDelegate), "balance is too low");
|
|
829406
|
+
(0, import_invariant73.default)(account3.cardanoResources.delegation?.poolId, "account should already be delegated to redelegate");
|
|
829236
829407
|
const transaction = bridge28.createTransaction(account3);
|
|
829237
829408
|
return {
|
|
829238
829409
|
transaction,
|
|
@@ -829258,8 +829429,8 @@ var cardano = {
|
|
|
829258
829429
|
feature: "staking",
|
|
829259
829430
|
maxRun: 1,
|
|
829260
829431
|
transaction: ({ account: account3, bridge: bridge28, maxSpendable }) => {
|
|
829261
|
-
(0,
|
|
829262
|
-
(0,
|
|
829432
|
+
(0, import_invariant73.default)(maxSpendable.gte(minBalanceRequiredForDelegate), "balance is too low");
|
|
829433
|
+
(0, import_invariant73.default)(account3.cardanoResources.delegation?.poolId, "account should already be delegated to undelegate");
|
|
829263
829434
|
const transaction = bridge28.createTransaction(account3);
|
|
829264
829435
|
return {
|
|
829265
829436
|
transaction,
|
|
@@ -829284,7 +829455,7 @@ var cardano = {
|
|
|
829284
829455
|
var specs_default3 = { cardano };
|
|
829285
829456
|
|
|
829286
829457
|
// ../../libs/coin-modules/coin-casper/lib-es/test/bot-specs.js
|
|
829287
|
-
var
|
|
829458
|
+
var import_invariant74 = __toESM(require("invariant"));
|
|
829288
829459
|
init_lib_es5();
|
|
829289
829460
|
var import_bignumber374 = __toESM(require("bignumber.js"));
|
|
829290
829461
|
var import_expect6 = __toESM(require_build21());
|
|
@@ -829352,7 +829523,7 @@ var casperSpecs = {
|
|
|
829352
829523
|
testTimeout: 6 * 60 * 1e3,
|
|
829353
829524
|
minViableAmount: MIN_SAFE2,
|
|
829354
829525
|
transactionCheck: ({ maxSpendable }) => {
|
|
829355
|
-
(0,
|
|
829526
|
+
(0, import_invariant74.default)(maxSpendable.gt(MIN_SAFE2), "balance is too low");
|
|
829356
829527
|
},
|
|
829357
829528
|
mutations: [
|
|
829358
829529
|
{
|
|
@@ -829361,7 +829532,7 @@ var casperSpecs = {
|
|
|
829361
829532
|
maxRun: 1,
|
|
829362
829533
|
testDestination: genericTestDestination,
|
|
829363
829534
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
829364
|
-
(0,
|
|
829535
|
+
(0, import_invariant74.default)(maxSpendable.gt(MIN_SAFE2), "balance is too low");
|
|
829365
829536
|
const sibling = pickSiblings(siblings, maxAccount2);
|
|
829366
829537
|
const recipient = sibling.freshAddress;
|
|
829367
829538
|
const amount = maxSpendable.div(2).integerValue();
|
|
@@ -829439,7 +829610,7 @@ var bot_specs_default2 = {
|
|
|
829439
829610
|
init_lib_es5();
|
|
829440
829611
|
|
|
829441
829612
|
// ../../libs/coin-modules/coin-celo/lib-es/test/specs/createSendMutation.js
|
|
829442
|
-
var
|
|
829613
|
+
var import_invariant75 = __toESM(require("invariant"));
|
|
829443
829614
|
var maxAccount3 = 10;
|
|
829444
829615
|
var currency8 = getCryptoCurrencyById("celo");
|
|
829445
829616
|
var minimalAmount = parseCurrencyUnit(currency8.units[0], "0.01");
|
|
@@ -829448,7 +829619,7 @@ var createSend50PercentMutation = () => ({
|
|
|
829448
829619
|
feature: "send",
|
|
829449
829620
|
maxRun: 1,
|
|
829450
829621
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
829451
|
-
(0,
|
|
829622
|
+
(0, import_invariant75.default)(maxSpendable.gt(minimalAmount), "Celo: Move 50% | balance is too low");
|
|
829452
829623
|
const sibling = pickSiblings(siblings, maxAccount3);
|
|
829453
829624
|
const recipient = sibling.freshAddress;
|
|
829454
829625
|
const amount = maxSpendable.div(2).integerValue();
|
|
@@ -829463,7 +829634,7 @@ var createSendMaxMutation = () => ({
|
|
|
829463
829634
|
feature: "sendMax",
|
|
829464
829635
|
maxRun: 1,
|
|
829465
829636
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
829466
|
-
(0,
|
|
829637
|
+
(0, import_invariant75.default)(maxSpendable.gt(minimalAmount), "Celo: Send Max | Balance is too low");
|
|
829467
829638
|
const sibling = pickSiblings(siblings, maxAccount3);
|
|
829468
829639
|
const recipient = sibling.freshAddress;
|
|
829469
829640
|
return {
|
|
@@ -829474,7 +829645,7 @@ var createSendMaxMutation = () => ({
|
|
|
829474
829645
|
});
|
|
829475
829646
|
|
|
829476
829647
|
// ../../libs/coin-modules/coin-celo/lib-es/test/specs/createLockMutation.js
|
|
829477
|
-
var
|
|
829648
|
+
var import_invariant76 = __toESM(require("invariant"));
|
|
829478
829649
|
var currency9 = getCryptoCurrencyById("celo");
|
|
829479
829650
|
var minimalAmount2 = parseCurrencyUnit(currency9.units[0], "0.005");
|
|
829480
829651
|
var createLockMutation = () => ({
|
|
@@ -829483,10 +829654,10 @@ var createLockMutation = () => ({
|
|
|
829483
829654
|
maxRun: 1,
|
|
829484
829655
|
transaction: ({ account: account3, bridge: bridge28, maxSpendable }) => {
|
|
829485
829656
|
const { celoResources } = account3;
|
|
829486
|
-
(0,
|
|
829487
|
-
(0,
|
|
829657
|
+
(0, import_invariant76.default)(celoResources?.registrationStatus, "Celo: Lock Vote | Account is not registered");
|
|
829658
|
+
(0, import_invariant76.default)(maxSpendable.gt(minimalAmount2), "Celo: Lock | balance is too low");
|
|
829488
829659
|
const amount = minimalAmount2.times(Math.random()).integerValue().precision(8);
|
|
829489
|
-
(0,
|
|
829660
|
+
(0, import_invariant76.default)(amount.gt(0), "Celo: Lock | Not enough funds to lock tokens");
|
|
829490
829661
|
const transaction = {
|
|
829491
829662
|
amount
|
|
829492
829663
|
};
|
|
@@ -829503,7 +829674,7 @@ var createLockMutation = () => ({
|
|
|
829503
829674
|
});
|
|
829504
829675
|
|
|
829505
829676
|
// ../../libs/coin-modules/coin-celo/lib-es/test/specs/createUnlockMutation.js
|
|
829506
|
-
var
|
|
829677
|
+
var import_invariant77 = __toESM(require("invariant"));
|
|
829507
829678
|
var import_bignumber375 = __toESM(require("bignumber.js"));
|
|
829508
829679
|
var currency10 = getCryptoCurrencyById("celo");
|
|
829509
829680
|
var minimalAmount3 = parseCurrencyUnit(currency10.units[0], "0.001");
|
|
@@ -829512,11 +829683,11 @@ var createUnlockMutation = () => ({
|
|
|
829512
829683
|
feature: "staking",
|
|
829513
829684
|
maxRun: 1,
|
|
829514
829685
|
transaction: ({ account: account3, bridge: bridge28, maxSpendable }) => {
|
|
829515
|
-
(0,
|
|
829686
|
+
(0, import_invariant77.default)(maxSpendable.gt(minimalAmount3), "Celo: Unlock | balance is too low");
|
|
829516
829687
|
const { celoResources } = account3;
|
|
829517
|
-
(0,
|
|
829688
|
+
(0, import_invariant77.default)(celoResources?.registrationStatus, "Celo: Unlock | Account is not registered");
|
|
829518
829689
|
const nonvotingLockedBalance = celoResources?.nonvotingLockedBalance || new import_bignumber375.default(0);
|
|
829519
|
-
(0,
|
|
829690
|
+
(0, import_invariant77.default)(nonvotingLockedBalance.gt(0), "Celo: Unlock | No non voting locked balance");
|
|
829520
829691
|
return {
|
|
829521
829692
|
transaction: bridge28.createTransaction(account3),
|
|
829522
829693
|
updates: [
|
|
@@ -829532,7 +829703,7 @@ var createUnlockMutation = () => ({
|
|
|
829532
829703
|
});
|
|
829533
829704
|
|
|
829534
829705
|
// ../../libs/coin-modules/coin-celo/lib-es/test/specs/createRegisterAccountMutation.js
|
|
829535
|
-
var
|
|
829706
|
+
var import_invariant78 = __toESM(require("invariant"));
|
|
829536
829707
|
var currency11 = getCryptoCurrencyById("celo");
|
|
829537
829708
|
var minimalAmount4 = parseCurrencyUnit(currency11.units[0], "0.001");
|
|
829538
829709
|
var createRegisterAccountMutation = () => ({
|
|
@@ -829541,8 +829712,8 @@ var createRegisterAccountMutation = () => ({
|
|
|
829541
829712
|
maxRun: 1,
|
|
829542
829713
|
transaction: ({ account: account3, bridge: bridge28, maxSpendable }) => {
|
|
829543
829714
|
const { celoResources } = account3;
|
|
829544
|
-
(0,
|
|
829545
|
-
(0,
|
|
829715
|
+
(0, import_invariant78.default)(!celoResources?.registrationStatus, "Celo: Register Account | Celo account is already registered");
|
|
829716
|
+
(0, import_invariant78.default)(maxSpendable.gt(minimalAmount4), "Celo: Register Account | Celo account balance is too low to register account");
|
|
829546
829717
|
return {
|
|
829547
829718
|
transaction: bridge28.createTransaction(account3),
|
|
829548
829719
|
updates: [
|
|
@@ -829555,7 +829726,7 @@ var createRegisterAccountMutation = () => ({
|
|
|
829555
829726
|
});
|
|
829556
829727
|
|
|
829557
829728
|
// ../../libs/coin-modules/coin-celo/lib-es/test/specs/createVoteMutation.js
|
|
829558
|
-
var
|
|
829729
|
+
var import_invariant79 = __toESM(require("invariant"));
|
|
829559
829730
|
var import_bignumber376 = __toESM(require("bignumber.js"));
|
|
829560
829731
|
var import_sampleSize = __toESM(require("lodash/sampleSize"));
|
|
829561
829732
|
var currency12 = getCryptoCurrencyById("celo");
|
|
@@ -829565,16 +829736,16 @@ var createVoteMutation = () => ({
|
|
|
829565
829736
|
feature: "staking",
|
|
829566
829737
|
maxRun: 1,
|
|
829567
829738
|
transaction: ({ account: account3, bridge: bridge28, maxSpendable }) => {
|
|
829568
|
-
(0,
|
|
829739
|
+
(0, import_invariant79.default)(maxSpendable.gt(minimalAmount5), "Celo: Vote | balance is too low");
|
|
829569
829740
|
const { celoResources } = account3;
|
|
829570
|
-
(0,
|
|
829741
|
+
(0, import_invariant79.default)(celoResources?.registrationStatus, "Celo: Vote | Account is not registered");
|
|
829571
829742
|
const nonvotingLockedBalance = celoResources?.nonvotingLockedBalance || new import_bignumber376.default(0);
|
|
829572
|
-
(0,
|
|
829743
|
+
(0, import_invariant79.default)(nonvotingLockedBalance.gt(0), "Celo: Vote | No non voting locked balance");
|
|
829573
829744
|
const votes2 = celoResources.votes || [];
|
|
829574
829745
|
const { validatorGroups } = getCurrentCeloPreloadData();
|
|
829575
829746
|
const validatorGroupWithoutVotes = (0, import_sampleSize.default)(getValidatorGroupsWithoutVotes(validatorGroups, votes2), 1)[0];
|
|
829576
829747
|
const amount = nonvotingLockedBalance.times(0.5).precision(8).integerValue();
|
|
829577
|
-
(0,
|
|
829748
|
+
(0, import_invariant79.default)(amount.gt(0), "Celo: Vote | Not enough funds to vote");
|
|
829578
829749
|
const transaction = {
|
|
829579
829750
|
recipient: validatorGroupWithoutVotes.address,
|
|
829580
829751
|
amount
|
|
@@ -829592,7 +829763,7 @@ var createVoteMutation = () => ({
|
|
|
829592
829763
|
});
|
|
829593
829764
|
|
|
829594
829765
|
// ../../libs/coin-modules/coin-celo/lib-es/test/specs/createActivateVoteMutation.js
|
|
829595
|
-
var
|
|
829766
|
+
var import_invariant80 = __toESM(require("invariant"));
|
|
829596
829767
|
var currency13 = getCryptoCurrencyById("celo");
|
|
829597
829768
|
var minimalAmount6 = parseCurrencyUnit(currency13.units[0], "0.001");
|
|
829598
829769
|
var createActivateVoteMutation = () => ({
|
|
@@ -829601,10 +829772,10 @@ var createActivateVoteMutation = () => ({
|
|
|
829601
829772
|
maxRun: 1,
|
|
829602
829773
|
transaction: ({ account: account3, bridge: bridge28, maxSpendable }) => {
|
|
829603
829774
|
const { celoResources } = account3;
|
|
829604
|
-
(0,
|
|
829605
|
-
(0,
|
|
829775
|
+
(0, import_invariant80.default)(celoResources?.registrationStatus, "Celo: Activate Vote | Account is not registered");
|
|
829776
|
+
(0, import_invariant80.default)(maxSpendable.gt(minimalAmount6), "Celo: Activate Vote | balance is too low");
|
|
829606
829777
|
const activatableVote = celoResources?.votes?.find((vote) => vote.activatable);
|
|
829607
|
-
(0,
|
|
829778
|
+
(0, import_invariant80.default)(!!activatableVote, "Celo: Activate Vote | No activatable votes");
|
|
829608
829779
|
const transaction = {
|
|
829609
829780
|
recipient: activatableVote.validatorGroup
|
|
829610
829781
|
};
|
|
@@ -829621,7 +829792,7 @@ var createActivateVoteMutation = () => ({
|
|
|
829621
829792
|
});
|
|
829622
829793
|
|
|
829623
829794
|
// ../../libs/coin-modules/coin-celo/lib-es/test/specs/createRevokeVoteMutation.js
|
|
829624
|
-
var
|
|
829795
|
+
var import_invariant81 = __toESM(require("invariant"));
|
|
829625
829796
|
var currency14 = getCryptoCurrencyById("celo");
|
|
829626
829797
|
var minimalAmount7 = parseCurrencyUnit(currency14.units[0], "0.001");
|
|
829627
829798
|
var createRevokeVoteMutation = () => ({
|
|
@@ -829629,11 +829800,11 @@ var createRevokeVoteMutation = () => ({
|
|
|
829629
829800
|
feature: "staking",
|
|
829630
829801
|
maxRun: 1,
|
|
829631
829802
|
transaction: ({ account: account3, bridge: bridge28, maxSpendable }) => {
|
|
829632
|
-
(0,
|
|
829803
|
+
(0, import_invariant81.default)(maxSpendable.gt(minimalAmount7), "Celo: Revoke Vote | balance is too low");
|
|
829633
829804
|
const { celoResources } = account3;
|
|
829634
|
-
(0,
|
|
829805
|
+
(0, import_invariant81.default)(celoResources?.registrationStatus, "Celo: RevokeVote | Account is not registered");
|
|
829635
829806
|
const revokableVote = celoResources?.votes?.find((vote) => vote.revokable);
|
|
829636
|
-
(0,
|
|
829807
|
+
(0, import_invariant81.default)(!!revokableVote, "Celo: RevokeVote | Revokable vote not found");
|
|
829637
829808
|
return {
|
|
829638
829809
|
transaction: bridge28.createTransaction(account3),
|
|
829639
829810
|
updates: [
|
|
@@ -829651,7 +829822,7 @@ var createRevokeVoteMutation = () => ({
|
|
|
829651
829822
|
});
|
|
829652
829823
|
|
|
829653
829824
|
// ../../libs/coin-modules/coin-celo/lib-es/test/specs/createWithdrawMutation.js
|
|
829654
|
-
var
|
|
829825
|
+
var import_invariant82 = __toESM(require("invariant"));
|
|
829655
829826
|
var currency15 = getCryptoCurrencyById("celo");
|
|
829656
829827
|
var minimalAmount8 = parseCurrencyUnit(currency15.units[0], "0.001");
|
|
829657
829828
|
var createWithdrawMutation = () => ({
|
|
@@ -829661,10 +829832,10 @@ var createWithdrawMutation = () => ({
|
|
|
829661
829832
|
transaction: ({ account: account3, bridge: bridge28, maxSpendable }) => {
|
|
829662
829833
|
const celoAccount = account3;
|
|
829663
829834
|
const { celoResources } = celoAccount;
|
|
829664
|
-
(0,
|
|
829835
|
+
(0, import_invariant82.default)(celoResources?.registrationStatus, "Celo: Withdraw | Account is not registered");
|
|
829665
829836
|
const pendingWithdrawals = availablePendingWithdrawals(celoAccount);
|
|
829666
|
-
(0,
|
|
829667
|
-
(0,
|
|
829837
|
+
(0, import_invariant82.default)(pendingWithdrawals.length > 0, "Celo: Withdraw | No withdrawable balance");
|
|
829838
|
+
(0, import_invariant82.default)(maxSpendable.gt(minimalAmount8), "Celo: Withdraw Vote | balance is too low");
|
|
829668
829839
|
return {
|
|
829669
829840
|
transaction: bridge28.createTransaction(celoAccount),
|
|
829670
829841
|
updates: [
|
|
@@ -829773,7 +829944,7 @@ var bot_specs_default3 = {
|
|
|
829773
829944
|
// ../../libs/coin-modules/coin-cosmos/lib-es/specs.js
|
|
829774
829945
|
var import_bignumber377 = require("bignumber.js");
|
|
829775
829946
|
var import_expect7 = __toESM(require_build21());
|
|
829776
|
-
var
|
|
829947
|
+
var import_invariant83 = __toESM(require("invariant"));
|
|
829777
829948
|
var import_sample5 = __toESM(require("lodash/sample"));
|
|
829778
829949
|
var import_sampleSize2 = __toESM(require("lodash/sampleSize"));
|
|
829779
829950
|
init_lib_es5();
|
|
@@ -829954,9 +830125,9 @@ function cosmosLikeMutations(minimalTransactionAmount) {
|
|
|
829954
830125
|
(0, import_expect7.default)(account3.balance.toString()).toBe(accountBeforeTransaction.balance.minus(operation.value).toString());
|
|
829955
830126
|
},
|
|
829956
830127
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
829957
|
-
(0,
|
|
830128
|
+
(0, import_invariant83.default)(maxSpendable.gt(minimalTransactionAmount), "balance is too low for send");
|
|
829958
830129
|
const amount = maxSpendable.times(0.3 + 0.4 * Math.random()).integerValue();
|
|
829959
|
-
(0,
|
|
830130
|
+
(0, import_invariant83.default)(amount.gt(0), "random amount to be positive");
|
|
829960
830131
|
return {
|
|
829961
830132
|
transaction: bridge28.createTransaction(account3),
|
|
829962
830133
|
updates: [
|
|
@@ -829979,7 +830150,7 @@ function cosmosLikeMutations(minimalTransactionAmount) {
|
|
|
829979
830150
|
maxRun: 1,
|
|
829980
830151
|
testDestination: genericTestDestination,
|
|
829981
830152
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
829982
|
-
(0,
|
|
830153
|
+
(0, import_invariant83.default)(maxSpendable.gt(minimalTransactionAmount), "balance is too low for send max");
|
|
829983
830154
|
return {
|
|
829984
830155
|
transaction: bridge28.createTransaction(account3),
|
|
829985
830156
|
updates: [
|
|
@@ -830002,20 +830173,20 @@ function cosmosLikeMutations(minimalTransactionAmount) {
|
|
|
830002
830173
|
maxRun: 1,
|
|
830003
830174
|
transaction: ({ account: account3, bridge: bridge28, siblings }) => {
|
|
830004
830175
|
expectSiblingsHaveSpendablePartGreaterThan(siblings, 0.5);
|
|
830005
|
-
(0,
|
|
830006
|
-
(0,
|
|
830176
|
+
(0, import_invariant83.default)(account3.index % 2 > 0, "only one out of 2 accounts is not going to delegate");
|
|
830177
|
+
(0, import_invariant83.default)(canDelegate(account3), "can delegate");
|
|
830007
830178
|
const { cosmosResources } = account3;
|
|
830008
|
-
(0,
|
|
830009
|
-
(0,
|
|
830179
|
+
(0, import_invariant83.default)(cosmosResources, "cosmos");
|
|
830180
|
+
(0, import_invariant83.default)(cosmosResources.delegations.length < 3, "already enough delegations");
|
|
830010
830181
|
const data6 = getCurrentCosmosPreloadData()[account3.currency.id];
|
|
830011
830182
|
const count = 1;
|
|
830012
830183
|
let remaining = getMaxDelegationAvailable(account3, count).minus(minimalTransactionAmount.times(2)).times(0.1 * Math.random());
|
|
830013
|
-
(0,
|
|
830184
|
+
(0, import_invariant83.default)(remaining.gt(0), "not enough funds in account for delegate");
|
|
830014
830185
|
const all8 = data6.validators.filter((v38) => !cosmosResources.delegations.some(
|
|
830015
830186
|
// new delegations only
|
|
830016
830187
|
(d52) => d52.validatorAddress === v38.validatorAddress
|
|
830017
830188
|
));
|
|
830018
|
-
(0,
|
|
830189
|
+
(0, import_invariant83.default)(all8.length > 0, "no validators found");
|
|
830019
830190
|
const validators7 = (0, import_sampleSize2.default)(all8, count).map((delegation) => {
|
|
830020
830191
|
const amount = remaining.times(Math.random() * Math.random()).integerValue();
|
|
830021
830192
|
remaining = remaining.minus(amount);
|
|
@@ -830024,7 +830195,7 @@ function cosmosLikeMutations(minimalTransactionAmount) {
|
|
|
830024
830195
|
amount
|
|
830025
830196
|
};
|
|
830026
830197
|
}).filter((v38) => v38.amount.gt(0));
|
|
830027
|
-
(0,
|
|
830198
|
+
(0, import_invariant83.default)(validators7.length > 0, "no possible delegation found");
|
|
830028
830199
|
return {
|
|
830029
830200
|
transaction: bridge28.createTransaction(account3),
|
|
830030
830201
|
updates: [
|
|
@@ -830041,10 +830212,10 @@ function cosmosLikeMutations(minimalTransactionAmount) {
|
|
|
830041
830212
|
},
|
|
830042
830213
|
test: ({ account: account3, transaction }) => {
|
|
830043
830214
|
const { cosmosResources } = account3;
|
|
830044
|
-
(0,
|
|
830215
|
+
(0, import_invariant83.default)(cosmosResources, "cosmos");
|
|
830045
830216
|
transaction.validators.forEach((v38) => {
|
|
830046
830217
|
const d52 = cosmosResources.delegations.find((d53) => d53.validatorAddress === v38.address);
|
|
830047
|
-
(0,
|
|
830218
|
+
(0, import_invariant83.default)(d52, "delegated %s must be found in account", v38.address);
|
|
830048
830219
|
botTest("delegator have planned address and amount", () => {
|
|
830049
830220
|
(0, import_expect7.default)(v38.address).toBe(d52.validatorAddress);
|
|
830050
830221
|
checkAmountsCloseEnough(v38.amount, d52.amount);
|
|
@@ -830057,15 +830228,15 @@ function cosmosLikeMutations(minimalTransactionAmount) {
|
|
|
830057
830228
|
feature: "staking",
|
|
830058
830229
|
maxRun: 1,
|
|
830059
830230
|
transaction: ({ account: account3, bridge: bridge28, maxSpendable }) => {
|
|
830060
|
-
(0,
|
|
830231
|
+
(0, import_invariant83.default)(canUndelegate(account3), "can undelegate");
|
|
830061
830232
|
const { cosmosResources } = account3;
|
|
830062
|
-
(0,
|
|
830063
|
-
(0,
|
|
830064
|
-
(0,
|
|
830233
|
+
(0, import_invariant83.default)(cosmosResources, "cosmos");
|
|
830234
|
+
(0, import_invariant83.default)(maxSpendable.gt(minimalTransactionAmount.times(2)), "balance is too low");
|
|
830235
|
+
(0, import_invariant83.default)(cosmosResources.delegations.length > 0, "already enough delegations");
|
|
830065
830236
|
const undelegateCandidate = (0, import_sample5.default)(cosmosResources.delegations.filter((d52) => !cosmosResources.redelegations.some((r36) => r36.validatorSrcAddress === d52.validatorAddress || r36.validatorDstAddress === d52.validatorAddress) && !cosmosResources.unbondings.some((r36) => r36.validatorAddress === d52.validatorAddress)));
|
|
830066
|
-
(0,
|
|
830237
|
+
(0, import_invariant83.default)(undelegateCandidate, "already pending");
|
|
830067
830238
|
const amount = undelegateCandidate.amount.times(Math.random() > 0.2 ? 1 : Math.random()).integerValue();
|
|
830068
|
-
(0,
|
|
830239
|
+
(0, import_invariant83.default)(amount.gt(0), "random amount to be positive");
|
|
830069
830240
|
return {
|
|
830070
830241
|
transaction: bridge28.createTransaction(account3),
|
|
830071
830242
|
updates: [
|
|
@@ -830086,10 +830257,10 @@ function cosmosLikeMutations(minimalTransactionAmount) {
|
|
|
830086
830257
|
},
|
|
830087
830258
|
test: ({ account: account3, transaction }) => {
|
|
830088
830259
|
const { cosmosResources } = account3;
|
|
830089
|
-
(0,
|
|
830260
|
+
(0, import_invariant83.default)(cosmosResources, "cosmos");
|
|
830090
830261
|
transaction.validators.forEach((v38) => {
|
|
830091
830262
|
const d52 = cosmosResources.unbondings.find((d53) => d53.validatorAddress === v38.address);
|
|
830092
|
-
(0,
|
|
830263
|
+
(0, import_invariant83.default)(d52, "undelegated %s must be found in account", v38.address);
|
|
830093
830264
|
botTest("validator have planned address and amount", () => {
|
|
830094
830265
|
(0, import_expect7.default)(v38.address).toBe(d52.validatorAddress);
|
|
830095
830266
|
checkAmountsCloseEnough(v38.amount, d52.amount);
|
|
@@ -830103,16 +830274,16 @@ function cosmosLikeMutations(minimalTransactionAmount) {
|
|
|
830103
830274
|
maxRun: 1,
|
|
830104
830275
|
transaction: ({ account: account3, bridge: bridge28, maxSpendable }) => {
|
|
830105
830276
|
const { cosmosResources } = account3;
|
|
830106
|
-
(0,
|
|
830107
|
-
(0,
|
|
830277
|
+
(0, import_invariant83.default)(cosmosResources, "cosmos");
|
|
830278
|
+
(0, import_invariant83.default)(maxSpendable.gt(minimalTransactionAmount.times(3)), "balance is too low for redelegate");
|
|
830108
830279
|
const sourceDelegation = (0, import_sample5.default)(cosmosResources.delegations.filter((d52) => canRedelegate(account3, d52)));
|
|
830109
|
-
(0,
|
|
830280
|
+
(0, import_invariant83.default)(sourceDelegation, "none can redelegate");
|
|
830110
830281
|
const delegation = (0, import_sample5.default)(cosmosResources.delegations.filter((d52) => d52.validatorAddress !== sourceDelegation.validatorAddress));
|
|
830111
830282
|
const amount = sourceDelegation.amount.times(
|
|
830112
830283
|
// most of the time redelegate all
|
|
830113
830284
|
Math.random() > 0.2 ? 1 : Math.random()
|
|
830114
830285
|
).integerValue();
|
|
830115
|
-
(0,
|
|
830286
|
+
(0, import_invariant83.default)(amount.gt(0), "random amount to be positive");
|
|
830116
830287
|
return {
|
|
830117
830288
|
transaction: bridge28.createTransaction(account3),
|
|
830118
830289
|
updates: [
|
|
@@ -830132,7 +830303,7 @@ function cosmosLikeMutations(minimalTransactionAmount) {
|
|
|
830132
830303
|
},
|
|
830133
830304
|
test: ({ account: account3, transaction }) => {
|
|
830134
830305
|
const { cosmosResources } = account3;
|
|
830135
|
-
(0,
|
|
830306
|
+
(0, import_invariant83.default)(cosmosResources, "cosmos");
|
|
830136
830307
|
transaction.validators.forEach((v38) => {
|
|
830137
830308
|
const existing = cosmosResources.delegations.find((d52) => d52.validatorAddress === v38.address);
|
|
830138
830309
|
if (!existing) {
|
|
@@ -830140,7 +830311,7 @@ function cosmosLikeMutations(minimalTransactionAmount) {
|
|
|
830140
830311
|
// FIXME: valueOf for date arithmetic operations in typescript
|
|
830141
830312
|
(a62, b19) => b19.completionDate.valueOf() - a62.completionDate.valueOf()
|
|
830142
830313
|
).find((d53) => d53.validatorDstAddress === v38.address && d53.validatorSrcAddress === transaction.sourceValidator);
|
|
830143
|
-
(0,
|
|
830314
|
+
(0, import_invariant83.default)(d52, "redelegated %s must be found in account", v38.address);
|
|
830144
830315
|
botTest("validator have planned address and amount", () => {
|
|
830145
830316
|
(0, import_expect7.default)(v38.address).toBe(d52.validatorDstAddress);
|
|
830146
830317
|
checkAmountsCloseEnough(v38.amount, d52.amount);
|
|
@@ -830155,10 +830326,10 @@ function cosmosLikeMutations(minimalTransactionAmount) {
|
|
|
830155
830326
|
maxRun: 1,
|
|
830156
830327
|
transaction: ({ account: account3, bridge: bridge28, maxSpendable }) => {
|
|
830157
830328
|
const { cosmosResources } = account3;
|
|
830158
|
-
(0,
|
|
830159
|
-
(0,
|
|
830329
|
+
(0, import_invariant83.default)(cosmosResources, "cosmos");
|
|
830330
|
+
(0, import_invariant83.default)(maxSpendable.gt(minimalTransactionAmount.times(2)), "balance is too low for claim rewards");
|
|
830160
830331
|
const delegation = (0, import_sample5.default)(cosmosResources.delegations.filter((d52) => d52.pendingRewards.gt(1e3)));
|
|
830161
|
-
(0,
|
|
830332
|
+
(0, import_invariant83.default)(delegation, "no delegation to claim");
|
|
830162
830333
|
return {
|
|
830163
830334
|
transaction: bridge28.createTransaction(account3),
|
|
830164
830335
|
updates: [
|
|
@@ -830177,11 +830348,11 @@ function cosmosLikeMutations(minimalTransactionAmount) {
|
|
|
830177
830348
|
},
|
|
830178
830349
|
test: ({ account: account3, transaction }) => {
|
|
830179
830350
|
const { cosmosResources } = account3;
|
|
830180
|
-
(0,
|
|
830351
|
+
(0, import_invariant83.default)(cosmosResources, "cosmos");
|
|
830181
830352
|
transaction.validators.forEach((v38) => {
|
|
830182
830353
|
const d52 = cosmosResources.delegations.find((d53) => d53.validatorAddress === v38.address);
|
|
830183
|
-
botTest("delegation exists in account", () => (0,
|
|
830184
|
-
botTest("reward is no longer claimable after claim", () => (0,
|
|
830354
|
+
botTest("delegation exists in account", () => (0, import_invariant83.default)(d52, "delegation %s must be found in account", v38.address));
|
|
830355
|
+
botTest("reward is no longer claimable after claim", () => (0, import_invariant83.default)(d52?.pendingRewards.lte(d52.amount.multipliedBy(0.1)), "pending reward is not reset"));
|
|
830185
830356
|
});
|
|
830186
830357
|
}
|
|
830187
830358
|
}
|
|
@@ -830388,7 +830559,7 @@ var specs_default4 = {
|
|
|
830388
830559
|
|
|
830389
830560
|
// ../../libs/coin-modules/coin-evm/lib-es/specs.js
|
|
830390
830561
|
var import_expect8 = __toESM(require_build21());
|
|
830391
|
-
var
|
|
830562
|
+
var import_invariant84 = __toESM(require("invariant"));
|
|
830392
830563
|
var import_sample6 = __toESM(require("lodash/sample"));
|
|
830393
830564
|
var import_bignumber378 = __toESM(require("bignumber.js"));
|
|
830394
830565
|
init_lib_es5();
|
|
@@ -830595,7 +830766,7 @@ var testCoinBalance = ({ account: account3, accountBeforeTransaction, operation
|
|
|
830595
830766
|
var transactionCheck = (currencyId) => ({ maxSpendable }) => {
|
|
830596
830767
|
const currency24 = getCryptoCurrencyById(currencyId);
|
|
830597
830768
|
const minBalance = parseCurrencyUnit(currency24.units[0], `${minBalancePerCurrencyId[currency24.id] || 1}`);
|
|
830598
|
-
(0,
|
|
830769
|
+
(0, import_invariant84.default)(maxSpendable.gt(minBalance), `${currencyId} balance is too low`);
|
|
830599
830770
|
};
|
|
830600
830771
|
var evmBasicMutations = ({ maxAccount: maxAccount10 }) => [
|
|
830601
830772
|
{
|
|
@@ -830671,7 +830842,7 @@ var moveErc20Mutation = {
|
|
|
830671
830842
|
testDestination: testTokenDestination,
|
|
830672
830843
|
transaction: ({ account: account3, siblings, bridge: bridge28 }) => {
|
|
830673
830844
|
const erc20Account = (0, import_sample6.default)((account3.subAccounts || []).filter((a62) => a62.balance.gt(0)));
|
|
830674
|
-
(0,
|
|
830845
|
+
(0, import_invariant84.default)(erc20Account, "no erc20 account");
|
|
830675
830846
|
const sibling = pickSiblings(siblings, 3);
|
|
830676
830847
|
const recipient = sibling.freshAddress;
|
|
830677
830848
|
return {
|
|
@@ -830690,12 +830861,12 @@ var moveErc20Mutation = {
|
|
|
830690
830861
|
};
|
|
830691
830862
|
},
|
|
830692
830863
|
test: ({ accountBeforeTransaction, account: account3, transaction }) => {
|
|
830693
|
-
(0,
|
|
830864
|
+
(0, import_invariant84.default)(accountBeforeTransaction.subAccounts, "sub accounts before");
|
|
830694
830865
|
const erc20accountBefore = accountBeforeTransaction.subAccounts?.find((s46) => s46.id === transaction.subAccountId);
|
|
830695
|
-
(0,
|
|
830696
|
-
(0,
|
|
830866
|
+
(0, import_invariant84.default)(erc20accountBefore, "erc20 acc was here before");
|
|
830867
|
+
(0, import_invariant84.default)(account3.subAccounts, "sub accounts");
|
|
830697
830868
|
const erc20account = account3.subAccounts.find((s46) => s46.id === transaction.subAccountId);
|
|
830698
|
-
(0,
|
|
830869
|
+
(0, import_invariant84.default)(erc20account, "erc20 acc is still here");
|
|
830699
830870
|
if (transaction.useAllAmount) {
|
|
830700
830871
|
botTest("erc20 account is empty", () => (0, import_expect8.default)(erc20account.balance.toString()).toBe("0"));
|
|
830701
830872
|
} else {
|
|
@@ -830775,7 +830946,7 @@ var specs_default5 = Object.values(cryptocurrenciesById).filter((currency24) =>
|
|
|
830775
830946
|
|
|
830776
830947
|
// ../../libs/coin-modules/coin-hedera/lib-es/test/bot-specs.js
|
|
830777
830948
|
var import_expect9 = __toESM(require_build21());
|
|
830778
|
-
var
|
|
830949
|
+
var import_invariant85 = __toESM(require("invariant"));
|
|
830779
830950
|
init_lib_es5();
|
|
830780
830951
|
|
|
830781
830952
|
// ../../libs/coin-modules/coin-hedera/lib-es/test/speculos-deviceActions.js
|
|
@@ -830844,7 +831015,7 @@ var memoTestMessage = "This is a test memo.";
|
|
|
830844
831015
|
var checkSendableToEmptyAccount2 = (amount, recipient) => {
|
|
830845
831016
|
const minBalanceNewAccount2 = parseCurrencyUnit(currency17.units[0], "0.1");
|
|
830846
831017
|
if (isAccountEmpty(recipient) && amount.lte(minBalanceNewAccount2)) {
|
|
830847
|
-
(0,
|
|
831018
|
+
(0, import_invariant85.default)(amount.gt(minBalanceNewAccount2), "not enough funds to send to new account");
|
|
830848
831019
|
}
|
|
830849
831020
|
};
|
|
830850
831021
|
var hedera = {
|
|
@@ -830859,7 +831030,7 @@ var hedera = {
|
|
|
830859
831030
|
genericDeviceAction: acceptTransaction9,
|
|
830860
831031
|
currency: currency17,
|
|
830861
831032
|
transactionCheck: ({ maxSpendable }) => {
|
|
830862
|
-
(0,
|
|
831033
|
+
(0, import_invariant85.default)(maxSpendable.gt(0), "Balance is too low");
|
|
830863
831034
|
},
|
|
830864
831035
|
allowEmptyAccounts: true,
|
|
830865
831036
|
mutations: [
|
|
@@ -830928,12 +831099,12 @@ var hedera = {
|
|
|
830928
831099
|
var bot_specs_default4 = { hedera };
|
|
830929
831100
|
|
|
830930
831101
|
// ../../libs/coin-modules/coin-filecoin/lib-es/test/bot-specs.js
|
|
830931
|
-
var
|
|
831102
|
+
var import_invariant87 = __toESM(require("invariant"));
|
|
830932
831103
|
init_lib_es5();
|
|
830933
831104
|
var import_bignumber379 = __toESM(require("bignumber.js"));
|
|
830934
831105
|
|
|
830935
831106
|
// ../../libs/coin-modules/coin-filecoin/lib-es/test/speculos-deviceActions.js
|
|
830936
|
-
var
|
|
831107
|
+
var import_invariant86 = __toESM(require("invariant"));
|
|
830937
831108
|
var generateDeviceActionFlow = (scenario) => {
|
|
830938
831109
|
const data6 = { steps: [] };
|
|
830939
831110
|
data6.steps = data6.steps.concat([
|
|
@@ -830996,7 +831167,7 @@ var generateDeviceActionFlow = (scenario) => {
|
|
|
830996
831167
|
button: SpeculosButton2.RIGHT,
|
|
830997
831168
|
expectedValue: ({ account: account3, transaction }) => {
|
|
830998
831169
|
const subAccount = getSubAccount(account3, transaction);
|
|
830999
|
-
(0,
|
|
831170
|
+
(0, import_invariant86.default)(subAccount, "subAccount is required for token transfer");
|
|
831000
831171
|
return formatDeviceAmount(subAccount.token, transaction.amount, {
|
|
831001
831172
|
hideCode: false,
|
|
831002
831173
|
showAllDigits: true
|
|
@@ -831091,7 +831262,7 @@ var filecoinSpecs = {
|
|
|
831091
831262
|
testTimeout: 16 * 60 * 1e3,
|
|
831092
831263
|
minViableAmount: MIN_SAFE3,
|
|
831093
831264
|
transactionCheck: ({ maxSpendable }) => {
|
|
831094
|
-
(0,
|
|
831265
|
+
(0, import_invariant87.default)(maxSpendable.gt(MIN_SAFE3), "balance is too low");
|
|
831095
831266
|
},
|
|
831096
831267
|
mutations: [
|
|
831097
831268
|
{
|
|
@@ -831145,7 +831316,7 @@ var filecoinSpecs = {
|
|
|
831145
831316
|
const sibling = pickSiblings(siblings, maxAccount4);
|
|
831146
831317
|
let amount = account3.spendableBalance.div(1.9 + 0.2 * Math.random()).integerValue();
|
|
831147
831318
|
if (!sibling.used && amount.lt(MIN_SAFE3)) {
|
|
831148
|
-
(0,
|
|
831319
|
+
(0, import_invariant87.default)(account3.spendableBalance.gt(MIN_SAFE3), "send is too low to activate account");
|
|
831149
831320
|
amount = MIN_SAFE3;
|
|
831150
831321
|
}
|
|
831151
831322
|
return {
|
|
@@ -831185,9 +831356,9 @@ var filecoinSpecs = {
|
|
|
831185
831356
|
maxRun: 1,
|
|
831186
831357
|
deviceAction: generateDeviceActionFlow(BotScenario.TOKEN_TRANSFER),
|
|
831187
831358
|
transaction: ({ account: account3, bridge: bridge28, maxSpendable }) => {
|
|
831188
|
-
(0,
|
|
831359
|
+
(0, import_invariant87.default)(maxSpendable.gt(0), "Spendable balance is too low");
|
|
831189
831360
|
const subAccount = account3.subAccounts?.find((a62) => a62.type === AccountType2.TokenAccount && a62.spendableBalance.gt(0));
|
|
831190
|
-
(0,
|
|
831361
|
+
(0, import_invariant87.default)(subAccount && subAccount.type === AccountType2.TokenAccount, "no subAccount with WFIL");
|
|
831191
831362
|
const amount = subAccount.balance.div(1.9 + 0.2 * Math.random()).integerValue();
|
|
831192
831363
|
return {
|
|
831193
831364
|
transaction: bridge28.createTransaction(account3),
|
|
@@ -831218,7 +831389,7 @@ var bot_specs_default5 = {
|
|
|
831218
831389
|
};
|
|
831219
831390
|
|
|
831220
831391
|
// ../../libs/coin-modules/coin-internet_computer/lib-es/test/bot-specs.js
|
|
831221
|
-
var
|
|
831392
|
+
var import_invariant88 = __toESM(require("invariant"));
|
|
831222
831393
|
init_lib_es5();
|
|
831223
831394
|
var import_expect10 = __toESM(require_build21());
|
|
831224
831395
|
var import_bignumber380 = __toESM(require("bignumber.js"));
|
|
@@ -831288,7 +831459,7 @@ var internetComputerSpecs = {
|
|
|
831288
831459
|
testTimeout: 6 * 60 * 1e3,
|
|
831289
831460
|
minViableAmount: MIN_SAFE4,
|
|
831290
831461
|
transactionCheck: ({ maxSpendable }) => {
|
|
831291
|
-
(0,
|
|
831462
|
+
(0, import_invariant88.default)(maxSpendable.gt(MIN_SAFE4), "balance is too low");
|
|
831292
831463
|
},
|
|
831293
831464
|
mutations: [
|
|
831294
831465
|
{
|
|
@@ -831297,7 +831468,7 @@ var internetComputerSpecs = {
|
|
|
831297
831468
|
maxRun: 1,
|
|
831298
831469
|
testDestination: genericTestDestination,
|
|
831299
831470
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
831300
|
-
(0,
|
|
831471
|
+
(0, import_invariant88.default)(maxSpendable.gt(MIN_SAFE4), "balance is too low");
|
|
831301
831472
|
const sibling = pickSiblings(siblings, maxAccount5);
|
|
831302
831473
|
const recipient = sibling.freshAddress;
|
|
831303
831474
|
const amount = maxSpendable.div(2).integerValue();
|
|
@@ -831368,7 +831539,7 @@ var bot_specs_default6 = {
|
|
|
831368
831539
|
};
|
|
831369
831540
|
|
|
831370
831541
|
// ../../libs/coin-modules/coin-icon/lib-es/specs.js
|
|
831371
|
-
var
|
|
831542
|
+
var import_invariant89 = __toESM(require("invariant"));
|
|
831372
831543
|
init_lib_es5();
|
|
831373
831544
|
var import_bignumber381 = __toESM(require("bignumber.js"));
|
|
831374
831545
|
var import_expect11 = __toESM(require_build21());
|
|
@@ -831430,7 +831601,7 @@ var icon = {
|
|
|
831430
831601
|
genericDeviceAction: acceptTransaction11,
|
|
831431
831602
|
testTimeout: 2 * 60 * 1e3,
|
|
831432
831603
|
transactionCheck: ({ maxSpendable }) => {
|
|
831433
|
-
(0,
|
|
831604
|
+
(0, import_invariant89.default)(maxSpendable.gt(EXISTENTIAL_DEPOSIT_RECOMMENDED_MARGIN.multipliedBy(2)), "balance is too low");
|
|
831434
831605
|
},
|
|
831435
831606
|
test: ({ operation, optimisticOperation }) => {
|
|
831436
831607
|
const opExpected = toOperationRaw({
|
|
@@ -831450,11 +831621,11 @@ var icon = {
|
|
|
831450
831621
|
feature: "send",
|
|
831451
831622
|
maxRun: 1,
|
|
831452
831623
|
transaction: ({ account: account3, siblings, bridge: bridge28 }) => {
|
|
831453
|
-
(0,
|
|
831624
|
+
(0, import_invariant89.default)(account3.spendableBalance.gt(0), "balance is 0");
|
|
831454
831625
|
const sibling = pickSiblings(siblings, maxAccounts3);
|
|
831455
831626
|
let amount = account3.spendableBalance.div(2).integerValue();
|
|
831456
831627
|
if (!sibling.used && amount.lt(EXISTENTIAL_DEPOSIT)) {
|
|
831457
|
-
(0,
|
|
831628
|
+
(0, import_invariant89.default)(account3.spendableBalance.gt(EXISTENTIAL_DEPOSIT), "send is too low to activate account");
|
|
831458
831629
|
amount = EXISTENTIAL_DEPOSIT;
|
|
831459
831630
|
}
|
|
831460
831631
|
return {
|
|
@@ -831478,7 +831649,7 @@ var icon = {
|
|
|
831478
831649
|
feature: "sendMax",
|
|
831479
831650
|
maxRun: 1,
|
|
831480
831651
|
transaction: ({ account: account3, siblings, bridge: bridge28 }) => {
|
|
831481
|
-
(0,
|
|
831652
|
+
(0, import_invariant89.default)(account3.spendableBalance.gt(0), "balance is 0");
|
|
831482
831653
|
const sibling = pickSiblings(siblings, maxAccounts3);
|
|
831483
831654
|
return {
|
|
831484
831655
|
transaction: bridge28.createTransaction(account3),
|
|
@@ -831503,7 +831674,7 @@ var specs_default6 = {
|
|
|
831503
831674
|
};
|
|
831504
831675
|
|
|
831505
831676
|
// ../../libs/coin-modules/coin-multiversx/lib-es/specs.js
|
|
831506
|
-
var
|
|
831677
|
+
var import_invariant90 = __toESM(require("invariant"));
|
|
831507
831678
|
init_lib_es5();
|
|
831508
831679
|
var import_expect12 = __toESM(require_build21());
|
|
831509
831680
|
|
|
@@ -831824,7 +831995,7 @@ var multiversx = {
|
|
|
831824
831995
|
testTimeout: 2 * 60 * 1e3,
|
|
831825
831996
|
minViableAmount: minimalAmount9,
|
|
831826
831997
|
transactionCheck: ({ maxSpendable }) => {
|
|
831827
|
-
(0,
|
|
831998
|
+
(0, import_invariant90.default)(maxSpendable.gt(minimalAmount9), "balance is too low");
|
|
831828
831999
|
},
|
|
831829
832000
|
test: (input) => {
|
|
831830
832001
|
expectCorrectOptimisticOperation(input);
|
|
@@ -831836,11 +832007,11 @@ var multiversx = {
|
|
|
831836
832007
|
maxRun: 1,
|
|
831837
832008
|
deviceAction: acceptMoveBalanceTransaction,
|
|
831838
832009
|
transaction: ({ account: account3, siblings, bridge: bridge28 }) => {
|
|
831839
|
-
(0,
|
|
832010
|
+
(0, import_invariant90.default)(account3.spendableBalance.gt(0), "balance is 0");
|
|
831840
832011
|
const sibling = pickSiblings(siblings, maxAccounts4);
|
|
831841
832012
|
let amount = account3.spendableBalance.div(1.9 + 0.2 * Math.random()).integerValue();
|
|
831842
832013
|
if (!sibling.used && amount.lt(MULTIVERSX_MIN_ACTIVATION_SAFE)) {
|
|
831843
|
-
(0,
|
|
832014
|
+
(0, import_invariant90.default)(account3.spendableBalance.gt(MULTIVERSX_MIN_ACTIVATION_SAFE), "send is too low to activate account");
|
|
831844
832015
|
amount = MULTIVERSX_MIN_ACTIVATION_SAFE;
|
|
831845
832016
|
}
|
|
831846
832017
|
return {
|
|
@@ -831866,10 +832037,10 @@ var multiversx = {
|
|
|
831866
832037
|
maxRun: 1,
|
|
831867
832038
|
deviceAction: acceptMoveBalanceTransaction,
|
|
831868
832039
|
transaction: ({ account: account3, siblings, bridge: bridge28 }) => {
|
|
831869
|
-
(0,
|
|
832040
|
+
(0, import_invariant90.default)(account3.spendableBalance.gt(0), "balance is 0");
|
|
831870
832041
|
const sibling = pickSiblings(siblings, maxAccounts4);
|
|
831871
832042
|
if (!sibling.used) {
|
|
831872
|
-
(0,
|
|
832043
|
+
(0, import_invariant90.default)(account3.spendableBalance.gt(MULTIVERSX_MIN_ACTIVATION_SAFE), "send is too low to activate account");
|
|
831873
832044
|
}
|
|
831874
832045
|
return {
|
|
831875
832046
|
transaction: bridge28.createTransaction(account3),
|
|
@@ -831895,8 +832066,8 @@ var multiversx = {
|
|
|
831895
832066
|
deviceAction: acceptEsdtTransferTransaction,
|
|
831896
832067
|
transaction: ({ account: account3, siblings, bridge: bridge28 }) => {
|
|
831897
832068
|
const esdtAccount = (0, import_sample7.default)((account3.subAccounts || []).filter((a62) => a62.balance.gt(0)));
|
|
831898
|
-
(0,
|
|
831899
|
-
(0,
|
|
832069
|
+
(0, import_invariant90.default)(esdtAccount, "no esdt account");
|
|
832070
|
+
(0, import_invariant90.default)(esdtAccount?.balance.gt(0), "esdt balance is 0");
|
|
831900
832071
|
const sibling = pickSiblings(siblings, 2);
|
|
831901
832072
|
const recipient = sibling.freshAddress;
|
|
831902
832073
|
const amount = esdtAccount?.balance.times(Math.random()).integerValue();
|
|
@@ -831926,7 +832097,7 @@ var multiversx = {
|
|
|
831926
832097
|
maxRun: 1,
|
|
831927
832098
|
deviceAction: acceptDelegateTransaction,
|
|
831928
832099
|
transaction: ({ account: account3, bridge: bridge28 }) => {
|
|
831929
|
-
(0,
|
|
832100
|
+
(0, import_invariant90.default)(account3.spendableBalance.gt(MIN_DELEGATION_AMOUNT), `spendable balance is less than minimum delegation amount`);
|
|
831930
832101
|
const amount = MIN_DELEGATION_AMOUNT;
|
|
831931
832102
|
return {
|
|
831932
832103
|
transaction: bridge28.createTransaction(account3),
|
|
@@ -831951,8 +832122,8 @@ var multiversx = {
|
|
|
831951
832122
|
deviceAction: acceptUndelegateTransaction,
|
|
831952
832123
|
transaction: ({ account: account3, bridge: bridge28 }) => {
|
|
831953
832124
|
const delegations = account3?.multiversxResources?.delegations;
|
|
831954
|
-
(0,
|
|
831955
|
-
(0,
|
|
832125
|
+
(0, import_invariant90.default)(delegations?.length, "account doesn't have any delegations");
|
|
832126
|
+
(0, import_invariant90.default)(delegations.some((d52) => new import_bignumber383.default(d52.userActiveStake).gt(0)), "no active stake for account");
|
|
831956
832127
|
const amount = MIN_DELEGATION_AMOUNT;
|
|
831957
832128
|
return {
|
|
831958
832129
|
transaction: bridge28.createTransaction(account3),
|
|
@@ -831977,8 +832148,8 @@ var multiversx = {
|
|
|
831977
832148
|
deviceAction: acceptWithdrawTransaction,
|
|
831978
832149
|
transaction: ({ account: account3, bridge: bridge28 }) => {
|
|
831979
832150
|
const delegations = account3?.multiversxResources?.delegations;
|
|
831980
|
-
(0,
|
|
831981
|
-
(0,
|
|
832151
|
+
(0, import_invariant90.default)(delegations?.length, "account doesn't have any delegations");
|
|
832152
|
+
(0, import_invariant90.default)(
|
|
831982
832153
|
// among all delegations
|
|
831983
832154
|
delegations.some((d52) => (
|
|
831984
832155
|
// among all undelegating amounts
|
|
@@ -832013,7 +832184,7 @@ var specs_default7 = {
|
|
|
832013
832184
|
};
|
|
832014
832185
|
|
|
832015
832186
|
// ../../libs/coin-modules/coin-near/lib-es/specs.js
|
|
832016
|
-
var
|
|
832187
|
+
var import_invariant91 = __toESM(require("invariant"));
|
|
832017
832188
|
var import_expect13 = __toESM(require_build21());
|
|
832018
832189
|
var import_bignumber384 = require("bignumber.js");
|
|
832019
832190
|
init_lib_es5();
|
|
@@ -832105,7 +832276,7 @@ var near = {
|
|
|
832105
832276
|
feature: "send",
|
|
832106
832277
|
maxRun: 1,
|
|
832107
832278
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
832108
|
-
(0,
|
|
832279
|
+
(0, import_invariant91.default)(maxSpendable.gt(minimalAmount10), "balance is too low");
|
|
832109
832280
|
const sibling = pickSiblings(siblings, maxAccount6);
|
|
832110
832281
|
const recipient = sibling.freshAddress;
|
|
832111
832282
|
const amount = maxSpendable.div(2).integerValue();
|
|
@@ -832123,7 +832294,7 @@ var near = {
|
|
|
832123
832294
|
feature: "sendMax",
|
|
832124
832295
|
maxRun: 1,
|
|
832125
832296
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
832126
|
-
(0,
|
|
832297
|
+
(0, import_invariant91.default)(maxSpendable.gt(minimalAmount10), "balance is too low");
|
|
832127
832298
|
const sibling = pickSiblings(siblings, maxAccount6);
|
|
832128
832299
|
const recipient = sibling.freshAddress;
|
|
832129
832300
|
return {
|
|
@@ -832140,7 +832311,7 @@ var near = {
|
|
|
832140
832311
|
feature: "staking",
|
|
832141
832312
|
maxRun: 1,
|
|
832142
832313
|
transaction: ({ account: account3, bridge: bridge28, maxSpendable }) => {
|
|
832143
|
-
(0,
|
|
832314
|
+
(0, import_invariant91.default)(maxSpendable.gt(minimalAmount10.plus(stakingFee)), "balance is too low");
|
|
832144
832315
|
const amount = minimalAmount10.times(10).times(Math.random()).integerValue();
|
|
832145
832316
|
return {
|
|
832146
832317
|
transaction: bridge28.createTransaction(account3),
|
|
@@ -832161,10 +832332,10 @@ var near = {
|
|
|
832161
832332
|
feature: "staking",
|
|
832162
832333
|
maxRun: 1,
|
|
832163
832334
|
transaction: ({ account: account3, bridge: bridge28, maxSpendable }) => {
|
|
832164
|
-
(0,
|
|
832335
|
+
(0, import_invariant91.default)(maxSpendable.gt(stakingFee), "balance is too low for fees");
|
|
832165
832336
|
const { nearResources } = account3;
|
|
832166
832337
|
const staked = nearResources?.stakedBalance || new import_bignumber384.BigNumber(0);
|
|
832167
|
-
(0,
|
|
832338
|
+
(0, import_invariant91.default)(staked.gt(minimalAmount10), "staked balance is too low for unstaking");
|
|
832168
832339
|
const halfStaked = staked.div(2);
|
|
832169
832340
|
const amount = halfStaked.gt(minimalAmount10) ? halfStaked.integerValue() : staked.integerValue();
|
|
832170
832341
|
return {
|
|
@@ -832183,10 +832354,10 @@ var near = {
|
|
|
832183
832354
|
feature: "staking",
|
|
832184
832355
|
maxRun: 1,
|
|
832185
832356
|
transaction: ({ account: account3, bridge: bridge28, maxSpendable }) => {
|
|
832186
|
-
(0,
|
|
832357
|
+
(0, import_invariant91.default)(maxSpendable.gt(stakingFee), "balance is too low for fees");
|
|
832187
832358
|
const { nearResources } = account3;
|
|
832188
832359
|
const available = nearResources?.availableBalance || new import_bignumber384.BigNumber(0);
|
|
832189
|
-
(0,
|
|
832360
|
+
(0, import_invariant91.default)(available.gt(minimalAmount10), "available balance is too low for withdrawing");
|
|
832190
832361
|
const halfAvailable = available.div(2);
|
|
832191
832362
|
const amount = halfAvailable.gt(minimalAmount10) ? halfAvailable.integerValue() : available.integerValue();
|
|
832192
832363
|
return {
|
|
@@ -832208,7 +832379,7 @@ var specs_default8 = {
|
|
|
832208
832379
|
|
|
832209
832380
|
// ../../libs/coin-modules/coin-polkadot/lib-es/test/bot-specs.js
|
|
832210
832381
|
var import_expect14 = __toESM(require_build21());
|
|
832211
|
-
var
|
|
832382
|
+
var import_invariant92 = __toESM(require("invariant"));
|
|
832212
832383
|
var import_sampleSize3 = __toESM(require("lodash/sampleSize"));
|
|
832213
832384
|
var import_bignumber385 = require("bignumber.js");
|
|
832214
832385
|
init_lib_es5();
|
|
@@ -832312,7 +832483,7 @@ var polkadot3 = {
|
|
|
832312
832483
|
genericDeviceAction: acceptTransaction13,
|
|
832313
832484
|
minViableAmount: POLKADOT_MIN_SAFE,
|
|
832314
832485
|
transactionCheck: ({ maxSpendable }) => {
|
|
832315
|
-
(0,
|
|
832486
|
+
(0, import_invariant92.default)(maxSpendable.gt(POLKADOT_MIN_SAFE), "balance is too low");
|
|
832316
832487
|
},
|
|
832317
832488
|
test: ({ operation, optimisticOperation }) => {
|
|
832318
832489
|
const opExpected = toOperationRaw({
|
|
@@ -832332,12 +832503,12 @@ var polkadot3 = {
|
|
|
832332
832503
|
maxRun: 1,
|
|
832333
832504
|
testDestination: genericTestDestination,
|
|
832334
832505
|
transaction: ({ account: account3, siblings, bridge: bridge28 }) => {
|
|
832335
|
-
(0,
|
|
832506
|
+
(0, import_invariant92.default)(account3.polkadotResources, "polkadot resource");
|
|
832336
832507
|
const sibling = pickSiblings(siblings, maxAccounts5);
|
|
832337
832508
|
let amount = account3.spendableBalance.minus(EXISTENTIAL_DEPOSIT4).div(1.9 + 0.2 * Math.random()).integerValue();
|
|
832338
|
-
(0,
|
|
832509
|
+
(0, import_invariant92.default)(amount.gte(0), "not enough balance to do a transfer");
|
|
832339
832510
|
if (sibling.balance.eq(0) && amount.lt(EXISTENTIAL_DEPOSIT4)) {
|
|
832340
|
-
(0,
|
|
832511
|
+
(0, import_invariant92.default)(account3.spendableBalance.gte(EXISTENTIAL_DEPOSIT4.plus(POLKADOT_MIN_SAFE)), "send is too low to activate account");
|
|
832341
832512
|
amount = EXISTENTIAL_DEPOSIT4;
|
|
832342
832513
|
}
|
|
832343
832514
|
const minimumBalanceExistential = getMinimumBalance2(account3);
|
|
@@ -832364,9 +832535,9 @@ var polkadot3 = {
|
|
|
832364
832535
|
maxRun: 1,
|
|
832365
832536
|
testDestination: genericTestDestination,
|
|
832366
832537
|
transaction: ({ account: account3, siblings, bridge: bridge28 }) => {
|
|
832367
|
-
(0,
|
|
832538
|
+
(0, import_invariant92.default)(account3.polkadotResources, "polkadot resources");
|
|
832368
832539
|
const sibling = pickSiblings(siblings, maxAccounts5);
|
|
832369
|
-
(0,
|
|
832540
|
+
(0, import_invariant92.default)(sibling.balance.eq(0) && account3.spendableBalance.lte(EXISTENTIAL_DEPOSIT4), "send is too low to activate account");
|
|
832370
832541
|
return {
|
|
832371
832542
|
transaction: bridge28.createTransaction(account3),
|
|
832372
832543
|
updates: [
|
|
@@ -832386,12 +832557,12 @@ var polkadot3 = {
|
|
|
832386
832557
|
maxRun: 1,
|
|
832387
832558
|
transaction: ({ siblings, account: account3, bridge: bridge28 }) => {
|
|
832388
832559
|
expectSiblingsHaveSpendablePartGreaterThan(siblings, 0.5);
|
|
832389
|
-
(0,
|
|
832390
|
-
(0,
|
|
832391
|
-
(0,
|
|
832560
|
+
(0, import_invariant92.default)(account3.polkadotResources, "polkadot");
|
|
832561
|
+
(0, import_invariant92.default)(canBond(account3), "can't bond");
|
|
832562
|
+
(0, import_invariant92.default)(hasMinimumBondBalance(account3), "not enough balance to bond");
|
|
832392
832563
|
const options22 = [];
|
|
832393
832564
|
if (isFirstBond(account3)) {
|
|
832394
|
-
(0,
|
|
832565
|
+
(0, import_invariant92.default)(account3.balance.gt(EXISTENTIAL_DEPOSIT4.plus(POLKADOT_MIN_SAFE)), "cant cover fee + bonding amount");
|
|
832395
832566
|
options22.push({
|
|
832396
832567
|
recipient: account3.freshAddress,
|
|
832397
832568
|
rewardDestination: "Stash"
|
|
@@ -832400,7 +832571,7 @@ var polkadot3 = {
|
|
|
832400
832571
|
amount: EXISTENTIAL_DEPOSIT4
|
|
832401
832572
|
});
|
|
832402
832573
|
} else {
|
|
832403
|
-
(0,
|
|
832574
|
+
(0, import_invariant92.default)(account3.spendableBalance.gt(POLKADOT_MIN_SAFE), "cant cover fee + bonding amount");
|
|
832404
832575
|
options22.push({
|
|
832405
832576
|
amount: new import_bignumber385.BigNumber(1e5)
|
|
832406
832577
|
});
|
|
@@ -832422,9 +832593,9 @@ var polkadot3 = {
|
|
|
832422
832593
|
maxRun: 1,
|
|
832423
832594
|
transaction: ({ account: account3, bridge: bridge28 }) => {
|
|
832424
832595
|
const { polkadotResources } = account3;
|
|
832425
|
-
(0,
|
|
832426
|
-
(0,
|
|
832427
|
-
(0,
|
|
832596
|
+
(0, import_invariant92.default)(polkadotResources, "polkadot");
|
|
832597
|
+
(0, import_invariant92.default)(canUnbond(account3), "can't unbond");
|
|
832598
|
+
(0, import_invariant92.default)(account3.spendableBalance.gt(POLKADOT_MIN_SAFE), "can't cover fee");
|
|
832428
832599
|
const amount = polkadotResources.lockedBalance.minus(polkadotResources.unlockingBalance).times(0.2);
|
|
832429
832600
|
return {
|
|
832430
832601
|
transaction: bridge28.createTransaction(account3),
|
|
@@ -832445,9 +832616,9 @@ var polkadot3 = {
|
|
|
832445
832616
|
maxRun: 1,
|
|
832446
832617
|
transaction: ({ account: account3, bridge: bridge28 }) => {
|
|
832447
832618
|
const { polkadotResources } = account3;
|
|
832448
|
-
(0,
|
|
832449
|
-
(0,
|
|
832450
|
-
(0,
|
|
832619
|
+
(0, import_invariant92.default)(polkadotResources, "polkadot");
|
|
832620
|
+
(0, import_invariant92.default)(polkadotResources?.unlockingBalance.gt(MIN_LOCKED_BALANCE_REQ), "can't rebond");
|
|
832621
|
+
(0, import_invariant92.default)(account3.spendableBalance.gt(POLKADOT_MIN_SAFE), "can't cover fee");
|
|
832451
832622
|
const amount = import_bignumber385.BigNumber.maximum(polkadotResources.unlockingBalance.times(0.2), MIN_LOCKED_BALANCE_REQ);
|
|
832452
832623
|
return {
|
|
832453
832624
|
transaction: bridge28.createTransaction(account3),
|
|
@@ -832467,9 +832638,9 @@ var polkadot3 = {
|
|
|
832467
832638
|
feature: "staking",
|
|
832468
832639
|
maxRun: 1,
|
|
832469
832640
|
transaction: ({ account: account3, bridge: bridge28 }) => {
|
|
832470
|
-
(0,
|
|
832471
|
-
(0,
|
|
832472
|
-
(0,
|
|
832641
|
+
(0, import_invariant92.default)(account3.polkadotResources, "polkadot");
|
|
832642
|
+
(0, import_invariant92.default)(canNominate(account3), "can't nominate");
|
|
832643
|
+
(0, import_invariant92.default)(account3.spendableBalance.gt(POLKADOT_MIN_SAFE), "cant cover fee");
|
|
832473
832644
|
const data6 = getCurrentPolkadotPreloadData();
|
|
832474
832645
|
const validators7 = (0, import_sampleSize3.default)(data6.validators.map((v38) => v38.address), 2);
|
|
832475
832646
|
return {
|
|
@@ -832491,9 +832662,9 @@ var polkadot3 = {
|
|
|
832491
832662
|
maxRun: 1,
|
|
832492
832663
|
transaction: ({ account: account3, bridge: bridge28 }) => {
|
|
832493
832664
|
const { polkadotResources } = account3;
|
|
832494
|
-
(0,
|
|
832495
|
-
(0,
|
|
832496
|
-
(0,
|
|
832665
|
+
(0, import_invariant92.default)(polkadotResources, "polkadot");
|
|
832666
|
+
(0, import_invariant92.default)(polkadotResources?.unlockedBalance.gt(0), "nothing to withdraw");
|
|
832667
|
+
(0, import_invariant92.default)(account3.spendableBalance.gt(POLKADOT_MIN_SAFE), "can't cover fee");
|
|
832497
832668
|
return {
|
|
832498
832669
|
transaction: bridge28.createTransaction(account3),
|
|
832499
832670
|
updates: [
|
|
@@ -832511,7 +832682,7 @@ var bot_specs_default7 = {
|
|
|
832511
832682
|
};
|
|
832512
832683
|
|
|
832513
832684
|
// ../../libs/coin-modules/coin-solana/lib-es/specs.js
|
|
832514
|
-
var
|
|
832685
|
+
var import_invariant93 = __toESM(require("invariant"));
|
|
832515
832686
|
var import_expect15 = __toESM(require_build21());
|
|
832516
832687
|
init_lib_es5();
|
|
832517
832688
|
|
|
@@ -832901,7 +833072,7 @@ var solana = {
|
|
|
832901
833072
|
testDestination: genericTestDestination,
|
|
832902
833073
|
deviceAction: acceptTransferTransaction,
|
|
832903
833074
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
832904
|
-
(0,
|
|
833075
|
+
(0, import_invariant93.default)(maxSpendable.gt(0), "balance is 0");
|
|
832905
833076
|
const transaction = bridge28.createTransaction(account3);
|
|
832906
833077
|
const sibling = pickSiblings(siblings, maxAccount7);
|
|
832907
833078
|
const recipient = sibling.freshAddress;
|
|
@@ -832922,7 +833093,7 @@ var solana = {
|
|
|
832922
833093
|
maxRun: 1,
|
|
832923
833094
|
deviceAction: acceptTransferTransaction,
|
|
832924
833095
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
832925
|
-
(0,
|
|
833096
|
+
(0, import_invariant93.default)(maxSpendable.gt(0), "balance is 0");
|
|
832926
833097
|
const transaction = bridge28.createTransaction(account3);
|
|
832927
833098
|
const sibling = pickSiblings(siblings, maxAccount7);
|
|
832928
833099
|
const recipient = sibling.freshAddress;
|
|
@@ -832933,8 +833104,8 @@ var solana = {
|
|
|
832933
833104
|
},
|
|
832934
833105
|
test: (input) => {
|
|
832935
833106
|
const { accountBeforeTransaction, account: account3, operation } = input;
|
|
832936
|
-
const
|
|
832937
|
-
botTest("operation value should be estimated max spendable", () => (0, import_expect15.default)(operation.value.toNumber()).toBe(
|
|
833107
|
+
const estimatedMaxSpendable = import_bignumber387.default.max(accountBeforeTransaction.spendableBalance.minus(SYSTEM_ACCOUNT_RENT_EXEMPT), 0).toNumber();
|
|
833108
|
+
botTest("operation value should be estimated max spendable", () => (0, import_expect15.default)(operation.value.toNumber()).toBe(estimatedMaxSpendable));
|
|
832938
833109
|
botTest("account spendableBalance should be zero", () => (0, import_expect15.default)(account3.spendableBalance.toNumber()).toBe(0));
|
|
832939
833110
|
expectCorrectBalanceChange2(input);
|
|
832940
833111
|
expectCorrectMemo(input);
|
|
@@ -832951,8 +833122,8 @@ var solana = {
|
|
|
832951
833122
|
if (solanaResources === void 0) {
|
|
832952
833123
|
throw new Error("solana resources required");
|
|
832953
833124
|
}
|
|
832954
|
-
(0,
|
|
832955
|
-
(0,
|
|
833125
|
+
(0, import_invariant93.default)(solanaResources.stakes.length < 10, "already enough delegations");
|
|
833126
|
+
(0, import_invariant93.default)(account3.spendableBalance.gte(3e6), "not enough balance");
|
|
832956
833127
|
const { validators: validators7 } = getCurrentSolanaPreloadData(account3.currency);
|
|
832957
833128
|
const notUsedValidators = validators7.filter((v38) => solanaResources.stakes.every((s46) => s46.delegation?.voteAccAddr !== v38.voteAccount));
|
|
832958
833129
|
const validator2 = (0, import_fp6.sample)(notUsedValidators);
|
|
@@ -833000,7 +833171,7 @@ var solana = {
|
|
|
833000
833171
|
maxRun: 1,
|
|
833001
833172
|
deviceAction: acceptStakeUndelegateTransaction,
|
|
833002
833173
|
transaction: ({ account: account3, bridge: bridge28 }) => {
|
|
833003
|
-
(0,
|
|
833174
|
+
(0, import_invariant93.default)(account3.spendableBalance.gt(0), "not enough balance");
|
|
833004
833175
|
const { solanaResources } = account3;
|
|
833005
833176
|
if (solanaResources === void 0) {
|
|
833006
833177
|
throw new Error("solana resources required");
|
|
@@ -833047,7 +833218,7 @@ var solana = {
|
|
|
833047
833218
|
maxRun: 1,
|
|
833048
833219
|
deviceAction: acceptStakeUndelegateTransaction,
|
|
833049
833220
|
transaction: ({ account: account3, bridge: bridge28 }) => {
|
|
833050
|
-
(0,
|
|
833221
|
+
(0, import_invariant93.default)(account3.spendableBalance.gt(0), "not enough balance");
|
|
833051
833222
|
const { solanaResources } = account3;
|
|
833052
833223
|
if (solanaResources === void 0) {
|
|
833053
833224
|
throw new Error("solana resources required");
|
|
@@ -833094,7 +833265,7 @@ var solana = {
|
|
|
833094
833265
|
maxRun: 1,
|
|
833095
833266
|
deviceAction: acceptStakeDelegateTransaction,
|
|
833096
833267
|
transaction: ({ account: account3, bridge: bridge28 }) => {
|
|
833097
|
-
(0,
|
|
833268
|
+
(0, import_invariant93.default)(account3.spendableBalance.gt(0), "not enough balance");
|
|
833098
833269
|
const { solanaResources } = account3;
|
|
833099
833270
|
if (solanaResources === void 0) {
|
|
833100
833271
|
throw new Error("solana resources required");
|
|
@@ -833145,7 +833316,7 @@ var solana = {
|
|
|
833145
833316
|
maxRun: 1,
|
|
833146
833317
|
deviceAction: acceptStakeDelegateTransaction,
|
|
833147
833318
|
transaction: ({ account: account3, bridge: bridge28 }) => {
|
|
833148
|
-
(0,
|
|
833319
|
+
(0, import_invariant93.default)(account3.spendableBalance.gt(0), "not enough balance");
|
|
833149
833320
|
const { solanaResources } = account3;
|
|
833150
833321
|
if (solanaResources === void 0) {
|
|
833151
833322
|
throw new Error("solana resources required");
|
|
@@ -833196,7 +833367,7 @@ var solana = {
|
|
|
833196
833367
|
maxRun: 1,
|
|
833197
833368
|
deviceAction: acceptStakeWithdrawTransaction,
|
|
833198
833369
|
transaction: ({ account: account3, bridge: bridge28 }) => {
|
|
833199
|
-
(0,
|
|
833370
|
+
(0, import_invariant93.default)(account3.spendableBalance.gt(0), "not enough balance");
|
|
833200
833371
|
const { solanaResources } = account3;
|
|
833201
833372
|
if (solanaResources === void 0) {
|
|
833202
833373
|
throw new Error("solana resources required");
|
|
@@ -833240,12 +833411,12 @@ var solana = {
|
|
|
833240
833411
|
feature: "tokens",
|
|
833241
833412
|
deviceAction: acceptTransferTokensWithATACreationTransaction,
|
|
833242
833413
|
transaction: ({ account: account3, bridge: bridge28, siblings, maxSpendable }) => {
|
|
833243
|
-
(0,
|
|
833414
|
+
(0, import_invariant93.default)(maxSpendable.gt(0), "balance is 0");
|
|
833244
833415
|
const senderTokenAcc = findTokenSubAccountWithBalance(account3);
|
|
833245
|
-
(0,
|
|
833416
|
+
(0, import_invariant93.default)(senderTokenAcc, "Sender token account with available balance not found");
|
|
833246
833417
|
const token = senderTokenAcc.token;
|
|
833247
833418
|
const siblingWithoutToken = siblings.find((acc) => !findTokenSubAccount(acc, token.id));
|
|
833248
|
-
(0,
|
|
833419
|
+
(0, import_invariant93.default)(siblingWithoutToken, `Recipient without ${token.ticker} ATA not found`);
|
|
833249
833420
|
const amount = senderTokenAcc.balance.div(1.9 + 0.2 * Math.random()).integerValue();
|
|
833250
833421
|
const recipient = siblingWithoutToken.freshAddress;
|
|
833251
833422
|
const transaction = bridge28.createTransaction(account3);
|
|
@@ -833270,12 +833441,12 @@ var solana = {
|
|
|
833270
833441
|
feature: "tokens",
|
|
833271
833442
|
deviceAction: acceptTransferTokensTransaction,
|
|
833272
833443
|
transaction: ({ account: account3, bridge: bridge28, siblings, maxSpendable }) => {
|
|
833273
|
-
(0,
|
|
833444
|
+
(0, import_invariant93.default)(maxSpendable.gt(0), "balance is 0");
|
|
833274
833445
|
const senderTokenAcc = findTokenSubAccountWithBalance(account3);
|
|
833275
|
-
(0,
|
|
833446
|
+
(0, import_invariant93.default)(senderTokenAcc, "Sender token account with available balance not found");
|
|
833276
833447
|
const token = senderTokenAcc.token;
|
|
833277
833448
|
const siblingTokenAccount = siblings.find((acc) => findTokenSubAccount(acc, token.id));
|
|
833278
|
-
(0,
|
|
833449
|
+
(0, import_invariant93.default)(siblingTokenAccount, `Sibling with ${token.ticker} token ATA not found`);
|
|
833279
833450
|
const amount = senderTokenAcc.balance.div(1.9 + 0.2 * Math.random()).integerValue();
|
|
833280
833451
|
const recipient = siblingTokenAccount.freshAddress;
|
|
833281
833452
|
const transaction = bridge28.createTransaction(account3);
|
|
@@ -833294,12 +833465,12 @@ var solana = {
|
|
|
833294
833465
|
maxRun: 1,
|
|
833295
833466
|
deviceAction: acceptTransferTokensWithATACreationTransaction,
|
|
833296
833467
|
transaction: ({ account: account3, bridge: bridge28, siblings, maxSpendable }) => {
|
|
833297
|
-
(0,
|
|
833468
|
+
(0, import_invariant93.default)(maxSpendable.gt(0), "balance is 0");
|
|
833298
833469
|
const senderTokenAcc = findTokenAccountWithExtensionAndBalance(account3, "transferFee");
|
|
833299
|
-
(0,
|
|
833470
|
+
(0, import_invariant93.default)(senderTokenAcc, "Sender token2022 account with transfer fee extension and available balance not found");
|
|
833300
833471
|
const token = senderTokenAcc.token;
|
|
833301
833472
|
const siblingWithoutToken = siblings.find((acc) => !findTokenSubAccount(acc, token.id));
|
|
833302
|
-
(0,
|
|
833473
|
+
(0, import_invariant93.default)(siblingWithoutToken, `Recipient without ${token.ticker} ATA not found`);
|
|
833303
833474
|
const amount = senderTokenAcc.balance.div(1.9 + 0.2 * Math.random()).integerValue();
|
|
833304
833475
|
const recipient = siblingWithoutToken.freshAddress;
|
|
833305
833476
|
const transaction = bridge28.createTransaction(account3);
|
|
@@ -833321,12 +833492,12 @@ var solana = {
|
|
|
833321
833492
|
maxRun: 1,
|
|
833322
833493
|
deviceAction: acceptTransferTokensTransaction,
|
|
833323
833494
|
transaction: ({ account: account3, bridge: bridge28, siblings, maxSpendable }) => {
|
|
833324
|
-
(0,
|
|
833495
|
+
(0, import_invariant93.default)(maxSpendable.gt(0), "balance is 0");
|
|
833325
833496
|
const senderTokenAcc = findTokenAccountWithExtensionAndBalance(account3, "transferFee");
|
|
833326
|
-
(0,
|
|
833497
|
+
(0, import_invariant93.default)(senderTokenAcc, "Sender token2022 account with transfer fee extension and available balance not found");
|
|
833327
833498
|
const token = senderTokenAcc.token;
|
|
833328
833499
|
const siblingTokenAccount = siblings.find((acc) => findTokenSubAccount(acc, token.id));
|
|
833329
|
-
(0,
|
|
833500
|
+
(0, import_invariant93.default)(siblingTokenAccount, `Recipient without ${token.ticker} ATA not found`);
|
|
833330
833501
|
const amount = senderTokenAcc.balance.div(1.9 + 0.2 * Math.random()).integerValue();
|
|
833331
833502
|
const recipient = siblingTokenAccount.freshAddress;
|
|
833332
833503
|
const transaction = bridge28.createTransaction(account3);
|
|
@@ -833343,12 +833514,12 @@ var solana = {
|
|
|
833343
833514
|
maxRun: 1,
|
|
833344
833515
|
deviceAction: acceptTransferTokensWithATACreationTransaction,
|
|
833345
833516
|
transaction: ({ account: account3, bridge: bridge28, siblings, maxSpendable }) => {
|
|
833346
|
-
(0,
|
|
833517
|
+
(0, import_invariant93.default)(maxSpendable.gt(0), "balance is 0");
|
|
833347
833518
|
const senderTokenAcc = findTokenAccountWithExtensionAndBalance(account3, "transferFee");
|
|
833348
|
-
(0,
|
|
833519
|
+
(0, import_invariant93.default)(senderTokenAcc, "Sender token2022 account with transfer fee extension and available balance not found");
|
|
833349
833520
|
const token = senderTokenAcc.token;
|
|
833350
833521
|
const siblingWithoutToken = siblings.find((acc) => !findTokenSubAccount(acc, token.id));
|
|
833351
|
-
(0,
|
|
833522
|
+
(0, import_invariant93.default)(siblingWithoutToken, `Recipient without ${token.ticker} ATA not found`);
|
|
833352
833523
|
const amount = senderTokenAcc.balance.div(1.9 + 0.2 * Math.random()).integerValue();
|
|
833353
833524
|
const recipient = siblingWithoutToken.freshAddress;
|
|
833354
833525
|
const transaction = bridge28.createTransaction(account3);
|
|
@@ -833370,12 +833541,12 @@ var solana = {
|
|
|
833370
833541
|
maxRun: 1,
|
|
833371
833542
|
deviceAction: acceptTransferTokensTransaction,
|
|
833372
833543
|
transaction: ({ account: account3, bridge: bridge28, siblings, maxSpendable }) => {
|
|
833373
|
-
(0,
|
|
833544
|
+
(0, import_invariant93.default)(maxSpendable.gt(0), "balance is 0");
|
|
833374
833545
|
const senderTokenAcc = findTokenAccountWithExtensionAndBalance(account3, "transferFee");
|
|
833375
|
-
(0,
|
|
833546
|
+
(0, import_invariant93.default)(senderTokenAcc, "Sender token2022 account with transfer fee extension and available balance not found");
|
|
833376
833547
|
const token = senderTokenAcc.token;
|
|
833377
833548
|
const siblingTokenAccount = siblings.find((acc) => findTokenSubAccount(acc, token.id));
|
|
833378
|
-
(0,
|
|
833549
|
+
(0, import_invariant93.default)(siblingTokenAccount, `Recipient without ${token.ticker} ATA not found`);
|
|
833379
833550
|
const amount = senderTokenAcc.balance.div(1.9 + 0.2 * Math.random()).integerValue();
|
|
833380
833551
|
const recipient = siblingTokenAccount.freshAddress;
|
|
833381
833552
|
const transaction = bridge28.createTransaction(account3);
|
|
@@ -833470,7 +833641,7 @@ var specs_default9 = {
|
|
|
833470
833641
|
};
|
|
833471
833642
|
|
|
833472
833643
|
// ../../libs/coin-modules/coin-stacks/lib-es/test/bot-specs.js
|
|
833473
|
-
var
|
|
833644
|
+
var import_invariant94 = __toESM(require("invariant"));
|
|
833474
833645
|
init_lib_es5();
|
|
833475
833646
|
var import_bignumber388 = __toESM(require("bignumber.js"));
|
|
833476
833647
|
var import_expect16 = __toESM(require_build21());
|
|
@@ -833534,7 +833705,7 @@ var stacksSpecs = {
|
|
|
833534
833705
|
// Need an evolution of the bot to tolerate unconfirmed ops and just warn maybe instead of error
|
|
833535
833706
|
testTimeout: 25 * 60 * 1e3,
|
|
833536
833707
|
transactionCheck: ({ maxSpendable }) => {
|
|
833537
|
-
(0,
|
|
833708
|
+
(0, import_invariant94.default)(maxSpendable.gt(MIN_SAFE5), "balance is too low");
|
|
833538
833709
|
},
|
|
833539
833710
|
mutations: [
|
|
833540
833711
|
{
|
|
@@ -833546,7 +833717,7 @@ var stacksSpecs = {
|
|
|
833546
833717
|
const recipient = sibling.freshAddress;
|
|
833547
833718
|
let amount = account3.spendableBalance.div(1.9 + 0.2 * Math.random()).integerValue();
|
|
833548
833719
|
if (!sibling.used && amount.lt(MIN_SAFE5)) {
|
|
833549
|
-
(0,
|
|
833720
|
+
(0, import_invariant94.default)(account3.spendableBalance.gt(MIN_SAFE5), "send is too low to activate account");
|
|
833550
833721
|
amount = MIN_SAFE5;
|
|
833551
833722
|
}
|
|
833552
833723
|
const transaction = bridge28.createTransaction(account3);
|
|
@@ -833586,7 +833757,7 @@ var bot_specs_default8 = {
|
|
|
833586
833757
|
|
|
833587
833758
|
// ../../libs/coin-modules/coin-stellar/lib-es/test/bot-specs.js
|
|
833588
833759
|
var import_expect17 = __toESM(require_build21());
|
|
833589
|
-
var
|
|
833760
|
+
var import_invariant95 = __toESM(require("invariant"));
|
|
833590
833761
|
var import_bignumber389 = __toESM(require("bignumber.js"));
|
|
833591
833762
|
init_lib_es5();
|
|
833592
833763
|
|
|
@@ -833714,13 +833885,13 @@ var stellar2 = {
|
|
|
833714
833885
|
feature: "send",
|
|
833715
833886
|
maxRun: 1,
|
|
833716
833887
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
833717
|
-
(0,
|
|
833888
|
+
(0, import_invariant95.default)(maxSpendable.gt(minAmountCutoff), "XLM balance is too low");
|
|
833718
833889
|
const transaction = bridge28.createTransaction(account3);
|
|
833719
833890
|
const sibling = pickSiblings(siblings, 4);
|
|
833720
833891
|
const recipient = sibling.freshAddress;
|
|
833721
833892
|
let amount = maxSpendable.div(1.9 + 0.2 * Math.random()).integerValue();
|
|
833722
833893
|
if (!sibling.used && amount.lt(reserve)) {
|
|
833723
|
-
(0,
|
|
833894
|
+
(0, import_invariant95.default)(maxSpendable.gt(reserve.plus(minAmountCutoff)), "not enough XLM funds to send to new account");
|
|
833724
833895
|
amount = reserve;
|
|
833725
833896
|
}
|
|
833726
833897
|
const updates7 = [
|
|
@@ -833770,7 +833941,7 @@ var stellar2 = {
|
|
|
833770
833941
|
feature: "sendMax",
|
|
833771
833942
|
maxRun: 1,
|
|
833772
833943
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
833773
|
-
(0,
|
|
833944
|
+
(0, import_invariant95.default)(maxSpendable.gt(minAmountCutoff), "XLM balance is too low");
|
|
833774
833945
|
const transaction = bridge28.createTransaction(account3);
|
|
833775
833946
|
const sibling = pickSiblings(siblings, 4);
|
|
833776
833947
|
const recipient = sibling.freshAddress;
|
|
@@ -833821,10 +833992,10 @@ var stellar2 = {
|
|
|
833821
833992
|
feature: "tokens",
|
|
833822
833993
|
maxRun: 1,
|
|
833823
833994
|
transaction: ({ account: account3, bridge: bridge28, maxSpendable }) => {
|
|
833824
|
-
(0,
|
|
833825
|
-
(0,
|
|
833995
|
+
(0, import_invariant95.default)(maxSpendable.gt(reserve), "XLM balance is too low 1");
|
|
833996
|
+
(0, import_invariant95.default)(account3.subAccounts && !findAssetUSDC(account3.subAccounts), "already have subaccounts");
|
|
833826
833997
|
const assetUSDC = findAssetUSDC(listTokensForCryptoCurrency(account3.currency));
|
|
833827
|
-
(0,
|
|
833998
|
+
(0, import_invariant95.default)(assetUSDC, "USDC asset not found");
|
|
833828
833999
|
const transaction = bridge28.createTransaction(account3);
|
|
833829
834000
|
const updates7 = [
|
|
833830
834001
|
{
|
|
@@ -833854,12 +834025,12 @@ var stellar2 = {
|
|
|
833854
834025
|
feature: "tokens",
|
|
833855
834026
|
maxRun: 1,
|
|
833856
834027
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
833857
|
-
(0,
|
|
834028
|
+
(0, import_invariant95.default)(maxSpendable.gt(minAmountCutoff), "XLM balance is too low");
|
|
833858
834029
|
const usdcSubAccount = findAssetUSDC(account3?.subAccounts);
|
|
833859
|
-
(0,
|
|
833860
|
-
(0,
|
|
834030
|
+
(0, import_invariant95.default)(usdcSubAccount, "USDC asset not found");
|
|
834031
|
+
(0, import_invariant95.default)(usdcSubAccount?.balance.gt(MIN_ASSET_BALANCE), "USDC balance is too low");
|
|
833861
834032
|
const siblingWithAssetUSDC = siblings.find((s46) => findAssetUSDC(s46.subAccounts));
|
|
833862
|
-
(0,
|
|
834033
|
+
(0, import_invariant95.default)(siblingWithAssetUSDC, "No siblings with USDC asset");
|
|
833863
834034
|
if (!usdcSubAccount || !siblingWithAssetUSDC) {
|
|
833864
834035
|
throw new Error("No USDC asset or sibling with USDC asset");
|
|
833865
834036
|
}
|
|
@@ -833910,7 +834081,7 @@ var bot_specs_default9 = {
|
|
|
833910
834081
|
|
|
833911
834082
|
// ../../libs/coin-modules/coin-tezos/lib-es/test/bot-specs.js
|
|
833912
834083
|
var import_sample8 = __toESM(require("lodash/sample"));
|
|
833913
|
-
var
|
|
834084
|
+
var import_invariant96 = __toESM(require("invariant"));
|
|
833914
834085
|
init_lib_es5();
|
|
833915
834086
|
|
|
833916
834087
|
// ../../libs/coin-modules/coin-tezos/lib-es/types/bridge.js
|
|
@@ -834017,12 +834188,12 @@ var maxAccount8 = 12;
|
|
|
834017
834188
|
function expectUnrevealed(account3) {
|
|
834018
834189
|
if (!isTezosAccount(account3))
|
|
834019
834190
|
throw Error("Not TezosAccount type");
|
|
834020
|
-
(0,
|
|
834191
|
+
(0, import_invariant96.default)(account3.tezosResources?.revealed === false, "account must be unreleaved");
|
|
834021
834192
|
}
|
|
834022
834193
|
function expectRevealed(account3) {
|
|
834023
834194
|
if (!isTezosAccount(account3))
|
|
834024
834195
|
throw Error("Not TezosAccount type");
|
|
834025
|
-
(0,
|
|
834196
|
+
(0, import_invariant96.default)(account3.tezosResources?.revealed === true, "account must be releaved");
|
|
834026
834197
|
}
|
|
834027
834198
|
var tezosUnit = getCryptoCurrencyById("tezos").units[0];
|
|
834028
834199
|
var safeMinimumForDestinationNotCreated = parseCurrencyUnit(tezosUnit, "0.6");
|
|
@@ -834039,7 +834210,7 @@ var tezos = {
|
|
|
834039
834210
|
testTimeout: 2 * 60 * 1e3,
|
|
834040
834211
|
minViableAmount: strictMin,
|
|
834041
834212
|
transactionCheck: ({ maxSpendable }) => {
|
|
834042
|
-
(0,
|
|
834213
|
+
(0, import_invariant96.default)(maxSpendable.gt(strictMin), "balance is too low");
|
|
834043
834214
|
},
|
|
834044
834215
|
mutations: [
|
|
834045
834216
|
{
|
|
@@ -834086,7 +834257,7 @@ var tezos = {
|
|
|
834086
834257
|
maxRun: 1,
|
|
834087
834258
|
testDestination: genericTestDestination,
|
|
834088
834259
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
834089
|
-
(0,
|
|
834260
|
+
(0, import_invariant96.default)(!isAccountDelegating(account3), "account must not be delegating");
|
|
834090
834261
|
const sibling = pickSiblings(siblings, maxAccount8);
|
|
834091
834262
|
const recipient = sibling.freshAddress;
|
|
834092
834263
|
if (sibling.balance.eq(0) && maxSpendable.lt(safeMinimumForDestinationNotCreated)) {
|
|
@@ -834131,7 +834302,7 @@ var tezos = {
|
|
|
834131
834302
|
feature: "staking",
|
|
834132
834303
|
maxRun: 1,
|
|
834133
834304
|
transaction: ({ account: account3, bridge: bridge28 }) => {
|
|
834134
|
-
(0,
|
|
834305
|
+
(0, import_invariant96.default)(getAccountDelegationSync(account3), "account must be delegating");
|
|
834135
834306
|
expectUnrevealed(account3);
|
|
834136
834307
|
return {
|
|
834137
834308
|
transaction: bridge28.createTransaction(account3),
|
|
@@ -834144,7 +834315,7 @@ var tezos = {
|
|
|
834144
834315
|
feature: "staking",
|
|
834145
834316
|
maxRun: 1,
|
|
834146
834317
|
transaction: ({ account: account3, bridge: bridge28 }) => {
|
|
834147
|
-
(0,
|
|
834318
|
+
(0, import_invariant96.default)(getAccountDelegationSync(account3), "account must be delegating");
|
|
834148
834319
|
expectRevealed(account3);
|
|
834149
834320
|
return {
|
|
834150
834321
|
transaction: bridge28.createTransaction(account3),
|
|
@@ -834162,7 +834333,7 @@ var bot_specs_default10 = {
|
|
|
834162
834333
|
init_lib_es5();
|
|
834163
834334
|
var import_bignumber390 = __toESM(require("bignumber.js"));
|
|
834164
834335
|
var import_expect18 = __toESM(require_build21());
|
|
834165
|
-
var
|
|
834336
|
+
var import_invariant97 = __toESM(require("invariant"));
|
|
834166
834337
|
|
|
834167
834338
|
// ../../libs/coin-modules/coin-ton/lib-es/speculos-deviceActions.js
|
|
834168
834339
|
var generateDeviceActionFlow2 = (scenario) => {
|
|
@@ -834262,7 +834433,7 @@ var tonSpecs = {
|
|
|
834262
834433
|
testTimeout: 6 * 60 * 1e3,
|
|
834263
834434
|
minViableAmount: MIN_SAFE6,
|
|
834264
834435
|
transactionCheck: ({ maxSpendable }) => {
|
|
834265
|
-
(0,
|
|
834436
|
+
(0, import_invariant97.default)(maxSpendable.gt(MIN_SAFE6), "balance is too low");
|
|
834266
834437
|
},
|
|
834267
834438
|
mutations: [
|
|
834268
834439
|
{
|
|
@@ -834271,7 +834442,7 @@ var tonSpecs = {
|
|
|
834271
834442
|
maxRun: 1,
|
|
834272
834443
|
testDestination: testDestination2,
|
|
834273
834444
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
834274
|
-
(0,
|
|
834445
|
+
(0, import_invariant97.default)(maxSpendable.gt(MIN_SAFE6), "balance is too low");
|
|
834275
834446
|
const updates7 = [
|
|
834276
834447
|
{ recipient: pickSiblings(siblings).freshAddress },
|
|
834277
834448
|
{ amount: maxSpendable.div(2).integerValue() },
|
|
@@ -834324,10 +834495,10 @@ var tonSpecs = {
|
|
|
834324
834495
|
maxRun: 1,
|
|
834325
834496
|
deviceAction: generateDeviceActionFlow2(BotScenario2.TOKEN_TRANSFER),
|
|
834326
834497
|
transaction: ({ account: account3, bridge: bridge28, maxSpendable, siblings }) => {
|
|
834327
|
-
(0,
|
|
834498
|
+
(0, import_invariant97.default)(maxSpendable.gt(0), "Spendable balance is too low");
|
|
834328
834499
|
const subAccount = account3.subAccounts?.find((a62) => a62.type === "TokenAccount" && a62.spendableBalance.gt(0));
|
|
834329
834500
|
const recipient = siblings[0].freshAddress;
|
|
834330
|
-
(0,
|
|
834501
|
+
(0, import_invariant97.default)(subAccount && subAccount.type === "TokenAccount", "no subAccount with jUSDT");
|
|
834331
834502
|
const amount = subAccount.balance.div(1.9 + 0.2 * Math.random()).integerValue();
|
|
834332
834503
|
const updates7 = [
|
|
834333
834504
|
{
|
|
@@ -834365,7 +834536,7 @@ var specs_default10 = {
|
|
|
834365
834536
|
|
|
834366
834537
|
// ../../libs/coin-modules/coin-vechain/lib-es/test/bot-specs.js
|
|
834367
834538
|
var import_bignumber391 = __toESM(require("bignumber.js"));
|
|
834368
|
-
var
|
|
834539
|
+
var import_invariant98 = __toESM(require("invariant"));
|
|
834369
834540
|
init_lib_es5();
|
|
834370
834541
|
|
|
834371
834542
|
// ../../libs/coin-modules/coin-vechain/lib-es/test/bot-deviceActions.js
|
|
@@ -834429,8 +834600,8 @@ var vet = {
|
|
|
834429
834600
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
834430
834601
|
if (!account3.subAccounts?.[0])
|
|
834431
834602
|
throw new Error("no VTHO account");
|
|
834432
|
-
(0,
|
|
834433
|
-
(0,
|
|
834603
|
+
(0, import_invariant98.default)(account3.balance.gt(MIN_VET_TRANSACTION_AMOUNT), "Vechain: VET balance is empty");
|
|
834604
|
+
(0, import_invariant98.default)(account3.subAccounts[0].balance.gt(MAX_VTHO_FEE_FOR_VET_TRANSACTION), "Vechain: VTHO balance is not enough");
|
|
834434
834605
|
const sibling = pickSiblings(siblings, 2);
|
|
834435
834606
|
const recipient = sibling.freshAddress;
|
|
834436
834607
|
const transaction = bridge28.createTransaction(account3);
|
|
@@ -834452,8 +834623,8 @@ var vet = {
|
|
|
834452
834623
|
transaction: ({ account: account3, siblings, bridge: bridge28 }) => {
|
|
834453
834624
|
if (!account3.subAccounts?.[0])
|
|
834454
834625
|
throw new Error("no VTHO account");
|
|
834455
|
-
(0,
|
|
834456
|
-
(0,
|
|
834626
|
+
(0, import_invariant98.default)(account3.balance.gt(MIN_VET_TRANSACTION_AMOUNT), "Vechain: VET balance is empty");
|
|
834627
|
+
(0, import_invariant98.default)(account3.subAccounts?.[0].balance.gt(MAX_VTHO_FEE_FOR_VET_TRANSACTION), "Vechain: VTHO balance is not enough");
|
|
834457
834628
|
const sibling = pickSiblings(siblings, 4);
|
|
834458
834629
|
const recipient = sibling.freshAddress;
|
|
834459
834630
|
const transaction = bridge28.createTransaction(account3);
|
|
@@ -834481,7 +834652,7 @@ var vtho = {
|
|
|
834481
834652
|
transaction: ({ account: account3, siblings, bridge: bridge28 }) => {
|
|
834482
834653
|
if (!account3.subAccounts?.[0])
|
|
834483
834654
|
throw new Error("no VTHO account");
|
|
834484
|
-
(0,
|
|
834655
|
+
(0, import_invariant98.default)(account3.subAccounts?.[0].balance.gt(MAX_VTHO_FEE_FOR_VTHO_TRANSACTION * 2), "Vechain: VTHO balance is not enough");
|
|
834485
834656
|
const sibling = pickSiblings(siblings, 2);
|
|
834486
834657
|
const recipient = sibling.freshAddress;
|
|
834487
834658
|
if (!account3.subAccounts || !account3.subAccounts[0] || !(account3.subAccounts[0].type == "TokenAccount"))
|
|
@@ -834506,7 +834677,7 @@ var vtho = {
|
|
|
834506
834677
|
transaction: ({ account: account3, siblings, bridge: bridge28 }) => {
|
|
834507
834678
|
if (!account3.subAccounts?.[0])
|
|
834508
834679
|
throw new Error("no VTHO account");
|
|
834509
|
-
(0,
|
|
834680
|
+
(0, import_invariant98.default)(account3.subAccounts?.[0].balance.gt(MAX_VTHO_FEE_FOR_VTHO_TRANSACTION), "Vechain: VTHO balance is not enough");
|
|
834510
834681
|
const sibling = pickSiblings(siblings, 4);
|
|
834511
834682
|
const recipient = sibling.freshAddress;
|
|
834512
834683
|
if (!account3.subAccounts || !account3.subAccounts[0] || !(account3.subAccounts[0].type == "TokenAccount"))
|
|
@@ -834531,7 +834702,7 @@ var vtho = {
|
|
|
834531
834702
|
var bot_specs_default11 = { vtho, vet };
|
|
834532
834703
|
|
|
834533
834704
|
// ../../libs/coin-modules/coin-xrp/lib-es/test/bot-specs.js
|
|
834534
|
-
var
|
|
834705
|
+
var import_invariant99 = __toESM(require("invariant"));
|
|
834535
834706
|
var import_expect19 = __toESM(require_build21());
|
|
834536
834707
|
init_lib_es5();
|
|
834537
834708
|
|
|
@@ -834601,13 +834772,13 @@ var xrp = {
|
|
|
834601
834772
|
maxRun: 1,
|
|
834602
834773
|
testDestination: genericTestDestination,
|
|
834603
834774
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
834604
|
-
(0,
|
|
834775
|
+
(0, import_invariant99.default)(maxSpendable.gt(minAmountCutoff2), "balance is too low");
|
|
834605
834776
|
const transaction = bridge28.createTransaction(account3);
|
|
834606
834777
|
const sibling = pickSiblings(siblings, 3);
|
|
834607
834778
|
const recipient = sibling.freshAddress;
|
|
834608
834779
|
let amount = maxSpendable.div(1.9 + 0.2 * Math.random()).integerValue();
|
|
834609
834780
|
if (!sibling.used && amount.lt(reserve2)) {
|
|
834610
|
-
(0,
|
|
834781
|
+
(0, import_invariant99.default)(maxSpendable.gt(reserve2.plus(minAmountCutoff2)), "not enough funds to send to new account");
|
|
834611
834782
|
amount = reserve2;
|
|
834612
834783
|
}
|
|
834613
834784
|
return {
|
|
@@ -834636,7 +834807,7 @@ var bot_specs_default12 = {
|
|
|
834636
834807
|
};
|
|
834637
834808
|
|
|
834638
834809
|
// ../../libs/coin-modules/coin-mina/lib-es/test/bot-specs.js
|
|
834639
|
-
var
|
|
834810
|
+
var import_invariant100 = __toESM(require("invariant"));
|
|
834640
834811
|
init_lib_es5();
|
|
834641
834812
|
var import_bignumber392 = __toESM(require("bignumber.js"));
|
|
834642
834813
|
var import_expect20 = __toESM(require_build21());
|
|
@@ -834724,7 +834895,7 @@ var minaSpecs = {
|
|
|
834724
834895
|
testTimeout: 15 * 60 * 1e3,
|
|
834725
834896
|
minViableAmount: MIN_SAFE7,
|
|
834726
834897
|
transactionCheck: ({ maxSpendable }) => {
|
|
834727
|
-
(0,
|
|
834898
|
+
(0, import_invariant100.default)(maxSpendable.gt(MIN_SAFE7), "balance is too low");
|
|
834728
834899
|
},
|
|
834729
834900
|
mutations: [
|
|
834730
834901
|
{
|
|
@@ -834733,7 +834904,7 @@ var minaSpecs = {
|
|
|
834733
834904
|
testDestination: genericTestDestination,
|
|
834734
834905
|
feature: "send",
|
|
834735
834906
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
834736
|
-
(0,
|
|
834907
|
+
(0, import_invariant100.default)(maxSpendable.gt(MIN_SAFE7), "balance is too low");
|
|
834737
834908
|
const sibling = pickSiblings(siblings, maxAccount9);
|
|
834738
834909
|
const recipient = sibling.freshAddress;
|
|
834739
834910
|
const amount = maxSpendable.div(2).integerValue();
|
|
@@ -834832,7 +835003,7 @@ var specs_default11 = {
|
|
|
834832
835003
|
|
|
834833
835004
|
// ../../libs/ledger-live-common/lib-es/bot/engine.js
|
|
834834
835005
|
var import_expect21 = __toESM(require_build21());
|
|
834835
|
-
var
|
|
835006
|
+
var import_invariant101 = __toESM(require("invariant"));
|
|
834836
835007
|
var import_performance_now = __toESM(require_performance_now());
|
|
834837
835008
|
var import_sample9 = __toESM(require("lodash/sample"));
|
|
834838
835009
|
var import_rxjs156 = require("rxjs");
|
|
@@ -834896,9 +835067,9 @@ var delayBetweenScanAccountRetries = 5e3;
|
|
|
834896
835067
|
async function runWithAppSpec(spec2, reportLog) {
|
|
834897
835068
|
log2("engine", `spec ${spec2.name}`);
|
|
834898
835069
|
const seed = getEnv("SEED");
|
|
834899
|
-
(0,
|
|
835070
|
+
(0, import_invariant101.default)(seed, "SEED is not set");
|
|
834900
835071
|
const coinapps = getEnv("COINAPPS");
|
|
834901
|
-
(0,
|
|
835072
|
+
(0, import_invariant101.default)(coinapps, "COINAPPS is not set");
|
|
834902
835073
|
if (!appCandidates) {
|
|
834903
835074
|
appCandidates = await listAppCandidates(coinapps);
|
|
834904
835075
|
}
|
|
@@ -834910,7 +835081,7 @@ async function runWithAppSpec(spec2, reportLog) {
|
|
|
834910
835081
|
console.warn(appQuery);
|
|
834911
835082
|
console.warn(JSON.stringify(appCandidates, void 0, 2));
|
|
834912
835083
|
}
|
|
834913
|
-
(0,
|
|
835084
|
+
(0, import_invariant101.default)(appCandidate, "%s: no app found. Are you sure your COINAPPS is up to date?", spec2.name, coinapps);
|
|
834914
835085
|
log2("engine", `spec ${spec2.name} will use ${formatAppCandidate(appCandidate)}`);
|
|
834915
835086
|
const deviceParams = {
|
|
834916
835087
|
...appCandidate,
|
|
@@ -834966,7 +835137,7 @@ Please increase the account target to at least ${spec2.mutations.length + 1} acc
|
|
|
834966
835137
|
}
|
|
834967
835138
|
appReport.accountsBefore = accounts2;
|
|
834968
835139
|
if (!spec2.allowEmptyAccounts) {
|
|
834969
|
-
(0,
|
|
835140
|
+
(0, import_invariant101.default)(accounts2.length > 0, "unexpected empty accounts for " + currency24.name);
|
|
834970
835141
|
}
|
|
834971
835142
|
const preloadStats = preloadDuration > 10 ? ` (preload: ${formatTime(preloadDuration)})` : "";
|
|
834972
835143
|
reportLog(`Spec ${spec2.name} found ${accounts2.length} ${currency24.name} accounts${preloadStats}. Will use ${formatAppCandidate(appCandidate)}
|
|
@@ -835103,7 +835274,7 @@ async function runOnAccount({ appCandidate, spec: spec2, device: device2, accoun
|
|
|
835103
835274
|
for (const mutation2 of mutations) {
|
|
835104
835275
|
try {
|
|
835105
835276
|
const count = mutationsCount[mutation2.name] || 0;
|
|
835106
|
-
(0,
|
|
835277
|
+
(0, import_invariant101.default)(count < (mutation2.maxRun || Infinity), "maximum mutation run reached (%s)", count);
|
|
835107
835278
|
const arg = {
|
|
835108
835279
|
appCandidate,
|
|
835109
835280
|
account: account3,
|
|
@@ -835224,7 +835395,7 @@ async function runOnAccount({ appCandidate, spec: spec2, device: device2, accoun
|
|
|
835224
835395
|
account: account3,
|
|
835225
835396
|
transaction,
|
|
835226
835397
|
status
|
|
835227
|
-
}), (0, import_operators13.first)((e38) => e38.type === "signed"), (0, import_operators13.map)((e38) => ((0,
|
|
835398
|
+
}), (0, import_operators13.first)((e38) => e38.type === "signed"), (0, import_operators13.map)((e38) => ((0, import_invariant101.default)(e38.type === "signed", "signed operation"), e38.signedOperation))));
|
|
835228
835399
|
deepFreezeSignedOperation(signedOperation);
|
|
835229
835400
|
report.signedOperation = signedOperation;
|
|
835230
835401
|
report.signedTime = (0, import_performance_now.default)();
|
|
@@ -835309,7 +835480,7 @@ async function runOnAccount({ appCandidate, spec: spec2, device: device2, accoun
|
|
|
835309
835480
|
let operation2;
|
|
835310
835481
|
try {
|
|
835311
835482
|
operation2 = account4.operations.find((op) => op.hash === sendingOperation.hash);
|
|
835312
|
-
botTest("destination account should receive an operation (by tx hash)", () => (0,
|
|
835483
|
+
botTest("destination account should receive an operation (by tx hash)", () => (0, import_invariant101.default)(operation2, "no operation found with hash %s", sendingOperation.hash));
|
|
835313
835484
|
if (!operation2)
|
|
835314
835485
|
throw new Error();
|
|
835315
835486
|
const arg = {
|
|
@@ -835465,7 +835636,7 @@ function transactionTest({ operation, optimisticOperation, account: account3, ac
|
|
|
835465
835636
|
if (blockAvgTime && account3.blockHeight) {
|
|
835466
835637
|
const expected = getOperationConfirmationNumber(operation, account3);
|
|
835467
835638
|
const expectedMax = Math.ceil(upperThreshold / blockAvgTime);
|
|
835468
|
-
botTest("low amount of confirmations", () => (0,
|
|
835639
|
+
botTest("low amount of confirmations", () => (0, import_invariant101.default)(expected <= expectedMax, "There are way too much operation confirmation for a small amount of time. %s < %s", expected, expectedMax));
|
|
835469
835640
|
}
|
|
835470
835641
|
botTest("optimisticOperation.value must not be NaN", () => (0, import_expect21.default)(!optimisticOperation.value.isNaN()).toBe(true));
|
|
835471
835642
|
botTest("optimisticOperation.fee must not be NaN", () => (0, import_expect21.default)(!optimisticOperation.fee.isNaN()).toBe(true));
|
|
@@ -836128,7 +836299,7 @@ function getSpecs({ disabled, filter: filter26 }) {
|
|
|
836128
836299
|
}
|
|
836129
836300
|
async function bot({ disabled, filter: filter26 } = {}) {
|
|
836130
836301
|
const SEED = getEnv("SEED");
|
|
836131
|
-
(0,
|
|
836302
|
+
(0, import_invariant102.default)(SEED, "SEED required");
|
|
836132
836303
|
const specsLogs = [];
|
|
836133
836304
|
const specs = getSpecs({ disabled, filter: filter26 });
|
|
836134
836305
|
const timeBefore = Date.now();
|
|
@@ -837212,7 +837383,7 @@ var import_operators19 = require("rxjs/operators");
|
|
|
837212
837383
|
|
|
837213
837384
|
// src/signedOperation.ts
|
|
837214
837385
|
var import_operators18 = require("rxjs/operators");
|
|
837215
|
-
var
|
|
837386
|
+
var import_invariant103 = __toESM(require("invariant"));
|
|
837216
837387
|
var inferSignedOperationsOpts = [
|
|
837217
837388
|
{
|
|
837218
837389
|
name: "signed-operation",
|
|
@@ -837223,13 +837394,13 @@ var inferSignedOperationsOpts = [
|
|
|
837223
837394
|
];
|
|
837224
837395
|
function inferSignedOperations(mainAccount, opts) {
|
|
837225
837396
|
const file = opts["signed-operation"];
|
|
837226
|
-
(0,
|
|
837397
|
+
(0, import_invariant103.default)(file, "--signed-operation file is required");
|
|
837227
837398
|
return jsonFromFile(file).pipe(
|
|
837228
837399
|
(0, import_operators18.map)((json2) => {
|
|
837229
|
-
(0,
|
|
837230
|
-
(0,
|
|
837231
|
-
(0,
|
|
837232
|
-
(0,
|
|
837400
|
+
(0, import_invariant103.default)(typeof json2 === "object", "not an object JSON");
|
|
837401
|
+
(0, import_invariant103.default)(typeof json2.signature === "string", "missing signature");
|
|
837402
|
+
(0, import_invariant103.default)(typeof json2.operation === "object", "missing operation object");
|
|
837403
|
+
(0, import_invariant103.default)(
|
|
837233
837404
|
json2.operation.accountId === mainAccount.id,
|
|
837234
837405
|
"the operation does not match the specified account"
|
|
837235
837406
|
);
|
|
@@ -837682,7 +837853,7 @@ var import_rxjs166 = require("rxjs");
|
|
|
837682
837853
|
var import_operators24 = require("rxjs/operators");
|
|
837683
837854
|
|
|
837684
837855
|
// ../../libs/ledger-live-common/lib-es/hw/getAddress/index.js
|
|
837685
|
-
var
|
|
837856
|
+
var import_invariant104 = __toESM(require("invariant"));
|
|
837686
837857
|
init_lib_es();
|
|
837687
837858
|
init_lib_es2();
|
|
837688
837859
|
|
|
@@ -837719,7 +837890,7 @@ var hw_getAddress_default12 = {
|
|
|
837719
837890
|
var dispatch3 = (transport, opts) => {
|
|
837720
837891
|
const { currency: currency24, verify: verify9 } = opts;
|
|
837721
837892
|
const getAddress12 = hw_getAddress_default12[currency24.family];
|
|
837722
|
-
(0,
|
|
837893
|
+
(0, import_invariant104.default)(getAddress12, `getAddress is not implemented for ${currency24.id}`);
|
|
837723
837894
|
return getAddress12(transport, opts).then((result2) => {
|
|
837724
837895
|
log2("hw", `getAddress ${currency24.id} on ${opts.path}`, result2);
|
|
837725
837896
|
return result2;
|
|
@@ -837874,14 +838045,14 @@ var receive_default = {
|
|
|
837874
838045
|
|
|
837875
838046
|
// src/commands/blockchain/satstack.ts
|
|
837876
838047
|
var import_fs6 = __toESM(require("fs"));
|
|
837877
|
-
var
|
|
838048
|
+
var import_invariant106 = __toESM(require("invariant"));
|
|
837878
838049
|
var import_rxjs172 = require("rxjs");
|
|
837879
838050
|
var import_operators29 = require("rxjs/operators");
|
|
837880
838051
|
|
|
837881
838052
|
// ../../libs/coin-modules/coin-bitcoin/lib-es/descriptor.js
|
|
837882
838053
|
var import_rxjs170 = require("rxjs");
|
|
837883
838054
|
var import_operators27 = require("rxjs/operators");
|
|
837884
|
-
var
|
|
838055
|
+
var import_invariant105 = __toESM(require("invariant"));
|
|
837885
838056
|
var import_bs589 = __toESM(require_bs58());
|
|
837886
838057
|
|
|
837887
838058
|
// ../../libs/coin-modules/coin-bitcoin/lib-es/crypto-util.js
|
|
@@ -837948,12 +838119,12 @@ function makeXpub2({ version: version33, depth, parentFingerprint, index, chainC
|
|
|
837948
838119
|
return import_bs589.default.encode(Buffer.concat([extendedKeyBytes, checksum8]));
|
|
837949
838120
|
}
|
|
837950
838121
|
function inferDescriptorFromDeviceInfo({ derivationMode, currency: currency24, index, parentDerivation, accountDerivation }) {
|
|
837951
|
-
(0,
|
|
838122
|
+
(0, import_invariant105.default)(currency24.bitcoinLikeInfo, "bitcoin currency expected");
|
|
837952
838123
|
const { bitcoinLikeInfo } = currency24;
|
|
837953
838124
|
const { XPUBVersion } = bitcoinLikeInfo;
|
|
837954
|
-
(0,
|
|
838125
|
+
(0, import_invariant105.default)(XPUBVersion, "unsupported bitcoin fork %s", currency24.id);
|
|
837955
838126
|
const { chainCode } = accountDerivation;
|
|
837956
|
-
(0,
|
|
838127
|
+
(0, import_invariant105.default)(chainCode, "chainCode is required");
|
|
837957
838128
|
const fingerprint = makeFingerprint2(compressPublicKeySECP2563(Buffer.from(parentDerivation.publicKey, "hex")));
|
|
837958
838129
|
const xpub = makeXpub2({
|
|
837959
838130
|
version: XPUBVersion,
|
|
@@ -838195,7 +838366,7 @@ var statusObservable = (0, import_rxjs171.interval)(1e3).pipe((0, import_operato
|
|
|
838195
838366
|
// src/commands/blockchain/satstack.ts
|
|
838196
838367
|
var bitcoin2 = getCryptoCurrencyById("bitcoin");
|
|
838197
838368
|
function requiredNodeConfig(nodeConfig) {
|
|
838198
|
-
(0,
|
|
838369
|
+
(0, import_invariant106.default)(nodeConfig, "--rpcHOST,--rpcUSER,--rpcPASSWORD config required");
|
|
838199
838370
|
const errors = validateRPCNodeConfig(nodeConfig);
|
|
838200
838371
|
if (errors.length) {
|
|
838201
838372
|
throw new Error(errors.map((e38) => e38.field + ": " + e38.error.message).join(", "));
|
|
@@ -838441,7 +838612,7 @@ var import_operators34 = require("rxjs/operators");
|
|
|
838441
838612
|
// ../../libs/ledger-live-common/lib-es/hw/signMessage/index.js
|
|
838442
838613
|
init_lib_es();
|
|
838443
838614
|
init_lib_es2();
|
|
838444
|
-
var
|
|
838615
|
+
var import_invariant109 = __toESM(require("invariant"));
|
|
838445
838616
|
var import_react3 = require("react");
|
|
838446
838617
|
var import_rxjs179 = require("rxjs");
|
|
838447
838618
|
|
|
@@ -838763,7 +838934,7 @@ var hw_signMessage_default = {
|
|
|
838763
838934
|
};
|
|
838764
838935
|
|
|
838765
838936
|
// ../../libs/ledger-live-common/lib-es/hw/actions/app.js
|
|
838766
|
-
var
|
|
838937
|
+
var import_invariant108 = __toESM(require("invariant"));
|
|
838767
838938
|
var import_rxjs177 = require("rxjs");
|
|
838768
838939
|
var import_operators33 = require("rxjs/operators");
|
|
838769
838940
|
var import_react2 = require("react");
|
|
@@ -838774,7 +838945,7 @@ var import_rxjs175 = require("rxjs");
|
|
|
838774
838945
|
var import_react = require("react");
|
|
838775
838946
|
|
|
838776
838947
|
// ../../libs/coin-modules/coin-cardano/lib-es/account.js
|
|
838777
|
-
var
|
|
838948
|
+
var import_invariant107 = __toESM(require("invariant"));
|
|
838778
838949
|
|
|
838779
838950
|
// ../../libs/ledger-live-common/lib-es/hw/actions/implementations.js
|
|
838780
838951
|
var import_rxjs176 = require("rxjs");
|
|
@@ -838880,7 +839051,7 @@ var signMessage11 = (transport, account3, opts) => {
|
|
|
838880
839051
|
break;
|
|
838881
839052
|
}
|
|
838882
839053
|
}
|
|
838883
|
-
(0,
|
|
839054
|
+
(0, import_invariant109.default)(signMessage12, `signMessage is not implemented for ${currency24.id}`);
|
|
838884
839055
|
return signMessage12(transport, account3, opts).then((result2) => {
|
|
838885
839056
|
const path4 = "path" in opts && opts.path ? opts.path : account3.freshAddressPath;
|
|
838886
839057
|
log2("hw", `signMessage ${currency24.id} on ${path4} with message [${opts.message}]`, result2);
|
|
@@ -839004,7 +839175,7 @@ var testDetectOpCollision_default = {
|
|
|
839004
839175
|
|
|
839005
839176
|
// src/commands/blockchain/testGetTrustedInputFromTxHash.ts
|
|
839006
839177
|
var import_rxjs182 = require("rxjs");
|
|
839007
|
-
var
|
|
839178
|
+
var import_invariant110 = __toESM(require("invariant"));
|
|
839008
839179
|
|
|
839009
839180
|
// ../../libs/ledger-live-common/lib-es/explorer.js
|
|
839010
839181
|
var findCurrencyExplorer2 = (currency24) => {
|
|
@@ -839028,14 +839199,14 @@ var findCurrencyExplorer2 = (currency24) => {
|
|
|
839028
839199
|
// src/commands/blockchain/testGetTrustedInputFromTxHash.ts
|
|
839029
839200
|
var command = async (transport, currencyId, hash12) => {
|
|
839030
839201
|
const currency24 = findCryptoCurrencyById(currencyId);
|
|
839031
|
-
(0,
|
|
839202
|
+
(0, import_invariant110.default)(currency24, "currency not found");
|
|
839032
839203
|
if (!currency24)
|
|
839033
839204
|
throw new Error("currency not found");
|
|
839034
839205
|
const { bitcoinLikeInfo } = currency24;
|
|
839035
839206
|
const btc = new Btc({ transport, currency: currency24?.id });
|
|
839036
|
-
(0,
|
|
839207
|
+
(0, import_invariant110.default)(currency24.family === "bitcoin" && bitcoinLikeInfo, "currency of bitcoin family only");
|
|
839037
839208
|
const ledgerExplorer = findCurrencyExplorer2(currency24);
|
|
839038
|
-
(0,
|
|
839209
|
+
(0, import_invariant110.default)(ledgerExplorer, "ledgerExplorer not found");
|
|
839039
839210
|
if (!ledgerExplorer)
|
|
839040
839211
|
throw new Error("ledgerExplorer not found");
|
|
839041
839212
|
const { endpoint: endpoint2, version: version33, id: id5 } = ledgerExplorer;
|
|
@@ -840027,7 +840198,7 @@ init_lib_es();
|
|
|
840027
840198
|
// ../../libs/ledger-live-common/lib-es/manager/api.js
|
|
840028
840199
|
init_lib_es();
|
|
840029
840200
|
init_lib_es2();
|
|
840030
|
-
var
|
|
840201
|
+
var import_invariant111 = __toESM(require("invariant"));
|
|
840031
840202
|
var import_rxjs185 = require("rxjs");
|
|
840032
840203
|
var import_operators38 = require("rxjs/operators");
|
|
840033
840204
|
var import_semver19 = __toESM(require_semver2());
|
|
@@ -840564,7 +840735,7 @@ var genuineCheck = (transport, { targetId, perso }) => {
|
|
|
840564
840735
|
var listInstalledApps = (transport, { targetId, perso }) => {
|
|
840565
840736
|
if (getEnv("MOCK")) {
|
|
840566
840737
|
const result2 = global._listInstalledApps_mock_result;
|
|
840567
|
-
(0,
|
|
840738
|
+
(0, import_invariant111.default)(result2, "using MOCK, global._listInstalledApps_mock_result must be set");
|
|
840568
840739
|
return createMockSocket(secureChannelMock(false), resultMock(result2));
|
|
840569
840740
|
}
|
|
840570
840741
|
log2("manager", "listInstalledApps", {
|
|
@@ -840585,10 +840756,10 @@ var listInstalledApps = (transport, { targetId, perso }) => {
|
|
|
840585
840756
|
return {
|
|
840586
840757
|
type: "result",
|
|
840587
840758
|
payload: [...o49.payload].map((a62) => {
|
|
840588
|
-
(0,
|
|
840759
|
+
(0, import_invariant111.default)(typeof a62 === "object" && a62, "payload array item are objects");
|
|
840589
840760
|
const { hash: hash12, name: name3, hash_code_data } = a62;
|
|
840590
|
-
(0,
|
|
840591
|
-
(0,
|
|
840761
|
+
(0, import_invariant111.default)(typeof hash12 === "string", "hash is defined");
|
|
840762
|
+
(0, import_invariant111.default)(typeof name3 === "string", "name is defined");
|
|
840592
840763
|
return {
|
|
840593
840764
|
hash: hash12,
|
|
840594
840765
|
name: name3,
|
|
@@ -841449,7 +841620,7 @@ var appUninstallAll_default = {
|
|
|
841449
841620
|
};
|
|
841450
841621
|
|
|
841451
841622
|
// src/commands/device/appsCheckAllAppVersions.ts
|
|
841452
|
-
var
|
|
841623
|
+
var import_invariant112 = __toESM(require("invariant"));
|
|
841453
841624
|
var import_fs8 = __toESM(require("fs"));
|
|
841454
841625
|
var import_rxjs200 = require("rxjs");
|
|
841455
841626
|
var import_operators44 = require("rxjs/operators");
|
|
@@ -841658,7 +841829,7 @@ var appsCheckAllAppVersions_default = {
|
|
|
841658
841829
|
Promise.all([getDeviceInfo_default(t60), api_default4.listApps()]).then(
|
|
841659
841830
|
async ([deviceInfo, applications]) => {
|
|
841660
841831
|
const { deviceModel } = t60;
|
|
841661
|
-
(0,
|
|
841832
|
+
(0, import_invariant112.default)(deviceModel, "device model mandatory");
|
|
841662
841833
|
const candidates2 = await findCandidates(deviceModel, applications, deviceInfo);
|
|
841663
841834
|
let candidatesErrors = [];
|
|
841664
841835
|
let candidatesNew = [...candidates2];
|
|
@@ -842643,7 +842814,7 @@ var deviceInfo_default = {
|
|
|
842643
842814
|
};
|
|
842644
842815
|
|
|
842645
842816
|
// src/commands/device/deviceSDKFirmwareUpdate.ts
|
|
842646
|
-
var
|
|
842817
|
+
var import_invariant113 = __toESM(require("invariant"));
|
|
842647
842818
|
var import_rxjs226 = require("rxjs");
|
|
842648
842819
|
var import_operators63 = require("rxjs/operators");
|
|
842649
842820
|
|
|
@@ -843479,7 +843650,7 @@ var deviceSDKFirmwareUpdate_default = {
|
|
|
843479
843650
|
osuVersion,
|
|
843480
843651
|
"to-my-own-risk": toMyOwnRisk,
|
|
843481
843652
|
listOSUs
|
|
843482
|
-
}) => ((0,
|
|
843653
|
+
}) => ((0, import_invariant113.default)(!osuVersion || toMyOwnRisk, "--to-my-own-risk is required: " + disclaimer), listOSUs ? (0, import_rxjs226.from)(listFirmwareOSU()).pipe((0, import_operators63.mergeMap)((d52) => (0, import_rxjs226.from)(d52.map((d53) => d53.name)))) : withDevice(device2 || "")((t60) => (0, import_rxjs226.from)(getDeviceInfo_default(t60))).pipe(
|
|
843483
843654
|
(0, import_operators63.mergeMap)(() => {
|
|
843484
843655
|
return (0, import_rxjs226.concat)(
|
|
843485
843656
|
(0, import_rxjs226.of)(`Attempting to install firmware`),
|
|
@@ -844106,7 +844277,7 @@ var firmwareRepair_default = {
|
|
|
844106
844277
|
};
|
|
844107
844278
|
|
|
844108
844279
|
// src/commands/device/firmwareUpdate.ts
|
|
844109
|
-
var
|
|
844280
|
+
var import_invariant114 = __toESM(require("invariant"));
|
|
844110
844281
|
var import_rxjs241 = require("rxjs");
|
|
844111
844282
|
var import_operators76 = require("rxjs/operators");
|
|
844112
844283
|
init_lib_es();
|
|
@@ -844323,7 +844494,7 @@ var firmwareUpdate_default = {
|
|
|
844323
844494
|
osuVersion,
|
|
844324
844495
|
"to-my-own-risk": toMyOwnRisk,
|
|
844325
844496
|
listOSUs
|
|
844326
|
-
}) => ((0,
|
|
844497
|
+
}) => ((0, import_invariant114.default)(!osuVersion || toMyOwnRisk, "--to-my-own-risk is required: " + disclaimer2), listOSUs ? (0, import_rxjs241.from)(listFirmwareOSU2()).pipe((0, import_operators76.mergeMap)((d52) => (0, import_rxjs241.from)(d52.map((d53) => d53.name)))) : withDevice(device2 || "")((t60) => (0, import_rxjs241.from)(getDeviceInfo_default(t60))).pipe(
|
|
844327
844498
|
(0, import_operators76.mergeMap)(
|
|
844328
844499
|
osuVersion ? (deviceInfo) => customGetLatestFirmwareForDevice(deviceInfo, osuVersion) : (deviceInfo) => getLatestFirmwareForDeviceUseCase(deviceInfo)
|
|
844329
844500
|
),
|
|
@@ -845009,7 +845180,7 @@ var repl_default = {
|
|
|
845009
845180
|
|
|
845010
845181
|
// src/commands/device/speculosList.ts
|
|
845011
845182
|
var import_rxjs252 = require("rxjs");
|
|
845012
|
-
var
|
|
845183
|
+
var import_invariant115 = __toESM(require("invariant"));
|
|
845013
845184
|
var import_operators83 = require("rxjs/operators");
|
|
845014
845185
|
var speculosList_default = {
|
|
845015
845186
|
description: "list apps available for speculos",
|
|
@@ -845017,7 +845188,7 @@ var speculosList_default = {
|
|
|
845017
845188
|
job: () => {
|
|
845018
845189
|
async function main2() {
|
|
845019
845190
|
const coinapps = getEnv("COINAPPS");
|
|
845020
|
-
(0,
|
|
845191
|
+
(0, import_invariant115.default)(coinapps, "COINAPPS is not set");
|
|
845021
845192
|
const candidates2 = await listAppCandidates(coinapps);
|
|
845022
845193
|
return candidates2.map(formatAppCandidate);
|
|
845023
845194
|
}
|
|
@@ -845028,7 +845199,7 @@ var speculosList_default = {
|
|
|
845028
845199
|
// src/commands/live/balanceHistory.ts
|
|
845029
845200
|
var import_bignumber397 = require("bignumber.js");
|
|
845030
845201
|
var import_asciichart = require("asciichart");
|
|
845031
|
-
var
|
|
845202
|
+
var import_invariant116 = __toESM(require("invariant"));
|
|
845032
845203
|
var import_operators84 = require("rxjs/operators");
|
|
845033
845204
|
var histoFormatters = {
|
|
845034
845205
|
default: (histo, account3) => histo.map(
|
|
@@ -845060,7 +845231,7 @@ var histoFormatters = {
|
|
|
845060
845231
|
};
|
|
845061
845232
|
function asPortfolioRange(period) {
|
|
845062
845233
|
const ranges2 = getRanges();
|
|
845063
|
-
(0,
|
|
845234
|
+
(0, import_invariant116.default)(ranges2.includes(period), "invalid period. valid values are %s", ranges2.join(" | "));
|
|
845064
845235
|
return period;
|
|
845065
845236
|
}
|
|
845066
845237
|
var balanceHistory_default = {
|
|
@@ -845096,7 +845267,7 @@ var balanceHistory_default = {
|
|
|
845096
845267
|
var import_uniq3 = __toESM(require("lodash/uniq"));
|
|
845097
845268
|
var import_bignumber398 = require("bignumber.js");
|
|
845098
845269
|
var import_asciichart2 = require("asciichart");
|
|
845099
|
-
var
|
|
845270
|
+
var import_invariant117 = __toESM(require("invariant"));
|
|
845100
845271
|
var import_rxjs253 = require("rxjs");
|
|
845101
845272
|
var histoFormatters2 = {
|
|
845102
845273
|
stats: (histo, currency24, countervalue) => (currency24.ticker + " to " + countervalue.ticker).padEnd(12) + " availability=" + (100 * histo.filter((h28) => h28.value).length / histo.length).toFixed(0) + "%",
|
|
@@ -845198,7 +845369,7 @@ var countervalues_default = {
|
|
|
845198
845369
|
job: (opts) => import_rxjs253.Observable.create((o49) => {
|
|
845199
845370
|
async function f42() {
|
|
845200
845371
|
const currencies2 = await getCurrencies(opts);
|
|
845201
|
-
(0,
|
|
845372
|
+
(0, import_invariant117.default)(currencies2, "no currency found");
|
|
845202
845373
|
const countervalues = getCountervalues(opts);
|
|
845203
845374
|
const format6 = histoFormatters2[opts.format || "default"];
|
|
845204
845375
|
const startDate = getStartDate(opts) || /* @__PURE__ */ new Date();
|
|
@@ -845253,7 +845424,7 @@ var countervalues_default = {
|
|
|
845253
845424
|
};
|
|
845254
845425
|
function asPortfolioRange2(period) {
|
|
845255
845426
|
const ranges2 = getRanges();
|
|
845256
|
-
(0,
|
|
845427
|
+
(0, import_invariant117.default)(ranges2.includes(period), "invalid period. valid values are %s", ranges2.join(" | "));
|
|
845257
845428
|
return period;
|
|
845258
845429
|
}
|
|
845259
845430
|
async function getCurrencies(opts) {
|
|
@@ -845277,7 +845448,7 @@ function getStartDate(opts) {
|
|
|
845277
845448
|
if (!opts.startDate || opts.latest)
|
|
845278
845449
|
return null;
|
|
845279
845450
|
const date2 = new Date(opts.startDate);
|
|
845280
|
-
(0,
|
|
845451
|
+
(0, import_invariant117.default)(!isNaN(date2.valueOf()), "invalid startDate");
|
|
845281
845452
|
return date2;
|
|
845282
845453
|
}
|
|
845283
845454
|
function getDatesWithOpts(opts) {
|
|
@@ -848000,7 +848171,7 @@ var SDK = class {
|
|
|
848000
848171
|
}
|
|
848001
848172
|
}
|
|
848002
848173
|
}
|
|
848003
|
-
|
|
848174
|
+
invariant121(trustchainRootId, "trustchainRootId should be defined");
|
|
848004
848175
|
log2("trustchain", "getOrCreateTrustchain rootId=" + trustchainRootId);
|
|
848005
848176
|
let { streamTree } = await withJwt((jwt) => this.fetchTrustchain(jwt, trustchainRootId));
|
|
848006
848177
|
const path4 = streamTree.getApplicationRootPath(this.context.applicationId);
|
|
@@ -848049,14 +848220,14 @@ var SDK = class {
|
|
|
848049
848220
|
this.invalidateJwt();
|
|
848050
848221
|
const withJwt = (job2) => this.hwDeviceProvider.withJwt(deviceId, job2, "cache", callbacks);
|
|
848051
848222
|
const withHw = (job2) => this.hwDeviceProvider.withHw(deviceId, job2, callbacks);
|
|
848052
|
-
|
|
848223
|
+
invariant121(memberCredentials.pubkey !== member2.id, "removeMember must not be used to remove the current member.");
|
|
848053
848224
|
const afterRotation = await this.lifecycle?.onTrustchainRotation(this, trustchain, memberCredentials);
|
|
848054
848225
|
const applicationId = this.context.applicationId;
|
|
848055
848226
|
const trustchainId = trustchain.rootId;
|
|
848056
848227
|
let { resolved, streamTree, applicationRootPath } = await withJwt((jwt) => this.fetchTrustchainAndResolve(jwt, trustchainId, applicationId));
|
|
848057
848228
|
const members7 = resolved.getMembersData();
|
|
848058
848229
|
const withoutMember = members7.filter((m49) => m49.id !== member2.id);
|
|
848059
|
-
|
|
848230
|
+
invariant121(withoutMember.length < members7.length, "member not found");
|
|
848060
848231
|
const withoutMemberOrMe = withoutMember.filter((m49) => m49.id !== memberCredentials.pubkey);
|
|
848061
848232
|
const softwareDevice = getSoftwareDevice(memberCredentials);
|
|
848062
848233
|
const newPath = streamTree.getApplicationRootPath(applicationId, 1);
|
|
@@ -848117,7 +848288,7 @@ var SDK = class {
|
|
|
848117
848288
|
const { streamTree } = await this.fetchTrustchain(jwt, trustchainId);
|
|
848118
848289
|
const applicationRootPath = streamTree.getApplicationRootPath(applicationId);
|
|
848119
848290
|
const applicationNode = streamTree.getChild(applicationRootPath);
|
|
848120
|
-
|
|
848291
|
+
invariant121(applicationNode, "could not find the application stream.");
|
|
848121
848292
|
const resolved = await applicationNode.resolve();
|
|
848122
848293
|
return { resolved, streamTree, applicationRootPath, applicationNode };
|
|
848123
848294
|
}
|
|
@@ -848150,7 +848321,7 @@ var SDK = class {
|
|
|
848150
848321
|
const isNewDerivation = !streamTree.getChild(path4);
|
|
848151
848322
|
streamTree = await withDevice2((device2) => streamTree.share(path4, device2, crypto35.from_hex(member2.id), member2.name, member2.permissions));
|
|
848152
848323
|
const child = streamTree.getChild(path4);
|
|
848153
|
-
|
|
848324
|
+
invariant121(child, "StreamTree.share failed to create the child stream.");
|
|
848154
848325
|
await child.resolve();
|
|
848155
848326
|
if (isNewDerivation) {
|
|
848156
848327
|
const commandStream = CommandStreamEncoder.encode(child.blocks);
|
|
@@ -848168,7 +848339,7 @@ var SDK = class {
|
|
|
848168
848339
|
async closeStream(streamTree, path4, trustchainId, withJwt, withDevice2) {
|
|
848169
848340
|
streamTree = await withDevice2((device2) => streamTree.close(path4, device2));
|
|
848170
848341
|
const child = streamTree.getChild(path4);
|
|
848171
|
-
|
|
848342
|
+
invariant121(child, "StreamTree.close failed to create the child stream.");
|
|
848172
848343
|
await child.resolve();
|
|
848173
848344
|
const commandStream = CommandStreamEncoder.encode([child.blocks[child.blocks.length - 1]]);
|
|
848174
848345
|
const request3 = {
|
|
@@ -848218,7 +848389,7 @@ function liveAuthentication(rootId) {
|
|
|
848218
848389
|
function credentialForPubKey(publicKey3) {
|
|
848219
848390
|
return { version: 0, curveId: 33, signAlgorithm: 1, publicKey: publicKey3 };
|
|
848220
848391
|
}
|
|
848221
|
-
function
|
|
848392
|
+
function invariant121(condition, message2) {
|
|
848222
848393
|
if (!condition) {
|
|
848223
848394
|
throw new Error(message2);
|
|
848224
848395
|
}
|
|
@@ -849349,12 +849520,12 @@ var liveData_default = {
|
|
|
849349
849520
|
// src/commands/live/portfolio.ts
|
|
849350
849521
|
var import_bignumber400 = require("bignumber.js");
|
|
849351
849522
|
var import_asciichart3 = require("asciichart");
|
|
849352
|
-
var
|
|
849523
|
+
var import_invariant118 = __toESM(require("invariant"));
|
|
849353
849524
|
var import_rxjs260 = require("rxjs");
|
|
849354
849525
|
var import_operators88 = require("rxjs/operators");
|
|
849355
849526
|
function asPortfolioRange3(period) {
|
|
849356
849527
|
const ranges2 = getRanges();
|
|
849357
|
-
(0,
|
|
849528
|
+
(0, import_invariant118.default)(ranges2.includes(period), "invalid period. valid values are %s", ranges2.join(" | "));
|
|
849358
849529
|
return period;
|
|
849359
849530
|
}
|
|
849360
849531
|
var portfolio_default = {
|
|
@@ -849381,7 +849552,7 @@ var portfolio_default = {
|
|
|
849381
849552
|
],
|
|
849382
849553
|
job: (opts) => {
|
|
849383
849554
|
const countervalue = findCurrencyByTicker(opts.countervalue || "USD");
|
|
849384
|
-
(0,
|
|
849555
|
+
(0, import_invariant118.default)(countervalue, "currency not found with ticker=" + opts.countervalue);
|
|
849385
849556
|
return scan3(opts).pipe(
|
|
849386
849557
|
(0, import_operators88.reduce)((all8, a62) => all8.concat(a62), []),
|
|
849387
849558
|
(0, import_operators88.concatMap)(
|
|
@@ -849705,7 +849876,7 @@ var ErrorStatus = {
|
|
|
849705
849876
|
|
|
849706
849877
|
// ../../libs/ledgerjs/packages/hw-app-exchange/lib-es/Exchange.js
|
|
849707
849878
|
init_lib_es();
|
|
849708
|
-
var
|
|
849879
|
+
var import_invariant119 = __toESM(require("invariant"));
|
|
849709
849880
|
var ExchangeTypeNg = [
|
|
849710
849881
|
3,
|
|
849711
849882
|
4,
|
|
@@ -849732,7 +849903,7 @@ var P2_NONE = 0 << 4;
|
|
|
849732
849903
|
var P2_EXTEND2 = 1 << 4;
|
|
849733
849904
|
var P2_MORE5 = 2 << 4;
|
|
849734
849905
|
var maybeThrowProtocolError = (result2) => {
|
|
849735
|
-
(0,
|
|
849906
|
+
(0, import_invariant119.default)(result2.length >= 2, "ExchangeTransport: Unexpected result length");
|
|
849736
849907
|
const resultCode = result2.readUInt16BE(result2.length - 2);
|
|
849737
849908
|
if (resultCode !== OkStatus) {
|
|
849738
849909
|
throw new TransportStatusError(resultCode);
|
|
@@ -849843,9 +850014,9 @@ var Exchange = class {
|
|
|
849843
850014
|
maybeThrowProtocolError(result2);
|
|
849844
850015
|
}
|
|
849845
850016
|
async validatePayoutOrAsset(payoutCurrencyConfig, currencyConfigSignature, addressParameters) {
|
|
849846
|
-
(0,
|
|
849847
|
-
(0,
|
|
849848
|
-
(0,
|
|
850017
|
+
(0, import_invariant119.default)(payoutCurrencyConfig.length <= 255, "Currency config is too big");
|
|
850018
|
+
(0, import_invariant119.default)(addressParameters.length <= 255, "Address parameter is too big.");
|
|
850019
|
+
(0, import_invariant119.default)(currencyConfigSignature.length >= 67 && currencyConfigSignature.length <= 73, "Signature should be DER serialized and have length in [67, 73] bytes.");
|
|
849849
850020
|
const bufferToSend = Buffer.concat([
|
|
849850
850021
|
Buffer.from([payoutCurrencyConfig.length]),
|
|
849851
850022
|
payoutCurrencyConfig,
|
|
@@ -849857,9 +850028,9 @@ var Exchange = class {
|
|
|
849857
850028
|
maybeThrowProtocolError(result2);
|
|
849858
850029
|
}
|
|
849859
850030
|
async checkRefundAddress(refundCurrencyConfig, currencyConfigSignature, addressParameters) {
|
|
849860
|
-
(0,
|
|
849861
|
-
(0,
|
|
849862
|
-
(0,
|
|
850031
|
+
(0, import_invariant119.default)(refundCurrencyConfig.length <= 255, "Currency config is too big");
|
|
850032
|
+
(0, import_invariant119.default)(addressParameters.length <= 255, "Address parameter is too big.");
|
|
850033
|
+
(0, import_invariant119.default)(currencyConfigSignature.length >= 67 && currencyConfigSignature.length <= 73, "Signature should be DER serialized and have length in [67, 73] bytes.");
|
|
849863
850034
|
const bufferToSend = Buffer.concat([
|
|
849864
850035
|
Buffer.from([refundCurrencyConfig.length]),
|
|
849865
850036
|
refundCurrencyConfig,
|
|
@@ -850085,7 +850256,7 @@ var lib_es_default4 = Exchange;
|
|
|
850085
850256
|
// ../../libs/ledger-live-common/lib-es/exchange/swap/initSwap.js
|
|
850086
850257
|
init_lib_es2();
|
|
850087
850258
|
var import_bignumber402 = require("bignumber.js");
|
|
850088
|
-
var
|
|
850259
|
+
var import_invariant120 = __toESM(require("invariant"));
|
|
850089
850260
|
var import_rxjs265 = require("rxjs");
|
|
850090
850261
|
var import_secp256k116 = __toESM(require_secp256k12());
|
|
850091
850262
|
|
|
@@ -850504,15 +850675,15 @@ var initSwap = (input) => {
|
|
|
850504
850675
|
transaction = accountBridge14.updateTransaction(transaction, {
|
|
850505
850676
|
tag: new import_bignumber402.BigNumber(swapResult.payinExtraId).toNumber()
|
|
850506
850677
|
});
|
|
850507
|
-
(0,
|
|
850678
|
+
(0, import_invariant120.default)(transaction.tag, "Refusing to swap xrp without a destination tag");
|
|
850508
850679
|
} else if (refundCurrency.id === "stellar") {
|
|
850509
850680
|
transaction = accountBridge14.updateTransaction(transaction, {
|
|
850510
850681
|
memoValue: swapResult.payinExtraId,
|
|
850511
850682
|
memoType: "MEMO_TEXT"
|
|
850512
850683
|
});
|
|
850513
|
-
(0,
|
|
850684
|
+
(0, import_invariant120.default)(transaction.memoValue, "Refusing to swap xlm without a destination memo");
|
|
850514
850685
|
}
|
|
850515
|
-
(0,
|
|
850686
|
+
(0, import_invariant120.default)(transaction.recipient !== getAbandonSeedAddress(refundCurrency.type === "TokenCurrency" ? refundCurrency.parentCurrency.id : refundCurrency.id), "Recipient address should never be the abandonseed address");
|
|
850516
850687
|
transaction = await accountBridge14.prepareTransaction(refundAccount, transaction);
|
|
850517
850688
|
if (unsubscribed)
|
|
850518
850689
|
return;
|
|
@@ -850540,7 +850711,7 @@ var initSwap = (input) => {
|
|
|
850540
850711
|
if (unsubscribed)
|
|
850541
850712
|
return;
|
|
850542
850713
|
const mainPayoutCurrency = getAccountCurrency(payoutAccount);
|
|
850543
|
-
(0,
|
|
850714
|
+
(0, import_invariant120.default)(mainPayoutCurrency.type === "CryptoCurrency", "This should be a cryptocurrency");
|
|
850544
850715
|
if (mainPayoutCurrency.type !== "CryptoCurrency") {
|
|
850545
850716
|
throw new Error("This should be a cryptocurrency");
|
|
850546
850717
|
}
|
|
@@ -850565,7 +850736,7 @@ var initSwap = (input) => {
|
|
|
850565
850736
|
if (unsubscribed)
|
|
850566
850737
|
return;
|
|
850567
850738
|
const mainRefundCurrency = getAccountCurrency(refundAccount);
|
|
850568
|
-
(0,
|
|
850739
|
+
(0, import_invariant120.default)(mainRefundCurrency.type === "CryptoCurrency", "This should be a cryptocurrency");
|
|
850569
850740
|
if (mainRefundCurrency.type !== "CryptoCurrency") {
|
|
850570
850741
|
throw new Error("This should be a cryptocurrency");
|
|
850571
850742
|
}
|
|
@@ -850792,11 +850963,11 @@ var getSwapAPIError = (errorCode, errorMessage) => {
|
|
|
850792
850963
|
};
|
|
850793
850964
|
|
|
850794
850965
|
// src/commands/ptx/swap.ts
|
|
850795
|
-
var
|
|
850966
|
+
var import_invariant121 = __toESM(require("invariant"));
|
|
850796
850967
|
var exec6 = async (opts) => {
|
|
850797
850968
|
const { amount, useAllAmount, tokenId, useFloat, deviceId = "" } = opts;
|
|
850798
|
-
(0,
|
|
850799
|
-
(0,
|
|
850969
|
+
(0, import_invariant121.default)(amount || useAllAmount, `\u2716 amount in satoshis is needed or --useAllAmount `);
|
|
850970
|
+
(0, import_invariant121.default)(opts._unknown, `\u2716 second account information is missing`);
|
|
850800
850971
|
const secondAccountOpts = (0, import_command_line_args.default)(
|
|
850801
850972
|
[
|
|
850802
850973
|
...scanCommonOpts,
|
|
@@ -850817,13 +850988,13 @@ var exec6 = async (opts) => {
|
|
|
850817
850988
|
let fromAccount = await (0, import_rxjs266.firstValueFrom)(
|
|
850818
850989
|
scan3(opts).pipe((0, import_operators90.take)(1))
|
|
850819
850990
|
);
|
|
850820
|
-
(0,
|
|
850991
|
+
(0, import_invariant121.default)(fromAccount, `\u2716 No account found, is the right currency app open?`);
|
|
850821
850992
|
if (!fromAccount) {
|
|
850822
850993
|
throw new Error(`\u2716 No account found, is the right currency app open?`);
|
|
850823
850994
|
}
|
|
850824
850995
|
if (tokenId) {
|
|
850825
850996
|
const token = findTokenById(tokenId);
|
|
850826
|
-
(0,
|
|
850997
|
+
(0, import_invariant121.default)(token, `\u2716 No token currency found with id ${tokenId}`);
|
|
850827
850998
|
if (!token)
|
|
850828
850999
|
throw new Error(`\u2716 No token currency found with id ${tokenId}`);
|
|
850829
851000
|
const subAccounts = accountWithMandatoryTokens(fromAccount, [token]).subAccounts || [];
|
|
@@ -850833,7 +851004,7 @@ var exec6 = async (opts) => {
|
|
|
850833
851004
|
});
|
|
850834
851005
|
fromParentAccount = fromAccount;
|
|
850835
851006
|
fromAccount = subAccount;
|
|
850836
|
-
(0,
|
|
851007
|
+
(0, import_invariant121.default)(fromAccount, `\u2716 No account found, is the right currency app open?`);
|
|
850837
851008
|
if (!fromAccount) {
|
|
850838
851009
|
throw new Error(`\u2716 No account found, is the right currency app open?`);
|
|
850839
851010
|
}
|
|
@@ -850852,7 +851023,7 @@ var exec6 = async (opts) => {
|
|
|
850852
851023
|
}
|
|
850853
851024
|
);
|
|
850854
851025
|
console.log(" :balance: ", fromAccount.spendableBalance.toString(), ` [ ${formattedAmount} ]`);
|
|
850855
|
-
(0,
|
|
851026
|
+
(0, import_invariant121.default)(fromAccount.balance.gte(new import_bignumber404.BigNumber(amount)), `\u2716 Not enough balance`);
|
|
850856
851027
|
console.log("\u2022 Open the destination currency app");
|
|
850857
851028
|
await delay(8e3);
|
|
850858
851029
|
let toParentAccount = null;
|
|
@@ -850875,9 +851046,9 @@ var exec6 = async (opts) => {
|
|
|
850875
851046
|
});
|
|
850876
851047
|
toParentAccount = toAccount;
|
|
850877
851048
|
toAccount = subAccount;
|
|
850878
|
-
(0,
|
|
851049
|
+
(0, import_invariant121.default)(fromAccount, `\u2716 No account found`);
|
|
850879
851050
|
}
|
|
850880
|
-
(0,
|
|
851051
|
+
(0, import_invariant121.default)(toAccount, `\u2716 No account found`);
|
|
850881
851052
|
if (!toAccount)
|
|
850882
851053
|
throw new Error(`\u2716 No account found`);
|
|
850883
851054
|
if (toParentAccount) {
|
|
@@ -850926,7 +851097,7 @@ var exec6 = async (opts) => {
|
|
|
850926
851097
|
}
|
|
850927
851098
|
return false;
|
|
850928
851099
|
});
|
|
850929
|
-
(0,
|
|
851100
|
+
(0, import_invariant121.default)(exchangeRate, `\u2716 No valid rate available`);
|
|
850930
851101
|
console.log(`Using first ${useFloat ? "float" : "fixed"} rate:
|
|
850931
851102
|
`, exchangeRate);
|
|
850932
851103
|
console.log({
|
|
@@ -850949,7 +851120,7 @@ var exec6 = async (opts) => {
|
|
|
850949
851120
|
break;
|
|
850950
851121
|
case "init-swap-error":
|
|
850951
851122
|
console.log(e38);
|
|
850952
|
-
(0,
|
|
851123
|
+
(0, import_invariant121.default)(false, "Something went wrong confirming the swap");
|
|
850953
851124
|
break;
|
|
850954
851125
|
case "init-swap-result":
|
|
850955
851126
|
console.log(e38);
|