@dodoex/wallet-web3 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{__tslib-cf28c574.js → __tslib-6e4ae2f5.js} +1 -1
- package/dist/{alchemy-provider-5870b6fa-e4fa48d3.js → alchemy-provider-5870b6fa-bb821a34.js} +1 -1
- package/dist/{alchemy-websocket-provider-213da986-dc2bcf5c.js → alchemy-websocket-provider-213da986-702b5398.js} +1 -1
- package/dist/{blocto-2fb1d4e9.js → blocto-c38e644a.js} +1 -1
- package/dist/{ccip-3c08ea13.js → ccip-86a505f2.js} +1 -1
- package/dist/cjs/{__tslib-c375fca0.cjs → __tslib-44b18af7.cjs} +1 -1
- package/dist/cjs/{alchemy-provider-5870b6fa-00140867.cjs → alchemy-provider-5870b6fa-38f9ed80.cjs} +1 -1
- package/dist/cjs/{alchemy-websocket-provider-213da986-b2e3ea59.cjs → alchemy-websocket-provider-213da986-fb48ef07.cjs} +1 -1
- package/dist/cjs/{blocto-b086f036.cjs → blocto-7eb7575b.cjs} +1 -1
- package/dist/cjs/{ccip-248539f9.cjs → ccip-a63a44a2.cjs} +1 -1
- package/dist/cjs/{draggabilly-f7eacd66.cjs → draggabilly-76e13056.cjs} +1 -1
- package/dist/cjs/id-749531a6.cjs +1 -0
- package/dist/cjs/{index-fd28b030.cjs → index-0029a709.cjs} +1 -1
- package/dist/cjs/{index-d965eac9.cjs → index-10979fb2.cjs} +1 -1
- package/dist/cjs/{index-9dd3dd7e.cjs → index-3617a04a.cjs} +1 -1
- package/dist/cjs/{index-908a0281.cjs → index-563a38d7.cjs} +1 -1
- package/dist/cjs/{index-83b277b8.cjs → index-56a82537.cjs} +7 -7
- package/dist/cjs/{index-e65f9734.cjs → index-6c5027af.cjs} +3 -3
- package/dist/cjs/{index-2659a245.cjs → index-7eb41eb1.cjs} +1 -1
- package/dist/cjs/{index-ace56b81.cjs → index-a19ffa92.cjs} +1 -1
- package/dist/cjs/{index-24e8d66c.cjs → index-aa28e9f9.cjs} +1 -1
- package/dist/cjs/{index-1a09310e.cjs → index-cc156a43.cjs} +1 -1
- package/dist/cjs/{index-d297664c.cjs → index-df00325f.cjs} +1 -1
- package/dist/cjs/{index-54591c6b.cjs → index-e85aaa9d.cjs} +1 -1
- package/dist/cjs/index-ef8a01c5.cjs +16 -0
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/{index.es-e98c5ee4.cjs → index.es-f6621022.cjs} +1 -1
- package/dist/cjs/{interface-eb633eac.cjs → interface-d50ce16b.cjs} +1 -1
- package/dist/cjs/lib-typedarrays-82021648.cjs +1 -0
- package/dist/cjs/{portis-0c036243.cjs → portis-3a895975.cjs} +1 -1
- package/dist/cjs/{rainbow-57ada25b.cjs → rainbow-6579e86d.cjs} +1 -1
- package/dist/cjs/sha224-ed46e71e.cjs +1 -0
- package/dist/cjs/{sha256-d6829c39.cjs → sha256-d1b2312d.cjs} +1 -1
- package/dist/cjs/{typed-data-12a9baf4.cjs → typed-data-460b86be.cjs} +1 -1
- package/dist/cjs/uAuth-37ec9004.cjs +1 -0
- package/dist/cjs/{walletConnect-c55b3f29.cjs → walletConnect-333618c1.cjs} +1 -1
- package/dist/cjs/{walletLink-961041df.cjs → walletLink-1bbb754c.cjs} +1 -1
- package/dist/{draggabilly-921a68cb.js → draggabilly-9c13a931.js} +1 -1
- package/dist/id-72e0c1a1.js +1 -0
- package/dist/{index-022bd88c.js → index-06f6f79c.js} +1 -1
- package/dist/{index-d815c390.js → index-2c7120ea.js} +1 -1
- package/dist/{index-82e4bb0d.js → index-3354aa33.js} +3 -3
- package/dist/{index-3b7c9150.js → index-352a03ce.js} +1 -1
- package/dist/{index-a98e886d.js → index-46da6d5f.js} +7 -7
- package/dist/{index-d3e54bda.js → index-4b6b9842.js} +1 -1
- package/dist/{index-18f1c3bb.js → index-69adc195.js} +1 -1
- package/dist/{index-6b5aff68.js → index-754d059b.js} +1 -1
- package/dist/index-a3d1a073.js +16 -0
- package/dist/{index-621d68a7.js → index-b0e82b69.js} +1 -1
- package/dist/{index-e0e62601.js → index-badfa46e.js} +1 -1
- package/dist/{index-ff4c01ce.js → index-e3d55f2e.js} +1 -1
- package/dist/{index-2dc796bb.js → index-fcb3d760.js} +2 -2
- package/dist/{index.es-e17cf755.js → index.es-2327b5db.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/{interface-b09eb8d7.js → interface-367d293e.js} +1 -1
- package/dist/lib-typedarrays-3210a74e.js +1 -0
- package/dist/{portis-57c88ff3.js → portis-0126b01f.js} +1 -1
- package/dist/rainbow-46822247.js +1 -0
- package/dist/sha224-58bed7be.js +1 -0
- package/dist/{sha256-260a708c.js → sha256-ad86865d.js} +1 -1
- package/dist/{typed-data-7ba4540a.js → typed-data-cc0c21ba.js} +1 -1
- package/dist/uAuth-e9b4faa5.js +1 -0
- package/dist/{walletConnect-fc6f0e52.js → walletConnect-a7ad9f23.js} +1 -1
- package/dist/{walletLink-d75a8dc8.js → walletLink-a6e7bead.js} +1 -1
- package/package.json +2 -2
- package/dist/cjs/id-a6c483f9.cjs +0 -1
- package/dist/cjs/index-97619c59.cjs +0 -15
- package/dist/cjs/lib-typedarrays-f699b687.cjs +0 -1
- package/dist/cjs/sha224-267753d8.cjs +0 -1
- package/dist/cjs/uAuth-0858f962.cjs +0 -1
- package/dist/id-d72ad2e3.js +0 -1
- package/dist/index-21067fcb.js +0 -15
- package/dist/lib-typedarrays-8b3801fe.js +0 -1
- package/dist/rainbow-c820ccae.js +0 -1
- package/dist/sha224-5ae0e997.js +0 -1
- package/dist/uAuth-253510eb.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as t}from"./index-
|
|
1
|
+
import{c as t}from"./index-46da6d5f.js";function i(t,i){return i.forEach((function(i){i&&"string"!=typeof i&&!Array.isArray(i)&&Object.keys(i).forEach((function(e){if("default"!==e&&!(e in t)){var n=Object.getOwnPropertyDescriptor(i,e);Object.defineProperty(t,e,n.get?n:{enumerable:!0,get:function(){return i[e]}})}}))})),Object.freeze(t)}var e,n={exports:{}},o={exports:{}};function s(){return e||(e=1,t=o,function(i,e){t.exports?t.exports=e():i.getSize=e()}(window,(function(){function t(t){let i=parseFloat(t);return-1==t.indexOf("%")&&!isNaN(i)&&i}let i=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];return function(e){if("string"==typeof e&&(e=document.querySelector(e)),!e||"object"!=typeof e||!e.nodeType)return;let n=getComputedStyle(e);if("none"==n.display)return function(){let t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0};return i.forEach((i=>{t[i]=0})),t}();let o={};o.width=e.offsetWidth,o.height=e.offsetHeight;let s=o.isBorderBox="border-box"==n.boxSizing;i.forEach((t=>{let i=n[t],e=parseFloat(i);o[t]=isNaN(e)?0:e}));let r=o.paddingLeft+o.paddingRight,h=o.paddingTop+o.paddingBottom,a=o.marginLeft+o.marginRight,d=o.marginTop+o.marginBottom,l=o.borderLeftWidth+o.borderRightWidth,c=o.borderTopWidth+o.borderBottomWidth,u=t(n.width);!1!==u&&(o.width=u+(s?0:r+l));let p=t(n.height);return!1!==p&&(o.height=p+(s?0:h+c)),o.innerWidth=o.width-(r+l),o.innerHeight=o.height-(h+c),o.outerWidth=o.width+a,o.outerHeight=o.height+d,o}}))),o.exports;var t}var r,h,a,d={exports:{}},l={exports:{}};function c(){return r||(r=1,i=l,e="undefined"!=typeof window?window:t,n=function(){function t(){}let i=t.prototype;return i.on=function(t,i){if(!t||!i)return this;let e=this._events=this._events||{},n=e[t]=e[t]||[];return n.includes(i)||n.push(i),this},i.once=function(t,i){if(!t||!i)return this;this.on(t,i);let e=this._onceEvents=this._onceEvents||{};return(e[t]=e[t]||{})[i]=!0,this},i.off=function(t,i){let e=this._events&&this._events[t];if(!e||!e.length)return this;let n=e.indexOf(i);return-1!=n&&e.splice(n,1),this},i.emitEvent=function(t,i){let e=this._events&&this._events[t];if(!e||!e.length)return this;e=e.slice(0),i=i||[];let n=this._onceEvents&&this._onceEvents[t];for(let o of e)n&&n[o]&&(this.off(t,o),delete n[o]),o.apply(this,i);return this},i.allOff=function(){return delete this._events,delete this._onceEvents,this},t},i.exports?i.exports=n():e.EvEmitter=n()),l.exports;var i,e,n}
|
|
2
2
|
/*!
|
|
3
3
|
* Unidragger v3.0.1
|
|
4
4
|
* Draggable base class
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{k as r,t}from"./index-46da6d5f.js";function a(a){return r(t(a))}export{a as i};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as t,y as e}from"./index-
|
|
1
|
+
import{c as t,y as e}from"./index-46da6d5f.js";function r(t,e){return e.forEach((function(e){e&&"string"!=typeof e&&!Array.isArray(e)&&Object.keys(e).forEach((function(r){if("default"!==r&&!(r in t)){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}}))})),Object.freeze(t)}var n={},o={};!function(t){function e(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&"Uint8Array"===t.constructor.name}function r(t){if("boolean"!=typeof t)throw new Error(`boolean expected, not ${t}`)}function n(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("positive integer expected, got "+t)}function o(t,...r){if(!e(t))throw new Error("Uint8Array expected");if(r.length>0&&!r.includes(t.length))throw new Error("Uint8Array expected of length "+r+", got length="+t.length)}function s(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}
|
|
2
2
|
/*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */
|
|
3
3
|
Object.defineProperty(t,"__esModule",{value:!0}),t.wrapCipher=t.Hash=t.nextTick=t.isLE=void 0,t.isBytes=e,t.abool=r,t.anumber=n,t.abytes=o,t.ahash=function(t){if("function"!=typeof t||"function"!=typeof t.create)throw new Error("Hash should be wrapped by utils.createHasher");n(t.outputLen),n(t.blockLen)},t.aexists=function(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")},t.aoutput=function(t,e){o(t);const r=e.outputLen;if(t.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)},t.u8=function(t){return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)},t.u32=function(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))},t.clean=function(...t){for(let e=0;e<t.length;e++)t[e].fill(0)},t.createView=s,t.bytesToHex=a,t.hexToBytes=h,t.hexToNumber=l,t.bytesToNumberBE=function(t){return l(a(t))},t.numberToBytesBE=function(t,e){return h(t.toString(16).padStart(2*e,"0"))},t.utf8ToBytes=d,t.bytesToUtf8=function(t){return(new TextDecoder).decode(t)},t.toBytes=function(t){if("string"==typeof t)t=d(t);else{if(!e(t))throw new Error("Uint8Array expected, got "+typeof t);t=g(t)}return t},t.overlapBytes=y,t.complexOverlapBytes=function(t,e){if(y(t,e)&&t.byteOffset<e.byteOffset)throw new Error("complex overlap of input and output is not supported")},t.concatBytes=function(...t){let e=0;for(let r=0;r<t.length;r++){const n=t[r];o(n),e+=n.length}const r=new Uint8Array(e);for(let e=0,n=0;e<t.length;e++){const o=t[e];r.set(o,n),n+=o.length}return r},t.checkOpts=function(t,e){if(null==e||"object"!=typeof e)throw new Error("options must be defined");return Object.assign(t,e)},t.equalBytes=function(t,e){if(t.length!==e.length)return!1;let r=0;for(let n=0;n<t.length;n++)r|=t[n]^e[n];return 0===r},t.getOutput=function(t,e,r=!0){if(void 0===e)return new Uint8Array(t);if(e.length!==t)throw new Error("invalid output length, expected "+t+", got: "+e.length);if(r&&!b(e))throw new Error("invalid output, must be aligned");return e},t.setBigUint64=p,t.u64Lengths=function(t,e,n){r(n);const o=new Uint8Array(16),i=s(o);return p(i,0,BigInt(e),n),p(i,8,BigInt(t),n),o},t.isAligned32=b,t.copyBytes=g,t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0];const i=(()=>"function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex)(),c=Array.from({length:256},((t,e)=>e.toString(16).padStart(2,"0")));function a(t){if(o(t),i)return t.toHex();let e="";for(let r=0;r<t.length;r++)e+=c[t[r]];return e}const u={_0:48,_9:57,A:65,F:70,a:97,f:102};function f(t){return t>=u._0&&t<=u._9?t-u._0:t>=u.A&&t<=u.F?t-(u.A-10):t>=u.a&&t<=u.f?t-(u.a-10):void 0}function h(t){if("string"!=typeof t)throw new Error("hex string expected, got "+typeof t);if(i)return Uint8Array.fromHex(t);const e=t.length,r=e/2;if(e%2)throw new Error("hex string expected, got unpadded hex of length "+e);const n=new Uint8Array(r);for(let e=0,o=0;e<r;e++,o+=2){const r=f(t.charCodeAt(o)),s=f(t.charCodeAt(o+1));if(void 0===r||void 0===s){const e=t[o]+t[o+1];throw new Error('hex string expected, got non-hex character "'+e+'" at index '+o)}n[e]=16*r+s}return n}function l(t){if("string"!=typeof t)throw new Error("hex string expected, got "+typeof t);return BigInt(""===t?"0":"0x"+t)}function d(t){if("string"!=typeof t)throw new Error("string expected");return new Uint8Array((new TextEncoder).encode(t))}function y(t,e){return t.buffer===e.buffer&&t.byteOffset<e.byteOffset+e.byteLength&&e.byteOffset<t.byteOffset+t.byteLength}t.nextTick=async()=>{};t.Hash=class{};function p(t,e,r,n){if("function"==typeof t.setBigUint64)return t.setBigUint64(e,r,n);const o=BigInt(32),s=BigInt(4294967295),i=Number(r>>o&s),c=Number(r&s),a=n?4:0,u=n?0:4;t.setUint32(e+a,i,n),t.setUint32(e+u,c,n)}function b(t){return t.byteOffset%4==0}function g(t){return Uint8Array.from(t)}t.wrapCipher=(e,r)=>{function n(n,...s){if(o(n),!t.isLE)throw new Error("Non little-endian hardware is not yet supported");if(void 0!==e.nonceLength){const t=s[0];if(!t)throw new Error("nonce / iv required");e.varSizeNonce?o(t):o(t,e.nonceLength)}const i=e.tagLength;i&&void 0!==s[1]&&o(s[1]);const c=r(n,...s),a=(t,e)=>{if(void 0!==e){if(2!==t)throw new Error("cipher output not supported");o(e)}};let u=!1;return{encrypt(t,e){if(u)throw new Error("cannot encrypt() twice with same key + nonce");return u=!0,o(t),a(c.encrypt.length,e),c.encrypt(t,e)},decrypt(t,e){if(o(t),i&&t.length<i)throw new Error("invalid ciphertext length: smaller than tagLength="+i);return a(c.decrypt.length,e),c.decrypt(t,e)}}}return Object.assign(n,e),n}}(o);var s={},i={};Object.defineProperty(i,"__esModule",{value:!0}),i.AEAD_TAG_LENGTH=i.XCHACHA20_NONCE_LENGTH=i.CURVE25519_PUBLIC_KEY_SIZE=i.ETH_PUBLIC_KEY_SIZE=i.UNCOMPRESSED_PUBLIC_KEY_SIZE=i.COMPRESSED_PUBLIC_KEY_SIZE=i.SECRET_KEY_LENGTH=void 0,i.SECRET_KEY_LENGTH=32,i.COMPRESSED_PUBLIC_KEY_SIZE=33,i.UNCOMPRESSED_PUBLIC_KEY_SIZE=65,i.ETH_PUBLIC_KEY_SIZE=64,i.CURVE25519_PUBLIC_KEY_SIZE=32,i.XCHACHA20_NONCE_LENGTH=24,i.AEAD_TAG_LENGTH=16,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ephemeralKeySize=t.symmetricNonceLength=t.symmetricAlgorithm=t.isHkdfKeyCompressed=t.isEphemeralKeyCompressed=t.ellipticCurve=t.ECIES_CONFIG=t.Config=void 0;var e=i,r=function(){function t(){this.ellipticCurve="secp256k1",this.isEphemeralKeyCompressed=!1,this.isHkdfKeyCompressed=!1,this.symmetricAlgorithm="aes-256-gcm",this.symmetricNonceLength=16}return Object.defineProperty(t.prototype,"ephemeralKeySize",{get:function(){var t={secp256k1:this.isEphemeralKeyCompressed?e.COMPRESSED_PUBLIC_KEY_SIZE:e.UNCOMPRESSED_PUBLIC_KEY_SIZE,x25519:e.CURVE25519_PUBLIC_KEY_SIZE,ed25519:e.CURVE25519_PUBLIC_KEY_SIZE};
|
|
4
4
|
/* v8 ignore else -- @preserve */if(this.ellipticCurve in t)return t[this.ellipticCurve];throw new Error("Not implemented")},enumerable:!1,configurable:!0}),t}();t.Config=r,t.ECIES_CONFIG=new r;t.ellipticCurve=function(){return t.ECIES_CONFIG.ellipticCurve};t.isEphemeralKeyCompressed=function(){return t.ECIES_CONFIG.isEphemeralKeyCompressed};t.isHkdfKeyCompressed=function(){return t.ECIES_CONFIG.isHkdfKeyCompressed};t.symmetricAlgorithm=function(){return t.ECIES_CONFIG.symmetricAlgorithm};t.symmetricNonceLength=function(){return t.ECIES_CONFIG.symmetricNonceLength};t.ephemeralKeySize=function(){return t.ECIES_CONFIG.ephemeralKeySize}}(s);var c={},a={},u={},f={},h={},l={};Object.defineProperty(l,"__esModule",{value:!0}),l.crypto=void 0,l.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.gcm=t.ctr=t.cbc=t.utils=void 0,t.randomBytes=n,t.getWebcryptoSubtle=s,t.managedNonce=function(t){const{nonceLength:e}=t;return(0,r.anumber)(e),(o,...s)=>({encrypt(i,...c){const a=n(e),u=t(o,a,...s).encrypt(i,...c),f=(0,r.concatBytes)(a,u);return u.fill(0),f},decrypt(r,...n){const i=r.subarray(0,e),c=r.subarray(e);return t(o,i,...s).decrypt(c,...n)}})};const e=l,r=o;function n(t=32){if(e.crypto&&"function"==typeof e.crypto.getRandomValues)return e.crypto.getRandomValues(new Uint8Array(t));if(e.crypto&&"function"==typeof e.crypto.randomBytes)return Uint8Array.from(e.crypto.randomBytes(t));throw new Error("crypto.getRandomValues must be defined")}function s(){if(e.crypto&&"object"==typeof e.crypto.subtle&&null!=e.crypto.subtle)return e.crypto.subtle;throw new Error("crypto.subtle must be defined")}t.utils={async encrypt(t,e,r,n){const o=s(),i=await o.importKey("raw",t,e,!0,["encrypt"]),c=await o.encrypt(r,i,n);return new Uint8Array(c)},async decrypt(t,e,r,n){const o=s(),i=await o.importKey("raw",t,e,!0,["decrypt"]),c=await o.decrypt(r,i,n);return new Uint8Array(c)}};const i={CBC:"AES-CBC",CTR:"AES-CTR",GCM:"AES-GCM"};function c(e){return(n,o,s)=>{(0,r.abytes)(n),(0,r.abytes)(o);const c={name:e,length:8*n.length},a=function(t,e,r){if(t===i.CBC)return{name:i.CBC,iv:e};if(t===i.CTR)return{name:i.CTR,counter:e,length:64};if(t===i.GCM)return r?{name:i.GCM,iv:e,additionalData:r}:{name:i.GCM,iv:e};throw new Error("unknown aes block mode")}(e,o,s);let u=!1;return{encrypt(e){if((0,r.abytes)(e),u)throw new Error("Cannot encrypt() twice with same key / nonce");return u=!0,t.utils.encrypt(n,c,a,e)},decrypt:e=>((0,r.abytes)(e),t.utils.decrypt(n,c,a,e))}}}t.cbc=c(i.CBC),t.ctr=c(i.CTR),t.gcm=(()=>c(i.GCM))()}(h);var d={},y={},p={},b={},g={};Object.defineProperty(g,"__esModule",{value:!0}),g.crypto=void 0,g.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,function(t){
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{hexlify as r,arrayify as t,isBytesLike as o}from"@ethersproject/bytes";import{L as e}from"./index-
|
|
1
|
+
import{hexlify as r,arrayify as t,isBytesLike as o}from"@ethersproject/bytes";import{L as e}from"./index-46da6d5f.js";const n=new e("rlp/5.7.0");function s(r){const t=[];for(;r;)t.unshift(255&r),r>>=8;return t}function c(r,t,o){let e=0;for(let n=0;n<o;n++)e=256*e+r[t+n];return e}function h(r){if(Array.isArray(r)){let t=[];if(r.forEach((function(r){t=t.concat(h(r))})),t.length<=55)return t.unshift(192+t.length),t;const o=s(t.length);return o.unshift(247+o.length),o.concat(t)}o(r)||n.throwArgumentError("RLP object must be BytesLike","object",r);const e=Array.prototype.slice.call(t(r));if(1===e.length&&e[0]<=127)return e;if(e.length<=55)return e.unshift(128+e.length),e;const c=s(e.length);return c.unshift(183+c.length),c.concat(e)}function u(t){return r(h(t))}function a(r,t,o,s){const c=[];for(;o<t+1+s;){const h=l(r,o);c.push(h.result),(o+=h.consumed)>t+1+s&&n.throwError("child data too short",e.errors.BUFFER_OVERRUN,{})}return{consumed:1+s,result:c}}function l(t,o){if(0===t.length&&n.throwError("data too short",e.errors.BUFFER_OVERRUN,{}),t[o]>=248){const r=t[o]-247;o+1+r>t.length&&n.throwError("data short segment too short",e.errors.BUFFER_OVERRUN,{});const s=c(t,o+1,r);return o+1+r+s>t.length&&n.throwError("data long segment too short",e.errors.BUFFER_OVERRUN,{}),a(t,o,o+1+r,r+s)}if(t[o]>=192){const r=t[o]-192;return o+1+r>t.length&&n.throwError("data array too short",e.errors.BUFFER_OVERRUN,{}),a(t,o,o+1,r)}if(t[o]>=184){const s=t[o]-183;o+1+s>t.length&&n.throwError("data array too short",e.errors.BUFFER_OVERRUN,{});const h=c(t,o+1,s);o+1+s+h>t.length&&n.throwError("data array too short",e.errors.BUFFER_OVERRUN,{});return{consumed:1+s+h,result:r(t.slice(o+1+s,o+1+s+h))}}if(t[o]>=128){const s=t[o]-128;o+1+s>t.length&&n.throwError("data too short",e.errors.BUFFER_OVERRUN,{});return{consumed:1+s,result:r(t.slice(o+1,o+1+s))}}return{consumed:1,result:r(t[o])}}function i(r){const o=t(r),e=l(o,0);return e.consumed!==o.length&&n.throwArgumentError("invalid rlp data","data",r),e.result}var f=Object.freeze({__proto__:null,encode:u,decode:i});export{i as d,u as e,f as i};
|