@argent/x-shared 1.65.0 → 1.66.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.js +407 -402
- package/dist/node_modules/.pnpm/@starknet-io_types-js@0.7.7/node_modules/@starknet-io/types-js/dist/esm/api/nonspec.cjs +1 -0
- package/dist/node_modules/.pnpm/@starknet-io_types-js@0.7.7/node_modules/@starknet-io/types-js/dist/esm/api/nonspec.js +6 -0
- package/dist/src/accountNameGenerator/x-names.json.js +1 -1
- package/dist/src/chains/starknet/network.cjs +1 -1
- package/dist/src/chains/starknet/network.d.ts +1 -0
- package/dist/src/chains/starknet/network.js +18 -10
- package/dist/src/features/paymaster/PaymasterService.cjs +1 -1
- package/dist/src/features/paymaster/PaymasterService.d.ts +0 -1
- package/dist/src/features/paymaster/PaymasterService.js +19 -25
- package/dist/src/features/swap/models/execute.model.d.ts +35 -0
- package/dist/src/features/swap/models/index.d.ts +1 -0
- package/dist/src/features/swap/services/ISwapTransactionService.d.ts +10 -0
- package/dist/src/features/swap/services/{implementation.d.ts → SwapSharedService.d.ts} +1 -1
- package/dist/src/features/swap/services/SwapTransactionService.cjs +1 -0
- package/dist/src/features/swap/services/SwapTransactionService.d.ts +15 -0
- package/dist/src/features/swap/services/SwapTransactionService.js +60 -0
- package/dist/src/features/swap/services/index.d.ts +4 -2
- package/dist/src/transactions/estimate/utilsV2.cjs +1 -1
- package/dist/src/transactions/estimate/utilsV2.js +1 -1
- package/dist/src/transactions/getTransactionVersion.cjs +1 -1
- package/dist/src/transactions/getTransactionVersion.js +16 -16
- package/dist/src/transactions/index.d.ts +1 -0
- package/dist/src/transactions/transactionExecuteTypes.cjs +1 -0
- package/dist/src/transactions/transactionExecuteTypes.d.ts +114 -0
- package/dist/src/transactions/transactionExecuteTypes.js +23 -0
- package/dist/swap.cjs +1 -1
- package/dist/swap.js +20 -18
- package/package.json +11 -11
- /package/dist/src/features/swap/services/{interface.d.ts → ISwapSharedService.d.ts} +0 -0
- /package/dist/src/features/swap/services/{implementation.cjs → SwapSharedService.cjs} +0 -0
- /package/dist/src/features/swap/services/{implementation.js → SwapSharedService.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={V1:"0x1"};exports.ETransactionVersion=e;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e = JSON.parse('[{"emoji":"🌸","name":"Blossom","category":"plants","adjectives":["Blissful","Black","Blanched","Blooming","Beloved","Benevolent"]},{"emoji":"🌹","name":"Rose","category":"plants","adjectives":["Regal","Relaxed","Resolute","Random","Rapid","Riotous","Ruddy","Rogue"]},{"emoji":"🌺","name":"Hibiscus","category":"plants","adjectives":["Happy","Heroic","Hardy","Heavenly","Humble","Hopeful","Healthy","Hearty"]},{"emoji":"🌻","name":"Sunflower","category":"plants","adjectives":["Super","Surgical","Subatomic","Sublime","Subtle","Sumptuous","Sunny"]},{"emoji":"🌼","name":"Daisy","category":"plants","adjectives":["Dapper","Droopy","Dangerous","Daft","Dashing","Dauntless","Defiant"]},{"emoji":"🌷","name":"Tulip","category":"plants","adjectives":["Tactical","Talented","Tactile","Tangible","Tenacious","Talismanic","Timely"]},{"emoji":"🪻","name":"Hyacinth","category":"plants","adjectives":["Healthy","Hearty","Helpful","Heroic","Humble","Hilarious"]},{"emoji":"🍀","name":"Clover","category":"plants","adjectives":["Colossal","Charismatic","Casual","Courageous","Colorful","Capable","Captivating","Cute"]},{"emoji":"🍁","name":"Leaf","category":"plants","adjectives":["Legendary","Lavish","Laudable","Lively","Loving","Loyal","Learned"]},{"emoji":"🍄","name":"Mushroom","category":"plants","adjectives":["Magic","Monstrous","Mental","Marvelous","Mindful","Magnificent","Masterful","Magnetic","Modest"]},{"emoji":"🪨","name":"Rock","category":"plants","adjectives":["Robust","Real","Relative","Regal","Relaxed","Resolute","Random","Rapid","Riotous","Ruddy","Rogue"]},{"emoji":"🪵","name":"Log","category":"plants","adjectives":["Loopy","Large","Legendary","Lavish","Laudable","Lively","Loving","Loyal","Learned"]},{"emoji":"🪷","name":"Lotus","category":"plants","adjectives":["Loopy","Large","Legendary","Lavish","Laudable","Lively","Loving","Loyal","Learned"]},{"emoji":"🌱","name":"Seedling","category":"plants","adjectives":["Stellar","Savvy","Sparing","Sensitive","Swift","Synergistic","Steady"]},{"emoji":"🌲","name":"Pine","category":"plants","adjectives":["Positive","Peachy","Pious","Pioneering","Pirate","Pixelated","Pivotal","Painted","Pampered","Panoramic","Paper","Party","Powerful","Prosperous","Prolific","Paradise","Profuse","Peaceful","Perfect"]},{"emoji":"🌳","name":"Oak","category":"plants","adjectives":["Optimistic","Opulent","Observant","Olympic","Omnipotent","Ontological"]},{"emoji":"🌴","name":"Palm","category":"plants","adjectives":["Positive","Peachy","Pious","Pioneering","Pirate","Pixelated","Pivotal","Painted","Pampered","Panoramic","Paper","Party","Powerful","Prosperous","Prolific","Paradise","Profuse","Peaceful","Perfect"]},{"emoji":"🌵","name":"Cactus","category":"plants","adjectives":["Colossal","Charismatic","Casual","Courageous","Colorful","Capable","Captivating","Cute"]},{"emoji":"🐵","name":"Monkey","category":"animals","adjectives":["Mental","Marvelous","Mindful","Magnificent","Masterful","Magnetic","Modest"]},{"emoji":"🐶","name":"Dog","category":"animals","adjectives":["Dapper","Droopy","Dangerous","Daft","Dashing","Dauntless","Defiant"]},{"emoji":"🐺","name":"Wolf","category":"animals","adjectives":["Wealthy","Wary","Wacky","Watchful","Wild","Witty","Wise"]},{"emoji":"🦊","name":"Fox","category":"animals","adjectives":["Fabulous","Fantastic","Friendly","Faithful","Fortunate","Famous","Fungible"]},{"emoji":"🐱","name":"Cat","category":"animals","adjectives":["Colossal","Charismatic","Casual","Courageous","Colorful","Capable","Captivating","Cute"]},{"emoji":"🦁","name":"Lion","category":"animals","adjectives":["Legendary","Lavish","Laudable","Lively","Loving","Loyal","Learned"]},{"emoji":"🐯","name":"Tiger","category":"animals","adjectives":["Tactical","Talkative","Talismanic","Tough","Talented","Tasteful"]},{"emoji":"🐴","name":"Horse","category":"animals","adjectives":["Healthy","Hearty","Helpful","Heroic","Humble","Hilarious"]},{"emoji":"🫎","name":"Moose","category":"animals","adjectives":["Mental","Marvelous","Mindful","Magnificent","Masterful","Magnetic","Modest"]},{"emoji":"🦄","name":"Unicorn","category":"animals","adjectives":["Unique","United","Unionised","Universal","Unstoppable","Ubiquitous"]},{"emoji":"🐮","name":"Cow","category":"animals","adjectives":["Colossal","Charismatic","Casual","Courageous","Colorful","Capable","Captivating","Cute"]},{"emoji":"🐷","name":"Pig","category":"animals","adjectives":["Positive","Peachy","Pious","Pioneering","Pirate","Pixelated","Pivotal","Painted","Pampered","Panoramic","Paper","Party","Powerful","Prosperous","Prolific","Paradise","Profuse","Peaceful","Perfect"]},{"emoji":"🐗","name":"Boar","category":"animals","adjectives":["Bubbly","Brilliant","Balanced","Benevolent","Baffled","Bashful","Bemused","Burly"]},{"emoji":"🐭","name":"Mouse","category":"animals","adjectives":["Mental","Marvelous","Mindful","Magnificent","Masterful","Magnetic","Modest","Massive"]},{"emoji":"🐰","name":"Rabbit","category":"animals","adjectives":["Regal","Relaxed","Resolute","Random","Rapid","Riotous","Ruddy","Rogue"]},{"emoji":"🐻","name":"Bear","category":"animals","adjectives":["Bubbly","Brilliant","Balanced","Benevolent","Baffled","Bashful","Bemused","Burly"]},{"emoji":"🐻❄️","name":"Polar Bear","category":"animals","adjectives":["Bubbly","Brilliant","Balanced","Benevolent","Baffled","Bashful","Bemused","Burly"]},{"emoji":"🐨","name":"Koala","category":"animals","adjectives":["Keen","Kempt","Kinetic","Kind","Kilted","Kantian"]},{"emoji":"🐼","name":"Panda","category":"animals","adjectives":["Positive","Peachy","Pious","Pioneering","Pirate","Pixelated","Pivotal","Painted","Pampered","Panoramic","Paper","Party","Powerful","Prosperous","Prolific","Paradise","Profuse","Peaceful","Perfect"]},{"emoji":"🐔","name":"Chicken","category":"animals","adjectives":["Charming","Cheerful","Choppy","Chatty","Cheeky","Chiseled","Chirpy","Choosy","Chuffed"]},{"emoji":"🐤","name":"Chick","category":"animals","adjectives":["Charming","Cheerful","Choppy","Chatty","Cheeky","Chiseled","Chirpy","Choosy","Chuffed"]},{"emoji":"🐦","name":"Bird","category":"animals","adjectives":["Bubbly","Burly","Balanced","Benevolent","Baffled","Bashful","Bemused"]},{"emoji":"🐧","name":"Penguin","category":"animals","adjectives":["Positive","Peachy","Pious","Pioneering","Pirate","Pixelated","Pivotal","Painted","Pampered","Panoramic","Paper","Party","Powerful","Prosperous","Prolific","Paradise","Profuse","Peaceful","Perfect"]},{"emoji":"🐸","name":"Frog","category":"animals","adjectives":["Frank","Fractional","Freaky","Freckly","Frizzy","Frosty","Fruitful"]},{"emoji":"🐲","name":"Dragon","category":"animals","adjectives":["Draped","Dramatic","Drastic","Drafty","Defiant","Divine"]},{"emoji":"🐙","name":"Octopus","category":"animals","adjectives":["Optimistic","Opulent","Observant","Olympic","Omnipotent","Ontological"]},{"emoji":"🪼","name":"Jellyfish","category":"animals","adjectives":["Jammy","Jaunty","Joyful","Just","Jeweled","Jagged","Jestful"]},{"emoji":"🦀","name":"Crab","category":"animals","adjectives":["Crazy","Craggy","Colossal","Charismatic","Casual","Courageous","Colorful","Capable","Captivating","Cute"]},{"emoji":"🦋","name":"Butterfly","category":"animals","adjectives":["Bubbly","Balanced","Benevolent","Baffled","Bashful","Bemused","Burly"]},{"emoji":"🐜","name":"Ant","category":"animals","adjectives":["Acrobatic","Actual","Adaptive","Adventurous","Admirable","Aerial","Affable","Affluent","Agile"]},{"emoji":"🐝","name":"Bee","category":"animals","adjectives":["Bubbly","Balanced","Benevolent","Baffled","Bashful","Bemused","Burly"]},{"emoji":"🪲","name":"Beetle","category":"animals","adjectives":["Bubbly","Balanced","Benevolent","Baffled","Bashful","Bemused","Burly"]},{"emoji":"🐞","name":"Ladybird","category":"animals","adjectives":["Legendary","Lavish","Laudable","Lively","Loving","Loyal","Learned"]},{"emoji":"🐟","name":"Fish","category":"animals","adjectives":["Fluid","Flexible","Flashy","Flawless","Flowing","Free","Fresh"]},{"emoji":"🐡","name":"Pufferfish","category":"animals","adjectives":["Positive","Peachy","Pious","Pioneering","Pirate","Pixelated","Pivotal"]},{"emoji":"🐚","name":"Shell","category":"animals","adjectives":["Sharp","Super","Surgical","Shapely","Shimmering","Shiny","Shredded"]},{"emoji":"🦐","name":"Shrimp","category":"animals","adjectives":["Sharp","Super","Surgical","Shapely","Shimmering","Shiny","Shredded"]},{"emoji":"🐒","name":"Monkey","category":"animals","adjectives":["Mental","Marvelous","Mindful","Magnificent","Masterful","Magnetic","Modest","Massive"]},{"emoji":"🦂","name":"Scorpion","category":"animals","adjectives":["Silent","Steady","Swift","Strong","Stealthy","Strategic","Skilled"]},{"emoji":"🦃","name":"Turkey","category":"animals","adjectives":["Talented","Tactful","Tenacious","Thorough","Thoughtful","Thriving","Trusted"]},{"emoji":"🦧","name":"Orangutan","category":"animals","adjectives":["Optimistic","Opulent","Observant","Olympic","Omnipotent","Ontological"]},{"emoji":"🐁","name":"Mouse","category":"animals","adjectives":["Mental","Marvelous","Mindful","Magnificent","Masterful","Magnetic","Modest","Massive","Mighty"]},{"emoji":"🐀","name":"Rat","category":"animals","adjectives":["Regal","Relaxed","Resolute","Random","Rapid","Riotous","Ruddy","Rogue"]},{"emoji":"🐇","name":"Rabbit","category":"animals","adjectives":["Regal","Relaxed","Resolute","Random","Rapid","Riotous","Ruddy","Rogue"]},{"emoji":"🐿️","name":"Squirrel","category":"animals","adjectives":["Smart","Swift","Sneaky","Skilled","Spirited","Spontaneous","Spry"]},{"emoji":"🦫","name":"Beaver","category":"animals","adjectives":["Busy","Bold","Bright","Brave","Beneficial","Boundless","Brilliant"]},{"emoji":"🦔","name":"Hedgehog","category":"animals","adjectives":["Happy","Hasty","Helpful","Humble","Honest","Heroic","Harmonious"]},{"emoji":"🦇","name":"Bat","category":"animals","adjectives":["Bubbly","Balanced","Benevolent","Baffled","Bashful","Bemused","Burly"]},{"emoji":"🦥","name":"Sloth","category":"animals","adjectives":["Serene","Slow","Steady","Subtle","Smooth","Sleepy","Sweet"]},{"emoji":"🦦","name":"Otter","category":"animals","adjectives":["Optimistic","Outgoing","Observant","Orderly","Original","Outstanding","Overjoyed"]},{"emoji":"🐓","name":"Rooster","category":"animals","adjectives":["Regal","Relaxed","Resolute","Random","Rapid","Riotous","Ruddy","Rogue","Royal"]},{"emoji":"🐣","name":"Chick","category":"animals","adjectives":["Charming","Cheerful","Choppy","Chatty","Cheeky","Chiseled","Chirpy","Choosy","Chuffed"]},{"emoji":"🦆","name":"Duck","category":"animals","adjectives":["Dapper","Daring","Dangerous","Daft","Dashing","Dauntless","Defiant"]},{"emoji":"🦉","name":"Owl","category":"animals","adjectives":["Observant","Orderly","Original","Orthodox","Otherworldly","Outstanding","Overachieving"]},{"emoji":"🦤","name":"Dodo","category":"animals","adjectives":["Dapper","Daring","Dangerous","Daft","Dashing","Dauntless","Defiant"]},{"emoji":"🦜","name":"Parrot","category":"animals","adjectives":["Positive","Peachy","Pious","Pioneering","Pirate","Pixelated","Pivotal"]},{"emoji":"🐦⬛","name":"Blackbird","category":"animals","adjectives":["Bold","Bright","Brave","Balanced","Boundless","Brilliant","Beautiful"]},{"emoji":"🪿","name":"Goose","category":"animals","adjectives":["Graceful","Grand","Gregarious","Grounded","Growing","Genuine","Gifted"]},{"emoji":"🐢","name":"Tortoise","category":"animals","adjectives":["Timeless","Thoughtful","Thorough","Tranquil","Traditional","Treasured","True"]},{"emoji":"🦎","name":"Lizard","category":"animals","adjectives":["Lively","Logical","Lasting","Limitless","Luminous","Lucky","Luxurious"]},{"emoji":"🐍","name":"Snake","category":"animals","adjectives":["Silent","Smooth","Swift","Sleek","Skilled","Sublime","Subtle"]},{"emoji":"🐳","name":"Whale","category":"animals","adjectives":["Wise","Wonderful","Watchful","Welcoming","Wholesome","Willing","Worthy"]},{"emoji":"🪸","name":"Coral","category":"animals","adjectives":["Colorful","Calm","Complex","Creative","Curious","Cheerful","Charming"]},{"emoji":"🦞","name":"Lobster","category":"animals","adjectives":["Loyal","Lively","Lavish","Logical","Lasting","Laudable","Learned"]},{"emoji":"🦑","name":"Squid","category":"animals","adjectives":["Swift","Smart","Smooth","Skilled","Sophisticated","Sporty","Snappy"]},{"emoji":"🐌","name":"Snail","category":"animals","adjectives":["Steady","Smooth","Simple","Serene","Sincere","Skilled","Sweet"]},{"emoji":"🐛","name":"Caterpillar","category":"animals","adjectives":["Curious","Creative","Careful","Cheerful","Clever","Calm","Cute"]},{"emoji":"🦗","name":"Cricket","category":"animals","adjectives":["Crazy","Craggy","Creative","Cheerful","Clever","Calm","Coordinated"]},{"emoji":"🕷️","name":"Spider","category":"animals","adjectives":["Silent","Swift","Skilled","Smart","Strategic","Steady","Strong"]},{"emoji":"🍏","name":"Green Apple","category":"food","adjectives":["Able","Ambitious","Adaptable","Affable","Abstract","Academic","Absolute","Accessible"]},{"emoji":"🍎","name":"Red Apple","category":"food","adjectives":["Able","Ambitious","Adaptable","Affable","Abstract","Academic","Absolute","Accessible"]},{"emoji":"🍐","name":"Pear","category":"food","adjectives":["Positive","Peachy","Pious","Pioneering","Pirate","Pixelated","Pivotal","Perfect"]},{"emoji":"🍊","name":"Orange","category":"food","adjectives":["Optimistic","Opulent","Observant","Olympic","Omnipotent","Ontological","Outstanding"]},{"emoji":"🍋","name":"Lemon","category":"food","adjectives":["Legendary","Lavish","Laudable","Lively","Loving","Loyal","Learned"]},{"emoji":"🍌","name":"Banana","category":"food","adjectives":["Bubbly","Burly","Balanced","Benevolent","Baffled","Bashful","Bemused"]},{"emoji":"🍉","name":"Watermelon","category":"food","adjectives":["Wacky","Wealthy","Wakeful","Wonderful","Wild","Watchful","Witty","Winning"]},{"emoji":"🍇","name":"Grape","category":"food","adjectives":["Great","Gradiated","Grand","Groovy","Gracious","Grounded","Gregarious"]},{"emoji":"🍓","name":"Strawberry","category":"food","adjectives":["Steel","Stellar","Steady","Strategic","Strong","Stable","Stark","Stacked"]},{"emoji":"🫐","name":"Blueberry","category":"food","adjectives":["Brave","Bright","Brilliant","Bold","Bouncy","Balanced","Beautiful"]},{"emoji":"🍒","name":"Cherry","category":"food","adjectives":["Charming","Cheerful","Choppy","Chatty","Cheeky","Chiseled","Chirpy","Choosy","Chuffed"]},{"emoji":"🍑","name":"Peach","category":"food","adjectives":["Positive","Peachy","Pious","Pioneering","Pristine","Pure","Perfect"]},{"emoji":"🥭","name":"Mango","category":"food","adjectives":["Magical","Majestic","Masterful","Maverick","Mellow","Mighty","Mindful"]},{"emoji":"🥥","name":"Coconut","category":"food","adjectives":["Colossal","Charismatic","Casual","Courageous","Colorful","Capable","Captivating","Cute"]},{"emoji":"🥝","name":"Kiwi","category":"food","adjectives":["Kind","Keen","Knightly","Knowing","Kinetic","Kindred","Kingly"]},{"emoji":"🍅","name":"Tomato","category":"food","adjectives":["Tender","Tasty","Tactful","Talented","Tangible","Thorough","Thoughtful"]},{"emoji":"🍆","name":"Aubergine","category":"food","adjectives":["Artistic","Authentic","Automated","Assertive","Astute","Attractive","Animated"]},{"emoji":"🥑","name":"Avocado","category":"food","adjectives":["Active","Adaptable","Adept","Admired","Advanced","Adventurous","Affable"]},{"emoji":"🥦","name":"Broccoli","category":"food","adjectives":["Brave","Bright","Brilliant","Bold","Bouncy","Balanced","Beautiful"]},{"emoji":"🥬","name":"Lettuce","category":"food","adjectives":["Lively","Light","Lasting","Logical","Lucid","Luminous","Lustrous"]},{"emoji":"🌶️","name":"Chilli","category":"food","adjectives":["Charming","Cheerful","Choppy","Chatty","Cheeky","Chiseled","Chirpy","Choosy"]},{"emoji":"🫑","name":"Pepper","category":"food","adjectives":["Positive","Peachy","Pious","Pioneering","Pristine","Pure","Perfect"]},{"emoji":"🌽","name":"Corn","category":"food","adjectives":["Colossal","Charismatic","Casual","Courageous","Colorful","Capable","Captivating"]},{"emoji":"🥕","name":"Carrot","category":"food","adjectives":["Caring","Cheerful","Clever","Creative","Calm","Careful","Captivating"]},{"emoji":"🫒","name":"Olive","category":"food","adjectives":["Observant","Original","Optimistic","Orderly","Outstanding","Outgoing","Orthodox"]},{"emoji":"🥔","name":"Potato","category":"food","adjectives":["Peaceful","Patient","Perky","Playful","Pleasant","Plucky","Proper"]},{"emoji":"🥐","name":"Croissant","category":"food","adjectives":["Crispy","Crafty","Creative","Cultured","Curious","Careful","Cordial"]},{"emoji":"🥖","name":"Bread","category":"food","adjectives":["Bright","Balanced","Beautiful","Beneficial","Benevolent","Brave","Brilliant"]},{"emoji":"🥨","name":"Pretzel","category":"food","adjectives":["Peaceful","Perfect","Perky","Playful","Pleasant","Plucky","Proper"]},{"emoji":"🧀","name":"Cheese","category":"food","adjectives":["Charming","Cheerful","Cheesy","Chatty","Cheeky","Choice","Chief"]},{"emoji":"🥚","name":"Egg","category":"food","adjectives":["Earnest","Eager","Easygoing","Eccentric","Educated","Efficient","Elegant"]},{"emoji":"🥩","name":"Steak","category":"food","adjectives":["Steel","Stellar","Steady","Strategic","Strong","Stable","Stark"]},{"emoji":"🌭","name":"Hotdog","category":"food","adjectives":["Happy","Heroic","Honest","Helpful","Humble","Hearty","Harmonious"]},{"emoji":"🍔","name":"Burger","category":"food","adjectives":["Bold","Bright","Brave","Balanced","Boundless","Brilliant","Beautiful"]},{"emoji":"🍟","name":"Fries","category":"food","adjectives":["Friendly","Fresh","Free","Fancy","Fair","Famous","Fantastic"]},{"emoji":"🍕","name":"Pizza","category":"food","adjectives":["Positive","Peachy","Pious","Pioneering","Pristine","Pure","Perfect"]},{"emoji":"🌮","name":"Taco","category":"food","adjectives":["Tactical","Talented","Tasteful","Tenacious","Thoughtful","Thorough","Timely"]},{"emoji":"🌯","name":"Wrap","category":"food","adjectives":["Wise","Willing","Witty","Wonderful","Worthy","Watchful","Warm"]},{"emoji":"🍣","name":"Sushi","category":"food","adjectives":["Super","Surgical","Sublime","Subtle","Sumptuous","Sunny","Superb"]},{"emoji":"🍦","name":"Ice Cream","category":"food","adjectives":["Iconic","Ideal","Idyllic","Imaginative","Immaculate","Imperial","Impressive"]},{"emoji":"🍿","name":"Popcorn","category":"food","adjectives":["Positive","Peachy","Pious","Pioneering","Pristine","Pure","Perfect"]},{"emoji":"🍩","name":"Donut","category":"food","adjectives":["Dapper","Daring","Dazzling","Decent","Dedicated","Definite","Delightful"]},{"emoji":"🍪","name":"Cookie","category":"food","adjectives":["Colossal","Charismatic","Casual","Courageous","Colorful","Capable","Captivating"]}]'), a = {
|
|
1
|
+
const e = /* @__PURE__ */ JSON.parse('[{"emoji":"🌸","name":"Blossom","category":"plants","adjectives":["Blissful","Black","Blanched","Blooming","Beloved","Benevolent"]},{"emoji":"🌹","name":"Rose","category":"plants","adjectives":["Regal","Relaxed","Resolute","Random","Rapid","Riotous","Ruddy","Rogue"]},{"emoji":"🌺","name":"Hibiscus","category":"plants","adjectives":["Happy","Heroic","Hardy","Heavenly","Humble","Hopeful","Healthy","Hearty"]},{"emoji":"🌻","name":"Sunflower","category":"plants","adjectives":["Super","Surgical","Subatomic","Sublime","Subtle","Sumptuous","Sunny"]},{"emoji":"🌼","name":"Daisy","category":"plants","adjectives":["Dapper","Droopy","Dangerous","Daft","Dashing","Dauntless","Defiant"]},{"emoji":"🌷","name":"Tulip","category":"plants","adjectives":["Tactical","Talented","Tactile","Tangible","Tenacious","Talismanic","Timely"]},{"emoji":"🪻","name":"Hyacinth","category":"plants","adjectives":["Healthy","Hearty","Helpful","Heroic","Humble","Hilarious"]},{"emoji":"🍀","name":"Clover","category":"plants","adjectives":["Colossal","Charismatic","Casual","Courageous","Colorful","Capable","Captivating","Cute"]},{"emoji":"🍁","name":"Leaf","category":"plants","adjectives":["Legendary","Lavish","Laudable","Lively","Loving","Loyal","Learned"]},{"emoji":"🍄","name":"Mushroom","category":"plants","adjectives":["Magic","Monstrous","Mental","Marvelous","Mindful","Magnificent","Masterful","Magnetic","Modest"]},{"emoji":"🪨","name":"Rock","category":"plants","adjectives":["Robust","Real","Relative","Regal","Relaxed","Resolute","Random","Rapid","Riotous","Ruddy","Rogue"]},{"emoji":"🪵","name":"Log","category":"plants","adjectives":["Loopy","Large","Legendary","Lavish","Laudable","Lively","Loving","Loyal","Learned"]},{"emoji":"🪷","name":"Lotus","category":"plants","adjectives":["Loopy","Large","Legendary","Lavish","Laudable","Lively","Loving","Loyal","Learned"]},{"emoji":"🌱","name":"Seedling","category":"plants","adjectives":["Stellar","Savvy","Sparing","Sensitive","Swift","Synergistic","Steady"]},{"emoji":"🌲","name":"Pine","category":"plants","adjectives":["Positive","Peachy","Pious","Pioneering","Pirate","Pixelated","Pivotal","Painted","Pampered","Panoramic","Paper","Party","Powerful","Prosperous","Prolific","Paradise","Profuse","Peaceful","Perfect"]},{"emoji":"🌳","name":"Oak","category":"plants","adjectives":["Optimistic","Opulent","Observant","Olympic","Omnipotent","Ontological"]},{"emoji":"🌴","name":"Palm","category":"plants","adjectives":["Positive","Peachy","Pious","Pioneering","Pirate","Pixelated","Pivotal","Painted","Pampered","Panoramic","Paper","Party","Powerful","Prosperous","Prolific","Paradise","Profuse","Peaceful","Perfect"]},{"emoji":"🌵","name":"Cactus","category":"plants","adjectives":["Colossal","Charismatic","Casual","Courageous","Colorful","Capable","Captivating","Cute"]},{"emoji":"🐵","name":"Monkey","category":"animals","adjectives":["Mental","Marvelous","Mindful","Magnificent","Masterful","Magnetic","Modest"]},{"emoji":"🐶","name":"Dog","category":"animals","adjectives":["Dapper","Droopy","Dangerous","Daft","Dashing","Dauntless","Defiant"]},{"emoji":"🐺","name":"Wolf","category":"animals","adjectives":["Wealthy","Wary","Wacky","Watchful","Wild","Witty","Wise"]},{"emoji":"🦊","name":"Fox","category":"animals","adjectives":["Fabulous","Fantastic","Friendly","Faithful","Fortunate","Famous","Fungible"]},{"emoji":"🐱","name":"Cat","category":"animals","adjectives":["Colossal","Charismatic","Casual","Courageous","Colorful","Capable","Captivating","Cute"]},{"emoji":"🦁","name":"Lion","category":"animals","adjectives":["Legendary","Lavish","Laudable","Lively","Loving","Loyal","Learned"]},{"emoji":"🐯","name":"Tiger","category":"animals","adjectives":["Tactical","Talkative","Talismanic","Tough","Talented","Tasteful"]},{"emoji":"🐴","name":"Horse","category":"animals","adjectives":["Healthy","Hearty","Helpful","Heroic","Humble","Hilarious"]},{"emoji":"🫎","name":"Moose","category":"animals","adjectives":["Mental","Marvelous","Mindful","Magnificent","Masterful","Magnetic","Modest"]},{"emoji":"🦄","name":"Unicorn","category":"animals","adjectives":["Unique","United","Unionised","Universal","Unstoppable","Ubiquitous"]},{"emoji":"🐮","name":"Cow","category":"animals","adjectives":["Colossal","Charismatic","Casual","Courageous","Colorful","Capable","Captivating","Cute"]},{"emoji":"🐷","name":"Pig","category":"animals","adjectives":["Positive","Peachy","Pious","Pioneering","Pirate","Pixelated","Pivotal","Painted","Pampered","Panoramic","Paper","Party","Powerful","Prosperous","Prolific","Paradise","Profuse","Peaceful","Perfect"]},{"emoji":"🐗","name":"Boar","category":"animals","adjectives":["Bubbly","Brilliant","Balanced","Benevolent","Baffled","Bashful","Bemused","Burly"]},{"emoji":"🐭","name":"Mouse","category":"animals","adjectives":["Mental","Marvelous","Mindful","Magnificent","Masterful","Magnetic","Modest","Massive"]},{"emoji":"🐰","name":"Rabbit","category":"animals","adjectives":["Regal","Relaxed","Resolute","Random","Rapid","Riotous","Ruddy","Rogue"]},{"emoji":"🐻","name":"Bear","category":"animals","adjectives":["Bubbly","Brilliant","Balanced","Benevolent","Baffled","Bashful","Bemused","Burly"]},{"emoji":"🐻❄️","name":"Polar Bear","category":"animals","adjectives":["Bubbly","Brilliant","Balanced","Benevolent","Baffled","Bashful","Bemused","Burly"]},{"emoji":"🐨","name":"Koala","category":"animals","adjectives":["Keen","Kempt","Kinetic","Kind","Kilted","Kantian"]},{"emoji":"🐼","name":"Panda","category":"animals","adjectives":["Positive","Peachy","Pious","Pioneering","Pirate","Pixelated","Pivotal","Painted","Pampered","Panoramic","Paper","Party","Powerful","Prosperous","Prolific","Paradise","Profuse","Peaceful","Perfect"]},{"emoji":"🐔","name":"Chicken","category":"animals","adjectives":["Charming","Cheerful","Choppy","Chatty","Cheeky","Chiseled","Chirpy","Choosy","Chuffed"]},{"emoji":"🐤","name":"Chick","category":"animals","adjectives":["Charming","Cheerful","Choppy","Chatty","Cheeky","Chiseled","Chirpy","Choosy","Chuffed"]},{"emoji":"🐦","name":"Bird","category":"animals","adjectives":["Bubbly","Burly","Balanced","Benevolent","Baffled","Bashful","Bemused"]},{"emoji":"🐧","name":"Penguin","category":"animals","adjectives":["Positive","Peachy","Pious","Pioneering","Pirate","Pixelated","Pivotal","Painted","Pampered","Panoramic","Paper","Party","Powerful","Prosperous","Prolific","Paradise","Profuse","Peaceful","Perfect"]},{"emoji":"🐸","name":"Frog","category":"animals","adjectives":["Frank","Fractional","Freaky","Freckly","Frizzy","Frosty","Fruitful"]},{"emoji":"🐲","name":"Dragon","category":"animals","adjectives":["Draped","Dramatic","Drastic","Drafty","Defiant","Divine"]},{"emoji":"🐙","name":"Octopus","category":"animals","adjectives":["Optimistic","Opulent","Observant","Olympic","Omnipotent","Ontological"]},{"emoji":"🪼","name":"Jellyfish","category":"animals","adjectives":["Jammy","Jaunty","Joyful","Just","Jeweled","Jagged","Jestful"]},{"emoji":"🦀","name":"Crab","category":"animals","adjectives":["Crazy","Craggy","Colossal","Charismatic","Casual","Courageous","Colorful","Capable","Captivating","Cute"]},{"emoji":"🦋","name":"Butterfly","category":"animals","adjectives":["Bubbly","Balanced","Benevolent","Baffled","Bashful","Bemused","Burly"]},{"emoji":"🐜","name":"Ant","category":"animals","adjectives":["Acrobatic","Actual","Adaptive","Adventurous","Admirable","Aerial","Affable","Affluent","Agile"]},{"emoji":"🐝","name":"Bee","category":"animals","adjectives":["Bubbly","Balanced","Benevolent","Baffled","Bashful","Bemused","Burly"]},{"emoji":"🪲","name":"Beetle","category":"animals","adjectives":["Bubbly","Balanced","Benevolent","Baffled","Bashful","Bemused","Burly"]},{"emoji":"🐞","name":"Ladybird","category":"animals","adjectives":["Legendary","Lavish","Laudable","Lively","Loving","Loyal","Learned"]},{"emoji":"🐟","name":"Fish","category":"animals","adjectives":["Fluid","Flexible","Flashy","Flawless","Flowing","Free","Fresh"]},{"emoji":"🐡","name":"Pufferfish","category":"animals","adjectives":["Positive","Peachy","Pious","Pioneering","Pirate","Pixelated","Pivotal"]},{"emoji":"🐚","name":"Shell","category":"animals","adjectives":["Sharp","Super","Surgical","Shapely","Shimmering","Shiny","Shredded"]},{"emoji":"🦐","name":"Shrimp","category":"animals","adjectives":["Sharp","Super","Surgical","Shapely","Shimmering","Shiny","Shredded"]},{"emoji":"🐒","name":"Monkey","category":"animals","adjectives":["Mental","Marvelous","Mindful","Magnificent","Masterful","Magnetic","Modest","Massive"]},{"emoji":"🦂","name":"Scorpion","category":"animals","adjectives":["Silent","Steady","Swift","Strong","Stealthy","Strategic","Skilled"]},{"emoji":"🦃","name":"Turkey","category":"animals","adjectives":["Talented","Tactful","Tenacious","Thorough","Thoughtful","Thriving","Trusted"]},{"emoji":"🦧","name":"Orangutan","category":"animals","adjectives":["Optimistic","Opulent","Observant","Olympic","Omnipotent","Ontological"]},{"emoji":"🐁","name":"Mouse","category":"animals","adjectives":["Mental","Marvelous","Mindful","Magnificent","Masterful","Magnetic","Modest","Massive","Mighty"]},{"emoji":"🐀","name":"Rat","category":"animals","adjectives":["Regal","Relaxed","Resolute","Random","Rapid","Riotous","Ruddy","Rogue"]},{"emoji":"🐇","name":"Rabbit","category":"animals","adjectives":["Regal","Relaxed","Resolute","Random","Rapid","Riotous","Ruddy","Rogue"]},{"emoji":"🐿️","name":"Squirrel","category":"animals","adjectives":["Smart","Swift","Sneaky","Skilled","Spirited","Spontaneous","Spry"]},{"emoji":"🦫","name":"Beaver","category":"animals","adjectives":["Busy","Bold","Bright","Brave","Beneficial","Boundless","Brilliant"]},{"emoji":"🦔","name":"Hedgehog","category":"animals","adjectives":["Happy","Hasty","Helpful","Humble","Honest","Heroic","Harmonious"]},{"emoji":"🦇","name":"Bat","category":"animals","adjectives":["Bubbly","Balanced","Benevolent","Baffled","Bashful","Bemused","Burly"]},{"emoji":"🦥","name":"Sloth","category":"animals","adjectives":["Serene","Slow","Steady","Subtle","Smooth","Sleepy","Sweet"]},{"emoji":"🦦","name":"Otter","category":"animals","adjectives":["Optimistic","Outgoing","Observant","Orderly","Original","Outstanding","Overjoyed"]},{"emoji":"🐓","name":"Rooster","category":"animals","adjectives":["Regal","Relaxed","Resolute","Random","Rapid","Riotous","Ruddy","Rogue","Royal"]},{"emoji":"🐣","name":"Chick","category":"animals","adjectives":["Charming","Cheerful","Choppy","Chatty","Cheeky","Chiseled","Chirpy","Choosy","Chuffed"]},{"emoji":"🦆","name":"Duck","category":"animals","adjectives":["Dapper","Daring","Dangerous","Daft","Dashing","Dauntless","Defiant"]},{"emoji":"🦉","name":"Owl","category":"animals","adjectives":["Observant","Orderly","Original","Orthodox","Otherworldly","Outstanding","Overachieving"]},{"emoji":"🦤","name":"Dodo","category":"animals","adjectives":["Dapper","Daring","Dangerous","Daft","Dashing","Dauntless","Defiant"]},{"emoji":"🦜","name":"Parrot","category":"animals","adjectives":["Positive","Peachy","Pious","Pioneering","Pirate","Pixelated","Pivotal"]},{"emoji":"🐦⬛","name":"Blackbird","category":"animals","adjectives":["Bold","Bright","Brave","Balanced","Boundless","Brilliant","Beautiful"]},{"emoji":"🪿","name":"Goose","category":"animals","adjectives":["Graceful","Grand","Gregarious","Grounded","Growing","Genuine","Gifted"]},{"emoji":"🐢","name":"Tortoise","category":"animals","adjectives":["Timeless","Thoughtful","Thorough","Tranquil","Traditional","Treasured","True"]},{"emoji":"🦎","name":"Lizard","category":"animals","adjectives":["Lively","Logical","Lasting","Limitless","Luminous","Lucky","Luxurious"]},{"emoji":"🐍","name":"Snake","category":"animals","adjectives":["Silent","Smooth","Swift","Sleek","Skilled","Sublime","Subtle"]},{"emoji":"🐳","name":"Whale","category":"animals","adjectives":["Wise","Wonderful","Watchful","Welcoming","Wholesome","Willing","Worthy"]},{"emoji":"🪸","name":"Coral","category":"animals","adjectives":["Colorful","Calm","Complex","Creative","Curious","Cheerful","Charming"]},{"emoji":"🦞","name":"Lobster","category":"animals","adjectives":["Loyal","Lively","Lavish","Logical","Lasting","Laudable","Learned"]},{"emoji":"🦑","name":"Squid","category":"animals","adjectives":["Swift","Smart","Smooth","Skilled","Sophisticated","Sporty","Snappy"]},{"emoji":"🐌","name":"Snail","category":"animals","adjectives":["Steady","Smooth","Simple","Serene","Sincere","Skilled","Sweet"]},{"emoji":"🐛","name":"Caterpillar","category":"animals","adjectives":["Curious","Creative","Careful","Cheerful","Clever","Calm","Cute"]},{"emoji":"🦗","name":"Cricket","category":"animals","adjectives":["Crazy","Craggy","Creative","Cheerful","Clever","Calm","Coordinated"]},{"emoji":"🕷️","name":"Spider","category":"animals","adjectives":["Silent","Swift","Skilled","Smart","Strategic","Steady","Strong"]},{"emoji":"🍏","name":"Green Apple","category":"food","adjectives":["Able","Ambitious","Adaptable","Affable","Abstract","Academic","Absolute","Accessible"]},{"emoji":"🍎","name":"Red Apple","category":"food","adjectives":["Able","Ambitious","Adaptable","Affable","Abstract","Academic","Absolute","Accessible"]},{"emoji":"🍐","name":"Pear","category":"food","adjectives":["Positive","Peachy","Pious","Pioneering","Pirate","Pixelated","Pivotal","Perfect"]},{"emoji":"🍊","name":"Orange","category":"food","adjectives":["Optimistic","Opulent","Observant","Olympic","Omnipotent","Ontological","Outstanding"]},{"emoji":"🍋","name":"Lemon","category":"food","adjectives":["Legendary","Lavish","Laudable","Lively","Loving","Loyal","Learned"]},{"emoji":"🍌","name":"Banana","category":"food","adjectives":["Bubbly","Burly","Balanced","Benevolent","Baffled","Bashful","Bemused"]},{"emoji":"🍉","name":"Watermelon","category":"food","adjectives":["Wacky","Wealthy","Wakeful","Wonderful","Wild","Watchful","Witty","Winning"]},{"emoji":"🍇","name":"Grape","category":"food","adjectives":["Great","Gradiated","Grand","Groovy","Gracious","Grounded","Gregarious"]},{"emoji":"🍓","name":"Strawberry","category":"food","adjectives":["Steel","Stellar","Steady","Strategic","Strong","Stable","Stark","Stacked"]},{"emoji":"🫐","name":"Blueberry","category":"food","adjectives":["Brave","Bright","Brilliant","Bold","Bouncy","Balanced","Beautiful"]},{"emoji":"🍒","name":"Cherry","category":"food","adjectives":["Charming","Cheerful","Choppy","Chatty","Cheeky","Chiseled","Chirpy","Choosy","Chuffed"]},{"emoji":"🍑","name":"Peach","category":"food","adjectives":["Positive","Peachy","Pious","Pioneering","Pristine","Pure","Perfect"]},{"emoji":"🥭","name":"Mango","category":"food","adjectives":["Magical","Majestic","Masterful","Maverick","Mellow","Mighty","Mindful"]},{"emoji":"🥥","name":"Coconut","category":"food","adjectives":["Colossal","Charismatic","Casual","Courageous","Colorful","Capable","Captivating","Cute"]},{"emoji":"🥝","name":"Kiwi","category":"food","adjectives":["Kind","Keen","Knightly","Knowing","Kinetic","Kindred","Kingly"]},{"emoji":"🍅","name":"Tomato","category":"food","adjectives":["Tender","Tasty","Tactful","Talented","Tangible","Thorough","Thoughtful"]},{"emoji":"🍆","name":"Aubergine","category":"food","adjectives":["Artistic","Authentic","Automated","Assertive","Astute","Attractive","Animated"]},{"emoji":"🥑","name":"Avocado","category":"food","adjectives":["Active","Adaptable","Adept","Admired","Advanced","Adventurous","Affable"]},{"emoji":"🥦","name":"Broccoli","category":"food","adjectives":["Brave","Bright","Brilliant","Bold","Bouncy","Balanced","Beautiful"]},{"emoji":"🥬","name":"Lettuce","category":"food","adjectives":["Lively","Light","Lasting","Logical","Lucid","Luminous","Lustrous"]},{"emoji":"🌶️","name":"Chilli","category":"food","adjectives":["Charming","Cheerful","Choppy","Chatty","Cheeky","Chiseled","Chirpy","Choosy"]},{"emoji":"🫑","name":"Pepper","category":"food","adjectives":["Positive","Peachy","Pious","Pioneering","Pristine","Pure","Perfect"]},{"emoji":"🌽","name":"Corn","category":"food","adjectives":["Colossal","Charismatic","Casual","Courageous","Colorful","Capable","Captivating"]},{"emoji":"🥕","name":"Carrot","category":"food","adjectives":["Caring","Cheerful","Clever","Creative","Calm","Careful","Captivating"]},{"emoji":"🫒","name":"Olive","category":"food","adjectives":["Observant","Original","Optimistic","Orderly","Outstanding","Outgoing","Orthodox"]},{"emoji":"🥔","name":"Potato","category":"food","adjectives":["Peaceful","Patient","Perky","Playful","Pleasant","Plucky","Proper"]},{"emoji":"🥐","name":"Croissant","category":"food","adjectives":["Crispy","Crafty","Creative","Cultured","Curious","Careful","Cordial"]},{"emoji":"🥖","name":"Bread","category":"food","adjectives":["Bright","Balanced","Beautiful","Beneficial","Benevolent","Brave","Brilliant"]},{"emoji":"🥨","name":"Pretzel","category":"food","adjectives":["Peaceful","Perfect","Perky","Playful","Pleasant","Plucky","Proper"]},{"emoji":"🧀","name":"Cheese","category":"food","adjectives":["Charming","Cheerful","Cheesy","Chatty","Cheeky","Choice","Chief"]},{"emoji":"🥚","name":"Egg","category":"food","adjectives":["Earnest","Eager","Easygoing","Eccentric","Educated","Efficient","Elegant"]},{"emoji":"🥩","name":"Steak","category":"food","adjectives":["Steel","Stellar","Steady","Strategic","Strong","Stable","Stark"]},{"emoji":"🌭","name":"Hotdog","category":"food","adjectives":["Happy","Heroic","Honest","Helpful","Humble","Hearty","Harmonious"]},{"emoji":"🍔","name":"Burger","category":"food","adjectives":["Bold","Bright","Brave","Balanced","Boundless","Brilliant","Beautiful"]},{"emoji":"🍟","name":"Fries","category":"food","adjectives":["Friendly","Fresh","Free","Fancy","Fair","Famous","Fantastic"]},{"emoji":"🍕","name":"Pizza","category":"food","adjectives":["Positive","Peachy","Pious","Pioneering","Pristine","Pure","Perfect"]},{"emoji":"🌮","name":"Taco","category":"food","adjectives":["Tactical","Talented","Tasteful","Tenacious","Thoughtful","Thorough","Timely"]},{"emoji":"🌯","name":"Wrap","category":"food","adjectives":["Wise","Willing","Witty","Wonderful","Worthy","Watchful","Warm"]},{"emoji":"🍣","name":"Sushi","category":"food","adjectives":["Super","Surgical","Sublime","Subtle","Sumptuous","Sunny","Superb"]},{"emoji":"🍦","name":"Ice Cream","category":"food","adjectives":["Iconic","Ideal","Idyllic","Imaginative","Immaculate","Imperial","Impressive"]},{"emoji":"🍿","name":"Popcorn","category":"food","adjectives":["Positive","Peachy","Pious","Pioneering","Pristine","Pure","Perfect"]},{"emoji":"🍩","name":"Donut","category":"food","adjectives":["Dapper","Daring","Dazzling","Decent","Dedicated","Definite","Delightful"]},{"emoji":"🍪","name":"Cookie","category":"food","adjectives":["Colossal","Charismatic","Casual","Courageous","Colorful","Capable","Captivating"]}]'), a = {
|
|
2
2
|
items: e
|
|
3
3
|
};
|
|
4
4
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("starknet"),n=require("../../errors/network.cjs");function a(e){switch(e){case"mainnet-alpha":case t.constants.NetworkName.SN_MAIN:return t.constants.StarknetChainId.SN_MAIN;case"sepolia-alpha":case t.constants.NetworkName.SN_SEPOLIA:return t.constants.StarknetChainId.SN_SEPOLIA;default:throw new n.NetworkError({code:"NOT_FOUND",message:`Unknown networkId: ${e}`})}}function r(e){if(e==="mainnet"||e==="mainnet-alpha")return"mainnet";if(e==="sepolia"||e==="sepolia-alpha")return"sepolia";throw new Error("Invalid network id")}exports.getArgentNetwork=r;exports.getChainIdFromNetworkId=a;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { constants } from 'starknet';
|
|
2
2
|
import { ArgentNetworkId } from '../../backend';
|
|
3
3
|
export declare function getChainIdFromNetworkId(networkId: ArgentNetworkId | constants.NetworkName | string): constants.StarknetChainId;
|
|
4
|
+
export declare function getArgentNetwork(networkId: string): string;
|
|
@@ -1,20 +1,28 @@
|
|
|
1
|
-
import { constants as
|
|
2
|
-
import { NetworkError as
|
|
3
|
-
function o(
|
|
4
|
-
switch (
|
|
1
|
+
import { constants as a } from "starknet";
|
|
2
|
+
import { NetworkError as t } from "../../errors/network.js";
|
|
3
|
+
function o(e) {
|
|
4
|
+
switch (e) {
|
|
5
5
|
case "mainnet-alpha":
|
|
6
|
-
case
|
|
7
|
-
return
|
|
6
|
+
case a.NetworkName.SN_MAIN:
|
|
7
|
+
return a.StarknetChainId.SN_MAIN;
|
|
8
8
|
case "sepolia-alpha":
|
|
9
|
-
case
|
|
10
|
-
return
|
|
9
|
+
case a.NetworkName.SN_SEPOLIA:
|
|
10
|
+
return a.StarknetChainId.SN_SEPOLIA;
|
|
11
11
|
default:
|
|
12
|
-
throw new
|
|
12
|
+
throw new t({
|
|
13
13
|
code: "NOT_FOUND",
|
|
14
|
-
message: `Unknown networkId: ${
|
|
14
|
+
message: `Unknown networkId: ${e}`
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
+
function i(e) {
|
|
19
|
+
if (e === "mainnet" || e === "mainnet-alpha")
|
|
20
|
+
return "mainnet";
|
|
21
|
+
if (e === "sepolia" || e === "sepolia-alpha")
|
|
22
|
+
return "sepolia";
|
|
23
|
+
throw new Error("Invalid network id");
|
|
24
|
+
}
|
|
18
25
|
export {
|
|
26
|
+
i as getArgentNetwork,
|
|
19
27
|
o as getChainIdFromNetworkId
|
|
20
28
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("starknet"),h=require("url-join"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("starknet"),h=require("url-join"),f=require("./types.cjs"),g=require("../../chains/starknet/network.cjs"),w=require("../../utils/starknet/starknet.cjs"),d=require("../../utils/url/urlWithQuery.cjs");class A{constructor(e="",t){this.argentRelayerUrl=e,this.httpService=t}async getExecutionData(e,t={}){const{useAvnu:n,isSubsidised:o}=t,{networkId:r}=e,u=r?{network:g.getArgentNetwork(r)}:void 0,a=n?h(this.getAvnuUrl(r),"/build-typed-data"):d.urlWithQuery([this.argentRelayerUrl,"/build-typed-data"],u),c={calls:n?e.calls.map(l=>({contractAddress:s.num.toHex(l.contractAddress),calldata:s.CallData.toCalldata(l.calldata).map(v=>s.num.toHex(v)),entrypoint:l.entrypoint})):e.calls,userAddress:e.accountAddress,gasTokenAddress:o?null:s.num.toHex(e.feeTokenAddress),maxGasTokenAmount:o?null:s.num.toHex(e.maxFee),accountClassHash:e.accountClassHash},i=await this.httpService.post(a,{body:s.json.stringify(c),headers:{"Content-Type":"application/json"}}),p=w.typedDataSchema.safeParse(i);if(!p.success)throw new Error("Invalid response from paymaster");return p.data}getAvnuUrl(e){if(!e)throw new Error("Network id is required for Avnu paymaster");let t="";if(e==="mainnet"||e==="mainnet-alpha")t="starknet";else if(e==="sepolia"||e==="sepolia-alpha")t="sepolia";else throw new Error("Invalid network id");return`https://${t}.api.avnu.fi/paymaster/v1`}async execute(e,t={}){const{useAvnu:n,isSubsidised:o}=t,{networkId:r}=e,u=r?{network:g.getArgentNetwork(r)}:void 0;let a=n?h(this.getAvnuUrl(r),"/execute"):d.urlWithQuery([this.argentRelayerUrl,"/execute"],u);o&&(a=d.urlWithQuery(a,{isSubsidised:"true"}));const y={signature:e.signature,userAddress:e.accountAddress,typedData:n?s.json.stringify(e.typedData):e.typedData,deploymentData:e.deploymentData},c=await this.httpService.post(a,{body:s.json.stringify(y),headers:{"Content-Type":"application/json"}}),i=f.paymasterExecuteResponse.safeParse(c);if(!i.success)throw new Error("Invalid response from paymaster");return i.data.transactionHash}}exports.PaymasterService=A;
|
|
@@ -7,7 +7,6 @@ export declare class PaymasterService implements IPaymasterService {
|
|
|
7
7
|
private readonly httpService;
|
|
8
8
|
constructor(argentRelayerUrl: string | undefined, httpService: IHttpService);
|
|
9
9
|
getExecutionData(params: PaymasterExecutionDataParams, options?: PaymasterOptions): Promise<TypedData>;
|
|
10
|
-
getArgentNetwork(networkId: string): string;
|
|
11
10
|
getAvnuUrl(networkId?: string): string;
|
|
12
11
|
execute(params: PaymasterExecuteParams, options?: PaymasterOptions): Promise<string>;
|
|
13
12
|
}
|
|
@@ -1,40 +1,34 @@
|
|
|
1
|
-
import { CallData as
|
|
1
|
+
import { CallData as A, num as i, json as u } from "starknet";
|
|
2
2
|
import f from "url-join";
|
|
3
|
-
import { paymasterExecuteResponse as
|
|
4
|
-
import {
|
|
3
|
+
import { paymasterExecuteResponse as g } from "./types.js";
|
|
4
|
+
import { getArgentNetwork as m } from "../../chains/starknet/network.js";
|
|
5
|
+
import { typedDataSchema as w } from "../../utils/starknet/starknet.js";
|
|
5
6
|
import { urlWithQuery as p } from "../../utils/url/urlWithQuery.js";
|
|
6
7
|
class E {
|
|
7
8
|
constructor(e = "", t) {
|
|
8
9
|
this.argentRelayerUrl = e, this.httpService = t;
|
|
9
10
|
}
|
|
10
11
|
async getExecutionData(e, t = {}) {
|
|
11
|
-
const { useAvnu: r, isSubsidised:
|
|
12
|
-
calls: r ? e.calls.map((
|
|
13
|
-
contractAddress: i.toHex(
|
|
14
|
-
calldata:
|
|
15
|
-
entrypoint:
|
|
12
|
+
const { useAvnu: r, isSubsidised: o } = t, { networkId: s } = e, d = s ? { network: m(s) } : void 0, a = r ? f(this.getAvnuUrl(s), "/build-typed-data") : p([this.argentRelayerUrl, "/build-typed-data"], d), c = {
|
|
13
|
+
calls: r ? e.calls.map((l) => ({
|
|
14
|
+
contractAddress: i.toHex(l.contractAddress),
|
|
15
|
+
calldata: A.toCalldata(l.calldata).map((v) => i.toHex(v)),
|
|
16
|
+
entrypoint: l.entrypoint
|
|
16
17
|
})) : e.calls,
|
|
17
18
|
userAddress: e.accountAddress,
|
|
18
|
-
gasTokenAddress:
|
|
19
|
-
maxGasTokenAmount:
|
|
19
|
+
gasTokenAddress: o ? null : i.toHex(e.feeTokenAddress),
|
|
20
|
+
maxGasTokenAmount: o ? null : i.toHex(e.maxFee),
|
|
20
21
|
accountClassHash: e.accountClassHash
|
|
21
|
-
},
|
|
22
|
+
}, n = await this.httpService.post(a, {
|
|
22
23
|
body: u.stringify(c),
|
|
23
24
|
headers: {
|
|
24
25
|
"Content-Type": "application/json"
|
|
25
26
|
}
|
|
26
|
-
}), h =
|
|
27
|
+
}), h = w.safeParse(n);
|
|
27
28
|
if (!h.success)
|
|
28
29
|
throw new Error("Invalid response from paymaster");
|
|
29
30
|
return h.data;
|
|
30
31
|
}
|
|
31
|
-
getArgentNetwork(e) {
|
|
32
|
-
if (e === "mainnet" || e === "mainnet-alpha")
|
|
33
|
-
return "mainnet";
|
|
34
|
-
if (e === "sepolia" || e === "sepolia-alpha")
|
|
35
|
-
return "sepolia";
|
|
36
|
-
throw new Error("Invalid network id");
|
|
37
|
-
}
|
|
38
32
|
getAvnuUrl(e) {
|
|
39
33
|
if (!e)
|
|
40
34
|
throw new Error("Network id is required for Avnu paymaster");
|
|
@@ -48,9 +42,9 @@ class E {
|
|
|
48
42
|
return `https://${t}.api.avnu.fi/paymaster/v1`;
|
|
49
43
|
}
|
|
50
44
|
async execute(e, t = {}) {
|
|
51
|
-
const { useAvnu: r, isSubsidised:
|
|
52
|
-
let a = r ? f(this.getAvnuUrl(s), "/execute") : p([this.argentRelayerUrl, "/execute"],
|
|
53
|
-
|
|
45
|
+
const { useAvnu: r, isSubsidised: o } = t, { networkId: s } = e, d = s ? { network: m(s) } : void 0;
|
|
46
|
+
let a = r ? f(this.getAvnuUrl(s), "/execute") : p([this.argentRelayerUrl, "/execute"], d);
|
|
47
|
+
o && (a = p(a, {
|
|
54
48
|
isSubsidised: "true"
|
|
55
49
|
}));
|
|
56
50
|
const y = {
|
|
@@ -63,10 +57,10 @@ class E {
|
|
|
63
57
|
headers: {
|
|
64
58
|
"Content-Type": "application/json"
|
|
65
59
|
}
|
|
66
|
-
}),
|
|
67
|
-
if (!
|
|
60
|
+
}), n = g.safeParse(c);
|
|
61
|
+
if (!n.success)
|
|
68
62
|
throw new Error("Invalid response from paymaster");
|
|
69
|
-
return
|
|
63
|
+
return n.data.transactionHash;
|
|
70
64
|
}
|
|
71
65
|
}
|
|
72
66
|
export {
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { AllowArray, BigNumberish, CairoVersion, Call, Signature, TransactionType, UniversalDetails } from 'starknet';
|
|
2
|
+
interface ApiResourceBounds {
|
|
3
|
+
l1Gas: {
|
|
4
|
+
maxAmount?: string;
|
|
5
|
+
maxPricePerUnit?: string;
|
|
6
|
+
};
|
|
7
|
+
l2Gas: {
|
|
8
|
+
maxAmount?: string;
|
|
9
|
+
maxPricePerUnit?: string;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export type SwapTransactionParams = UniversalDetails & {
|
|
13
|
+
type: typeof TransactionType.INVOKE;
|
|
14
|
+
calls: AllowArray<Call>;
|
|
15
|
+
chainId: string;
|
|
16
|
+
cairoVersion: CairoVersion;
|
|
17
|
+
account: string;
|
|
18
|
+
signature: Signature;
|
|
19
|
+
};
|
|
20
|
+
export type ApiSwapRequest = {
|
|
21
|
+
type: typeof TransactionType.INVOKE;
|
|
22
|
+
calls: AllowArray<Call>;
|
|
23
|
+
chainId: string;
|
|
24
|
+
cairoVersion: CairoVersion;
|
|
25
|
+
account: string;
|
|
26
|
+
signature: Signature;
|
|
27
|
+
nonce?: BigNumberish;
|
|
28
|
+
maxFee?: BigNumberish;
|
|
29
|
+
tip?: BigNumberish;
|
|
30
|
+
version?: BigNumberish;
|
|
31
|
+
nonceDataAvailabilityMode?: string;
|
|
32
|
+
feeDataAvailabilityMode?: string;
|
|
33
|
+
resourceBounds?: ApiResourceBounds;
|
|
34
|
+
};
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TransactionExecutionResponse } from '../../../transactions/transactionExecuteTypes';
|
|
2
|
+
import { SwapTransactionParams } from '../models/execute.model';
|
|
3
|
+
import { PaymasterExecuteParams } from './../../paymaster/types';
|
|
4
|
+
export interface ISwapTransactionService {
|
|
5
|
+
execute({ paymasterParams, transactionParams, isSubsidised, }: {
|
|
6
|
+
paymasterParams?: PaymasterExecuteParams;
|
|
7
|
+
transactionParams?: SwapTransactionParams[];
|
|
8
|
+
isSubsidised?: boolean;
|
|
9
|
+
}): Promise<TransactionExecutionResponse>;
|
|
10
|
+
}
|
|
@@ -2,7 +2,7 @@ import { Address } from '../../../chains';
|
|
|
2
2
|
import { SwapOrderResponse, SwapQuoteResponse, Trade } from '../models';
|
|
3
3
|
import { IHttpService } from '../../../http';
|
|
4
4
|
import { WebToken } from '../../../tokens/service/types/webToken.model';
|
|
5
|
-
import { ISharedSwapService } from './
|
|
5
|
+
import { ISharedSwapService } from './ISwapSharedService';
|
|
6
6
|
export declare class SharedSwapService implements ISharedSwapService {
|
|
7
7
|
private readonly httpService;
|
|
8
8
|
swapQuoteUrl: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("lodash-es"),v=require("starknet"),A=require("../../../transactions/transactionExecuteTypes.cjs"),_=require("../../../../node_modules/.pnpm/@starknet-io_types-js@0.7.7/node_modules/@starknet-io/types-js/dist/esm/api/nonspec.cjs");class S{constructor(n="",t){this.argentAffiliateUrl=n,this.httpService=t}async execute({paymasterParams:n,transactionParams:t,isSubsidised:g}){if(y.isEmpty(this.argentAffiliateUrl))throw new Error("Argent affiliate URL is not set");let o;n?o={executeRequest:{...n,signature:n.signature,deploymentData:n.deploymentData,userAddress:n.accountAddress,typedData:n.typedData},isSubsidised:g}:o={transactions:t==null?void 0:t.map(e=>{var c,r,u,l,a,d,p,f;const i={type:e.type,calls:e.calls,chainId:e.chainId,cairoVersion:e.cairoVersion,account:e.account,signature:e.signature,nonce:e.nonce,version:e.version};return e.version===_.ETransactionVersion.V1?i.maxFee=e.maxFee:(i.resourceBounds={l1Gas:{maxAmount:(r=(c=e.resourceBounds)==null?void 0:c.l1_gas)==null?void 0:r.max_amount,maxPricePerUnit:(l=(u=e.resourceBounds)==null?void 0:u.l1_gas)==null?void 0:l.max_price_per_unit},l2Gas:{maxAmount:(d=(a=e.resourceBounds)==null?void 0:a.l2_gas)==null?void 0:d.max_amount,maxPricePerUnit:(f=(p=e.resourceBounds)==null?void 0:p.l2_gas)==null?void 0:f.max_price_per_unit}},i.nonceDataAvailabilityMode=e.nonceDataAvailabilityMode,i.feeDataAvailabilityMode=e.feeDataAvailabilityMode,i.tip=e.tip),i})};const h=await this.httpService.post(this.argentAffiliateUrl,{body:v.json.stringify(o),headers:{"Content-Type":"application/json"}}),s=A.transactionExecutionResponseSchema.safeParse(h);if(!s.success)throw new Error("Invalid response from swap API");return s.data}}exports.SwapTransactionService=S;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IHttpService } from '../../../http';
|
|
2
|
+
import { TransactionExecutionResponse } from '../../../transactions/transactionExecuteTypes';
|
|
3
|
+
import { SwapTransactionParams } from '../models/execute.model';
|
|
4
|
+
import { PaymasterExecuteParams } from './../../paymaster/types';
|
|
5
|
+
import { ISwapTransactionService } from './ISwapTransactionService';
|
|
6
|
+
export declare class SwapTransactionService implements ISwapTransactionService {
|
|
7
|
+
private readonly argentAffiliateUrl;
|
|
8
|
+
private readonly httpService;
|
|
9
|
+
constructor(argentAffiliateUrl: string | undefined, httpService: IHttpService);
|
|
10
|
+
execute({ paymasterParams, transactionParams, isSubsidised, }: {
|
|
11
|
+
paymasterParams?: PaymasterExecuteParams;
|
|
12
|
+
transactionParams?: SwapTransactionParams[];
|
|
13
|
+
isSubsidised?: boolean;
|
|
14
|
+
}): Promise<TransactionExecutionResponse>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { isEmpty as A } from "lodash-es";
|
|
2
|
+
import { json as _ } from "starknet";
|
|
3
|
+
import { transactionExecutionResponseSchema as v } from "../../../transactions/transactionExecuteTypes.js";
|
|
4
|
+
import { ETransactionVersion as y } from "../../../../node_modules/.pnpm/@starknet-io_types-js@0.7.7/node_modules/@starknet-io/types-js/dist/esm/api/nonspec.js";
|
|
5
|
+
class R {
|
|
6
|
+
constructor(i = "", n) {
|
|
7
|
+
this.argentAffiliateUrl = i, this.httpService = n;
|
|
8
|
+
}
|
|
9
|
+
async execute({ paymasterParams: i, transactionParams: n, isSubsidised: g }) {
|
|
10
|
+
if (A(this.argentAffiliateUrl))
|
|
11
|
+
throw new Error("Argent affiliate URL is not set");
|
|
12
|
+
let t;
|
|
13
|
+
i ? t = {
|
|
14
|
+
executeRequest: {
|
|
15
|
+
...i,
|
|
16
|
+
signature: i.signature,
|
|
17
|
+
deploymentData: i.deploymentData,
|
|
18
|
+
userAddress: i.accountAddress,
|
|
19
|
+
typedData: i.typedData
|
|
20
|
+
},
|
|
21
|
+
isSubsidised: g
|
|
22
|
+
} : t = {
|
|
23
|
+
transactions: n == null ? void 0 : n.map((e) => {
|
|
24
|
+
var c, r, l, u, p, d, a, f;
|
|
25
|
+
const o = {
|
|
26
|
+
type: e.type,
|
|
27
|
+
calls: e.calls,
|
|
28
|
+
chainId: e.chainId,
|
|
29
|
+
cairoVersion: e.cairoVersion,
|
|
30
|
+
account: e.account,
|
|
31
|
+
signature: e.signature,
|
|
32
|
+
nonce: e.nonce,
|
|
33
|
+
version: e.version
|
|
34
|
+
};
|
|
35
|
+
return e.version === y.V1 ? o.maxFee = e.maxFee : (o.resourceBounds = {
|
|
36
|
+
l1Gas: {
|
|
37
|
+
maxAmount: (r = (c = e.resourceBounds) == null ? void 0 : c.l1_gas) == null ? void 0 : r.max_amount,
|
|
38
|
+
maxPricePerUnit: (u = (l = e.resourceBounds) == null ? void 0 : l.l1_gas) == null ? void 0 : u.max_price_per_unit
|
|
39
|
+
},
|
|
40
|
+
l2Gas: {
|
|
41
|
+
maxAmount: (d = (p = e.resourceBounds) == null ? void 0 : p.l2_gas) == null ? void 0 : d.max_amount,
|
|
42
|
+
maxPricePerUnit: (f = (a = e.resourceBounds) == null ? void 0 : a.l2_gas) == null ? void 0 : f.max_price_per_unit
|
|
43
|
+
}
|
|
44
|
+
}, o.nonceDataAvailabilityMode = e.nonceDataAvailabilityMode, o.feeDataAvailabilityMode = e.feeDataAvailabilityMode, o.tip = e.tip), o;
|
|
45
|
+
})
|
|
46
|
+
};
|
|
47
|
+
const h = await this.httpService.post(this.argentAffiliateUrl, {
|
|
48
|
+
body: _.stringify(t),
|
|
49
|
+
headers: {
|
|
50
|
+
"Content-Type": "application/json"
|
|
51
|
+
}
|
|
52
|
+
}), s = v.safeParse(h);
|
|
53
|
+
if (!s.success)
|
|
54
|
+
throw new Error("Invalid response from swap API");
|
|
55
|
+
return s.data;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
export {
|
|
59
|
+
R as SwapTransactionService
|
|
60
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("lodash-es"),o=require("starknet"),N=require("../getTransactionVersion.cjs"),F=require("./error.cjs"),r=require("./utils.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("lodash-es"),o=require("starknet"),N=require("../getTransactionVersion.cjs"),F=require("./error.cjs"),r=require("./utils.cjs"),E=require("../../chains/starknet/address.cjs"),u=require("../../chains/starknet/constants.cjs"),h=e=>{const{transactions:t}=e;if(!t)throw new F.EstimateError({code:"SIMULATE_AND_REVIEW_FAILED"});if(!Array.isArray(t))throw Error(`Unexpected simulation response. Expected array. Got ${typeof t}`);if(l.isEmpty(t))return[];if(t.length>2)throw Error(`Unexpected simulation response length. Got ${t.length}`);const n=t.map(m=>{if(!m.simulation)throw new F.EstimateError({code:"SIMULATE_AND_REVIEW_FAILED"});return{...m.simulation,...I(m.simulation.feeEstimations)}}),[a,s]=n.length===1?[n[0],void 0]:[n[1],n[0]],i=y(a,s),f=p(a,s);return[...i,...f]},I=e=>{const[t,n]=l.partition(e,a=>"unit"in a&&(a.unit==="FRI"||a.unit==="WEI"));return{nativeFeeEstimations:t,paymasterFeeEstimations:n}},p=(e,t)=>{if(!e)return[];if(!t)return e.paymasterFeeEstimations.map(s=>({type:"paymaster",transactions:c(s),deployment:void 0}));const n=t.paymasterFeeEstimations,a=e.paymasterFeeEstimations;if(n.length!==a.length)throw Error("Deployment and transaction fee estimations length mismatch");return a.map((s,i)=>({type:"paymaster",transactions:c(s),deployment:c(n[i])}))},y=(e,t)=>{if(!e)return[];if(!t)return e.nativeFeeEstimations.map(s=>({type:"native",transactions:d(s),deployment:void 0}));const n=t.nativeFeeEstimations,a=e.nativeFeeEstimations;if(n.length!==a.length)throw Error("Deployment and transaction fee estimations length mismatch");return a.map((s,i)=>({type:"native",transactions:d(s),deployment:d(n[i])}))},c=e=>({feeTokenAddress:e.token.address,maxFee:BigInt(e.maxFee),overallFee:BigInt(e.overallFee)}),d=e=>({amount:o.num.toBigInt(e.gasUsage),feeTokenAddress:r.unitToFeeTokenAddress(e.unit),pricePerUnit:o.num.toBigInt(e.gasPrice),dataGasConsumed:o.num.toBigInt(e.dataGasConsumed??0),dataGasPrice:o.num.toBigInt(e.dataGasPrice??0),max:r.toMax(r.castFeeEstimation(e,o.num.toBigInt))}),S=e=>{var a;if(e.type==="paymaster")return e.transactions.maxFee+(((a=e.deployment)==null?void 0:a.maxFee)??0n);if(e.deployment&&!E.isEqualAddress(e.deployment.feeTokenAddress,e.transactions.feeTokenAddress))throw Error("Cannot calculate estimated fees for different tokens");const t=e.deployment?r.estimatedFeeToMaxFeeTotal(e.deployment):0n,n=r.estimatedFeeToMaxFeeTotal(e.transactions);return t+n},V=e=>{var t;return e.type==="paymaster"?e.transactions.overallFee+(((t=e.deployment)==null?void 0:t.overallFee)??0n):r.estimatedFeesToTotal(e)},g=(e=[])=>e.filter(n=>n.type==="native"),x=e=>e.filter(t=>t.type==="paymaster"),T=e=>e===o.constants.TRANSACTION_VERSION.V1||e===o.constants.TRANSACTION_VERSION.F1?u.ETH_TOKEN_ADDRESS:u.STRK_TOKEN_ADDRESS,v=(e=[],t)=>{const n=g(e).find(a=>E.isEqualAddress(a.transactions.feeTokenAddress,t));if(!n)throw Error(`No native estimated fee found for ${t}`);return n},A=(e=[],t)=>{const n=T(t);return v(e,n)},_=(e=[],t)=>A(e,N.getAccountTxVersion(t));exports.estimatedFeesToMaxFeeTotalV2=S;exports.estimatedFeesToTotalV2=V;exports.filterPaymasterEstimatedFees=x;exports.getEstimatedFeeFromSimulationAndRespectWatermarkFeeV2=h;exports.getNativeEstimatedFeeByFeeToken=v;exports.getNativeEstimatedFeeByTxVersion=A;exports.getNativeEstimatedFeeForAccount=_;exports.getNativeEstimatedFees=g;exports.getNativeFeeFromSimulation=y;exports.getNativeFeeTokenAddress=T;exports.getPaymasterFeeFromSimulation=p;
|
|
@@ -3,8 +3,8 @@ import { num as s, constants as p } from "starknet";
|
|
|
3
3
|
import { getAccountTxVersion as f } from "../getTransactionVersion.js";
|
|
4
4
|
import { EstimateError as d } from "./error.js";
|
|
5
5
|
import { toMax as g, castFeeEstimation as T, unitToFeeTokenAddress as A, estimatedFeeToMaxFeeTotal as E, estimatedFeesToTotal as v } from "./utils.js";
|
|
6
|
-
import { ETH_TOKEN_ADDRESS as h, STRK_TOKEN_ADDRESS as I } from "../../chains/starknet/constants.js";
|
|
7
6
|
import { isEqualAddress as l } from "../../chains/starknet/address.js";
|
|
7
|
+
import { ETH_TOKEN_ADDRESS as h, STRK_TOKEN_ADDRESS as I } from "../../chains/starknet/constants.js";
|
|
8
8
|
const O = (t) => {
|
|
9
9
|
const { transactions: e } = t;
|
|
10
10
|
if (!e)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("starknet"),r=require("../chains/starknet/address.cjs"),o=require("../chains/starknet/constants.cjs"),s=require("./txv3.cjs");function T(e){return r.isEqualAddress(e,o.ETH_TOKEN_ADDRESS)?t.constants.TRANSACTION_VERSION.V1:t.constants.TRANSACTION_VERSION.V3}function c(e){return r.isEqualAddress(e,o.ETH_TOKEN_ADDRESS)?t.constants.TRANSACTION_VERSION.F1:t.constants.TRANSACTION_VERSION.F3}function N(e,n){return t.isSierra(n.contract)?r.isEqualAddress(e,o.ETH_TOKEN_ADDRESS)?t.constants.TRANSACTION_VERSION.V2:t.constants.TRANSACTION_VERSION.V3:t.constants.TRANSACTION_VERSION.V1}const S=({classHash:e})=>e&&!s.classHashSupportsTxV3(e)?t.constants.TRANSACTION_VERSION.V1:t.constants.TRANSACTION_VERSION.V3,a=({classHash:e},n)=>t.isSierra(n.contract)?e&&!s.classHashSupportsTxV3(e)?t.constants.TRANSACTION_VERSION.V2:t.constants.TRANSACTION_VERSION.V3:t.constants.TRANSACTION_VERSION.V1;exports.getAccountTxVersion=S;exports.getSimulationTxVersionFromFeeToken=c;exports.getTxVersionForDeclareContract=a;exports.getTxVersionFromFeeToken=T;exports.getTxVersionFromFeeTokenForDeclareContract=N;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { constants as r, isSierra as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { constants as r, isSierra as e } from "starknet";
|
|
2
|
+
import { isEqualAddress as o } from "../chains/starknet/address.js";
|
|
3
|
+
import { ETH_TOKEN_ADDRESS as T } from "../chains/starknet/constants.js";
|
|
4
|
+
import { classHashSupportsTxV3 as n } from "./txv3.js";
|
|
5
|
+
function R(N) {
|
|
6
|
+
return o(N, T) ? r.TRANSACTION_VERSION.V1 : r.TRANSACTION_VERSION.V3;
|
|
7
7
|
}
|
|
8
|
-
function
|
|
9
|
-
return
|
|
8
|
+
function I(N) {
|
|
9
|
+
return o(N, T) ? r.TRANSACTION_VERSION.F1 : r.TRANSACTION_VERSION.F3;
|
|
10
10
|
}
|
|
11
|
-
function
|
|
12
|
-
return
|
|
11
|
+
function i(N, t) {
|
|
12
|
+
return e(t.contract) ? o(N, T) ? r.TRANSACTION_VERSION.V2 : r.TRANSACTION_VERSION.V3 : r.TRANSACTION_VERSION.V1;
|
|
13
13
|
}
|
|
14
|
-
const
|
|
14
|
+
const E = ({ classHash: N }) => N && !n(N) ? r.TRANSACTION_VERSION.V1 : r.TRANSACTION_VERSION.V3, c = ({ classHash: N }, t) => e(t.contract) ? N && !n(N) ? r.TRANSACTION_VERSION.V2 : r.TRANSACTION_VERSION.V3 : r.TRANSACTION_VERSION.V1;
|
|
15
15
|
export {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
E as getAccountTxVersion,
|
|
17
|
+
I as getSimulationTxVersionFromFeeToken,
|
|
18
|
+
c as getTxVersionForDeclareContract,
|
|
19
|
+
R as getTxVersionFromFeeToken,
|
|
20
|
+
i as getTxVersionFromFeeTokenForDeclareContract
|
|
21
21
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("zod"),o=t.z.object({tokenType:t.z.string(),tokenAddress:t.z.string(),tokenAmount:t.z.string()}),n=t.z.object({type:t.z.enum(["lootbox"]),status:t.z.enum(["notEligible","win","loss","disabled"]),prizes:t.z.array(o).nullable().optional()}),e=t.z.object({transactionState:t.z.enum(["submitted","rejected"]).optional(),transactionHash:t.z.string(),rejectReason:t.z.string().nullable().optional(),promotions:t.z.array(n).nullable().optional()});exports.transactionExecutionResponseSchema=e;exports.transactionPromotionPrizeSchema=o;exports.transactionPromotionSchema=n;
|