UNPKG

@metamask/account-watcher

Version:

Keep an eye on Ethereum accounts right in MetaMask

1 lines 478 kB
{"snapId":"npm:@metamask/account-watcher","manifest":{"version":"4.1.3","description":"Keep an eye on Ethereum addresses or ENS domains right in MetaMask","proposedName":"Account Watcher","repository":{"type":"git","url":"https://github.com/metamask/snap-watch-only.git"},"source":{"shasum":"lbMqjdUwRXm3jTu0E75leXL3Wl/sSL9RLahcerCJPHw=","location":{"npm":{"filePath":"dist/bundle.js","iconPath":"images/watcher-fox-eye.svg","packageName":"@metamask/account-watcher","registry":"https://registry.npmjs.org/"}}},"initialPermissions":{"snap_dialog":{},"endowment:keyring":{"allowedOrigins":["https://snaps.metamask.io"]},"endowment:rpc":{"allowedOrigins":["https://snaps.metamask.io"]},"snap_manageAccounts":{},"endowment:page-home":{},"snap_manageState":{},"endowment:ethereum-provider":{}},"platformVersion":"6.19.0","manifestVersion":"0.1"},"files":[{"path":"images/watcher-fox-eye.svg","value":"<svg version=\"1.1\" id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n\t width=\"100%\" viewBox=\"0 0 1024 1024\" enable-background=\"new 0 0 1024 1024\" xml:space=\"preserve\">\n<path fill=\"#F48320\" opacity=\"1.000000\" stroke=\"none\" \n\td=\"\nM1.000000,808.000000 \n\tC1.000000,541.977356 1.000000,275.954712 1.267370,9.191578 \n\tC5.780173,7.202375 10.069000,6.081650 14.256378,4.661746 \n\tC17.241562,3.649497 20.090347,2.234995 23.000000,1.000000 \n\tC23.444445,1.000000 23.888887,1.000000 24.849617,1.078521 \n\tC25.910603,1.104694 26.455301,1.052347 27.000000,1.000000 \n\tC87.689308,1.000000 148.378616,1.000000 209.452972,1.338681 \n\tC208.822403,3.388152 207.884964,5.151262 206.779633,6.801964 \n\tC186.321564,37.354450 165.834381,67.887444 145.371857,98.436951 \n\tC119.168259,137.557556 92.957733,176.673584 66.809624,215.831253 \n\tC62.387630,222.453323 58.264912,229.275223 54.157597,236.300262 \n\tC55.425724,237.828842 56.488300,239.113831 57.662003,240.287735 \n\tC151.383713,334.025421 245.111572,427.756897 338.868927,521.458923 \n\tC340.241394,522.830688 341.989777,523.826294 343.773865,525.327698 \n\tC367.573456,532.586487 391.151550,539.550476 414.752899,546.434753 \n\tC445.652008,555.447815 476.572906,564.386108 507.478119,573.378296 \n\tC542.048279,583.436646 576.609009,593.527283 611.178040,603.589294 \n\tC640.797058,612.210327 670.421997,620.810913 700.218628,629.724243 \n\tC700.906067,631.422791 701.619324,632.778320 701.901978,634.218445 \n\tC705.846802,654.315796 709.709595,674.429138 713.638123,694.529724 \n\tC720.857300,731.467102 728.083923,768.403015 735.348572,805.331543 \n\tC747.434814,866.770325 759.584473,928.196655 771.631226,989.643250 \n\tC773.934875,1001.393372 775.886169,1013.212646 778.000000,1025.000000 \n\tC727.977356,1025.000000 677.954773,1025.000000 627.387085,1024.666016 \n\tC625.752686,1023.124878 624.816589,1021.719421 623.550476,1020.740845 \n\tC608.668091,1009.237427 593.729553,997.806641 578.818787,986.339966 \n\tC531.184998,949.709045 483.555359,913.072693 435.926666,876.435181 \n\tC413.893219,859.486328 391.902679,842.481384 369.808716,825.611816 \n\tC364.418152,821.495850 358.697083,817.812744 352.766602,813.710571 \n\tC343.787598,813.010803 335.174957,812.260498 326.551392,812.102051 \n\tC300.757050,811.628357 274.958527,811.383728 249.161545,811.054443 \n\tC222.698441,810.716614 196.235214,810.388062 169.772125,810.048645 \n\tC144.308243,809.721985 118.844696,809.367554 93.380585,809.059814 \n\tC62.587288,808.687622 31.793549,808.351685 1.000000,808.000000 \nz\"/>\n<path fill=\"#F6851F\" opacity=\"1.000000\" stroke=\"none\" \n\td=\"\nM752.000000,1.000000 \n\tC842.974854,1.000000 933.949707,1.000000 1024.962280,1.000000 \n\tC1024.962280,342.213837 1024.962280,683.427673 1024.962280,1025.000000 \n\tC945.308777,1025.000000 865.617065,1025.000000 785.458740,1024.531372 \n\tC784.990112,849.986694 784.988464,675.910645 784.979797,501.834564 \n\tC784.979675,499.504059 785.011475,497.163635 784.822754,494.844574 \n\tC783.246826,475.478119 781.551636,456.121155 780.036194,436.750092 \n\tC778.870178,421.845490 778.010193,406.916931 776.837341,392.012939 \n\tC775.325928,372.808502 773.546753,353.625031 772.052185,334.419373 \n\tC770.583069,315.541229 769.356567,296.644196 767.908203,277.764313 \n\tC767.807983,276.458618 766.747803,275.226532 766.146729,273.575928 \n\tC766.420898,271.144806 766.682495,269.097992 766.956787,266.604858 \n\tC765.945435,246.917023 764.938538,227.674515 763.890930,208.434235 \n\tC763.249817,196.658966 762.548218,184.886963 761.870056,173.113724 \n\tC760.580688,150.730515 759.268799,128.348587 758.005188,105.963928 \n\tC757.256226,92.694771 756.628235,79.418716 755.863220,66.150528 \n\tC754.610840,44.431648 753.291260,22.716642 752.000000,1.000000 \nz\"/>\n<path fill=\"#E27726\" opacity=\"1.000000\" stroke=\"none\" \n\td=\"\nM751.531372,1.000000 \n\tC753.291260,22.716642 754.610840,44.431648 755.863220,66.150528 \n\tC756.628235,79.418716 757.256226,92.694771 758.005188,105.963928 \n\tC759.268799,128.348587 760.580688,150.730515 761.870056,173.113724 \n\tC762.548218,184.886963 763.249817,196.658966 763.890930,208.434235 \n\tC764.938538,227.674515 765.945435,246.917023 766.545166,266.547791 \n\tC764.316467,266.637482 762.520996,266.154083 760.706543,266.067352 \n\tC745.597656,265.344910 730.485657,264.687775 715.373840,264.026215 \n\tC700.096191,263.357361 684.817932,262.701599 669.539612,262.047913 \n\tC638.133972,260.704163 606.727905,259.367889 575.322266,258.024017 \n\tC560.043884,257.370239 544.766846,256.686127 529.487671,256.051727 \n\tC504.727753,255.023712 479.968445,253.976791 455.205383,253.029724 \n\tC435.432220,252.273514 415.653076,251.674454 395.878113,250.964142 \n\tC387.737732,250.671753 379.599182,250.312683 371.463409,249.911209 \n\tC345.553497,248.632614 319.646881,247.286392 293.735779,246.033127 \n\tC278.794128,245.310425 263.847443,244.687790 248.900909,244.071274 \n\tC223.641602,243.029404 198.379318,242.058807 173.120865,240.997482 \n\tC159.505386,240.425385 145.897919,239.661255 132.282059,239.099960 \n\tC106.191154,238.024460 80.096832,237.031830 54.003925,236.004807 \n\tC58.264912,229.275223 62.387630,222.453323 66.809624,215.831253 \n\tC92.957733,176.673584 119.168259,137.557556 145.371857,98.436951 \n\tC165.834381,67.887444 186.321564,37.354450 206.779633,6.801964 \n\tC207.884964,5.151262 208.822403,3.388152 209.919006,1.338681 \n\tC390.354218,1.000000 570.708435,1.000000 751.531372,1.000000 \nz\"/>\n<path fill=\"#CC6329\" opacity=\"1.000000\" stroke=\"none\" \n\td=\"\nM1.000000,808.468628 \n\tC31.793549,808.351685 62.587288,808.687622 93.380585,809.059814 \n\tC118.844696,809.367554 144.308243,809.721985 169.772125,810.048645 \n\tC196.235214,810.388062 222.698441,810.716614 249.161545,811.054443 \n\tC274.958527,811.383728 300.757050,811.628357 326.551392,812.102051 \n\tC335.174957,812.260498 343.787598,813.010803 352.718872,814.138000 \n\tC351.566711,826.657166 350.109009,838.529785 348.633484,850.400330 \n\tC345.764404,873.481506 342.891479,896.562256 340.008545,919.641724 \n\tC337.475555,939.919495 334.902679,960.192383 332.393066,980.473022 \n\tC330.557007,995.310608 328.795013,1010.157349 327.000000,1025.000000 \n\tC252.645767,1025.000000 178.291550,1025.000000 103.318298,1024.692627 \n\tC88.668358,1003.561279 74.614235,982.752808 60.612232,961.909302 \n\tC41.876354,934.018860 23.187817,906.096619 4.448768,878.208313 \n\tC3.441829,876.709717 2.156003,875.398438 0.999997,874.000000 \n\tC1.000000,852.312439 1.000000,830.624878 1.000000,808.468628 \nz\"/>\n<path fill=\"#E27726\" opacity=\"1.000000\" stroke=\"none\" \n\td=\"\nM766.134033,273.960205 \n\tC766.747803,275.226532 767.807983,276.458618 767.908203,277.764313 \n\tC769.356567,296.644196 770.583069,315.541229 772.052185,334.419373 \n\tC773.546753,353.625031 775.325928,372.808502 776.837341,392.012939 \n\tC778.010193,406.916931 778.870178,421.845490 780.036194,436.750092 \n\tC781.551636,456.121155 783.246826,475.478119 784.822754,494.844574 \n\tC785.011475,497.163635 784.979675,499.504059 784.979797,501.834564 \n\tC784.988464,675.910645 784.990112,849.986694 784.996094,1024.531372 \n\tC782.958313,1025.000000 780.916687,1025.000000 778.437500,1025.000000 \n\tC775.886169,1013.212646 773.934875,1001.393372 771.631226,989.643250 \n\tC759.584473,928.196655 747.434814,866.770325 735.348572,805.331543 \n\tC728.083923,768.403015 720.857300,731.467102 713.638123,694.529724 \n\tC709.709595,674.429138 705.846802,654.315796 701.901978,634.218445 \n\tC701.619324,632.778320 700.906067,631.422791 700.257080,629.324097 \n\tC700.075928,628.086487 700.030762,627.552673 700.278809,626.794678 \n\tC701.248718,624.560364 702.183472,622.597717 702.563538,620.533020 \n\tC708.017029,590.910156 713.411865,561.276428 718.789368,531.639648 \n\tC732.574585,455.664886 746.322327,379.683350 760.146545,303.715729 \n\tC761.957581,293.763580 764.129333,283.877075 766.134033,273.960205 \nz\"/>\n<path fill=\"#E27726\" opacity=\"1.000000\" stroke=\"none\" \n\td=\"\nM327.468658,1025.000000 \n\tC328.795013,1010.157349 330.557007,995.310608 332.393066,980.473022 \n\tC334.902679,960.192383 337.475555,939.919495 340.008545,919.641724 \n\tC342.891479,896.562256 345.764404,873.481506 348.633484,850.400330 \n\tC350.109009,838.529785 351.566711,826.657166 353.080261,814.358032 \n\tC358.697083,817.812744 364.418152,821.495850 369.808716,825.611816 \n\tC391.902679,842.481384 413.893219,859.486328 435.926666,876.435181 \n\tC483.555359,913.072693 531.184998,949.709045 578.818787,986.339966 \n\tC593.729553,997.806641 608.668091,1009.237427 623.550476,1020.740845 \n\tC624.816589,1021.719421 625.752686,1023.124878 626.921021,1024.666016 \n\tC527.312439,1025.000000 427.624878,1025.000000 327.468658,1025.000000 \nz\"/>\n<path fill=\"#E27726\" opacity=\"1.000000\" stroke=\"none\" \n\td=\"\nM0.999997,874.468628 \n\tC2.156003,875.398438 3.441829,876.709717 4.448768,878.208313 \n\tC23.187817,906.096619 41.876354,934.018860 60.612232,961.909302 \n\tC74.614235,982.752808 88.668358,1003.561279 102.849640,1024.692627 \n\tC69.058884,1025.000000 35.117767,1025.000000 1.000000,1025.000000 \n\tC1.000000,974.979248 1.000000,924.958252 0.999997,874.468628 \nz\"/>\n<path fill=\"#30353C\" opacity=\"1.000000\" stroke=\"none\" \n\td=\"\nM22.531218,1.000000 \n\tC20.090347,2.234995 17.241562,3.649497 14.256378,4.661746 \n\tC10.069000,6.081650 5.780173,7.202375 1.267370,8.725536 \n\tC1.000000,6.372888 1.000000,3.745775 1.000000,1.000000 \n\tC8.020491,1.000000 15.041463,1.000000 22.531218,1.000000 \nz\"/>\n<path fill=\"#30353C\" opacity=\"1.000000\" stroke=\"none\" \n\td=\"\nM26.666668,1.000000 \n\tC26.455301,1.052347 25.910603,1.104694 25.182953,1.078521 \n\tC25.444445,1.000000 25.888889,1.000000 26.666668,1.000000 \nz\"/>\n<path fill=\"#CC6329\" opacity=\"1.000000\" stroke=\"none\" \n\td=\"\nM766.146667,273.575928 \n\tC764.129333,283.877075 761.957581,293.763580 760.146545,303.715729 \n\tC746.322327,379.683350 732.574585,455.664886 718.789368,531.639648 \n\tC713.411865,561.276428 708.017029,590.910156 702.563538,620.533020 \n\tC702.183472,622.597717 701.248718,624.560364 700.013672,626.566406 \n\tC665.286377,554.975647 631.117249,483.388855 596.783142,411.456238 \n\tC594.540100,412.389313 592.866577,413.037079 591.232422,413.772278 \n\tC533.579102,439.709778 475.937836,465.674011 418.275574,491.591492 \n\tC393.393127,502.775391 368.468292,513.865051 343.562744,524.997437 \n\tC341.989777,523.826294 340.241394,522.830688 338.868927,521.458923 \n\tC245.111572,427.756897 151.383713,334.025421 57.662003,240.287735 \n\tC56.488300,239.113831 55.425724,237.828842 54.157597,236.300262 \n\tC80.096832,237.031830 106.191154,238.024460 132.282059,239.099960 \n\tC145.897919,239.661255 159.505386,240.425385 173.120865,240.997482 \n\tC198.379318,242.058807 223.641602,243.029404 248.900909,244.071274 \n\tC263.847443,244.687790 278.794128,245.310425 293.735779,246.033127 \n\tC319.646881,247.286392 345.553497,248.632614 371.463409,249.911209 \n\tC379.599182,250.312683 387.737732,250.671753 395.878113,250.964142 \n\tC415.653076,251.674454 435.432220,252.273514 455.205383,253.029724 \n\tC479.968445,253.976791 504.727753,255.023712 529.487671,256.051727 \n\tC544.766846,256.686127 560.043884,257.370239 575.322266,258.024017 \n\tC606.727905,259.367889 638.133972,260.704163 669.539612,262.047913 \n\tC684.817932,262.701599 700.096191,263.357361 715.373840,264.026215 \n\tC730.485657,264.687775 745.597656,265.344910 760.706543,266.067352 \n\tC762.520996,266.154083 764.316467,266.637482 766.532410,266.994080 \n\tC766.682495,269.097992 766.420898,271.144806 766.146667,273.575928 \nz\"/>\n<path fill=\"#30353C\" opacity=\"1.000000\" stroke=\"none\" \n\td=\"\nM343.773865,525.327759 \n\tC368.468292,513.865051 393.393127,502.775391 418.275574,491.591492 \n\tC475.937836,465.674011 533.579102,439.709778 591.232422,413.772278 \n\tC592.866577,413.037079 594.540100,412.389313 596.783142,411.456238 \n\tC631.117249,483.388855 665.286377,554.975647 699.720520,626.790649 \n\tC700.030762,627.552673 700.075928,628.086487 700.082703,629.020386 \n\tC670.421997,620.810913 640.797058,612.210327 611.178040,603.589294 \n\tC576.609009,593.527283 542.048279,583.436646 507.478119,573.378296 \n\tC476.572906,564.386108 445.652008,555.447815 414.752899,546.434753 \n\tC391.151550,539.550476 367.573456,532.586487 343.773865,525.327759 \nz\"/>\n</svg>"},{"path":"dist/bundle.js","value":"(()=>{var t={9034:(t,e,r)=>{var n;!function(){\"use strict\";var i=\"input is invalid type\",o=\"object\"==typeof window,s=o?window:{};s.JS_SHA3_NO_WINDOW&&(o=!1);var a=!o&&\"object\"==typeof self;!s.JS_SHA3_NO_NODE_JS&&\"object\"==typeof process&&process.versions&&process.versions.node?s=r.g:a&&(s=self);var u=!s.JS_SHA3_NO_COMMON_JS&&t.exports,c=r.amdO,h=!s.JS_SHA3_NO_ARRAY_BUFFER&&\"undefined\"!=typeof ArrayBuffer,f=\"0123456789abcdef\".split(\"\"),l=[4,1024,262144,67108864],d=[0,8,16,24],p=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],g=[224,256,384,512],m=[128,256],y=[\"hex\",\"buffer\",\"arrayBuffer\",\"array\",\"digest\"],v={128:168,256:136};!s.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(t){return\"[object Array]\"===Object.prototype.toString.call(t)}),!h||!s.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(t){return\"object\"==typeof t&&t.buffer&&t.buffer.constructor===ArrayBuffer});for(var w=function(t,e,r){return function(n){return new P(t,e,t).update(n)[r]()}},b=function(t,e,r){return function(n,i){return new P(t,e,i).update(n)[r]()}},A=function(t,e,r){return function(e,n,i,o){return _[\"cshake\"+t].update(e,n,i,o)[r]()}},E=function(t,e,r){return function(e,n,i,o){return _[\"kmac\"+t].update(e,n,i,o)[r]()}},S=function(t,e,r,n){for(var i=0;i<y.length;++i){var o=y[i];t[o]=e(r,n,o)}return t},I=function(t,e){var r=w(t,e,\"hex\");return r.create=function(){return new P(t,e,t)},r.update=function(t){return r.create().update(t)},S(r,w,t,e)},R=[{name:\"keccak\",padding:[1,256,65536,16777216],bits:g,createMethod:I},{name:\"sha3\",padding:[6,1536,393216,100663296],bits:g,createMethod:I},{name:\"shake\",padding:[31,7936,2031616,520093696],bits:m,createMethod:function(t,e){var r=b(t,e,\"hex\");return r.create=function(r){return new P(t,e,r)},r.update=function(t,e){return r.create(e).update(t)},S(r,b,t,e)}},{name:\"cshake\",padding:l,bits:m,createMethod:function(t,e){var r=v[t],n=A(t,0,\"hex\");return n.create=function(n,i,o){return i||o?new P(t,e,n).bytepad([i,o],r):_[\"shake\"+t].create(n)},n.update=function(t,e,r,i){return n.create(e,r,i).update(t)},S(n,A,t,e)}},{name:\"kmac\",padding:l,bits:m,createMethod:function(t,e){var r=v[t],n=E(t,0,\"hex\");return n.create=function(n,i,o){return new T(t,e,i).bytepad([\"KMAC\",o],r).bytepad([n],r)},n.update=function(t,e,r,i){return n.create(t,r,i).update(e)},S(n,E,t,e)}}],_={},x=[],M=0;M<R.length;++M)for(var N=R[M],k=N.bits,C=0;C<k.length;++C){var O=N.name+\"_\"+k[C];if(x.push(O),_[O]=N.createMethod(k[C],N.padding),\"sha3\"!==N.name){var B=N.name+k[C];x.push(B),_[B]=_[O]}}function P(t,e,r){this.blocks=[],this.s=[],this.padding=e,this.outputBits=r,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(t<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function T(t,e,r){P.call(this,t,e,r)}P.prototype.update=function(t){if(this.finalized)throw new Error(\"finalize already called\");var e,r=typeof t;if(\"string\"!==r){if(\"object\"!==r)throw new Error(i);if(null===t)throw new Error(i);if(h&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||h&&ArrayBuffer.isView(t)))throw new Error(i);e=!0}for(var n,o,s=this.blocks,a=this.byteCount,u=t.length,c=this.blockCount,f=0,l=this.s;f<u;){if(this.reset)for(this.reset=!1,s[0]=this.block,n=1;n<c+1;++n)s[n]=0;if(e)for(n=this.start;f<u&&n<a;++f)s[n>>2]|=t[f]<<d[3&n++];else for(n=this.start;f<u&&n<a;++f)(o=t.charCodeAt(f))<128?s[n>>2]|=o<<d[3&n++]:o<2048?(s[n>>2]|=(192|o>>6)<<d[3&n++],s[n>>2]|=(128|63&o)<<d[3&n++]):o<55296||o>=57344?(s[n>>2]|=(224|o>>12)<<d[3&n++],s[n>>2]|=(128|o>>6&63)<<d[3&n++],s[n>>2]|=(128|63&o)<<d[3&n++]):(o=65536+((1023&o)<<10|1023&t.charCodeAt(++f)),s[n>>2]|=(240|o>>18)<<d[3&n++],s[n>>2]|=(128|o>>12&63)<<d[3&n++],s[n>>2]|=(128|o>>6&63)<<d[3&n++],s[n>>2]|=(128|63&o)<<d[3&n++]);if(this.lastByteIndex=n,n>=a){for(this.start=n-a,this.block=s[c],n=0;n<c;++n)l[n]^=s[n];L(l),this.reset=!0}else this.start=n}return this},P.prototype.encode=function(t,e){var r=255&t,n=1,i=[r];for(r=255&(t>>=8);r>0;)i.unshift(r),r=255&(t>>=8),++n;return e?i.push(n):i.unshift(n),this.update(i),i.length},P.prototype.encodeString=function(t){var e,r=typeof t;if(\"string\"!==r){if(\"object\"!==r)throw new Error(i);if(null===t)throw new Error(i);if(h&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||h&&ArrayBuffer.isView(t)))throw new Error(i);e=!0}var n=0,o=t.length;if(e)n=o;else for(var s=0;s<t.length;++s){var a=t.charCodeAt(s);a<128?n+=1:a<2048?n+=2:a<55296||a>=57344?n+=3:(a=65536+((1023&a)<<10|1023&t.charCodeAt(++s)),n+=4)}return n+=this.encode(8*n),this.update(t),n},P.prototype.bytepad=function(t,e){for(var r=this.encode(e),n=0;n<t.length;++n)r+=this.encodeString(t[n]);var i=e-r%e,o=[];return o.length=i,this.update(o),this},P.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,e=this.lastByteIndex,r=this.blockCount,n=this.s;if(t[e>>2]|=this.padding[3&e],this.lastByteIndex===this.byteCount)for(t[0]=t[r],e=1;e<r+1;++e)t[e]=0;for(t[r-1]|=2147483648,e=0;e<r;++e)n[e]^=t[e];L(n)}},P.prototype.toString=P.prototype.hex=function(){this.finalize();for(var t,e=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,s=0,a=\"\";s<n;){for(o=0;o<e&&s<n;++o,++s)t=r[o],a+=f[t>>4&15]+f[15&t]+f[t>>12&15]+f[t>>8&15]+f[t>>20&15]+f[t>>16&15]+f[t>>28&15]+f[t>>24&15];s%e==0&&(L(r),o=0)}return i&&(t=r[o],a+=f[t>>4&15]+f[15&t],i>1&&(a+=f[t>>12&15]+f[t>>8&15]),i>2&&(a+=f[t>>20&15]+f[t>>16&15])),a},P.prototype.arrayBuffer=function(){this.finalize();var t,e=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,s=0,a=this.outputBits>>3;t=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(a);for(var u=new Uint32Array(t);s<n;){for(o=0;o<e&&s<n;++o,++s)u[s]=r[o];s%e==0&&L(r)}return i&&(u[o]=r[o],t=t.slice(0,a)),t},P.prototype.buffer=P.prototype.arrayBuffer,P.prototype.digest=P.prototype.array=function(){this.finalize();for(var t,e,r=this.blockCount,n=this.s,i=this.outputBlocks,o=this.extraBytes,s=0,a=0,u=[];a<i;){for(s=0;s<r&&a<i;++s,++a)t=a<<2,e=n[s],u[t]=255&e,u[t+1]=e>>8&255,u[t+2]=e>>16&255,u[t+3]=e>>24&255;a%r==0&&L(n)}return o&&(t=a<<2,e=n[s],u[t]=255&e,o>1&&(u[t+1]=e>>8&255),o>2&&(u[t+2]=e>>16&255)),u},T.prototype=new P,T.prototype.finalize=function(){return this.encode(this.outputBits,!0),P.prototype.finalize.call(this)};var L=function(t){var e,r,n,i,o,s,a,u,c,h,f,l,d,g,m,y,v,w,b,A,E,S,I,R,_,x,M,N,k,C,O,B,P,T,L,U,j,F,D,q,$,G,H,z,K,J,V,X,W,Q,Y,Z,tt,et,rt,nt,it,ot,st,at,ut,ct,ht;for(n=0;n<48;n+=2)i=t[0]^t[10]^t[20]^t[30]^t[40],o=t[1]^t[11]^t[21]^t[31]^t[41],s=t[2]^t[12]^t[22]^t[32]^t[42],a=t[3]^t[13]^t[23]^t[33]^t[43],u=t[4]^t[14]^t[24]^t[34]^t[44],c=t[5]^t[15]^t[25]^t[35]^t[45],h=t[6]^t[16]^t[26]^t[36]^t[46],f=t[7]^t[17]^t[27]^t[37]^t[47],e=(l=t[8]^t[18]^t[28]^t[38]^t[48])^(s<<1|a>>>31),r=(d=t[9]^t[19]^t[29]^t[39]^t[49])^(a<<1|s>>>31),t[0]^=e,t[1]^=r,t[10]^=e,t[11]^=r,t[20]^=e,t[21]^=r,t[30]^=e,t[31]^=r,t[40]^=e,t[41]^=r,e=i^(u<<1|c>>>31),r=o^(c<<1|u>>>31),t[2]^=e,t[3]^=r,t[12]^=e,t[13]^=r,t[22]^=e,t[23]^=r,t[32]^=e,t[33]^=r,t[42]^=e,t[43]^=r,e=s^(h<<1|f>>>31),r=a^(f<<1|h>>>31),t[4]^=e,t[5]^=r,t[14]^=e,t[15]^=r,t[24]^=e,t[25]^=r,t[34]^=e,t[35]^=r,t[44]^=e,t[45]^=r,e=u^(l<<1|d>>>31),r=c^(d<<1|l>>>31),t[6]^=e,t[7]^=r,t[16]^=e,t[17]^=r,t[26]^=e,t[27]^=r,t[36]^=e,t[37]^=r,t[46]^=e,t[47]^=r,e=h^(i<<1|o>>>31),r=f^(o<<1|i>>>31),t[8]^=e,t[9]^=r,t[18]^=e,t[19]^=r,t[28]^=e,t[29]^=r,t[38]^=e,t[39]^=r,t[48]^=e,t[49]^=r,g=t[0],m=t[1],J=t[11]<<4|t[10]>>>28,V=t[10]<<4|t[11]>>>28,N=t[20]<<3|t[21]>>>29,k=t[21]<<3|t[20]>>>29,at=t[31]<<9|t[30]>>>23,ut=t[30]<<9|t[31]>>>23,G=t[40]<<18|t[41]>>>14,H=t[41]<<18|t[40]>>>14,T=t[2]<<1|t[3]>>>31,L=t[3]<<1|t[2]>>>31,y=t[13]<<12|t[12]>>>20,v=t[12]<<12|t[13]>>>20,X=t[22]<<10|t[23]>>>22,W=t[23]<<10|t[22]>>>22,C=t[33]<<13|t[32]>>>19,O=t[32]<<13|t[33]>>>19,ct=t[42]<<2|t[43]>>>30,ht=t[43]<<2|t[42]>>>30,et=t[5]<<30|t[4]>>>2,rt=t[4]<<30|t[5]>>>2,U=t[14]<<6|t[15]>>>26,j=t[15]<<6|t[14]>>>26,w=t[25]<<11|t[24]>>>21,b=t[24]<<11|t[25]>>>21,Q=t[34]<<15|t[35]>>>17,Y=t[35]<<15|t[34]>>>17,B=t[45]<<29|t[44]>>>3,P=t[44]<<29|t[45]>>>3,R=t[6]<<28|t[7]>>>4,_=t[7]<<28|t[6]>>>4,nt=t[17]<<23|t[16]>>>9,it=t[16]<<23|t[17]>>>9,F=t[26]<<25|t[27]>>>7,D=t[27]<<25|t[26]>>>7,A=t[36]<<21|t[37]>>>11,E=t[37]<<21|t[36]>>>11,Z=t[47]<<24|t[46]>>>8,tt=t[46]<<24|t[47]>>>8,z=t[8]<<27|t[9]>>>5,K=t[9]<<27|t[8]>>>5,x=t[18]<<20|t[19]>>>12,M=t[19]<<20|t[18]>>>12,ot=t[29]<<7|t[28]>>>25,st=t[28]<<7|t[29]>>>25,q=t[38]<<8|t[39]>>>24,$=t[39]<<8|t[38]>>>24,S=t[48]<<14|t[49]>>>18,I=t[49]<<14|t[48]>>>18,t[0]=g^~y&w,t[1]=m^~v&b,t[10]=R^~x&N,t[11]=_^~M&k,t[20]=T^~U&F,t[21]=L^~j&D,t[30]=z^~J&X,t[31]=K^~V&W,t[40]=et^~nt&ot,t[41]=rt^~it&st,t[2]=y^~w&A,t[3]=v^~b&E,t[12]=x^~N&C,t[13]=M^~k&O,t[22]=U^~F&q,t[23]=j^~D&$,t[32]=J^~X&Q,t[33]=V^~W&Y,t[42]=nt^~ot&at,t[43]=it^~st&ut,t[4]=w^~A&S,t[5]=b^~E&I,t[14]=N^~C&B,t[15]=k^~O&P,t[24]=F^~q&G,t[25]=D^~$&H,t[34]=X^~Q&Z,t[35]=W^~Y&tt,t[44]=ot^~at&ct,t[45]=st^~ut&ht,t[6]=A^~S&g,t[7]=E^~I&m,t[16]=C^~B&R,t[17]=O^~P&_,t[26]=q^~G&T,t[27]=$^~H&L,t[36]=Q^~Z&z,t[37]=Y^~tt&K,t[46]=at^~ct&et,t[47]=ut^~ht&rt,t[8]=S^~g&y,t[9]=I^~m&v,t[18]=B^~R&x,t[19]=P^~_&M,t[28]=G^~T&U,t[29]=H^~L&j,t[38]=Z^~z&J,t[39]=tt^~K&V,t[48]=ct^~et&nt,t[49]=ht^~rt&it,t[0]^=p[n],t[1]^=p[n+1]};if(u)t.exports=_;else{for(M=0;M<x.length;++M)s[x[M]]=_[x[M]];c&&(void 0===(n=function(){return _}.call(e,r,e,t))||(t.exports=n))}}()},5978:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.JsonRpcRequestStruct=void 0;const n=r(5620),i=r(953),o=r(4520);e.JsonRpcRequestStruct=(0,o.object)({jsonrpc:(0,n.literal)(\"2.0\"),id:(0,n.union)([(0,n.string)(),(0,n.number)(),(0,n.literal)(null)]),method:(0,n.string)(),params:(0,o.exactOptional)((0,n.union)([(0,n.array)(i.JsonStruct),(0,n.record)((0,n.string)(),i.JsonStruct)]))})},1236:function(t,e,r){\"use strict\";var n,i,o,s=this&&this.__classPrivateFieldSet||function(t,e,r,n,i){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!i)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!i:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?i.call(t,r):i?i.value=r:e.set(t,r),r},a=this&&this.__classPrivateFieldGet||function(t,e,r,n){if(\"a\"===r&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===r?n:\"a\"===r?n.call(t):n?n.value:e.get(t)};Object.defineProperty(e,\"__esModule\",{value:!0}),e.KeyringClient=void 0;const u=r(5620),c=r(2831),h=r(2582),f=r(1925),l=r(4520);e.KeyringClient=class{constructor(t){n.add(this),i.set(this,void 0),s(this,i,t,\"f\")}async listAccounts(){return(0,l.strictMask)(await a(this,n,\"m\",o).call(this,{method:f.KeyringRpcMethod.ListAccounts}),h.ListAccountsResponseStruct)}async getAccount(t){return(0,l.strictMask)(await a(this,n,\"m\",o).call(this,{method:f.KeyringRpcMethod.GetAccount,params:{id:t}}),h.GetAccountResponseStruct)}async getAccountBalances(t,e){return(0,l.strictMask)(await a(this,n,\"m\",o).call(this,{method:f.KeyringRpcMethod.GetAccountBalances,params:{id:t,assets:e}}),h.GetAccountBalancesResponseStruct)}async createAccount(t={}){return(0,l.strictMask)(await a(this,n,\"m\",o).call(this,{method:f.KeyringRpcMethod.CreateAccount,params:{options:t}}),h.CreateAccountResponseStruct)}async filterAccountChains(t,e){return(0,l.strictMask)(await a(this,n,\"m\",o).call(this,{method:f.KeyringRpcMethod.FilterAccountChains,params:{id:t,chains:e}}),h.FilterAccountChainsResponseStruct)}async updateAccount(t){(0,u.assert)(await a(this,n,\"m\",o).call(this,{method:f.KeyringRpcMethod.UpdateAccount,params:{account:t}}),h.UpdateAccountResponseStruct)}async deleteAccount(t){(0,u.assert)(await a(this,n,\"m\",o).call(this,{method:f.KeyringRpcMethod.DeleteAccount,params:{id:t}}),h.DeleteAccountResponseStruct)}async exportAccount(t){return(0,l.strictMask)(await a(this,n,\"m\",o).call(this,{method:f.KeyringRpcMethod.ExportAccount,params:{id:t}}),h.ExportAccountResponseStruct)}async listRequests(){return(0,l.strictMask)(await a(this,n,\"m\",o).call(this,{method:f.KeyringRpcMethod.ListRequests}),h.ListRequestsResponseStruct)}async getRequest(t){return(0,l.strictMask)(await a(this,n,\"m\",o).call(this,{method:f.KeyringRpcMethod.GetRequest,params:{id:t}}),h.GetRequestResponseStruct)}async submitRequest(t){return(0,l.strictMask)(await a(this,n,\"m\",o).call(this,{method:f.KeyringRpcMethod.SubmitRequest,params:t}),h.SubmitRequestResponseStruct)}async approveRequest(t,e={}){(0,u.assert)(await a(this,n,\"m\",o).call(this,{method:f.KeyringRpcMethod.ApproveRequest,params:{id:t,data:e}}),h.ApproveRequestResponseStruct)}async rejectRequest(t){(0,u.assert)(await a(this,n,\"m\",o).call(this,{method:f.KeyringRpcMethod.RejectRequest,params:{id:t}}),h.RejectRequestResponseStruct)}},i=new WeakMap,n=new WeakSet,o=async function(t){return a(this,i,\"f\").send({jsonrpc:\"2.0\",id:(0,c.v4)(),...t})}},4071:function(t,e,r){\"use strict\";var n,i,o=this&&this.__classPrivateFieldSet||function(t,e,r,n,i){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!i)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!i:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?i.call(t,r):i?i.value=r:e.set(t,r),r},s=this&&this.__classPrivateFieldGet||function(t,e,r,n){if(\"a\"===r&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===r?n:\"a\"===r?n.call(t):n?n.value:e.get(t)};Object.defineProperty(e,\"__esModule\",{value:!0}),e.KeyringSnapRpcClient=e.SnapRpcSender=void 0;const a=r(1236);class u{constructor(t,e){n.set(this,void 0),i.set(this,void 0),o(this,n,t,\"f\"),o(this,i,e,\"f\")}async send(t){return s(this,i,\"f\").request({method:\"wallet_invokeKeyring\",params:{snapId:s(this,n,\"f\"),request:t}})}}e.SnapRpcSender=u,n=new WeakMap,i=new WeakMap;class c extends a.KeyringClient{constructor(t,e){super(new u(t,e))}}e.KeyringSnapRpcClient=c},1950:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.KeyringAccountStruct=e.BtcAccountType=e.EthAccountType=void 0;const n=r(5620),i=r(953),o=r(4520),s=r(4199);var a,u;!function(t){t.Eoa=\"eip155:eoa\",t.Erc4337=\"eip155:erc4337\"}(a=e.EthAccountType||(e.EthAccountType={})),function(t){t.P2wpkh=\"bip122:p2wpkh\"}(u=e.BtcAccountType||(e.BtcAccountType={})),e.KeyringAccountStruct=(0,o.object)({id:s.UuidStruct,type:(0,n.enums)([`${a.Eoa}`,`${a.Erc4337}`,`${u.P2wpkh}`]),address:(0,n.string)(),options:(0,n.record)((0,n.string)(),i.JsonStruct),methods:(0,n.array)((0,n.string)())})},3433:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.BalanceStruct=void 0;const n=r(5620),i=r(4520),o=r(4199);e.BalanceStruct=(0,i.object)({amount:o.StringNumberStruct,unit:(0,n.string)()})},8588:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.isCaipAssetId=e.isCaipAssetType=e.CaipAssetIdStruct=e.CaipAssetTypeStruct=void 0;const n=r(5620),i=r(4520);e.CaipAssetTypeStruct=(0,i.definePattern)(\"CaipAssetType\",/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32}))\\/(?<assetNamespace>[-a-z0-9]{3,8}):(?<assetReference>[-.%a-zA-Z0-9]{1,128})$/u),e.CaipAssetIdStruct=(0,i.definePattern)(\"CaipAssetId\",/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32}))\\/(?<assetNamespace>[-a-z0-9]{3,8}):(?<assetReference>[-.%a-zA-Z0-9]{1,128})\\/(?<tokenId>[-.%a-zA-Z0-9]{1,78})$/u),e.isCaipAssetType=function(t){return(0,n.is)(t,e.CaipAssetTypeStruct)},e.isCaipAssetId=function(t){return(0,n.is)(t,e.CaipAssetIdStruct)}},4015:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.KeyringAccountDataStruct=void 0;const n=r(5620),i=r(953);e.KeyringAccountDataStruct=(0,n.record)((0,n.string)(),i.JsonStruct)},5417:function(t,e,r){\"use strict\";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!(\"get\"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)\"default\"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(r(1950),e),i(r(3433),e),i(r(8588),e),i(r(4015),e),i(r(5444),e),i(r(7884),e),i(r(6142),e)},5444:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0})},7884:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.KeyringRequestStruct=void 0;const n=r(5620),i=r(953),o=r(4520),s=r(4199);e.KeyringRequestStruct=(0,o.object)({id:s.UuidStruct,scope:(0,n.string)(),account:s.UuidStruct,request:(0,o.object)({method:(0,n.string)(),params:(0,o.exactOptional)((0,n.union)([(0,n.array)(i.JsonStruct),(0,n.record)((0,n.string)(),i.JsonStruct)]))})})},6142:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.KeyringResponseStruct=void 0;const n=r(5620),i=r(953),o=r(4520);e.KeyringResponseStruct=(0,n.union)([(0,o.object)({pending:(0,n.literal)(!0),redirect:(0,o.exactOptional)((0,o.object)({message:(0,o.exactOptional)((0,n.string)()),url:(0,o.exactOptional)((0,n.string)())}))}),(0,o.object)({pending:(0,n.literal)(!1),result:i.JsonStruct})])},5238:function(t,e,r){\"use strict\";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!(\"get\"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)\"default\"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(r(5787),e)},5787:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.BtcP2wpkhAccountStruct=e.BtcMethod=e.BtcP2wpkhAddressStruct=void 0;const n=r(5620),i=r(115),o=r(5417),s=r(4520);var a;e.BtcP2wpkhAddressStruct=(0,n.refine)((0,n.string)(),\"BtcP2wpkhAddressStruct\",(t=>{try{i.bech32.decode(t)}catch(t){return new Error(`Could not decode P2WPKH address: ${t.message}`)}return!0})),function(t){t.SendMany=\"btc_sendmany\"}(a=e.BtcMethod||(e.BtcMethod={})),e.BtcP2wpkhAccountStruct=(0,s.object)({...o.KeyringAccountStruct.schema,address:e.BtcP2wpkhAddressStruct,type:(0,n.literal)(`${o.BtcAccountType.P2wpkh}`),methods:(0,n.array)((0,n.enums)([`${a.SendMany}`]))})},1360:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0})},322:function(t,e,r){\"use strict\";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!(\"get\"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)\"default\"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(r(4943),e)},4943:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.EthUserOperationPatchStruct=e.EthBaseUserOperationStruct=e.EthBaseTransactionStruct=e.EthUserOperationStruct=void 0;const n=r(4520),i=r(4199),o=r(6879);e.EthUserOperationStruct=(0,n.object)({sender:o.EthAddressStruct,nonce:o.EthUint256Struct,initCode:o.EthBytesStruct,callData:o.EthBytesStruct,callGasLimit:o.EthUint256Struct,verificationGasLimit:o.EthUint256Struct,preVerificationGas:o.EthUint256Struct,maxFeePerGas:o.EthUint256Struct,maxPriorityFeePerGas:o.EthUint256Struct,paymasterAndData:o.EthBytesStruct,signature:o.EthBytesStruct}),e.EthBaseTransactionStruct=(0,n.object)({to:o.EthAddressStruct,value:o.EthUint256Struct,data:o.EthBytesStruct}),e.EthBaseUserOperationStruct=(0,n.object)({nonce:o.EthUint256Struct,initCode:o.EthBytesStruct,callData:o.EthBytesStruct,gasLimits:(0,n.exactOptional)((0,n.object)({callGasLimit:o.EthUint256Struct,verificationGasLimit:o.EthUint256Struct,preVerificationGas:o.EthUint256Struct})),dummyPaymasterAndData:o.EthBytesStruct,dummySignature:o.EthBytesStruct,bundlerUrl:i.UrlStruct}),e.EthUserOperationPatchStruct=(0,n.object)({paymasterAndData:o.EthBytesStruct,callGasLimit:(0,n.exactOptional)(o.EthUint256Struct),verificationGasLimit:(0,n.exactOptional)(o.EthUint256Struct),preVerificationGas:(0,n.exactOptional)(o.EthUint256Struct)})},6034:function(t,e,r){\"use strict\";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!(\"get\"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)\"default\"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(r(322),e),i(r(6879),e),i(r(1267),e)},6879:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.EthErc4337AccountStruct=e.EthEoaAccountStruct=e.EthMethod=e.EthUint256Struct=e.EthAddressStruct=e.EthBytesStruct=void 0;const n=r(5620),i=r(5417),o=r(4520);var s;e.EthBytesStruct=(0,o.definePattern)(\"EthBytes\",/^0x[0-9a-f]*$/iu),e.EthAddressStruct=(0,o.definePattern)(\"EthAddress\",/^0x[0-9a-f]{40}$/iu),e.EthUint256Struct=(0,o.definePattern)(\"EthUint256\",/^0x([1-9a-f][0-9a-f]*|0)$/iu),function(t){t.PersonalSign=\"personal_sign\",t.Sign=\"eth_sign\",t.SignTransaction=\"eth_signTransaction\",t.SignTypedDataV1=\"eth_signTypedData_v1\",t.SignTypedDataV3=\"eth_signTypedData_v3\",t.SignTypedDataV4=\"eth_signTypedData_v4\",t.PrepareUserOperation=\"eth_prepareUserOperation\",t.PatchUserOperation=\"eth_patchUserOperation\",t.SignUserOperation=\"eth_signUserOperation\"}(s=e.EthMethod||(e.EthMethod={})),e.EthEoaAccountStruct=(0,o.object)({...i.KeyringAccountStruct.schema,address:e.EthAddressStruct,type:(0,n.literal)(`${i.EthAccountType.Eoa}`),methods:(0,n.array)((0,n.enums)([`${s.PersonalSign}`,`${s.Sign}`,`${s.SignTransaction}`,`${s.SignTypedDataV1}`,`${s.SignTypedDataV3}`,`${s.SignTypedDataV4}`]))}),e.EthErc4337AccountStruct=(0,o.object)({...i.KeyringAccountStruct.schema,address:e.EthAddressStruct,type:(0,n.literal)(`${i.EthAccountType.Erc4337}`),methods:(0,n.array)((0,n.enums)([`${s.PersonalSign}`,`${s.Sign}`,`${s.SignTypedDataV1}`,`${s.SignTypedDataV3}`,`${s.SignTypedDataV4}`,`${s.PrepareUserOperation}`,`${s.PatchUserOperation}`,`${s.SignUserOperation}`]))})},1267:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.isEvmAccountType=void 0;const n=r(5417);e.isEvmAccountType=function(t){return t===n.EthAccountType.Eoa||t===n.EthAccountType.Erc4337}},4433:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.KeyringEvent=void 0,function(t){t.AccountCreated=\"notify:accountCreated\",t.AccountUpdated=\"notify:accountUpdated\",t.AccountDeleted=\"notify:accountDeleted\",t.RequestApproved=\"notify:requestApproved\",t.RequestRejected=\"notify:requestRejected\"}(e.KeyringEvent||(e.KeyringEvent={}))},7962:function(t,e,r){\"use strict\";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!(\"get\"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)\"default\"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(r(5417),e),i(r(5238),e),i(r(1360),e),i(r(6034),e),i(r(4433),e),i(r(7470),e),i(r(1236),e),i(r(4071),e),i(r(3060),e),i(r(5524),e),i(r(4520),e)},2582:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.RejectRequestResponseStruct=e.RejectRequestRequestStruct=e.ApproveRequestResponseStruct=e.ApproveRequestRequestStruct=e.SubmitRequestResponseStruct=e.SubmitRequestRequestStruct=e.GetRequestResponseStruct=e.GetRequestRequestStruct=e.ListRequestsResponseStruct=e.ListRequestsRequestStruct=e.ExportAccountResponseStruct=e.ExportAccountRequestStruct=e.DeleteAccountResponseStruct=e.DeleteAccountRequestStruct=e.UpdateAccountResponseStruct=e.UpdateAccountRequestStruct=e.FilterAccountChainsResponseStruct=e.FilterAccountChainsStruct=e.GetAccountBalancesResponseStruct=e.GetAccountBalancesRequestStruct=e.CreateAccountResponseStruct=e.CreateAccountRequestStruct=e.GetAccountResponseStruct=e.GetAccountRequestStruct=e.ListAccountsResponseStruct=e.ListAccountsRequestStruct=void 0;const n=r(5620),i=r(953),o=r(5417),s=r(4520),a=r(4199),u=r(1925),c={jsonrpc:(0,n.literal)(\"2.0\"),id:(0,n.union)([(0,n.string)(),(0,n.number)(),(0,n.literal)(null)])};e.ListAccountsRequestStruct=(0,s.object)({...c,method:(0,n.literal)(\"keyring_listAccounts\")}),e.ListAccountsResponseStruct=(0,n.array)(o.KeyringAccountStruct),e.GetAccountRequestStruct=(0,s.object)({...c,method:(0,n.literal)(\"keyring_getAccount\"),params:(0,s.object)({id:a.UuidStruct})}),e.GetAccountResponseStruct=o.KeyringAccountStruct,e.CreateAccountRequestStruct=(0,s.object)({...c,method:(0,n.literal)(\"keyring_createAccount\"),params:(0,s.object)({options:(0,n.record)((0,n.string)(),i.JsonStruct)})}),e.CreateAccountResponseStruct=o.KeyringAccountStruct,e.GetAccountBalancesRequestStruct=(0,s.object)({...c,method:(0,n.literal)(`${u.KeyringRpcMethod.GetAccountBalances}`),params:(0,s.object)({id:a.UuidStruct,assets:(0,n.array)(o.CaipAssetTypeStruct)})}),e.GetAccountBalancesResponseStruct=(0,n.record)(o.CaipAssetTypeStruct,o.BalanceStruct),e.FilterAccountChainsStruct=(0,s.object)({...c,method:(0,n.literal)(\"keyring_filterAccountChains\"),params:(0,s.object)({id:a.UuidStruct,chains:(0,n.array)((0,n.string)())})}),e.FilterAccountChainsResponseStruct=(0,n.array)((0,n.string)()),e.UpdateAccountRequestStruct=(0,s.object)({...c,method:(0,n.literal)(\"keyring_updateAccount\"),params:(0,s.object)({account:o.KeyringAccountStruct})}),e.UpdateAccountResponseStruct=(0,n.literal)(null),e.DeleteAccountRequestStruct=(0,s.object)({...c,method:(0,n.literal)(\"keyring_deleteAccount\"),params:(0,s.object)({id:a.UuidStruct})}),e.DeleteAccountResponseStruct=(0,n.literal)(null),e.ExportAccountRequestStruct=(0,s.object)({...c,method:(0,n.literal)(\"keyring_exportAccount\"),params:(0,s.object)({id:a.UuidStruct})}),e.ExportAccountResponseStruct=o.KeyringAccountDataStruct,e.ListRequestsRequestStruct=(0,s.object)({...c,method:(0,n.literal)(\"keyring_listRequests\")}),e.ListRequestsResponseStruct=(0,n.array)(o.KeyringRequestStruct),e.GetRequestRequestStruct=(0,s.object)({...c,method:(0,n.literal)(\"keyring_getRequest\"),params:(0,s.object)({id:a.UuidStruct})}),e.GetRequestResponseStruct=o.KeyringRequestStruct,e.SubmitRequestRequestStruct=(0,s.object)({...c,method:(0,n.literal)(\"keyring_submitRequest\"),params:o.KeyringRequestStruct}),e.SubmitRequestResponseStruct=o.KeyringResponseStruct,e.ApproveRequestRequestStruct=(0,s.object)({...c,method:(0,n.literal)(\"keyring_approveRequest\"),params:(0,s.object)({id:a.UuidStruct,data:(0,n.record)((0,n.string)(),i.JsonStruct)})}),e.ApproveRequestResponseStruct=(0,n.literal)(null),e.RejectRequestRequestStruct=(0,s.object)({...c,method:(0,n.literal)(\"keyring_rejectRequest\"),params:(0,s.object)({id:a.UuidStruct})}),e.RejectRequestResponseStruct=(0,n.literal)(null)},6796:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0})},222:function(t,e,r){\"use strict\";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!(\"get\"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)\"default\"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(r(6796),e)},3005:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.RequestRejectedEventStruct=e.RequestApprovedEventStruct=e.AccountDeletedEventStruct=e.AccountUpdatedEventStruct=e.AccountCreatedEventStruct=void 0;const n=r(5620),i=r(953),o=r(5417),s=r(4433),a=r(4520),u=r(4199);e.AccountCreatedEventStruct=(0,a.object)({method:(0,n.literal)(`${s.KeyringEvent.AccountCreated}`),params:(0,a.object)({account:o.KeyringAccountStruct,accountNameSuggestion:(0,a.exactOptional)((0,n.string)()),displayConfirmation:(0,a.exactOptional)((0,n.boolean)())})}),e.AccountUpdatedEventStruct=(0,a.object)({method:(0,n.literal)(`${s.KeyringEvent.AccountUpdated}`),params:(0,a.object)({account:o.KeyringAccountStruct})}),e.AccountDeletedEventStruct=(0,a.object)({method:(0,n.literal)(`${s.KeyringEvent.AccountDeleted}`),params:(0,a.object)({id:u.UuidStruct})}),e.RequestApprovedEventStruct=(0,a.object)({method:(0,n.literal)(`${s.KeyringEvent.RequestApproved}`),params:(0,a.object)({id:u.UuidStruct,result:i.JsonStruct})}),e.RequestRejectedEventStruct=(0,a.object)({method:(0,n.literal)(`${s.KeyringEvent.RequestRejected}`),params:(0,a.object)({id:u.UuidStruct})})},7470:function(t,e,r){\"use strict\";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!(\"get\"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)\"default\"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(r(2582),e),i(r(222),e),i(r(3005),e),i(r(1925),e),i(r(3699),e)},1925:(t,e)=>{\"use strict\";var r;Object.defineProperty(e,\"__esModule\",{value:!0}),e.isKeyringRpcMethod=e.KeyringRpcMethod=void 0,function(t){t.ListAccounts=\"keyring_listAccounts\",t.GetAccount=\"keyring_getAccount\",t.CreateAccount=\"keyring_createAccount\",t.GetAccountBalances=\"keyring_getAccountBalances\",t.FilterAccountChains=\"keyring_filterAccountChains\",t.UpdateAccount=\"keyring_updateAccount\",t.DeleteAccount=\"keyring_deleteAccount\",t.ExportAccount=\"keyring_exportAccount\",t.ListRequests=\"keyring_listRequests\",t.GetRequest=\"keyring_getRequest\",t.SubmitRequest=\"keyring_submitRequest\",t.ApproveRequest=\"keyring_approveRequest\",t.RejectRequest=\"keyring_rejectRequest\"}(r=e.KeyringRpcMethod||(e.KeyringRpcMethod={})),e.isKeyringRpcMethod=function(t){return Object.values(r).includes(t)}},3699:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.InternalAccountStruct=e.InternalAccountStructs=e.InternalBtcP2wpkhAccountStruct=e.InternalEthErc4337AccountStruct=e.InternalEthEoaAccountStruct=e.InternalAccountMetadataStruct=void 0;const n=r(5620),i=r(5417),o=r(5787),s=r(6879),a=r(4520);function u(t){return(0,a.object)({...t.schema,...e.InternalAccountMetadataStruct.schema})}e.InternalAccountMetadataStruct=(0,a.object)({metadata:(0,a.object)({name:(0,n.string)(),nameLastUpdatedAt:(0,a.exactOptional)((0,n.number)()),snap:(0,a.exactOptional)((0,a.object)({id:(0,n.string)(),enabled:(0,n.boolean)(),name:(0,n.string)()})),lastSelected:(0,a.exactOptional)((0,n.number)()),importTime:(0,n.number)(),keyring:(0,a.object)({type:(0,n.string)()})})}),e.InternalEthEoaAccountStruct=u(s.EthEoaAccountStruct),e.InternalEthErc4337AccountStruct=u(s.EthErc4337AccountStruct),e.InternalBtcP2wpkhAccountStruct=u(o.BtcP2wpkhAccountStruct),e.InternalAccountStructs={[`${i.EthAccountType.Eoa}`]:e.InternalEthEoaAccountStruct,[`${i.EthAccountType.Erc4337}`]:e.InternalEthErc4337AccountStruct,[`${i.BtcAccountType.P2wpkh}`]:e.InternalBtcP2wpkhAccountStruct},e.InternalAccountStruct=(0,a.object)({...i.KeyringAccountStruct.schema,...e.InternalAccountMetadataStruct.schema})},3060:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.handleKeyringRequest=e.MethodNotSupportedError=void 0;const n=r(5620),i=r(2582),o=r(1925),s=r(5978);class a extends Error{constructor(t){super(`Method not supported: ${t}`)}}e.MethodNotSupportedError=a,e.handleKeyringRequest=async function(t,e){try{return await async function(t,e){switch((0,n.assert)(e,s.JsonRpcRequestStruct),e.method){case o.KeyringRpcMethod.ListAccounts:return(0,n.assert)(e,i.ListAccountsRequestStruct),t.listAccounts();case o.KeyringRpcMethod.GetAccount:return(0,n.assert)(e,i.GetAccountRequestStruct),t.getAccount(e.params.id);case o.KeyringRpcMethod.CreateAccount:return(0,n.assert)(e,i.CreateAccountRequestStruct),t.createAccount(e.params.options);case o.KeyringRpcMethod.GetAccountBalances:if(void 0===t.getAccountBalances)throw new a(e.method);return(0,n.assert)(e,i.GetAccountBalancesRequestStruct),t.getAccountBalances(e.params.id,e.params.assets);case o.KeyringRpcMethod.FilterAccountChains:return(0,n.assert)(e,i.FilterAccountChainsStruct),t.filterAccountChains(e.params.id,e.params.chains);case o.KeyringRpcMethod.UpdateAccount:return(0,n.assert)(e,i.UpdateAccountRequestStruct),t.updateAccount(e.params.account);case o.KeyringRpcMethod.DeleteAccount:return(0,n.assert)(e,i.DeleteAccountRequestStruct),t.deleteAccount(e.params.id);case o.KeyringRpcMethod.ExportAccount:if(void 0===t.exportAccount)throw new a(e.method);return(0,n.assert)(e,i.ExportAccountRequestStruct),t.exportAccount(e.params.id);case o.KeyringRpcMethod.ListRequests:if(void 0===t.listRequests)throw new a(e.method);return(0,n.assert)(e,i.ListRequestsRequestStruct),t.listRequests();case o.KeyringRpcMethod.GetRequest:if(void 0===t.getRequest)throw new a(e.method);return(0,n.assert)(e,i.GetRequestRequestStruct),t.getRequest(e.params.id);case o.KeyringRpcMethod.SubmitRequest:return(0,n.assert)(e,i.SubmitRequestRequestStruct),t.submitRequest(e.params);case o.KeyringRpcMethod.ApproveRequest:if(void 0===t.approveRequest)throw new a(e.method);return(0,n.assert)(e,i.ApproveRequestRequestStruct),t.approveRequest(e.params.id,e.params.data);case o.KeyringRpcMethod.RejectRequest:if(void 0===t.rejectRequest)throw new a(e.method);return(0,n.assert)(e,i.RejectRequestRequestStruct),t.rejectRequest(e.params.id);default:throw new a(e.method)}}(t,e)}catch(t){const e=t instanceof Error&&\"string\"==typeof t.message?t.message:\"An unknown error occurred while handling the keyring request\";throw new Error(e)}}},5524:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.emitSnapKeyringEvent=void 0,e.emitSnapKeyringEvent=async function(t,e,r){await t.request({method:\"snap_manageAccounts\",params:{method:e,params:{...r}}})}},4520:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.strictMask=e.definePattern=e.exactOptional=e.object=void 0;const n=r(5620);function i(t){return t.path[t.path.length-1]in t.branch[t.branch.length-2]}e.object=function(t){return(0,n.object)(t)},e.exactOptional=function(t){return new n.Struct({...t,validator:(e,r)=>!i(r)||t.validator(e,r),refiner:(e,r)=>!i(r)||t.refiner(e,r)})},e.definePattern=function(t,e){return(0,n.define)(t,(t=>\"string\"==typeof t&&e.test(t)))},e.strictMask=function(t,e,r){return(0,n.assert)(t,e,r),t}},4199:function(t,e,r){\"use strict\";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!(\"get\"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)\"default\"===r||Object.prototype.hasOwnProperty.c