@skip-go/widget-web-component 0.0.2 → 0.0.3
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/17.index.js +1 -0
- package/dist/414.index.js +1 -0
- package/dist/544.index.js +1 -0
- package/dist/700.index.js +1 -0
- package/dist/772.index.js +1 -0
- package/dist/854.index.js +1 -0
- package/dist/index.js +278 -0
- package/dist/index.js.LICENSE.txt +166 -0
- package/package.json +2 -2
package/dist/17.index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(Object("undefined"!=typeof self?self:this).webpackChunk_skip_go_widget=Object("undefined"!=typeof self?self:this).webpackChunk_skip_go_widget||[]).push([[17],{77973:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.BinaryWriter=e.BinaryReader=e.WireType=void 0;const i=n(57647),r=n(70190);var o;!function(t){t[t.Varint=0]="Varint",t[t.Fixed64=1]="Fixed64",t[t.Bytes=2]="Bytes",t[t.Fixed32=5]="Fixed32"}(o||(e.WireType=o={})),e.BinaryReader=class{assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}constructor(t){this.buf=t?new Uint8Array(t):new Uint8Array(0),this.pos=0,this.type=0,this.len=this.buf.length}tag(){const t=this.uint32(),e=t>>>3,n=7&t;if(e<=0||n<0||n>5)throw new Error("illegal tag: field no "+e+" wire type "+n);return[e,n,t]}skip(t){if("number"==typeof t){if(this.pos+t>this.len)throw d(this,t);this.pos+=t}else do{if(this.pos>=this.len)throw d(this)}while(128&this.buf[this.pos++]);return this}skipType(t){switch(t){case o.Varint:this.skip();break;case o.Fixed64:this.skip(8);break;case o.Bytes:this.skip(this.uint32());break;case 3:for(;4!=(t=7&this.uint32());)this.skipType(t);break;case o.Fixed32:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this}uint32(){return r.varint32read.bind(this)()}int32(){return 0|this.uint32()}sint32(){const t=this.uint32();return t%2==1?(t+1)/-2:t/2}fixed32(){const t=(0,r.readUInt32)(this.buf,this.pos);return this.pos+=4,t}sfixed32(){const t=(0,r.readInt32)(this.buf,this.pos);return this.pos+=4,t}int64(){const[t,e]=r.varint64read.bind(this)();return BigInt((0,r.int64ToString)(t,e))}uint64(){const[t,e]=r.varint64read.bind(this)();return BigInt((0,r.uInt64ToString)(t,e))}sint64(){let[t,e]=r.varint64read.bind(this)();return[t,e]=(0,r.zzDecode)(t,e),BigInt((0,r.int64ToString)(t,e))}fixed64(){const t=this.sfixed32(),e=this.sfixed32();return BigInt((0,r.uInt64ToString)(t,e))}sfixed64(){const t=this.sfixed32(),e=this.sfixed32();return BigInt((0,r.int64ToString)(t,e))}float(){throw new Error("float not supported")}double(){throw new Error("double not supported")}bool(){const[t,e]=r.varint64read.bind(this)();return 0!==t||0!==e}bytes(){const t=this.uint32(),e=this.pos;return this.pos+=t,this.assertBounds(),this.buf.subarray(e,e+t)}string(){const t=this.bytes();return(0,i.utf8Read)(t,0,t.length)}};class s{constructor(t,e,n){this.fn=t,this.len=e,this.val=n}proceed(t,e){this.fn&&this.fn(this.val,t,e)}}class a{constructor(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}}class u{constructor(){this.len=0,this.uint64=u.prototype.int64,this.sfixed64=u.prototype.fixed64,this.sfixed32=u.prototype.fixed32,this.head=new s(null,0,0),this.tail=this.head,this.states=null}static create(){return new u}static alloc(t){return"undefined"!=typeof Uint8Array?function(t,e){const n=8192;let i=null,r=n;return function(o){if(o<1||o>4096)return t(o);r+o>n&&(i=t(n),r=0);const s=e.call(i,r,r+=o);return 7&r&&(r=1+(7|r)),s}}((t=>new Uint8Array(t)),Uint8Array.prototype.subarray)(t):new Array(t)}_push(t,e,n){return this.tail=this.tail.next=new s(t,e,n),this.len+=e,this}finish(){let t=this.head.next,e=0;const n=u.alloc(this.len);for(;t;)t.proceed(n,e),e+=t.len,t=t.next;return n}fork(){return this.states=new a(this),this.head=this.tail=new s(null,0,0),this.len=0,this}reset(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new s(null,0,0),this.len=0),this}ldelim(){const t=this.head,e=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=t.next,this.tail=e,this.len+=n),this}tag(t,e){return this.uint32((t<<3|e)>>>0)}uint32(t){return this.len+=(this.tail=this.tail.next=new s(r.writeVarint32,(t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this}int32(t){return t<0?this._push(r.writeVarint64,10,(0,r.int64FromString)(t.toString())):this.uint32(t)}sint32(t){return this.uint32((t<<1^t>>31)>>>0)}int64(t){const{lo:e,hi:n}=(0,r.int64FromString)(t.toString());return this._push(r.writeVarint64,(0,r.int64Length)(e,n),{lo:e,hi:n})}sint64(t){let{lo:e,hi:n}=(0,r.int64FromString)(t.toString());return[e,n]=(0,r.zzEncode)(e,n),this._push(r.writeVarint64,(0,r.int64Length)(e,n),{lo:e,hi:n})}fixed64(t){const{lo:e,hi:n}=(0,r.int64FromString)(t.toString());return this._push(r.writeFixed32,4,e)._push(r.writeFixed32,4,n)}bool(t){return this._push(r.writeByte,1,t?1:0)}fixed32(t){return this._push(r.writeFixed32,4,t>>>0)}float(t){throw new Error("float not supported"+t)}double(t){throw new Error("double not supported"+t)}bytes(t){const e=t.length>>>0;return e?this.uint32(e)._push(c,e,t):this._push(r.writeByte,1,0)}string(t){const e=(0,i.utf8Length)(t);return e?this.uint32(e)._push(i.utf8Write,e,t):this._push(r.writeByte,1,0)}}function c(t,e,n){if("undefined"!=typeof Uint8Array)e.set(t,n);else for(let i=0;i<t.length;++i)e[n+i]=t[i]}function d(t,e){return RangeError("index out of range: "+t.pos+" + "+(e||1)+" > "+t.len)}e.BinaryWriter=u},39167:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DecProto=e.IntProto=e.DecCoin=e.Coin=e.protobufPackage=void 0;const i=n(77973),r=n(92191);e.protobufPackage="cosmos.base.v1beta1",e.Coin={typeUrl:"/cosmos.base.v1beta1.Coin",encode:(t,e=i.BinaryWriter.create())=>(""!==t.denom&&e.uint32(10).string(t.denom),""!==t.amount&&e.uint32(18).string(t.amount),e),decode(t,e){const n=t instanceof i.BinaryReader?t:new i.BinaryReader(t);let r=void 0===e?n.len:n.pos+e;const o={denom:"",amount:""};for(;n.pos<r;){const t=n.uint32();switch(t>>>3){case 1:o.denom=n.string();break;case 2:o.amount=n.string();break;default:n.skipType(7&t)}}return o},fromJSON(t){const e={denom:"",amount:""};return(0,r.isSet)(t.denom)&&(e.denom=String(t.denom)),(0,r.isSet)(t.amount)&&(e.amount=String(t.amount)),e},toJSON(t){const e={};return void 0!==t.denom&&(e.denom=t.denom),void 0!==t.amount&&(e.amount=t.amount),e},fromPartial(t){const e={denom:"",amount:""};return e.denom=t.denom??"",e.amount=t.amount??"",e}},e.DecCoin={typeUrl:"/cosmos.base.v1beta1.DecCoin",encode:(t,e=i.BinaryWriter.create())=>(""!==t.denom&&e.uint32(10).string(t.denom),""!==t.amount&&e.uint32(18).string(t.amount),e),decode(t,e){const n=t instanceof i.BinaryReader?t:new i.BinaryReader(t);let r=void 0===e?n.len:n.pos+e;const o={denom:"",amount:""};for(;n.pos<r;){const t=n.uint32();switch(t>>>3){case 1:o.denom=n.string();break;case 2:o.amount=n.string();break;default:n.skipType(7&t)}}return o},fromJSON(t){const e={denom:"",amount:""};return(0,r.isSet)(t.denom)&&(e.denom=String(t.denom)),(0,r.isSet)(t.amount)&&(e.amount=String(t.amount)),e},toJSON(t){const e={};return void 0!==t.denom&&(e.denom=t.denom),void 0!==t.amount&&(e.amount=t.amount),e},fromPartial(t){const e={denom:"",amount:""};return e.denom=t.denom??"",e.amount=t.amount??"",e}},e.IntProto={typeUrl:"/cosmos.base.v1beta1.IntProto",encode:(t,e=i.BinaryWriter.create())=>(""!==t.int&&e.uint32(10).string(t.int),e),decode(t,e){const n=t instanceof i.BinaryReader?t:new i.BinaryReader(t);let r=void 0===e?n.len:n.pos+e;const o={int:""};for(;n.pos<r;){const t=n.uint32();t>>>3==1?o.int=n.string():n.skipType(7&t)}return o},fromJSON(t){const e={int:""};return(0,r.isSet)(t.int)&&(e.int=String(t.int)),e},toJSON(t){const e={};return void 0!==t.int&&(e.int=t.int),e},fromPartial(t){const e={int:""};return e.int=t.int??"",e}},e.DecProto={typeUrl:"/cosmos.base.v1beta1.DecProto",encode:(t,e=i.BinaryWriter.create())=>(""!==t.dec&&e.uint32(10).string(t.dec),e),decode(t,e){const n=t instanceof i.BinaryReader?t:new i.BinaryReader(t);let r=void 0===e?n.len:n.pos+e;const o={dec:""};for(;n.pos<r;){const t=n.uint32();t>>>3==1?o.dec=n.string():n.skipType(7&t)}return o},fromJSON(t){const e={dec:""};return(0,r.isSet)(t.dec)&&(e.dec=String(t.dec)),e},toJSON(t){const e={};return void 0!==t.dec&&(e.dec=t.dec),e},fromPartial(t){const e={dec:""};return e.dec=t.dec??"",e}}},32779:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CompactBitArray=e.MultiSignature=e.protobufPackage=void 0;const i=n(77973),r=n(92191);function o(){return{extraBitsStored:0,elems:new Uint8Array}}e.protobufPackage="cosmos.crypto.multisig.v1beta1",e.MultiSignature={typeUrl:"/cosmos.crypto.multisig.v1beta1.MultiSignature",encode(t,e=i.BinaryWriter.create()){for(const n of t.signatures)e.uint32(10).bytes(n);return e},decode(t,e){const n=t instanceof i.BinaryReader?t:new i.BinaryReader(t);let r=void 0===e?n.len:n.pos+e;const o={signatures:[]};for(;n.pos<r;){const t=n.uint32();t>>>3==1?o.signatures.push(n.bytes()):n.skipType(7&t)}return o},fromJSON(t){const e={signatures:[]};return Array.isArray(t?.signatures)&&(e.signatures=t.signatures.map((t=>(0,r.bytesFromBase64)(t)))),e},toJSON(t){const e={};return t.signatures?e.signatures=t.signatures.map((t=>(0,r.base64FromBytes)(void 0!==t?t:new Uint8Array))):e.signatures=[],e},fromPartial(t){const e={signatures:[]};return e.signatures=t.signatures?.map((t=>t))||[],e}},e.CompactBitArray={typeUrl:"/cosmos.crypto.multisig.v1beta1.CompactBitArray",encode:(t,e=i.BinaryWriter.create())=>(0!==t.extraBitsStored&&e.uint32(8).uint32(t.extraBitsStored),0!==t.elems.length&&e.uint32(18).bytes(t.elems),e),decode(t,e){const n=t instanceof i.BinaryReader?t:new i.BinaryReader(t);let r=void 0===e?n.len:n.pos+e;const s=o();for(;n.pos<r;){const t=n.uint32();switch(t>>>3){case 1:s.extraBitsStored=n.uint32();break;case 2:s.elems=n.bytes();break;default:n.skipType(7&t)}}return s},fromJSON(t){const e=o();return(0,r.isSet)(t.extraBitsStored)&&(e.extraBitsStored=Number(t.extraBitsStored)),(0,r.isSet)(t.elems)&&(e.elems=(0,r.bytesFromBase64)(t.elems)),e},toJSON(t){const e={};return void 0!==t.extraBitsStored&&(e.extraBitsStored=Math.round(t.extraBitsStored)),void 0!==t.elems&&(e.elems=(0,r.base64FromBytes)(void 0!==t.elems?t.elems:new Uint8Array)),e},fromPartial(t){const e=o();return e.extraBitsStored=t.extraBitsStored??0,e.elems=t.elems??new Uint8Array,e}}},5958:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SignatureDescriptor_Data_Multi=e.SignatureDescriptor_Data_Single=e.SignatureDescriptor_Data=e.SignatureDescriptor=e.SignatureDescriptors=e.signModeToJSON=e.signModeFromJSON=e.SignMode=e.protobufPackage=void 0;const i=n(32779),r=n(12840),o=n(77973),s=n(92191);var a;function u(t){switch(t){case 0:case"SIGN_MODE_UNSPECIFIED":return a.SIGN_MODE_UNSPECIFIED;case 1:case"SIGN_MODE_DIRECT":return a.SIGN_MODE_DIRECT;case 2:case"SIGN_MODE_TEXTUAL":return a.SIGN_MODE_TEXTUAL;case 3:case"SIGN_MODE_DIRECT_AUX":return a.SIGN_MODE_DIRECT_AUX;case 127:case"SIGN_MODE_LEGACY_AMINO_JSON":return a.SIGN_MODE_LEGACY_AMINO_JSON;case 191:case"SIGN_MODE_EIP_191":return a.SIGN_MODE_EIP_191;default:return a.UNRECOGNIZED}}function c(t){switch(t){case a.SIGN_MODE_UNSPECIFIED:return"SIGN_MODE_UNSPECIFIED";case a.SIGN_MODE_DIRECT:return"SIGN_MODE_DIRECT";case a.SIGN_MODE_TEXTUAL:return"SIGN_MODE_TEXTUAL";case a.SIGN_MODE_DIRECT_AUX:return"SIGN_MODE_DIRECT_AUX";case a.SIGN_MODE_LEGACY_AMINO_JSON:return"SIGN_MODE_LEGACY_AMINO_JSON";case a.SIGN_MODE_EIP_191:return"SIGN_MODE_EIP_191";case a.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function d(){return{publicKey:void 0,data:void 0,sequence:BigInt(0)}}function l(){return{mode:0,signature:new Uint8Array}}e.protobufPackage="cosmos.tx.signing.v1beta1",function(t){t[t.SIGN_MODE_UNSPECIFIED=0]="SIGN_MODE_UNSPECIFIED",t[t.SIGN_MODE_DIRECT=1]="SIGN_MODE_DIRECT",t[t.SIGN_MODE_TEXTUAL=2]="SIGN_MODE_TEXTUAL",t[t.SIGN_MODE_DIRECT_AUX=3]="SIGN_MODE_DIRECT_AUX",t[t.SIGN_MODE_LEGACY_AMINO_JSON=127]="SIGN_MODE_LEGACY_AMINO_JSON",t[t.SIGN_MODE_EIP_191=191]="SIGN_MODE_EIP_191",t[t.UNRECOGNIZED=-1]="UNRECOGNIZED"}(a||(e.SignMode=a={})),e.signModeFromJSON=u,e.signModeToJSON=c,e.SignatureDescriptors={typeUrl:"/cosmos.tx.signing.v1beta1.SignatureDescriptors",encode(t,n=o.BinaryWriter.create()){for(const i of t.signatures)e.SignatureDescriptor.encode(i,n.uint32(10).fork()).ldelim();return n},decode(t,n){const i=t instanceof o.BinaryReader?t:new o.BinaryReader(t);let r=void 0===n?i.len:i.pos+n;const s={signatures:[]};for(;i.pos<r;){const t=i.uint32();t>>>3==1?s.signatures.push(e.SignatureDescriptor.decode(i,i.uint32())):i.skipType(7&t)}return s},fromJSON(t){const n={signatures:[]};return Array.isArray(t?.signatures)&&(n.signatures=t.signatures.map((t=>e.SignatureDescriptor.fromJSON(t)))),n},toJSON(t){const n={};return t.signatures?n.signatures=t.signatures.map((t=>t?e.SignatureDescriptor.toJSON(t):void 0)):n.signatures=[],n},fromPartial(t){const n={signatures:[]};return n.signatures=t.signatures?.map((t=>e.SignatureDescriptor.fromPartial(t)))||[],n}},e.SignatureDescriptor={typeUrl:"/cosmos.tx.signing.v1beta1.SignatureDescriptor",encode:(t,n=o.BinaryWriter.create())=>(void 0!==t.publicKey&&r.Any.encode(t.publicKey,n.uint32(10).fork()).ldelim(),void 0!==t.data&&e.SignatureDescriptor_Data.encode(t.data,n.uint32(18).fork()).ldelim(),t.sequence!==BigInt(0)&&n.uint32(24).uint64(t.sequence),n),decode(t,n){const i=t instanceof o.BinaryReader?t:new o.BinaryReader(t);let s=void 0===n?i.len:i.pos+n;const a=d();for(;i.pos<s;){const t=i.uint32();switch(t>>>3){case 1:a.publicKey=r.Any.decode(i,i.uint32());break;case 2:a.data=e.SignatureDescriptor_Data.decode(i,i.uint32());break;case 3:a.sequence=i.uint64();break;default:i.skipType(7&t)}}return a},fromJSON(t){const n=d();return(0,s.isSet)(t.publicKey)&&(n.publicKey=r.Any.fromJSON(t.publicKey)),(0,s.isSet)(t.data)&&(n.data=e.SignatureDescriptor_Data.fromJSON(t.data)),(0,s.isSet)(t.sequence)&&(n.sequence=BigInt(t.sequence.toString())),n},toJSON(t){const n={};return void 0!==t.publicKey&&(n.publicKey=t.publicKey?r.Any.toJSON(t.publicKey):void 0),void 0!==t.data&&(n.data=t.data?e.SignatureDescriptor_Data.toJSON(t.data):void 0),void 0!==t.sequence&&(n.sequence=(t.sequence||BigInt(0)).toString()),n},fromPartial(t){const n=d();return void 0!==t.publicKey&&null!==t.publicKey&&(n.publicKey=r.Any.fromPartial(t.publicKey)),void 0!==t.data&&null!==t.data&&(n.data=e.SignatureDescriptor_Data.fromPartial(t.data)),void 0!==t.sequence&&null!==t.sequence&&(n.sequence=BigInt(t.sequence.toString())),n}},e.SignatureDescriptor_Data={typeUrl:"/cosmos.tx.signing.v1beta1.Data",encode:(t,n=o.BinaryWriter.create())=>(void 0!==t.single&&e.SignatureDescriptor_Data_Single.encode(t.single,n.uint32(10).fork()).ldelim(),void 0!==t.multi&&e.SignatureDescriptor_Data_Multi.encode(t.multi,n.uint32(18).fork()).ldelim(),n),decode(t,n){const i=t instanceof o.BinaryReader?t:new o.BinaryReader(t);let r=void 0===n?i.len:i.pos+n;const s={single:void 0,multi:void 0};for(;i.pos<r;){const t=i.uint32();switch(t>>>3){case 1:s.single=e.SignatureDescriptor_Data_Single.decode(i,i.uint32());break;case 2:s.multi=e.SignatureDescriptor_Data_Multi.decode(i,i.uint32());break;default:i.skipType(7&t)}}return s},fromJSON(t){const n={single:void 0,multi:void 0};return(0,s.isSet)(t.single)&&(n.single=e.SignatureDescriptor_Data_Single.fromJSON(t.single)),(0,s.isSet)(t.multi)&&(n.multi=e.SignatureDescriptor_Data_Multi.fromJSON(t.multi)),n},toJSON(t){const n={};return void 0!==t.single&&(n.single=t.single?e.SignatureDescriptor_Data_Single.toJSON(t.single):void 0),void 0!==t.multi&&(n.multi=t.multi?e.SignatureDescriptor_Data_Multi.toJSON(t.multi):void 0),n},fromPartial(t){const n={single:void 0,multi:void 0};return void 0!==t.single&&null!==t.single&&(n.single=e.SignatureDescriptor_Data_Single.fromPartial(t.single)),void 0!==t.multi&&null!==t.multi&&(n.multi=e.SignatureDescriptor_Data_Multi.fromPartial(t.multi)),n}},e.SignatureDescriptor_Data_Single={typeUrl:"/cosmos.tx.signing.v1beta1.Single",encode:(t,e=o.BinaryWriter.create())=>(0!==t.mode&&e.uint32(8).int32(t.mode),0!==t.signature.length&&e.uint32(18).bytes(t.signature),e),decode(t,e){const n=t instanceof o.BinaryReader?t:new o.BinaryReader(t);let i=void 0===e?n.len:n.pos+e;const r=l();for(;n.pos<i;){const t=n.uint32();switch(t>>>3){case 1:r.mode=n.int32();break;case 2:r.signature=n.bytes();break;default:n.skipType(7&t)}}return r},fromJSON(t){const e=l();return(0,s.isSet)(t.mode)&&(e.mode=u(t.mode)),(0,s.isSet)(t.signature)&&(e.signature=(0,s.bytesFromBase64)(t.signature)),e},toJSON(t){const e={};return void 0!==t.mode&&(e.mode=c(t.mode)),void 0!==t.signature&&(e.signature=(0,s.base64FromBytes)(void 0!==t.signature?t.signature:new Uint8Array)),e},fromPartial(t){const e=l();return e.mode=t.mode??0,e.signature=t.signature??new Uint8Array,e}},e.SignatureDescriptor_Data_Multi={typeUrl:"/cosmos.tx.signing.v1beta1.Multi",encode(t,n=o.BinaryWriter.create()){void 0!==t.bitarray&&i.CompactBitArray.encode(t.bitarray,n.uint32(10).fork()).ldelim();for(const i of t.signatures)e.SignatureDescriptor_Data.encode(i,n.uint32(18).fork()).ldelim();return n},decode(t,n){const r=t instanceof o.BinaryReader?t:new o.BinaryReader(t);let s=void 0===n?r.len:r.pos+n;const a={bitarray:void 0,signatures:[]};for(;r.pos<s;){const t=r.uint32();switch(t>>>3){case 1:a.bitarray=i.CompactBitArray.decode(r,r.uint32());break;case 2:a.signatures.push(e.SignatureDescriptor_Data.decode(r,r.uint32()));break;default:r.skipType(7&t)}}return a},fromJSON(t){const n={bitarray:void 0,signatures:[]};return(0,s.isSet)(t.bitarray)&&(n.bitarray=i.CompactBitArray.fromJSON(t.bitarray)),Array.isArray(t?.signatures)&&(n.signatures=t.signatures.map((t=>e.SignatureDescriptor_Data.fromJSON(t)))),n},toJSON(t){const n={};return void 0!==t.bitarray&&(n.bitarray=t.bitarray?i.CompactBitArray.toJSON(t.bitarray):void 0),t.signatures?n.signatures=t.signatures.map((t=>t?e.SignatureDescriptor_Data.toJSON(t):void 0)):n.signatures=[],n},fromPartial(t){const n={bitarray:void 0,signatures:[]};return void 0!==t.bitarray&&null!==t.bitarray&&(n.bitarray=i.CompactBitArray.fromPartial(t.bitarray)),n.signatures=t.signatures?.map((t=>e.SignatureDescriptor_Data.fromPartial(t)))||[],n}}},85017:(t,e,n)=>{e.Y6=e.jq=e.GS=e.d7=e.Sd=e.hf=e.dL=e.B0=e.rO=e.TxRaw=void 0;const i=n(12840),r=n(5958),o=n(32779),s=n(39167),a=n(77973),u=n(92191);function c(){return{bodyBytes:new Uint8Array,authInfoBytes:new Uint8Array,signatures:[]}}function d(){return{bodyBytes:new Uint8Array,publicKey:void 0,chainId:"",accountNumber:BigInt(0),sequence:BigInt(0),tip:void 0}}function l(){return{messages:[],memo:"",timeoutHeight:BigInt(0),extensionOptions:[],nonCriticalExtensionOptions:[]}}function m(){return{publicKey:void 0,modeInfo:void 0,sequence:BigInt(0)}}function f(){return{amount:[],gasLimit:BigInt(0),payer:"",granter:""}}e.TxRaw={typeUrl:"/cosmos.tx.v1beta1.TxRaw",encode(t,e=a.BinaryWriter.create()){0!==t.bodyBytes.length&&e.uint32(10).bytes(t.bodyBytes),0!==t.authInfoBytes.length&&e.uint32(18).bytes(t.authInfoBytes);for(const n of t.signatures)e.uint32(26).bytes(n);return e},decode(t,e){const n=t instanceof a.BinaryReader?t:new a.BinaryReader(t);let i=void 0===e?n.len:n.pos+e;const r=c();for(;n.pos<i;){const t=n.uint32();switch(t>>>3){case 1:r.bodyBytes=n.bytes();break;case 2:r.authInfoBytes=n.bytes();break;case 3:r.signatures.push(n.bytes());break;default:n.skipType(7&t)}}return r},fromJSON(t){const e=c();return(0,u.isSet)(t.bodyBytes)&&(e.bodyBytes=(0,u.bytesFromBase64)(t.bodyBytes)),(0,u.isSet)(t.authInfoBytes)&&(e.authInfoBytes=(0,u.bytesFromBase64)(t.authInfoBytes)),Array.isArray(t?.signatures)&&(e.signatures=t.signatures.map((t=>(0,u.bytesFromBase64)(t)))),e},toJSON(t){const e={};return void 0!==t.bodyBytes&&(e.bodyBytes=(0,u.base64FromBytes)(void 0!==t.bodyBytes?t.bodyBytes:new Uint8Array)),void 0!==t.authInfoBytes&&(e.authInfoBytes=(0,u.base64FromBytes)(void 0!==t.authInfoBytes?t.authInfoBytes:new Uint8Array)),t.signatures?e.signatures=t.signatures.map((t=>(0,u.base64FromBytes)(void 0!==t?t:new Uint8Array))):e.signatures=[],e},fromPartial(t){const e=c();return e.bodyBytes=t.bodyBytes??new Uint8Array,e.authInfoBytes=t.authInfoBytes??new Uint8Array,e.signatures=t.signatures?.map((t=>t))||[],e}},e.rO={typeUrl:"/cosmos.tx.v1beta1.SignDocDirectAux",encode:(t,n=a.BinaryWriter.create())=>(0!==t.bodyBytes.length&&n.uint32(10).bytes(t.bodyBytes),void 0!==t.publicKey&&i.Any.encode(t.publicKey,n.uint32(18).fork()).ldelim(),""!==t.chainId&&n.uint32(26).string(t.chainId),t.accountNumber!==BigInt(0)&&n.uint32(32).uint64(t.accountNumber),t.sequence!==BigInt(0)&&n.uint32(40).uint64(t.sequence),void 0!==t.tip&&e.Y6.encode(t.tip,n.uint32(50).fork()).ldelim(),n),decode(t,n){const r=t instanceof a.BinaryReader?t:new a.BinaryReader(t);let o=void 0===n?r.len:r.pos+n;const s=d();for(;r.pos<o;){const t=r.uint32();switch(t>>>3){case 1:s.bodyBytes=r.bytes();break;case 2:s.publicKey=i.Any.decode(r,r.uint32());break;case 3:s.chainId=r.string();break;case 4:s.accountNumber=r.uint64();break;case 5:s.sequence=r.uint64();break;case 6:s.tip=e.Y6.decode(r,r.uint32());break;default:r.skipType(7&t)}}return s},fromJSON(t){const n=d();return(0,u.isSet)(t.bodyBytes)&&(n.bodyBytes=(0,u.bytesFromBase64)(t.bodyBytes)),(0,u.isSet)(t.publicKey)&&(n.publicKey=i.Any.fromJSON(t.publicKey)),(0,u.isSet)(t.chainId)&&(n.chainId=String(t.chainId)),(0,u.isSet)(t.accountNumber)&&(n.accountNumber=BigInt(t.accountNumber.toString())),(0,u.isSet)(t.sequence)&&(n.sequence=BigInt(t.sequence.toString())),(0,u.isSet)(t.tip)&&(n.tip=e.Y6.fromJSON(t.tip)),n},toJSON(t){const n={};return void 0!==t.bodyBytes&&(n.bodyBytes=(0,u.base64FromBytes)(void 0!==t.bodyBytes?t.bodyBytes:new Uint8Array)),void 0!==t.publicKey&&(n.publicKey=t.publicKey?i.Any.toJSON(t.publicKey):void 0),void 0!==t.chainId&&(n.chainId=t.chainId),void 0!==t.accountNumber&&(n.accountNumber=(t.accountNumber||BigInt(0)).toString()),void 0!==t.sequence&&(n.sequence=(t.sequence||BigInt(0)).toString()),void 0!==t.tip&&(n.tip=t.tip?e.Y6.toJSON(t.tip):void 0),n},fromPartial(t){const n=d();return n.bodyBytes=t.bodyBytes??new Uint8Array,void 0!==t.publicKey&&null!==t.publicKey&&(n.publicKey=i.Any.fromPartial(t.publicKey)),n.chainId=t.chainId??"",void 0!==t.accountNumber&&null!==t.accountNumber&&(n.accountNumber=BigInt(t.accountNumber.toString())),void 0!==t.sequence&&null!==t.sequence&&(n.sequence=BigInt(t.sequence.toString())),void 0!==t.tip&&null!==t.tip&&(n.tip=e.Y6.fromPartial(t.tip)),n}},e.B0={typeUrl:"/cosmos.tx.v1beta1.TxBody",encode(t,e=a.BinaryWriter.create()){for(const n of t.messages)i.Any.encode(n,e.uint32(10).fork()).ldelim();""!==t.memo&&e.uint32(18).string(t.memo),t.timeoutHeight!==BigInt(0)&&e.uint32(24).uint64(t.timeoutHeight);for(const n of t.extensionOptions)i.Any.encode(n,e.uint32(8186).fork()).ldelim();for(const n of t.nonCriticalExtensionOptions)i.Any.encode(n,e.uint32(16378).fork()).ldelim();return e},decode(t,e){const n=t instanceof a.BinaryReader?t:new a.BinaryReader(t);let r=void 0===e?n.len:n.pos+e;const o=l();for(;n.pos<r;){const t=n.uint32();switch(t>>>3){case 1:o.messages.push(i.Any.decode(n,n.uint32()));break;case 2:o.memo=n.string();break;case 3:o.timeoutHeight=n.uint64();break;case 1023:o.extensionOptions.push(i.Any.decode(n,n.uint32()));break;case 2047:o.nonCriticalExtensionOptions.push(i.Any.decode(n,n.uint32()));break;default:n.skipType(7&t)}}return o},fromJSON(t){const e=l();return Array.isArray(t?.messages)&&(e.messages=t.messages.map((t=>i.Any.fromJSON(t)))),(0,u.isSet)(t.memo)&&(e.memo=String(t.memo)),(0,u.isSet)(t.timeoutHeight)&&(e.timeoutHeight=BigInt(t.timeoutHeight.toString())),Array.isArray(t?.extensionOptions)&&(e.extensionOptions=t.extensionOptions.map((t=>i.Any.fromJSON(t)))),Array.isArray(t?.nonCriticalExtensionOptions)&&(e.nonCriticalExtensionOptions=t.nonCriticalExtensionOptions.map((t=>i.Any.fromJSON(t)))),e},toJSON(t){const e={};return t.messages?e.messages=t.messages.map((t=>t?i.Any.toJSON(t):void 0)):e.messages=[],void 0!==t.memo&&(e.memo=t.memo),void 0!==t.timeoutHeight&&(e.timeoutHeight=(t.timeoutHeight||BigInt(0)).toString()),t.extensionOptions?e.extensionOptions=t.extensionOptions.map((t=>t?i.Any.toJSON(t):void 0)):e.extensionOptions=[],t.nonCriticalExtensionOptions?e.nonCriticalExtensionOptions=t.nonCriticalExtensionOptions.map((t=>t?i.Any.toJSON(t):void 0)):e.nonCriticalExtensionOptions=[],e},fromPartial(t){const e=l();return e.messages=t.messages?.map((t=>i.Any.fromPartial(t)))||[],e.memo=t.memo??"",void 0!==t.timeoutHeight&&null!==t.timeoutHeight&&(e.timeoutHeight=BigInt(t.timeoutHeight.toString())),e.extensionOptions=t.extensionOptions?.map((t=>i.Any.fromPartial(t)))||[],e.nonCriticalExtensionOptions=t.nonCriticalExtensionOptions?.map((t=>i.Any.fromPartial(t)))||[],e}},e.dL={typeUrl:"/cosmos.tx.v1beta1.AuthInfo",encode(t,n=a.BinaryWriter.create()){for(const i of t.signerInfos)e.hf.encode(i,n.uint32(10).fork()).ldelim();return void 0!==t.fee&&e.jq.encode(t.fee,n.uint32(18).fork()).ldelim(),void 0!==t.tip&&e.Y6.encode(t.tip,n.uint32(26).fork()).ldelim(),n},decode(t,n){const i=t instanceof a.BinaryReader?t:new a.BinaryReader(t);let r=void 0===n?i.len:i.pos+n;const o={signerInfos:[],fee:void 0,tip:void 0};for(;i.pos<r;){const t=i.uint32();switch(t>>>3){case 1:o.signerInfos.push(e.hf.decode(i,i.uint32()));break;case 2:o.fee=e.jq.decode(i,i.uint32());break;case 3:o.tip=e.Y6.decode(i,i.uint32());break;default:i.skipType(7&t)}}return o},fromJSON(t){const n={signerInfos:[],fee:void 0,tip:void 0};return Array.isArray(t?.signerInfos)&&(n.signerInfos=t.signerInfos.map((t=>e.hf.fromJSON(t)))),(0,u.isSet)(t.fee)&&(n.fee=e.jq.fromJSON(t.fee)),(0,u.isSet)(t.tip)&&(n.tip=e.Y6.fromJSON(t.tip)),n},toJSON(t){const n={};return t.signerInfos?n.signerInfos=t.signerInfos.map((t=>t?e.hf.toJSON(t):void 0)):n.signerInfos=[],void 0!==t.fee&&(n.fee=t.fee?e.jq.toJSON(t.fee):void 0),void 0!==t.tip&&(n.tip=t.tip?e.Y6.toJSON(t.tip):void 0),n},fromPartial(t){const n={signerInfos:[],fee:void 0,tip:void 0};return n.signerInfos=t.signerInfos?.map((t=>e.hf.fromPartial(t)))||[],void 0!==t.fee&&null!==t.fee&&(n.fee=e.jq.fromPartial(t.fee)),void 0!==t.tip&&null!==t.tip&&(n.tip=e.Y6.fromPartial(t.tip)),n}},e.hf={typeUrl:"/cosmos.tx.v1beta1.SignerInfo",encode:(t,n=a.BinaryWriter.create())=>(void 0!==t.publicKey&&i.Any.encode(t.publicKey,n.uint32(10).fork()).ldelim(),void 0!==t.modeInfo&&e.Sd.encode(t.modeInfo,n.uint32(18).fork()).ldelim(),t.sequence!==BigInt(0)&&n.uint32(24).uint64(t.sequence),n),decode(t,n){const r=t instanceof a.BinaryReader?t:new a.BinaryReader(t);let o=void 0===n?r.len:r.pos+n;const s=m();for(;r.pos<o;){const t=r.uint32();switch(t>>>3){case 1:s.publicKey=i.Any.decode(r,r.uint32());break;case 2:s.modeInfo=e.Sd.decode(r,r.uint32());break;case 3:s.sequence=r.uint64();break;default:r.skipType(7&t)}}return s},fromJSON(t){const n=m();return(0,u.isSet)(t.publicKey)&&(n.publicKey=i.Any.fromJSON(t.publicKey)),(0,u.isSet)(t.modeInfo)&&(n.modeInfo=e.Sd.fromJSON(t.modeInfo)),(0,u.isSet)(t.sequence)&&(n.sequence=BigInt(t.sequence.toString())),n},toJSON(t){const n={};return void 0!==t.publicKey&&(n.publicKey=t.publicKey?i.Any.toJSON(t.publicKey):void 0),void 0!==t.modeInfo&&(n.modeInfo=t.modeInfo?e.Sd.toJSON(t.modeInfo):void 0),void 0!==t.sequence&&(n.sequence=(t.sequence||BigInt(0)).toString()),n},fromPartial(t){const n=m();return void 0!==t.publicKey&&null!==t.publicKey&&(n.publicKey=i.Any.fromPartial(t.publicKey)),void 0!==t.modeInfo&&null!==t.modeInfo&&(n.modeInfo=e.Sd.fromPartial(t.modeInfo)),void 0!==t.sequence&&null!==t.sequence&&(n.sequence=BigInt(t.sequence.toString())),n}},e.Sd={typeUrl:"/cosmos.tx.v1beta1.ModeInfo",encode:(t,n=a.BinaryWriter.create())=>(void 0!==t.single&&e.d7.encode(t.single,n.uint32(10).fork()).ldelim(),void 0!==t.multi&&e.GS.encode(t.multi,n.uint32(18).fork()).ldelim(),n),decode(t,n){const i=t instanceof a.BinaryReader?t:new a.BinaryReader(t);let r=void 0===n?i.len:i.pos+n;const o={single:void 0,multi:void 0};for(;i.pos<r;){const t=i.uint32();switch(t>>>3){case 1:o.single=e.d7.decode(i,i.uint32());break;case 2:o.multi=e.GS.decode(i,i.uint32());break;default:i.skipType(7&t)}}return o},fromJSON(t){const n={single:void 0,multi:void 0};return(0,u.isSet)(t.single)&&(n.single=e.d7.fromJSON(t.single)),(0,u.isSet)(t.multi)&&(n.multi=e.GS.fromJSON(t.multi)),n},toJSON(t){const n={};return void 0!==t.single&&(n.single=t.single?e.d7.toJSON(t.single):void 0),void 0!==t.multi&&(n.multi=t.multi?e.GS.toJSON(t.multi):void 0),n},fromPartial(t){const n={single:void 0,multi:void 0};return void 0!==t.single&&null!==t.single&&(n.single=e.d7.fromPartial(t.single)),void 0!==t.multi&&null!==t.multi&&(n.multi=e.GS.fromPartial(t.multi)),n}},e.d7={typeUrl:"/cosmos.tx.v1beta1.Single",encode:(t,e=a.BinaryWriter.create())=>(0!==t.mode&&e.uint32(8).int32(t.mode),e),decode(t,e){const n=t instanceof a.BinaryReader?t:new a.BinaryReader(t);let i=void 0===e?n.len:n.pos+e;const r={mode:0};for(;n.pos<i;){const t=n.uint32();t>>>3==1?r.mode=n.int32():n.skipType(7&t)}return r},fromJSON(t){const e={mode:0};return(0,u.isSet)(t.mode)&&(e.mode=(0,r.signModeFromJSON)(t.mode)),e},toJSON(t){const e={};return void 0!==t.mode&&(e.mode=(0,r.signModeToJSON)(t.mode)),e},fromPartial(t){const e={mode:0};return e.mode=t.mode??0,e}},e.GS={typeUrl:"/cosmos.tx.v1beta1.Multi",encode(t,n=a.BinaryWriter.create()){void 0!==t.bitarray&&o.CompactBitArray.encode(t.bitarray,n.uint32(10).fork()).ldelim();for(const i of t.modeInfos)e.Sd.encode(i,n.uint32(18).fork()).ldelim();return n},decode(t,n){const i=t instanceof a.BinaryReader?t:new a.BinaryReader(t);let r=void 0===n?i.len:i.pos+n;const s={bitarray:void 0,modeInfos:[]};for(;i.pos<r;){const t=i.uint32();switch(t>>>3){case 1:s.bitarray=o.CompactBitArray.decode(i,i.uint32());break;case 2:s.modeInfos.push(e.Sd.decode(i,i.uint32()));break;default:i.skipType(7&t)}}return s},fromJSON(t){const n={bitarray:void 0,modeInfos:[]};return(0,u.isSet)(t.bitarray)&&(n.bitarray=o.CompactBitArray.fromJSON(t.bitarray)),Array.isArray(t?.modeInfos)&&(n.modeInfos=t.modeInfos.map((t=>e.Sd.fromJSON(t)))),n},toJSON(t){const n={};return void 0!==t.bitarray&&(n.bitarray=t.bitarray?o.CompactBitArray.toJSON(t.bitarray):void 0),t.modeInfos?n.modeInfos=t.modeInfos.map((t=>t?e.Sd.toJSON(t):void 0)):n.modeInfos=[],n},fromPartial(t){const n={bitarray:void 0,modeInfos:[]};return void 0!==t.bitarray&&null!==t.bitarray&&(n.bitarray=o.CompactBitArray.fromPartial(t.bitarray)),n.modeInfos=t.modeInfos?.map((t=>e.Sd.fromPartial(t)))||[],n}},e.jq={typeUrl:"/cosmos.tx.v1beta1.Fee",encode(t,e=a.BinaryWriter.create()){for(const n of t.amount)s.Coin.encode(n,e.uint32(10).fork()).ldelim();return t.gasLimit!==BigInt(0)&&e.uint32(16).uint64(t.gasLimit),""!==t.payer&&e.uint32(26).string(t.payer),""!==t.granter&&e.uint32(34).string(t.granter),e},decode(t,e){const n=t instanceof a.BinaryReader?t:new a.BinaryReader(t);let i=void 0===e?n.len:n.pos+e;const r=f();for(;n.pos<i;){const t=n.uint32();switch(t>>>3){case 1:r.amount.push(s.Coin.decode(n,n.uint32()));break;case 2:r.gasLimit=n.uint64();break;case 3:r.payer=n.string();break;case 4:r.granter=n.string();break;default:n.skipType(7&t)}}return r},fromJSON(t){const e=f();return Array.isArray(t?.amount)&&(e.amount=t.amount.map((t=>s.Coin.fromJSON(t)))),(0,u.isSet)(t.gasLimit)&&(e.gasLimit=BigInt(t.gasLimit.toString())),(0,u.isSet)(t.payer)&&(e.payer=String(t.payer)),(0,u.isSet)(t.granter)&&(e.granter=String(t.granter)),e},toJSON(t){const e={};return t.amount?e.amount=t.amount.map((t=>t?s.Coin.toJSON(t):void 0)):e.amount=[],void 0!==t.gasLimit&&(e.gasLimit=(t.gasLimit||BigInt(0)).toString()),void 0!==t.payer&&(e.payer=t.payer),void 0!==t.granter&&(e.granter=t.granter),e},fromPartial(t){const e=f();return e.amount=t.amount?.map((t=>s.Coin.fromPartial(t)))||[],void 0!==t.gasLimit&&null!==t.gasLimit&&(e.gasLimit=BigInt(t.gasLimit.toString())),e.payer=t.payer??"",e.granter=t.granter??"",e}},e.Y6={typeUrl:"/cosmos.tx.v1beta1.Tip",encode(t,e=a.BinaryWriter.create()){for(const n of t.amount)s.Coin.encode(n,e.uint32(10).fork()).ldelim();return""!==t.tipper&&e.uint32(18).string(t.tipper),e},decode(t,e){const n=t instanceof a.BinaryReader?t:new a.BinaryReader(t);let i=void 0===e?n.len:n.pos+e;const r={amount:[],tipper:""};for(;n.pos<i;){const t=n.uint32();switch(t>>>3){case 1:r.amount.push(s.Coin.decode(n,n.uint32()));break;case 2:r.tipper=n.string();break;default:n.skipType(7&t)}}return r},fromJSON(t){const e={amount:[],tipper:""};return Array.isArray(t?.amount)&&(e.amount=t.amount.map((t=>s.Coin.fromJSON(t)))),(0,u.isSet)(t.tipper)&&(e.tipper=String(t.tipper)),e},toJSON(t){const e={};return t.amount?e.amount=t.amount.map((t=>t?s.Coin.toJSON(t):void 0)):e.amount=[],void 0!==t.tipper&&(e.tipper=t.tipper),e},fromPartial(t){const e={amount:[],tipper:""};return e.amount=t.amount?.map((t=>s.Coin.fromPartial(t)))||[],e.tipper=t.tipper??"",e}}},12840:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Any=e.protobufPackage=void 0;const i=n(77973),r=n(92191);function o(){return{typeUrl:"",value:new Uint8Array}}e.protobufPackage="google.protobuf",e.Any={typeUrl:"/google.protobuf.Any",encode:(t,e=i.BinaryWriter.create())=>(""!==t.typeUrl&&e.uint32(10).string(t.typeUrl),0!==t.value.length&&e.uint32(18).bytes(t.value),e),decode(t,e){const n=t instanceof i.BinaryReader?t:new i.BinaryReader(t);let r=void 0===e?n.len:n.pos+e;const s=o();for(;n.pos<r;){const t=n.uint32();switch(t>>>3){case 1:s.typeUrl=n.string();break;case 2:s.value=n.bytes();break;default:n.skipType(7&t)}}return s},fromJSON(t){const e=o();return(0,r.isSet)(t.typeUrl)&&(e.typeUrl=String(t.typeUrl)),(0,r.isSet)(t.value)&&(e.value=(0,r.bytesFromBase64)(t.value)),e},toJSON(t){const e={};return void 0!==t.typeUrl&&(e.typeUrl=t.typeUrl),void 0!==t.value&&(e.value=(0,r.base64FromBytes)(void 0!==t.value?t.value:new Uint8Array)),e},fromPartial(t){const e=o();return e.typeUrl=t.typeUrl??"",e.value=t.value??new Uint8Array,e}}},92191:(t,e,n)=>{var i=n(1048).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.fromJsonTimestamp=e.fromTimestamp=e.toTimestamp=e.setPaginationParams=e.isObject=e.isSet=e.fromDuration=e.toDuration=e.omitDefault=e.base64FromBytes=e.bytesFromBase64=void 0;var r=(()=>{if(void 0!==r)return r;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw"Unable to locate global object"})();const o=r.atob||(t=>r.Buffer.from(t,"base64").toString("binary"));e.bytesFromBase64=function(t){const e=o(t),n=new Uint8Array(e.length);for(let t=0;t<e.length;++t)n[t]=e.charCodeAt(t);return n};const s=r.btoa||(t=>r.Buffer.from(t,"binary").toString("base64"));function a(t){return null!=t}function u(t){var e;return{seconds:(e=t.getTime()/1e3,BigInt(Math.trunc(e))),nanos:t.getTime()%1e3*1e6}}e.base64FromBytes=function(t){const e=[];return t.forEach((t=>{e.push(String.fromCharCode(t))})),s(e.join(""))},e.omitDefault=function(t){if("string"==typeof t)return""===t?void 0:t;if("number"==typeof t)return 0===t?void 0:t;if("bigint"==typeof t)return t===BigInt(0)?void 0:t;throw new Error("Got unsupported type "+typeof t)},e.toDuration=function(t){return{seconds:BigInt(Math.floor(parseInt(t)/1e9)),nanos:parseInt(t)%1e9}},e.fromDuration=function(t){return(1e9*parseInt(t.seconds.toString())+t.nanos).toString()},e.isSet=a,e.isObject=function(t){return"object"==typeof t&&null!==t},e.setPaginationParams=(t,e)=>e?(void 0!==e?.countTotal&&(t.params["pagination.count_total"]=e.countTotal),void 0!==e?.key&&(t.params["pagination.key"]=i.from(e.key).toString("base64")),void 0!==e?.limit&&(t.params["pagination.limit"]=e.limit.toString()),void 0!==e?.offset&&(t.params["pagination.offset"]=e.offset.toString()),void 0!==e?.reverse&&(t.params["pagination.reverse"]=e.reverse),t):t,e.toTimestamp=u,e.fromTimestamp=function(t){let e=1e3*Number(t.seconds);return e+=t.nanos/1e6,new Date(e)},e.fromJsonTimestamp=function(t){return t instanceof Date?u(t):"string"==typeof t?u(new Date(t)):{seconds:a((e=t).seconds)?BigInt(e.seconds.toString()):BigInt(0),nanos:a(e.nanos)?Number(e.nanos):0};var e}},57647:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.utf8Write=e.utf8Read=e.utf8Length=void 0,e.utf8Length=function(t){let e=0,n=0;for(let i=0;i<t.length;++i)n=t.charCodeAt(i),n<128?e+=1:n<2048?e+=2:55296==(64512&n)&&56320==(64512&t.charCodeAt(i+1))?(++i,e+=4):e+=3;return e},e.utf8Read=function(t,e,n){if(n-e<1)return"";const i=[];let r,o=[],s=0;for(;e<n;)r=t[e++],r<128?i[s++]=r:r>191&&r<224?i[s++]=(31&r)<<6|63&t[e++]:r>239&&r<365?(r=((7&r)<<18|(63&t[e++])<<12|(63&t[e++])<<6|63&t[e++])-65536,i[s++]=55296+(r>>10),i[s++]=56320+(1023&r)):i[s++]=(15&r)<<12|(63&t[e++])<<6|63&t[e++],s>8191&&((o||(o=[])).push(String.fromCharCode(...i)),s=0);return o?(s&&o.push(String.fromCharCode(...i.slice(0,s))),o.join("")):String.fromCharCode(...i.slice(0,s))},e.utf8Write=function(t,e,n){const i=n;let r,o;for(let i=0;i<t.length;++i)r=t.charCodeAt(i),r<128?e[n++]=r:r<2048?(e[n++]=r>>6|192,e[n++]=63&r|128):55296==(64512&r)&&56320==(64512&(o=t.charCodeAt(i+1)))?(r=65536+((1023&r)<<10)+(1023&o),++i,e[n++]=r>>18|240,e[n++]=r>>12&63|128,e[n++]=r>>6&63|128,e[n++]=63&r|128):(e[n++]=r>>12|224,e[n++]=r>>6&63|128,e[n++]=63&r|128);return n-i}},70190:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.writeByte=e.writeFixed32=e.int64Length=e.writeVarint64=e.writeVarint32=e.readInt32=e.readUInt32=e.zzDecode=e.zzEncode=e.varint32read=e.varint32write=e.uInt64ToString=e.int64ToString=e.int64FromString=e.varint64write=e.varint64read=void 0,e.varint64read=function(){let t=0,e=0;for(let n=0;n<28;n+=7){let i=this.buf[this.pos++];if(t|=(127&i)<<n,!(128&i))return this.assertBounds(),[t,e]}let n=this.buf[this.pos++];if(t|=(15&n)<<28,e=(112&n)>>4,!(128&n))return this.assertBounds(),[t,e];for(let n=3;n<=31;n+=7){let i=this.buf[this.pos++];if(e|=(127&i)<<n,!(128&i))return this.assertBounds(),[t,e]}throw new Error("invalid varint")},e.varint64write=function(t,e,n){for(let i=0;i<28;i+=7){const r=t>>>i,o=!(r>>>7==0&&0==e),s=255&(o?128|r:r);if(n.push(s),!o)return}const i=t>>>28&15|(7&e)<<4,r=!!(e>>3);if(n.push(255&(r?128|i:i)),r){for(let t=3;t<31;t+=7){const i=e>>>t,r=!(i>>>7==0),o=255&(r?128|i:i);if(n.push(o),!r)return}n.push(e>>>31&1)}};const n=4294967296;function i(t,e){if(({lo:t,hi:e}=function(t,e){return{lo:t>>>0,hi:e>>>0}}(t,e)),e<=2097151)return String(n*e+t);const i=16777215&(t>>>24|e<<8),r=e>>16&65535;let o=(16777215&t)+6777216*i+6710656*r,a=i+8147497*r,u=2*r;const c=1e7;return o>=c&&(a+=Math.floor(o/c),o%=c),a>=c&&(u+=Math.floor(a/c),a%=c),u.toString()+s(a)+s(o)}function r(t,e){return{lo:0|t,hi:0|e}}function o(t,e){return e=~e,t?t=1+~t:e+=1,r(t,e)}e.int64FromString=function(t){const e="-"===t[0];e&&(t=t.slice(1));const i=1e6;let s=0,a=0;function u(e,r){const o=Number(t.slice(e,r));a*=i,s=s*i+o,s>=n&&(a+=s/n|0,s%=n)}return u(-24,-18),u(-18,-12),u(-12,-6),u(-6),e?o(s,a):r(s,a)},e.int64ToString=function(t,e){let n=r(t,e);const s=2147483648&n.hi;s&&(n=o(n.lo,n.hi));const a=i(n.lo,n.hi);return s?"-"+a:a},e.uInt64ToString=i;const s=t=>{const e=String(t);return"0000000".slice(e.length)+e};e.varint32write=function(t,e){if(t>=0){for(;t>127;)e.push(127&t|128),t>>>=7;e.push(t)}else{for(let n=0;n<9;n++)e.push(127&t|128),t>>=7;e.push(1)}},e.varint32read=function(){let t=this.buf[this.pos++],e=127&t;if(!(128&t))return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(127&t)<<7,!(128&t))return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(127&t)<<14,!(128&t))return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(127&t)<<21,!(128&t))return this.assertBounds(),e;t=this.buf[this.pos++],e|=(15&t)<<28;for(let e=5;128&t&&e<10;e++)t=this.buf[this.pos++];if(128&t)throw new Error("invalid varint");return this.assertBounds(),e>>>0},e.zzEncode=function(t,e){let n=e>>31;return e=((e<<1|t>>>31)^n)>>>0,[t=(t<<1^n)>>>0,e]},e.zzDecode=function(t,e){let n=-(1&t);return[t=((t>>>1|e<<31)^n)>>>0,e=(e>>>1^n)>>>0]},e.readUInt32=function(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]},e.readInt32=function(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)},e.writeVarint32=function(t,e,n){for(;t>127;)e[n++]=127&t|128,t>>>=7;e[n]=t},e.writeVarint64=function(t,e,n){for(;t.hi;)e[n++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)e[n++]=127&t.lo|128,t.lo=t.lo>>>7;e[n++]=t.lo},e.int64Length=function(t,e){let n=(t>>>28|e<<4)>>>0,i=e>>>24;return 0===i?0===n?t<16384?t<128?1:2:t<2097152?3:4:n<16384?n<128?5:6:n<2097152?7:8:i<128?9:10},e.writeFixed32=function(t,e,n){e[n]=255&t,e[n+1]=t>>>8&255,e[n+2]=t>>>16&255,e[n+3]=t>>>24},e.writeByte=function(t,e,n){e[n]=255&t}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(Object("undefined"!=typeof self?self:this).webpackChunk_skip_go_widget=Object("undefined"!=typeof self?self:this).webpackChunk_skip_go_widget||[]).push([[414],{17414:(e,n,t)=>{t.r(n),t.d(n,{default:()=>W});var r,o=t(94741),i=t(27429),a=(r=function(e,n){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])},r(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function t(){this.constructor=e}r(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)});const c=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return a(n,e),n}(i.A);var s=t(39216),l=t.n(s),u=function(){var e=function(n,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])},e(n,t)};return function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=n}e(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}}(),d=function(){return d=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},d.apply(this,arguments)},f=function(e,n,t,r){return new(t||(t=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function c(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var n;e.done?o(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,c)}s((r=r.apply(e,n||[])).next())}))},p=function(e,n){var t,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(s){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(t=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=n.call(e,a)}catch(e){c=[6,e],r=0}finally{t=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,s])}}},h=function(e,n){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var r,o,i=t.call(e),a=[];try{for(;(void 0===n||n-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a};const v=function(e){function n(n,t){var r,i=e.call(this)||this;if(i._handleMessage=function(e){if(i._injectedProvider&&e.source===window||e.origin===i._providerUrl.origin&&e.source===i._popup)if("connected"===e.data.method){var n=new o.PublicKey(e.data.params.publicKey);i._publicKey&&i._publicKey.equals(n)||(i._publicKey&&!i._publicKey.equals(n)&&i._handleDisconnect(),i._publicKey=n,i._autoApprove=!!e.data.params.autoApprove,i.emit("connect",i._publicKey))}else if("disconnected"===e.data.method)i._handleDisconnect();else if((e.data.result||e.data.error)&&i._responsePromises.has(e.data.id)){var t=h(i._responsePromises.get(e.data.id),2),r=t[0],a=t[1];e.data.result?r(e.data.result):a(new Error(e.data.error))}},i._handleConnect=function(){return i._handlerAdded||(i._handlerAdded=!0,window.addEventListener("message",i._handleMessage),window.addEventListener("beforeunload",i.disconnect)),i._injectedProvider?new Promise((function(e){i._sendRequest("connect",{}),e()})):(window.name="parent",i._popup=window.open(i._providerUrl.toString(),"_blank","location,resizable,width=460,height=675"),new Promise((function(e){i.once("connect",e)})))},i._handleDisconnect=function(){i._handlerAdded&&(i._handlerAdded=!1,window.removeEventListener("message",i._handleMessage),window.removeEventListener("beforeunload",i.disconnect)),i._publicKey&&(i._publicKey=null,i.emit("disconnect")),i._responsePromises.forEach((function(e,n){var t=h(e,2),r=(t[0],t[1]);i._responsePromises.delete(n),r("Wallet disconnected")}))},i._sendRequest=function(e,n){return f(i,void 0,void 0,(function(){var t,r=this;return p(this,(function(o){if("connect"!==e&&!this.connected)throw new Error("Wallet not connected");return t=this._nextRequestId,++this._nextRequestId,[2,new Promise((function(o,i){r._responsePromises.set(t,[o,i]),r._injectedProvider?r._injectedProvider.postMessage({jsonrpc:"2.0",id:t,method:e,params:d({network:r._network},n)}):(r._popup.postMessage({jsonrpc:"2.0",id:t,method:e,params:n},r._providerUrl.origin),r.autoApprove||r._popup.focus())}))]}))}))},i.connect=function(){return i._popup&&i._popup.close(),i._handleConnect()},i.disconnect=function(){return f(i,void 0,void 0,(function(){return p(this,(function(e){switch(e.label){case 0:return this._injectedProvider?[4,this._sendRequest("disconnect",{})]:[3,2];case 1:e.sent(),e.label=2;case 2:return this._popup&&this._popup.close(),this._handleDisconnect(),[2]}}))}))},i.sign=function(e,n){return f(i,void 0,void 0,(function(){var t,r,i;return p(this,(function(a){switch(a.label){case 0:if(!(e instanceof Uint8Array))throw new Error("Data must be an instance of Uint8Array");return[4,this._sendRequest("sign",{data:e,display:n})];case 1:return t=a.sent(),r=l().decode(t.signature),i=new o.PublicKey(t.publicKey),[2,{signature:r,publicKey:i}]}}))}))},function(e){return"object"==typeof e&&null!==e}(r=n)&&function(e){return"function"==typeof e}(r.postMessage))i._injectedProvider=n;else{if(!function(e){return"string"==typeof e}(n))throw new Error("provider parameter must be an injected provider or a URL string.");i._providerUrl=new URL(n),i._providerUrl.hash=new URLSearchParams({origin:window.location.origin,network:t}).toString()}return i._network=t,i._publicKey=null,i._autoApprove=!1,i._popup=null,i._handlerAdded=!1,i._nextRequestId=1,i._responsePromises=new Map,i}return u(n,e),Object.defineProperty(n.prototype,"publicKey",{get:function(){return this._publicKey},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"connected",{get:function(){return null!==this._publicKey},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"autoApprove",{get:function(){return this._autoApprove},enumerable:!1,configurable:!0}),n}(i.A);var _=function(){var e=function(n,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])},e(n,t)};return function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=n}e(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}}(),y=function(e,n,t,r){return new(t||(t=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function c(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var n;e.done?o(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,c)}s((r=r.apply(e,n||[])).next())}))},m=function(e,n){var t,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(s){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(t=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=n.call(e,a)}catch(e){c=[6,e],r=0}finally{t=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,s])}}};const w=function(e){function n(n,t,r){var o=e.call(this)||this;return o._instance=null,o.handleMessage=function(e){},o._sendRequest=function(e,n){return y(o,void 0,void 0,(function(){var t,r;return m(this,(function(o){switch(o.label){case 0:return(null===(t=this._instance)||void 0===t?void 0:t.sendRequest)?[4,this._instance.sendRequest(e,n)]:[3,2];case 1:case 3:return[2,o.sent()];case 2:return(null===(r=this._instance)||void 0===r?void 0:r._sendRequest)?[4,this._instance._sendRequest(e,n)]:[3,4];case 4:throw new Error("Unsupported version of `@project-serum/sol-wallet-adapter`")}}))}))},o._handleConnect=function(){o.emit("connect")},o._handleDisconnect=function(){window.clearInterval(o._pollTimer),o.emit("disconnect")},o._network=t,o._provider=r,o}return _(n,e),Object.defineProperty(n.prototype,"publicKey",{get:function(){return this._instance.publicKey||null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"connected",{get:function(){return this._instance.connected||!1},enumerable:!1,configurable:!0}),n.prototype.connect=function(){return y(this,void 0,void 0,(function(){var e=this;return m(this,(function(n){switch(n.label){case 0:return this._instance=new v(this._provider,this._network),this._instance.on("connect",this._handleConnect),this._instance.on("disconnect",this._handleDisconnect),this._pollTimer=window.setInterval((function(){var n,t;!1!==(null===(t=null===(n=e._instance)||void 0===n?void 0:n._popup)||void 0===t?void 0:t.closed)&&e._handleDisconnect()}),200),[4,this._instance.connect()];case 1:return n.sent(),[2]}}))}))},n.prototype.disconnect=function(){return y(this,void 0,void 0,(function(){return m(this,(function(e){switch(e.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return this._instance.removeAllListeners("connect"),this._instance.removeAllListeners("disconnect"),[4,this._instance.disconnect()];case 1:return e.sent(),[2]}}))}))},n.prototype.signTransaction=function(e){return y(this,void 0,void 0,(function(){var n;return m(this,(function(t){switch(t.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return[4,this._sendRequest("signTransactionV2",{transaction:l().encode(e)})];case 1:return n=t.sent().transaction,[2,l().decode(n)]}}))}))},n.prototype.signAllTransactions=function(e){return y(this,void 0,void 0,(function(){return m(this,(function(n){switch(n.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return[4,this._sendRequest("signAllTransactionsV2",{transactions:e.map((function(e){return l().encode(e)}))})];case 1:return[2,n.sent().transactions.map((function(e){return l().decode(e)}))]}}))}))},n.prototype.signAndSendTransaction=function(e,n){return y(this,void 0,void 0,(function(){return m(this,(function(t){switch(t.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return[4,this._sendRequest("signAndSendTransaction",{transaction:l().encode(e),options:n})];case 1:return[2,t.sent().signature]}}))}))},n.prototype.signMessage=function(e,n){return void 0===n&&(n="hex"),y(this,void 0,void 0,(function(){var t;return m(this,(function(r){switch(r.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return[4,this._instance.sign(e,n)];case 1:return t=r.sent().signature,[2,Uint8Array.from(t)]}}))}))},n}(c),b={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let g;const P=new Uint8Array(16);function A(){if(!g&&(g="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!g))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return g(P)}const j=[];for(let e=0;e<256;++e)j.push((e+256).toString(16).slice(1));const E=function(e,n,t){if(b.randomUUID&&!n&&!e)return b.randomUUID();const r=(e=e||{}).random||(e.rng||A)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,n){t=t||0;for(let e=0;e<16;++e)n[t+e]=r[e];return n}return function(e,n=0){return j[e[n+0]]+j[e[n+1]]+j[e[n+2]]+j[e[n+3]]+"-"+j[e[n+4]]+j[e[n+5]]+"-"+j[e[n+6]]+j[e[n+7]]+"-"+j[e[n+8]]+j[e[n+9]]+"-"+j[e[n+10]]+j[e[n+11]]+j[e[n+12]]+j[e[n+13]]+j[e[n+14]]+j[e[n+15]]}(r)};var I=function(){var e=function(n,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])},e(n,t)};return function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=n}e(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}}(),S=function(){return S=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},S.apply(this,arguments)},x=function(e,n,t,r){return new(t||(t=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function c(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var n;e.done?o(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,c)}s((r=r.apply(e,n||[])).next())}))},O=function(e,n){var t,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(s){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(t=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=n.call(e,a)}catch(e){c=[6,e],r=0}finally{t=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,s])}}},T=function(e){function n(n,t){var r,i=this;return(i=e.call(this)||this)._publicKey=null,i._messageHandlers={},i.handleMessage=function(e){if(i._messageHandlers[e.id]){var n=i._messageHandlers[e.id],t=n.resolve,r=n.reject;delete i._messageHandlers[e.id],e.error?r(e.error):t(e.result)}},i._sendMessage=function(e){if(!i.connected)throw new Error("Wallet not connected");return new Promise((function(n,t){var r,o,a=E();i._messageHandlers[a]={resolve:n,reject:t},null===(o=null===(r=i._iframe)||void 0===r?void 0:r.contentWindow)||void 0===o||o.postMessage({channel:"solflareWalletAdapterToIframe",data:S({id:a},e)},"*")}))},i._iframe=n,i._publicKey=new o.PublicKey(null===(r=null==t?void 0:t.toString)||void 0===r?void 0:r.call(t)),i}return I(n,e),Object.defineProperty(n.prototype,"publicKey",{get:function(){return this._publicKey||null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"connected",{get:function(){return!0},enumerable:!1,configurable:!0}),n.prototype.connect=function(){return x(this,void 0,void 0,(function(){return O(this,(function(e){return[2]}))}))},n.prototype.disconnect=function(){return x(this,void 0,void 0,(function(){return O(this,(function(e){switch(e.label){case 0:return[4,this._sendMessage({method:"disconnect"})];case 1:return e.sent(),[2]}}))}))},n.prototype.signTransaction=function(e){var n;return x(this,void 0,void 0,(function(){var t,r;return O(this,(function(o){switch(o.label){case 0:if(!this.connected)throw new Error("Wallet not connected");o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this._sendMessage({method:"signTransaction",params:{transaction:l().encode(e)}})];case 2:return t=o.sent(),[2,l().decode(t)];case 3:throw r=o.sent(),new Error((null===(n=null==r?void 0:r.toString)||void 0===n?void 0:n.call(r))||"Failed to sign transaction");case 4:return[2]}}))}))},n.prototype.signAllTransactions=function(e){var n;return x(this,void 0,void 0,(function(){var t;return O(this,(function(r){switch(r.label){case 0:if(!this.connected)throw new Error("Wallet not connected");r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this._sendMessage({method:"signAllTransactions",params:{transactions:e.map((function(e){return l().encode(e)}))}})];case 2:return[2,r.sent().map((function(e){return l().decode(e)}))];case 3:throw t=r.sent(),new Error((null===(n=null==t?void 0:t.toString)||void 0===n?void 0:n.call(t))||"Failed to sign transactions");case 4:return[2]}}))}))},n.prototype.signAndSendTransaction=function(e,n){var t;return x(this,void 0,void 0,(function(){var r;return O(this,(function(o){switch(o.label){case 0:if(!this.connected)throw new Error("Wallet not connected");o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this._sendMessage({method:"signAndSendTransaction",params:{transaction:l().encode(e),options:n}})];case 2:return[2,o.sent()];case 3:throw r=o.sent(),new Error((null===(t=null==r?void 0:r.toString)||void 0===t?void 0:t.call(r))||"Failed to sign and send transaction");case 4:return[2]}}))}))},n.prototype.signMessage=function(e,n){var t;return void 0===n&&(n="hex"),x(this,void 0,void 0,(function(){var r,o;return O(this,(function(i){switch(i.label){case 0:if(!this.connected)throw new Error("Wallet not connected");i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this._sendMessage({method:"signMessage",params:{data:e,display:n}})];case 2:return r=i.sent(),[2,Uint8Array.from(l().decode(r))];case 3:throw o=i.sent(),new Error((null===(t=null==o?void 0:o.toString)||void 0===t?void 0:t.call(o))||"Failed to sign message");case 4:return[2]}}))}))},n}(c);const M=T;function k(e){return void 0===e.version}var K=function(){var e=function(n,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])},e(n,t)};return function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=n}e(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}}(),U=function(){return U=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},U.apply(this,arguments)},R=function(e,n,t,r){return new(t||(t=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function c(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var n;e.done?o(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,c)}s((r=r.apply(e,n||[])).next())}))},H=function(e,n){var t,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(s){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(t=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=n.call(e,a)}catch(e){c=[6,e],r=0}finally{t=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,s])}}};const W=function(e){function n(t){var r=e.call(this)||this;return r._network="mainnet-beta",r._provider=null,r._iframeParams={},r._adapterInstance=null,r._element=null,r._iframe=null,r._connectHandler=null,r._flutterHandlerInterval=null,r._handleEvent=function(e){var n,t,o,i;switch(e.type){case"connect_native_web":return r._collapseIframe(),r._adapterInstance=new w(r._iframe,r._network,(null===(n=e.data)||void 0===n?void 0:n.provider)||r._provider||"https://solflare.com/provider"),r._adapterInstance.on("connect",r._webConnected),r._adapterInstance.on("disconnect",r._webDisconnected),r._adapterInstance.connect(),void r._setPreferredAdapter("native_web");case"connect":return r._collapseIframe(),r._adapterInstance=new M(r._iframe,(null===(t=e.data)||void 0===t?void 0:t.publicKey)||""),r._adapterInstance.connect(),r._setPreferredAdapter(null===(o=e.data)||void 0===o?void 0:o.adapter),r._connectHandler&&(r._connectHandler.resolve(),r._connectHandler=null),void r.emit("connect",r.publicKey);case"disconnect":return r._connectHandler&&(r._connectHandler.reject(),r._connectHandler=null),r._disconnected(),void r.emit("disconnect");case"accountChanged":return void((null===(i=e.data)||void 0===i?void 0:i.publicKey)?(r._adapterInstance=new M(r._iframe,e.data.publicKey),r._adapterInstance.connect(),r.emit("accountChanged",r.publicKey)):r.emit("accountChanged",void 0));case"collapse":return void r._collapseIframe();default:return}},r._handleResize=function(e){"full"===e.resizeMode?"fullscreen"===e.params.mode?r._expandIframe():"hide"===e.params.mode&&r._collapseIframe():"coordinates"===e.resizeMode&&r._iframe&&(r._iframe.style.top=isFinite(e.params.top)?"".concat(e.params.top,"px"):"",r._iframe.style.bottom=isFinite(e.params.bottom)?"".concat(e.params.bottom,"px"):"",r._iframe.style.left=isFinite(e.params.left)?"".concat(e.params.left,"px"):"",r._iframe.style.right=isFinite(e.params.right)?"".concat(e.params.right,"px"):"",r._iframe.style.width=isFinite(e.params.width)?"".concat(e.params.width,"px"):e.params.width,r._iframe.style.height=isFinite(e.params.height)?"".concat(e.params.height,"px"):e.params.height)},r._handleMessage=function(e){var n;if("solflareIframeToWalletAdapter"===(null===(n=e.data)||void 0===n?void 0:n.channel)){var t=e.data.data||{};"event"===t.type?r._handleEvent(t.event):"resize"===t.type?r._handleResize(t):"response"===t.type&&r._adapterInstance&&r._adapterInstance.handleMessage(t)}},r._removeElement=function(){null!==r._flutterHandlerInterval&&(clearInterval(r._flutterHandlerInterval),r._flutterHandlerInterval=null),r._element&&(r._element.remove(),r._element=null)},r._removeDanglingElements=function(){var e,n,t=document.getElementsByClassName("solflare-wallet-adapter-iframe");try{for(var r=function(e){var n="function"==typeof Symbol&&Symbol.iterator,t=n&&e[n],r=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}(t),o=r.next();!o.done;o=r.next()){var i=o.value;i.parentElement&&i.remove()}}catch(n){e={error:n}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}},r._injectElement=function(){r._removeElement(),r._removeDanglingElements();var e=U(U({},r._iframeParams),{cluster:r._network||"mainnet-beta",origin:window.location.origin||"",title:document.title||"",version:1,sdkVersion:"1.4.2"}),t=r._getPreferredAdapter();t&&(e.adapter=t),r._provider&&(e.provider=r._provider);var o=Object.keys(e).map((function(n){return"".concat(n,"=").concat(encodeURIComponent(e[n]))})).join("&"),i="".concat(n.IFRAME_URL,"?").concat(o);r._element=document.createElement("div"),r._element.className="solflare-wallet-adapter-iframe",r._element.innerHTML="\n <iframe src='".concat(i,"' referrerPolicy='strict-origin-when-cross-origin' style='position: fixed; top: 0; bottom: 0; left: 0; right: 0; width: 100%; height: 100%; border: none; border-radius: 0; z-index: 99999; color-scheme: auto;' allowtransparency='true'></iframe>\n "),document.body.appendChild(r._element),r._iframe=r._element.querySelector("iframe"),window.fromFlutter=r._handleMobileMessage,r._flutterHandlerInterval=setInterval((function(){window.fromFlutter=r._handleMobileMessage}),100),window.addEventListener("message",r._handleMessage,!1)},r._collapseIframe=function(){r._iframe&&(r._iframe.style.top="",r._iframe.style.right="",r._iframe.style.height="2px",r._iframe.style.width="2px")},r._expandIframe=function(){r._iframe&&(r._iframe.style.top="0px",r._iframe.style.bottom="0px",r._iframe.style.left="0px",r._iframe.style.right="0px",r._iframe.style.width="100%",r._iframe.style.height="100%")},r._getPreferredAdapter=function(){return localStorage&&localStorage.getItem("solflarePreferredWalletAdapter")||null},r._setPreferredAdapter=function(e){localStorage&&e&&localStorage.setItem("solflarePreferredWalletAdapter",e)},r._clearPreferredAdapter=function(){localStorage&&localStorage.removeItem("solflarePreferredWalletAdapter")},r._webConnected=function(){r._connectHandler&&(r._connectHandler.resolve(),r._connectHandler=null),r.emit("connect",r.publicKey)},r._webDisconnected=function(){r._connectHandler&&(r._connectHandler.reject(),r._connectHandler=null),r._disconnected(),r.emit("disconnect")},r._disconnected=function(){window.removeEventListener("message",r._handleMessage,!1),r._removeElement(),r._clearPreferredAdapter(),r._adapterInstance=null},r._handleMobileMessage=function(e){var n,t;null===(t=null===(n=r._iframe)||void 0===n?void 0:n.contentWindow)||void 0===t||t.postMessage({channel:"solflareMobileToIframe",data:e},"*")},(null==t?void 0:t.network)&&(r._network=null==t?void 0:t.network),(null==t?void 0:t.provider)&&(r._provider=null==t?void 0:t.provider),(null==t?void 0:t.params)&&(r._iframeParams=U({},null==t?void 0:t.params)),r}return K(n,e),Object.defineProperty(n.prototype,"publicKey",{get:function(){var e;return(null===(e=this._adapterInstance)||void 0===e?void 0:e.publicKey)||null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isConnected",{get:function(){var e;return!!(null===(e=this._adapterInstance)||void 0===e?void 0:e.connected)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"connected",{get:function(){return this.isConnected},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"autoApprove",{get:function(){return!1},enumerable:!1,configurable:!0}),n.prototype.connect=function(){return R(this,void 0,void 0,(function(){var e=this;return H(this,(function(n){switch(n.label){case 0:return this.connected?[2]:(this._injectElement(),[4,new Promise((function(n,t){e._connectHandler={resolve:n,reject:t}}))]);case 1:return n.sent(),[2]}}))}))},n.prototype.disconnect=function(){return R(this,void 0,void 0,(function(){return H(this,(function(e){switch(e.label){case 0:return this._adapterInstance?[4,this._adapterInstance.disconnect()]:[2];case 1:return e.sent(),this._disconnected(),this.emit("disconnect"),[2]}}))}))},n.prototype.signTransaction=function(e){return R(this,void 0,void 0,(function(){var n,t;return H(this,(function(r){switch(r.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return n=k(e)?Uint8Array.from(e.serialize({verifySignatures:!1,requireAllSignatures:!1})):e.serialize(),[4,this._adapterInstance.signTransaction(n)];case 1:return t=r.sent(),[2,k(e)?o.Transaction.from(t):o.VersionedTransaction.deserialize(t)]}}))}))},n.prototype.signAllTransactions=function(e){return R(this,void 0,void 0,(function(){var n,t;return H(this,(function(r){switch(r.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return n=e.map((function(e){return k(e)?Uint8Array.from(e.serialize({verifySignatures:!1,requireAllSignatures:!1})):e.serialize()})),[4,this._adapterInstance.signAllTransactions(n)];case 1:if((t=r.sent()).length!==e.length)throw new Error("Failed to sign all transactions");return[2,t.map((function(n,t){return k(e[t])?o.Transaction.from(n):o.VersionedTransaction.deserialize(n)}))]}}))}))},n.prototype.signAndSendTransaction=function(e,n){return R(this,void 0,void 0,(function(){var t;return H(this,(function(r){switch(r.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return t=k(e)?e.serialize({verifySignatures:!1,requireAllSignatures:!1}):e.serialize(),[4,this._adapterInstance.signAndSendTransaction(t,n)];case 1:return[2,r.sent()]}}))}))},n.prototype.signMessage=function(e,n){return void 0===n&&(n="utf8"),R(this,void 0,void 0,(function(){return H(this,(function(t){switch(t.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return[4,this._adapterInstance.signMessage(e,n)];case 1:return[2,t.sent()]}}))}))},n.prototype.sign=function(e,n){return void 0===n&&(n="utf8"),R(this,void 0,void 0,(function(){return H(this,(function(t){switch(t.label){case 0:return[4,this.signMessage(e,n)];case 1:return[2,t.sent()]}}))}))},n.prototype.detectWallet=function(e){var n;return void 0===e&&(e=10),R(this,void 0,void 0,(function(){return H(this,(function(t){return window.SolflareApp||(null===(n=window.solflare)||void 0===n?void 0:n.isSolflare)?[2,!0]:[2,new Promise((function(n){var t,r;t=setInterval((function(){var e;(window.SolflareApp||(null===(e=window.solflare)||void 0===e?void 0:e.isSolflare))&&(clearInterval(t),clearTimeout(r),n(!0))}),500),r=setTimeout((function(){clearInterval(t),n(!1)}),1e3*e)}))]}))}))},n.IFRAME_URL="https://connect.solflare.com/",n}(i.A)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(Object("undefined"!=typeof self?self:this).webpackChunk_skip_go_widget=Object("undefined"!=typeof self?self:this).webpackChunk_skip_go_widget||[]).push([[544],{47544:(e,a,t)=>{t.d(a,{offchainLookup:()=>w,offchainLookupSignature:()=>y});var r=t(3814),s=t(40022),n=t(16308),o=t(62939);class c extends n.C{constructor({callbackSelector:e,cause:a,data:t,extraData:r,sender:s,urls:n}){super(a.shortMessage||"An error occurred while fetching for an offchain result.",{cause:a,metaMessages:[...a.metaMessages||[],a.metaMessages?.length?"":[],"Offchain Gateway Call:",n&&[" Gateway URL(s):",...n.map((e=>` ${(0,o.ID)(e)}`))],` Sender: ${s}`,` Data: ${t}`,` Callback selector: ${e}`,` Extra data: ${r}`].flat()}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupError"})}}class d extends n.C{constructor({result:e,url:a}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${(0,o.ID)(a)}`,`Response: ${(0,s.A)(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupResponseMalformedError"})}}class l extends n.C{constructor({sender:e,to:a}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${a}`,`OffchainLookup sender address: ${e}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupSenderMismatchError"})}}var u=t(38820),i=t(16395),f=t(58470),p=t(93606),h=t(30666),b=t(23785);const y="0x556f1830",m={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function w(e,{blockNumber:a,blockTag:t,data:s,to:n}){const{args:o}=(0,i.W)({data:s,abi:[m]}),[d,u,b,y,w]=o,{ccipRead:k}=e,O=k&&"function"==typeof k?.request?k.request:g;try{if(!(0,p.h)(n,d))throw new l({sender:d,to:n});const s=await O({data:b,sender:d,urls:u}),{data:o}=await(0,r.T)(e,{blockNumber:a,blockTag:t,data:(0,h.xW)([y,(0,f.h)([{type:"bytes"},{type:"bytes"}],[s,w])]),to:n});return o}catch(e){throw new c({callbackSelector:y,cause:e,data:s,extraData:w,sender:d,urls:u})}}async function g({data:e,sender:a,urls:t}){let r=new Error("An unknown error occurred.");for(let n=0;n<t.length;n++){const o=t[n],c=o.includes("{data}")?"GET":"POST",l="POST"===c?{data:e,sender:a}:void 0;try{const t=await fetch(o.replace("{sender}",a).replace("{data}",e),{body:JSON.stringify(l),method:c});let n;if(n=t.headers.get("Content-Type")?.startsWith("application/json")?(await t.json()).data:await t.text(),!t.ok){r=new u.Ci({body:l,details:n?.error?(0,s.A)(n.error):t.statusText,headers:t.headers,status:t.status,url:o});continue}if(!(0,b.q)(n)){r=new d({result:n,url:o});continue}return n}catch(e){r=new u.Ci({body:l,details:e.message,url:o})}}throw r}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(Object("undefined"!=typeof self?self:this).webpackChunk_skip_go_widget=Object("undefined"!=typeof self?self:this).webpackChunk_skip_go_widget||[]).push([[700],{62174:(e,t,n)=>{var r=n(1048).Buffer,o=n(75765),i={data:r.alloc(0),dataLength:0,sequence:0};t.A=function(e,t){return{makeBlocks:function(n){var o,i,c=r.concat([(o=n.length,i=r.alloc(2),i.writeUInt16BE(o,0),i),n]),s=t-5,a=Math.ceil(c.length/s);c=r.concat([c,r.alloc(a*s-c.length+1).fill(0)]);for(var u=[],d=0;d<a;d++){var l=r.alloc(5);l.writeUInt16BE(e,0),l.writeUInt8(5,2),l.writeUInt16BE(d,3);var h=c.slice(d*s,(d+1)*s);u.push(r.concat([l,h]))}return u},reduceResponse:function(t,n){var c=t||i,s=c.data,a=c.dataLength,u=c.sequence;if(n.readUInt16BE(0)!==e)throw new o.TransportError("Invalid channel","InvalidChannel");if(5!==n.readUInt8(2))throw new o.TransportError("Invalid tag","InvalidTag");if(n.readUInt16BE(3)!==u)throw new o.TransportError("Invalid sequence","InvalidSequence");t||(a=n.readUInt16BE(5)),u++;var d=n.slice(t?5:7);return(s=r.concat([s,d])).length>a&&(s=s.slice(0,a)),{data:s,dataLength:a,sequence:u}},getReducedResult:function(e){if(e&&e.dataLength===e.data.length)return e.data}}}},86700:(e,t,n)=>{n.r(t),n.d(t,{default:()=>X});var r=n(50046),o=n.n(r),i=n(75765);let c=0;const s=[],a=(e,t,n)=>{const r={type:e,id:String(++c),date:new Date};t&&(r.message=t),n&&(r.data=n),d(r)};class u{constructor(e,t){this.type=e,this.context=t}trace(e,t){(({type:e,message:t,data:n,context:r})=>{const o={type:e,id:String(++c),date:new Date};t&&(o.message=t),n&&(o.data=n),r&&(o.context=r),d(o)})({type:this.type,message:e,data:t,context:this.context})}getContext(){return this.context}setContext(e){this.context=e}updateContext(e){this.context=Object.assign(Object.assign({},this.context),e)}getType(){return this.type}setType(e){this.type=e}withType(e){return new u(e,this.context)}withContext(e){return new u(this.type,e)}withUpdatedContext(e){return new u(this.type,Object.assign(Object.assign({},this.context),e))}}function d(e){for(let t=0;t<s.length;t++)try{s[t](e)}catch(e){console.error(e)}}"undefined"!=typeof window&&(window.__ledgerLogsListen=e=>(s.push(e),()=>{const t=s.indexOf(e);-1!==t&&(s[t]=s[s.length-1],s.pop())}));var l=n(1048).Buffer,h=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function c(e){try{a(r.next(e))}catch(e){i(e)}}function s(e){try{a(r.throw(e))}catch(e){i(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(c,s)}a((r=r.apply(e,t||[])).next())}))};class p{constructor({context:e,logType:t}={}){this.exchangeTimeout=3e4,this.unresponsiveTimeout=15e3,this.deviceModel=null,this._events=new(o()),this.send=(e,t,n,r,...o)=>h(this,[e,t,n,r,...o],void 0,(function*(e,t,n,r,o=l.alloc(0),c=[i.StatusCodes.OK],{abortTimeoutMs:s}={}){const a=this.tracer.withUpdatedContext({function:"send"});if(o.length>=256)throw a.trace("data.length exceeded 256 bytes limit",{dataLength:o.length}),new i.TransportError("data.length exceed 256 bytes limit. Got: "+o.length,"DataLengthTooBig");a.trace("Starting an exchange",{abortTimeoutMs:s});const u=yield this.exchange(l.concat([l.from([e,t,n,r]),l.from([o.length]),o]),{abortTimeoutMs:s});a.trace("Received response from exchange");const d=u.readUInt16BE(u.length-2);if(!c.some((e=>e===d)))throw new i.TransportStatusError(d);return u})),this._appAPIlock=null,this.tracer=new u(null!=t?t:"transport",e)}exchange(e,{abortTimeoutMs:t}={}){throw new Error("exchange not implemented")}exchangeBulk(e,t){let n=!1;return(()=>h(this,void 0,void 0,(function*(){if(!n)for(const r of e){const e=yield this.exchange(r);if(n)return;const o=e.readUInt16BE(e.length-2);if(o!==i.StatusCodes.OK)throw new i.TransportStatusError(o);t.next(e)}})))().then((()=>!n&&t.complete()),(e=>!n&&t.error(e))),{unsubscribe:()=>{n=!0}}}setScrambleKey(e){}close(){return Promise.resolve()}on(e,t){this._events.on(e,t)}off(e,t){this._events.removeListener(e,t)}emit(e,...t){this._events.emit(e,...t)}setDebugMode(){console.warn("setDebugMode is deprecated. use @ledgerhq/logs instead. No logs are emitted in this anymore.")}setExchangeTimeout(e){this.exchangeTimeout=e}setExchangeUnresponsiveTimeout(e){this.unresponsiveTimeout=e}static create(e=3e3,t){return new Promise(((n,r)=>{let o=!1;const c=this.listen({next:t=>{o=!0,c&&c.unsubscribe(),s&&clearTimeout(s),this.open(t.descriptor,e).then(n,r)},error:e=>{s&&clearTimeout(s),r(e)},complete:()=>{s&&clearTimeout(s),o||r(new i.TransportError(this.ErrorMessage_NoDeviceFound,"NoDeviceFound"))}}),s=t?setTimeout((()=>{c.unsubscribe(),r(new i.TransportError(this.ErrorMessage_ListenTimeout,"ListenTimeout"))}),t):null}))}exchangeAtomicImpl(e){return h(this,void 0,void 0,(function*(){const t=this.tracer.withUpdatedContext({function:"exchangeAtomicImpl",unresponsiveTimeout:this.unresponsiveTimeout});if(this.exchangeBusyPromise)throw t.trace("Atomic exchange is already busy"),new i.TransportRaceCondition("An action was already pending on the Ledger device. Please deny or reconnect.");let n;const r=new Promise((e=>{n=e}));this.exchangeBusyPromise=r;let o=!1;const c=setTimeout((()=>{t.trace('Timeout reached, emitting Transport event "unresponsive"',{unresponsiveTimeout:this.unresponsiveTimeout}),o=!0,this.emit("unresponsive")}),this.unresponsiveTimeout);try{const n=yield e();return o&&(t.trace("Device was unresponsive, emitting responsive"),this.emit("responsive")),n}finally{t.trace("Finalize, clearing busy guard"),clearTimeout(c),n&&n(),this.exchangeBusyPromise=null}}))}decorateAppAPIMethods(e,t,n){for(const r of t)e[r]=this.decorateAppAPIMethod(r,e[r],e,n)}decorateAppAPIMethod(e,t,n,r){return(...o)=>h(this,void 0,void 0,(function*(){const{_appAPIlock:c}=this;if(c)return Promise.reject(new i.TransportError("Ledger Device is busy (lock "+c+")","TransportLocked"));try{return this._appAPIlock=e,this.setScrambleKey(r),yield t.apply(n,o)}finally{this._appAPIlock=null}}))}setTraceContext(e){this.tracer=this.tracer.withContext(e)}updateTraceContext(e){this.tracer.updateContext(e)}getTraceContext(){return this.tracer.getContext()}}p.ErrorMessage_ListenTimeout="No Ledger device found (timeout)",p.ErrorMessage_NoDeviceFound="No Ledger device found";const f=p;var v,g,m=n(62174),y=n(2722),w=n.n(y),b=function(){return b=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},b.apply(this,arguments)};!function(e){e.blue="blue",e.nanoS="nanoS",e.nanoSP="nanoSP",e.nanoX="nanoX",e.nanoFTS="nanoFTS"}(g||(g={}));var x=((v={})[g.blue]={id:g.blue,productName:"Ledger Blue",productIdMM:0,legacyUsbProductId:0,usbOnly:!0,memorySize:491520,masks:[822083584,822149120],getBlockSize:function(e){return 4096}},v[g.nanoS]={id:g.nanoS,productName:"Ledger Nano S",productIdMM:16,legacyUsbProductId:1,usbOnly:!0,memorySize:327680,masks:[823132160],getBlockSize:function(e){var t;return w().lt(null!==(t=w().coerce(e))&&void 0!==t?t:"","2.0.0")?4096:2048}},v[g.nanoSP]={id:g.nanoSP,productName:"Ledger Nano S Plus",productIdMM:80,legacyUsbProductId:5,usbOnly:!0,memorySize:1572864,masks:[856686592],getBlockSize:function(e){return 32}},v[g.nanoX]={id:g.nanoX,productName:"Ledger Nano X",productIdMM:64,legacyUsbProductId:4,usbOnly:!1,memorySize:2097152,masks:[855638016],getBlockSize:function(e){return 4096},bluetoothSpec:[{serviceUuid:"13d63400-2c97-0004-0000-4c6564676572",notifyUuid:"13d63400-2c97-0004-0001-4c6564676572",writeUuid:"13d63400-2c97-0004-0002-4c6564676572",writeCmdUuid:"13d63400-2c97-0004-0003-4c6564676572"}]},v[g.nanoFTS]={id:g.nanoFTS,productName:"Ledger Nano FTS",productIdMM:96,legacyUsbProductId:6,usbOnly:!1,memorySize:2097152,masks:[857735168],getBlockSize:function(e){return 4096},bluetoothSpec:[{serviceUuid:"13d63400-2c97-6004-0000-4c6564676572",notifyUuid:"13d63400-2c97-6004-0001-4c6564676572",writeUuid:"13d63400-2c97-6004-0002-4c6564676572",writeCmdUuid:"13d63400-2c97-6004-0003-4c6564676572"}]},v),T=(g.blue,g.nanoS,g.nanoSP,g.nanoX,g.nanoFTS,Object.values(x)),S=function(e){var t=T.find((function(t){return t.legacyUsbProductId===e}));if(t)return t;var n=e>>8;return T.find((function(e){return e.productIdMM===n}))},I=[],k={};for(var P in x){var E=x[P],_=E.bluetoothSpec;if(_)for(var U=0;U<_.length;U++){var M=_[U];I.push(M.serviceUuid),k[M.serviceUuid]=k[M.serviceUuid.replace(/-/g,"")]=b({deviceModel:E},M)}}var C,L=n(1048).Buffer,O=(C=function(e,t){return C=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},C(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}C(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),B=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function c(e){try{a(r.next(e))}catch(e){i(e)}}function s(e){try{a(r.throw(e))}catch(e){i(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(c,s)}a((r=r.apply(e,t||[])).next())}))},A=function(e,t){var n,r,o,i,c={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;c;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return c.label++,{value:i[1],done:!1};case 5:c.label++,r=i[1],i=[0];continue;case 7:i=c.ops.pop(),c.trys.pop();continue;default:if(!((o=(o=c.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){c=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){c.label=i[1];break}if(6===i[0]&&c.label<o[1]){c.label=o[1],o=i;break}if(o&&c.label<o[2]){c.label=o[2],c.ops.push(i);break}o[2]&&c.ops.pop(),c.trys.pop();continue}i=t.call(e,c)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},D=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),c=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)c.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return c},N=[{vendorId:11415}],j=function(){return Promise.resolve(!(!window.navigator||!window.navigator.hid))},z=function(){var e=navigator.hid;if(!e)throw new i.TransportError("navigator.hid is not supported","HIDNotSupported");return e};function R(){return B(this,void 0,void 0,(function(){var e;return A(this,(function(t){switch(t.label){case 0:return[4,z().requestDevice({filters:N})];case 1:return e=t.sent(),Array.isArray(e)?[2,e]:[2,[e]]}}))}))}function F(){return B(this,void 0,void 0,(function(){return A(this,(function(e){switch(e.label){case 0:return[4,z().getDevices()];case 1:return[2,e.sent().filter((function(e){return 11415===e.vendorId}))]}}))}))}var q=function(e){function t(t){var n=e.call(this)||this;return n.channel=Math.floor(65535*Math.random()),n.packetSize=64,n.inputs=[],n.read=function(){return n.inputs.length?Promise.resolve(n.inputs.shift()):new Promise((function(e){n.inputCallback=e}))},n.onInputReport=function(e){var t=L.from(e.data.buffer);n.inputCallback?(n.inputCallback(t),n.inputCallback=null):n.inputs.push(t)},n._disconnectEmitted=!1,n._emitDisconnect=function(e){n._disconnectEmitted||(n._disconnectEmitted=!0,n.emit("disconnect",e))},n.exchange=function(e){return B(n,void 0,void 0,(function(){var t=this;return A(this,(function(n){switch(n.label){case 0:return[4,this.exchangeAtomicImpl((function(){return B(t,void 0,void 0,(function(){var t,n,r,o,i,c,s,u,d;return A(this,(function(l){switch(l.label){case 0:n=(t=this).channel,r=t.packetSize,a("apdu","=> "+e.toString("hex")),o=(0,m.A)(n,r),i=o.makeBlocks(e),c=0,l.label=1;case 1:return c<i.length?[4,this.device.sendReport(0,i[c])]:[3,4];case 2:l.sent(),l.label=3;case 3:return c++,[3,1];case 4:return(s=o.getReducedResult(u))?[3,6]:[4,this.read()];case 5:return d=l.sent(),u=o.reduceResponse(u,d),[3,4];case 6:return a("apdu","<= "+s.toString("hex")),[2,s]}}))}))})).catch((function(e){if(e&&e.message&&e.message.includes("write"))throw t._emitDisconnect(e),new i.DisconnectedDeviceDuringOperation(e.message);throw e}))];case 1:return[2,n.sent()]}}))}))},n.device=t,n.deviceModel="number"==typeof t.productId?S(t.productId):void 0,t.addEventListener("inputreport",n.onInputReport),n}return O(t,e),t.request=function(){return B(this,void 0,void 0,(function(){var e,n;return A(this,(function(r){switch(r.label){case 0:return[4,R()];case 1:return e=D.apply(void 0,[r.sent(),1]),n=e[0],[2,t.open(n)]}}))}))},t.openConnected=function(){return B(this,void 0,void 0,(function(){var e;return A(this,(function(n){switch(n.label){case 0:return[4,F()];case 1:return 0===(e=n.sent()).length?[2,null]:[2,t.open(e[0])]}}))}))},t.open=function(e){return B(this,void 0,void 0,(function(){var n,r;return A(this,(function(o){switch(o.label){case 0:return[4,e.open()];case 1:return o.sent(),n=new t(e),r=function(t){e===t.device&&(z().removeEventListener("disconnect",r),n._emitDisconnect(new i.DisconnectedDevice))},z().addEventListener("disconnect",r),[2,n]}}))}))},t.prototype.close=function(){return B(this,void 0,void 0,(function(){return A(this,(function(e){switch(e.label){case 0:return[4,this.exchangeBusyPromise];case 1:return e.sent(),this.device.removeEventListener("inputreport",this.onInputReport),[4,this.device.close()];case 2:return e.sent(),[2]}}))}))},t.prototype.setScrambleKey=function(){},t.isSupported=j,t.list=F,t.listen=function(e){var t=!1;return function(){return B(this,void 0,void 0,(function(){var e;return A(this,(function(t){switch(t.label){case 0:return[4,F()];case 1:return(e=t.sent()).length>0?[2,e[0]]:[4,R()];case 2:return[2,t.sent()[0]]}}))}))}().then((function(n){if(n){if(!t){var r="number"==typeof n.productId?S(n.productId):void 0;e.next({type:"add",descriptor:n,deviceModel:r}),e.complete()}}else e.error(new i.TransportOpenUserCancelled("Access denied to use Ledger device"))}),(function(t){e.error(new i.TransportOpenUserCancelled(t.message))})),{unsubscribe:function(){t=!0}}},t}(f);const X=q}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(Object("undefined"!=typeof self?self:this).webpackChunk_skip_go_widget=Object("undefined"!=typeof self?self:this).webpackChunk_skip_go_widget||[]).push([[772],{83772:(e,t,n)=>{n.r(t),n.d(t,{StandardSolflareMetaMaskWalletAccount:()=>j,default:()=>H});var i=n(94741),s=n(27429),r=n(39216),o=n.n(r);const a={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let c;const d=new Uint8Array(16);function l(){if(!c&&(c="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!c))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return c(d)}const h=[];for(let e=0;e<256;++e)h.push((e+256).toString(16).slice(1));const u=function(e,t,n){if(a.randomUUID&&!t&&!e)return a.randomUUID();const i=(e=e||{}).random||(e.rng||l)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=i[e];return t}return function(e,t=0){return h[e[t+0]]+h[e[t+1]]+h[e[t+2]]+h[e[t+3]]+"-"+h[e[t+4]]+h[e[t+5]]+"-"+h[e[t+6]]+h[e[t+7]]+"-"+h[e[t+8]]+h[e[t+9]]+"-"+h[e[t+10]]+h[e[t+11]]+h[e[t+12]]+h[e[t+13]]+h[e[t+14]]+h[e[t+15]]}(i)};function f(e){return void 0===e.version}function m(e){return f(e)?e.serialize({verifySignatures:!1,requireAllSignatures:!1}):e.serialize()}n(1048).Buffer;var p=function(e,t,n,i){return new(n||(n=Promise))((function(s,r){function o(e){try{c(i.next(e))}catch(e){r(e)}}function a(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((i=i.apply(e,t||[])).next())}))};function g(e){return p(this,void 0,void 0,(function*(){try{return yield e.request({method:"wallet_getSnaps"}),!0}catch(e){return!1}}))}var _=n(63957),v=n(52218),w=n(90465);const y=["solana:mainnet","solana:devnet","solana:testnet","solana:localnet"];function b(e){return y.includes(e)}var E,M,T,S,A,k,x=function(e,t,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)},K=function(e,t,n,i,s){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?s.call(e,n):s?s.value=n:t.set(e,n),n};const C=y,I=[_.R,v.q,w.F];class j{get address(){return x(this,E,"f")}get publicKey(){return x(this,M,"f").slice()}get chains(){return x(this,T,"f").slice()}get features(){return x(this,S,"f").slice()}get label(){return x(this,A,"f")}get icon(){return x(this,k,"f")}constructor({address:e,publicKey:t,label:n,icon:i}){E.set(this,void 0),M.set(this,void 0),T.set(this,void 0),S.set(this,void 0),A.set(this,void 0),k.set(this,void 0),new.target===j&&Object.freeze(this),K(this,E,e,"f"),K(this,M,t,"f"),K(this,T,C,"f"),K(this,S,I,"f"),K(this,A,n,"f"),K(this,k,i,"f")}}E=new WeakMap,M=new WeakMap,T=new WeakMap,S=new WeakMap,A=new WeakMap,k=new WeakMap;var z=function(e,t,n,i){return new(n||(n=Promise))((function(s,r){function o(e){try{c(i.next(e))}catch(e){r(e)}}function a(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((i=i.apply(e,t||[])).next())}))};class P extends s.A{constructor(e){super(),this._network="mainnet-beta",this._iframeParams={},this._element=null,this._iframe=null,this._publicKey=null,this._account=null,this._isConnected=!1,this._connectHandler=null,this._messageHandlers={},this._handleEvent=e=>{var t,n;switch(e.type){case"connect":return this._collapseIframe(),void((null===(t=e.data)||void 0===t?void 0:t.publicKey)?(this._publicKey=e.data.publicKey,this._isConnected=!0,this._connectHandler&&(this._connectHandler.resolve(),this._connectHandler=null),this._connected()):(this._connectHandler&&(this._connectHandler.reject(),this._connectHandler=null),this._disconnected()));case"disconnect":return this._connectHandler&&(this._connectHandler.reject(),this._connectHandler=null),void this._disconnected();case"accountChanged":return void((null===(n=e.data)||void 0===n?void 0:n.publicKey)?(this._publicKey=e.data.publicKey,this.emit("accountChanged",this.publicKey),this._standardConnected()):(this.emit("accountChanged",void 0),this._standardDisconnected()));default:return}},this._handleResize=e=>{"full"===e.resizeMode?"fullscreen"===e.params.mode?this._expandIframe():"hide"===e.params.mode&&this._collapseIframe():"coordinates"===e.resizeMode&&this._resizeIframe(e.params)},this._handleMessage=e=>{var t;if("solflareIframeToWalletAdapter"!==(null===(t=e.data)||void 0===t?void 0:t.channel))return;const n=e.data.data||{};if("event"===n.type)this._handleEvent(n.event);else if("resize"===n.type)this._handleResize(n);else if("response"===n.type&&this._messageHandlers[n.id]){const{resolve:e,reject:t}=this._messageHandlers[n.id];delete this._messageHandlers[n.id],n.error?t(n.error):e(n.result)}},this._removeElement=()=>{this._element&&(this._element.remove(),this._element=null)},this._removeDanglingElements=()=>{const e=document.getElementsByClassName("solflare-metamask-wallet-adapter-iframe");for(const t of e)t.parentElement&&t.remove()},this._injectElement=()=>{this._removeElement(),this._removeDanglingElements();const e=Object.assign(Object.assign({},this._iframeParams),{mm:!0,v:1,cluster:this._network||"mainnet-beta",origin:window.location.origin||"",title:document.title||""}),t=Object.keys(e).map((t=>`${t}=${encodeURIComponent(e[t])}`)).join("&"),n=`${P.IFRAME_URL}?${t}`;this._element=document.createElement("div"),this._element.className="solflare-metamask-wallet-adapter-iframe",this._element.innerHTML=`\n <iframe src='${n}' style='position: fixed; top: 0; bottom: 0; left: 0; right: 0; width: 100%; height: 100%; border: none; border-radius: 0; z-index: 99999; color-scheme: auto;' allowtransparency='true'></iframe>\n `,document.body.appendChild(this._element),this._iframe=this._element.querySelector("iframe"),window.addEventListener("message",this._handleMessage,!1)},this._collapseIframe=()=>{this._iframe&&(this._iframe.style.top="",this._iframe.style.right="",this._iframe.style.height="2px",this._iframe.style.width="2px")},this._expandIframe=()=>{this._iframe&&(this._iframe.style.top="0px",this._iframe.style.bottom="0px",this._iframe.style.left="0px",this._iframe.style.right="0px",this._iframe.style.width="100%",this._iframe.style.height="100%")},this._resizeIframe=e=>{this._iframe&&(this._iframe.style.top=isFinite(e.top)?`${e.top}px`:"",this._iframe.style.bottom=isFinite(e.bottom)?`${e.bottom}px`:"",this._iframe.style.left=isFinite(e.left)?`${e.left}px`:"",this._iframe.style.right=isFinite(e.right)?`${e.right}px`:"",this._iframe.style.width=isFinite(e.width)?`${e.width}px`:e.width,this._iframe.style.height=isFinite(e.height)?`${e.height}px`:e.height)},this._sendIframeMessage=e=>{if(!this.connected||!this.publicKey)throw new Error("Wallet not connected");return new Promise(((t,n)=>{var i,s;const r=u();this._messageHandlers[r]={resolve:t,reject:n},null===(s=null===(i=this._iframe)||void 0===i?void 0:i.contentWindow)||void 0===s||s.postMessage({channel:"solflareWalletAdapterToIframe",data:Object.assign({id:r},e)},"*")}))},this._connected=()=>{this._isConnected=!0,this.emit("connect",this.publicKey),this._standardConnected()},this._disconnected=()=>{this._publicKey=null,this._isConnected=!1,window.removeEventListener("message",this._handleMessage,!1),this._removeElement(),this.emit("disconnect"),this._standardDisconnected()},this._standardConnected=()=>{if(!this.publicKey)return;const e=this.publicKey.toString();this._account&&this._account.address===e||(this._account=new j({address:e,publicKey:this.publicKey.toBytes()}),this.emit("standard_change",{accounts:this.standardAccounts}))},this._standardDisconnected=()=>{this._account&&(this._account=null,this.emit("standard_change",{accounts:this.standardAccounts}))},(null==e?void 0:e.network)&&(this._network=null==e?void 0:e.network),window.SolflareMetaMaskParams&&(this._iframeParams=Object.assign(Object.assign({},this._iframeParams),window.SolflareMetaMaskParams)),(null==e?void 0:e.params)&&(this._iframeParams=Object.assign(Object.assign({},this._iframeParams),null==e?void 0:e.params))}get publicKey(){return this._publicKey?new i.PublicKey(this._publicKey):null}get standardAccount(){return this._account}get standardAccounts(){return this._account?[this._account]:[]}get isConnected(){return this._isConnected}get connected(){return this.isConnected}get autoApprove(){return!1}connect(){return z(this,void 0,void 0,(function*(){this.connected||(this._injectElement(),yield new Promise(((e,t)=>{this._connectHandler={resolve:e,reject:t}})))}))}disconnect(){return z(this,void 0,void 0,(function*(){yield this._sendIframeMessage({method:"disconnect"}),this._disconnected()}))}signTransaction(e){var t;return z(this,void 0,void 0,(function*(){if(!this.connected||!this.publicKey)throw new Error("Wallet not connected");try{const t=m(e),n=yield this._sendIframeMessage({method:"signTransactionV2",params:{transaction:o().encode(t)}}),{transaction:s}=n;return f(e)?i.Transaction.from(o().decode(s)):i.VersionedTransaction.deserialize(o().decode(s))}catch(e){throw new Error((null===(t=null==e?void 0:e.toString)||void 0===t?void 0:t.call(e))||"Failed to sign transaction")}}))}signAllTransactions(e){var t;return z(this,void 0,void 0,(function*(){if(!this.connected||!this.publicKey)throw new Error("Wallet not connected");try{const t=e.map((e=>m(e))),{transactions:n}=yield this._sendIframeMessage({method:"signAllTransactionsV2",params:{transactions:t.map((e=>o().encode(e)))}});return n.map(((t,n)=>f(e[n])?i.Transaction.from(o().decode(t)):i.VersionedTransaction.deserialize(o().decode(t))))}catch(e){throw new Error((null===(t=null==e?void 0:e.toString)||void 0===t?void 0:t.call(e))||"Failed to sign transactions")}}))}signAndSendTransaction(e,t){var n;return z(this,void 0,void 0,(function*(){if(!this.connected||!this.publicKey)throw new Error("Wallet not connected");try{const n=m(e),{signature:i}=yield this._sendIframeMessage({method:"signAndSendTransaction",params:{transaction:o().encode(n),options:t}});return i}catch(e){throw new Error((null===(n=null==e?void 0:e.toString)||void 0===n?void 0:n.call(e))||"Failed to sign and send transaction")}}))}signMessage(e,t="utf8"){var n;return z(this,void 0,void 0,(function*(){if(!this.connected||!this.publicKey)throw new Error("Wallet not connected");try{const{signature:n}=yield this._sendIframeMessage({method:"signMessage",params:{data:o().encode(e),display:t}});return Uint8Array.from(o().decode(n))}catch(e){throw new Error((null===(n=null==e?void 0:e.toString)||void 0===n?void 0:n.call(e))||"Failed to sign message")}}))}sign(e,t="utf8"){return z(this,void 0,void 0,(function*(){return yield this.signMessage(e,t)}))}static isSupported(){return z(this,void 0,void 0,(function*(){return!!(yield function(){return p(this,void 0,void 0,(function*(){try{const e=window.ethereum;if(!e)return null;if(e.providers&&Array.isArray(e.providers)){const t=e.providers;for(const e of t)if(yield g(e))return e}if(e.detected&&Array.isArray(e.detected)){const t=e.detected;for(const e of t)if(yield g(e))return e}return(yield g(e))?e:null}catch(e){return console.error(e),null}}))}())}))}standardSignAndSendTransaction(...e){return z(this,void 0,void 0,(function*(){if(!this.connected)throw new Error("not connected");const t=[];if(1===e.length){const{transaction:n,account:s,chain:r,options:a}=e[0],{minContextSlot:c,preflightCommitment:d,skipPreflight:l,maxRetries:h}=a||{};if(s!==this._account)throw new Error("invalid account");if(!b(r))throw new Error("invalid chain");const u=yield this.signAndSendTransaction(i.VersionedTransaction.deserialize(n),{preflightCommitment:d,minContextSlot:c,maxRetries:h,skipPreflight:l});t.push({signature:o().decode(u)})}else if(e.length>1)for(const n of e)t.push(...yield this.standardSignAndSendTransaction(n));return t}))}standardSignTransaction(...e){return z(this,void 0,void 0,(function*(){if(!this.connected)throw new Error("not connected");const t=[];if(1===e.length){const{transaction:n,account:s,chain:r}=e[0];if(s!==this._account)throw new Error("invalid account");if(r&&!b(r))throw new Error("invalid chain");const o=yield this.signTransaction(i.VersionedTransaction.deserialize(n));t.push({signedTransaction:o.serialize()})}else if(e.length>1){let n;for(const t of e){if(t.account!==this._account)throw new Error("invalid account");if(t.chain){if(!b(t.chain))throw new Error("invalid chain");if(n){if(t.chain!==n)throw new Error("conflicting chain")}else n=t.chain}}const s=e.map((({transaction:e})=>i.VersionedTransaction.deserialize(e))),r=yield this.signAllTransactions(s);t.push(...r.map((e=>({signedTransaction:e.serialize()}))))}return t}))}standardSignMessage(...e){return z(this,void 0,void 0,(function*(){if(!this.connected)throw new Error("not connected");const t=[];if(1===e.length){const{message:n,account:i}=e[0];if(i!==this._account)throw new Error("invalid account");const s=yield this.signMessage(n);t.push({signedMessage:n,signature:s})}else if(e.length>1)for(const n of e)t.push(...yield this.standardSignMessage(n));return t}))}}P.IFRAME_URL="https://widget.solflare.com/";const H=P}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(Object("undefined"!=typeof self?self:this).webpackChunk_skip_go_widget=Object("undefined"!=typeof self?self:this).webpackChunk_skip_go_widget||[]).push([[854],{48854:(e,t,s)=>{s.d(t,{NameService:()=>r});class r{client;registry;constructor(e,t){this.client=e,this.registry=t}async resolveName(e){try{const{contract:t,getQueryMsg:s}=this.registry;return await this.client.queryContractSmart(t,s(e))}catch(e){return void console?.error(e)}}}}}]);
|