1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5432,7225],{48260:function(e,t,i){"use strict";i.r(t),i.d(t,{BeaconWallet:function(){return f},BeaconWalletNotInitialized:function(){return u},MissingRequiredScopes:function(){return d},VERSION:function(){return h}});var r=i(96348),n=i(83748),s=i(32571),o=i.n(s),a=i(2831),l=i(48895);function c(e,t,i,r){return new(i||(i=Promise))(function(n,s){function o(e){try{l(r.next(e))}catch(e){s(e)}}function a(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?n(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((r=r.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;class u extends n.sO{constructor(){super(),this.name="BeaconWalletNotInitialized",this.message='BeaconWallet needs to be initialized by calling `await BeaconWallet.requestPermissions({network: {type: "chosen_network"}})` first.'}}class d extends n.sO{constructor(e){super(),this.requiredScopes=e,this.name="MissingRequiredScopes",this.message=`Required permissions scopes: ${e.join(",")} were not granted.`}}let h={commitHash:"46a535eea78d77ebb5509ccd1d1cbd01075c7461",version:"17.5.2"};class f{constructor(e){this.client=(0,r.Lt)(e)}validateRequiredScopesOrFail(e,t){let i=new Set(t);for(let t of e)i.has(t)&&i.delete(t);if(i.size>0)throw new d(Array.from(i))}requestPermissions(e){return c(this,void 0,void 0,function*(){yield this.client.requestPermissions(e)})}getPKH(){return c(this,void 0,void 0,function*(){let e=yield this.client.getActiveAccount();if(!e)throw new u;return e.address})}getPK(){var e;return c(this,void 0,void 0,function*(){let t=yield this.client.getActiveAccount();if(!t)throw new u;return null!==(e=t.publicKey)&&void 0!==e?e:""})}mapTransferParamsToWalletParams(e){return c(this,void 0,void 0,function*(){let t;yield this.client.showPrepare();try{t=yield e()}catch(e){throw yield this.client.hideUI(),e}return this.removeDefaultParams(t,(yield(0,a.createTransferOperation)(this.formatParameters(t))))})}mapIncreasePaidStorageWalletParams(e){return c(this,void 0,void 0,function*(){let t;yield this.client.showPrepare();try{t=yield e()}catch(e){throw yield this.client.hideUI(),e}return this.removeDefaultParams(t,(yield(0,a.createIncreasePaidStorageOperation)(this.formatParameters(t))))})}mapOriginateParamsToWalletParams(e){return c(this,void 0,void 0,function*(){let t;yield this.client.showPrepare();try{t=yield e()}catch(e){throw yield this.client.hideUI(),e}return this.removeDefaultParams(t,(yield(0,a.createOriginationOperation)(this.formatParameters(t))))})}mapDelegateParamsToWalletParams(e){return c(this,void 0,void 0,function*(){let t;yield this.client.showPrepare();try{t=yield e()}catch(e){throw yield this.client.hideUI(),e}return this.removeDefaultParams(t,(yield(0,a.createSetDelegateOperation)(this.formatParameters(t))))})}formatParameters(e){return e.fee&&(e.fee=e.fee.toString()),e.storageLimit&&(e.storageLimit=e.storageLimit.toString()),e.gasLimit&&(e.gasLimit=e.gasLimit.toString()),e}removeDefaultParams(e,t){return e.fee||delete t.fee,e.storageLimit||delete t.storage_limit,e.gasLimit||delete t.gas_limit,t}sendOperations(e){return c(this,void 0,void 0,function*(){let t=yield this.client.getActiveAccount();if(!t)throw new u;let i=t.scopes;this.validateRequiredScopesOrFail(i,[r.UW.OPERATION_REQUEST]);let{transactionHash:n}=yield this.client.requestOperation({operationDetails:e});return n})}disconnect(){return c(this,void 0,void 0,function*(){yield this.client.destroy()})}clearActiveAccount(){return c(this,void 0,void 0,function*(){yield this.client.setActiveAccount()})}sign(e,t){return c(this,void 0,void 0,function*(){let i=(0,l.Yu)(e);void 0!==t&&(i=(0,l.dd)(t,i));let s=(0,l.Cw)(o()(i)),a=this.getSigningType(t);if(a!==r.Jr.OPERATION)throw new n.s(`Taquito Beacon Wallet currently only supports signing operations, not ${a}`);let{signature:c}=yield this.client.requestSignPayload({payload:s,signingType:a});return c})}getSigningType(e){if(!e||0===e.length)return r.Jr.RAW;if(1===e.length){if(5===e[0])return r.Jr.MICHELINE;if(3===e[0])return r.Jr.OPERATION}throw Error(`Invalid watermark ${JSON.stringify(e)}`)}}},11314:function(){},81388:function(){}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.