@dodoex/wallet-web3 0.0.3-2 → 0.0.3-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/cjs/core/index.d.ts +1 -0
- package/dist/cjs/{index-23606273.cjs → index-0494ffbc.cjs} +1 -1
- package/dist/cjs/{index-a32c3cfa.cjs → index-1613ac94.cjs} +1 -1
- package/dist/cjs/{index-e0e60b3b.cjs → index-613571b4.cjs} +2 -2
- package/dist/cjs/{index-e948d9e4.cjs → index-b63f2913.cjs} +2 -2
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/{portis-cf05b1f4.cjs → portis-09fea9b2.cjs} +1 -1
- package/dist/cjs/{provider-de4ee5b7.cjs → provider-653a6c4b.cjs} +1 -1
- package/dist/cjs/{uAuth-075fec28.cjs → uAuth-e46c0332.cjs} +1 -1
- package/dist/cjs/{walletConnect-58449a61.cjs → walletConnect-a74c7523.cjs} +1 -1
- package/dist/cjs/{walletLink-e3b39e1b.cjs → walletLink-5a993e87.cjs} +1 -1
- package/dist/core/index.d.ts +1 -0
- package/dist/{index-6cdefd52.js → index-201c01d8.js} +1 -1
- package/dist/{index-822c6d78.js → index-b6a46a6d.js} +1 -1
- package/dist/{index-ecbe3d8d.js → index-b869aac9.js} +3 -3
- package/dist/{index-83293e8e.js → index-cecc22f4.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/{portis-b3fee0d6.js → portis-3b5726bc.js} +1 -1
- package/dist/{provider-30d55a46.js → provider-847fb9d1.js} +1 -1
- package/dist/{uAuth-343d653d.js → uAuth-458fbce7.js} +1 -1
- package/dist/{walletConnect-ea07b187.js → walletConnect-643e147f.js} +1 -1
- package/dist/{walletLink-39bc8bdc.js → walletLink-fd84e70b.js} +1 -1
- package/package.json +1 -1
package/dist/core/index.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export default class Core {
|
|
|
20
20
|
connectToWallet(wallet: Wallet, providerConfig?: Partial<ConnectorParams>, params?: {
|
|
21
21
|
isAutoConnect?: boolean;
|
|
22
22
|
}): Promise<import("@ethersproject/providers").JsonRpcProvider | undefined>;
|
|
23
|
+
getConnectedWallet(): Promise<Wallet | undefined>;
|
|
23
24
|
disconnectWallet(): Promise<void>;
|
|
24
25
|
connectWalletBefore(wallet: Wallet, disabled?: boolean): boolean;
|
|
25
26
|
clickWallet(wallet: Wallet, disabled: boolean, providerConfig?: Partial<ConnectorParams>): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as A,a as e,w as i,b as t,c as n,d as r,H as o}from"./index-
|
|
1
|
+
import{_ as A,a as e,w as i,b as t,c as n,d as r,H as o}from"./index-b869aac9.js";export{H as HD_PATH_LIST}from"./index-b869aac9.js";import{d as a,p as s,f as c,s as B}from"./index-e3ab6de5.js";import{deepCopy as g}from"@ethersproject/properties";import{c as E}from"./_commonjsHelpers-70de2c37.js";import I from"buffer";import{c as l,b as u}from"./bn-16003306.js";import p from"events";import d from"http";import Q from"https";import w from"zlib";import C,{TextEncoder as f}from"util";import h from"url";import{l as R,j as U}from"./index-5c16deff.js";import m from"crypto";import{d as T,s as S,a as b}from"./index-632fbf92.js";import{r as F,d as M,e as V}from"./index-9547c0cf.js";import{I as D}from"./interface-36a3c8cf.js";import y,{Readable as x}from"stream";import G from"path";import v from"fs";import N from"assert";import{r as k,s as Z}from"./sha256-8f7b3565.js";import{hexlify as J}from"@ethersproject/bytes";import{serialize as O}from"@ethersproject/transactions";import"@ethersproject/providers";import"@ethersproject/constants";import"@ethersproject/contracts";import"@ethersproject/address";import"valtio";import"tty";import"os";import"punycode";import"./sha3-a5661517.js";var P={},Y={},L={},W={},j={},z={},K={},q={},X={};function _(A){if(!Number.isSafeInteger(A)||A<0)throw new Error(`Wrong positive integer: ${A}`)}function $(A){if("boolean"!=typeof A)throw new Error(`Expected boolean, not ${A}`)}function AA(A,...e){if(!(A instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(e.length>0&&!e.includes(A.length))throw new TypeError(`Expected Uint8Array of length ${e}, not of length=${A.length}`)}function eA(A){if("function"!=typeof A||"function"!=typeof A.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");_(A.outputLen),_(A.blockLen)}function iA(A,e=!0){if(A.destroyed)throw new Error("Hash instance has been destroyed");if(e&&A.finished)throw new Error("Hash#digest() has already been called")}function tA(A,e){AA(A);const i=e.outputLen;if(A.length<i)throw new Error(`digestInto() expects output buffer of length at least ${i}`)}Object.defineProperty(X,"__esModule",{value:!0}),X.output=X.exists=X.hash=X.bytes=X.bool=X.number=void 0,X.number=_,X.bool=$,X.bytes=AA,X.hash=eA,X.exists=iA,X.output=tA;const nA={number:_,bool:$,bytes:AA,hash:eA,exists:iA,output:tA};X.default=nA;var rA={},oA={};Object.defineProperty(oA,"__esModule",{value:!0}),oA.crypto=void 0,oA.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,function(A){
|
|
2
2
|
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
3
3
|
Object.defineProperty(A,"__esModule",{value:!0}),A.randomBytes=A.wrapConstructorWithOpts=A.wrapConstructor=A.checkOpts=A.Hash=A.concatBytes=A.toBytes=A.utf8ToBytes=A.asyncLoop=A.nextTick=A.hexToBytes=A.bytesToHex=A.isLE=A.rotr=A.createView=A.u32=A.u8=void 0;const e=oA;A.u8=A=>new Uint8Array(A.buffer,A.byteOffset,A.byteLength);A.u32=A=>new Uint32Array(A.buffer,A.byteOffset,Math.floor(A.byteLength/4));A.createView=A=>new DataView(A.buffer,A.byteOffset,A.byteLength);if(A.rotr=(A,e)=>A<<32-e|A>>>e,A.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!A.isLE)throw new Error("Non little-endian hardware is not supported");const i=Array.from({length:256},((A,e)=>e.toString(16).padStart(2,"0")));A.bytesToHex=function(A){if(!(A instanceof Uint8Array))throw new Error("Uint8Array expected");let e="";for(let t=0;t<A.length;t++)e+=i[A[t]];return e},A.hexToBytes=function(A){if("string"!=typeof A)throw new TypeError("hexToBytes: expected string, got "+typeof A);if(A.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const e=new Uint8Array(A.length/2);for(let i=0;i<e.length;i++){const t=2*i,n=A.slice(t,t+2),r=Number.parseInt(n,16);if(Number.isNaN(r)||r<0)throw new Error("Invalid byte sequence");e[i]=r}return e};function t(A){if("string"!=typeof A)throw new TypeError("utf8ToBytes expected string, got "+typeof A);return(new TextEncoder).encode(A)}function n(A){if("string"==typeof A&&(A=t(A)),!(A instanceof Uint8Array))throw new TypeError(`Expected input type is Uint8Array (got ${typeof A})`);return A}A.nextTick=async()=>{},A.asyncLoop=async function(e,i,t){let n=Date.now();for(let r=0;r<e;r++){t(r);const e=Date.now()-n;e>=0&&e<i||(await(0,A.nextTick)(),n+=e)}},A.utf8ToBytes=t,A.toBytes=n,A.concatBytes=function(...A){if(!A.every((A=>A instanceof Uint8Array)))throw new Error("Uint8Array list expected");if(1===A.length)return A[0];const e=A.reduce(((A,e)=>A+e.length),0),i=new Uint8Array(e);for(let e=0,t=0;e<A.length;e++){const n=A[e];i.set(n,t),t+=n.length}return i};A.Hash=class{clone(){return this._cloneInto()}};A.checkOpts=function(A,e){if(void 0!==e&&("object"!=typeof e||(i=e,"[object Object]"!==Object.prototype.toString.call(i)||i.constructor!==Object)))throw new TypeError("Options should be object or undefined");var i;return Object.assign(A,e)},A.wrapConstructor=function(A){const e=e=>A().update(n(e)).digest(),i=A();return e.outputLen=i.outputLen,e.blockLen=i.blockLen,e.create=()=>A(),e},A.wrapConstructorWithOpts=function(A){const e=(e,i)=>A(i).update(n(e)).digest(),i=A({});return e.outputLen=i.outputLen,e.blockLen=i.blockLen,e.create=e=>A(e),e},A.randomBytes=function(A=32){if(e.crypto&&"function"==typeof e.crypto.getRandomValues)return e.crypto.getRandomValues(new Uint8Array(A));throw new Error("crypto.getRandomValues must be defined")}}(rA),Object.defineProperty(q,"__esModule",{value:!0}),q.SHA2=void 0;const aA=X,sA=rA;q.SHA2=class extends sA.Hash{constructor(A,e,i,t){super(),this.blockLen=A,this.outputLen=e,this.padOffset=i,this.isLE=t,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(A),this.view=(0,sA.createView)(this.buffer)}update(A){aA.default.exists(this);const{view:e,buffer:i,blockLen:t}=this,n=(A=(0,sA.toBytes)(A)).length;for(let r=0;r<n;){const o=Math.min(t-this.pos,n-r);if(o!==t)i.set(A.subarray(r,r+o),this.pos),this.pos+=o,r+=o,this.pos===t&&(this.process(e,0),this.pos=0);else{const e=(0,sA.createView)(A);for(;t<=n-r;r+=t)this.process(e,r)}}return this.length+=A.length,this.roundClean(),this}digestInto(A){aA.default.exists(this),aA.default.output(A,this),this.finished=!0;const{buffer:e,view:i,blockLen:t,isLE:n}=this;let{pos:r}=this;e[r++]=128,this.buffer.subarray(r).fill(0),this.padOffset>t-r&&(this.process(i,0),r=0);for(let A=r;A<t;A++)e[A]=0;!function(A,e,i,t){if("function"==typeof A.setBigUint64)return A.setBigUint64(e,i,t);const n=BigInt(32),r=BigInt(4294967295),o=Number(i>>n&r),a=Number(i&r),s=t?4:0,c=t?0:4;A.setUint32(e+s,o,t),A.setUint32(e+c,a,t)}(i,t-8,BigInt(8*this.length),n),this.process(i,0);const o=(0,sA.createView)(A),a=this.outputLen;if(a%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const s=a/4,c=this.get();if(s>c.length)throw new Error("_sha2: outputLen bigger than state");for(let A=0;A<s;A++)o.setUint32(4*A,c[A],n)}digest(){const{buffer:A,outputLen:e}=this;this.digestInto(A);const i=A.slice(0,e);return this.destroy(),i}_cloneInto(A){A||(A=new this.constructor),A.set(...this.get());const{blockLen:e,buffer:i,length:t,finished:n,destroyed:r,pos:o}=this;return A.length=t,A.pos=o,A.finished=n,A.destroyed=r,t%e&&A.buffer.set(i),A}},Object.defineProperty(K,"__esModule",{value:!0}),K.sha224=K.sha256=void 0;const cA=q,BA=rA,gA=(A,e,i)=>A&e^A&i^e&i,EA=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),IA=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),lA=new Uint32Array(64);class uA extends cA.SHA2{constructor(){super(64,32,8,!1),this.A=0|IA[0],this.B=0|IA[1],this.C=0|IA[2],this.D=0|IA[3],this.E=0|IA[4],this.F=0|IA[5],this.G=0|IA[6],this.H=0|IA[7]}get(){const{A:A,B:e,C:i,D:t,E:n,F:r,G:o,H:a}=this;return[A,e,i,t,n,r,o,a]}set(A,e,i,t,n,r,o,a){this.A=0|A,this.B=0|e,this.C=0|i,this.D=0|t,this.E=0|n,this.F=0|r,this.G=0|o,this.H=0|a}process(A,e){for(let i=0;i<16;i++,e+=4)lA[i]=A.getUint32(e,!1);for(let A=16;A<64;A++){const e=lA[A-15],i=lA[A-2],t=(0,BA.rotr)(e,7)^(0,BA.rotr)(e,18)^e>>>3,n=(0,BA.rotr)(i,17)^(0,BA.rotr)(i,19)^i>>>10;lA[A]=n+lA[A-7]+t+lA[A-16]|0}let{A:i,B:t,C:n,D:r,E:o,F:a,G:s,H:c}=this;for(let A=0;A<64;A++){const e=c+((0,BA.rotr)(o,6)^(0,BA.rotr)(o,11)^(0,BA.rotr)(o,25))+((B=o)&a^~B&s)+EA[A]+lA[A]|0,g=((0,BA.rotr)(i,2)^(0,BA.rotr)(i,13)^(0,BA.rotr)(i,22))+gA(i,t,n)|0;c=s,s=a,a=o,o=r+e|0,r=n,n=t,t=i,i=e+g|0}var B;i=i+this.A|0,t=t+this.B|0,n=n+this.C|0,r=r+this.D|0,o=o+this.E|0,a=a+this.F|0,s=s+this.G|0,c=c+this.H|0,this.set(i,t,n,r,o,a,s,c)}roundClean(){lA.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class pA extends uA{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}K.sha256=(0,BA.wrapConstructor)((()=>new uA)),K.sha224=(0,BA.wrapConstructor)((()=>new pA));var dA={},QA={};!function(A){Object.defineProperty(A,"__esModule",{value:!0}),A.validateObject=A.createHmacDrbg=A.bitMask=A.bitSet=A.bitGet=A.bitLen=A.utf8ToBytes=A.equalBytes=A.concatBytes=A.ensureBytes=A.numberToVarBytesBE=A.numberToBytesLE=A.numberToBytesBE=A.bytesToNumberLE=A.bytesToNumberBE=A.hexToBytes=A.hexToNumber=A.numberToHexUnpadded=A.bytesToHex=void 0;
|
|
4
4
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|