@ledgerhq/live-cli 24.18.2 → 24.18.3-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
|
@@ -530282,7 +530282,7 @@ var require_package8 = __commonJS({
|
|
|
530282
530282
|
module2.exports = {
|
|
530283
530283
|
name: "@ledgerhq/live-common",
|
|
530284
530284
|
description: "Common ground for the Ledger Live apps",
|
|
530285
|
-
version: "34.
|
|
530285
|
+
version: "34.34.0-next.0",
|
|
530286
530286
|
repository: {
|
|
530287
530287
|
type: "git",
|
|
530288
530288
|
url: "https://github.com/LedgerHQ/ledger-live.git"
|
|
@@ -537083,7 +537083,7 @@ var require_package9 = __commonJS({
|
|
|
537083
537083
|
"package.json"(exports2, module2) {
|
|
537084
537084
|
module2.exports = {
|
|
537085
537085
|
name: "@ledgerhq/live-cli",
|
|
537086
|
-
version: "24.18.
|
|
537086
|
+
version: "24.18.3-next.0",
|
|
537087
537087
|
description: "ledger-live CLI version",
|
|
537088
537088
|
repository: {
|
|
537089
537089
|
type: "git",
|
|
@@ -547470,6 +547470,9 @@ var filecoin_erc20_default2 = filecoin_erc20_default;
|
|
|
547470
547470
|
// ../../libs/ledgerjs/packages/cryptoassets/lib-es/data/spl.json
|
|
547471
547471
|
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]];
|
|
547472
547472
|
|
|
547473
|
+
// ../../libs/ledgerjs/packages/cryptoassets/lib-es/data/spl-hash.json
|
|
547474
|
+
var spl_hash_default = 'W/"082078d766333b5edee7a44d13aba40837ce6bdb"';
|
|
547475
|
+
|
|
547473
547476
|
// ../../libs/ledgerjs/packages/cryptoassets/lib-es/data/spl.js
|
|
547474
547477
|
var spl_default2 = spl_default;
|
|
547475
547478
|
|
|
@@ -558505,7 +558508,7 @@ var value = "cli/0.0.0";
|
|
|
558505
558508
|
setEnv("LEDGER_CLIENT_VERSION", value);
|
|
558506
558509
|
|
|
558507
558510
|
// src/live-common-setup.ts
|
|
558508
|
-
var
|
|
558511
|
+
var import_invariant68 = __toESM(require("invariant"));
|
|
558509
558512
|
|
|
558510
558513
|
// ../../libs/ledgerjs/packages/hw-transport-mocker/lib-es/RecordStore.js
|
|
558511
558514
|
function RecordStoreInvalidSynthax(message2) {
|
|
@@ -559225,7 +559228,7 @@ var disconnect = (deviceId) => {
|
|
|
559225
559228
|
|
|
559226
559229
|
// ../../libs/ledger-live-common/lib-es/load/speculos.js
|
|
559227
559230
|
var import_sample = __toESM(require("lodash/sample"));
|
|
559228
|
-
var
|
|
559231
|
+
var import_invariant67 = __toESM(require("invariant"));
|
|
559229
559232
|
var import_path2 = __toESM(require("path"));
|
|
559230
559233
|
var import_semver16 = __toESM(require_semver2());
|
|
559231
559234
|
var import_fs2 = require("fs");
|
|
@@ -560376,7 +560379,7 @@ var getDefaultAccountName = (account3) => {
|
|
|
560376
560379
|
|
|
560377
560380
|
// ../../libs/ledger-live-common/lib-es/account/formatters.js
|
|
560378
560381
|
var import_bignumber340 = require("bignumber.js");
|
|
560379
|
-
var
|
|
560382
|
+
var import_invariant66 = __toESM(require("invariant"));
|
|
560380
560383
|
|
|
560381
560384
|
// ../../libs/ledger-live-common/lib-es/account/serialization.js
|
|
560382
560385
|
var import_memoize2 = __toESM(require("lodash/memoize"));
|
|
@@ -581521,11 +581524,11 @@ function wrapConsoleMethod(name3) {
|
|
|
581521
581524
|
}
|
|
581522
581525
|
};
|
|
581523
581526
|
}
|
|
581524
|
-
(function(
|
|
581525
|
-
|
|
581526
|
-
|
|
581527
|
-
|
|
581528
|
-
|
|
581527
|
+
(function(invariant126) {
|
|
581528
|
+
invariant126.debug = wrapConsoleMethod("debug");
|
|
581529
|
+
invariant126.log = wrapConsoleMethod("log");
|
|
581530
|
+
invariant126.warn = wrapConsoleMethod("warn");
|
|
581531
|
+
invariant126.error = wrapConsoleMethod("error");
|
|
581529
581532
|
})(invariant9 || (invariant9 = {}));
|
|
581530
581533
|
function setVerbosity(level2) {
|
|
581531
581534
|
var old = verbosityLevels[verbosityLevel];
|
|
@@ -623120,6 +623123,10 @@ var getLastERC1155Operations = async (currency24, address4, accountId2, fromBloc
|
|
|
623120
623123
|
return Object.values(opsByHash).map((events2) => events2.map((event, index) => etherscanERC1155EventToOperations(accountId2, event, index))).flat(2);
|
|
623121
623124
|
};
|
|
623122
623125
|
var getLastNftOperations = async (currency24, address4, accountId2, fromBlock, toBlock2) => {
|
|
623126
|
+
const config4 = getCoinConfig(currency24).info;
|
|
623127
|
+
if (!config4.showNfts) {
|
|
623128
|
+
return [];
|
|
623129
|
+
}
|
|
623123
623130
|
const erc721Ops = await getLastERC721Operations(currency24, address4, accountId2, fromBlock, toBlock2);
|
|
623124
623131
|
const erc1155Ops = await getLastERC1155Operations(currency24, address4, accountId2, fromBlock, toBlock2);
|
|
623125
623132
|
return [...erc721Ops, ...erc1155Ops].sort(
|
|
@@ -623228,8 +623235,8 @@ var getLastOperations2 = async (currency24, address4, accountId2, fromBlock) =>
|
|
|
623228
623235
|
ledgerExplorerOps.forEach((ledgerOp) => {
|
|
623229
623236
|
const coinOps = ledgerOperationToOperations(accountId2, ledgerOp);
|
|
623230
623237
|
const erc20Ops = ledgerOp.transfer_events.flatMap((event, index) => ledgerERC20EventToOperations(coinOps[0], event, index));
|
|
623231
|
-
const erc721Ops = isNFTActive(currency24) ? ledgerOp.erc721_transfer_events.flatMap((event, index) => ledgerERC721EventToOperations(coinOps[0], event, index)) : [];
|
|
623232
|
-
const erc1155Ops = isNFTActive(currency24) ? ledgerOp.erc1155_transfer_events.flatMap((event, index) => ledgerERC1155EventToOperations(coinOps[0], event, index)) : [];
|
|
623238
|
+
const erc721Ops = isNFTActive(currency24) && config4.showNfts ? ledgerOp.erc721_transfer_events.flatMap((event, index) => ledgerERC721EventToOperations(coinOps[0], event, index)) : [];
|
|
623239
|
+
const erc1155Ops = isNFTActive(currency24) && config4.showNfts ? ledgerOp.erc1155_transfer_events.flatMap((event, index) => ledgerERC1155EventToOperations(coinOps[0], event, index)) : [];
|
|
623233
623240
|
const internalOps = ledgerOp.actions.flatMap((action, index) => ledgerInternalTransactionToOperations(coinOps[0], action, index));
|
|
623234
623241
|
lastCoinOperations.push(...coinOps);
|
|
623235
623242
|
lastTokenOperations.push(...erc20Ops);
|
|
@@ -773218,6 +773225,14 @@ function isStakeLockUpInForce({ lockup: lockup2, custodianAddress, epoch }) {
|
|
|
773218
773225
|
}
|
|
773219
773226
|
return lockup2.unixTimestamp > Date.now() / 1e3 || lockup2.epoch > epoch;
|
|
773220
773227
|
}
|
|
773228
|
+
var CALHashByChainIdMap2 = /* @__PURE__ */ new Map();
|
|
773229
|
+
var getCALHash2 = (currency24) => {
|
|
773230
|
+
return CALHashByChainIdMap2.get(currency24) || "";
|
|
773231
|
+
};
|
|
773232
|
+
var setCALHash2 = (currency24, hash12) => {
|
|
773233
|
+
CALHashByChainIdMap2.set(currency24, hash12);
|
|
773234
|
+
return CALHashByChainIdMap2.get(currency24);
|
|
773235
|
+
};
|
|
773221
773236
|
|
|
773222
773237
|
// ../../libs/coin-modules/coin-solana/lib-es/estimateMaxSpendable.js
|
|
773223
773238
|
var import_bignumber230 = __toESM(require("bignumber.js"));
|
|
@@ -773578,7 +773593,7 @@ var estimateFeeAndSpendable = async (api8, account3, transaction) => {
|
|
|
773578
773593
|
function isTransferTx(tx) {
|
|
773579
773594
|
return !!tx && (tx.model.kind === "token.transfer" || tx.model.kind === "transfer");
|
|
773580
773595
|
}
|
|
773581
|
-
async function
|
|
773596
|
+
async function estimateTokenMaxSpendable(api8, account3, tx) {
|
|
773582
773597
|
if (isTransferTx(tx) && account3.extensions?.transferFee && account3.extensions.transferFee.feeBps > 0) {
|
|
773583
773598
|
const mint = await getMaybeTokenMint(account3.token.contractAddress, api8);
|
|
773584
773599
|
if (!mint || mint instanceof Error)
|
|
@@ -773602,7 +773617,7 @@ var estimateMaxSpendableWithAPI = async ({ account: account3, parentAccount, tra
|
|
|
773602
773617
|
case "Account":
|
|
773603
773618
|
return (await estimateFeeAndSpendable(api8, mainAccount, transaction)).spendable;
|
|
773604
773619
|
case "TokenAccount":
|
|
773605
|
-
return
|
|
773620
|
+
return estimateTokenMaxSpendable(api8, account3, transaction);
|
|
773606
773621
|
}
|
|
773607
773622
|
};
|
|
773608
773623
|
|
|
@@ -773760,7 +773775,7 @@ var deriveTokenTransferCommandDescriptor = async (mainAccount, tx, model, api8)
|
|
|
773760
773775
|
if (!tx.useAllAmount && tx.amount.lte(0)) {
|
|
773761
773776
|
errors.amount = new AmountRequired();
|
|
773762
773777
|
}
|
|
773763
|
-
const spendableBalance = await
|
|
773778
|
+
const spendableBalance = await estimateTokenMaxSpendable(api8, tokenAccount, tx);
|
|
773764
773779
|
const txAmount = tx.useAllAmount ? spendableBalance.toNumber() : tx.amount.toNumber();
|
|
773765
773780
|
if (!errors.amount && txAmount > spendableBalance.toNumber()) {
|
|
773766
773781
|
errors.amount = new NotEnoughBalance();
|
|
@@ -774328,13 +774343,15 @@ function isValidStakeCreateAccountCommandDescriptor(commandDescriptor, amount) {
|
|
|
774328
774343
|
|
|
774329
774344
|
// ../../libs/coin-modules/coin-solana/lib-es/preload.js
|
|
774330
774345
|
var import_fp3 = require("lodash/fp");
|
|
774346
|
+
init_lib_es2();
|
|
774331
774347
|
|
|
774332
774348
|
// ../../libs/coin-modules/coin-solana/lib-es/preload-data.js
|
|
774333
774349
|
var import_rxjs136 = require("rxjs");
|
|
774334
774350
|
var initialData = {
|
|
774335
774351
|
version: "1",
|
|
774336
774352
|
validatorsWithMeta: [],
|
|
774337
|
-
validators: []
|
|
774353
|
+
validators: [],
|
|
774354
|
+
splTokens: null
|
|
774338
774355
|
};
|
|
774339
774356
|
var dataByCurrency = /* @__PURE__ */ new Map([
|
|
774340
774357
|
["solana", initialData],
|
|
@@ -774400,14 +774417,47 @@ async function getValidators3(cluster) {
|
|
|
774400
774417
|
|
|
774401
774418
|
// ../../libs/coin-modules/coin-solana/lib-es/preload.js
|
|
774402
774419
|
var PRELOAD_MAX_AGE5 = 15 * 60 * 1e3;
|
|
774420
|
+
var fetchSPLTokens = async (currency24) => {
|
|
774421
|
+
const latestCALHash = getCALHash2(currency24);
|
|
774422
|
+
const calHash = latestCALHash || spl_hash_default;
|
|
774423
|
+
try {
|
|
774424
|
+
const { tokens: tokens8, hash: hash12 } = await fetchTokensFromCALService({ blockchain_name: "solana" }, ["id", "network", "name", "ticker", "contract_address", "decimals"], calHash);
|
|
774425
|
+
const splTokens = tokens8.map((token) => [
|
|
774426
|
+
token.id,
|
|
774427
|
+
token.network,
|
|
774428
|
+
token.name,
|
|
774429
|
+
token.ticker,
|
|
774430
|
+
token.contract_address,
|
|
774431
|
+
token.decimals
|
|
774432
|
+
]);
|
|
774433
|
+
setCALHash2(currency24, hash12 || "");
|
|
774434
|
+
log2("solana/preload", "preload " + splTokens.length + " tokens");
|
|
774435
|
+
addTokens(splTokens.map(convertSplTokens));
|
|
774436
|
+
return splTokens;
|
|
774437
|
+
} catch (e37) {
|
|
774438
|
+
if (e37 instanceof AxiosError2 && e37.response?.status === 304) {
|
|
774439
|
+
log2("solana/preload", `loading existing fallback tokens for solana with hash ${latestCALHash || spl_hash_default}`);
|
|
774440
|
+
if (!latestCALHash) {
|
|
774441
|
+
setCALHash2(currency24, spl_hash_default);
|
|
774442
|
+
addTokens(spl_default2.map(convertSplTokens));
|
|
774443
|
+
return spl_default2;
|
|
774444
|
+
}
|
|
774445
|
+
return null;
|
|
774446
|
+
}
|
|
774447
|
+
log2("solana/preload", `failure to retrieve tokens for solana`, e37);
|
|
774448
|
+
return null;
|
|
774449
|
+
}
|
|
774450
|
+
};
|
|
774403
774451
|
async function preloadWithAPI(currency24, getAPI2) {
|
|
774404
774452
|
const api8 = await getAPI2();
|
|
774405
774453
|
const cluster = clusterByCurrencyId(currency24.id);
|
|
774406
774454
|
const validators7 = cluster === "devnet" ? await loadDevnetValidators(api8) : await getValidators3(cluster);
|
|
774455
|
+
const splTokens = await fetchSPLTokens(currency24);
|
|
774407
774456
|
const data6 = {
|
|
774408
774457
|
version: "1",
|
|
774409
774458
|
validatorsWithMeta: [],
|
|
774410
|
-
validators: cluster === "mainnet-beta" ? preprocessMainnetValidators(validators7) : validators7
|
|
774459
|
+
validators: cluster === "mainnet-beta" ? preprocessMainnetValidators(validators7) : validators7,
|
|
774460
|
+
splTokens
|
|
774411
774461
|
};
|
|
774412
774462
|
setSolanaPreloadData(data6, currency24);
|
|
774413
774463
|
return data6;
|
|
@@ -774440,6 +774490,14 @@ function hydrate7(data6, currency24) {
|
|
|
774440
774490
|
}
|
|
774441
774491
|
}
|
|
774442
774492
|
function hydrateV1(data6, currency24) {
|
|
774493
|
+
if (Array.isArray(data6.splTokens)) {
|
|
774494
|
+
addTokens(data6.splTokens.map(convertSplTokens));
|
|
774495
|
+
log2("solana/preload", `hydrate ${data6.splTokens.length} tokens`);
|
|
774496
|
+
setSolanaPreloadData(data6, currency24);
|
|
774497
|
+
return;
|
|
774498
|
+
}
|
|
774499
|
+
addTokens(spl_default2.map(convertSplTokens));
|
|
774500
|
+
log2("solana/preload", `hydrate fallback ${spl_default2.length} embedded tokens`);
|
|
774443
774501
|
setSolanaPreloadData(data6, currency24);
|
|
774444
774502
|
}
|
|
774445
774503
|
|
|
@@ -777417,17 +777475,23 @@ function toOffChainMessage(message2, signerAddress, isLegacy) {
|
|
|
777417
777475
|
|
|
777418
777476
|
// ../../libs/coin-modules/coin-solana/lib-es/hw-signMessage.js
|
|
777419
777477
|
var import_bs587 = __toESM(require_bs58());
|
|
777478
|
+
var import_invariant41 = __toESM(require("invariant"));
|
|
777420
777479
|
var signMessage7 = (signerContext3) => async (deviceId, account3, messageOptions) => {
|
|
777421
777480
|
const message2 = messageOptions.message;
|
|
777422
777481
|
if (!message2 || typeof message2 !== "string") {
|
|
777423
777482
|
throw new Error("Sign off-chain message on Solana must be only used with DefaultMessage type");
|
|
777424
777483
|
}
|
|
777484
|
+
let signedMessage;
|
|
777425
777485
|
const result2 = await signerContext3(deviceId, async (signer) => {
|
|
777426
777486
|
const { version: version33 } = await signer.getAppConfiguration();
|
|
777427
777487
|
const isLegacy = import_semver12.default.lt(version33, config_default5.getCoinConfig().legacyOCMSMaxVersion);
|
|
777428
|
-
|
|
777488
|
+
signedMessage = toOffChainMessage(message2, account3.freshAddress, isLegacy);
|
|
777489
|
+
return signer.signMessage(account3.freshAddressPath, signedMessage.toString("hex"));
|
|
777429
777490
|
});
|
|
777430
|
-
|
|
777491
|
+
(0, import_invariant41.default)(signedMessage, "signedMessage should exist");
|
|
777492
|
+
const signatureCount = Buffer.from([1]);
|
|
777493
|
+
const envelope = Buffer.concat([signatureCount, result2.signature, signedMessage]);
|
|
777494
|
+
return { signature: import_bs587.default.encode(envelope) };
|
|
777431
777495
|
};
|
|
777432
777496
|
|
|
777433
777497
|
// ../../libs/ledger-live-common/lib-es/families/solana/setup.js
|
|
@@ -781404,7 +781468,7 @@ var getTransactionStatus16 = async (account3, transaction) => {
|
|
|
781404
781468
|
|
|
781405
781469
|
// ../../libs/coin-modules/coin-stacks/lib-es/bridge/estimateMaxSpendable.js
|
|
781406
781470
|
var import_bignumber241 = __toESM(require("bignumber.js"));
|
|
781407
|
-
var
|
|
781471
|
+
var import_invariant42 = __toESM(require("invariant"));
|
|
781408
781472
|
|
|
781409
781473
|
// ../../libs/coin-modules/coin-stacks/lib-es/bridge/createTransaction.js
|
|
781410
781474
|
var import_bignumber240 = __toESM(require("bignumber.js"));
|
|
@@ -781421,7 +781485,7 @@ var createTransaction18 = () => ({
|
|
|
781421
781485
|
var estimateMaxSpendable16 = async ({ account: account3, parentAccount, transaction }) => {
|
|
781422
781486
|
const mainAccount = getMainAccount(account3, parentAccount);
|
|
781423
781487
|
const { spendableBalance, xpub } = mainAccount;
|
|
781424
|
-
(0,
|
|
781488
|
+
(0, import_invariant42.default)(xpub, "xpub is required");
|
|
781425
781489
|
const dummyTx = {
|
|
781426
781490
|
...createTransaction18(account3),
|
|
781427
781491
|
...transaction,
|
|
@@ -781447,11 +781511,11 @@ var estimateMaxSpendable16 = async ({ account: account3, parentAccount, transact
|
|
|
781447
781511
|
// ../../libs/coin-modules/coin-stacks/lib-es/bridge/prepareTransaction.js
|
|
781448
781512
|
var import_bignumber242 = __toESM(require("bignumber.js"));
|
|
781449
781513
|
var import_c32check7 = __toESM(require_lib63());
|
|
781450
|
-
var
|
|
781514
|
+
var import_invariant43 = __toESM(require("invariant"));
|
|
781451
781515
|
var prepareTransaction17 = async (account3, transaction) => {
|
|
781452
781516
|
const { spendableBalance, pendingOperations, xpub } = account3;
|
|
781453
781517
|
const { recipient, useAllAmount } = transaction;
|
|
781454
|
-
(0,
|
|
781518
|
+
(0, import_invariant43.default)(xpub, "xpub is required");
|
|
781455
781519
|
const patch = {};
|
|
781456
781520
|
if (xpub && recipient && validateAddress3(recipient).isValid) {
|
|
781457
781521
|
const { anchorMode, memo: memo3, amount } = transaction;
|
|
@@ -781478,11 +781542,11 @@ var prepareTransaction17 = async (account3, transaction) => {
|
|
|
781478
781542
|
|
|
781479
781543
|
// ../../libs/coin-modules/coin-stacks/lib-es/bridge/synchronization.js
|
|
781480
781544
|
var import_bignumber243 = __toESM(require("bignumber.js"));
|
|
781481
|
-
var
|
|
781545
|
+
var import_invariant44 = __toESM(require("invariant"));
|
|
781482
781546
|
var getAccountShape14 = async (info6) => {
|
|
781483
781547
|
const { initialAccount, currency: currency24, rest = {}, derivationMode } = info6;
|
|
781484
781548
|
const pubKey = reconciliatePublicKey2(rest.publicKey, initialAccount);
|
|
781485
|
-
(0,
|
|
781549
|
+
(0, import_invariant44.default)(pubKey, "publicKey is required");
|
|
781486
781550
|
const accountId2 = encodeAccountId({
|
|
781487
781551
|
type: "js",
|
|
781488
781552
|
version: "2",
|
|
@@ -781516,7 +781580,7 @@ var sync13 = makeSync({ getAccountShape: getAccountShape14 });
|
|
|
781516
781580
|
|
|
781517
781581
|
// ../../libs/coin-modules/coin-stacks/lib-es/bridge/signOperation.js
|
|
781518
781582
|
init_lib_es();
|
|
781519
|
-
var
|
|
781583
|
+
var import_invariant45 = __toESM(require("invariant"));
|
|
781520
781584
|
var import_rxjs138 = require("rxjs");
|
|
781521
781585
|
|
|
781522
781586
|
// ../../libs/coin-modules/coin-stacks/lib-es/bridge/buildOptimisticOperation.js
|
|
@@ -781549,7 +781613,7 @@ var buildSignOperation17 = (signerContext3) => ({ account: account3, deviceId, t
|
|
|
781549
781613
|
async function main2() {
|
|
781550
781614
|
const { derivationPath } = getAddress7(account3);
|
|
781551
781615
|
const { xpub } = account3;
|
|
781552
|
-
(0,
|
|
781616
|
+
(0, import_invariant45.default)(xpub, "xpub is required");
|
|
781553
781617
|
const { recipient, fee, anchorMode, network, memo: memo3, amount, nonce } = transaction;
|
|
781554
781618
|
if (!xpub) {
|
|
781555
781619
|
throw new InvalidAddress("", {
|
|
@@ -781603,9 +781667,9 @@ var buildSignOperation17 = (signerContext3) => ({ account: account3, deviceId, t
|
|
|
781603
781667
|
});
|
|
781604
781668
|
|
|
781605
781669
|
// ../../libs/coin-modules/coin-stacks/lib-es/bridge/broadcast.js
|
|
781606
|
-
var
|
|
781670
|
+
var import_invariant46 = __toESM(require("invariant"));
|
|
781607
781671
|
var broadcast17 = async ({ signedOperation: { operation, signature: signature3, rawData } }) => {
|
|
781608
|
-
(0,
|
|
781672
|
+
(0, import_invariant46.default)(operation, "StacksOperation expected");
|
|
781609
781673
|
const tx = await getTxToBroadcast2(operation, signature3, rawData ?? {});
|
|
781610
781674
|
const hash12 = await broadcastTx3(tx);
|
|
781611
781675
|
const result2 = patchOperationWithHash(operation, hash12);
|
|
@@ -781652,16 +781716,16 @@ function createBridges17(signerContext3) {
|
|
|
781652
781716
|
}
|
|
781653
781717
|
|
|
781654
781718
|
// ../../libs/coin-modules/coin-stacks/lib-es/test/cli.js
|
|
781655
|
-
var
|
|
781719
|
+
var import_invariant47 = __toESM(require("invariant"));
|
|
781656
781720
|
var import_flatMap17 = __toESM(require("lodash/flatMap"));
|
|
781657
781721
|
function inferAccounts10(account3) {
|
|
781658
|
-
(0,
|
|
781722
|
+
(0, import_invariant47.default)(account3.currency.family === "stacks", "stacks family");
|
|
781659
781723
|
const accounts2 = [account3];
|
|
781660
781724
|
return accounts2;
|
|
781661
781725
|
}
|
|
781662
781726
|
function inferTransactions16(transactions3) {
|
|
781663
781727
|
return (0, import_flatMap17.default)(transactions3, ({ transaction }) => {
|
|
781664
|
-
(0,
|
|
781728
|
+
(0, import_invariant47.default)(transaction.family === "stacks", "stacks family");
|
|
781665
781729
|
return {
|
|
781666
781730
|
...transaction,
|
|
781667
781731
|
family: "stacks"
|
|
@@ -782289,10 +782353,10 @@ var getTransactionStatus17 = async (account3, transaction) => {
|
|
|
782289
782353
|
};
|
|
782290
782354
|
|
|
782291
782355
|
// ../../libs/coin-modules/coin-stellar/lib-es/bridge/prepareTransaction.js
|
|
782292
|
-
var
|
|
782356
|
+
var import_invariant48 = __toESM(require("invariant"));
|
|
782293
782357
|
var prepareTransaction18 = async (account3, transaction) => {
|
|
782294
782358
|
const networkInfo = transaction.networkInfo || await fetchAccountNetworkInfo(account3);
|
|
782295
|
-
(0,
|
|
782359
|
+
(0, import_invariant48.default)(networkInfo.family === "stellar", "stellar networkInfo expected");
|
|
782296
782360
|
const fees2 = transaction.fees || networkInfo.fees;
|
|
782297
782361
|
const baseReserve = transaction.baseReserve || networkInfo.baseReserve;
|
|
782298
782362
|
const [assetCode, assetIssuer] = getAssetCodeIssuer(transaction);
|
|
@@ -782346,7 +782410,7 @@ init_lib_es();
|
|
|
782346
782410
|
|
|
782347
782411
|
// ../../libs/coin-modules/coin-stellar/lib-es/bridge/buildTransaction.js
|
|
782348
782412
|
init_lib_es();
|
|
782349
|
-
var
|
|
782413
|
+
var import_invariant49 = __toESM(require("invariant"));
|
|
782350
782414
|
|
|
782351
782415
|
// ../../libs/coin-modules/coin-stellar/lib-es/logic/broadcast.js
|
|
782352
782416
|
async function broadcast18(signature3) {
|
|
@@ -782459,7 +782523,7 @@ function buildMemo(memoType, memoValue) {
|
|
|
782459
782523
|
// ../../libs/coin-modules/coin-stellar/lib-es/bridge/buildTransaction.js
|
|
782460
782524
|
async function buildTransaction9(account3, transaction) {
|
|
782461
782525
|
const { recipient, networkInfo, fees: fees2, memoType, memoValue, mode, assetCode, assetIssuer } = transaction;
|
|
782462
|
-
(0,
|
|
782526
|
+
(0, import_invariant49.default)(networkInfo && networkInfo.family === "stellar", "stellar family");
|
|
782463
782527
|
if (!fees2) {
|
|
782464
782528
|
throw new FeeNotLoaded();
|
|
782465
782529
|
}
|
|
@@ -782763,7 +782827,7 @@ function createBridges18(signerContext3, coinConfig17) {
|
|
|
782763
782827
|
}
|
|
782764
782828
|
|
|
782765
782829
|
// ../../libs/coin-modules/coin-stellar/lib-es/test/cli.js
|
|
782766
|
-
var
|
|
782830
|
+
var import_invariant50 = __toESM(require("invariant"));
|
|
782767
782831
|
var options14 = [
|
|
782768
782832
|
{
|
|
782769
782833
|
name: "fee",
|
|
@@ -782798,7 +782862,7 @@ var options14 = [
|
|
|
782798
782862
|
];
|
|
782799
782863
|
function inferTransactions17(transactions3, opts) {
|
|
782800
782864
|
return transactions3.map(({ transaction, account: account3 }) => {
|
|
782801
|
-
(0,
|
|
782865
|
+
(0, import_invariant50.default)(transaction.family === "stellar", "stellar family");
|
|
782802
782866
|
return {
|
|
782803
782867
|
...transaction,
|
|
782804
782868
|
subAccountId: account3.type === "TokenAccount" ? account3.id : null,
|
|
@@ -782811,7 +782875,7 @@ function inferTransactions17(transactions3, opts) {
|
|
|
782811
782875
|
});
|
|
782812
782876
|
}
|
|
782813
782877
|
function inferAccounts11(account3, opts) {
|
|
782814
|
-
(0,
|
|
782878
|
+
(0, import_invariant50.default)(account3.currency.family === "stellar", "stellar family");
|
|
782815
782879
|
if (opts.subAccountId) {
|
|
782816
782880
|
const assetSubAccount = account3.subAccounts?.find((a65) => a65.id === opts.subAccountId);
|
|
782817
782881
|
if (!assetSubAccount) {
|
|
@@ -801835,7 +801899,7 @@ var getTransactionStatus18 = async (account3, transaction) => {
|
|
|
801835
801899
|
};
|
|
801836
801900
|
|
|
801837
801901
|
// ../../libs/coin-modules/coin-tezos/lib-es/bridge/synchronization.js
|
|
801838
|
-
var
|
|
801902
|
+
var import_invariant51 = __toESM(require("invariant"));
|
|
801839
801903
|
var import_bignumber263 = require("bignumber.js");
|
|
801840
801904
|
|
|
801841
801905
|
// ../../libs/coin-modules/coin-tezos/lib-es/bridge/logic.js
|
|
@@ -801981,7 +802045,7 @@ function isStringHex(s49) {
|
|
|
801981
802045
|
// ../../libs/coin-modules/coin-tezos/lib-es/bridge/synchronization.js
|
|
801982
802046
|
var getAccountShape16 = async ({ initialAccount, rest, currency: currency24, derivationMode }) => {
|
|
801983
802047
|
const publicKey3 = reconciliatePublicKey3(rest?.publicKey, initialAccount);
|
|
801984
|
-
(0,
|
|
802048
|
+
(0, import_invariant51.default)(isStringHex(publicKey3), `Invalid public key (${publicKey3}). Please reimport your Tezos accounts`);
|
|
801985
802049
|
const hex4 = Buffer.from(publicKey3, "hex");
|
|
801986
802050
|
const address4 = encodeAddress5(hex4);
|
|
801987
802051
|
const accountId2 = encodeAccountId({
|
|
@@ -802201,7 +802265,7 @@ function createBridges19(signerContext3, coinConfig17) {
|
|
|
802201
802265
|
// ../../libs/coin-modules/coin-tezos/lib-es/test/cli.js
|
|
802202
802266
|
var import_rxjs142 = require("rxjs");
|
|
802203
802267
|
var import_operators9 = require("rxjs/operators");
|
|
802204
|
-
var
|
|
802268
|
+
var import_invariant52 = __toESM(require("invariant"));
|
|
802205
802269
|
var import_bignumber265 = require("bignumber.js");
|
|
802206
802270
|
var import_flatMap18 = __toESM(require("lodash/flatMap"));
|
|
802207
802271
|
var options15 = [
|
|
@@ -802233,22 +802297,22 @@ var options15 = [
|
|
|
802233
802297
|
}
|
|
802234
802298
|
];
|
|
802235
802299
|
function inferAccounts12(account3, opts) {
|
|
802236
|
-
(0,
|
|
802300
|
+
(0, import_invariant52.default)(account3.currency.family === "tezos", "tezos family");
|
|
802237
802301
|
if (!opts.subAccount) {
|
|
802238
802302
|
const accounts2 = [account3];
|
|
802239
802303
|
return accounts2;
|
|
802240
802304
|
}
|
|
802241
802305
|
const { subAccounts } = account3;
|
|
802242
|
-
(0,
|
|
802306
|
+
(0, import_invariant52.default)(subAccounts, "no sub accounts");
|
|
802243
802307
|
return opts.subAccount.map((i86) => {
|
|
802244
802308
|
const acc = subAccounts[i86];
|
|
802245
|
-
(0,
|
|
802309
|
+
(0, import_invariant52.default)(acc, "sub account not found (index %s)", i86);
|
|
802246
802310
|
return acc;
|
|
802247
802311
|
});
|
|
802248
802312
|
}
|
|
802249
802313
|
function inferTransactions18(transactions3, opts, { inferAmount: inferAmount2 }) {
|
|
802250
802314
|
return (0, import_flatMap18.default)(transactions3, ({ transaction, account: account3 }) => {
|
|
802251
|
-
(0,
|
|
802315
|
+
(0, import_invariant52.default)(transaction.family === "tezos", "tezos family");
|
|
802252
802316
|
let subAccountId;
|
|
802253
802317
|
return {
|
|
802254
802318
|
...transaction,
|
|
@@ -802294,7 +802358,7 @@ function makeCliTools19() {
|
|
|
802294
802358
|
}
|
|
802295
802359
|
|
|
802296
802360
|
// ../../libs/ledgerjs/packages/hw-app-tezos/lib-es/Tezos.js
|
|
802297
|
-
var
|
|
802361
|
+
var import_invariant53 = __toESM(require("invariant"));
|
|
802298
802362
|
var import_bs58check9 = __toESM(require_bs58check());
|
|
802299
802363
|
var import_blake2b6 = __toESM(require_blake2b7());
|
|
802300
802364
|
var Tezos = class {
|
|
@@ -802384,7 +802448,7 @@ var Tezos = class {
|
|
|
802384
802448
|
}
|
|
802385
802449
|
response = await this.transport.send(128, 4, code, curve2, data6);
|
|
802386
802450
|
}
|
|
802387
|
-
(0,
|
|
802451
|
+
(0, import_invariant53.default)(response, "hw-app-xtz: response is set");
|
|
802388
802452
|
const signature3 = response.slice(0, response.length - 2).toString("hex");
|
|
802389
802453
|
return {
|
|
802390
802454
|
signature: signature3
|
|
@@ -802440,7 +802504,7 @@ var curves = [
|
|
|
802440
802504
|
];
|
|
802441
802505
|
var encodeAddress6 = (publicKey3, curve2) => {
|
|
802442
802506
|
const curveData = curves[curve2];
|
|
802443
|
-
(0,
|
|
802507
|
+
(0, import_invariant53.default)(curveData, "%s curve not supported", curve2);
|
|
802444
802508
|
const publicKeyBuf = curveData.compressPublicKey(publicKey3, curve2);
|
|
802445
802509
|
const key2 = publicKeyBuf.slice(1);
|
|
802446
802510
|
const keyHashSize = 20;
|
|
@@ -803547,15 +803611,15 @@ function createBridges20(signerContext3, coinConfig17) {
|
|
|
803547
803611
|
}
|
|
803548
803612
|
|
|
803549
803613
|
// ../../libs/coin-modules/coin-ton/lib-es/cli-transaction.js
|
|
803550
|
-
var
|
|
803614
|
+
var import_invariant54 = __toESM(require("invariant"));
|
|
803551
803615
|
var import_flatMap20 = __toESM(require("lodash/flatMap"));
|
|
803552
803616
|
function inferTransactions19(transactions3, opts) {
|
|
803553
803617
|
return (0, import_flatMap20.default)(transactions3, ({ transaction, account: account3 }) => {
|
|
803554
|
-
(0,
|
|
803618
|
+
(0, import_invariant54.default)(transaction.family === "ton", "ton family");
|
|
803555
803619
|
const isTokenAccount2 = account3.type === "TokenAccount";
|
|
803556
803620
|
if (isTokenAccount2) {
|
|
803557
803621
|
const isDelisted = account3.token.delisted === true;
|
|
803558
|
-
(0,
|
|
803622
|
+
(0, import_invariant54.default)(!isDelisted, "token is delisted");
|
|
803559
803623
|
}
|
|
803560
803624
|
return {
|
|
803561
803625
|
...transaction,
|
|
@@ -803693,8 +803757,8 @@ var formatTrongridTrc20TxResponse = (tx) => {
|
|
|
803693
803757
|
// trc20 txs are succeeded if returned by trongrid,
|
|
803694
803758
|
};
|
|
803695
803759
|
} catch (e37) {
|
|
803696
|
-
log2("tron-error",
|
|
803697
|
-
|
|
803760
|
+
log2("tron-error", `could not parse transaction ${tx}`);
|
|
803761
|
+
throw e37;
|
|
803698
803762
|
}
|
|
803699
803763
|
};
|
|
803700
803764
|
var formatTrongridTxResponse = (tx) => {
|
|
@@ -804019,12 +804083,14 @@ var getTrc20 = async (url4) => {
|
|
|
804019
804083
|
};
|
|
804020
804084
|
};
|
|
804021
804085
|
var defaultFetchParams = {
|
|
804022
|
-
|
|
804023
|
-
minTimestamp: 0
|
|
804086
|
+
limitPerCall: 100,
|
|
804087
|
+
minTimestamp: 0,
|
|
804088
|
+
order: "desc"
|
|
804024
804089
|
};
|
|
804025
804090
|
async function fetchTronAccountTxs(addr, shouldFetchMoreTxs, cacheTransactionInfoById, params) {
|
|
804026
|
-
const
|
|
804027
|
-
const
|
|
804091
|
+
const adjustedLimitPerCall = params.hintGlobalLimit ? Math.min(params.limitPerCall, params.hintGlobalLimit) : params.limitPerCall;
|
|
804092
|
+
const queryParams = `limit=${adjustedLimitPerCall}&min_timestamp=${params.minTimestamp}&order_by=block_timestamp,${params.order}`;
|
|
804093
|
+
const nativeTxs = (await getAllTransactions(`${getBaseApiUrl2()}/v1/accounts/${addr}/transactions?${queryParams}`, shouldFetchMoreTxs, getTransactions4(cacheTransactionInfoById))).filter(isTransactionTronAPI).filter((tx) => {
|
|
804028
804094
|
const hasInternalTxs = tx.txID && tx.internal_transactions && tx.internal_transactions.length > 0;
|
|
804029
804095
|
const isDuplicated = tx.tx_id;
|
|
804030
804096
|
const type5 = tx.raw_data.contract[0].type;
|
|
@@ -804033,8 +804099,50 @@ async function fetchTronAccountTxs(addr, shouldFetchMoreTxs, cacheTransactionInf
|
|
|
804033
804099
|
}
|
|
804034
804100
|
return !isDuplicated && !hasInternalTxs && type5 !== "TriggerSmartContract";
|
|
804035
804101
|
}).map((tx) => formatTrongridTxResponse(tx));
|
|
804036
|
-
const
|
|
804037
|
-
|
|
804102
|
+
const callTrc20Endpoint = async () => await getAllTransactions(`${getBaseApiUrl2()}/v1/accounts/${addr}/transactions/trc20?${queryParams}&get_detail=true`, shouldFetchMoreTxs, getTrc20);
|
|
804103
|
+
function isValid5(tx) {
|
|
804104
|
+
const ret2 = tx?.detail?.ret;
|
|
804105
|
+
return Array.isArray(ret2) && ret2.length > 0;
|
|
804106
|
+
}
|
|
804107
|
+
function getInvalidTxIndexes(txs) {
|
|
804108
|
+
const invalids = [];
|
|
804109
|
+
for (let i86 = 0; i86 < txs.length; i86++) {
|
|
804110
|
+
if (!isValid5(txs[i86])) {
|
|
804111
|
+
invalids.push(i86);
|
|
804112
|
+
}
|
|
804113
|
+
}
|
|
804114
|
+
txs.filter((tx) => !isValid5(tx)).map((tx, index) => index);
|
|
804115
|
+
return invalids;
|
|
804116
|
+
}
|
|
804117
|
+
function assert10(predicate, message2) {
|
|
804118
|
+
if (!predicate) {
|
|
804119
|
+
throw new Error(message2);
|
|
804120
|
+
}
|
|
804121
|
+
}
|
|
804122
|
+
function mergeAccs(acc1, acc2) {
|
|
804123
|
+
assert10(acc1.txs.length == acc2.txs.length, "accs should have the same length");
|
|
804124
|
+
const accRet = { txs: acc1.txs, invalids: [] };
|
|
804125
|
+
acc1.invalids.forEach((invalidIndex) => {
|
|
804126
|
+
acc2.invalids.includes(invalidIndex) ? accRet.invalids.push(invalidIndex) : accRet.txs[invalidIndex] = acc2.txs[invalidIndex];
|
|
804127
|
+
});
|
|
804128
|
+
return accRet;
|
|
804129
|
+
}
|
|
804130
|
+
async function getTrc20TxsWithRetry(acc, times) {
|
|
804131
|
+
assert10(times > 0, "getTrc20TxsWithRetry: couldn't fetch trc20 transactions after several attempts");
|
|
804132
|
+
const ret2 = await callTrc20Endpoint();
|
|
804133
|
+
const thisAcc = {
|
|
804134
|
+
txs: ret2,
|
|
804135
|
+
invalids: getInvalidTxIndexes(ret2)
|
|
804136
|
+
};
|
|
804137
|
+
const newAcc = acc ? mergeAccs(acc, thisAcc) : thisAcc;
|
|
804138
|
+
if (newAcc.invalids.length == 0) {
|
|
804139
|
+
return newAcc.txs;
|
|
804140
|
+
} else {
|
|
804141
|
+
log2("coin-tron", `getTrc20TxsWithRetry: got ${newAcc.invalids.length} invalid trc20 transactions, retrying...`);
|
|
804142
|
+
return await getTrc20TxsWithRetry(newAcc, times - 1);
|
|
804143
|
+
}
|
|
804144
|
+
}
|
|
804145
|
+
const trc20Txs = (await getTrc20TxsWithRetry(null, 3)).map(formatTrongridTrc20TxResponse);
|
|
804038
804146
|
const txInfos = (0, import_compact5.default)(nativeTxs.concat(trc20Txs)).sort((a65, b19) => b19.date.getTime() - a65.date.getTime());
|
|
804039
804147
|
return txInfos;
|
|
804040
804148
|
}
|
|
@@ -805486,7 +805594,7 @@ function createBridges21(signerContext3, coinConfig17) {
|
|
|
805486
805594
|
}
|
|
805487
805595
|
|
|
805488
805596
|
// ../../libs/coin-modules/coin-tron/lib-es/test/cli.js
|
|
805489
|
-
var
|
|
805597
|
+
var import_invariant55 = __toESM(require("invariant"));
|
|
805490
805598
|
var import_flatMap21 = __toESM(require("lodash/flatMap"));
|
|
805491
805599
|
var import_zipWith2 = __toESM(require("lodash/zipWith"));
|
|
805492
805600
|
var import_rxjs145 = require("rxjs");
|
|
@@ -805527,7 +805635,7 @@ var options16 = [
|
|
|
805527
805635
|
}
|
|
805528
805636
|
];
|
|
805529
805637
|
function inferAccounts13(account3, opts) {
|
|
805530
|
-
(0,
|
|
805638
|
+
(0, import_invariant55.default)(account3.currency.family === "tron", "tron family");
|
|
805531
805639
|
if (!opts.token) {
|
|
805532
805640
|
const accounts2 = [account3];
|
|
805533
805641
|
return accounts2;
|
|
@@ -805548,7 +805656,7 @@ function inferAccounts13(account3, opts) {
|
|
|
805548
805656
|
}
|
|
805549
805657
|
function inferTransactions20(transactions3, opts) {
|
|
805550
805658
|
const mode = opts.mode || "send";
|
|
805551
|
-
(0,
|
|
805659
|
+
(0, import_invariant55.default)([
|
|
805552
805660
|
"send",
|
|
805553
805661
|
"freeze",
|
|
805554
805662
|
"unfreeze",
|
|
@@ -805560,11 +805668,11 @@ function inferTransactions20(transactions3, opts) {
|
|
|
805560
805668
|
].includes(mode), `Unexpected mode: ${mode}`);
|
|
805561
805669
|
const resource = opts.resource ? opts.resource.toUpperCase() : void 0;
|
|
805562
805670
|
if (resource) {
|
|
805563
|
-
(0,
|
|
805671
|
+
(0, import_invariant55.default)(["BANDWIDTH", "ENERGY"].includes(resource), `Unexpected resource: ${resource}`);
|
|
805564
805672
|
}
|
|
805565
805673
|
const voteAddresses = opts["tronVoteAddress"] || [];
|
|
805566
805674
|
const voteCounts = (opts["tronVoteCount"] || []).map((value6) => {
|
|
805567
|
-
(0,
|
|
805675
|
+
(0, import_invariant55.default)(Number.isInteger(Number(value6)), `Invalid integer: ${value6}`);
|
|
805568
805676
|
return parseInt(value6);
|
|
805569
805677
|
});
|
|
805570
805678
|
const votes2 = (0, import_zipWith2.default)(voteAddresses, voteCounts, (a65, c56) => ({
|
|
@@ -805572,13 +805680,13 @@ function inferTransactions20(transactions3, opts) {
|
|
|
805572
805680
|
voteCount: c56
|
|
805573
805681
|
}));
|
|
805574
805682
|
return (0, import_flatMap21.default)(transactions3, ({ transaction, account: account3 }) => {
|
|
805575
|
-
(0,
|
|
805683
|
+
(0, import_invariant55.default)(transaction.family === "tron", "tron family");
|
|
805576
805684
|
if (account3.type === "Account") {
|
|
805577
|
-
(0,
|
|
805685
|
+
(0, import_invariant55.default)(account3.tronResources, "unactivated account");
|
|
805578
805686
|
}
|
|
805579
805687
|
if (account3.type === "TokenAccount") {
|
|
805580
805688
|
const isDelisted = account3.token.delisted === true;
|
|
805581
|
-
(0,
|
|
805689
|
+
(0, import_invariant55.default)(!isDelisted, "token is delisted");
|
|
805582
805690
|
}
|
|
805583
805691
|
return {
|
|
805584
805692
|
...transaction,
|
|
@@ -808143,7 +808251,7 @@ var import_ripple_binary_codec = __toESM(require_dist32());
|
|
|
808143
808251
|
|
|
808144
808252
|
// ../../libs/coin-modules/coin-xrp/lib-es/logic/craftTransaction.js
|
|
808145
808253
|
var import_bignumber298 = __toESM(require("bignumber.js"));
|
|
808146
|
-
var
|
|
808254
|
+
var import_invariant56 = __toESM(require("invariant"));
|
|
808147
808255
|
var import_ripple_binary_codec2 = __toESM(require_dist32());
|
|
808148
808256
|
var import_definitions76 = __toESM(require_definitions());
|
|
808149
808257
|
|
|
@@ -808210,7 +808318,7 @@ async function craftTransaction4(account3, transaction, publicKey3) {
|
|
|
808210
808318
|
xrplTransaction.Memos = transaction.memos.map(memoMapper);
|
|
808211
808319
|
}
|
|
808212
808320
|
if (transaction.destinationTag) {
|
|
808213
|
-
(0,
|
|
808321
|
+
(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()}]`);
|
|
808214
808322
|
xrplTransaction.DestinationTag = transaction.destinationTag;
|
|
808215
808323
|
}
|
|
808216
808324
|
const serializedTransaction = publicKey3 ? (0, import_ripple_binary_codec2.encode)({
|
|
@@ -808662,7 +808770,7 @@ function createBridges23(signerContext3, coinConfig17) {
|
|
|
808662
808770
|
}
|
|
808663
808771
|
|
|
808664
808772
|
// ../../libs/coin-modules/coin-xrp/lib-es/test/cli.js
|
|
808665
|
-
var
|
|
808773
|
+
var import_invariant57 = __toESM(require("invariant"));
|
|
808666
808774
|
var options18 = [
|
|
808667
808775
|
{
|
|
808668
808776
|
name: "fee",
|
|
@@ -808677,7 +808785,7 @@ var options18 = [
|
|
|
808677
808785
|
];
|
|
808678
808786
|
function inferTransactions22(transactions3, opts, { inferAmount: inferAmount2 }) {
|
|
808679
808787
|
return transactions3.flatMap(({ transaction, account: account3 }) => {
|
|
808680
|
-
(0,
|
|
808788
|
+
(0, import_invariant57.default)(transaction.family === "xrp", "XRP family");
|
|
808681
808789
|
return {
|
|
808682
808790
|
...transaction,
|
|
808683
808791
|
fee: inferAmount2(account3, opts.fee || "0.001xrp"),
|
|
@@ -817920,13 +818028,13 @@ function reEncodeRawSignature(rawSignature) {
|
|
|
817920
818028
|
}
|
|
817921
818029
|
|
|
817922
818030
|
// ../../libs/coin-modules/coin-mina/lib-es/signer/getAddress.js
|
|
817923
|
-
var
|
|
818031
|
+
var import_invariant58 = __toESM(require("invariant"));
|
|
817924
818032
|
var resolver44 = (signerContext3) => {
|
|
817925
818033
|
return async (deviceId, { path: path4, verify: verify9 }) => {
|
|
817926
818034
|
const account3 = getAccountNumFromPath(path4);
|
|
817927
|
-
(0,
|
|
818035
|
+
(0, import_invariant58.default)(account3 !== void 0, "Invalid account path, supported: 44'/12586'/<account>'/0/0");
|
|
817928
818036
|
const r38 = await signerContext3(deviceId, (signer) => signer.getAddress(account3, verify9 || false));
|
|
817929
|
-
(0,
|
|
818037
|
+
(0, import_invariant58.default)(r38.publicKey, "[mina] getAddress: expected publicKey to be defined");
|
|
817930
818038
|
return {
|
|
817931
818039
|
address: r38.publicKey,
|
|
817932
818040
|
publicKey: r38.publicKey,
|
|
@@ -818152,7 +818260,7 @@ var getNonce4 = async (txn, address4) => {
|
|
|
818152
818260
|
// ../../libs/coin-modules/coin-mina/lib-es/bridge/synchronisation.js
|
|
818153
818261
|
var import_bignumber315 = __toESM(require("bignumber.js"));
|
|
818154
818262
|
init_lib_es2();
|
|
818155
|
-
var
|
|
818263
|
+
var import_invariant59 = __toESM(require("invariant"));
|
|
818156
818264
|
var mapRosettaTxnToOperation = async (accountId2, address4, txn) => {
|
|
818157
818265
|
try {
|
|
818158
818266
|
const hash12 = txn.transaction.transaction_identifier.hash;
|
|
@@ -818209,8 +818317,8 @@ var mapRosettaTxnToOperation = async (accountId2, address4, txn) => {
|
|
|
818209
818317
|
}
|
|
818210
818318
|
}
|
|
818211
818319
|
}
|
|
818212
|
-
(0,
|
|
818213
|
-
(0,
|
|
818320
|
+
(0, import_invariant59.default)(fromAccount, "mina: missing fromAccount");
|
|
818321
|
+
(0, import_invariant59.default)(toAccount, "mina: missing toAccount");
|
|
818214
818322
|
const op = {
|
|
818215
818323
|
id: "",
|
|
818216
818324
|
type: "NONE",
|
|
@@ -818423,11 +818531,11 @@ init_lib_es();
|
|
|
818423
818531
|
|
|
818424
818532
|
// ../../libs/coin-modules/coin-mina/lib-es/bridge/buildTransaction.js
|
|
818425
818533
|
init_lib_es2();
|
|
818426
|
-
var
|
|
818534
|
+
var import_invariant60 = __toESM(require("invariant"));
|
|
818427
818535
|
var buildTransaction11 = async (a65, t61) => {
|
|
818428
818536
|
try {
|
|
818429
818537
|
const accountNum = getAccountNumFromPath(a65.freshAddressPath);
|
|
818430
|
-
(0,
|
|
818538
|
+
(0, import_invariant60.default)(accountNum !== void 0, "mina: accountNum is required to build transaction");
|
|
818431
818539
|
return {
|
|
818432
818540
|
txType: MINA_PAYMENT_TYPE_ID,
|
|
818433
818541
|
senderAccount: accountNum,
|
|
@@ -818450,7 +818558,7 @@ var buildTransaction11 = async (a65, t61) => {
|
|
|
818450
818558
|
};
|
|
818451
818559
|
|
|
818452
818560
|
// ../../libs/coin-modules/coin-mina/lib-es/bridge/signOperation.js
|
|
818453
|
-
var
|
|
818561
|
+
var import_invariant61 = __toESM(require("invariant"));
|
|
818454
818562
|
var buildOptimisticOperation21 = (account3, transaction, fee) => {
|
|
818455
818563
|
let value6 = new import_bignumber319.BigNumber(transaction.amount).plus(fee);
|
|
818456
818564
|
if (transaction.fees?.accountCreationFee.gt(0)) {
|
|
@@ -818484,7 +818592,7 @@ var buildSignOperation25 = (signerContext3) => ({ account: account3, transaction
|
|
|
818484
818592
|
}
|
|
818485
818593
|
const unsigned2 = await buildTransaction11(account3, transaction);
|
|
818486
818594
|
const { signature: signature3 } = await signerContext3(deviceId, (signer) => signer.signTransaction(unsigned2));
|
|
818487
|
-
(0,
|
|
818595
|
+
(0, import_invariant61.default)(signature3, "signature should be defined if user accepted");
|
|
818488
818596
|
const encodedSignature = reEncodeRawSignature(signature3);
|
|
818489
818597
|
const signedTransaction = {
|
|
818490
818598
|
transaction: unsigned2,
|
|
@@ -818506,7 +818614,7 @@ var buildSignOperation25 = (signerContext3) => ({ account: account3, transaction
|
|
|
818506
818614
|
var signOperation_default2 = buildSignOperation25;
|
|
818507
818615
|
|
|
818508
818616
|
// ../../libs/coin-modules/coin-mina/lib-es/bridge/cli-transaction.js
|
|
818509
|
-
var
|
|
818617
|
+
var import_invariant62 = __toESM(require("invariant"));
|
|
818510
818618
|
var import_flatMap23 = __toESM(require("lodash/flatMap"));
|
|
818511
818619
|
var options20 = [
|
|
818512
818620
|
{
|
|
@@ -818516,12 +818624,12 @@ var options20 = [
|
|
|
818516
818624
|
}
|
|
818517
818625
|
];
|
|
818518
818626
|
function inferAccounts14(account3) {
|
|
818519
|
-
(0,
|
|
818627
|
+
(0, import_invariant62.default)(account3.currency.family === "mina", "mina family");
|
|
818520
818628
|
return [account3];
|
|
818521
818629
|
}
|
|
818522
818630
|
function inferTransactions23(transactions3, opts) {
|
|
818523
818631
|
return (0, import_flatMap23.default)(transactions3, ({ transaction }) => {
|
|
818524
|
-
(0,
|
|
818632
|
+
(0, import_invariant62.default)(transaction.family === "mina", "mina family");
|
|
818525
818633
|
return {
|
|
818526
818634
|
...transaction,
|
|
818527
818635
|
family: "mina",
|
|
@@ -821094,7 +821202,7 @@ function genAccount2(id5, opts = {}) {
|
|
|
821094
821202
|
}
|
|
821095
821203
|
|
|
821096
821204
|
// ../../libs/coin-modules/coin-evm/lib-es/operation.js
|
|
821097
|
-
var
|
|
821205
|
+
var import_invariant63 = __toESM(require("invariant"));
|
|
821098
821206
|
|
|
821099
821207
|
// ../../libs/ledger-live-common/lib-es/bridge/mockHelpers.js
|
|
821100
821208
|
var MOCK_DATA_SEED = getEnv("MOCK") || "MOCK";
|
|
@@ -821324,10 +821432,10 @@ init_lib_es();
|
|
|
821324
821432
|
// ../../libs/ledger-live-common/lib-es/families/bitcoin/bridge/api.js
|
|
821325
821433
|
init_lib_es();
|
|
821326
821434
|
var import_bignumber327 = require("bignumber.js");
|
|
821327
|
-
var
|
|
821435
|
+
var import_invariant64 = __toESM(require("invariant"));
|
|
821328
821436
|
var getEstimatedFees14 = makeLRUCache(async (currency24) => {
|
|
821329
821437
|
const baseURL2 = blockchainBaseURL(currency24);
|
|
821330
|
-
(0,
|
|
821438
|
+
(0, import_invariant64.default)(baseURL2, `Fees for ${currency24.id} are not supported`);
|
|
821331
821439
|
const { data: data6, status } = await network_default({
|
|
821332
821440
|
method: "GET",
|
|
821333
821441
|
url: `${baseURL2}/fees`
|
|
@@ -823135,7 +823243,7 @@ function getMockedAPIs() {
|
|
|
823135
823243
|
var mock_default14 = makeBridges(getMockedAPIs());
|
|
823136
823244
|
|
|
823137
823245
|
// ../../libs/ledger-live-common/lib-es/families/stellar/bridge/mock.js
|
|
823138
|
-
var
|
|
823246
|
+
var import_invariant65 = __toESM(require("invariant"));
|
|
823139
823247
|
var import_bignumber336 = require("bignumber.js");
|
|
823140
823248
|
init_lib_es();
|
|
823141
823249
|
var receive11 = makeAccountBridgeReceive2();
|
|
@@ -823256,7 +823364,7 @@ var prepareTransaction35 = async (a65, t61) => {
|
|
|
823256
823364
|
fees: new import_bignumber336.BigNumber("100"),
|
|
823257
823365
|
baseReserve: new import_bignumber336.BigNumber("100000")
|
|
823258
823366
|
};
|
|
823259
|
-
(0,
|
|
823367
|
+
(0, import_invariant65.default)(networkInfo.family === "stellar", "stellar networkInfo expected");
|
|
823260
823368
|
const fees2 = t61.fees || networkInfo.fees;
|
|
823261
823369
|
const baseReserve = t61.baseReserve || networkInfo.baseReserve;
|
|
823262
823370
|
if (t61.networkInfo !== networkInfo || t61.fees !== fees2 || t61.baseReserve !== baseReserve) {
|
|
@@ -823898,7 +824006,7 @@ var accountFormatters = {
|
|
|
823898
824006
|
};
|
|
823899
824007
|
function formatAccount(account3, format6 = "full") {
|
|
823900
824008
|
const f43 = accountFormatters[format6];
|
|
823901
|
-
(0,
|
|
824009
|
+
(0, import_invariant66.default)(f43, "missing account formatter=" + format6);
|
|
823902
824010
|
return f43(account3);
|
|
823903
824011
|
}
|
|
823904
824012
|
function formatOperation2(account3) {
|
|
@@ -826510,15 +826618,15 @@ function parseAppSearch(query3) {
|
|
|
826510
826618
|
}
|
|
826511
826619
|
async function createImplicitSpeculos(query3) {
|
|
826512
826620
|
const coinapps = getEnv("COINAPPS");
|
|
826513
|
-
(0,
|
|
826621
|
+
(0, import_invariant67.default)(coinapps, "COINAPPS folder is missing!");
|
|
826514
826622
|
const seed = getEnv("SEED");
|
|
826515
|
-
(0,
|
|
826623
|
+
(0, import_invariant67.default)(seed, "SEED is missing!");
|
|
826516
826624
|
const apps = await listAppCandidates(coinapps);
|
|
826517
826625
|
const match = parseAppSearch(query3);
|
|
826518
|
-
(0,
|
|
826626
|
+
(0, import_invariant67.default)(match, "speculos: invalid format of '%s'. Usage example: speculos:nanoS:bitcoin@1.3.x", query3);
|
|
826519
826627
|
const { search, dependency, appName } = match;
|
|
826520
826628
|
const appCandidate = findAppCandidate(apps, search);
|
|
826521
|
-
(0,
|
|
826629
|
+
(0, import_invariant67.default)(appCandidate, "could not find an app that matches '%s'", query3);
|
|
826522
826630
|
log2("speculos", "using app " + formatAppCandidate(appCandidate));
|
|
826523
826631
|
return appCandidate ? {
|
|
826524
826632
|
device: await createSpeculosDevice({
|
|
@@ -826908,7 +827016,8 @@ var evmConfig = {
|
|
|
826908
827016
|
config_currency_akroma: {
|
|
826909
827017
|
type: "object",
|
|
826910
827018
|
default: {
|
|
826911
|
-
status: { type: "active" }
|
|
827019
|
+
status: { type: "active" },
|
|
827020
|
+
showNfts: false
|
|
826912
827021
|
}
|
|
826913
827022
|
},
|
|
826914
827023
|
config_currency_atheios: {
|
|
@@ -826916,7 +827025,8 @@ var evmConfig = {
|
|
|
826916
827025
|
default: {
|
|
826917
827026
|
status: {
|
|
826918
827027
|
type: "active"
|
|
826919
|
-
}
|
|
827028
|
+
},
|
|
827029
|
+
showNfts: false
|
|
826920
827030
|
}
|
|
826921
827031
|
},
|
|
826922
827032
|
config_currency_avalanche_c_chain: {
|
|
@@ -826936,7 +827046,8 @@ var evmConfig = {
|
|
|
826936
827046
|
gasTracker: {
|
|
826937
827047
|
type: "ledger",
|
|
826938
827048
|
explorerId: "avax"
|
|
826939
|
-
}
|
|
827049
|
+
},
|
|
827050
|
+
showNfts: false
|
|
826940
827051
|
}
|
|
826941
827052
|
},
|
|
826942
827053
|
config_currency_bsc: {
|
|
@@ -826956,7 +827067,8 @@ var evmConfig = {
|
|
|
826956
827067
|
gasTracker: {
|
|
826957
827068
|
type: "ledger",
|
|
826958
827069
|
explorerId: "bnb"
|
|
826959
|
-
}
|
|
827070
|
+
},
|
|
827071
|
+
showNfts: false
|
|
826960
827072
|
}
|
|
826961
827073
|
},
|
|
826962
827074
|
config_currency_callisto: {
|
|
@@ -826964,7 +827076,8 @@ var evmConfig = {
|
|
|
826964
827076
|
default: {
|
|
826965
827077
|
status: {
|
|
826966
827078
|
type: "active"
|
|
826967
|
-
}
|
|
827079
|
+
},
|
|
827080
|
+
showNfts: false
|
|
826968
827081
|
}
|
|
826969
827082
|
},
|
|
826970
827083
|
config_currency_dexon: {
|
|
@@ -826972,7 +827085,8 @@ var evmConfig = {
|
|
|
826972
827085
|
default: {
|
|
826973
827086
|
status: {
|
|
826974
827087
|
type: "active"
|
|
826975
|
-
}
|
|
827088
|
+
},
|
|
827089
|
+
showNfts: false
|
|
826976
827090
|
}
|
|
826977
827091
|
},
|
|
826978
827092
|
config_currency_ellaism: {
|
|
@@ -826980,7 +827094,8 @@ var evmConfig = {
|
|
|
826980
827094
|
default: {
|
|
826981
827095
|
status: {
|
|
826982
827096
|
type: "active"
|
|
826983
|
-
}
|
|
827097
|
+
},
|
|
827098
|
+
showNfts: false
|
|
826984
827099
|
}
|
|
826985
827100
|
},
|
|
826986
827101
|
config_currency_ethereum: {
|
|
@@ -827000,7 +827115,8 @@ var evmConfig = {
|
|
|
827000
827115
|
explorer: {
|
|
827001
827116
|
type: "ledger",
|
|
827002
827117
|
explorerId: "eth"
|
|
827003
|
-
}
|
|
827118
|
+
},
|
|
827119
|
+
showNfts: false
|
|
827004
827120
|
}
|
|
827005
827121
|
},
|
|
827006
827122
|
config_currency_sonic: {
|
|
@@ -827014,7 +827130,8 @@ var evmConfig = {
|
|
|
827014
827130
|
explorer: {
|
|
827015
827131
|
type: "etherscan",
|
|
827016
827132
|
uri: "https://proxyetherscan.api.live.ledger.com/v2/api/146"
|
|
827017
|
-
}
|
|
827133
|
+
},
|
|
827134
|
+
showNfts: false
|
|
827018
827135
|
}
|
|
827019
827136
|
},
|
|
827020
827137
|
config_currency_sonic_blaze: {
|
|
@@ -827028,7 +827145,8 @@ var evmConfig = {
|
|
|
827028
827145
|
explorer: {
|
|
827029
827146
|
type: "etherscan",
|
|
827030
827147
|
uri: "https://proxyetherscan.api.live.ledger.com/v2/api/57054"
|
|
827031
|
-
}
|
|
827148
|
+
},
|
|
827149
|
+
showNfts: false
|
|
827032
827150
|
}
|
|
827033
827151
|
},
|
|
827034
827152
|
config_currency_ethereum_classic: {
|
|
@@ -827048,7 +827166,8 @@ var evmConfig = {
|
|
|
827048
827166
|
gasTracker: {
|
|
827049
827167
|
type: "ledger",
|
|
827050
827168
|
explorerId: "etc"
|
|
827051
|
-
}
|
|
827169
|
+
},
|
|
827170
|
+
showNfts: false
|
|
827052
827171
|
}
|
|
827053
827172
|
},
|
|
827054
827173
|
config_currency_ether1: {
|
|
@@ -827056,7 +827175,8 @@ var evmConfig = {
|
|
|
827056
827175
|
default: {
|
|
827057
827176
|
status: {
|
|
827058
827177
|
type: "active"
|
|
827059
|
-
}
|
|
827178
|
+
},
|
|
827179
|
+
showNfts: false
|
|
827060
827180
|
}
|
|
827061
827181
|
},
|
|
827062
827182
|
config_currency_ethergem: {
|
|
@@ -827064,7 +827184,8 @@ var evmConfig = {
|
|
|
827064
827184
|
default: {
|
|
827065
827185
|
status: {
|
|
827066
827186
|
type: "active"
|
|
827067
|
-
}
|
|
827187
|
+
},
|
|
827188
|
+
showNfts: false
|
|
827068
827189
|
}
|
|
827069
827190
|
},
|
|
827070
827191
|
config_currency_ethersocial: {
|
|
@@ -827072,7 +827193,8 @@ var evmConfig = {
|
|
|
827072
827193
|
default: {
|
|
827073
827194
|
status: {
|
|
827074
827195
|
type: "active"
|
|
827075
|
-
}
|
|
827196
|
+
},
|
|
827197
|
+
showNfts: false
|
|
827076
827198
|
}
|
|
827077
827199
|
},
|
|
827078
827200
|
config_currency_expanse: {
|
|
@@ -827080,7 +827202,8 @@ var evmConfig = {
|
|
|
827080
827202
|
default: {
|
|
827081
827203
|
status: {
|
|
827082
827204
|
type: "active"
|
|
827083
|
-
}
|
|
827205
|
+
},
|
|
827206
|
+
showNfts: false
|
|
827084
827207
|
}
|
|
827085
827208
|
},
|
|
827086
827209
|
config_currency_gochain: {
|
|
@@ -827088,7 +827211,8 @@ var evmConfig = {
|
|
|
827088
827211
|
default: {
|
|
827089
827212
|
status: {
|
|
827090
827213
|
type: "active"
|
|
827091
|
-
}
|
|
827214
|
+
},
|
|
827215
|
+
showNfts: false
|
|
827092
827216
|
}
|
|
827093
827217
|
},
|
|
827094
827218
|
config_currency_hpb: {
|
|
@@ -827096,7 +827220,8 @@ var evmConfig = {
|
|
|
827096
827220
|
default: {
|
|
827097
827221
|
status: {
|
|
827098
827222
|
type: "active"
|
|
827099
|
-
}
|
|
827223
|
+
},
|
|
827224
|
+
showNfts: false
|
|
827100
827225
|
}
|
|
827101
827226
|
},
|
|
827102
827227
|
config_currency_mix: {
|
|
@@ -827104,7 +827229,8 @@ var evmConfig = {
|
|
|
827104
827229
|
default: {
|
|
827105
827230
|
status: {
|
|
827106
827231
|
type: "active"
|
|
827107
|
-
}
|
|
827232
|
+
},
|
|
827233
|
+
showNfts: false
|
|
827108
827234
|
}
|
|
827109
827235
|
},
|
|
827110
827236
|
config_currency_musicoin: {
|
|
@@ -827112,7 +827238,8 @@ var evmConfig = {
|
|
|
827112
827238
|
default: {
|
|
827113
827239
|
status: {
|
|
827114
827240
|
type: "active"
|
|
827115
|
-
}
|
|
827241
|
+
},
|
|
827242
|
+
showNfts: false
|
|
827116
827243
|
}
|
|
827117
827244
|
},
|
|
827118
827245
|
config_currency_pirl: {
|
|
@@ -827128,7 +827255,8 @@ var evmConfig = {
|
|
|
827128
827255
|
default: {
|
|
827129
827256
|
status: {
|
|
827130
827257
|
type: "active"
|
|
827131
|
-
}
|
|
827258
|
+
},
|
|
827259
|
+
showNfts: false
|
|
827132
827260
|
}
|
|
827133
827261
|
},
|
|
827134
827262
|
config_currency_polygon: {
|
|
@@ -827149,7 +827277,8 @@ var evmConfig = {
|
|
|
827149
827277
|
gasTracker: {
|
|
827150
827278
|
type: "ledger",
|
|
827151
827279
|
explorerId: "matic"
|
|
827152
|
-
}
|
|
827280
|
+
},
|
|
827281
|
+
showNfts: false
|
|
827153
827282
|
}
|
|
827154
827283
|
},
|
|
827155
827284
|
config_currency_reosc: {
|
|
@@ -827157,7 +827286,8 @@ var evmConfig = {
|
|
|
827157
827286
|
default: {
|
|
827158
827287
|
status: {
|
|
827159
827288
|
type: "active"
|
|
827160
|
-
}
|
|
827289
|
+
},
|
|
827290
|
+
showNfts: false
|
|
827161
827291
|
}
|
|
827162
827292
|
},
|
|
827163
827293
|
config_currency_thundercore: {
|
|
@@ -827165,7 +827295,8 @@ var evmConfig = {
|
|
|
827165
827295
|
default: {
|
|
827166
827296
|
status: {
|
|
827167
827297
|
type: "active"
|
|
827168
|
-
}
|
|
827298
|
+
},
|
|
827299
|
+
showNfts: false
|
|
827169
827300
|
}
|
|
827170
827301
|
},
|
|
827171
827302
|
config_currency_tomo: {
|
|
@@ -827173,7 +827304,8 @@ var evmConfig = {
|
|
|
827173
827304
|
default: {
|
|
827174
827305
|
status: {
|
|
827175
827306
|
type: "active"
|
|
827176
|
-
}
|
|
827307
|
+
},
|
|
827308
|
+
showNfts: false
|
|
827177
827309
|
}
|
|
827178
827310
|
},
|
|
827179
827311
|
config_currency_ubiq: {
|
|
@@ -827181,7 +827313,8 @@ var evmConfig = {
|
|
|
827181
827313
|
default: {
|
|
827182
827314
|
status: {
|
|
827183
827315
|
type: "active"
|
|
827184
|
-
}
|
|
827316
|
+
},
|
|
827317
|
+
showNfts: false
|
|
827185
827318
|
}
|
|
827186
827319
|
},
|
|
827187
827320
|
config_currency_wanchain: {
|
|
@@ -827189,7 +827322,8 @@ var evmConfig = {
|
|
|
827189
827322
|
default: {
|
|
827190
827323
|
status: {
|
|
827191
827324
|
type: "active"
|
|
827192
|
-
}
|
|
827325
|
+
},
|
|
827326
|
+
showNfts: false
|
|
827193
827327
|
}
|
|
827194
827328
|
},
|
|
827195
827329
|
config_currency_arbitrum: {
|
|
@@ -827205,7 +827339,8 @@ var evmConfig = {
|
|
|
827205
827339
|
explorer: {
|
|
827206
827340
|
type: "blockscout",
|
|
827207
827341
|
uri: "https://arbitrum.blockscout.com/api"
|
|
827208
|
-
}
|
|
827342
|
+
},
|
|
827343
|
+
showNfts: false
|
|
827209
827344
|
}
|
|
827210
827345
|
},
|
|
827211
827346
|
config_currency_cronos: {
|
|
@@ -827221,7 +827356,8 @@ var evmConfig = {
|
|
|
827221
827356
|
explorer: {
|
|
827222
827357
|
type: "blockscout",
|
|
827223
827358
|
uri: "https://cronos.org/explorer/api"
|
|
827224
|
-
}
|
|
827359
|
+
},
|
|
827360
|
+
showNfts: false
|
|
827225
827361
|
}
|
|
827226
827362
|
},
|
|
827227
827363
|
config_currency_fantom: {
|
|
@@ -827237,7 +827373,8 @@ var evmConfig = {
|
|
|
827237
827373
|
explorer: {
|
|
827238
827374
|
type: "etherscan",
|
|
827239
827375
|
uri: "https://proxyetherscan.api.live.ledger.com/v2/api/250"
|
|
827240
|
-
}
|
|
827376
|
+
},
|
|
827377
|
+
showNfts: false
|
|
827241
827378
|
}
|
|
827242
827379
|
},
|
|
827243
827380
|
config_currency_flare: {
|
|
@@ -827253,7 +827390,8 @@ var evmConfig = {
|
|
|
827253
827390
|
explorer: {
|
|
827254
827391
|
type: "blockscout",
|
|
827255
827392
|
uri: "https://flare-explorer.flare.network/api"
|
|
827256
|
-
}
|
|
827393
|
+
},
|
|
827394
|
+
showNfts: false
|
|
827257
827395
|
}
|
|
827258
827396
|
},
|
|
827259
827397
|
config_currency_songbird: {
|
|
@@ -827269,7 +827407,8 @@ var evmConfig = {
|
|
|
827269
827407
|
explorer: {
|
|
827270
827408
|
type: "blockscout",
|
|
827271
827409
|
uri: "https://songbird-explorer.flare.network/api"
|
|
827272
|
-
}
|
|
827410
|
+
},
|
|
827411
|
+
showNfts: false
|
|
827273
827412
|
}
|
|
827274
827413
|
},
|
|
827275
827414
|
config_currency_moonbeam: {
|
|
@@ -827285,7 +827424,8 @@ var evmConfig = {
|
|
|
827285
827424
|
explorer: {
|
|
827286
827425
|
type: "etherscan",
|
|
827287
827426
|
uri: "https://proxyetherscan.api.live.ledger.com/v2/api/1284"
|
|
827288
|
-
}
|
|
827427
|
+
},
|
|
827428
|
+
showNfts: false
|
|
827289
827429
|
}
|
|
827290
827430
|
},
|
|
827291
827431
|
config_currency_rsk: {
|
|
@@ -827301,7 +827441,8 @@ var evmConfig = {
|
|
|
827301
827441
|
explorer: {
|
|
827302
827442
|
type: "blockscout",
|
|
827303
827443
|
uri: "https://rootstock.blockscout.com/api"
|
|
827304
|
-
}
|
|
827444
|
+
},
|
|
827445
|
+
showNfts: false
|
|
827305
827446
|
}
|
|
827306
827447
|
},
|
|
827307
827448
|
config_currency_bittorrent: {
|
|
@@ -827317,7 +827458,8 @@ var evmConfig = {
|
|
|
827317
827458
|
explorer: {
|
|
827318
827459
|
type: "etherscan",
|
|
827319
827460
|
uri: "https://proxyetherscan.api.live.ledger.com/v2/api/199"
|
|
827320
|
-
}
|
|
827461
|
+
},
|
|
827462
|
+
showNfts: false
|
|
827321
827463
|
}
|
|
827322
827464
|
},
|
|
827323
827465
|
config_currency_optimism: {
|
|
@@ -827333,7 +827475,8 @@ var evmConfig = {
|
|
|
827333
827475
|
explorer: {
|
|
827334
827476
|
type: "blockscout",
|
|
827335
827477
|
uri: "https://optimism.blockscout.com/api"
|
|
827336
|
-
}
|
|
827478
|
+
},
|
|
827479
|
+
showNfts: false
|
|
827337
827480
|
}
|
|
827338
827481
|
},
|
|
827339
827482
|
config_currency_optimism_sepolia: {
|
|
@@ -827341,7 +827484,8 @@ var evmConfig = {
|
|
|
827341
827484
|
default: {
|
|
827342
827485
|
status: { type: "active" },
|
|
827343
827486
|
node: { type: "external", uri: "https://sepolia.optimism.io" },
|
|
827344
|
-
explorer: { type: "blockscout", uri: "https://optimism-sepolia.blockscout.com/api" }
|
|
827487
|
+
explorer: { type: "blockscout", uri: "https://optimism-sepolia.blockscout.com/api" },
|
|
827488
|
+
showNfts: false
|
|
827345
827489
|
}
|
|
827346
827490
|
},
|
|
827347
827491
|
config_currency_energy_web: {
|
|
@@ -827357,7 +827501,8 @@ var evmConfig = {
|
|
|
827357
827501
|
explorer: {
|
|
827358
827502
|
type: "blockscout",
|
|
827359
827503
|
uri: "https://explorer.energyweb.org/api"
|
|
827360
|
-
}
|
|
827504
|
+
},
|
|
827505
|
+
showNfts: false
|
|
827361
827506
|
}
|
|
827362
827507
|
},
|
|
827363
827508
|
config_currency_astar: {
|
|
@@ -827373,7 +827518,8 @@ var evmConfig = {
|
|
|
827373
827518
|
explorer: {
|
|
827374
827519
|
type: "blockscout",
|
|
827375
827520
|
uri: "https://astar.blockscout.com/api"
|
|
827376
|
-
}
|
|
827521
|
+
},
|
|
827522
|
+
showNfts: false
|
|
827377
827523
|
}
|
|
827378
827524
|
},
|
|
827379
827525
|
config_currency_metis: {
|
|
@@ -827389,7 +827535,8 @@ var evmConfig = {
|
|
|
827389
827535
|
explorer: {
|
|
827390
827536
|
type: "blockscout",
|
|
827391
827537
|
uri: "https://api.routescan.io/v2/network/mainnet/evm/1088/etherscan/api"
|
|
827392
|
-
}
|
|
827538
|
+
},
|
|
827539
|
+
showNfts: false
|
|
827393
827540
|
}
|
|
827394
827541
|
},
|
|
827395
827542
|
config_currency_boba: {
|
|
@@ -827405,7 +827552,8 @@ var evmConfig = {
|
|
|
827405
827552
|
explorer: {
|
|
827406
827553
|
type: "etherscan",
|
|
827407
827554
|
uri: "https://api.routescan.io/v2/network/mainnet/evm/288/etherscan"
|
|
827408
|
-
}
|
|
827555
|
+
},
|
|
827556
|
+
showNfts: false
|
|
827409
827557
|
}
|
|
827410
827558
|
},
|
|
827411
827559
|
config_currency_moonriver: {
|
|
@@ -827421,7 +827569,8 @@ var evmConfig = {
|
|
|
827421
827569
|
explorer: {
|
|
827422
827570
|
type: "etherscan",
|
|
827423
827571
|
uri: "https://proxyetherscan.api.live.ledger.com/v2/api/1285"
|
|
827424
|
-
}
|
|
827572
|
+
},
|
|
827573
|
+
showNfts: false
|
|
827425
827574
|
}
|
|
827426
827575
|
},
|
|
827427
827576
|
config_currency_velas_evm: {
|
|
@@ -827437,7 +827586,8 @@ var evmConfig = {
|
|
|
827437
827586
|
explorer: {
|
|
827438
827587
|
type: "blockscout",
|
|
827439
827588
|
uri: "https://evmexplorer.velas.com/api"
|
|
827440
|
-
}
|
|
827589
|
+
},
|
|
827590
|
+
showNfts: false
|
|
827441
827591
|
}
|
|
827442
827592
|
},
|
|
827443
827593
|
config_currency_syscoin: {
|
|
@@ -827453,7 +827603,8 @@ var evmConfig = {
|
|
|
827453
827603
|
explorer: {
|
|
827454
827604
|
type: "blockscout",
|
|
827455
827605
|
uri: "https://explorer.syscoin.org/api"
|
|
827456
|
-
}
|
|
827606
|
+
},
|
|
827607
|
+
showNfts: false
|
|
827457
827608
|
}
|
|
827458
827609
|
},
|
|
827459
827610
|
config_currency_telos_evm: {
|
|
@@ -827469,7 +827620,8 @@ var evmConfig = {
|
|
|
827469
827620
|
explorer: {
|
|
827470
827621
|
type: "teloscan",
|
|
827471
827622
|
uri: "https://api.teloscan.io/api"
|
|
827472
|
-
}
|
|
827623
|
+
},
|
|
827624
|
+
showNfts: false
|
|
827473
827625
|
}
|
|
827474
827626
|
},
|
|
827475
827627
|
config_currency_polygon_zk_evm: {
|
|
@@ -827485,7 +827637,8 @@ var evmConfig = {
|
|
|
827485
827637
|
explorer: {
|
|
827486
827638
|
type: "blockscout",
|
|
827487
827639
|
uri: "https://explorer-ui.cardona.zkevm-rpc.com/api"
|
|
827488
|
-
}
|
|
827640
|
+
},
|
|
827641
|
+
showNfts: false
|
|
827489
827642
|
}
|
|
827490
827643
|
},
|
|
827491
827644
|
config_currency_base: {
|
|
@@ -827499,9 +827652,10 @@ var evmConfig = {
|
|
|
827499
827652
|
uri: "https://developer-access-mainnet.base.org"
|
|
827500
827653
|
},
|
|
827501
827654
|
explorer: {
|
|
827502
|
-
type: "
|
|
827503
|
-
uri: "https://
|
|
827504
|
-
}
|
|
827655
|
+
type: "etherscan",
|
|
827656
|
+
uri: "https://proxyetherscan.api.live.ledger.com/v2/api/8453"
|
|
827657
|
+
},
|
|
827658
|
+
showNfts: false
|
|
827505
827659
|
}
|
|
827506
827660
|
},
|
|
827507
827661
|
config_currency_klaytn: {
|
|
@@ -827517,7 +827671,8 @@ var evmConfig = {
|
|
|
827517
827671
|
explorer: {
|
|
827518
827672
|
type: "klaytnfinder",
|
|
827519
827673
|
uri: "https://cypress-oapi.klaytnfinder.io/api"
|
|
827520
|
-
}
|
|
827674
|
+
},
|
|
827675
|
+
showNfts: false
|
|
827521
827676
|
}
|
|
827522
827677
|
},
|
|
827523
827678
|
config_currency_neon_evm: {
|
|
@@ -827533,7 +827688,8 @@ var evmConfig = {
|
|
|
827533
827688
|
explorer: {
|
|
827534
827689
|
type: "blockscout",
|
|
827535
827690
|
uri: "https://neon.blockscout.com/api"
|
|
827536
|
-
}
|
|
827691
|
+
},
|
|
827692
|
+
showNfts: false
|
|
827537
827693
|
}
|
|
827538
827694
|
},
|
|
827539
827695
|
config_currency_lukso: {
|
|
@@ -827549,7 +827705,8 @@ var evmConfig = {
|
|
|
827549
827705
|
explorer: {
|
|
827550
827706
|
type: "blockscout",
|
|
827551
827707
|
uri: "https://explorer.execution.mainnet.lukso.network/api/v1/"
|
|
827552
|
-
}
|
|
827708
|
+
},
|
|
827709
|
+
showNfts: false
|
|
827553
827710
|
}
|
|
827554
827711
|
},
|
|
827555
827712
|
config_currency_linea: {
|
|
@@ -827565,7 +827722,8 @@ var evmConfig = {
|
|
|
827565
827722
|
explorer: {
|
|
827566
827723
|
type: "etherscan",
|
|
827567
827724
|
uri: "https://proxyetherscan.api.live.ledger.com/v2/api/59144"
|
|
827568
|
-
}
|
|
827725
|
+
},
|
|
827726
|
+
showNfts: false
|
|
827569
827727
|
}
|
|
827570
827728
|
},
|
|
827571
827729
|
// testnets
|
|
@@ -827575,7 +827733,8 @@ var evmConfig = {
|
|
|
827575
827733
|
status: { type: "active" },
|
|
827576
827734
|
node: { type: "ledger", explorerId: "eth_sepolia" },
|
|
827577
827735
|
explorer: { type: "ledger", explorerId: "eth_sepolia" },
|
|
827578
|
-
gasTracker: { type: "ledger", explorerId: "eth_sepolia" }
|
|
827736
|
+
gasTracker: { type: "ledger", explorerId: "eth_sepolia" },
|
|
827737
|
+
showNfts: false
|
|
827579
827738
|
}
|
|
827580
827739
|
},
|
|
827581
827740
|
config_currency_ethereum_holesky: {
|
|
@@ -827584,7 +827743,8 @@ var evmConfig = {
|
|
|
827584
827743
|
status: { type: "active" },
|
|
827585
827744
|
node: { type: "ledger", explorerId: "eth_holesky" },
|
|
827586
827745
|
explorer: { type: "ledger", explorerId: "eth_holesky" },
|
|
827587
|
-
gasTracker: { type: "ledger", explorerId: "eth_holesky" }
|
|
827746
|
+
gasTracker: { type: "ledger", explorerId: "eth_holesky" },
|
|
827747
|
+
showNfts: false
|
|
827588
827748
|
}
|
|
827589
827749
|
},
|
|
827590
827750
|
config_currency_arbitrum_sepolia: {
|
|
@@ -827594,7 +827754,8 @@ var evmConfig = {
|
|
|
827594
827754
|
explorer: {
|
|
827595
827755
|
type: "etherscan",
|
|
827596
827756
|
uri: "https://proxyetherscan.api.live.ledger.com/v2/api/421614"
|
|
827597
|
-
}
|
|
827757
|
+
},
|
|
827758
|
+
showNfts: false
|
|
827598
827759
|
}
|
|
827599
827760
|
},
|
|
827600
827761
|
config_currency_polygon_zk_evm_testnet: {
|
|
@@ -827605,7 +827766,8 @@ var evmConfig = {
|
|
|
827605
827766
|
explorer: {
|
|
827606
827767
|
type: "etherscan",
|
|
827607
827768
|
uri: "https://proxyetherscan.api.live.ledger.com/v2/api/1442"
|
|
827608
|
-
}
|
|
827769
|
+
},
|
|
827770
|
+
showNfts: false
|
|
827609
827771
|
}
|
|
827610
827772
|
},
|
|
827611
827773
|
config_currency_base_sepolia: {
|
|
@@ -827613,7 +827775,8 @@ var evmConfig = {
|
|
|
827613
827775
|
default: {
|
|
827614
827776
|
status: { type: "active" },
|
|
827615
827777
|
node: { type: "external", uri: "https://sepolia.base.org" },
|
|
827616
|
-
explorer: { type: "blockscout", uri: "https://base-sepolia.blockscout.com/api" }
|
|
827778
|
+
explorer: { type: "blockscout", uri: "https://base-sepolia.blockscout.com/api" },
|
|
827779
|
+
showNfts: false
|
|
827617
827780
|
}
|
|
827618
827781
|
},
|
|
827619
827782
|
config_currency_linea_sepolia: {
|
|
@@ -827624,7 +827787,8 @@ var evmConfig = {
|
|
|
827624
827787
|
explorer: {
|
|
827625
827788
|
type: "etherscan",
|
|
827626
827789
|
uri: "https://proxyetherscan.api.live.ledger.com/v2/api/59141"
|
|
827627
|
-
}
|
|
827790
|
+
},
|
|
827791
|
+
showNfts: false
|
|
827628
827792
|
}
|
|
827629
827793
|
},
|
|
827630
827794
|
config_currency_blast: {
|
|
@@ -827632,7 +827796,8 @@ var evmConfig = {
|
|
|
827632
827796
|
default: {
|
|
827633
827797
|
status: { type: "active" },
|
|
827634
827798
|
node: { type: "external", uri: "https://rpc.blast.io" },
|
|
827635
|
-
explorer: { type: "blockscout", uri: "https://blast.blockscout.com/api" }
|
|
827799
|
+
explorer: { type: "blockscout", uri: "https://blast.blockscout.com/api" },
|
|
827800
|
+
showNfts: false
|
|
827636
827801
|
}
|
|
827637
827802
|
},
|
|
827638
827803
|
config_currency_blast_sepolia: {
|
|
@@ -827640,7 +827805,8 @@ var evmConfig = {
|
|
|
827640
827805
|
default: {
|
|
827641
827806
|
status: { type: "active" },
|
|
827642
827807
|
node: { type: "external", uri: "https://sepolia.blast.io" },
|
|
827643
|
-
explorer: { type: "blockscout", uri: "https://blast-testnet.blockscout.com/api" }
|
|
827808
|
+
explorer: { type: "blockscout", uri: "https://blast-testnet.blockscout.com/api" },
|
|
827809
|
+
showNfts: false
|
|
827644
827810
|
}
|
|
827645
827811
|
},
|
|
827646
827812
|
config_currency_scroll: {
|
|
@@ -827648,7 +827814,8 @@ var evmConfig = {
|
|
|
827648
827814
|
default: {
|
|
827649
827815
|
status: { type: "active" },
|
|
827650
827816
|
node: { type: "external", uri: "https://rpc.scroll.io" },
|
|
827651
|
-
explorer: { type: "blockscout", uri: "https://scroll.blockscout.com/api" }
|
|
827817
|
+
explorer: { type: "blockscout", uri: "https://scroll.blockscout.com/api" },
|
|
827818
|
+
showNfts: false
|
|
827652
827819
|
}
|
|
827653
827820
|
},
|
|
827654
827821
|
config_currency_scroll_sepolia: {
|
|
@@ -827656,7 +827823,8 @@ var evmConfig = {
|
|
|
827656
827823
|
default: {
|
|
827657
827824
|
status: { type: "active" },
|
|
827658
827825
|
node: { type: "external", uri: "https://sepolia-rpc.scroll.io" },
|
|
827659
|
-
explorer: { type: "blockscout", uri: "https://scroll-sepolia.blockscout.com/api" }
|
|
827826
|
+
explorer: { type: "blockscout", uri: "https://scroll-sepolia.blockscout.com/api" },
|
|
827827
|
+
showNfts: false
|
|
827660
827828
|
}
|
|
827661
827829
|
},
|
|
827662
827830
|
config_currency_etherlink: {
|
|
@@ -827664,7 +827832,8 @@ var evmConfig = {
|
|
|
827664
827832
|
default: {
|
|
827665
827833
|
status: { type: "active" },
|
|
827666
827834
|
node: { type: "external", uri: "https://node.mainnet.etherlink.com" },
|
|
827667
|
-
explorer: { type: "blockscout", uri: "https://explorer.etherlink.com/api" }
|
|
827835
|
+
explorer: { type: "blockscout", uri: "https://explorer.etherlink.com/api" },
|
|
827836
|
+
showNfts: false
|
|
827668
827837
|
}
|
|
827669
827838
|
},
|
|
827670
827839
|
config_currency_zksync: {
|
|
@@ -827672,7 +827841,8 @@ var evmConfig = {
|
|
|
827672
827841
|
default: {
|
|
827673
827842
|
status: { type: "active" },
|
|
827674
827843
|
node: { type: "external", uri: "https://mainnet.era.zksync.io" },
|
|
827675
|
-
explorer: { type: "blockscout", uri: "https://zksync.blockscout.com/api" }
|
|
827844
|
+
explorer: { type: "blockscout", uri: "https://zksync.blockscout.com/api" },
|
|
827845
|
+
showNfts: false
|
|
827676
827846
|
}
|
|
827677
827847
|
},
|
|
827678
827848
|
config_currency_zksync_sepolia: {
|
|
@@ -827680,7 +827850,8 @@ var evmConfig = {
|
|
|
827680
827850
|
default: {
|
|
827681
827851
|
status: { type: "active" },
|
|
827682
827852
|
node: { type: "external", uri: "https://sepolia.era.zksync.dev" },
|
|
827683
|
-
explorer: { type: "blockscout", uri: "https://zksync-sepolia.blockscout.com/api" }
|
|
827853
|
+
explorer: { type: "blockscout", uri: "https://zksync-sepolia.blockscout.com/api" },
|
|
827854
|
+
showNfts: false
|
|
827684
827855
|
}
|
|
827685
827856
|
}
|
|
827686
827857
|
};
|
|
@@ -828080,14 +828251,14 @@ var import_bignumber393 = require("bignumber.js");
|
|
|
828080
828251
|
var import_uniq2 = __toESM(require("lodash/uniq"));
|
|
828081
828252
|
var import_groupBy6 = __toESM(require("lodash/groupBy"));
|
|
828082
828253
|
init_lib_es2();
|
|
828083
|
-
var
|
|
828254
|
+
var import_invariant102 = __toESM(require("invariant"));
|
|
828084
828255
|
var import_flatMap25 = __toESM(require("lodash/flatMap"));
|
|
828085
828256
|
|
|
828086
828257
|
// ../../libs/coin-framework/lib-es/bot/specs.js
|
|
828087
828258
|
init_lib_es2();
|
|
828088
828259
|
var import_bignumber369 = __toESM(require("bignumber.js"));
|
|
828089
828260
|
var import_expect = __toESM(require_build21());
|
|
828090
|
-
var
|
|
828261
|
+
var import_invariant69 = __toESM(require("invariant"));
|
|
828091
828262
|
var import_sample2 = __toESM(require("lodash/sample"));
|
|
828092
828263
|
var stepValueTransformDefault = (s49) => s49.trim();
|
|
828093
828264
|
function pickSiblings(siblings, maxAccount10 = 5) {
|
|
@@ -828215,7 +828386,7 @@ function formatDeviceAmount(currency24, value6, options22 = defaultFormatOptions
|
|
|
828215
828386
|
function expectSiblingsHaveSpendablePartGreaterThan(siblings, threshold) {
|
|
828216
828387
|
const spendableTotal = siblings.reduce((acc, a65) => acc.plus(a65.spendableBalance), new import_bignumber369.default(0));
|
|
828217
828388
|
const total = siblings.reduce((acc, a65) => acc.plus(a65.balance), new import_bignumber369.default(0));
|
|
828218
|
-
(0,
|
|
828389
|
+
(0, import_invariant69.default)(spendableTotal.div(total).gt(threshold), "the spendable part of accounts is sufficient (threshold: %s)", threshold);
|
|
828219
828390
|
}
|
|
828220
828391
|
var genericTestDestination = ({ destination, operation, destinationBeforeTransaction, sendingOperation }) => {
|
|
828221
828392
|
const amount = sendingOperation.value.minus(sendingOperation.fee);
|
|
@@ -828233,7 +828404,7 @@ var genericTestDestination = ({ destination, operation, destinationBeforeTransac
|
|
|
828233
828404
|
init_lib_es5();
|
|
828234
828405
|
var import_bignumber370 = require("bignumber.js");
|
|
828235
828406
|
var import_expect2 = __toESM(require_build21());
|
|
828236
|
-
var
|
|
828407
|
+
var import_invariant70 = __toESM(require("invariant"));
|
|
828237
828408
|
var import_sample3 = __toESM(require("lodash/sample"));
|
|
828238
828409
|
|
|
828239
828410
|
// ../../libs/coin-modules/coin-algorand/lib-es/speculos-deviceActions.js
|
|
@@ -828335,7 +828506,7 @@ var currency6 = getCryptoCurrencyById("algorand");
|
|
|
828335
828506
|
var minBalanceNewAccount = parseCurrencyUnit(currency6.units[0], "0.1");
|
|
828336
828507
|
var checkSendableToEmptyAccount = (amount, recipient) => {
|
|
828337
828508
|
if (isAccountEmpty(recipient) && amount.lte(minBalanceNewAccount)) {
|
|
828338
|
-
(0,
|
|
828509
|
+
(0, import_invariant70.default)(amount.gt(minBalanceNewAccount), "not enough funds to send to new account");
|
|
828339
828510
|
}
|
|
828340
828511
|
};
|
|
828341
828512
|
var getAssetsWithBalance = (account3) => {
|
|
@@ -828355,7 +828526,7 @@ var getRandomAssetId = (account3) => {
|
|
|
828355
828526
|
}, []);
|
|
828356
828527
|
const ASAs = listTokensForCryptoCurrency(account3.currency).map((asa) => asa.id);
|
|
828357
828528
|
const diff = ASAs?.filter((asa) => !optedInASA?.includes(asa));
|
|
828358
|
-
(0,
|
|
828529
|
+
(0, import_invariant70.default)(diff && diff.length > 0, "already got all optin");
|
|
828359
828530
|
return (0, import_sample3.default)(diff);
|
|
828360
828531
|
};
|
|
828361
828532
|
var algorand = {
|
|
@@ -828373,7 +828544,7 @@ var algorand = {
|
|
|
828373
828544
|
maxRun: 1,
|
|
828374
828545
|
testDestination: genericTestDestination,
|
|
828375
828546
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
828376
|
-
(0,
|
|
828547
|
+
(0, import_invariant70.default)(maxSpendable.gt(0), "Spendable balance is too low");
|
|
828377
828548
|
const sibling = pickSiblings(siblings, 4);
|
|
828378
828549
|
const recipient = sibling.freshAddress;
|
|
828379
828550
|
const transaction = bridge28.createTransaction(account3);
|
|
@@ -828403,7 +828574,7 @@ var algorand = {
|
|
|
828403
828574
|
maxRun: 1,
|
|
828404
828575
|
testDestination: genericTestDestination,
|
|
828405
828576
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
828406
|
-
(0,
|
|
828577
|
+
(0, import_invariant70.default)(maxSpendable.gt(0), "Spendable balance is too low");
|
|
828407
828578
|
const sibling = pickSiblings(siblings, 4);
|
|
828408
828579
|
const amount = maxSpendable;
|
|
828409
828580
|
checkSendableToEmptyAccount(amount, sibling);
|
|
@@ -828428,9 +828599,9 @@ var algorand = {
|
|
|
828428
828599
|
feature: "tokens",
|
|
828429
828600
|
maxRun: 1,
|
|
828430
828601
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
828431
|
-
(0,
|
|
828602
|
+
(0, import_invariant70.default)(maxSpendable.gt(0), "Spendable balance is too low");
|
|
828432
828603
|
const subAccount = (0, import_sample3.default)(getAssetsWithBalance(account3));
|
|
828433
|
-
(0,
|
|
828604
|
+
(0, import_invariant70.default)(subAccount && subAccount.type === "TokenAccount", "no subAccount with ASA");
|
|
828434
828605
|
const assetId = subAccount.token.id;
|
|
828435
828606
|
const sibling = pickSiblingsOptedIn(siblings, assetId);
|
|
828436
828607
|
const transaction = bridge28.createTransaction(account3);
|
|
@@ -828466,12 +828637,12 @@ var algorand = {
|
|
|
828466
828637
|
feature: "tokens",
|
|
828467
828638
|
maxRun: 1,
|
|
828468
828639
|
transaction: ({ account: account3, bridge: bridge28, maxSpendable }) => {
|
|
828469
|
-
(0,
|
|
828640
|
+
(0, import_invariant70.default)(maxSpendable.gt(new import_bignumber370.BigNumber(1e5)), "Spendable balance is too low");
|
|
828470
828641
|
const transaction = bridge28.createTransaction(account3);
|
|
828471
828642
|
const mode = "optIn";
|
|
828472
828643
|
const assetId = getRandomAssetId(account3);
|
|
828473
828644
|
const subAccount = account3.subAccounts ? account3.subAccounts.find((a65) => a65.id.includes(assetId)) : null;
|
|
828474
|
-
(0,
|
|
828645
|
+
(0, import_invariant70.default)(!subAccount, "already opt-in");
|
|
828475
828646
|
const updates7 = [
|
|
828476
828647
|
{
|
|
828477
828648
|
mode
|
|
@@ -828487,7 +828658,7 @@ var algorand = {
|
|
|
828487
828658
|
},
|
|
828488
828659
|
// eslint-disable-next-line no-unused-vars
|
|
828489
828660
|
test: ({ account: account3, transaction }) => {
|
|
828490
|
-
(0,
|
|
828661
|
+
(0, import_invariant70.default)(transaction.assetId, "should have an assetId");
|
|
828491
828662
|
const assetId = extractTokenId(transaction.assetId);
|
|
828492
828663
|
botTest("have sub account with asset id", () => (0, import_expect2.default)(account3.subAccounts && account3.subAccounts.some((a65) => a65.id.endsWith(assetId))).toBe(true));
|
|
828493
828664
|
}
|
|
@@ -828498,8 +828669,8 @@ var algorand = {
|
|
|
828498
828669
|
maxRun: 1,
|
|
828499
828670
|
transaction: ({ account: account3, bridge: bridge28, maxSpendable }) => {
|
|
828500
828671
|
const rewards = account3.algorandResources?.rewards;
|
|
828501
|
-
(0,
|
|
828502
|
-
(0,
|
|
828672
|
+
(0, import_invariant70.default)(rewards && rewards.gt(0), "No pending rewards");
|
|
828673
|
+
(0, import_invariant70.default)(maxSpendable.gt(0), "Spendable balance is too low");
|
|
828503
828674
|
const transaction = bridge28.createTransaction(account3);
|
|
828504
828675
|
const mode = "claimReward";
|
|
828505
828676
|
const updates7 = [
|
|
@@ -828523,7 +828694,7 @@ var specs_default = {
|
|
|
828523
828694
|
};
|
|
828524
828695
|
|
|
828525
828696
|
// ../../libs/coin-modules/coin-aptos/lib-es/test/bot-specs.js
|
|
828526
|
-
var
|
|
828697
|
+
var import_invariant71 = __toESM(require("invariant"));
|
|
828527
828698
|
var import_expect3 = __toESM(require_build21());
|
|
828528
828699
|
init_lib_es5();
|
|
828529
828700
|
var import_bignumber371 = __toESM(require("bignumber.js"));
|
|
@@ -828584,7 +828755,7 @@ var aptosSpecs = {
|
|
|
828584
828755
|
testTimeout: 6 * 60 * 1e3,
|
|
828585
828756
|
minViableAmount: MIN_SAFE,
|
|
828586
828757
|
transactionCheck: ({ maxSpendable }) => {
|
|
828587
|
-
(0,
|
|
828758
|
+
(0, import_invariant71.default)(maxSpendable.gt(MIN_SAFE), "balance is too low");
|
|
828588
828759
|
},
|
|
828589
828760
|
mutations: [
|
|
828590
828761
|
{
|
|
@@ -828593,7 +828764,7 @@ var aptosSpecs = {
|
|
|
828593
828764
|
maxRun: 1,
|
|
828594
828765
|
testDestination: genericTestDestination,
|
|
828595
828766
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
828596
|
-
(0,
|
|
828767
|
+
(0, import_invariant71.default)(maxSpendable.gt(MIN_SAFE), "balance is too low");
|
|
828597
828768
|
const sibling = pickSiblings(siblings, maxAccount);
|
|
828598
828769
|
const recipient = sibling.freshAddress;
|
|
828599
828770
|
const amount = maxSpendable.div(2).integerValue();
|
|
@@ -828645,7 +828816,7 @@ var bot_specs_default = {
|
|
|
828645
828816
|
// ../../libs/coin-modules/coin-bitcoin/lib-es/specs.js
|
|
828646
828817
|
var import_expect4 = __toESM(require_build21());
|
|
828647
828818
|
var import_bignumber372 = require("bignumber.js");
|
|
828648
|
-
var
|
|
828819
|
+
var import_invariant72 = __toESM(require("invariant"));
|
|
828649
828820
|
var import_bchaddrjs2 = __toESM(require_bchaddr());
|
|
828650
828821
|
var import_sample4 = __toESM(require("lodash/sample"));
|
|
828651
828822
|
init_lib_es2();
|
|
@@ -828712,13 +828883,13 @@ var acceptTransaction3 = deviceActionFlow({
|
|
|
828712
828883
|
|
|
828713
828884
|
// ../../libs/coin-modules/coin-bitcoin/lib-es/specs.js
|
|
828714
828885
|
var genericTest = ({ operation, account: account3, transaction, status, accountBeforeTransaction }) => {
|
|
828715
|
-
(0,
|
|
828886
|
+
(0, import_invariant72.default)(Date.now() - operation.date.getTime() < 1e6, "operation time to be recent");
|
|
828716
828887
|
botTest("account balance decreased with operation value", () => (0, import_expect4.default)(account3.balance.toString()).toBe(accountBeforeTransaction.balance.minus(operation.value).toString()));
|
|
828717
828888
|
const { txInputs, txOutputs } = status;
|
|
828718
|
-
(0,
|
|
828719
|
-
(0,
|
|
828889
|
+
(0, import_invariant72.default)(txInputs, "tx inputs defined");
|
|
828890
|
+
(0, import_invariant72.default)(txOutputs, "tx outputs defined");
|
|
828720
828891
|
const { bitcoinResources } = accountBeforeTransaction;
|
|
828721
|
-
(0,
|
|
828892
|
+
(0, import_invariant72.default)(bitcoinResources, "bitcoin resources");
|
|
828722
828893
|
const nonDeterministicPicking = transaction.utxoStrategy.strategy === bitcoinPickingStrategy.OPTIMIZE_SIZE;
|
|
828723
828894
|
const asSorted = (opShape) => ({
|
|
828724
828895
|
senders: opShape.senders.slice(0).sort(),
|
|
@@ -828747,7 +828918,7 @@ var bitcoinLikeMutations = ({ minimalAmount: minimalAmount11 = genericMinimalAmo
|
|
|
828747
828918
|
feature: "send",
|
|
828748
828919
|
maxRun: 1,
|
|
828749
828920
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
828750
|
-
(0,
|
|
828921
|
+
(0, import_invariant72.default)(maxSpendable.gt(minimalAmount11), "balance is too low");
|
|
828751
828922
|
const sibling = pickSiblings(siblings, targetAccountSize);
|
|
828752
828923
|
const recipient = recipientVariation(sibling.freshAddress);
|
|
828753
828924
|
const amount = maxSpendable.div(1.9 + 0.2 * Math.random()).integerValue();
|
|
@@ -828781,7 +828952,7 @@ var bitcoinLikeMutations = ({ minimalAmount: minimalAmount11 = genericMinimalAmo
|
|
|
828781
828952
|
feature: "send",
|
|
828782
828953
|
maxRun: 1,
|
|
828783
828954
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
828784
|
-
(0,
|
|
828955
|
+
(0, import_invariant72.default)(maxSpendable.gt(minimalAmount11), "balance is too low");
|
|
828785
828956
|
const sibling = pickSiblings(siblings, targetAccountSize);
|
|
828786
828957
|
const transaction = {
|
|
828787
828958
|
...bridge28.createTransaction(account3),
|
|
@@ -828814,16 +828985,16 @@ var bitcoinLikeMutations = ({ minimalAmount: minimalAmount11 = genericMinimalAmo
|
|
|
828814
828985
|
feature: "send",
|
|
828815
828986
|
maxRun: 1,
|
|
828816
828987
|
transaction: ({ account: account3, bridge: bridge28, siblings, maxSpendable }) => {
|
|
828817
|
-
(0,
|
|
828988
|
+
(0, import_invariant72.default)(maxSpendable.gt(minimalAmount11), "balance is too low");
|
|
828818
828989
|
const sibling = pickSiblings(siblings, targetAccountSize);
|
|
828819
828990
|
const { bitcoinResources } = account3;
|
|
828820
|
-
(0,
|
|
828991
|
+
(0, import_invariant72.default)(bitcoinResources, "bitcoin resources");
|
|
828821
828992
|
const transaction = {
|
|
828822
828993
|
...bridge28.createTransaction(account3),
|
|
828823
828994
|
feePerByte: new import_bignumber372.BigNumber(1e-4)
|
|
828824
828995
|
};
|
|
828825
828996
|
const utxo = (0, import_sample4.default)(bitcoinResources.utxos.filter((u50) => u50.blockHeight && u50.value.gt(genericMinimalAmount)));
|
|
828826
|
-
(0,
|
|
828997
|
+
(0, import_invariant72.default)(utxo, "no confirmed utxo");
|
|
828827
828998
|
return {
|
|
828828
828999
|
transaction,
|
|
828829
829000
|
updates: [
|
|
@@ -828849,7 +829020,7 @@ var bitcoinLikeMutations = ({ minimalAmount: minimalAmount11 = genericMinimalAmo
|
|
|
828849
829020
|
testDestination,
|
|
828850
829021
|
test: ({ accountBeforeTransaction, account: account3, operation, transaction }) => {
|
|
828851
829022
|
const utxo = (accountBeforeTransaction.bitcoinResources?.utxos || []).find((utxo2) => !transaction.utxoStrategy.excludeUTXOs.some((u50) => u50.hash === utxo2.hash && u50.outputIndex === utxo2.outputIndex));
|
|
828852
|
-
(0,
|
|
829023
|
+
(0, import_invariant72.default)(utxo, "utxo available");
|
|
828853
829024
|
botTest("sender is only the utxo address", () => {
|
|
828854
829025
|
let expectedSender = utxo.address;
|
|
828855
829026
|
if (account3.currency.id === "bitcoin_cash" && expectedSender) {
|
|
@@ -828867,10 +829038,10 @@ var bitcoinLikeMutations = ({ minimalAmount: minimalAmount11 = genericMinimalAmo
|
|
|
828867
829038
|
feature: "send",
|
|
828868
829039
|
maxRun: 1,
|
|
828869
829040
|
transaction: ({ account: account3, bridge: bridge28, siblings, maxSpendable }) => {
|
|
828870
|
-
(0,
|
|
829041
|
+
(0, import_invariant72.default)(maxSpendable.gt(minimalAmount11), "balance is too low");
|
|
828871
829042
|
const sibling = pickSiblings(siblings, targetAccountSize);
|
|
828872
829043
|
const { bitcoinResources } = account3;
|
|
828873
|
-
(0,
|
|
829044
|
+
(0, import_invariant72.default)(bitcoinResources, "bitcoin resources");
|
|
828874
829045
|
const transaction = {
|
|
828875
829046
|
...bridge28.createTransaction(account3),
|
|
828876
829047
|
feePerByte: new import_bignumber372.BigNumber(1e-4),
|
|
@@ -828899,7 +829070,7 @@ var bitcoinLikeMutations = ({ minimalAmount: minimalAmount11 = genericMinimalAmo
|
|
|
828899
829070
|
feature: "sendMax",
|
|
828900
829071
|
maxRun: 1,
|
|
828901
829072
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
828902
|
-
(0,
|
|
829073
|
+
(0, import_invariant72.default)(maxSpendable.gt(minimalAmount11), "balance is too low");
|
|
828903
829074
|
const sibling = pickSiblings(siblings, targetAccountSize);
|
|
828904
829075
|
const recipient = recipientVariation(sibling.freshAddress);
|
|
828905
829076
|
const transaction = {
|
|
@@ -829170,7 +829341,7 @@ var specs_default2 = {
|
|
|
829170
829341
|
var import_expect5 = __toESM(require_build21());
|
|
829171
829342
|
init_lib_es5();
|
|
829172
829343
|
var import_bignumber373 = __toESM(require("bignumber.js"));
|
|
829173
|
-
var
|
|
829344
|
+
var import_invariant73 = __toESM(require("invariant"));
|
|
829174
829345
|
var import_typhonjs13 = __toESM(require_dist7());
|
|
829175
829346
|
|
|
829176
829347
|
// ../../libs/coin-modules/coin-cardano/lib-es/speculos-deviceActions.js
|
|
@@ -829322,12 +829493,12 @@ var cardano = {
|
|
|
829322
829493
|
feature: "tokens",
|
|
829323
829494
|
maxRun: 1,
|
|
829324
829495
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
829325
|
-
(0,
|
|
829496
|
+
(0, import_invariant73.default)(maxSpendable.gte(minSpendableRequiredForTokenTx), "balance is too low");
|
|
829326
829497
|
const sibling = pickSiblings(siblings, maxAccounts);
|
|
829327
829498
|
const recipient = sibling.freshAddress;
|
|
829328
829499
|
const transaction = bridge28.createTransaction(account3);
|
|
829329
829500
|
const subAccount = account3.subAccounts?.find((subAccount2) => subAccount2.balance.gt(1));
|
|
829330
|
-
(0,
|
|
829501
|
+
(0, import_invariant73.default)(subAccount, "No token account with balance");
|
|
829331
829502
|
const updates7 = [
|
|
829332
829503
|
{ subAccountId: subAccount.id },
|
|
829333
829504
|
{ recipient },
|
|
@@ -829353,7 +829524,7 @@ var cardano = {
|
|
|
829353
829524
|
feature: "send",
|
|
829354
829525
|
maxRun: 1,
|
|
829355
829526
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
829356
|
-
(0,
|
|
829527
|
+
(0, import_invariant73.default)(maxSpendable.gt(minBalanceRequired), "balance is too low");
|
|
829357
829528
|
const sibling = pickSiblings(siblings, maxAccounts);
|
|
829358
829529
|
const recipient = sibling.freshAddress;
|
|
829359
829530
|
const transaction = bridge28.createTransaction(account3);
|
|
@@ -829390,7 +829561,7 @@ var cardano = {
|
|
|
829390
829561
|
maxRun: 1,
|
|
829391
829562
|
testDestination: genericTestDestination,
|
|
829392
829563
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
829393
|
-
(0,
|
|
829564
|
+
(0, import_invariant73.default)(maxSpendable.gt(minBalanceRequiredForMaxSend), "balance is too low");
|
|
829394
829565
|
const sibling = pickSiblings(siblings, maxAccounts);
|
|
829395
829566
|
const recipient = sibling.freshAddress;
|
|
829396
829567
|
const transaction = bridge28.createTransaction(account3);
|
|
@@ -829418,7 +829589,7 @@ var cardano = {
|
|
|
829418
829589
|
feature: "staking",
|
|
829419
829590
|
maxRun: 1,
|
|
829420
829591
|
transaction: ({ account: account3, bridge: bridge28, maxSpendable }) => {
|
|
829421
|
-
(0,
|
|
829592
|
+
(0, import_invariant73.default)(maxSpendable.gte(minBalanceRequiredForDelegate), "balance is too low");
|
|
829422
829593
|
const transaction = bridge28.createTransaction(account3);
|
|
829423
829594
|
return {
|
|
829424
829595
|
transaction,
|
|
@@ -829450,8 +829621,8 @@ var cardano = {
|
|
|
829450
829621
|
feature: "staking",
|
|
829451
829622
|
maxRun: 1,
|
|
829452
829623
|
transaction: ({ account: account3, bridge: bridge28, maxSpendable }) => {
|
|
829453
|
-
(0,
|
|
829454
|
-
(0,
|
|
829624
|
+
(0, import_invariant73.default)(maxSpendable.gte(minBalanceRequiredForDelegate), "balance is too low");
|
|
829625
|
+
(0, import_invariant73.default)(account3.cardanoResources.delegation?.poolId, "account should already be delegated to redelegate");
|
|
829455
829626
|
const transaction = bridge28.createTransaction(account3);
|
|
829456
829627
|
return {
|
|
829457
829628
|
transaction,
|
|
@@ -829477,8 +829648,8 @@ var cardano = {
|
|
|
829477
829648
|
feature: "staking",
|
|
829478
829649
|
maxRun: 1,
|
|
829479
829650
|
transaction: ({ account: account3, bridge: bridge28, maxSpendable }) => {
|
|
829480
|
-
(0,
|
|
829481
|
-
(0,
|
|
829651
|
+
(0, import_invariant73.default)(maxSpendable.gte(minBalanceRequiredForDelegate), "balance is too low");
|
|
829652
|
+
(0, import_invariant73.default)(account3.cardanoResources.delegation?.poolId, "account should already be delegated to undelegate");
|
|
829482
829653
|
const transaction = bridge28.createTransaction(account3);
|
|
829483
829654
|
return {
|
|
829484
829655
|
transaction,
|
|
@@ -829503,7 +829674,7 @@ var cardano = {
|
|
|
829503
829674
|
var specs_default3 = { cardano };
|
|
829504
829675
|
|
|
829505
829676
|
// ../../libs/coin-modules/coin-casper/lib-es/test/bot-specs.js
|
|
829506
|
-
var
|
|
829677
|
+
var import_invariant74 = __toESM(require("invariant"));
|
|
829507
829678
|
init_lib_es5();
|
|
829508
829679
|
var import_bignumber374 = __toESM(require("bignumber.js"));
|
|
829509
829680
|
var import_expect6 = __toESM(require_build21());
|
|
@@ -829571,7 +829742,7 @@ var casperSpecs = {
|
|
|
829571
829742
|
testTimeout: 6 * 60 * 1e3,
|
|
829572
829743
|
minViableAmount: MIN_SAFE2,
|
|
829573
829744
|
transactionCheck: ({ maxSpendable }) => {
|
|
829574
|
-
(0,
|
|
829745
|
+
(0, import_invariant74.default)(maxSpendable.gt(MIN_SAFE2), "balance is too low");
|
|
829575
829746
|
},
|
|
829576
829747
|
mutations: [
|
|
829577
829748
|
{
|
|
@@ -829580,7 +829751,7 @@ var casperSpecs = {
|
|
|
829580
829751
|
maxRun: 1,
|
|
829581
829752
|
testDestination: genericTestDestination,
|
|
829582
829753
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
829583
|
-
(0,
|
|
829754
|
+
(0, import_invariant74.default)(maxSpendable.gt(MIN_SAFE2), "balance is too low");
|
|
829584
829755
|
const sibling = pickSiblings(siblings, maxAccount2);
|
|
829585
829756
|
const recipient = sibling.freshAddress;
|
|
829586
829757
|
const amount = maxSpendable.div(2).integerValue();
|
|
@@ -829658,7 +829829,7 @@ var bot_specs_default2 = {
|
|
|
829658
829829
|
init_lib_es5();
|
|
829659
829830
|
|
|
829660
829831
|
// ../../libs/coin-modules/coin-celo/lib-es/test/specs/createSendMutation.js
|
|
829661
|
-
var
|
|
829832
|
+
var import_invariant75 = __toESM(require("invariant"));
|
|
829662
829833
|
var maxAccount3 = 10;
|
|
829663
829834
|
var currency8 = getCryptoCurrencyById("celo");
|
|
829664
829835
|
var minimalAmount = parseCurrencyUnit(currency8.units[0], "0.01");
|
|
@@ -829667,7 +829838,7 @@ var createSend50PercentMutation = () => ({
|
|
|
829667
829838
|
feature: "send",
|
|
829668
829839
|
maxRun: 1,
|
|
829669
829840
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
829670
|
-
(0,
|
|
829841
|
+
(0, import_invariant75.default)(maxSpendable.gt(minimalAmount), "Celo: Move 50% | balance is too low");
|
|
829671
829842
|
const sibling = pickSiblings(siblings, maxAccount3);
|
|
829672
829843
|
const recipient = sibling.freshAddress;
|
|
829673
829844
|
const amount = maxSpendable.div(2).integerValue();
|
|
@@ -829682,7 +829853,7 @@ var createSendMaxMutation = () => ({
|
|
|
829682
829853
|
feature: "sendMax",
|
|
829683
829854
|
maxRun: 1,
|
|
829684
829855
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
829685
|
-
(0,
|
|
829856
|
+
(0, import_invariant75.default)(maxSpendable.gt(minimalAmount), "Celo: Send Max | Balance is too low");
|
|
829686
829857
|
const sibling = pickSiblings(siblings, maxAccount3);
|
|
829687
829858
|
const recipient = sibling.freshAddress;
|
|
829688
829859
|
return {
|
|
@@ -829693,7 +829864,7 @@ var createSendMaxMutation = () => ({
|
|
|
829693
829864
|
});
|
|
829694
829865
|
|
|
829695
829866
|
// ../../libs/coin-modules/coin-celo/lib-es/test/specs/createLockMutation.js
|
|
829696
|
-
var
|
|
829867
|
+
var import_invariant76 = __toESM(require("invariant"));
|
|
829697
829868
|
var currency9 = getCryptoCurrencyById("celo");
|
|
829698
829869
|
var minimalAmount2 = parseCurrencyUnit(currency9.units[0], "0.005");
|
|
829699
829870
|
var createLockMutation = () => ({
|
|
@@ -829702,10 +829873,10 @@ var createLockMutation = () => ({
|
|
|
829702
829873
|
maxRun: 1,
|
|
829703
829874
|
transaction: ({ account: account3, bridge: bridge28, maxSpendable }) => {
|
|
829704
829875
|
const { celoResources } = account3;
|
|
829705
|
-
(0,
|
|
829706
|
-
(0,
|
|
829876
|
+
(0, import_invariant76.default)(celoResources?.registrationStatus, "Celo: Lock Vote | Account is not registered");
|
|
829877
|
+
(0, import_invariant76.default)(maxSpendable.gt(minimalAmount2), "Celo: Lock | balance is too low");
|
|
829707
829878
|
const amount = minimalAmount2.times(Math.random()).integerValue().precision(8);
|
|
829708
|
-
(0,
|
|
829879
|
+
(0, import_invariant76.default)(amount.gt(0), "Celo: Lock | Not enough funds to lock tokens");
|
|
829709
829880
|
const transaction = {
|
|
829710
829881
|
amount
|
|
829711
829882
|
};
|
|
@@ -829722,7 +829893,7 @@ var createLockMutation = () => ({
|
|
|
829722
829893
|
});
|
|
829723
829894
|
|
|
829724
829895
|
// ../../libs/coin-modules/coin-celo/lib-es/test/specs/createUnlockMutation.js
|
|
829725
|
-
var
|
|
829896
|
+
var import_invariant77 = __toESM(require("invariant"));
|
|
829726
829897
|
var import_bignumber375 = __toESM(require("bignumber.js"));
|
|
829727
829898
|
var currency10 = getCryptoCurrencyById("celo");
|
|
829728
829899
|
var minimalAmount3 = parseCurrencyUnit(currency10.units[0], "0.001");
|
|
@@ -829731,11 +829902,11 @@ var createUnlockMutation = () => ({
|
|
|
829731
829902
|
feature: "staking",
|
|
829732
829903
|
maxRun: 1,
|
|
829733
829904
|
transaction: ({ account: account3, bridge: bridge28, maxSpendable }) => {
|
|
829734
|
-
(0,
|
|
829905
|
+
(0, import_invariant77.default)(maxSpendable.gt(minimalAmount3), "Celo: Unlock | balance is too low");
|
|
829735
829906
|
const { celoResources } = account3;
|
|
829736
|
-
(0,
|
|
829907
|
+
(0, import_invariant77.default)(celoResources?.registrationStatus, "Celo: Unlock | Account is not registered");
|
|
829737
829908
|
const nonvotingLockedBalance = celoResources?.nonvotingLockedBalance || new import_bignumber375.default(0);
|
|
829738
|
-
(0,
|
|
829909
|
+
(0, import_invariant77.default)(nonvotingLockedBalance.gt(0), "Celo: Unlock | No non voting locked balance");
|
|
829739
829910
|
return {
|
|
829740
829911
|
transaction: bridge28.createTransaction(account3),
|
|
829741
829912
|
updates: [
|
|
@@ -829751,7 +829922,7 @@ var createUnlockMutation = () => ({
|
|
|
829751
829922
|
});
|
|
829752
829923
|
|
|
829753
829924
|
// ../../libs/coin-modules/coin-celo/lib-es/test/specs/createRegisterAccountMutation.js
|
|
829754
|
-
var
|
|
829925
|
+
var import_invariant78 = __toESM(require("invariant"));
|
|
829755
829926
|
var currency11 = getCryptoCurrencyById("celo");
|
|
829756
829927
|
var minimalAmount4 = parseCurrencyUnit(currency11.units[0], "0.001");
|
|
829757
829928
|
var createRegisterAccountMutation = () => ({
|
|
@@ -829760,8 +829931,8 @@ var createRegisterAccountMutation = () => ({
|
|
|
829760
829931
|
maxRun: 1,
|
|
829761
829932
|
transaction: ({ account: account3, bridge: bridge28, maxSpendable }) => {
|
|
829762
829933
|
const { celoResources } = account3;
|
|
829763
|
-
(0,
|
|
829764
|
-
(0,
|
|
829934
|
+
(0, import_invariant78.default)(!celoResources?.registrationStatus, "Celo: Register Account | Celo account is already registered");
|
|
829935
|
+
(0, import_invariant78.default)(maxSpendable.gt(minimalAmount4), "Celo: Register Account | Celo account balance is too low to register account");
|
|
829765
829936
|
return {
|
|
829766
829937
|
transaction: bridge28.createTransaction(account3),
|
|
829767
829938
|
updates: [
|
|
@@ -829774,7 +829945,7 @@ var createRegisterAccountMutation = () => ({
|
|
|
829774
829945
|
});
|
|
829775
829946
|
|
|
829776
829947
|
// ../../libs/coin-modules/coin-celo/lib-es/test/specs/createVoteMutation.js
|
|
829777
|
-
var
|
|
829948
|
+
var import_invariant79 = __toESM(require("invariant"));
|
|
829778
829949
|
var import_bignumber376 = __toESM(require("bignumber.js"));
|
|
829779
829950
|
var import_sampleSize = __toESM(require("lodash/sampleSize"));
|
|
829780
829951
|
var currency12 = getCryptoCurrencyById("celo");
|
|
@@ -829784,16 +829955,16 @@ var createVoteMutation = () => ({
|
|
|
829784
829955
|
feature: "staking",
|
|
829785
829956
|
maxRun: 1,
|
|
829786
829957
|
transaction: ({ account: account3, bridge: bridge28, maxSpendable }) => {
|
|
829787
|
-
(0,
|
|
829958
|
+
(0, import_invariant79.default)(maxSpendable.gt(minimalAmount5), "Celo: Vote | balance is too low");
|
|
829788
829959
|
const { celoResources } = account3;
|
|
829789
|
-
(0,
|
|
829960
|
+
(0, import_invariant79.default)(celoResources?.registrationStatus, "Celo: Vote | Account is not registered");
|
|
829790
829961
|
const nonvotingLockedBalance = celoResources?.nonvotingLockedBalance || new import_bignumber376.default(0);
|
|
829791
|
-
(0,
|
|
829962
|
+
(0, import_invariant79.default)(nonvotingLockedBalance.gt(0), "Celo: Vote | No non voting locked balance");
|
|
829792
829963
|
const votes2 = celoResources.votes || [];
|
|
829793
829964
|
const { validatorGroups } = getCurrentCeloPreloadData();
|
|
829794
829965
|
const validatorGroupWithoutVotes = (0, import_sampleSize.default)(getValidatorGroupsWithoutVotes(validatorGroups, votes2), 1)[0];
|
|
829795
829966
|
const amount = nonvotingLockedBalance.times(0.5).precision(8).integerValue();
|
|
829796
|
-
(0,
|
|
829967
|
+
(0, import_invariant79.default)(amount.gt(0), "Celo: Vote | Not enough funds to vote");
|
|
829797
829968
|
const transaction = {
|
|
829798
829969
|
recipient: validatorGroupWithoutVotes.address,
|
|
829799
829970
|
amount
|
|
@@ -829811,7 +829982,7 @@ var createVoteMutation = () => ({
|
|
|
829811
829982
|
});
|
|
829812
829983
|
|
|
829813
829984
|
// ../../libs/coin-modules/coin-celo/lib-es/test/specs/createActivateVoteMutation.js
|
|
829814
|
-
var
|
|
829985
|
+
var import_invariant80 = __toESM(require("invariant"));
|
|
829815
829986
|
var currency13 = getCryptoCurrencyById("celo");
|
|
829816
829987
|
var minimalAmount6 = parseCurrencyUnit(currency13.units[0], "0.001");
|
|
829817
829988
|
var createActivateVoteMutation = () => ({
|
|
@@ -829820,10 +829991,10 @@ var createActivateVoteMutation = () => ({
|
|
|
829820
829991
|
maxRun: 1,
|
|
829821
829992
|
transaction: ({ account: account3, bridge: bridge28, maxSpendable }) => {
|
|
829822
829993
|
const { celoResources } = account3;
|
|
829823
|
-
(0,
|
|
829824
|
-
(0,
|
|
829994
|
+
(0, import_invariant80.default)(celoResources?.registrationStatus, "Celo: Activate Vote | Account is not registered");
|
|
829995
|
+
(0, import_invariant80.default)(maxSpendable.gt(minimalAmount6), "Celo: Activate Vote | balance is too low");
|
|
829825
829996
|
const activatableVote = celoResources?.votes?.find((vote) => vote.activatable);
|
|
829826
|
-
(0,
|
|
829997
|
+
(0, import_invariant80.default)(!!activatableVote, "Celo: Activate Vote | No activatable votes");
|
|
829827
829998
|
const transaction = {
|
|
829828
829999
|
recipient: activatableVote.validatorGroup
|
|
829829
830000
|
};
|
|
@@ -829840,7 +830011,7 @@ var createActivateVoteMutation = () => ({
|
|
|
829840
830011
|
});
|
|
829841
830012
|
|
|
829842
830013
|
// ../../libs/coin-modules/coin-celo/lib-es/test/specs/createRevokeVoteMutation.js
|
|
829843
|
-
var
|
|
830014
|
+
var import_invariant81 = __toESM(require("invariant"));
|
|
829844
830015
|
var currency14 = getCryptoCurrencyById("celo");
|
|
829845
830016
|
var minimalAmount7 = parseCurrencyUnit(currency14.units[0], "0.001");
|
|
829846
830017
|
var createRevokeVoteMutation = () => ({
|
|
@@ -829848,11 +830019,11 @@ var createRevokeVoteMutation = () => ({
|
|
|
829848
830019
|
feature: "staking",
|
|
829849
830020
|
maxRun: 1,
|
|
829850
830021
|
transaction: ({ account: account3, bridge: bridge28, maxSpendable }) => {
|
|
829851
|
-
(0,
|
|
830022
|
+
(0, import_invariant81.default)(maxSpendable.gt(minimalAmount7), "Celo: Revoke Vote | balance is too low");
|
|
829852
830023
|
const { celoResources } = account3;
|
|
829853
|
-
(0,
|
|
830024
|
+
(0, import_invariant81.default)(celoResources?.registrationStatus, "Celo: RevokeVote | Account is not registered");
|
|
829854
830025
|
const revokableVote = celoResources?.votes?.find((vote) => vote.revokable);
|
|
829855
|
-
(0,
|
|
830026
|
+
(0, import_invariant81.default)(!!revokableVote, "Celo: RevokeVote | Revokable vote not found");
|
|
829856
830027
|
return {
|
|
829857
830028
|
transaction: bridge28.createTransaction(account3),
|
|
829858
830029
|
updates: [
|
|
@@ -829870,7 +830041,7 @@ var createRevokeVoteMutation = () => ({
|
|
|
829870
830041
|
});
|
|
829871
830042
|
|
|
829872
830043
|
// ../../libs/coin-modules/coin-celo/lib-es/test/specs/createWithdrawMutation.js
|
|
829873
|
-
var
|
|
830044
|
+
var import_invariant82 = __toESM(require("invariant"));
|
|
829874
830045
|
var currency15 = getCryptoCurrencyById("celo");
|
|
829875
830046
|
var minimalAmount8 = parseCurrencyUnit(currency15.units[0], "0.001");
|
|
829876
830047
|
var createWithdrawMutation = () => ({
|
|
@@ -829880,10 +830051,10 @@ var createWithdrawMutation = () => ({
|
|
|
829880
830051
|
transaction: ({ account: account3, bridge: bridge28, maxSpendable }) => {
|
|
829881
830052
|
const celoAccount = account3;
|
|
829882
830053
|
const { celoResources } = celoAccount;
|
|
829883
|
-
(0,
|
|
830054
|
+
(0, import_invariant82.default)(celoResources?.registrationStatus, "Celo: Withdraw | Account is not registered");
|
|
829884
830055
|
const pendingWithdrawals = availablePendingWithdrawals(celoAccount);
|
|
829885
|
-
(0,
|
|
829886
|
-
(0,
|
|
830056
|
+
(0, import_invariant82.default)(pendingWithdrawals.length > 0, "Celo: Withdraw | No withdrawable balance");
|
|
830057
|
+
(0, import_invariant82.default)(maxSpendable.gt(minimalAmount8), "Celo: Withdraw Vote | balance is too low");
|
|
829887
830058
|
return {
|
|
829888
830059
|
transaction: bridge28.createTransaction(celoAccount),
|
|
829889
830060
|
updates: [
|
|
@@ -829992,7 +830163,7 @@ var bot_specs_default3 = {
|
|
|
829992
830163
|
// ../../libs/coin-modules/coin-cosmos/lib-es/specs.js
|
|
829993
830164
|
var import_bignumber377 = require("bignumber.js");
|
|
829994
830165
|
var import_expect7 = __toESM(require_build21());
|
|
829995
|
-
var
|
|
830166
|
+
var import_invariant83 = __toESM(require("invariant"));
|
|
829996
830167
|
var import_sample5 = __toESM(require("lodash/sample"));
|
|
829997
830168
|
var import_sampleSize2 = __toESM(require("lodash/sampleSize"));
|
|
829998
830169
|
init_lib_es5();
|
|
@@ -830173,9 +830344,9 @@ function cosmosLikeMutations(minimalTransactionAmount) {
|
|
|
830173
830344
|
(0, import_expect7.default)(account3.balance.toString()).toBe(accountBeforeTransaction.balance.minus(operation.value).toString());
|
|
830174
830345
|
},
|
|
830175
830346
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
830176
|
-
(0,
|
|
830347
|
+
(0, import_invariant83.default)(maxSpendable.gt(minimalTransactionAmount), "balance is too low for send");
|
|
830177
830348
|
const amount = maxSpendable.times(0.3 + 0.4 * Math.random()).integerValue();
|
|
830178
|
-
(0,
|
|
830349
|
+
(0, import_invariant83.default)(amount.gt(0), "random amount to be positive");
|
|
830179
830350
|
return {
|
|
830180
830351
|
transaction: bridge28.createTransaction(account3),
|
|
830181
830352
|
updates: [
|
|
@@ -830198,7 +830369,7 @@ function cosmosLikeMutations(minimalTransactionAmount) {
|
|
|
830198
830369
|
maxRun: 1,
|
|
830199
830370
|
testDestination: genericTestDestination,
|
|
830200
830371
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
830201
|
-
(0,
|
|
830372
|
+
(0, import_invariant83.default)(maxSpendable.gt(minimalTransactionAmount), "balance is too low for send max");
|
|
830202
830373
|
return {
|
|
830203
830374
|
transaction: bridge28.createTransaction(account3),
|
|
830204
830375
|
updates: [
|
|
@@ -830221,20 +830392,20 @@ function cosmosLikeMutations(minimalTransactionAmount) {
|
|
|
830221
830392
|
maxRun: 1,
|
|
830222
830393
|
transaction: ({ account: account3, bridge: bridge28, siblings }) => {
|
|
830223
830394
|
expectSiblingsHaveSpendablePartGreaterThan(siblings, 0.5);
|
|
830224
|
-
(0,
|
|
830225
|
-
(0,
|
|
830395
|
+
(0, import_invariant83.default)(account3.index % 2 > 0, "only one out of 2 accounts is not going to delegate");
|
|
830396
|
+
(0, import_invariant83.default)(canDelegate(account3), "can delegate");
|
|
830226
830397
|
const { cosmosResources } = account3;
|
|
830227
|
-
(0,
|
|
830228
|
-
(0,
|
|
830398
|
+
(0, import_invariant83.default)(cosmosResources, "cosmos");
|
|
830399
|
+
(0, import_invariant83.default)(cosmosResources.delegations.length < 3, "already enough delegations");
|
|
830229
830400
|
const data6 = getCurrentCosmosPreloadData()[account3.currency.id];
|
|
830230
830401
|
const count = 1;
|
|
830231
830402
|
let remaining = getMaxDelegationAvailable(account3, count).minus(minimalTransactionAmount.times(2)).times(0.1 * Math.random());
|
|
830232
|
-
(0,
|
|
830403
|
+
(0, import_invariant83.default)(remaining.gt(0), "not enough funds in account for delegate");
|
|
830233
830404
|
const all8 = data6.validators.filter((v38) => !cosmosResources.delegations.some(
|
|
830234
830405
|
// new delegations only
|
|
830235
830406
|
(d56) => d56.validatorAddress === v38.validatorAddress
|
|
830236
830407
|
));
|
|
830237
|
-
(0,
|
|
830408
|
+
(0, import_invariant83.default)(all8.length > 0, "no validators found");
|
|
830238
830409
|
const validators7 = (0, import_sampleSize2.default)(all8, count).map((delegation) => {
|
|
830239
830410
|
const amount = remaining.times(Math.random() * Math.random()).integerValue();
|
|
830240
830411
|
remaining = remaining.minus(amount);
|
|
@@ -830243,7 +830414,7 @@ function cosmosLikeMutations(minimalTransactionAmount) {
|
|
|
830243
830414
|
amount
|
|
830244
830415
|
};
|
|
830245
830416
|
}).filter((v38) => v38.amount.gt(0));
|
|
830246
|
-
(0,
|
|
830417
|
+
(0, import_invariant83.default)(validators7.length > 0, "no possible delegation found");
|
|
830247
830418
|
return {
|
|
830248
830419
|
transaction: bridge28.createTransaction(account3),
|
|
830249
830420
|
updates: [
|
|
@@ -830260,10 +830431,10 @@ function cosmosLikeMutations(minimalTransactionAmount) {
|
|
|
830260
830431
|
},
|
|
830261
830432
|
test: ({ account: account3, transaction }) => {
|
|
830262
830433
|
const { cosmosResources } = account3;
|
|
830263
|
-
(0,
|
|
830434
|
+
(0, import_invariant83.default)(cosmosResources, "cosmos");
|
|
830264
830435
|
transaction.validators.forEach((v38) => {
|
|
830265
830436
|
const d56 = cosmosResources.delegations.find((d57) => d57.validatorAddress === v38.address);
|
|
830266
|
-
(0,
|
|
830437
|
+
(0, import_invariant83.default)(d56, "delegated %s must be found in account", v38.address);
|
|
830267
830438
|
botTest("delegator have planned address and amount", () => {
|
|
830268
830439
|
(0, import_expect7.default)(v38.address).toBe(d56.validatorAddress);
|
|
830269
830440
|
checkAmountsCloseEnough(v38.amount, d56.amount);
|
|
@@ -830276,15 +830447,15 @@ function cosmosLikeMutations(minimalTransactionAmount) {
|
|
|
830276
830447
|
feature: "staking",
|
|
830277
830448
|
maxRun: 1,
|
|
830278
830449
|
transaction: ({ account: account3, bridge: bridge28, maxSpendable }) => {
|
|
830279
|
-
(0,
|
|
830450
|
+
(0, import_invariant83.default)(canUndelegate(account3), "can undelegate");
|
|
830280
830451
|
const { cosmosResources } = account3;
|
|
830281
|
-
(0,
|
|
830282
|
-
(0,
|
|
830283
|
-
(0,
|
|
830452
|
+
(0, import_invariant83.default)(cosmosResources, "cosmos");
|
|
830453
|
+
(0, import_invariant83.default)(maxSpendable.gt(minimalTransactionAmount.times(2)), "balance is too low");
|
|
830454
|
+
(0, import_invariant83.default)(cosmosResources.delegations.length > 0, "already enough delegations");
|
|
830284
830455
|
const undelegateCandidate = (0, import_sample5.default)(cosmosResources.delegations.filter((d56) => !cosmosResources.redelegations.some((r38) => r38.validatorSrcAddress === d56.validatorAddress || r38.validatorDstAddress === d56.validatorAddress) && !cosmosResources.unbondings.some((r38) => r38.validatorAddress === d56.validatorAddress)));
|
|
830285
|
-
(0,
|
|
830456
|
+
(0, import_invariant83.default)(undelegateCandidate, "already pending");
|
|
830286
830457
|
const amount = undelegateCandidate.amount.times(Math.random() > 0.2 ? 1 : Math.random()).integerValue();
|
|
830287
|
-
(0,
|
|
830458
|
+
(0, import_invariant83.default)(amount.gt(0), "random amount to be positive");
|
|
830288
830459
|
return {
|
|
830289
830460
|
transaction: bridge28.createTransaction(account3),
|
|
830290
830461
|
updates: [
|
|
@@ -830305,10 +830476,10 @@ function cosmosLikeMutations(minimalTransactionAmount) {
|
|
|
830305
830476
|
},
|
|
830306
830477
|
test: ({ account: account3, transaction }) => {
|
|
830307
830478
|
const { cosmosResources } = account3;
|
|
830308
|
-
(0,
|
|
830479
|
+
(0, import_invariant83.default)(cosmosResources, "cosmos");
|
|
830309
830480
|
transaction.validators.forEach((v38) => {
|
|
830310
830481
|
const d56 = cosmosResources.unbondings.find((d57) => d57.validatorAddress === v38.address);
|
|
830311
|
-
(0,
|
|
830482
|
+
(0, import_invariant83.default)(d56, "undelegated %s must be found in account", v38.address);
|
|
830312
830483
|
botTest("validator have planned address and amount", () => {
|
|
830313
830484
|
(0, import_expect7.default)(v38.address).toBe(d56.validatorAddress);
|
|
830314
830485
|
checkAmountsCloseEnough(v38.amount, d56.amount);
|
|
@@ -830322,16 +830493,16 @@ function cosmosLikeMutations(minimalTransactionAmount) {
|
|
|
830322
830493
|
maxRun: 1,
|
|
830323
830494
|
transaction: ({ account: account3, bridge: bridge28, maxSpendable }) => {
|
|
830324
830495
|
const { cosmosResources } = account3;
|
|
830325
|
-
(0,
|
|
830326
|
-
(0,
|
|
830496
|
+
(0, import_invariant83.default)(cosmosResources, "cosmos");
|
|
830497
|
+
(0, import_invariant83.default)(maxSpendable.gt(minimalTransactionAmount.times(3)), "balance is too low for redelegate");
|
|
830327
830498
|
const sourceDelegation = (0, import_sample5.default)(cosmosResources.delegations.filter((d56) => canRedelegate(account3, d56)));
|
|
830328
|
-
(0,
|
|
830499
|
+
(0, import_invariant83.default)(sourceDelegation, "none can redelegate");
|
|
830329
830500
|
const delegation = (0, import_sample5.default)(cosmosResources.delegations.filter((d56) => d56.validatorAddress !== sourceDelegation.validatorAddress));
|
|
830330
830501
|
const amount = sourceDelegation.amount.times(
|
|
830331
830502
|
// most of the time redelegate all
|
|
830332
830503
|
Math.random() > 0.2 ? 1 : Math.random()
|
|
830333
830504
|
).integerValue();
|
|
830334
|
-
(0,
|
|
830505
|
+
(0, import_invariant83.default)(amount.gt(0), "random amount to be positive");
|
|
830335
830506
|
return {
|
|
830336
830507
|
transaction: bridge28.createTransaction(account3),
|
|
830337
830508
|
updates: [
|
|
@@ -830351,7 +830522,7 @@ function cosmosLikeMutations(minimalTransactionAmount) {
|
|
|
830351
830522
|
},
|
|
830352
830523
|
test: ({ account: account3, transaction }) => {
|
|
830353
830524
|
const { cosmosResources } = account3;
|
|
830354
|
-
(0,
|
|
830525
|
+
(0, import_invariant83.default)(cosmosResources, "cosmos");
|
|
830355
830526
|
transaction.validators.forEach((v38) => {
|
|
830356
830527
|
const existing = cosmosResources.delegations.find((d56) => d56.validatorAddress === v38.address);
|
|
830357
830528
|
if (!existing) {
|
|
@@ -830359,7 +830530,7 @@ function cosmosLikeMutations(minimalTransactionAmount) {
|
|
|
830359
830530
|
// FIXME: valueOf for date arithmetic operations in typescript
|
|
830360
830531
|
(a65, b19) => b19.completionDate.valueOf() - a65.completionDate.valueOf()
|
|
830361
830532
|
).find((d57) => d57.validatorDstAddress === v38.address && d57.validatorSrcAddress === transaction.sourceValidator);
|
|
830362
|
-
(0,
|
|
830533
|
+
(0, import_invariant83.default)(d56, "redelegated %s must be found in account", v38.address);
|
|
830363
830534
|
botTest("validator have planned address and amount", () => {
|
|
830364
830535
|
(0, import_expect7.default)(v38.address).toBe(d56.validatorDstAddress);
|
|
830365
830536
|
checkAmountsCloseEnough(v38.amount, d56.amount);
|
|
@@ -830374,10 +830545,10 @@ function cosmosLikeMutations(minimalTransactionAmount) {
|
|
|
830374
830545
|
maxRun: 1,
|
|
830375
830546
|
transaction: ({ account: account3, bridge: bridge28, maxSpendable }) => {
|
|
830376
830547
|
const { cosmosResources } = account3;
|
|
830377
|
-
(0,
|
|
830378
|
-
(0,
|
|
830548
|
+
(0, import_invariant83.default)(cosmosResources, "cosmos");
|
|
830549
|
+
(0, import_invariant83.default)(maxSpendable.gt(minimalTransactionAmount.times(2)), "balance is too low for claim rewards");
|
|
830379
830550
|
const delegation = (0, import_sample5.default)(cosmosResources.delegations.filter((d56) => d56.pendingRewards.gt(1e3)));
|
|
830380
|
-
(0,
|
|
830551
|
+
(0, import_invariant83.default)(delegation, "no delegation to claim");
|
|
830381
830552
|
return {
|
|
830382
830553
|
transaction: bridge28.createTransaction(account3),
|
|
830383
830554
|
updates: [
|
|
@@ -830396,11 +830567,11 @@ function cosmosLikeMutations(minimalTransactionAmount) {
|
|
|
830396
830567
|
},
|
|
830397
830568
|
test: ({ account: account3, transaction }) => {
|
|
830398
830569
|
const { cosmosResources } = account3;
|
|
830399
|
-
(0,
|
|
830570
|
+
(0, import_invariant83.default)(cosmosResources, "cosmos");
|
|
830400
830571
|
transaction.validators.forEach((v38) => {
|
|
830401
830572
|
const d56 = cosmosResources.delegations.find((d57) => d57.validatorAddress === v38.address);
|
|
830402
|
-
botTest("delegation exists in account", () => (0,
|
|
830403
|
-
botTest("reward is no longer claimable after claim", () => (0,
|
|
830573
|
+
botTest("delegation exists in account", () => (0, import_invariant83.default)(d56, "delegation %s must be found in account", v38.address));
|
|
830574
|
+
botTest("reward is no longer claimable after claim", () => (0, import_invariant83.default)(d56?.pendingRewards.lte(d56.amount.multipliedBy(0.1)), "pending reward is not reset"));
|
|
830404
830575
|
});
|
|
830405
830576
|
}
|
|
830406
830577
|
}
|
|
@@ -830607,7 +830778,7 @@ var specs_default4 = {
|
|
|
830607
830778
|
|
|
830608
830779
|
// ../../libs/coin-modules/coin-evm/lib-es/specs.js
|
|
830609
830780
|
var import_expect8 = __toESM(require_build21());
|
|
830610
|
-
var
|
|
830781
|
+
var import_invariant84 = __toESM(require("invariant"));
|
|
830611
830782
|
var import_sample6 = __toESM(require("lodash/sample"));
|
|
830612
830783
|
var import_bignumber378 = __toESM(require("bignumber.js"));
|
|
830613
830784
|
init_lib_es5();
|
|
@@ -830814,7 +830985,7 @@ var testCoinBalance = ({ account: account3, accountBeforeTransaction, operation
|
|
|
830814
830985
|
var transactionCheck = (currencyId) => ({ maxSpendable }) => {
|
|
830815
830986
|
const currency24 = getCryptoCurrencyById(currencyId);
|
|
830816
830987
|
const minBalance = parseCurrencyUnit(currency24.units[0], `${minBalancePerCurrencyId[currency24.id] || 1}`);
|
|
830817
|
-
(0,
|
|
830988
|
+
(0, import_invariant84.default)(maxSpendable.gt(minBalance), `${currencyId} balance is too low`);
|
|
830818
830989
|
};
|
|
830819
830990
|
var evmBasicMutations = ({ maxAccount: maxAccount10 }) => [
|
|
830820
830991
|
{
|
|
@@ -830890,7 +831061,7 @@ var moveErc20Mutation = {
|
|
|
830890
831061
|
testDestination: testTokenDestination,
|
|
830891
831062
|
transaction: ({ account: account3, siblings, bridge: bridge28 }) => {
|
|
830892
831063
|
const erc20Account = (0, import_sample6.default)((account3.subAccounts || []).filter((a65) => a65.balance.gt(0)));
|
|
830893
|
-
(0,
|
|
831064
|
+
(0, import_invariant84.default)(erc20Account, "no erc20 account");
|
|
830894
831065
|
const sibling = pickSiblings(siblings, 3);
|
|
830895
831066
|
const recipient = sibling.freshAddress;
|
|
830896
831067
|
return {
|
|
@@ -830909,12 +831080,12 @@ var moveErc20Mutation = {
|
|
|
830909
831080
|
};
|
|
830910
831081
|
},
|
|
830911
831082
|
test: ({ accountBeforeTransaction, account: account3, transaction }) => {
|
|
830912
|
-
(0,
|
|
831083
|
+
(0, import_invariant84.default)(accountBeforeTransaction.subAccounts, "sub accounts before");
|
|
830913
831084
|
const erc20accountBefore = accountBeforeTransaction.subAccounts?.find((s49) => s49.id === transaction.subAccountId);
|
|
830914
|
-
(0,
|
|
830915
|
-
(0,
|
|
831085
|
+
(0, import_invariant84.default)(erc20accountBefore, "erc20 acc was here before");
|
|
831086
|
+
(0, import_invariant84.default)(account3.subAccounts, "sub accounts");
|
|
830916
831087
|
const erc20account = account3.subAccounts.find((s49) => s49.id === transaction.subAccountId);
|
|
830917
|
-
(0,
|
|
831088
|
+
(0, import_invariant84.default)(erc20account, "erc20 acc is still here");
|
|
830918
831089
|
if (transaction.useAllAmount) {
|
|
830919
831090
|
botTest("erc20 account is empty", () => (0, import_expect8.default)(erc20account.balance.toString()).toBe("0"));
|
|
830920
831091
|
} else {
|
|
@@ -830994,7 +831165,7 @@ var specs_default5 = Object.values(cryptocurrenciesById).filter((currency24) =>
|
|
|
830994
831165
|
|
|
830995
831166
|
// ../../libs/coin-modules/coin-hedera/lib-es/test/bot-specs.js
|
|
830996
831167
|
var import_expect9 = __toESM(require_build21());
|
|
830997
|
-
var
|
|
831168
|
+
var import_invariant85 = __toESM(require("invariant"));
|
|
830998
831169
|
init_lib_es5();
|
|
830999
831170
|
|
|
831000
831171
|
// ../../libs/coin-modules/coin-hedera/lib-es/test/speculos-deviceActions.js
|
|
@@ -831063,7 +831234,7 @@ var memoTestMessage = "This is a test memo.";
|
|
|
831063
831234
|
var checkSendableToEmptyAccount2 = (amount, recipient) => {
|
|
831064
831235
|
const minBalanceNewAccount2 = parseCurrencyUnit(currency17.units[0], "0.1");
|
|
831065
831236
|
if (isAccountEmpty(recipient) && amount.lte(minBalanceNewAccount2)) {
|
|
831066
|
-
(0,
|
|
831237
|
+
(0, import_invariant85.default)(amount.gt(minBalanceNewAccount2), "not enough funds to send to new account");
|
|
831067
831238
|
}
|
|
831068
831239
|
};
|
|
831069
831240
|
var hedera = {
|
|
@@ -831078,7 +831249,7 @@ var hedera = {
|
|
|
831078
831249
|
genericDeviceAction: acceptTransaction9,
|
|
831079
831250
|
currency: currency17,
|
|
831080
831251
|
transactionCheck: ({ maxSpendable }) => {
|
|
831081
|
-
(0,
|
|
831252
|
+
(0, import_invariant85.default)(maxSpendable.gt(0), "Balance is too low");
|
|
831082
831253
|
},
|
|
831083
831254
|
allowEmptyAccounts: true,
|
|
831084
831255
|
mutations: [
|
|
@@ -831147,12 +831318,12 @@ var hedera = {
|
|
|
831147
831318
|
var bot_specs_default4 = { hedera };
|
|
831148
831319
|
|
|
831149
831320
|
// ../../libs/coin-modules/coin-filecoin/lib-es/test/bot-specs.js
|
|
831150
|
-
var
|
|
831321
|
+
var import_invariant87 = __toESM(require("invariant"));
|
|
831151
831322
|
init_lib_es5();
|
|
831152
831323
|
var import_bignumber379 = __toESM(require("bignumber.js"));
|
|
831153
831324
|
|
|
831154
831325
|
// ../../libs/coin-modules/coin-filecoin/lib-es/test/speculos-deviceActions.js
|
|
831155
|
-
var
|
|
831326
|
+
var import_invariant86 = __toESM(require("invariant"));
|
|
831156
831327
|
var generateDeviceActionFlow = (scenario) => {
|
|
831157
831328
|
const data6 = { steps: [] };
|
|
831158
831329
|
data6.steps = data6.steps.concat([
|
|
@@ -831215,7 +831386,7 @@ var generateDeviceActionFlow = (scenario) => {
|
|
|
831215
831386
|
button: SpeculosButton2.RIGHT,
|
|
831216
831387
|
expectedValue: ({ account: account3, transaction }) => {
|
|
831217
831388
|
const subAccount = getSubAccount(account3, transaction);
|
|
831218
|
-
(0,
|
|
831389
|
+
(0, import_invariant86.default)(subAccount, "subAccount is required for token transfer");
|
|
831219
831390
|
return formatDeviceAmount(subAccount.token, transaction.amount, {
|
|
831220
831391
|
hideCode: false,
|
|
831221
831392
|
showAllDigits: true
|
|
@@ -831310,7 +831481,7 @@ var filecoinSpecs = {
|
|
|
831310
831481
|
testTimeout: 16 * 60 * 1e3,
|
|
831311
831482
|
minViableAmount: MIN_SAFE3,
|
|
831312
831483
|
transactionCheck: ({ maxSpendable }) => {
|
|
831313
|
-
(0,
|
|
831484
|
+
(0, import_invariant87.default)(maxSpendable.gt(MIN_SAFE3), "balance is too low");
|
|
831314
831485
|
},
|
|
831315
831486
|
mutations: [
|
|
831316
831487
|
{
|
|
@@ -831364,7 +831535,7 @@ var filecoinSpecs = {
|
|
|
831364
831535
|
const sibling = pickSiblings(siblings, maxAccount4);
|
|
831365
831536
|
let amount = account3.spendableBalance.div(1.9 + 0.2 * Math.random()).integerValue();
|
|
831366
831537
|
if (!sibling.used && amount.lt(MIN_SAFE3)) {
|
|
831367
|
-
(0,
|
|
831538
|
+
(0, import_invariant87.default)(account3.spendableBalance.gt(MIN_SAFE3), "send is too low to activate account");
|
|
831368
831539
|
amount = MIN_SAFE3;
|
|
831369
831540
|
}
|
|
831370
831541
|
return {
|
|
@@ -831404,9 +831575,9 @@ var filecoinSpecs = {
|
|
|
831404
831575
|
maxRun: 1,
|
|
831405
831576
|
deviceAction: generateDeviceActionFlow(BotScenario.TOKEN_TRANSFER),
|
|
831406
831577
|
transaction: ({ account: account3, bridge: bridge28, maxSpendable }) => {
|
|
831407
|
-
(0,
|
|
831578
|
+
(0, import_invariant87.default)(maxSpendable.gt(0), "Spendable balance is too low");
|
|
831408
831579
|
const subAccount = account3.subAccounts?.find((a65) => a65.type === AccountType2.TokenAccount && a65.spendableBalance.gt(0));
|
|
831409
|
-
(0,
|
|
831580
|
+
(0, import_invariant87.default)(subAccount && subAccount.type === AccountType2.TokenAccount, "no subAccount with WFIL");
|
|
831410
831581
|
const amount = subAccount.balance.div(1.9 + 0.2 * Math.random()).integerValue();
|
|
831411
831582
|
return {
|
|
831412
831583
|
transaction: bridge28.createTransaction(account3),
|
|
@@ -831437,7 +831608,7 @@ var bot_specs_default5 = {
|
|
|
831437
831608
|
};
|
|
831438
831609
|
|
|
831439
831610
|
// ../../libs/coin-modules/coin-internet_computer/lib-es/test/bot-specs.js
|
|
831440
|
-
var
|
|
831611
|
+
var import_invariant88 = __toESM(require("invariant"));
|
|
831441
831612
|
init_lib_es5();
|
|
831442
831613
|
var import_expect10 = __toESM(require_build21());
|
|
831443
831614
|
var import_bignumber380 = __toESM(require("bignumber.js"));
|
|
@@ -831507,7 +831678,7 @@ var internetComputerSpecs = {
|
|
|
831507
831678
|
testTimeout: 6 * 60 * 1e3,
|
|
831508
831679
|
minViableAmount: MIN_SAFE4,
|
|
831509
831680
|
transactionCheck: ({ maxSpendable }) => {
|
|
831510
|
-
(0,
|
|
831681
|
+
(0, import_invariant88.default)(maxSpendable.gt(MIN_SAFE4), "balance is too low");
|
|
831511
831682
|
},
|
|
831512
831683
|
mutations: [
|
|
831513
831684
|
{
|
|
@@ -831516,7 +831687,7 @@ var internetComputerSpecs = {
|
|
|
831516
831687
|
maxRun: 1,
|
|
831517
831688
|
testDestination: genericTestDestination,
|
|
831518
831689
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
831519
|
-
(0,
|
|
831690
|
+
(0, import_invariant88.default)(maxSpendable.gt(MIN_SAFE4), "balance is too low");
|
|
831520
831691
|
const sibling = pickSiblings(siblings, maxAccount5);
|
|
831521
831692
|
const recipient = sibling.freshAddress;
|
|
831522
831693
|
const amount = maxSpendable.div(2).integerValue();
|
|
@@ -831587,7 +831758,7 @@ var bot_specs_default6 = {
|
|
|
831587
831758
|
};
|
|
831588
831759
|
|
|
831589
831760
|
// ../../libs/coin-modules/coin-icon/lib-es/specs.js
|
|
831590
|
-
var
|
|
831761
|
+
var import_invariant89 = __toESM(require("invariant"));
|
|
831591
831762
|
init_lib_es5();
|
|
831592
831763
|
var import_bignumber381 = __toESM(require("bignumber.js"));
|
|
831593
831764
|
var import_expect11 = __toESM(require_build21());
|
|
@@ -831649,7 +831820,7 @@ var icon = {
|
|
|
831649
831820
|
genericDeviceAction: acceptTransaction11,
|
|
831650
831821
|
testTimeout: 2 * 60 * 1e3,
|
|
831651
831822
|
transactionCheck: ({ maxSpendable }) => {
|
|
831652
|
-
(0,
|
|
831823
|
+
(0, import_invariant89.default)(maxSpendable.gt(EXISTENTIAL_DEPOSIT_RECOMMENDED_MARGIN.multipliedBy(2)), "balance is too low");
|
|
831653
831824
|
},
|
|
831654
831825
|
test: ({ operation, optimisticOperation }) => {
|
|
831655
831826
|
const opExpected = toOperationRaw({
|
|
@@ -831669,11 +831840,11 @@ var icon = {
|
|
|
831669
831840
|
feature: "send",
|
|
831670
831841
|
maxRun: 1,
|
|
831671
831842
|
transaction: ({ account: account3, siblings, bridge: bridge28 }) => {
|
|
831672
|
-
(0,
|
|
831843
|
+
(0, import_invariant89.default)(account3.spendableBalance.gt(0), "balance is 0");
|
|
831673
831844
|
const sibling = pickSiblings(siblings, maxAccounts3);
|
|
831674
831845
|
let amount = account3.spendableBalance.div(2).integerValue();
|
|
831675
831846
|
if (!sibling.used && amount.lt(EXISTENTIAL_DEPOSIT)) {
|
|
831676
|
-
(0,
|
|
831847
|
+
(0, import_invariant89.default)(account3.spendableBalance.gt(EXISTENTIAL_DEPOSIT), "send is too low to activate account");
|
|
831677
831848
|
amount = EXISTENTIAL_DEPOSIT;
|
|
831678
831849
|
}
|
|
831679
831850
|
return {
|
|
@@ -831697,7 +831868,7 @@ var icon = {
|
|
|
831697
831868
|
feature: "sendMax",
|
|
831698
831869
|
maxRun: 1,
|
|
831699
831870
|
transaction: ({ account: account3, siblings, bridge: bridge28 }) => {
|
|
831700
|
-
(0,
|
|
831871
|
+
(0, import_invariant89.default)(account3.spendableBalance.gt(0), "balance is 0");
|
|
831701
831872
|
const sibling = pickSiblings(siblings, maxAccounts3);
|
|
831702
831873
|
return {
|
|
831703
831874
|
transaction: bridge28.createTransaction(account3),
|
|
@@ -831722,7 +831893,7 @@ var specs_default6 = {
|
|
|
831722
831893
|
};
|
|
831723
831894
|
|
|
831724
831895
|
// ../../libs/coin-modules/coin-multiversx/lib-es/specs.js
|
|
831725
|
-
var
|
|
831896
|
+
var import_invariant90 = __toESM(require("invariant"));
|
|
831726
831897
|
init_lib_es5();
|
|
831727
831898
|
var import_expect12 = __toESM(require_build21());
|
|
831728
831899
|
|
|
@@ -832043,7 +832214,7 @@ var multiversx = {
|
|
|
832043
832214
|
testTimeout: 2 * 60 * 1e3,
|
|
832044
832215
|
minViableAmount: minimalAmount9,
|
|
832045
832216
|
transactionCheck: ({ maxSpendable }) => {
|
|
832046
|
-
(0,
|
|
832217
|
+
(0, import_invariant90.default)(maxSpendable.gt(minimalAmount9), "balance is too low");
|
|
832047
832218
|
},
|
|
832048
832219
|
test: (input) => {
|
|
832049
832220
|
expectCorrectOptimisticOperation(input);
|
|
@@ -832055,11 +832226,11 @@ var multiversx = {
|
|
|
832055
832226
|
maxRun: 1,
|
|
832056
832227
|
deviceAction: acceptMoveBalanceTransaction,
|
|
832057
832228
|
transaction: ({ account: account3, siblings, bridge: bridge28 }) => {
|
|
832058
|
-
(0,
|
|
832229
|
+
(0, import_invariant90.default)(account3.spendableBalance.gt(0), "balance is 0");
|
|
832059
832230
|
const sibling = pickSiblings(siblings, maxAccounts4);
|
|
832060
832231
|
let amount = account3.spendableBalance.div(1.9 + 0.2 * Math.random()).integerValue();
|
|
832061
832232
|
if (!sibling.used && amount.lt(MULTIVERSX_MIN_ACTIVATION_SAFE)) {
|
|
832062
|
-
(0,
|
|
832233
|
+
(0, import_invariant90.default)(account3.spendableBalance.gt(MULTIVERSX_MIN_ACTIVATION_SAFE), "send is too low to activate account");
|
|
832063
832234
|
amount = MULTIVERSX_MIN_ACTIVATION_SAFE;
|
|
832064
832235
|
}
|
|
832065
832236
|
return {
|
|
@@ -832085,10 +832256,10 @@ var multiversx = {
|
|
|
832085
832256
|
maxRun: 1,
|
|
832086
832257
|
deviceAction: acceptMoveBalanceTransaction,
|
|
832087
832258
|
transaction: ({ account: account3, siblings, bridge: bridge28 }) => {
|
|
832088
|
-
(0,
|
|
832259
|
+
(0, import_invariant90.default)(account3.spendableBalance.gt(0), "balance is 0");
|
|
832089
832260
|
const sibling = pickSiblings(siblings, maxAccounts4);
|
|
832090
832261
|
if (!sibling.used) {
|
|
832091
|
-
(0,
|
|
832262
|
+
(0, import_invariant90.default)(account3.spendableBalance.gt(MULTIVERSX_MIN_ACTIVATION_SAFE), "send is too low to activate account");
|
|
832092
832263
|
}
|
|
832093
832264
|
return {
|
|
832094
832265
|
transaction: bridge28.createTransaction(account3),
|
|
@@ -832114,8 +832285,8 @@ var multiversx = {
|
|
|
832114
832285
|
deviceAction: acceptEsdtTransferTransaction,
|
|
832115
832286
|
transaction: ({ account: account3, siblings, bridge: bridge28 }) => {
|
|
832116
832287
|
const esdtAccount = (0, import_sample7.default)((account3.subAccounts || []).filter((a65) => a65.balance.gt(0)));
|
|
832117
|
-
(0,
|
|
832118
|
-
(0,
|
|
832288
|
+
(0, import_invariant90.default)(esdtAccount, "no esdt account");
|
|
832289
|
+
(0, import_invariant90.default)(esdtAccount?.balance.gt(0), "esdt balance is 0");
|
|
832119
832290
|
const sibling = pickSiblings(siblings, 2);
|
|
832120
832291
|
const recipient = sibling.freshAddress;
|
|
832121
832292
|
const amount = esdtAccount?.balance.times(Math.random()).integerValue();
|
|
@@ -832145,7 +832316,7 @@ var multiversx = {
|
|
|
832145
832316
|
maxRun: 1,
|
|
832146
832317
|
deviceAction: acceptDelegateTransaction,
|
|
832147
832318
|
transaction: ({ account: account3, bridge: bridge28 }) => {
|
|
832148
|
-
(0,
|
|
832319
|
+
(0, import_invariant90.default)(account3.spendableBalance.gt(MIN_DELEGATION_AMOUNT), `spendable balance is less than minimum delegation amount`);
|
|
832149
832320
|
const amount = MIN_DELEGATION_AMOUNT;
|
|
832150
832321
|
return {
|
|
832151
832322
|
transaction: bridge28.createTransaction(account3),
|
|
@@ -832170,8 +832341,8 @@ var multiversx = {
|
|
|
832170
832341
|
deviceAction: acceptUndelegateTransaction,
|
|
832171
832342
|
transaction: ({ account: account3, bridge: bridge28 }) => {
|
|
832172
832343
|
const delegations = account3?.multiversxResources?.delegations;
|
|
832173
|
-
(0,
|
|
832174
|
-
(0,
|
|
832344
|
+
(0, import_invariant90.default)(delegations?.length, "account doesn't have any delegations");
|
|
832345
|
+
(0, import_invariant90.default)(delegations.some((d56) => new import_bignumber383.default(d56.userActiveStake).gt(0)), "no active stake for account");
|
|
832175
832346
|
const amount = MIN_DELEGATION_AMOUNT;
|
|
832176
832347
|
return {
|
|
832177
832348
|
transaction: bridge28.createTransaction(account3),
|
|
@@ -832196,8 +832367,8 @@ var multiversx = {
|
|
|
832196
832367
|
deviceAction: acceptWithdrawTransaction,
|
|
832197
832368
|
transaction: ({ account: account3, bridge: bridge28 }) => {
|
|
832198
832369
|
const delegations = account3?.multiversxResources?.delegations;
|
|
832199
|
-
(0,
|
|
832200
|
-
(0,
|
|
832370
|
+
(0, import_invariant90.default)(delegations?.length, "account doesn't have any delegations");
|
|
832371
|
+
(0, import_invariant90.default)(
|
|
832201
832372
|
// among all delegations
|
|
832202
832373
|
delegations.some((d56) => (
|
|
832203
832374
|
// among all undelegating amounts
|
|
@@ -832232,7 +832403,7 @@ var specs_default7 = {
|
|
|
832232
832403
|
};
|
|
832233
832404
|
|
|
832234
832405
|
// ../../libs/coin-modules/coin-near/lib-es/specs.js
|
|
832235
|
-
var
|
|
832406
|
+
var import_invariant91 = __toESM(require("invariant"));
|
|
832236
832407
|
var import_expect13 = __toESM(require_build21());
|
|
832237
832408
|
var import_bignumber384 = require("bignumber.js");
|
|
832238
832409
|
init_lib_es5();
|
|
@@ -832324,7 +832495,7 @@ var near = {
|
|
|
832324
832495
|
feature: "send",
|
|
832325
832496
|
maxRun: 1,
|
|
832326
832497
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
832327
|
-
(0,
|
|
832498
|
+
(0, import_invariant91.default)(maxSpendable.gt(minimalAmount10), "balance is too low");
|
|
832328
832499
|
const sibling = pickSiblings(siblings, maxAccount6);
|
|
832329
832500
|
const recipient = sibling.freshAddress;
|
|
832330
832501
|
const amount = maxSpendable.div(2).integerValue();
|
|
@@ -832342,7 +832513,7 @@ var near = {
|
|
|
832342
832513
|
feature: "sendMax",
|
|
832343
832514
|
maxRun: 1,
|
|
832344
832515
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
832345
|
-
(0,
|
|
832516
|
+
(0, import_invariant91.default)(maxSpendable.gt(minimalAmount10), "balance is too low");
|
|
832346
832517
|
const sibling = pickSiblings(siblings, maxAccount6);
|
|
832347
832518
|
const recipient = sibling.freshAddress;
|
|
832348
832519
|
return {
|
|
@@ -832359,7 +832530,7 @@ var near = {
|
|
|
832359
832530
|
feature: "staking",
|
|
832360
832531
|
maxRun: 1,
|
|
832361
832532
|
transaction: ({ account: account3, bridge: bridge28, maxSpendable }) => {
|
|
832362
|
-
(0,
|
|
832533
|
+
(0, import_invariant91.default)(maxSpendable.gt(minimalAmount10.plus(stakingFee)), "balance is too low");
|
|
832363
832534
|
const amount = minimalAmount10.times(10).times(Math.random()).integerValue();
|
|
832364
832535
|
return {
|
|
832365
832536
|
transaction: bridge28.createTransaction(account3),
|
|
@@ -832380,10 +832551,10 @@ var near = {
|
|
|
832380
832551
|
feature: "staking",
|
|
832381
832552
|
maxRun: 1,
|
|
832382
832553
|
transaction: ({ account: account3, bridge: bridge28, maxSpendable }) => {
|
|
832383
|
-
(0,
|
|
832554
|
+
(0, import_invariant91.default)(maxSpendable.gt(stakingFee), "balance is too low for fees");
|
|
832384
832555
|
const { nearResources } = account3;
|
|
832385
832556
|
const staked = nearResources?.stakedBalance || new import_bignumber384.BigNumber(0);
|
|
832386
|
-
(0,
|
|
832557
|
+
(0, import_invariant91.default)(staked.gt(minimalAmount10), "staked balance is too low for unstaking");
|
|
832387
832558
|
const halfStaked = staked.div(2);
|
|
832388
832559
|
const amount = halfStaked.gt(minimalAmount10) ? halfStaked.integerValue() : staked.integerValue();
|
|
832389
832560
|
return {
|
|
@@ -832402,10 +832573,10 @@ var near = {
|
|
|
832402
832573
|
feature: "staking",
|
|
832403
832574
|
maxRun: 1,
|
|
832404
832575
|
transaction: ({ account: account3, bridge: bridge28, maxSpendable }) => {
|
|
832405
|
-
(0,
|
|
832576
|
+
(0, import_invariant91.default)(maxSpendable.gt(stakingFee), "balance is too low for fees");
|
|
832406
832577
|
const { nearResources } = account3;
|
|
832407
832578
|
const available = nearResources?.availableBalance || new import_bignumber384.BigNumber(0);
|
|
832408
|
-
(0,
|
|
832579
|
+
(0, import_invariant91.default)(available.gt(minimalAmount10), "available balance is too low for withdrawing");
|
|
832409
832580
|
const halfAvailable = available.div(2);
|
|
832410
832581
|
const amount = halfAvailable.gt(minimalAmount10) ? halfAvailable.integerValue() : available.integerValue();
|
|
832411
832582
|
return {
|
|
@@ -832427,7 +832598,7 @@ var specs_default8 = {
|
|
|
832427
832598
|
|
|
832428
832599
|
// ../../libs/coin-modules/coin-polkadot/lib-es/test/bot-specs.js
|
|
832429
832600
|
var import_expect14 = __toESM(require_build21());
|
|
832430
|
-
var
|
|
832601
|
+
var import_invariant92 = __toESM(require("invariant"));
|
|
832431
832602
|
var import_sampleSize3 = __toESM(require("lodash/sampleSize"));
|
|
832432
832603
|
var import_bignumber385 = require("bignumber.js");
|
|
832433
832604
|
init_lib_es5();
|
|
@@ -832531,7 +832702,7 @@ var polkadot3 = {
|
|
|
832531
832702
|
genericDeviceAction: acceptTransaction13,
|
|
832532
832703
|
minViableAmount: POLKADOT_MIN_SAFE,
|
|
832533
832704
|
transactionCheck: ({ maxSpendable }) => {
|
|
832534
|
-
(0,
|
|
832705
|
+
(0, import_invariant92.default)(maxSpendable.gt(POLKADOT_MIN_SAFE), "balance is too low");
|
|
832535
832706
|
},
|
|
832536
832707
|
test: ({ operation, optimisticOperation }) => {
|
|
832537
832708
|
const opExpected = toOperationRaw({
|
|
@@ -832551,12 +832722,12 @@ var polkadot3 = {
|
|
|
832551
832722
|
maxRun: 1,
|
|
832552
832723
|
testDestination: genericTestDestination,
|
|
832553
832724
|
transaction: ({ account: account3, siblings, bridge: bridge28 }) => {
|
|
832554
|
-
(0,
|
|
832725
|
+
(0, import_invariant92.default)(account3.polkadotResources, "polkadot resource");
|
|
832555
832726
|
const sibling = pickSiblings(siblings, maxAccounts5);
|
|
832556
832727
|
let amount = account3.spendableBalance.minus(EXISTENTIAL_DEPOSIT4).div(1.9 + 0.2 * Math.random()).integerValue();
|
|
832557
|
-
(0,
|
|
832728
|
+
(0, import_invariant92.default)(amount.gte(0), "not enough balance to do a transfer");
|
|
832558
832729
|
if (sibling.balance.eq(0) && amount.lt(EXISTENTIAL_DEPOSIT4)) {
|
|
832559
|
-
(0,
|
|
832730
|
+
(0, import_invariant92.default)(account3.spendableBalance.gte(EXISTENTIAL_DEPOSIT4.plus(POLKADOT_MIN_SAFE)), "send is too low to activate account");
|
|
832560
832731
|
amount = EXISTENTIAL_DEPOSIT4;
|
|
832561
832732
|
}
|
|
832562
832733
|
const minimumBalanceExistential = getMinimumBalance2(account3);
|
|
@@ -832583,9 +832754,9 @@ var polkadot3 = {
|
|
|
832583
832754
|
maxRun: 1,
|
|
832584
832755
|
testDestination: genericTestDestination,
|
|
832585
832756
|
transaction: ({ account: account3, siblings, bridge: bridge28 }) => {
|
|
832586
|
-
(0,
|
|
832757
|
+
(0, import_invariant92.default)(account3.polkadotResources, "polkadot resources");
|
|
832587
832758
|
const sibling = pickSiblings(siblings, maxAccounts5);
|
|
832588
|
-
(0,
|
|
832759
|
+
(0, import_invariant92.default)(sibling.balance.eq(0) && account3.spendableBalance.lte(EXISTENTIAL_DEPOSIT4), "send is too low to activate account");
|
|
832589
832760
|
return {
|
|
832590
832761
|
transaction: bridge28.createTransaction(account3),
|
|
832591
832762
|
updates: [
|
|
@@ -832605,12 +832776,12 @@ var polkadot3 = {
|
|
|
832605
832776
|
maxRun: 1,
|
|
832606
832777
|
transaction: ({ siblings, account: account3, bridge: bridge28 }) => {
|
|
832607
832778
|
expectSiblingsHaveSpendablePartGreaterThan(siblings, 0.5);
|
|
832608
|
-
(0,
|
|
832609
|
-
(0,
|
|
832610
|
-
(0,
|
|
832779
|
+
(0, import_invariant92.default)(account3.polkadotResources, "polkadot");
|
|
832780
|
+
(0, import_invariant92.default)(canBond(account3), "can't bond");
|
|
832781
|
+
(0, import_invariant92.default)(hasMinimumBondBalance(account3), "not enough balance to bond");
|
|
832611
832782
|
const options22 = [];
|
|
832612
832783
|
if (isFirstBond(account3)) {
|
|
832613
|
-
(0,
|
|
832784
|
+
(0, import_invariant92.default)(account3.balance.gt(EXISTENTIAL_DEPOSIT4.plus(POLKADOT_MIN_SAFE)), "cant cover fee + bonding amount");
|
|
832614
832785
|
options22.push({
|
|
832615
832786
|
recipient: account3.freshAddress,
|
|
832616
832787
|
rewardDestination: "Stash"
|
|
@@ -832619,7 +832790,7 @@ var polkadot3 = {
|
|
|
832619
832790
|
amount: EXISTENTIAL_DEPOSIT4
|
|
832620
832791
|
});
|
|
832621
832792
|
} else {
|
|
832622
|
-
(0,
|
|
832793
|
+
(0, import_invariant92.default)(account3.spendableBalance.gt(POLKADOT_MIN_SAFE), "cant cover fee + bonding amount");
|
|
832623
832794
|
options22.push({
|
|
832624
832795
|
amount: new import_bignumber385.BigNumber(1e5)
|
|
832625
832796
|
});
|
|
@@ -832641,9 +832812,9 @@ var polkadot3 = {
|
|
|
832641
832812
|
maxRun: 1,
|
|
832642
832813
|
transaction: ({ account: account3, bridge: bridge28 }) => {
|
|
832643
832814
|
const { polkadotResources } = account3;
|
|
832644
|
-
(0,
|
|
832645
|
-
(0,
|
|
832646
|
-
(0,
|
|
832815
|
+
(0, import_invariant92.default)(polkadotResources, "polkadot");
|
|
832816
|
+
(0, import_invariant92.default)(canUnbond(account3), "can't unbond");
|
|
832817
|
+
(0, import_invariant92.default)(account3.spendableBalance.gt(POLKADOT_MIN_SAFE), "can't cover fee");
|
|
832647
832818
|
const amount = polkadotResources.lockedBalance.minus(polkadotResources.unlockingBalance).times(0.2);
|
|
832648
832819
|
return {
|
|
832649
832820
|
transaction: bridge28.createTransaction(account3),
|
|
@@ -832664,9 +832835,9 @@ var polkadot3 = {
|
|
|
832664
832835
|
maxRun: 1,
|
|
832665
832836
|
transaction: ({ account: account3, bridge: bridge28 }) => {
|
|
832666
832837
|
const { polkadotResources } = account3;
|
|
832667
|
-
(0,
|
|
832668
|
-
(0,
|
|
832669
|
-
(0,
|
|
832838
|
+
(0, import_invariant92.default)(polkadotResources, "polkadot");
|
|
832839
|
+
(0, import_invariant92.default)(polkadotResources?.unlockingBalance.gt(MIN_LOCKED_BALANCE_REQ), "can't rebond");
|
|
832840
|
+
(0, import_invariant92.default)(account3.spendableBalance.gt(POLKADOT_MIN_SAFE), "can't cover fee");
|
|
832670
832841
|
const amount = import_bignumber385.BigNumber.maximum(polkadotResources.unlockingBalance.times(0.2), MIN_LOCKED_BALANCE_REQ);
|
|
832671
832842
|
return {
|
|
832672
832843
|
transaction: bridge28.createTransaction(account3),
|
|
@@ -832686,9 +832857,9 @@ var polkadot3 = {
|
|
|
832686
832857
|
feature: "staking",
|
|
832687
832858
|
maxRun: 1,
|
|
832688
832859
|
transaction: ({ account: account3, bridge: bridge28 }) => {
|
|
832689
|
-
(0,
|
|
832690
|
-
(0,
|
|
832691
|
-
(0,
|
|
832860
|
+
(0, import_invariant92.default)(account3.polkadotResources, "polkadot");
|
|
832861
|
+
(0, import_invariant92.default)(canNominate(account3), "can't nominate");
|
|
832862
|
+
(0, import_invariant92.default)(account3.spendableBalance.gt(POLKADOT_MIN_SAFE), "cant cover fee");
|
|
832692
832863
|
const data6 = getCurrentPolkadotPreloadData();
|
|
832693
832864
|
const validators7 = (0, import_sampleSize3.default)(data6.validators.map((v38) => v38.address), 2);
|
|
832694
832865
|
return {
|
|
@@ -832710,9 +832881,9 @@ var polkadot3 = {
|
|
|
832710
832881
|
maxRun: 1,
|
|
832711
832882
|
transaction: ({ account: account3, bridge: bridge28 }) => {
|
|
832712
832883
|
const { polkadotResources } = account3;
|
|
832713
|
-
(0,
|
|
832714
|
-
(0,
|
|
832715
|
-
(0,
|
|
832884
|
+
(0, import_invariant92.default)(polkadotResources, "polkadot");
|
|
832885
|
+
(0, import_invariant92.default)(polkadotResources?.unlockedBalance.gt(0), "nothing to withdraw");
|
|
832886
|
+
(0, import_invariant92.default)(account3.spendableBalance.gt(POLKADOT_MIN_SAFE), "can't cover fee");
|
|
832716
832887
|
return {
|
|
832717
832888
|
transaction: bridge28.createTransaction(account3),
|
|
832718
832889
|
updates: [
|
|
@@ -832730,7 +832901,7 @@ var bot_specs_default7 = {
|
|
|
832730
832901
|
};
|
|
832731
832902
|
|
|
832732
832903
|
// ../../libs/coin-modules/coin-solana/lib-es/specs.js
|
|
832733
|
-
var
|
|
832904
|
+
var import_invariant93 = __toESM(require("invariant"));
|
|
832734
832905
|
var import_expect15 = __toESM(require_build21());
|
|
832735
832906
|
init_lib_es5();
|
|
832736
832907
|
|
|
@@ -833120,7 +833291,7 @@ var solana = {
|
|
|
833120
833291
|
testDestination: genericTestDestination,
|
|
833121
833292
|
deviceAction: acceptTransferTransaction,
|
|
833122
833293
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
833123
|
-
(0,
|
|
833294
|
+
(0, import_invariant93.default)(maxSpendable.gt(0), "balance is 0");
|
|
833124
833295
|
const transaction = bridge28.createTransaction(account3);
|
|
833125
833296
|
const sibling = pickSiblings(siblings, maxAccount7);
|
|
833126
833297
|
const recipient = sibling.freshAddress;
|
|
@@ -833141,7 +833312,7 @@ var solana = {
|
|
|
833141
833312
|
maxRun: 1,
|
|
833142
833313
|
deviceAction: acceptTransferTransaction,
|
|
833143
833314
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
833144
|
-
(0,
|
|
833315
|
+
(0, import_invariant93.default)(maxSpendable.gt(0), "balance is 0");
|
|
833145
833316
|
const transaction = bridge28.createTransaction(account3);
|
|
833146
833317
|
const sibling = pickSiblings(siblings, maxAccount7);
|
|
833147
833318
|
const recipient = sibling.freshAddress;
|
|
@@ -833152,8 +833323,8 @@ var solana = {
|
|
|
833152
833323
|
},
|
|
833153
833324
|
test: (input) => {
|
|
833154
833325
|
const { accountBeforeTransaction, account: account3, operation } = input;
|
|
833155
|
-
const
|
|
833156
|
-
botTest("operation value should be estimated max spendable", () => (0, import_expect15.default)(operation.value.toNumber()).toBe(
|
|
833326
|
+
const estimatedMaxSpendable = import_bignumber387.default.max(accountBeforeTransaction.spendableBalance.minus(SYSTEM_ACCOUNT_RENT_EXEMPT), 0).toNumber();
|
|
833327
|
+
botTest("operation value should be estimated max spendable", () => (0, import_expect15.default)(operation.value.toNumber()).toBe(estimatedMaxSpendable));
|
|
833157
833328
|
botTest("account spendableBalance should be zero", () => (0, import_expect15.default)(account3.spendableBalance.toNumber()).toBe(0));
|
|
833158
833329
|
expectCorrectBalanceChange2(input);
|
|
833159
833330
|
expectCorrectMemo(input);
|
|
@@ -833170,8 +833341,8 @@ var solana = {
|
|
|
833170
833341
|
if (solanaResources === void 0) {
|
|
833171
833342
|
throw new Error("solana resources required");
|
|
833172
833343
|
}
|
|
833173
|
-
(0,
|
|
833174
|
-
(0,
|
|
833344
|
+
(0, import_invariant93.default)(solanaResources.stakes.length < 10, "already enough delegations");
|
|
833345
|
+
(0, import_invariant93.default)(account3.spendableBalance.gte(3e6), "not enough balance");
|
|
833175
833346
|
const { validators: validators7 } = getCurrentSolanaPreloadData(account3.currency);
|
|
833176
833347
|
const notUsedValidators = validators7.filter((v38) => solanaResources.stakes.every((s49) => s49.delegation?.voteAccAddr !== v38.voteAccount));
|
|
833177
833348
|
const validator2 = (0, import_fp6.sample)(notUsedValidators);
|
|
@@ -833219,7 +833390,7 @@ var solana = {
|
|
|
833219
833390
|
maxRun: 1,
|
|
833220
833391
|
deviceAction: acceptStakeUndelegateTransaction,
|
|
833221
833392
|
transaction: ({ account: account3, bridge: bridge28 }) => {
|
|
833222
|
-
(0,
|
|
833393
|
+
(0, import_invariant93.default)(account3.spendableBalance.gt(0), "not enough balance");
|
|
833223
833394
|
const { solanaResources } = account3;
|
|
833224
833395
|
if (solanaResources === void 0) {
|
|
833225
833396
|
throw new Error("solana resources required");
|
|
@@ -833266,7 +833437,7 @@ var solana = {
|
|
|
833266
833437
|
maxRun: 1,
|
|
833267
833438
|
deviceAction: acceptStakeUndelegateTransaction,
|
|
833268
833439
|
transaction: ({ account: account3, bridge: bridge28 }) => {
|
|
833269
|
-
(0,
|
|
833440
|
+
(0, import_invariant93.default)(account3.spendableBalance.gt(0), "not enough balance");
|
|
833270
833441
|
const { solanaResources } = account3;
|
|
833271
833442
|
if (solanaResources === void 0) {
|
|
833272
833443
|
throw new Error("solana resources required");
|
|
@@ -833313,7 +833484,7 @@ var solana = {
|
|
|
833313
833484
|
maxRun: 1,
|
|
833314
833485
|
deviceAction: acceptStakeDelegateTransaction,
|
|
833315
833486
|
transaction: ({ account: account3, bridge: bridge28 }) => {
|
|
833316
|
-
(0,
|
|
833487
|
+
(0, import_invariant93.default)(account3.spendableBalance.gt(0), "not enough balance");
|
|
833317
833488
|
const { solanaResources } = account3;
|
|
833318
833489
|
if (solanaResources === void 0) {
|
|
833319
833490
|
throw new Error("solana resources required");
|
|
@@ -833364,7 +833535,7 @@ var solana = {
|
|
|
833364
833535
|
maxRun: 1,
|
|
833365
833536
|
deviceAction: acceptStakeDelegateTransaction,
|
|
833366
833537
|
transaction: ({ account: account3, bridge: bridge28 }) => {
|
|
833367
|
-
(0,
|
|
833538
|
+
(0, import_invariant93.default)(account3.spendableBalance.gt(0), "not enough balance");
|
|
833368
833539
|
const { solanaResources } = account3;
|
|
833369
833540
|
if (solanaResources === void 0) {
|
|
833370
833541
|
throw new Error("solana resources required");
|
|
@@ -833415,7 +833586,7 @@ var solana = {
|
|
|
833415
833586
|
maxRun: 1,
|
|
833416
833587
|
deviceAction: acceptStakeWithdrawTransaction,
|
|
833417
833588
|
transaction: ({ account: account3, bridge: bridge28 }) => {
|
|
833418
|
-
(0,
|
|
833589
|
+
(0, import_invariant93.default)(account3.spendableBalance.gt(0), "not enough balance");
|
|
833419
833590
|
const { solanaResources } = account3;
|
|
833420
833591
|
if (solanaResources === void 0) {
|
|
833421
833592
|
throw new Error("solana resources required");
|
|
@@ -833459,12 +833630,12 @@ var solana = {
|
|
|
833459
833630
|
feature: "tokens",
|
|
833460
833631
|
deviceAction: acceptTransferTokensWithATACreationTransaction,
|
|
833461
833632
|
transaction: ({ account: account3, bridge: bridge28, siblings, maxSpendable }) => {
|
|
833462
|
-
(0,
|
|
833633
|
+
(0, import_invariant93.default)(maxSpendable.gt(0), "balance is 0");
|
|
833463
833634
|
const senderTokenAcc = findTokenSubAccountWithBalance(account3);
|
|
833464
|
-
(0,
|
|
833635
|
+
(0, import_invariant93.default)(senderTokenAcc, "Sender token account with available balance not found");
|
|
833465
833636
|
const token = senderTokenAcc.token;
|
|
833466
833637
|
const siblingWithoutToken = siblings.find((acc) => !findTokenSubAccount(acc, token.id));
|
|
833467
|
-
(0,
|
|
833638
|
+
(0, import_invariant93.default)(siblingWithoutToken, `Recipient without ${token.ticker} ATA not found`);
|
|
833468
833639
|
const amount = senderTokenAcc.balance.div(1.9 + 0.2 * Math.random()).integerValue();
|
|
833469
833640
|
const recipient = siblingWithoutToken.freshAddress;
|
|
833470
833641
|
const transaction = bridge28.createTransaction(account3);
|
|
@@ -833489,12 +833660,12 @@ var solana = {
|
|
|
833489
833660
|
feature: "tokens",
|
|
833490
833661
|
deviceAction: acceptTransferTokensTransaction,
|
|
833491
833662
|
transaction: ({ account: account3, bridge: bridge28, siblings, maxSpendable }) => {
|
|
833492
|
-
(0,
|
|
833663
|
+
(0, import_invariant93.default)(maxSpendable.gt(0), "balance is 0");
|
|
833493
833664
|
const senderTokenAcc = findTokenSubAccountWithBalance(account3);
|
|
833494
|
-
(0,
|
|
833665
|
+
(0, import_invariant93.default)(senderTokenAcc, "Sender token account with available balance not found");
|
|
833495
833666
|
const token = senderTokenAcc.token;
|
|
833496
833667
|
const siblingTokenAccount = siblings.find((acc) => findTokenSubAccount(acc, token.id));
|
|
833497
|
-
(0,
|
|
833668
|
+
(0, import_invariant93.default)(siblingTokenAccount, `Sibling with ${token.ticker} token ATA not found`);
|
|
833498
833669
|
const amount = senderTokenAcc.balance.div(1.9 + 0.2 * Math.random()).integerValue();
|
|
833499
833670
|
const recipient = siblingTokenAccount.freshAddress;
|
|
833500
833671
|
const transaction = bridge28.createTransaction(account3);
|
|
@@ -833513,12 +833684,12 @@ var solana = {
|
|
|
833513
833684
|
maxRun: 1,
|
|
833514
833685
|
deviceAction: acceptTransferTokensWithATACreationTransaction,
|
|
833515
833686
|
transaction: ({ account: account3, bridge: bridge28, siblings, maxSpendable }) => {
|
|
833516
|
-
(0,
|
|
833687
|
+
(0, import_invariant93.default)(maxSpendable.gt(0), "balance is 0");
|
|
833517
833688
|
const senderTokenAcc = findTokenAccountWithExtensionAndBalance(account3, "transferFee");
|
|
833518
|
-
(0,
|
|
833689
|
+
(0, import_invariant93.default)(senderTokenAcc, "Sender token2022 account with transfer fee extension and available balance not found");
|
|
833519
833690
|
const token = senderTokenAcc.token;
|
|
833520
833691
|
const siblingWithoutToken = siblings.find((acc) => !findTokenSubAccount(acc, token.id));
|
|
833521
|
-
(0,
|
|
833692
|
+
(0, import_invariant93.default)(siblingWithoutToken, `Recipient without ${token.ticker} ATA not found`);
|
|
833522
833693
|
const amount = senderTokenAcc.balance.div(1.9 + 0.2 * Math.random()).integerValue();
|
|
833523
833694
|
const recipient = siblingWithoutToken.freshAddress;
|
|
833524
833695
|
const transaction = bridge28.createTransaction(account3);
|
|
@@ -833540,12 +833711,12 @@ var solana = {
|
|
|
833540
833711
|
maxRun: 1,
|
|
833541
833712
|
deviceAction: acceptTransferTokensTransaction,
|
|
833542
833713
|
transaction: ({ account: account3, bridge: bridge28, siblings, maxSpendable }) => {
|
|
833543
|
-
(0,
|
|
833714
|
+
(0, import_invariant93.default)(maxSpendable.gt(0), "balance is 0");
|
|
833544
833715
|
const senderTokenAcc = findTokenAccountWithExtensionAndBalance(account3, "transferFee");
|
|
833545
|
-
(0,
|
|
833716
|
+
(0, import_invariant93.default)(senderTokenAcc, "Sender token2022 account with transfer fee extension and available balance not found");
|
|
833546
833717
|
const token = senderTokenAcc.token;
|
|
833547
833718
|
const siblingTokenAccount = siblings.find((acc) => findTokenSubAccount(acc, token.id));
|
|
833548
|
-
(0,
|
|
833719
|
+
(0, import_invariant93.default)(siblingTokenAccount, `Recipient without ${token.ticker} ATA not found`);
|
|
833549
833720
|
const amount = senderTokenAcc.balance.div(1.9 + 0.2 * Math.random()).integerValue();
|
|
833550
833721
|
const recipient = siblingTokenAccount.freshAddress;
|
|
833551
833722
|
const transaction = bridge28.createTransaction(account3);
|
|
@@ -833562,12 +833733,12 @@ var solana = {
|
|
|
833562
833733
|
maxRun: 1,
|
|
833563
833734
|
deviceAction: acceptTransferTokensWithATACreationTransaction,
|
|
833564
833735
|
transaction: ({ account: account3, bridge: bridge28, siblings, maxSpendable }) => {
|
|
833565
|
-
(0,
|
|
833736
|
+
(0, import_invariant93.default)(maxSpendable.gt(0), "balance is 0");
|
|
833566
833737
|
const senderTokenAcc = findTokenAccountWithExtensionAndBalance(account3, "transferFee");
|
|
833567
|
-
(0,
|
|
833738
|
+
(0, import_invariant93.default)(senderTokenAcc, "Sender token2022 account with transfer fee extension and available balance not found");
|
|
833568
833739
|
const token = senderTokenAcc.token;
|
|
833569
833740
|
const siblingWithoutToken = siblings.find((acc) => !findTokenSubAccount(acc, token.id));
|
|
833570
|
-
(0,
|
|
833741
|
+
(0, import_invariant93.default)(siblingWithoutToken, `Recipient without ${token.ticker} ATA not found`);
|
|
833571
833742
|
const amount = senderTokenAcc.balance.div(1.9 + 0.2 * Math.random()).integerValue();
|
|
833572
833743
|
const recipient = siblingWithoutToken.freshAddress;
|
|
833573
833744
|
const transaction = bridge28.createTransaction(account3);
|
|
@@ -833589,12 +833760,12 @@ var solana = {
|
|
|
833589
833760
|
maxRun: 1,
|
|
833590
833761
|
deviceAction: acceptTransferTokensTransaction,
|
|
833591
833762
|
transaction: ({ account: account3, bridge: bridge28, siblings, maxSpendable }) => {
|
|
833592
|
-
(0,
|
|
833763
|
+
(0, import_invariant93.default)(maxSpendable.gt(0), "balance is 0");
|
|
833593
833764
|
const senderTokenAcc = findTokenAccountWithExtensionAndBalance(account3, "transferFee");
|
|
833594
|
-
(0,
|
|
833765
|
+
(0, import_invariant93.default)(senderTokenAcc, "Sender token2022 account with transfer fee extension and available balance not found");
|
|
833595
833766
|
const token = senderTokenAcc.token;
|
|
833596
833767
|
const siblingTokenAccount = siblings.find((acc) => findTokenSubAccount(acc, token.id));
|
|
833597
|
-
(0,
|
|
833768
|
+
(0, import_invariant93.default)(siblingTokenAccount, `Recipient without ${token.ticker} ATA not found`);
|
|
833598
833769
|
const amount = senderTokenAcc.balance.div(1.9 + 0.2 * Math.random()).integerValue();
|
|
833599
833770
|
const recipient = siblingTokenAccount.freshAddress;
|
|
833600
833771
|
const transaction = bridge28.createTransaction(account3);
|
|
@@ -833689,7 +833860,7 @@ var specs_default9 = {
|
|
|
833689
833860
|
};
|
|
833690
833861
|
|
|
833691
833862
|
// ../../libs/coin-modules/coin-stacks/lib-es/test/bot-specs.js
|
|
833692
|
-
var
|
|
833863
|
+
var import_invariant94 = __toESM(require("invariant"));
|
|
833693
833864
|
init_lib_es5();
|
|
833694
833865
|
var import_bignumber388 = __toESM(require("bignumber.js"));
|
|
833695
833866
|
var import_expect16 = __toESM(require_build21());
|
|
@@ -833753,7 +833924,7 @@ var stacksSpecs = {
|
|
|
833753
833924
|
// Need an evolution of the bot to tolerate unconfirmed ops and just warn maybe instead of error
|
|
833754
833925
|
testTimeout: 25 * 60 * 1e3,
|
|
833755
833926
|
transactionCheck: ({ maxSpendable }) => {
|
|
833756
|
-
(0,
|
|
833927
|
+
(0, import_invariant94.default)(maxSpendable.gt(MIN_SAFE5), "balance is too low");
|
|
833757
833928
|
},
|
|
833758
833929
|
mutations: [
|
|
833759
833930
|
{
|
|
@@ -833765,7 +833936,7 @@ var stacksSpecs = {
|
|
|
833765
833936
|
const recipient = sibling.freshAddress;
|
|
833766
833937
|
let amount = account3.spendableBalance.div(1.9 + 0.2 * Math.random()).integerValue();
|
|
833767
833938
|
if (!sibling.used && amount.lt(MIN_SAFE5)) {
|
|
833768
|
-
(0,
|
|
833939
|
+
(0, import_invariant94.default)(account3.spendableBalance.gt(MIN_SAFE5), "send is too low to activate account");
|
|
833769
833940
|
amount = MIN_SAFE5;
|
|
833770
833941
|
}
|
|
833771
833942
|
const transaction = bridge28.createTransaction(account3);
|
|
@@ -833805,7 +833976,7 @@ var bot_specs_default8 = {
|
|
|
833805
833976
|
|
|
833806
833977
|
// ../../libs/coin-modules/coin-stellar/lib-es/test/bot-specs.js
|
|
833807
833978
|
var import_expect17 = __toESM(require_build21());
|
|
833808
|
-
var
|
|
833979
|
+
var import_invariant95 = __toESM(require("invariant"));
|
|
833809
833980
|
var import_bignumber389 = __toESM(require("bignumber.js"));
|
|
833810
833981
|
init_lib_es5();
|
|
833811
833982
|
|
|
@@ -833933,13 +834104,13 @@ var stellar2 = {
|
|
|
833933
834104
|
feature: "send",
|
|
833934
834105
|
maxRun: 1,
|
|
833935
834106
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
833936
|
-
(0,
|
|
834107
|
+
(0, import_invariant95.default)(maxSpendable.gt(minAmountCutoff), "XLM balance is too low");
|
|
833937
834108
|
const transaction = bridge28.createTransaction(account3);
|
|
833938
834109
|
const sibling = pickSiblings(siblings, 4);
|
|
833939
834110
|
const recipient = sibling.freshAddress;
|
|
833940
834111
|
let amount = maxSpendable.div(1.9 + 0.2 * Math.random()).integerValue();
|
|
833941
834112
|
if (!sibling.used && amount.lt(reserve)) {
|
|
833942
|
-
(0,
|
|
834113
|
+
(0, import_invariant95.default)(maxSpendable.gt(reserve.plus(minAmountCutoff)), "not enough XLM funds to send to new account");
|
|
833943
834114
|
amount = reserve;
|
|
833944
834115
|
}
|
|
833945
834116
|
const updates7 = [
|
|
@@ -833989,7 +834160,7 @@ var stellar2 = {
|
|
|
833989
834160
|
feature: "sendMax",
|
|
833990
834161
|
maxRun: 1,
|
|
833991
834162
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
833992
|
-
(0,
|
|
834163
|
+
(0, import_invariant95.default)(maxSpendable.gt(minAmountCutoff), "XLM balance is too low");
|
|
833993
834164
|
const transaction = bridge28.createTransaction(account3);
|
|
833994
834165
|
const sibling = pickSiblings(siblings, 4);
|
|
833995
834166
|
const recipient = sibling.freshAddress;
|
|
@@ -834040,10 +834211,10 @@ var stellar2 = {
|
|
|
834040
834211
|
feature: "tokens",
|
|
834041
834212
|
maxRun: 1,
|
|
834042
834213
|
transaction: ({ account: account3, bridge: bridge28, maxSpendable }) => {
|
|
834043
|
-
(0,
|
|
834044
|
-
(0,
|
|
834214
|
+
(0, import_invariant95.default)(maxSpendable.gt(reserve), "XLM balance is too low 1");
|
|
834215
|
+
(0, import_invariant95.default)(account3.subAccounts && !findAssetUSDC(account3.subAccounts), "already have subaccounts");
|
|
834045
834216
|
const assetUSDC = findAssetUSDC(listTokensForCryptoCurrency(account3.currency));
|
|
834046
|
-
(0,
|
|
834217
|
+
(0, import_invariant95.default)(assetUSDC, "USDC asset not found");
|
|
834047
834218
|
const transaction = bridge28.createTransaction(account3);
|
|
834048
834219
|
const updates7 = [
|
|
834049
834220
|
{
|
|
@@ -834073,12 +834244,12 @@ var stellar2 = {
|
|
|
834073
834244
|
feature: "tokens",
|
|
834074
834245
|
maxRun: 1,
|
|
834075
834246
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
834076
|
-
(0,
|
|
834247
|
+
(0, import_invariant95.default)(maxSpendable.gt(minAmountCutoff), "XLM balance is too low");
|
|
834077
834248
|
const usdcSubAccount = findAssetUSDC(account3?.subAccounts);
|
|
834078
|
-
(0,
|
|
834079
|
-
(0,
|
|
834249
|
+
(0, import_invariant95.default)(usdcSubAccount, "USDC asset not found");
|
|
834250
|
+
(0, import_invariant95.default)(usdcSubAccount?.balance.gt(MIN_ASSET_BALANCE), "USDC balance is too low");
|
|
834080
834251
|
const siblingWithAssetUSDC = siblings.find((s49) => findAssetUSDC(s49.subAccounts));
|
|
834081
|
-
(0,
|
|
834252
|
+
(0, import_invariant95.default)(siblingWithAssetUSDC, "No siblings with USDC asset");
|
|
834082
834253
|
if (!usdcSubAccount || !siblingWithAssetUSDC) {
|
|
834083
834254
|
throw new Error("No USDC asset or sibling with USDC asset");
|
|
834084
834255
|
}
|
|
@@ -834129,7 +834300,7 @@ var bot_specs_default9 = {
|
|
|
834129
834300
|
|
|
834130
834301
|
// ../../libs/coin-modules/coin-tezos/lib-es/test/bot-specs.js
|
|
834131
834302
|
var import_sample8 = __toESM(require("lodash/sample"));
|
|
834132
|
-
var
|
|
834303
|
+
var import_invariant96 = __toESM(require("invariant"));
|
|
834133
834304
|
init_lib_es5();
|
|
834134
834305
|
|
|
834135
834306
|
// ../../libs/coin-modules/coin-tezos/lib-es/types/bridge.js
|
|
@@ -834236,12 +834407,12 @@ var maxAccount8 = 12;
|
|
|
834236
834407
|
function expectUnrevealed(account3) {
|
|
834237
834408
|
if (!isTezosAccount(account3))
|
|
834238
834409
|
throw Error("Not TezosAccount type");
|
|
834239
|
-
(0,
|
|
834410
|
+
(0, import_invariant96.default)(account3.tezosResources?.revealed === false, "account must be unreleaved");
|
|
834240
834411
|
}
|
|
834241
834412
|
function expectRevealed(account3) {
|
|
834242
834413
|
if (!isTezosAccount(account3))
|
|
834243
834414
|
throw Error("Not TezosAccount type");
|
|
834244
|
-
(0,
|
|
834415
|
+
(0, import_invariant96.default)(account3.tezosResources?.revealed === true, "account must be releaved");
|
|
834245
834416
|
}
|
|
834246
834417
|
var tezosUnit = getCryptoCurrencyById("tezos").units[0];
|
|
834247
834418
|
var safeMinimumForDestinationNotCreated = parseCurrencyUnit(tezosUnit, "0.6");
|
|
@@ -834258,7 +834429,7 @@ var tezos = {
|
|
|
834258
834429
|
testTimeout: 2 * 60 * 1e3,
|
|
834259
834430
|
minViableAmount: strictMin,
|
|
834260
834431
|
transactionCheck: ({ maxSpendable }) => {
|
|
834261
|
-
(0,
|
|
834432
|
+
(0, import_invariant96.default)(maxSpendable.gt(strictMin), "balance is too low");
|
|
834262
834433
|
},
|
|
834263
834434
|
mutations: [
|
|
834264
834435
|
{
|
|
@@ -834305,7 +834476,7 @@ var tezos = {
|
|
|
834305
834476
|
maxRun: 1,
|
|
834306
834477
|
testDestination: genericTestDestination,
|
|
834307
834478
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
834308
|
-
(0,
|
|
834479
|
+
(0, import_invariant96.default)(!isAccountDelegating(account3), "account must not be delegating");
|
|
834309
834480
|
const sibling = pickSiblings(siblings, maxAccount8);
|
|
834310
834481
|
const recipient = sibling.freshAddress;
|
|
834311
834482
|
if (sibling.balance.eq(0) && maxSpendable.lt(safeMinimumForDestinationNotCreated)) {
|
|
@@ -834350,7 +834521,7 @@ var tezos = {
|
|
|
834350
834521
|
feature: "staking",
|
|
834351
834522
|
maxRun: 1,
|
|
834352
834523
|
transaction: ({ account: account3, bridge: bridge28 }) => {
|
|
834353
|
-
(0,
|
|
834524
|
+
(0, import_invariant96.default)(getAccountDelegationSync(account3), "account must be delegating");
|
|
834354
834525
|
expectUnrevealed(account3);
|
|
834355
834526
|
return {
|
|
834356
834527
|
transaction: bridge28.createTransaction(account3),
|
|
@@ -834363,7 +834534,7 @@ var tezos = {
|
|
|
834363
834534
|
feature: "staking",
|
|
834364
834535
|
maxRun: 1,
|
|
834365
834536
|
transaction: ({ account: account3, bridge: bridge28 }) => {
|
|
834366
|
-
(0,
|
|
834537
|
+
(0, import_invariant96.default)(getAccountDelegationSync(account3), "account must be delegating");
|
|
834367
834538
|
expectRevealed(account3);
|
|
834368
834539
|
return {
|
|
834369
834540
|
transaction: bridge28.createTransaction(account3),
|
|
@@ -834381,7 +834552,7 @@ var bot_specs_default10 = {
|
|
|
834381
834552
|
init_lib_es5();
|
|
834382
834553
|
var import_bignumber390 = __toESM(require("bignumber.js"));
|
|
834383
834554
|
var import_expect18 = __toESM(require_build21());
|
|
834384
|
-
var
|
|
834555
|
+
var import_invariant97 = __toESM(require("invariant"));
|
|
834385
834556
|
|
|
834386
834557
|
// ../../libs/coin-modules/coin-ton/lib-es/speculos-deviceActions.js
|
|
834387
834558
|
var generateDeviceActionFlow2 = (scenario) => {
|
|
@@ -834481,7 +834652,7 @@ var tonSpecs = {
|
|
|
834481
834652
|
testTimeout: 6 * 60 * 1e3,
|
|
834482
834653
|
minViableAmount: MIN_SAFE6,
|
|
834483
834654
|
transactionCheck: ({ maxSpendable }) => {
|
|
834484
|
-
(0,
|
|
834655
|
+
(0, import_invariant97.default)(maxSpendable.gt(MIN_SAFE6), "balance is too low");
|
|
834485
834656
|
},
|
|
834486
834657
|
mutations: [
|
|
834487
834658
|
{
|
|
@@ -834490,7 +834661,7 @@ var tonSpecs = {
|
|
|
834490
834661
|
maxRun: 1,
|
|
834491
834662
|
testDestination: testDestination2,
|
|
834492
834663
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
834493
|
-
(0,
|
|
834664
|
+
(0, import_invariant97.default)(maxSpendable.gt(MIN_SAFE6), "balance is too low");
|
|
834494
834665
|
const updates7 = [
|
|
834495
834666
|
{ recipient: pickSiblings(siblings).freshAddress },
|
|
834496
834667
|
{ amount: maxSpendable.div(2).integerValue() },
|
|
@@ -834543,10 +834714,10 @@ var tonSpecs = {
|
|
|
834543
834714
|
maxRun: 1,
|
|
834544
834715
|
deviceAction: generateDeviceActionFlow2(BotScenario2.TOKEN_TRANSFER),
|
|
834545
834716
|
transaction: ({ account: account3, bridge: bridge28, maxSpendable, siblings }) => {
|
|
834546
|
-
(0,
|
|
834717
|
+
(0, import_invariant97.default)(maxSpendable.gt(0), "Spendable balance is too low");
|
|
834547
834718
|
const subAccount = account3.subAccounts?.find((a65) => a65.type === "TokenAccount" && a65.spendableBalance.gt(0));
|
|
834548
834719
|
const recipient = siblings[0].freshAddress;
|
|
834549
|
-
(0,
|
|
834720
|
+
(0, import_invariant97.default)(subAccount && subAccount.type === "TokenAccount", "no subAccount with jUSDT");
|
|
834550
834721
|
const amount = subAccount.balance.div(1.9 + 0.2 * Math.random()).integerValue();
|
|
834551
834722
|
const updates7 = [
|
|
834552
834723
|
{
|
|
@@ -834584,7 +834755,7 @@ var specs_default10 = {
|
|
|
834584
834755
|
|
|
834585
834756
|
// ../../libs/coin-modules/coin-vechain/lib-es/test/bot-specs.js
|
|
834586
834757
|
var import_bignumber391 = __toESM(require("bignumber.js"));
|
|
834587
|
-
var
|
|
834758
|
+
var import_invariant98 = __toESM(require("invariant"));
|
|
834588
834759
|
init_lib_es5();
|
|
834589
834760
|
|
|
834590
834761
|
// ../../libs/coin-modules/coin-vechain/lib-es/test/bot-deviceActions.js
|
|
@@ -834648,8 +834819,8 @@ var vet = {
|
|
|
834648
834819
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
834649
834820
|
if (!account3.subAccounts?.[0])
|
|
834650
834821
|
throw new Error("no VTHO account");
|
|
834651
|
-
(0,
|
|
834652
|
-
(0,
|
|
834822
|
+
(0, import_invariant98.default)(account3.balance.gt(MIN_VET_TRANSACTION_AMOUNT), "Vechain: VET balance is empty");
|
|
834823
|
+
(0, import_invariant98.default)(account3.subAccounts[0].balance.gt(MAX_VTHO_FEE_FOR_VET_TRANSACTION), "Vechain: VTHO balance is not enough");
|
|
834653
834824
|
const sibling = pickSiblings(siblings, 2);
|
|
834654
834825
|
const recipient = sibling.freshAddress;
|
|
834655
834826
|
const transaction = bridge28.createTransaction(account3);
|
|
@@ -834671,8 +834842,8 @@ var vet = {
|
|
|
834671
834842
|
transaction: ({ account: account3, siblings, bridge: bridge28 }) => {
|
|
834672
834843
|
if (!account3.subAccounts?.[0])
|
|
834673
834844
|
throw new Error("no VTHO account");
|
|
834674
|
-
(0,
|
|
834675
|
-
(0,
|
|
834845
|
+
(0, import_invariant98.default)(account3.balance.gt(MIN_VET_TRANSACTION_AMOUNT), "Vechain: VET balance is empty");
|
|
834846
|
+
(0, import_invariant98.default)(account3.subAccounts?.[0].balance.gt(MAX_VTHO_FEE_FOR_VET_TRANSACTION), "Vechain: VTHO balance is not enough");
|
|
834676
834847
|
const sibling = pickSiblings(siblings, 4);
|
|
834677
834848
|
const recipient = sibling.freshAddress;
|
|
834678
834849
|
const transaction = bridge28.createTransaction(account3);
|
|
@@ -834700,7 +834871,7 @@ var vtho = {
|
|
|
834700
834871
|
transaction: ({ account: account3, siblings, bridge: bridge28 }) => {
|
|
834701
834872
|
if (!account3.subAccounts?.[0])
|
|
834702
834873
|
throw new Error("no VTHO account");
|
|
834703
|
-
(0,
|
|
834874
|
+
(0, import_invariant98.default)(account3.subAccounts?.[0].balance.gt(MAX_VTHO_FEE_FOR_VTHO_TRANSACTION * 2), "Vechain: VTHO balance is not enough");
|
|
834704
834875
|
const sibling = pickSiblings(siblings, 2);
|
|
834705
834876
|
const recipient = sibling.freshAddress;
|
|
834706
834877
|
if (!account3.subAccounts || !account3.subAccounts[0] || !(account3.subAccounts[0].type == "TokenAccount"))
|
|
@@ -834725,7 +834896,7 @@ var vtho = {
|
|
|
834725
834896
|
transaction: ({ account: account3, siblings, bridge: bridge28 }) => {
|
|
834726
834897
|
if (!account3.subAccounts?.[0])
|
|
834727
834898
|
throw new Error("no VTHO account");
|
|
834728
|
-
(0,
|
|
834899
|
+
(0, import_invariant98.default)(account3.subAccounts?.[0].balance.gt(MAX_VTHO_FEE_FOR_VTHO_TRANSACTION), "Vechain: VTHO balance is not enough");
|
|
834729
834900
|
const sibling = pickSiblings(siblings, 4);
|
|
834730
834901
|
const recipient = sibling.freshAddress;
|
|
834731
834902
|
if (!account3.subAccounts || !account3.subAccounts[0] || !(account3.subAccounts[0].type == "TokenAccount"))
|
|
@@ -834750,7 +834921,7 @@ var vtho = {
|
|
|
834750
834921
|
var bot_specs_default11 = { vtho, vet };
|
|
834751
834922
|
|
|
834752
834923
|
// ../../libs/coin-modules/coin-xrp/lib-es/test/bot-specs.js
|
|
834753
|
-
var
|
|
834924
|
+
var import_invariant99 = __toESM(require("invariant"));
|
|
834754
834925
|
var import_expect19 = __toESM(require_build21());
|
|
834755
834926
|
init_lib_es5();
|
|
834756
834927
|
|
|
@@ -834820,13 +834991,13 @@ var xrp = {
|
|
|
834820
834991
|
maxRun: 1,
|
|
834821
834992
|
testDestination: genericTestDestination,
|
|
834822
834993
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
834823
|
-
(0,
|
|
834994
|
+
(0, import_invariant99.default)(maxSpendable.gt(minAmountCutoff2), "balance is too low");
|
|
834824
834995
|
const transaction = bridge28.createTransaction(account3);
|
|
834825
834996
|
const sibling = pickSiblings(siblings, 3);
|
|
834826
834997
|
const recipient = sibling.freshAddress;
|
|
834827
834998
|
let amount = maxSpendable.div(1.9 + 0.2 * Math.random()).integerValue();
|
|
834828
834999
|
if (!sibling.used && amount.lt(reserve2)) {
|
|
834829
|
-
(0,
|
|
835000
|
+
(0, import_invariant99.default)(maxSpendable.gt(reserve2.plus(minAmountCutoff2)), "not enough funds to send to new account");
|
|
834830
835001
|
amount = reserve2;
|
|
834831
835002
|
}
|
|
834832
835003
|
return {
|
|
@@ -834855,7 +835026,7 @@ var bot_specs_default12 = {
|
|
|
834855
835026
|
};
|
|
834856
835027
|
|
|
834857
835028
|
// ../../libs/coin-modules/coin-mina/lib-es/test/bot-specs.js
|
|
834858
|
-
var
|
|
835029
|
+
var import_invariant100 = __toESM(require("invariant"));
|
|
834859
835030
|
init_lib_es5();
|
|
834860
835031
|
var import_bignumber392 = __toESM(require("bignumber.js"));
|
|
834861
835032
|
var import_expect20 = __toESM(require_build21());
|
|
@@ -834943,7 +835114,7 @@ var minaSpecs = {
|
|
|
834943
835114
|
testTimeout: 15 * 60 * 1e3,
|
|
834944
835115
|
minViableAmount: MIN_SAFE7,
|
|
834945
835116
|
transactionCheck: ({ maxSpendable }) => {
|
|
834946
|
-
(0,
|
|
835117
|
+
(0, import_invariant100.default)(maxSpendable.gt(MIN_SAFE7), "balance is too low");
|
|
834947
835118
|
},
|
|
834948
835119
|
mutations: [
|
|
834949
835120
|
{
|
|
@@ -834952,7 +835123,7 @@ var minaSpecs = {
|
|
|
834952
835123
|
testDestination: genericTestDestination,
|
|
834953
835124
|
feature: "send",
|
|
834954
835125
|
transaction: ({ account: account3, siblings, bridge: bridge28, maxSpendable }) => {
|
|
834955
|
-
(0,
|
|
835126
|
+
(0, import_invariant100.default)(maxSpendable.gt(MIN_SAFE7), "balance is too low");
|
|
834956
835127
|
const sibling = pickSiblings(siblings, maxAccount9);
|
|
834957
835128
|
const recipient = sibling.freshAddress;
|
|
834958
835129
|
const amount = maxSpendable.div(2).integerValue();
|
|
@@ -835051,7 +835222,7 @@ var specs_default11 = {
|
|
|
835051
835222
|
|
|
835052
835223
|
// ../../libs/ledger-live-common/lib-es/bot/engine.js
|
|
835053
835224
|
var import_expect21 = __toESM(require_build21());
|
|
835054
|
-
var
|
|
835225
|
+
var import_invariant101 = __toESM(require("invariant"));
|
|
835055
835226
|
var import_performance_now = __toESM(require_performance_now());
|
|
835056
835227
|
var import_sample9 = __toESM(require("lodash/sample"));
|
|
835057
835228
|
var import_rxjs156 = require("rxjs");
|
|
@@ -835115,9 +835286,9 @@ var delayBetweenScanAccountRetries = 5e3;
|
|
|
835115
835286
|
async function runWithAppSpec(spec2, reportLog) {
|
|
835116
835287
|
log2("engine", `spec ${spec2.name}`);
|
|
835117
835288
|
const seed = getEnv("SEED");
|
|
835118
|
-
(0,
|
|
835289
|
+
(0, import_invariant101.default)(seed, "SEED is not set");
|
|
835119
835290
|
const coinapps = getEnv("COINAPPS");
|
|
835120
|
-
(0,
|
|
835291
|
+
(0, import_invariant101.default)(coinapps, "COINAPPS is not set");
|
|
835121
835292
|
if (!appCandidates) {
|
|
835122
835293
|
appCandidates = await listAppCandidates(coinapps);
|
|
835123
835294
|
}
|
|
@@ -835129,7 +835300,7 @@ async function runWithAppSpec(spec2, reportLog) {
|
|
|
835129
835300
|
console.warn(appQuery);
|
|
835130
835301
|
console.warn(JSON.stringify(appCandidates, void 0, 2));
|
|
835131
835302
|
}
|
|
835132
|
-
(0,
|
|
835303
|
+
(0, import_invariant101.default)(appCandidate, "%s: no app found. Are you sure your COINAPPS is up to date?", spec2.name, coinapps);
|
|
835133
835304
|
log2("engine", `spec ${spec2.name} will use ${formatAppCandidate(appCandidate)}`);
|
|
835134
835305
|
const deviceParams = {
|
|
835135
835306
|
...appCandidate,
|
|
@@ -835185,7 +835356,7 @@ Please increase the account target to at least ${spec2.mutations.length + 1} acc
|
|
|
835185
835356
|
}
|
|
835186
835357
|
appReport.accountsBefore = accounts2;
|
|
835187
835358
|
if (!spec2.allowEmptyAccounts) {
|
|
835188
|
-
(0,
|
|
835359
|
+
(0, import_invariant101.default)(accounts2.length > 0, "unexpected empty accounts for " + currency24.name);
|
|
835189
835360
|
}
|
|
835190
835361
|
const preloadStats = preloadDuration > 10 ? ` (preload: ${formatTime(preloadDuration)})` : "";
|
|
835191
835362
|
reportLog(`Spec ${spec2.name} found ${accounts2.length} ${currency24.name} accounts${preloadStats}. Will use ${formatAppCandidate(appCandidate)}
|
|
@@ -835322,7 +835493,7 @@ async function runOnAccount({ appCandidate, spec: spec2, device: device2, accoun
|
|
|
835322
835493
|
for (const mutation2 of mutations) {
|
|
835323
835494
|
try {
|
|
835324
835495
|
const count = mutationsCount[mutation2.name] || 0;
|
|
835325
|
-
(0,
|
|
835496
|
+
(0, import_invariant101.default)(count < (mutation2.maxRun || Infinity), "maximum mutation run reached (%s)", count);
|
|
835326
835497
|
const arg = {
|
|
835327
835498
|
appCandidate,
|
|
835328
835499
|
account: account3,
|
|
@@ -835443,7 +835614,7 @@ async function runOnAccount({ appCandidate, spec: spec2, device: device2, accoun
|
|
|
835443
835614
|
account: account3,
|
|
835444
835615
|
transaction,
|
|
835445
835616
|
status
|
|
835446
|
-
}), (0, import_operators13.first)((e37) => e37.type === "signed"), (0, import_operators13.map)((e37) => ((0,
|
|
835617
|
+
}), (0, import_operators13.first)((e37) => e37.type === "signed"), (0, import_operators13.map)((e37) => ((0, import_invariant101.default)(e37.type === "signed", "signed operation"), e37.signedOperation))));
|
|
835447
835618
|
deepFreezeSignedOperation(signedOperation);
|
|
835448
835619
|
report.signedOperation = signedOperation;
|
|
835449
835620
|
report.signedTime = (0, import_performance_now.default)();
|
|
@@ -835528,7 +835699,7 @@ async function runOnAccount({ appCandidate, spec: spec2, device: device2, accoun
|
|
|
835528
835699
|
let operation2;
|
|
835529
835700
|
try {
|
|
835530
835701
|
operation2 = account4.operations.find((op) => op.hash === sendingOperation.hash);
|
|
835531
|
-
botTest("destination account should receive an operation (by tx hash)", () => (0,
|
|
835702
|
+
botTest("destination account should receive an operation (by tx hash)", () => (0, import_invariant101.default)(operation2, "no operation found with hash %s", sendingOperation.hash));
|
|
835532
835703
|
if (!operation2)
|
|
835533
835704
|
throw new Error();
|
|
835534
835705
|
const arg = {
|
|
@@ -835684,7 +835855,7 @@ function transactionTest({ operation, optimisticOperation, account: account3, ac
|
|
|
835684
835855
|
if (blockAvgTime && account3.blockHeight) {
|
|
835685
835856
|
const expected = getOperationConfirmationNumber(operation, account3);
|
|
835686
835857
|
const expectedMax = Math.ceil(upperThreshold / blockAvgTime);
|
|
835687
|
-
botTest("low amount of confirmations", () => (0,
|
|
835858
|
+
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));
|
|
835688
835859
|
}
|
|
835689
835860
|
botTest("optimisticOperation.value must not be NaN", () => (0, import_expect21.default)(!optimisticOperation.value.isNaN()).toBe(true));
|
|
835690
835861
|
botTest("optimisticOperation.fee must not be NaN", () => (0, import_expect21.default)(!optimisticOperation.fee.isNaN()).toBe(true));
|
|
@@ -836347,7 +836518,7 @@ function getSpecs({ disabled, filter: filter26 }) {
|
|
|
836347
836518
|
}
|
|
836348
836519
|
async function bot({ disabled, filter: filter26 } = {}) {
|
|
836349
836520
|
const SEED = getEnv("SEED");
|
|
836350
|
-
(0,
|
|
836521
|
+
(0, import_invariant102.default)(SEED, "SEED required");
|
|
836351
836522
|
const specsLogs = [];
|
|
836352
836523
|
const specs = getSpecs({ disabled, filter: filter26 });
|
|
836353
836524
|
const timeBefore = Date.now();
|
|
@@ -837431,7 +837602,7 @@ var import_operators19 = require("rxjs/operators");
|
|
|
837431
837602
|
|
|
837432
837603
|
// src/signedOperation.ts
|
|
837433
837604
|
var import_operators18 = require("rxjs/operators");
|
|
837434
|
-
var
|
|
837605
|
+
var import_invariant103 = __toESM(require("invariant"));
|
|
837435
837606
|
var inferSignedOperationsOpts = [
|
|
837436
837607
|
{
|
|
837437
837608
|
name: "signed-operation",
|
|
@@ -837442,13 +837613,13 @@ var inferSignedOperationsOpts = [
|
|
|
837442
837613
|
];
|
|
837443
837614
|
function inferSignedOperations(mainAccount, opts) {
|
|
837444
837615
|
const file = opts["signed-operation"];
|
|
837445
|
-
(0,
|
|
837616
|
+
(0, import_invariant103.default)(file, "--signed-operation file is required");
|
|
837446
837617
|
return jsonFromFile(file).pipe(
|
|
837447
837618
|
(0, import_operators18.map)((json2) => {
|
|
837448
|
-
(0,
|
|
837449
|
-
(0,
|
|
837450
|
-
(0,
|
|
837451
|
-
(0,
|
|
837619
|
+
(0, import_invariant103.default)(typeof json2 === "object", "not an object JSON");
|
|
837620
|
+
(0, import_invariant103.default)(typeof json2.signature === "string", "missing signature");
|
|
837621
|
+
(0, import_invariant103.default)(typeof json2.operation === "object", "missing operation object");
|
|
837622
|
+
(0, import_invariant103.default)(
|
|
837452
837623
|
json2.operation.accountId === mainAccount.id,
|
|
837453
837624
|
"the operation does not match the specified account"
|
|
837454
837625
|
);
|
|
@@ -837901,7 +838072,7 @@ var import_rxjs166 = require("rxjs");
|
|
|
837901
838072
|
var import_operators24 = require("rxjs/operators");
|
|
837902
838073
|
|
|
837903
838074
|
// ../../libs/ledger-live-common/lib-es/hw/getAddress/index.js
|
|
837904
|
-
var
|
|
838075
|
+
var import_invariant104 = __toESM(require("invariant"));
|
|
837905
838076
|
init_lib_es();
|
|
837906
838077
|
init_lib_es2();
|
|
837907
838078
|
|
|
@@ -837938,7 +838109,7 @@ var hw_getAddress_default12 = {
|
|
|
837938
838109
|
var dispatch3 = (transport, opts) => {
|
|
837939
838110
|
const { currency: currency24, verify: verify9 } = opts;
|
|
837940
838111
|
const getAddress12 = hw_getAddress_default12[currency24.family];
|
|
837941
|
-
(0,
|
|
838112
|
+
(0, import_invariant104.default)(getAddress12, `getAddress is not implemented for ${currency24.id}`);
|
|
837942
838113
|
return getAddress12(transport, opts).then((result2) => {
|
|
837943
838114
|
log2("hw", `getAddress ${currency24.id} on ${opts.path}`, result2);
|
|
837944
838115
|
return result2;
|
|
@@ -838093,14 +838264,14 @@ var receive_default = {
|
|
|
838093
838264
|
|
|
838094
838265
|
// src/commands/blockchain/satstack.ts
|
|
838095
838266
|
var import_fs6 = __toESM(require("fs"));
|
|
838096
|
-
var
|
|
838267
|
+
var import_invariant106 = __toESM(require("invariant"));
|
|
838097
838268
|
var import_rxjs172 = require("rxjs");
|
|
838098
838269
|
var import_operators29 = require("rxjs/operators");
|
|
838099
838270
|
|
|
838100
838271
|
// ../../libs/coin-modules/coin-bitcoin/lib-es/descriptor.js
|
|
838101
838272
|
var import_rxjs170 = require("rxjs");
|
|
838102
838273
|
var import_operators27 = require("rxjs/operators");
|
|
838103
|
-
var
|
|
838274
|
+
var import_invariant105 = __toESM(require("invariant"));
|
|
838104
838275
|
var import_bs589 = __toESM(require_bs58());
|
|
838105
838276
|
|
|
838106
838277
|
// ../../libs/coin-modules/coin-bitcoin/lib-es/crypto-util.js
|
|
@@ -838167,12 +838338,12 @@ function makeXpub2({ version: version33, depth, parentFingerprint, index, chainC
|
|
|
838167
838338
|
return import_bs589.default.encode(Buffer.concat([extendedKeyBytes, checksum8]));
|
|
838168
838339
|
}
|
|
838169
838340
|
function inferDescriptorFromDeviceInfo({ derivationMode, currency: currency24, index, parentDerivation, accountDerivation }) {
|
|
838170
|
-
(0,
|
|
838341
|
+
(0, import_invariant105.default)(currency24.bitcoinLikeInfo, "bitcoin currency expected");
|
|
838171
838342
|
const { bitcoinLikeInfo } = currency24;
|
|
838172
838343
|
const { XPUBVersion } = bitcoinLikeInfo;
|
|
838173
|
-
(0,
|
|
838344
|
+
(0, import_invariant105.default)(XPUBVersion, "unsupported bitcoin fork %s", currency24.id);
|
|
838174
838345
|
const { chainCode } = accountDerivation;
|
|
838175
|
-
(0,
|
|
838346
|
+
(0, import_invariant105.default)(chainCode, "chainCode is required");
|
|
838176
838347
|
const fingerprint = makeFingerprint2(compressPublicKeySECP2563(Buffer.from(parentDerivation.publicKey, "hex")));
|
|
838177
838348
|
const xpub = makeXpub2({
|
|
838178
838349
|
version: XPUBVersion,
|
|
@@ -838414,7 +838585,7 @@ var statusObservable = (0, import_rxjs171.interval)(1e3).pipe((0, import_operato
|
|
|
838414
838585
|
// src/commands/blockchain/satstack.ts
|
|
838415
838586
|
var bitcoin2 = getCryptoCurrencyById("bitcoin");
|
|
838416
838587
|
function requiredNodeConfig(nodeConfig) {
|
|
838417
|
-
(0,
|
|
838588
|
+
(0, import_invariant106.default)(nodeConfig, "--rpcHOST,--rpcUSER,--rpcPASSWORD config required");
|
|
838418
838589
|
const errors = validateRPCNodeConfig(nodeConfig);
|
|
838419
838590
|
if (errors.length) {
|
|
838420
838591
|
throw new Error(errors.map((e37) => e37.field + ": " + e37.error.message).join(", "));
|
|
@@ -838660,7 +838831,7 @@ var import_operators34 = require("rxjs/operators");
|
|
|
838660
838831
|
// ../../libs/ledger-live-common/lib-es/hw/signMessage/index.js
|
|
838661
838832
|
init_lib_es();
|
|
838662
838833
|
init_lib_es2();
|
|
838663
|
-
var
|
|
838834
|
+
var import_invariant109 = __toESM(require("invariant"));
|
|
838664
838835
|
var import_react3 = require("react");
|
|
838665
838836
|
var import_rxjs179 = require("rxjs");
|
|
838666
838837
|
|
|
@@ -838982,7 +839153,7 @@ var hw_signMessage_default = {
|
|
|
838982
839153
|
};
|
|
838983
839154
|
|
|
838984
839155
|
// ../../libs/ledger-live-common/lib-es/hw/actions/app.js
|
|
838985
|
-
var
|
|
839156
|
+
var import_invariant108 = __toESM(require("invariant"));
|
|
838986
839157
|
var import_rxjs177 = require("rxjs");
|
|
838987
839158
|
var import_operators33 = require("rxjs/operators");
|
|
838988
839159
|
var import_react2 = require("react");
|
|
@@ -838993,7 +839164,7 @@ var import_rxjs175 = require("rxjs");
|
|
|
838993
839164
|
var import_react = require("react");
|
|
838994
839165
|
|
|
838995
839166
|
// ../../libs/coin-modules/coin-cardano/lib-es/account.js
|
|
838996
|
-
var
|
|
839167
|
+
var import_invariant107 = __toESM(require("invariant"));
|
|
838997
839168
|
|
|
838998
839169
|
// ../../libs/ledger-live-common/lib-es/hw/actions/implementations.js
|
|
838999
839170
|
var import_rxjs176 = require("rxjs");
|
|
@@ -839099,7 +839270,7 @@ var signMessage11 = (transport, account3, opts) => {
|
|
|
839099
839270
|
break;
|
|
839100
839271
|
}
|
|
839101
839272
|
}
|
|
839102
|
-
(0,
|
|
839273
|
+
(0, import_invariant109.default)(signMessage12, `signMessage is not implemented for ${currency24.id}`);
|
|
839103
839274
|
return signMessage12(transport, account3, opts).then((result2) => {
|
|
839104
839275
|
const path4 = "path" in opts && opts.path ? opts.path : account3.freshAddressPath;
|
|
839105
839276
|
log2("hw", `signMessage ${currency24.id} on ${path4} with message [${opts.message}]`, result2);
|
|
@@ -839223,7 +839394,7 @@ var testDetectOpCollision_default = {
|
|
|
839223
839394
|
|
|
839224
839395
|
// src/commands/blockchain/testGetTrustedInputFromTxHash.ts
|
|
839225
839396
|
var import_rxjs182 = require("rxjs");
|
|
839226
|
-
var
|
|
839397
|
+
var import_invariant110 = __toESM(require("invariant"));
|
|
839227
839398
|
|
|
839228
839399
|
// ../../libs/ledger-live-common/lib-es/explorer.js
|
|
839229
839400
|
var findCurrencyExplorer2 = (currency24) => {
|
|
@@ -839247,14 +839418,14 @@ var findCurrencyExplorer2 = (currency24) => {
|
|
|
839247
839418
|
// src/commands/blockchain/testGetTrustedInputFromTxHash.ts
|
|
839248
839419
|
var command = async (transport, currencyId, hash12) => {
|
|
839249
839420
|
const currency24 = findCryptoCurrencyById(currencyId);
|
|
839250
|
-
(0,
|
|
839421
|
+
(0, import_invariant110.default)(currency24, "currency not found");
|
|
839251
839422
|
if (!currency24)
|
|
839252
839423
|
throw new Error("currency not found");
|
|
839253
839424
|
const { bitcoinLikeInfo } = currency24;
|
|
839254
839425
|
const btc = new Btc({ transport, currency: currency24?.id });
|
|
839255
|
-
(0,
|
|
839426
|
+
(0, import_invariant110.default)(currency24.family === "bitcoin" && bitcoinLikeInfo, "currency of bitcoin family only");
|
|
839256
839427
|
const ledgerExplorer = findCurrencyExplorer2(currency24);
|
|
839257
|
-
(0,
|
|
839428
|
+
(0, import_invariant110.default)(ledgerExplorer, "ledgerExplorer not found");
|
|
839258
839429
|
if (!ledgerExplorer)
|
|
839259
839430
|
throw new Error("ledgerExplorer not found");
|
|
839260
839431
|
const { endpoint: endpoint2, version: version33, id: id5 } = ledgerExplorer;
|
|
@@ -840246,7 +840417,7 @@ init_lib_es();
|
|
|
840246
840417
|
// ../../libs/ledger-live-common/lib-es/manager/api.js
|
|
840247
840418
|
init_lib_es();
|
|
840248
840419
|
init_lib_es2();
|
|
840249
|
-
var
|
|
840420
|
+
var import_invariant111 = __toESM(require("invariant"));
|
|
840250
840421
|
var import_rxjs185 = require("rxjs");
|
|
840251
840422
|
var import_operators38 = require("rxjs/operators");
|
|
840252
840423
|
var import_semver22 = __toESM(require_semver2());
|
|
@@ -840783,7 +840954,7 @@ var genuineCheck = (transport, { targetId, perso }) => {
|
|
|
840783
840954
|
var listInstalledApps = (transport, { targetId, perso }) => {
|
|
840784
840955
|
if (getEnv("MOCK")) {
|
|
840785
840956
|
const result2 = global._listInstalledApps_mock_result;
|
|
840786
|
-
(0,
|
|
840957
|
+
(0, import_invariant111.default)(result2, "using MOCK, global._listInstalledApps_mock_result must be set");
|
|
840787
840958
|
return createMockSocket(secureChannelMock(false), resultMock(result2));
|
|
840788
840959
|
}
|
|
840789
840960
|
log2("manager", "listInstalledApps", {
|
|
@@ -840804,10 +840975,10 @@ var listInstalledApps = (transport, { targetId, perso }) => {
|
|
|
840804
840975
|
return {
|
|
840805
840976
|
type: "result",
|
|
840806
840977
|
payload: [...o48.payload].map((a65) => {
|
|
840807
|
-
(0,
|
|
840978
|
+
(0, import_invariant111.default)(typeof a65 === "object" && a65, "payload array item are objects");
|
|
840808
840979
|
const { hash: hash12, name: name3, hash_code_data } = a65;
|
|
840809
|
-
(0,
|
|
840810
|
-
(0,
|
|
840980
|
+
(0, import_invariant111.default)(typeof hash12 === "string", "hash is defined");
|
|
840981
|
+
(0, import_invariant111.default)(typeof name3 === "string", "name is defined");
|
|
840811
840982
|
return {
|
|
840812
840983
|
hash: hash12,
|
|
840813
840984
|
name: name3,
|
|
@@ -841668,7 +841839,7 @@ var appUninstallAll_default = {
|
|
|
841668
841839
|
};
|
|
841669
841840
|
|
|
841670
841841
|
// src/commands/device/appsCheckAllAppVersions.ts
|
|
841671
|
-
var
|
|
841842
|
+
var import_invariant112 = __toESM(require("invariant"));
|
|
841672
841843
|
var import_fs8 = __toESM(require("fs"));
|
|
841673
841844
|
var import_rxjs200 = require("rxjs");
|
|
841674
841845
|
var import_operators44 = require("rxjs/operators");
|
|
@@ -841877,7 +842048,7 @@ var appsCheckAllAppVersions_default = {
|
|
|
841877
842048
|
Promise.all([getDeviceInfo_default(t61), api_default4.listApps()]).then(
|
|
841878
842049
|
async ([deviceInfo, applications]) => {
|
|
841879
842050
|
const { deviceModel } = t61;
|
|
841880
|
-
(0,
|
|
842051
|
+
(0, import_invariant112.default)(deviceModel, "device model mandatory");
|
|
841881
842052
|
const candidates2 = await findCandidates(deviceModel, applications, deviceInfo);
|
|
841882
842053
|
let candidatesErrors = [];
|
|
841883
842054
|
let candidatesNew = [...candidates2];
|
|
@@ -842862,7 +843033,7 @@ var deviceInfo_default = {
|
|
|
842862
843033
|
};
|
|
842863
843034
|
|
|
842864
843035
|
// src/commands/device/deviceSDKFirmwareUpdate.ts
|
|
842865
|
-
var
|
|
843036
|
+
var import_invariant113 = __toESM(require("invariant"));
|
|
842866
843037
|
var import_rxjs226 = require("rxjs");
|
|
842867
843038
|
var import_operators63 = require("rxjs/operators");
|
|
842868
843039
|
|
|
@@ -843698,7 +843869,7 @@ var deviceSDKFirmwareUpdate_default = {
|
|
|
843698
843869
|
osuVersion,
|
|
843699
843870
|
"to-my-own-risk": toMyOwnRisk,
|
|
843700
843871
|
listOSUs
|
|
843701
|
-
}) => ((0,
|
|
843872
|
+
}) => ((0, import_invariant113.default)(!osuVersion || toMyOwnRisk, "--to-my-own-risk is required: " + disclaimer), listOSUs ? (0, import_rxjs226.from)(listFirmwareOSU()).pipe((0, import_operators63.mergeMap)((d56) => (0, import_rxjs226.from)(d56.map((d57) => d57.name)))) : withDevice(device2 || "")((t61) => (0, import_rxjs226.from)(getDeviceInfo_default(t61))).pipe(
|
|
843702
843873
|
(0, import_operators63.mergeMap)(() => {
|
|
843703
843874
|
return (0, import_rxjs226.concat)(
|
|
843704
843875
|
(0, import_rxjs226.of)(`Attempting to install firmware`),
|
|
@@ -844325,7 +844496,7 @@ var firmwareRepair_default = {
|
|
|
844325
844496
|
};
|
|
844326
844497
|
|
|
844327
844498
|
// src/commands/device/firmwareUpdate.ts
|
|
844328
|
-
var
|
|
844499
|
+
var import_invariant114 = __toESM(require("invariant"));
|
|
844329
844500
|
var import_rxjs241 = require("rxjs");
|
|
844330
844501
|
var import_operators76 = require("rxjs/operators");
|
|
844331
844502
|
init_lib_es();
|
|
@@ -844542,7 +844713,7 @@ var firmwareUpdate_default = {
|
|
|
844542
844713
|
osuVersion,
|
|
844543
844714
|
"to-my-own-risk": toMyOwnRisk,
|
|
844544
844715
|
listOSUs
|
|
844545
|
-
}) => ((0,
|
|
844716
|
+
}) => ((0, import_invariant114.default)(!osuVersion || toMyOwnRisk, "--to-my-own-risk is required: " + disclaimer2), listOSUs ? (0, import_rxjs241.from)(listFirmwareOSU2()).pipe((0, import_operators76.mergeMap)((d56) => (0, import_rxjs241.from)(d56.map((d57) => d57.name)))) : withDevice(device2 || "")((t61) => (0, import_rxjs241.from)(getDeviceInfo_default(t61))).pipe(
|
|
844546
844717
|
(0, import_operators76.mergeMap)(
|
|
844547
844718
|
osuVersion ? (deviceInfo) => customGetLatestFirmwareForDevice(deviceInfo, osuVersion) : (deviceInfo) => getLatestFirmwareForDeviceUseCase(deviceInfo)
|
|
844548
844719
|
),
|
|
@@ -845228,7 +845399,7 @@ var repl_default = {
|
|
|
845228
845399
|
|
|
845229
845400
|
// src/commands/device/speculosList.ts
|
|
845230
845401
|
var import_rxjs252 = require("rxjs");
|
|
845231
|
-
var
|
|
845402
|
+
var import_invariant115 = __toESM(require("invariant"));
|
|
845232
845403
|
var import_operators83 = require("rxjs/operators");
|
|
845233
845404
|
var speculosList_default = {
|
|
845234
845405
|
description: "list apps available for speculos",
|
|
@@ -845236,7 +845407,7 @@ var speculosList_default = {
|
|
|
845236
845407
|
job: () => {
|
|
845237
845408
|
async function main2() {
|
|
845238
845409
|
const coinapps = getEnv("COINAPPS");
|
|
845239
|
-
(0,
|
|
845410
|
+
(0, import_invariant115.default)(coinapps, "COINAPPS is not set");
|
|
845240
845411
|
const candidates2 = await listAppCandidates(coinapps);
|
|
845241
845412
|
return candidates2.map(formatAppCandidate);
|
|
845242
845413
|
}
|
|
@@ -845247,7 +845418,7 @@ var speculosList_default = {
|
|
|
845247
845418
|
// src/commands/live/balanceHistory.ts
|
|
845248
845419
|
var import_bignumber397 = require("bignumber.js");
|
|
845249
845420
|
var import_asciichart = require("asciichart");
|
|
845250
|
-
var
|
|
845421
|
+
var import_invariant116 = __toESM(require("invariant"));
|
|
845251
845422
|
var import_operators84 = require("rxjs/operators");
|
|
845252
845423
|
var histoFormatters = {
|
|
845253
845424
|
default: (histo, account3) => histo.map(
|
|
@@ -845279,7 +845450,7 @@ var histoFormatters = {
|
|
|
845279
845450
|
};
|
|
845280
845451
|
function asPortfolioRange(period) {
|
|
845281
845452
|
const ranges2 = getRanges();
|
|
845282
|
-
(0,
|
|
845453
|
+
(0, import_invariant116.default)(ranges2.includes(period), "invalid period. valid values are %s", ranges2.join(" | "));
|
|
845283
845454
|
return period;
|
|
845284
845455
|
}
|
|
845285
845456
|
var balanceHistory_default = {
|
|
@@ -845315,7 +845486,7 @@ var balanceHistory_default = {
|
|
|
845315
845486
|
var import_uniq3 = __toESM(require("lodash/uniq"));
|
|
845316
845487
|
var import_bignumber398 = require("bignumber.js");
|
|
845317
845488
|
var import_asciichart2 = require("asciichart");
|
|
845318
|
-
var
|
|
845489
|
+
var import_invariant117 = __toESM(require("invariant"));
|
|
845319
845490
|
var import_rxjs253 = require("rxjs");
|
|
845320
845491
|
var histoFormatters2 = {
|
|
845321
845492
|
stats: (histo, currency24, countervalue) => (currency24.ticker + " to " + countervalue.ticker).padEnd(12) + " availability=" + (100 * histo.filter((h27) => h27.value).length / histo.length).toFixed(0) + "%",
|
|
@@ -845417,7 +845588,7 @@ var countervalues_default = {
|
|
|
845417
845588
|
job: (opts) => import_rxjs253.Observable.create((o48) => {
|
|
845418
845589
|
async function f43() {
|
|
845419
845590
|
const currencies2 = await getCurrencies(opts);
|
|
845420
|
-
(0,
|
|
845591
|
+
(0, import_invariant117.default)(currencies2, "no currency found");
|
|
845421
845592
|
const countervalues = getCountervalues(opts);
|
|
845422
845593
|
const format6 = histoFormatters2[opts.format || "default"];
|
|
845423
845594
|
const startDate = getStartDate(opts) || /* @__PURE__ */ new Date();
|
|
@@ -845472,7 +845643,7 @@ var countervalues_default = {
|
|
|
845472
845643
|
};
|
|
845473
845644
|
function asPortfolioRange2(period) {
|
|
845474
845645
|
const ranges2 = getRanges();
|
|
845475
|
-
(0,
|
|
845646
|
+
(0, import_invariant117.default)(ranges2.includes(period), "invalid period. valid values are %s", ranges2.join(" | "));
|
|
845476
845647
|
return period;
|
|
845477
845648
|
}
|
|
845478
845649
|
async function getCurrencies(opts) {
|
|
@@ -845496,7 +845667,7 @@ function getStartDate(opts) {
|
|
|
845496
845667
|
if (!opts.startDate || opts.latest)
|
|
845497
845668
|
return null;
|
|
845498
845669
|
const date2 = new Date(opts.startDate);
|
|
845499
|
-
(0,
|
|
845670
|
+
(0, import_invariant117.default)(!isNaN(date2.valueOf()), "invalid startDate");
|
|
845500
845671
|
return date2;
|
|
845501
845672
|
}
|
|
845502
845673
|
function getDatesWithOpts(opts) {
|
|
@@ -848219,7 +848390,7 @@ var SDK = class {
|
|
|
848219
848390
|
}
|
|
848220
848391
|
}
|
|
848221
848392
|
}
|
|
848222
|
-
|
|
848393
|
+
invariant121(trustchainRootId, "trustchainRootId should be defined");
|
|
848223
848394
|
log2("trustchain", "getOrCreateTrustchain rootId=" + trustchainRootId);
|
|
848224
848395
|
let { streamTree } = await withJwt((jwt) => this.fetchTrustchain(jwt, trustchainRootId));
|
|
848225
848396
|
const path4 = streamTree.getApplicationRootPath(this.context.applicationId);
|
|
@@ -848268,14 +848439,14 @@ var SDK = class {
|
|
|
848268
848439
|
this.invalidateJwt();
|
|
848269
848440
|
const withJwt = (job2) => this.hwDeviceProvider.withJwt(deviceId, job2, "cache", callbacks);
|
|
848270
848441
|
const withHw = (job2) => this.hwDeviceProvider.withHw(deviceId, job2, callbacks);
|
|
848271
|
-
|
|
848442
|
+
invariant121(memberCredentials.pubkey !== member2.id, "removeMember must not be used to remove the current member.");
|
|
848272
848443
|
const afterRotation = await this.lifecycle?.onTrustchainRotation(this, trustchain, memberCredentials);
|
|
848273
848444
|
const applicationId = this.context.applicationId;
|
|
848274
848445
|
const trustchainId = trustchain.rootId;
|
|
848275
848446
|
let { resolved, streamTree, applicationRootPath } = await withJwt((jwt) => this.fetchTrustchainAndResolve(jwt, trustchainId, applicationId));
|
|
848276
848447
|
const members7 = resolved.getMembersData();
|
|
848277
848448
|
const withoutMember = members7.filter((m45) => m45.id !== member2.id);
|
|
848278
|
-
|
|
848449
|
+
invariant121(withoutMember.length < members7.length, "member not found");
|
|
848279
848450
|
const withoutMemberOrMe = withoutMember.filter((m45) => m45.id !== memberCredentials.pubkey);
|
|
848280
848451
|
const softwareDevice = getSoftwareDevice(memberCredentials);
|
|
848281
848452
|
const newPath = streamTree.getApplicationRootPath(applicationId, 1);
|
|
@@ -848336,7 +848507,7 @@ var SDK = class {
|
|
|
848336
848507
|
const { streamTree } = await this.fetchTrustchain(jwt, trustchainId);
|
|
848337
848508
|
const applicationRootPath = streamTree.getApplicationRootPath(applicationId);
|
|
848338
848509
|
const applicationNode = streamTree.getChild(applicationRootPath);
|
|
848339
|
-
|
|
848510
|
+
invariant121(applicationNode, "could not find the application stream.");
|
|
848340
848511
|
const resolved = await applicationNode.resolve();
|
|
848341
848512
|
return { resolved, streamTree, applicationRootPath, applicationNode };
|
|
848342
848513
|
}
|
|
@@ -848369,7 +848540,7 @@ var SDK = class {
|
|
|
848369
848540
|
const isNewDerivation = !streamTree.getChild(path4);
|
|
848370
848541
|
streamTree = await withDevice2((device2) => streamTree.share(path4, device2, crypto35.from_hex(member2.id), member2.name, member2.permissions));
|
|
848371
848542
|
const child = streamTree.getChild(path4);
|
|
848372
|
-
|
|
848543
|
+
invariant121(child, "StreamTree.share failed to create the child stream.");
|
|
848373
848544
|
await child.resolve();
|
|
848374
848545
|
if (isNewDerivation) {
|
|
848375
848546
|
const commandStream = CommandStreamEncoder.encode(child.blocks);
|
|
@@ -848387,7 +848558,7 @@ var SDK = class {
|
|
|
848387
848558
|
async closeStream(streamTree, path4, trustchainId, withJwt, withDevice2) {
|
|
848388
848559
|
streamTree = await withDevice2((device2) => streamTree.close(path4, device2));
|
|
848389
848560
|
const child = streamTree.getChild(path4);
|
|
848390
|
-
|
|
848561
|
+
invariant121(child, "StreamTree.close failed to create the child stream.");
|
|
848391
848562
|
await child.resolve();
|
|
848392
848563
|
const commandStream = CommandStreamEncoder.encode([child.blocks[child.blocks.length - 1]]);
|
|
848393
848564
|
const request3 = {
|
|
@@ -848437,7 +848608,7 @@ function liveAuthentication(rootId) {
|
|
|
848437
848608
|
function credentialForPubKey(publicKey3) {
|
|
848438
848609
|
return { version: 0, curveId: 33, signAlgorithm: 1, publicKey: publicKey3 };
|
|
848439
848610
|
}
|
|
848440
|
-
function
|
|
848611
|
+
function invariant121(condition, message2) {
|
|
848441
848612
|
if (!condition) {
|
|
848442
848613
|
throw new Error(message2);
|
|
848443
848614
|
}
|
|
@@ -849568,12 +849739,12 @@ var liveData_default = {
|
|
|
849568
849739
|
// src/commands/live/portfolio.ts
|
|
849569
849740
|
var import_bignumber400 = require("bignumber.js");
|
|
849570
849741
|
var import_asciichart3 = require("asciichart");
|
|
849571
|
-
var
|
|
849742
|
+
var import_invariant118 = __toESM(require("invariant"));
|
|
849572
849743
|
var import_rxjs260 = require("rxjs");
|
|
849573
849744
|
var import_operators88 = require("rxjs/operators");
|
|
849574
849745
|
function asPortfolioRange3(period) {
|
|
849575
849746
|
const ranges2 = getRanges();
|
|
849576
|
-
(0,
|
|
849747
|
+
(0, import_invariant118.default)(ranges2.includes(period), "invalid period. valid values are %s", ranges2.join(" | "));
|
|
849577
849748
|
return period;
|
|
849578
849749
|
}
|
|
849579
849750
|
var portfolio_default = {
|
|
@@ -849600,7 +849771,7 @@ var portfolio_default = {
|
|
|
849600
849771
|
],
|
|
849601
849772
|
job: (opts) => {
|
|
849602
849773
|
const countervalue = findCurrencyByTicker(opts.countervalue || "USD");
|
|
849603
|
-
(0,
|
|
849774
|
+
(0, import_invariant118.default)(countervalue, "currency not found with ticker=" + opts.countervalue);
|
|
849604
849775
|
return scan3(opts).pipe(
|
|
849605
849776
|
(0, import_operators88.reduce)((all8, a65) => all8.concat(a65), []),
|
|
849606
849777
|
(0, import_operators88.concatMap)(
|
|
@@ -849924,7 +850095,7 @@ var ErrorStatus = {
|
|
|
849924
850095
|
|
|
849925
850096
|
// ../../libs/ledgerjs/packages/hw-app-exchange/lib-es/Exchange.js
|
|
849926
850097
|
init_lib_es();
|
|
849927
|
-
var
|
|
850098
|
+
var import_invariant119 = __toESM(require("invariant"));
|
|
849928
850099
|
var ExchangeTypeNg = [
|
|
849929
850100
|
3,
|
|
849930
850101
|
4,
|
|
@@ -849951,7 +850122,7 @@ var P2_NONE = 0 << 4;
|
|
|
849951
850122
|
var P2_EXTEND2 = 1 << 4;
|
|
849952
850123
|
var P2_MORE5 = 2 << 4;
|
|
849953
850124
|
var maybeThrowProtocolError = (result2) => {
|
|
849954
|
-
(0,
|
|
850125
|
+
(0, import_invariant119.default)(result2.length >= 2, "ExchangeTransport: Unexpected result length");
|
|
849955
850126
|
const resultCode = result2.readUInt16BE(result2.length - 2);
|
|
849956
850127
|
if (resultCode !== OkStatus) {
|
|
849957
850128
|
throw new TransportStatusError(resultCode);
|
|
@@ -850062,9 +850233,9 @@ var Exchange = class {
|
|
|
850062
850233
|
maybeThrowProtocolError(result2);
|
|
850063
850234
|
}
|
|
850064
850235
|
async validatePayoutOrAsset(payoutCurrencyConfig, currencyConfigSignature, addressParameters) {
|
|
850065
|
-
(0,
|
|
850066
|
-
(0,
|
|
850067
|
-
(0,
|
|
850236
|
+
(0, import_invariant119.default)(payoutCurrencyConfig.length <= 255, "Currency config is too big");
|
|
850237
|
+
(0, import_invariant119.default)(addressParameters.length <= 255, "Address parameter is too big.");
|
|
850238
|
+
(0, import_invariant119.default)(currencyConfigSignature.length >= 67 && currencyConfigSignature.length <= 73, "Signature should be DER serialized and have length in [67, 73] bytes.");
|
|
850068
850239
|
const bufferToSend = Buffer.concat([
|
|
850069
850240
|
Buffer.from([payoutCurrencyConfig.length]),
|
|
850070
850241
|
payoutCurrencyConfig,
|
|
@@ -850076,9 +850247,9 @@ var Exchange = class {
|
|
|
850076
850247
|
maybeThrowProtocolError(result2);
|
|
850077
850248
|
}
|
|
850078
850249
|
async checkRefundAddress(refundCurrencyConfig, currencyConfigSignature, addressParameters) {
|
|
850079
|
-
(0,
|
|
850080
|
-
(0,
|
|
850081
|
-
(0,
|
|
850250
|
+
(0, import_invariant119.default)(refundCurrencyConfig.length <= 255, "Currency config is too big");
|
|
850251
|
+
(0, import_invariant119.default)(addressParameters.length <= 255, "Address parameter is too big.");
|
|
850252
|
+
(0, import_invariant119.default)(currencyConfigSignature.length >= 67 && currencyConfigSignature.length <= 73, "Signature should be DER serialized and have length in [67, 73] bytes.");
|
|
850082
850253
|
const bufferToSend = Buffer.concat([
|
|
850083
850254
|
Buffer.from([refundCurrencyConfig.length]),
|
|
850084
850255
|
refundCurrencyConfig,
|
|
@@ -850304,7 +850475,7 @@ var lib_es_default4 = Exchange;
|
|
|
850304
850475
|
// ../../libs/ledger-live-common/lib-es/exchange/swap/initSwap.js
|
|
850305
850476
|
init_lib_es2();
|
|
850306
850477
|
var import_bignumber402 = require("bignumber.js");
|
|
850307
|
-
var
|
|
850478
|
+
var import_invariant120 = __toESM(require("invariant"));
|
|
850308
850479
|
var import_rxjs265 = require("rxjs");
|
|
850309
850480
|
var import_secp256k116 = __toESM(require_secp256k12());
|
|
850310
850481
|
|
|
@@ -850723,15 +850894,15 @@ var initSwap = (input) => {
|
|
|
850723
850894
|
transaction = accountBridge14.updateTransaction(transaction, {
|
|
850724
850895
|
tag: new import_bignumber402.BigNumber(swapResult.payinExtraId).toNumber()
|
|
850725
850896
|
});
|
|
850726
|
-
(0,
|
|
850897
|
+
(0, import_invariant120.default)(transaction.tag, "Refusing to swap xrp without a destination tag");
|
|
850727
850898
|
} else if (refundCurrency.id === "stellar") {
|
|
850728
850899
|
transaction = accountBridge14.updateTransaction(transaction, {
|
|
850729
850900
|
memoValue: swapResult.payinExtraId,
|
|
850730
850901
|
memoType: "MEMO_TEXT"
|
|
850731
850902
|
});
|
|
850732
|
-
(0,
|
|
850903
|
+
(0, import_invariant120.default)(transaction.memoValue, "Refusing to swap xlm without a destination memo");
|
|
850733
850904
|
}
|
|
850734
|
-
(0,
|
|
850905
|
+
(0, import_invariant120.default)(transaction.recipient !== getAbandonSeedAddress(refundCurrency.type === "TokenCurrency" ? refundCurrency.parentCurrency.id : refundCurrency.id), "Recipient address should never be the abandonseed address");
|
|
850735
850906
|
transaction = await accountBridge14.prepareTransaction(refundAccount, transaction);
|
|
850736
850907
|
if (unsubscribed)
|
|
850737
850908
|
return;
|
|
@@ -850759,7 +850930,7 @@ var initSwap = (input) => {
|
|
|
850759
850930
|
if (unsubscribed)
|
|
850760
850931
|
return;
|
|
850761
850932
|
const mainPayoutCurrency = getAccountCurrency(payoutAccount);
|
|
850762
|
-
(0,
|
|
850933
|
+
(0, import_invariant120.default)(mainPayoutCurrency.type === "CryptoCurrency", "This should be a cryptocurrency");
|
|
850763
850934
|
if (mainPayoutCurrency.type !== "CryptoCurrency") {
|
|
850764
850935
|
throw new Error("This should be a cryptocurrency");
|
|
850765
850936
|
}
|
|
@@ -850784,7 +850955,7 @@ var initSwap = (input) => {
|
|
|
850784
850955
|
if (unsubscribed)
|
|
850785
850956
|
return;
|
|
850786
850957
|
const mainRefundCurrency = getAccountCurrency(refundAccount);
|
|
850787
|
-
(0,
|
|
850958
|
+
(0, import_invariant120.default)(mainRefundCurrency.type === "CryptoCurrency", "This should be a cryptocurrency");
|
|
850788
850959
|
if (mainRefundCurrency.type !== "CryptoCurrency") {
|
|
850789
850960
|
throw new Error("This should be a cryptocurrency");
|
|
850790
850961
|
}
|
|
@@ -851011,11 +851182,11 @@ var getSwapAPIError = (errorCode, errorMessage) => {
|
|
|
851011
851182
|
};
|
|
851012
851183
|
|
|
851013
851184
|
// src/commands/ptx/swap.ts
|
|
851014
|
-
var
|
|
851185
|
+
var import_invariant121 = __toESM(require("invariant"));
|
|
851015
851186
|
var exec6 = async (opts) => {
|
|
851016
851187
|
const { amount, useAllAmount, tokenId, useFloat, deviceId = "" } = opts;
|
|
851017
|
-
(0,
|
|
851018
|
-
(0,
|
|
851188
|
+
(0, import_invariant121.default)(amount || useAllAmount, `\u2716 amount in satoshis is needed or --useAllAmount `);
|
|
851189
|
+
(0, import_invariant121.default)(opts._unknown, `\u2716 second account information is missing`);
|
|
851019
851190
|
const secondAccountOpts = (0, import_command_line_args.default)(
|
|
851020
851191
|
[
|
|
851021
851192
|
...scanCommonOpts,
|
|
@@ -851036,13 +851207,13 @@ var exec6 = async (opts) => {
|
|
|
851036
851207
|
let fromAccount = await (0, import_rxjs266.firstValueFrom)(
|
|
851037
851208
|
scan3(opts).pipe((0, import_operators90.take)(1))
|
|
851038
851209
|
);
|
|
851039
|
-
(0,
|
|
851210
|
+
(0, import_invariant121.default)(fromAccount, `\u2716 No account found, is the right currency app open?`);
|
|
851040
851211
|
if (!fromAccount) {
|
|
851041
851212
|
throw new Error(`\u2716 No account found, is the right currency app open?`);
|
|
851042
851213
|
}
|
|
851043
851214
|
if (tokenId) {
|
|
851044
851215
|
const token = findTokenById(tokenId);
|
|
851045
|
-
(0,
|
|
851216
|
+
(0, import_invariant121.default)(token, `\u2716 No token currency found with id ${tokenId}`);
|
|
851046
851217
|
if (!token)
|
|
851047
851218
|
throw new Error(`\u2716 No token currency found with id ${tokenId}`);
|
|
851048
851219
|
const subAccounts = accountWithMandatoryTokens(fromAccount, [token]).subAccounts || [];
|
|
@@ -851052,7 +851223,7 @@ var exec6 = async (opts) => {
|
|
|
851052
851223
|
});
|
|
851053
851224
|
fromParentAccount = fromAccount;
|
|
851054
851225
|
fromAccount = subAccount;
|
|
851055
|
-
(0,
|
|
851226
|
+
(0, import_invariant121.default)(fromAccount, `\u2716 No account found, is the right currency app open?`);
|
|
851056
851227
|
if (!fromAccount) {
|
|
851057
851228
|
throw new Error(`\u2716 No account found, is the right currency app open?`);
|
|
851058
851229
|
}
|
|
@@ -851071,7 +851242,7 @@ var exec6 = async (opts) => {
|
|
|
851071
851242
|
}
|
|
851072
851243
|
);
|
|
851073
851244
|
console.log(" :balance: ", fromAccount.spendableBalance.toString(), ` [ ${formattedAmount} ]`);
|
|
851074
|
-
(0,
|
|
851245
|
+
(0, import_invariant121.default)(fromAccount.balance.gte(new import_bignumber404.BigNumber(amount)), `\u2716 Not enough balance`);
|
|
851075
851246
|
console.log("\u2022 Open the destination currency app");
|
|
851076
851247
|
await delay(8e3);
|
|
851077
851248
|
let toParentAccount = null;
|
|
@@ -851094,9 +851265,9 @@ var exec6 = async (opts) => {
|
|
|
851094
851265
|
});
|
|
851095
851266
|
toParentAccount = toAccount;
|
|
851096
851267
|
toAccount = subAccount;
|
|
851097
|
-
(0,
|
|
851268
|
+
(0, import_invariant121.default)(fromAccount, `\u2716 No account found`);
|
|
851098
851269
|
}
|
|
851099
|
-
(0,
|
|
851270
|
+
(0, import_invariant121.default)(toAccount, `\u2716 No account found`);
|
|
851100
851271
|
if (!toAccount)
|
|
851101
851272
|
throw new Error(`\u2716 No account found`);
|
|
851102
851273
|
if (toParentAccount) {
|
|
@@ -851145,7 +851316,7 @@ var exec6 = async (opts) => {
|
|
|
851145
851316
|
}
|
|
851146
851317
|
return false;
|
|
851147
851318
|
});
|
|
851148
|
-
(0,
|
|
851319
|
+
(0, import_invariant121.default)(exchangeRate, `\u2716 No valid rate available`);
|
|
851149
851320
|
console.log(`Using first ${useFloat ? "float" : "fixed"} rate:
|
|
851150
851321
|
`, exchangeRate);
|
|
851151
851322
|
console.log({
|
|
@@ -851168,7 +851339,7 @@ var exec6 = async (opts) => {
|
|
|
851168
851339
|
break;
|
|
851169
851340
|
case "init-swap-error":
|
|
851170
851341
|
console.log(e37);
|
|
851171
|
-
(0,
|
|
851342
|
+
(0, import_invariant121.default)(false, "Something went wrong confirming the swap");
|
|
851172
851343
|
break;
|
|
851173
851344
|
case "init-swap-result":
|
|
851174
851345
|
console.log(e37);
|