energywebfoundation / iam-client-lib

TypeScript library to be used within decentralised applications for authentication and authorisation using DIDs (Decentralised Identifiers) and VCs (Verifiable Credentials)
GNU General Public License v3.0
19 stars 9 forks source link

Exceptions throwing a lot of useless data #192

Closed kosecki123 closed 2 years ago

kosecki123 commented 3 years ago

The issue reported in https://github.com/energywebfoundation/iam-client-lib/issues/105#issuecomment-862949316 throws the whole compacted code into STDERR which makes server-side logging hard/useless.

Tested using iam-client-lib 2.2.0

Example:

...
))}getRolesByOwner({owner:e}){return P(this,void 0,void 0,(function*(){const{data:t}=yield this.httpClient.get("/role/owner/"+e);return t}))}getIssuedClaims({did:e,isAccepted:t,parentNamespace:f}){return P(this,void 0,void 0,(function*(){const{data:r}=yield this.httpClient.get("/claim/issuer/"+e,{params:{accepted:t,parentNamespace:f}});return r}))}getRequestedClaims({did:e,isAccepted:t,parentNamespace:f}){return P(this,void 0,void 0,(function*(){const{data:r}=yield this.httpClient.get("/claim/requester/"+e,{params:{accepted:t,parentNamespace:f}});return r}))}requestClaim({message:e,did:t}){return P(this,void 0,void 0,(function*(){yield this.httpClient.post("/claim/request/"+t,e)}))}issueClaim({message:e,did:t}){return P(this,void 0,void 0,(function*(){yield this.httpClient.post("/claim/issue/"+t,e)}))}rejectClaim({message:e,did:t}){return P(this,void 0,void 0,(function*(){yield this.httpClient.post("/claim/reject/"+t,e)}))}deleteClaim({claimId:e}){return P(this,void 0,void 0,(function*(){yield this.httpClient.delete("/claim/"+e)}))}getDIDsForRole({namespace:e}){return P(this,void 0,void 0,(function*(){const{data:t}=yield this.httpClient.get(`/claim/did/${e}?accepted=true`);return t}))}getDidDocument({did:e,includeClaims:t}){return P(this,void 0,void 0,(function*(){const{data:f}=yield this.httpClient.get(`/DID/${e}?includeClaims=${t||!1}`);return f}))}addDIDToWatchList({did:e}){return P(this,void 0,void 0,(function*(){yield this.httpClient.post("/DID/"+e)}))}}const be="0x0000000000000000000000000000000000000000";var pe;exports.MessagingMethod=void 0,(pe=exports.MessagingMethod||(exports.MessagingMethod={})).Nats="nats",pe.WebRTC="webRTC",pe.SmartContractStorage="smartContractStorage",exports.PreconditionTypes=void 0,(exports.PreconditionTypes||(exports.PreconditionTypes={})).Role="role";const ye={73799:{rpcUrl:"https://volta-rpc-vkn5r5zx4ke71f9hcu0c.energyweb.org/",ensRegistryAddress:"0xd7CeF70Ba7efc2035256d828d5287e2D285CD1ac",ensResolverAddress:"0x0a97e07c4Df22e2e31872F20C5BE191D5EFc4680",didContractAddress:n.VoltaAddress1056}},me={73799:{url:"https://volta-identitycache.energyweb.org/",cacheServerSupportsAuth:!0}},ge={73799:{messagingMethod:exports.MessagingMethod.Nats,natsServerUrl:"https://volta-identityevents.energyweb.org/"}};class we extends T.default{constructor(e){super(e),this.canCreateSession=!0}createSession(e){const t=Object.create(null,{createSession:{get:()=>super.createSession}});return P(this,void 0,void 0,(function*(){this.canCreateSession&&t.createSession.call(this,e)}))}}class ve{constructor(e,t,f){this._ewKeyManagerUrl=f,this._bridgeUrl=e,this._infuraId=t}initialize(e){return P(this,void 0,void 0,(function*(){const t=!(e===exports.WalletProvider.EwKeyManager);this._walletConnectClient=new we({bridge:this._bridgeUrl,qrcodeModal:t?C.default:void 0});const f=Object.entries(ye).reduce((e,[t,f])=>Object.assign(Object.assign({},e),{[t]:f.rpcUrl}),{});if(this._walletConnectProvider=new A.default({rpc:f,infuraId:this._infuraId,connector:this._walletConnectClient}),e===exports.WalletProvider.EwKeyManager){if(!this._ewKeyManagerUrl)throw Error("EwKeyManager provider type specified but no url was provided.");const e=this._ewKeyManagerUrl;this._walletConnectProvider.wc.on("display_uri",(t,f)=>{const r=f.params[0],s=encodeURIComponent(r),n=e.includes("?"),i=`${this._ewKeyManagerUrl}${n?"&":"?"}uri=${s}`;window.open(i,"ew_key_manager")})}yield this._walletConnectProvider.enable()}))}getProvider(){if(!this._walletConnectProvider)throw Error("call initalize() to initialize provider first");return this._walletConnectProvider}closeConnection(){return P(this,void 0,void 0,(function*(){this._walletConnectClient&&(this._walletConnectClient.canCreateSession=!1),this._walletConnectProvider&&(yield this._walletConnectProvider.close())}))}isConnected(){var e,t;return null!==(t=null===(e=this._walletConnectProvider)||void 0===e?void 0:e.connected)&&void 0!==t&&t}}const{hexlify:_e,bigNumberify:Ee}=s.utils,{JsonRpcProvider:Se}=s.providers,{abi:Oe}=n.ethrReg;const Ne=({provider:e,parser:t,event:f,contractInterface:r})=>P(void 0,void 0,void 0,(function*(){const s={fromBlock:0,toBlock:"latest",address:f.address,topics:f.topics||[]},n=(yield e.getLogs(s)).map(e=>r.parseLog(e).values),i=yield Promise.all(n.map(t));return[...new Set(i)].filter(Boolean)})),Ae=({domain:e,ensResolver:t,ensRegistry:f,mode:r})=>{if(!e)throw new Error("You need to pass a domain name");if(!f)throw new Error("You need to pass an ensRegistry ethers contract");if(!t)throw new Error("You need to pass an ensResolver ethers contract");return Ne("ALL"===r?{parser:({node:r})=>P(void 0,void 0,void 0,(function*(){const s=yield t.name(r);if(s.endsWith(e)){return(yield f.owner(r))===be?"":s}return""})),provider:t.provider,event:t.filters.TextChanged(null,"metadata",null),contractInterface:new s.utils.Interface(g.abi)}:{contractInterface:new s.utils.Interface(w.abi),event:f.filters.NewOwner(B(e),null,null),parser:({node:e,label:r,owner:n})=>P(void 0,void 0,void 0,(function*(){if(n===be)return"";const i=s.utils.keccak256(e+r.slice(2)),[o,a]=yield Promise.all([t.name(i),f.owner(i)]);return a===be?"":o})),provider:f.provider})};var Ce;exports.ENSNamespaceTypes=void 0,(Ce=exports.ENSNamespaceTypes||(exports.ENSNamespaceTypes={})).Roles="roles",Ce.Application="apps",Ce.Organization="org";class Te extends class{constructor({rpcUrl:e,infuraId:t,ipfsUrl:f="https://ipfs.infura.io:5001/api/v0/",bridgeUrl:r="https://walletconnect.energyweb.org",privateKey:n,ewKeyManagerUrl:i="https://km.aws.energyweb.org/connect/new"}={}){if(this._transactionOverrides={},this.ttl=Ee(0),this._runningInBrowser=$(),s.errors.setLogLevel("error"),this._connectionOptions={privateKey:n,rpcUrl:e,bridgeUrl:r,infuraId:t},this._ipfsStore=new a.DidStore(f),this._runningInBrowser){this._providerType=localStorage.getItem("WalletProvider");const e=localStorage.getItem("PublicKey");e&&(this._publicKey=e)}this._walletConnectService=new ve(r,t,i)}init({initializeMetamask:e,walletProvider:t}){return P(this,void 0,void 0,(function*(){yield this.initSigner({walletProvider:t,initializeMetamask:e}),yield this.initChain(),this.initEventHandlers(),this._runningInBrowser&&(yield this.setupMessaging()),this._signer&&(this._didSigner=yield class{static create({signer:e,provider:t,privateKey:f,publicKey:r}){return P(this,void 0,void 0,(function*(){const{publicKey:s,identityToken:n}=r?{publicKey:r,identityToken:void 0}:yield this.getPublicKeyAndIdentityToken(e);return new ne(e,t,s,n,f)}))}static getPublicKeyAndIdentityToken(e){var t,f;return P(this,void 0,void 0,(function*(){if(e){const r={alg:"ES256",typ:"JWT"},s=O.default(JSON.stringify(r)),n=yield e.getAddress(),i={iss:"did:ethr:"+n,claimData:{blockNumber:yield null===(t=e.provider)||void 0===t?void 0:t.getBlockNumber()}},o=O.default(JSON.stringify(i)),a="0x"+Buffer.from(`${s}.${o}`).toString("hex"),c=ie(ue(a)),d=yield e.signMessage(c),u=e=>{const t=he(e,d);if(ce(n)===ce(oe(t)))return ae(t,!0).slice(2)},h=ie(de(c)),l=null!==(f=u(h))&&void 0!==f?f:u(c);if(l)return{publicKey:l,identityToken:`${s}.${o}.${O.default(d)}`};throw new Error(exports.ERROR_MESSAGES.PUBLIC_KEY_NOT_RECOVERED)}throw new Error(exports.ERROR_MESSAGES.SIGNER_NOT_INITIALIZED)}))}}.create({provider:this._provider,signer:this._signer,publicKey:this._publicKey}),this._publicKey=this._didSigner.publicKey,this._didSigner.identityToken&&(yield this.loginToCacheServer(this._didSigner.identityToken)),yield this.setAddress(),this.setDid(),yield this.setDocument(),this.setClaims()),this.setResolver(),this.setJWT(),this.storeSession()}))}initSigner({initializeMetamask:e,walletProvider:t}){return P(this,void 0,void 0,(function*(){const{privateKey:f,rpcUrl:r}=this._connectionOptions;if(!this._runningInBrowser){if(!f)throw new Error(exports.ERROR_MESSAGES.NO_PRIVATE_KEY);if(!r)throw new Error(exports.ERROR_MESSAGES.NO_RPC_URL)}if(f&&r)return this._provider=new Se({url:r}),void(this._signer=new s.Wallet(f,this._provider));if(t===exports.WalletProvider.MetaMask){const f=yield S.default({mustBeMetaMask:!0});if(!f)throw new Error(exports.ERROR_MESSAGES.METAMASK_EXTENSION_NOT_AVAILABLE);this._metamaskProvider=f;const r={method:e?"wallet_requestPermissions":"eth_accounts",params:[{eth_accounts:{}}]},n=yield f.request(r);return!e&&n.length<1&&(yield f.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]})),this._signer=new s.providers.Web3Provider(f).getSigner(),this._providerType=t,this._provider=this._signer.provider,void console.log("metamask chain id:",(yield this._provider.getNetwork()).chainId)}if(t&&[exports.WalletProvider.EwKeyManager,exports.WalletProvider.WalletConnect].includes(t)){this._transactionOverrides={gasLimit:_e(49e5),gasPrice:_e(.1)},yield this._walletConnectService.initialize(t);const e=this._walletConnectService.getProvider();return this._signer=new s.providers.Web3Provider(e).getSigner(),this._provider=this._signer.provider,void(this._providerType=t)}throw new Error(exports.ERROR_MESSAGES.WALLET_TYPE_NOT_PROVIDED)}))}storeSession(){this._runningInBrowser&&this._didSigner&&(this._providerType&&localStorage.setItem("WalletProvider",this._providerType),this._didSigner.publicKey&&localStorage.setItem("PublicKey",this._didSigner.publicKey))}clearSession(){this._runningInBrowser&&(localStorage.removeItem("WalletProvider"),localStorage.removeItem("PublicKey"))}on(e,t){var f,r,s;if(!this._providerType)return;const n=this._providerType===exports.WalletProvider.MetaMask;switch(e){case"accountChanged":n?null===(f=this._metamaskProvider)||void 0===f||f.on("accountsChanged",t):this._walletConnectService.getProvider().wc.on("session_update",t);break;case"disconnected":!1===n&&(null===(r=this._walletConnectService.getProvider())||void 0===r||r.wc.on("disconnect",t));break;case"networkChanged":n?null===(s=this._metamaskProvider)||void 0===s||s.on("networkChanged",t):this._walletConnectService.getProvider().wc.on("session_update",t);break;default:throw new Error("Event not supported")}}initEventHandlers(){this.on("accountChanged",()=>{this.closeConnection()}),this.on("disconnected",()=>{this.closeConnection()}),this.on("networkChanged",()=>{this.closeConnection()})}closeConnection(){return P(this,void 0,void 0,(function*(){yield this._walletConnectService.closeConnection(),this.clearSession(),this._did=void 0,this._address=void 0,this._signer=void 0}))}loginToCacheServer(e){return P(this,void 0,void 0,(function*(){this._cacheClient&&(yield this._cacheClient.login(e))}))}setAddress(){return P(this,void 0,void 0,(function*(){this._signer&&(this._address=yield this._signer.getAddress())}))}get address(){return this._address}setResolver(){this._registrySetting&&(this._resolver=new n.Resolver(this._provider,this._registrySetting))}setDid(){this._did=`did:${i.Methods.Erc1056}:${this._address}`}setDocument(){return P(this,void 0,void 0,(function*(){if(this._did&&this._didSigner){const e=new o.DIDDocumentFull(this._did,new n.Operator(this._didSigner,this._registrySetting));yield e.create(),this._document=e}}))}setClaims(){this._didSigner&&this._document&&(this._userClaims=new t.ClaimsUser(this._didSigner,this._document,this._ipfsStore),this._issuerClaims=new t.ClaimsIssuer(this._didSigner,this._document,this._ipfsStore),this._verifierClaims=new t.ClaimsVerifier(this._didSigner,this._document,this._ipfsStore))}setJWT(){if(!this._didSigner)throw new Error(exports.ERROR_MESSAGES.SIGNER_NOT_INITIALIZED);this._jwt=new c.JWT(this._didSigner)}setupMessaging(){return P(this,void 0,void 0,(function*(){const{messagingMethod:e,natsServerUrl:t}=this._messagingOptions||{};if(t&&e===exports.MessagingMethod.Nats){this._jsonCodec=Z();try{let e="ws";0===t.indexOf("https://")&&(e="wss");const f=3e3,r=yield Promise.race([V({servers:`${e}://${t}`,timeout:f,pingInterval:5e4}),new Promise(e=>setTimeout(e,f))]);if(!r)return;this._natsConnection=r}catch(e){console.log(e)}}}))}downloadClaims({services:e}){return P(this,void 0,void 0,(function*(){return Promise.all(e.map(e=>{var t;return P(this,void 0,void 0,(function*(){var{serviceEndpoint:f}=e,r=x(e,["serviceEndpoint"]);const s=yield this._ipfsStore.get(f),n=null===(t=this._jwt)||void 0===t?void 0:t.decode(s),{claimData:i}=n,o=x(n,["claimData"]);return Object.assign(Object.assign(Object.assign({serviceEndpoint:f},r),i),o)}))}))}))}createSubdomainTx({domain:e,nodeName:t,owner:f=this._address}){return{to:this._ensRegistryAddress,data:this._ensRegistry.interface.functions.setSubnodeRecord.encode([B(e),L(t),f,this._ensResolverAddress,this.ttl])}}setDomainNameTx({domain:e}){var t;const f=B(e);return{to:this._ensResolverAddress,data:null===(t=this._ensResolver)||void 0===t?void 0:t.interface.functions.setName.encode([f,e])}}changeSubdomainOwnerTx({newOwner:e,label:t,namespace:f}){return{to:this._ensRegistryAddress,data:this._ensRegistry.interface.functions.setSubnodeOwner.encode([B(f),L(t),e])}}changeDomainOwnerTx({newOwner:e,namespace:t}){return{to:this._ensRegistryAddress,data:this._ensRegistry.interface.functions.setOwner.encode([B(t),e])}}validateIssuers({issuer:e,namespace:t}){return P(this,void 0,void 0,(function*(){const f=B(t),r=yield this._ensResolver.text(f,"metadata"),s=JSON.parse(r),n=E.default(e,s.issuer.did||[]);if(n.length>0)throw new Error("Issuer validation failed for: "+n.join(", "))}))}deleteSubdomainTx({namespace:e}){const t=e.split("."),f=t.slice(1).join("."),r=t[0];return{to:this._ensRegistryAddress,data:this._ensRegistry.interface.functions.setSubnodeRecord.encode([B(f),L(r),be,be,this.ttl])}}deleteDomain({namespace:e}){return P(this,void 0,void 0,(function*(){if(!this._signer)throw new Error(exports.ERROR_MESSAGES.SIGNER_NOT_INITIALIZED);yield this.send({calls:[this.deleteDomainTx({namespace:e})],from:yield this.getOwner({namespace:e})})}))}getOwner({namespace:e}){return P(this,void 0,void 0,(function*(){const t=B(e);return this._ensRegistry.owner(t)}))}send(e){var t,f;return P(this,void 0,void 0,(function*(){if(!this._signer)throw new Error(exports.ERROR_MESSAGES.SIGNER_NOT_INITIALIZED);try{for(var r,s=R(e.calls);!(r=yield s.next()).done;){const e=r.value;yield(yield this._signer.sendTransaction(Object.assign(Object.assign({},e),this._transactionOverrides))).wait()}}catch(e){t={error:e}}finally{try{r&&!r.done&&(f=s.return)&&(yield f.call(s))}finally{if(t)throw t.error}}}))}deleteDomainTx({namespace:e}){return{to:this._ensRegistryAddress,data:this._ensRegistry.interface.functions.setRecord.encode([B(e),be,be,this.ttl])}}setDomainDefinitionTx({domain:e,data:t}){return{to:this._ensResolverAddress,data:this._ensResolver.interface.functions.setText.encode([B(e),"metadata",JSON.stringify(t)])}}deleteSubdomain({namespace:e}){return P(this,void 0,void 0,(function*(){if(!this._signer)throw new Error(exports.ERROR_MESSAGES.SIGNER_NOT_INITIALIZED);yield this.send({calls:[this.deleteSubdomainTx({namespace:e})],from:yield this.getOwner({namespace:e.split(".").slice(1).join("")})})}))}initChain(){return P(this,void 0,void 0,(function*(){const{chainId:e}=yield this._provider.getNetwork(),{ensRegistryAddress:t,ensResolverAddress:f,didContractAddress:r}=ye[e];if(!t)throw new Error(`Chain config for chainId: ${e} does not contain ensRegistryAddress`);if(!f)throw new Error(`Chain config for chainId: ${e} does not contain ensResolverAddress`);if(!r)throw new Error(`Chain config for chainId: ${e} does not contain didContractAddress`);this._registrySetting={address:r,abi:Oe,method:i.Methods.Erc1056},this._ensRegistryAddress=t,this._ensResolverAddress=f,this._ensRegistry=U.connect(t,this._provider),this._ensResolver=F.connect(f,this._provider);const s=me[e];s.url&&(this._cacheClient=new le(s)),this._messagingOptions=ge[e]}))}}{static isMetamaskExtensionPresent(){return P(this,void 0,void 0,(function*(){const e=yield S.default({mustBeMetaMask:!0}),t=yield null==e?void 0:e.request({method:"eth_chainId"});return{isMetamaskPresent:!!e,chainId:t}}))}getDid(){return this._did}getSigner(){return this._signer}isSessionActive(){return Boolean(this._publicKey)&&Boolean(this._providerType)}getProviderType(){return this._providerType}initializeConnection({walletProvider:e=this._providerType,reinitializeMetamask:t}={}){var f;return P(this,void 0,void 0,(function*(){const{privateKey:r}=this._connectionOptions;if(!e&&!r)throw new Error(exports.ERROR_MESSAGES.WALLET_TYPE_NOT_PROVIDED);if(e&&!Object.values(exports.WalletProvider).includes(e))throw new Error(exports.ERROR_MESSAGES.WALLET_PROVIDER_NOT_SUPPORTED);try{yield this.init({initializeMetamask:t,walletProvider:e})}catch(e){if("User closed modal"===e.message)return{did:void 0,connected:!1,userClosedModal:!0,didDocument:null,realtimeExchangeConnected:!1};throw new Error(e)}return{did:this.getDid(),connected:this.isConnected()||!1,userClosedModal:!1,didDocument:yield this.getDidDocument(),identityToken:null===(f=this._didSigner)||void 0===f?void 0:f.identityToken,realtimeExchangeConnected:Boolean(this._natsConnection)}}))}isConnected(){return this._providerType&&[exports.WalletProvider.EwKeyManager,exports.WalletProvider.WalletConnect].includes(this._providerType)?this._walletConnectService.isConnected():!!this._address}getDidDocument({did:e=this._did,includeClaims:t=!0}={}){var f;return P(this,void 0,void 0,(function*(){if(this._cacheClient&&e)try{const f=yield this._cacheClient.getDidDocument({did:e,includeClaims:t});return Object.assign(Object.assign({},f),{service:f.service})}catch(e){if(401===(null===(f=e.response)||void 0===f?void 0:f.status))throw e;console.log(e)}if(e&&this._resolver){const f=yield this._resolver.read(e);return Object.assign(Object.assign({},f),{service:t?yield this.downloadClaims({services:f.service&&f.service.length>0?f.service:[]}):[]})}throw new Error(exports.ERROR_MESSAGES.USER_NOT_LOGGED_IN)}))}updateDidDocument(e){return P(this,void 0,void 0,(function*(){const{didAttribute:t,data:f,validity:r}=e;if(this._document){const e=yield this._document.update(t,f,r);return Boolean(e)}throw new Error(exports.ERROR_MESSAGES.DID_DOCUMENT_NOT_INITIALIZED)}))}revokeDidDocument(){return P(this,void 0,void 0,(function*(){if(this._document)return yield this._document.deactivate(),!0;throw new Error(exports.ERROR_MESSAGES.DID_DOCUMENT_NOT_INITIALIZED)}))}createPublicClaim({data:e,subject:t}){return P(this,void 0,void 0,(function*(){if(this._userClaims)return t?this._userClaims.createPublicClaim(e,{subject:t,issuer:""}):this._userClaims.createPublicClaim(e);throw new Error(exports.ERROR_MESSAGES.CLAIMS_NOT_INITIALIZED)}))}getClaimId({claimData:e}){return P(this,void 0,void 0,(function*(){const{service:t=[]}=yield this.getDidDocument(),{id:f,claimTypeVersion:s}=t.find(({profile:t,claimType:f,claimTypeVersion:r})=>Boolean(t)||f===e.claimType&&r===e.claimTypeVersion)||{};return e.profile&&f||e.claimType&&f&&e.claimTypeVersion===s?f:r.v4()}))}publishPublicClaim({token:f}){return P(this,void 0,void 0,(function*(){if(this._userClaims){const{claimData:r,iss:s}=yield this.decodeJWTToken({token:f}),n=yield this.getClaimId({claimData:r});if(!(yield this._userClaims.verifySignature(f,s)))throw new Error("Incorrect signature");const i=yield this._ipfsStore.save(f);return yield this.updateDidDocument({didAttribute:e.DIDAttribute.ServicePoint,data:{type:e.DIDAttribute.ServicePoint,value:{id:n,serviceEndpoint:i,hash:t.hashes.SHA256(f),hashAlg:"SHA256"}}}),i}throw new Error(exports.ERROR_MESSAGES.CLAIMS_NOT_INITIALIZED)}))}createProofClaim({claimUrl:e,saltedFields:t}){var f;return P(this,void 0,void 0,(function*(){if(this._userClaims){const r={};let s=0;return Object.entries(t).forEach(([e,t])=>{r[e]=s%2==0?{value:t,encrypted:!0}:{value:t,encrypted:!1},s++}),null===(f=this._userClaims)||void 0===f?void 0:f.createProofClaim(e,r)}throw new Error(exports.ERROR_MESSAGES.CLAIMS_NOT_INITIALIZED)}))}issuePublicClaim({token:e}){return P(this,void 0,void 0,(function*(){if(this._issuerClaims)return this._issuerClaims.issuePublicClaim(e);throw new Error(exports.ERROR_MESSAGES.CLAIMS_NOT_INITIALIZED)}))}verifyPublicClaim({issuedToken:e}){return P(this,void 0,void 0,(function*(){if(this._verifierClaims)return this._verifierClaims.verifyPublicProof(e);throw new Error(exports.ERROR_MESSAGES.CLAIMS_NOT_INITIALIZED)}))}createSelfSignedClaim({data:e,subject:t}){return P(this,void 0,void 0,(function*(){if(this._userClaims){const f=yield this.createPublicClaim({data:e,subject:t});return this.publishPublicClaim({token:f})}throw new Error(exports.ERROR_MESSAGES.CLAIMS_NOT_INITIALIZED)}))}getUserClaims({did:e=this._did}={}){return P(this,void 0,void 0,(function*(){const{service:t}=(yield this.getDidDocument({did:e}))||{};return t}))}decodeJWTToken({token:e}){return P(this,void 0,void 0,(function*(){if(!this._jwt)throw new Error(exports.ERROR_MESSAGES.JWT_NOT_INITIALIZED);return this._jwt.decode(e)}))}createIdentityProof(){return P(this,void 0,void 0,(function*(){if(this._provider){const e=yield this._provider.getBlockNumber();return this.createPublicClaim({data:{blockNumber:e}})}throw new Error(exports.ERROR_MESSAGES.PROVIDER_NOT_INITIALIZED)}))}setRoleDefinition({domain:e,data:t}){return P(this,void 0,void 0,(function*(){yield this.send({calls:[this.setDomainDefinitionTx({domain:e,data:t})],from:yield this.getOwner({namespace:e})})}))}createOrganization({orgName:e,namespace:t,data:f,returnSteps:r}){return P(this,void 0,void 0,(function*(){const s=`${e}.${t}`,n=`${exports.ENSNamespaceTypes.Roles}.${s}`,i=`${exports.ENSNamespaceTypes.Application}.${s}`,o=yield this.getOwner({namespace:t}),a=[{tx:this.createSubdomainTx({domain:t,nodeName:e,owner:o}),info:"Create organization subdomain"},{tx:this.setDomainNameTx({domain:s}),info:"Register reverse name for organization subdomain"},{tx:this.setDomainDefinitionTx({domain:s,data:f}),info:"Set definition for organization"},{tx:this.createSubdomainTx({domain:s,nodeName:exports.ENSNamespaceTypes.Roles,owner:o}),info:"Create roles subdomain for organization"},{tx:this.setDomainNameTx({domain:n}),info:"Register reverse name for roles subdomain"},{tx:this.createSubdomainTx({domain:s,nodeName:exports.ENSNamespaceTypes.Application,owner:o}),info:"Create app subdomain for organization"},{tx:this.setDomainNameTx({domain:i}),info:"Register reverse name for app subdomain"}].map(e=>Object.assign(Object.assign({},e),{next:()=>P(this,void 0,void 0,(function*(){yield this.send({calls:[e.tx],from:o})}))}));return r?a:(yield this.send({calls:a.map(({tx:e})=>e),from:o}),[])}))}createApplication({appName:e,namespace:t,data:f,returnSteps:r}){return P(this,void 0,void 0,(function*(){const s=`${e}.${t}`,n=yield this.getOwner({namespace:t}),i=[{tx:this.createSubdomainTx({domain:t,nodeName:e,owner:n}),info:"Set subdomain for application"},{tx:this.setDomainNameTx({domain:s}),info:"Set name for application"},{tx:this.setDomainDefinitionTx({data:f,domain:s}),info:"Set definition for application"},{tx:this.createSubdomainTx({domain:s,nodeName:exports.ENSNamespaceTypes.Roles,owner:n}),info:"Create roles subdomain for application"},{tx:this.setDomainNameTx({domain:`${exports.ENSNamespaceTypes.Roles}.${s}`}),info:"Set name for roles subdomain for application"}].map(e=>Object.assign(Object.assign({},e),{next:()=>P(this,void 0,void 0,(function*(){yield this.send({calls:[e.tx],from:n})}))}));return r?i:(yield this.send({calls:i.map(({tx:e})=>e),from:n}),[])}))}createRole({roleName:e,namespace:t,data:f,returnSteps:r}){return P(this,void 0,void 0,(function*(){const s=`${e}.${t}`,n=yield this.getOwner({namespace:t}),i=[{tx:this.createSubdomainTx({domain:t,nodeName:e,owner:n}),info:"Create subdomain for role"},{tx:this.setDomainNameTx({domain:s}),info:"Set name for role"},{tx:this.setDomainDefinitionTx({data:f,domain:s}),info:"Set role definition for role"}].map(e=>Object.assign(Object.assign({},e),{next:()=>P(this,void 0,void 0,(function*(){yield this.send({calls:[e.tx],from:n})}))}));return r?i:(yield this.send({calls:i.map(({tx:e})=>e),from:n}),[])}))}changeOrgOwnership({namespace:e,newOwner:t,returnSteps:f=!1}){return P(this,void 0,void 0,(function*(){const r=[`${exports.ENSNamespaceTypes.Roles}.${e}`,`${exports.ENSNamespaceTypes.Application}.${e}`,e],{alreadyFinished:s,changeOwnerNamespaces:n,notOwnedNamespaces:i}=yield this.validateChangeOwnership({newOwner:t,namespaces:r});if(i.length>0)throw new re({namespace:e,notOwnedNamespaces:i});const o=yield this.getOwner({namespace:e}),a=this._cacheClient?yield this.getAppsByOrgNamespace({namespace:e}):yield this.getSubdomains({domain:`${exports.ENSNamespaceTypes.Application}.${e}`});if(a&&a.length>0)throw new Error("You are not able to change ownership of organization with registered apps");s.length>0&&console.log("Already changed ownership of "+s.join(", "));const c=n.map(e=>{const f=this.changeDomainOwnerTx({newOwner:t,namespace:e});return{tx:f,next:({retryCheck:r}={})=>P(this,void 0,void 0,(function*(){if(r){if((yield this.getOwner({namespace:e}))===t)return}return this.send({calls:[f],from:o})})),info:"Changing ownership of "+e}});return f?c:(yield this.send({calls:c.map(({tx:e})=>e),from:o}),[])}))}changeAppOwnership({namespace:e,newOwner:t,returnSteps:f}){return P(this,void 0,void 0,(function*(){const r=[`${exports.ENSNamespaceTypes.Roles}.${e}`,e],{alreadyFinished:s,changeOwnerNamespaces:n,notOwnedNamespaces:i}=yield this.validateChangeOwnership({newOwner:t,namespaces:r});if(i.length>0)throw new re({namespace:e,notOwnedNamespaces:i});const o=yield this.getOwner({namespace:e});s.length>0&&console.log("Already changed ownership of "+s.join(", "));const a=n.map(e=>{const f=this.changeDomainOwnerTx({newOwner:t,namespace:e});return{tx:f,next:({retryCheck:r}={})=>P(this,void 0,void 0,(function*(){if(r){if((yield this.getOwner({namespace:e}))===t)return}return this.send({calls:[f],from:o})})),info:"Changing ownership of "+e}});return f?a:(yield this.send({calls:a.map(({tx:e})=>e),from:o}),[])}))}changeRoleOwnership({namespace:e,newOwner:t}){return P(this,void 0,void 0,(function*(){const f=yield this.validateOwnership({namespace:e,type:exports.ENSNamespaceTypes.Roles});if(f.length>0)throw new re({namespace:e,notOwnedNamespaces:f});const r=yield this.getOwner({namespace:e});yield this.send({calls:[this.changeDomainOwnerTx({namespace:e,newOwner:t})],from:r})}))}deleteOrganization({namespace:e,returnSteps:t}){return P(this,void 0,void 0,(function*(){const f=this._cacheClient?yield this.getAppsByOrgNamespace({namespace:e}):yield this.getSubdomains({domain:`${exports.ENSNamespaceTypes.Application}.${e}`});if(f&&f.length>0)throw new Error(exports.ERROR_MESSAGES.ORG_WITH_APPS);const r=yield this.getOwner({namespace:e}),s=this._cacheClient?yield this._cacheClient.getOrganizationRoles({namespace:e}):yield this.getSubdomains({domain:`${exports.ENSNamespaceTypes.Roles}.${e}`});if(s&&s.length>0)throw new Error(exports.ERROR_MESSAGES.ORG_WITH_ROLES);const n=[`${exports.ENSNamespaceTypes.Roles}.${e}`,`${exports.ENSNamespaceTypes.Application}.${e}`,e],{alreadyFinished:i,namespacesToDelete:o,notOwnedNamespaces:a}=yield this.validateDeletePossibility({namespaces:n});if(a.length>0)throw new se({namespace:e,notOwnedNamespaces:a});i.length>0&&console.log("Already deleted: "+i.join(", "));const c=o.map(e=>{const t=this.deleteDomainTx({namespace:e});return{tx:t,next:({retryCheck:f}={})=>P(this,void 0,void 0,(function*(){if(f){if((yield this.getOwner({namespace:e}))===be)return}return this.send({calls:[t],from:r})})),info:"Deleting "+e}});return t?c:(yield this.send({calls:c.map(({tx:e})=>e),from:r}),[])}))}deleteApplication({namespace:e,returnSteps:t}){return P(this,void 0,void 0,(function*(){const f=yield this.getOwner({namespace:e}),r=this._cacheClient?yield this._cacheClient.getApplicationRoles({namespace:e}):yield this.getSubdomains({domain:`${exports.ENSNamespaceTypes.Roles}.${e}`});if(r&&r.length>0)throw new Error(exports.ERROR_MESSAGES.APP_WITH_ROLES);const s=[`${exports.ENSNamespaceTypes.Roles}.${e}`,e],{alreadyFinished:n,namespacesToDelete:i,notOwnedNamespaces:o}=yield this.validateDeletePossibility({namespaces:s});if(o.length>0)throw new se({namespace:e,notOwnedNamespaces:o});n.length>0&&console.log("Already deleted: "+n.join(", "));const a=i.map(e=>{const t=this.deleteDomainTx({namespace:e});return{tx:t,next:({retryCheck:r}={})=>P(this,void 0,void 0,(function*(){if(r){if((yield this.getOwner({namespace:e}))===be)return}return this.send({calls:[t],from:f})})),info:"Deleting "+e}});return t?a:(yield this.send({calls:a.map(({tx:e})=>e),from:f}),[])}))}deleteRole({namespace:e}){return P(this,void 0,void 0,(function*(){const t=yield this.validateOwnership({namespace:e,type:exports.ENSNamespaceTypes.Roles});if(t.length>0)throw new se({namespace:e,notOwnedNamespaces:t});yield this.send({calls:[this.deleteDomainTx({namespace:e})],from:yield this.getOwner({namespace:e})})}))}getDefinition({type:e,namespace:t}){return P(this,void 0,void 0,(function*(){if(this._cacheClient&&e){if(e===exports.ENSNamespaceTypes.Roles)return this._cacheClient.getRoleDefinition({namespace:t});if(e===exports.ENSNamespaceTypes.Application)return this._cacheClient.getAppDefinition({namespace:t});if(e===exports.ENSNamespaceTypes.Organization)return this._cacheClient.getOrgDefinition({namespace:t});throw new Q}if(this._ensResolver){const e=B(t),f=yield this._ensResolver.text(e,"metadata");return JSON.parse(f)}throw new fe}))}getRolesByNamespace({parentType:e,namespace:t}){if(!this._cacheClient)throw new X;if(e===exports.ENSNamespaceTypes.Organization)return this._cacheClient.getOrganizationRoles({namespace:t});if(e===exports.ENSNamespaceTypes.Application)return this._cacheClient.getApplicationRoles({namespace:t});throw new Q}getENSTypesByOwner({type:e,owner:t,excludeSubOrgs:f=!1}){if(!this._cacheClient)throw new X;if(e===exports.ENSNamespaceTypes.Organization)return this._cacheClient.getOrganizationsByOwner({owner:t,excludeSubOrgs:f});if(e===exports.ENSNamespaceTypes.Application)return this._cacheClient.getApplicationsByOwner({owner:t});if(e===exports.ENSNamespaceTypes.Roles)return this._cacheClient.getRolesByOwner({owner:t});throw new Q}getENSTypesBySearchPhrase({types:e,search:t}){if(!this._cacheClient)throw new X;return this._cacheClient.getNamespaceBySearchPhrase({search:t,types:e})}getAppsByOrgNamespace({namespace:e}){if(!this._cacheClient)throw new X;return this._cacheClient.getApplicationsByOrganization({namespace:e})}getSubOrgsByOrgNamespace({namespace:e}){if(!this._cacheClient)throw new X;return this._cacheClient.getSubOrganizationsByOrganization({namespace:e})}getOrgHierarchy({namespace:e}){return P(this,void 0,void 0,(function*(){if(!this._cacheClient)throw new X;const t=yield this._cacheClient.getOrgHierarchy({namespace:e});return[t,...t.subOrgs||[],...t.apps||[],...t.roles||[]].forEach(e=>e.isOwnedByCurrentUser=e.owner===this.address),t}))}getRoleDIDs({namespace:e}){if(!this._cacheClient)throw new X;return this._cacheClient.getDIDsForRole({namespace:e})}getSubdomains({domain:e,mode:t="FIRSTLEVEL"}){return P(this,void 0,void 0,(function*(){return Ae({domain:e,ensRegistry:this._ensRegistry,ensResolver:this._ensResolver,mode:t})}))}checkExistenceOfDomain({domain:e}){return P(this,void 0,void 0,(function*(){if(this._ensRegistry){const t=B(e),[f,r]=yield Promise.all([this._ensRegistry.recordExists(t),(()=>P(this,void 0,void 0,(function*(){var e;return(yield null===(e=this._ensRegistry)||void 0===e?void 0:e.owner(t))!==be})))()]);return f&&r}throw new te}))}isOwner({domain:e,user:t=this._address}){return P(this,void 0,void 0,(function*(){if(this._ensRegistry){const f=B(e);return(yield this._ensRegistry.owner(f))===t}throw new te}))}validateOwnership({namespace:e,type:t}){return P(this,void 0,void 0,(function*(){return this.nonOwnedNodesOf({namespace:e,type:t,owner:this._address})}))}validateChangeOwnership({namespaces:e,newOwner:t}){return P(this,void 0,void 0,(function*(){return(yield this.namespacesWithRelations(e)).reduce((e,{namespace:f,owner:r})=>r===t?(e.alreadyFinished.push(f),e):r===be||r===this._address?(e.changeOwnerNamespaces.push(f),e):(e.notOwnedNamespaces.push(f),e),{notOwnedNamespaces:[],alreadyFinished:[],changeOwnerNamespaces:[]})}))}validateDeletePossibility({namespaces:e}){return P(this,void 0,void 0,(function*(){return(yield this.namespacesWithRelations(e)).reduce((e,{namespace:t,owner:f})=>f===be?(e.alreadyFinished.push(t),e):f===this._address?(e.namespacesToDelete.push(t),e):(e.notOwnedNamespaces.push(t),e),{notOwnedNamespaces:[],alreadyFinished:[],namespacesToDelete:[]})}))}verifyEnrolmentPreconditions({claims:e,enrolmentPreconditions:t}){if(t&&!(t.length<1))for(const{type:f,conditions:r}of t)if(f===exports.PreconditionTypes.Role&&r&&(null==r?void 0:r.length)>0){if(!e.some(({claimType:e})=>e&&r.includes(e)))throw new Error(exports.ERROR_MESSAGES.ROLE_PRECONDITION_NOT_MET)}}createClaimRequest({issuer:e,claim:t}){var f;return P(this,void 0,void 0,(function*(){if(!this._did)throw new Error(exports.ERROR_MESSAGES.USER_NOT_LOGGED_IN);const[s,n]=yield Promise.all([this.getDefinition({type:exports.ENSNamespaceTypes.Roles,namespace:t.claimType}),this.getDidDocument({includeClaims:!0})]);if(!s)throw new Error(exports.ERROR_MESSAGES.ROLE_NOT_EXISTS);const{enrolmentPreconditions:i}=s;this.verifyEnrolmentPreconditions({claims:n.service,enrolmentPreconditions:i});const o=yield this.createPublicClaim({data:t,subject:t.claimType}),a={id:r.v4(),token:o,claimIssuer:e,requester:this._did||""};if(!this._natsConnection){if(this._cacheClient)return this._cacheClient.requestClaim({did:this._did,message:a});throw new ee}const c=null===(f=this._jsonCodec)||void 0===f?void 0:f.encode(a);e.map(e=>{var t;null===(t=this._natsConnection)||void 0===t||t.publish(e+".claim.exchange",c)})}))}issueClaimRequest({requesterDID:e,id:t,token:f}){var r;return P(this,void 0,void 0,(function*(){if(!this._did)throw new Error(exports.ERROR_MESSAGES.USER_NOT_LOGGED_IN);const s=yield this.issuePublicClaim({token:f}),n={id:t,issuedToken:s,requester:e,claimIssuer:[this._did],acceptedBy:this._did};if(!this._natsConnection){if(this._cacheClient)return this._cacheClient.issueClaim({did:this._did,message:n});throw new ee}const i=null===(r=this._jsonCodec)||void 0===r?void 0:r.encode(n);this._natsConnection.publish(e+".claim.exchange",i)}))}rejectClaimRequest({id:e,requesterDID:t}){var f;return P(this,void 0,void 0,(function*(){if(!this._did)throw new Error(exports.ERROR_MESSAGES.USER_NOT_LOGGED_IN);const r={id:e,requester:t,claimIssuer:[this._did],isRejected:!0};if(!this._natsConnection){if(this._cacheClient)return this._cacheClient.rejectClaim({did:this._did,message:r});throw new ee}const s=null===(f=this._jsonCodec)||void 0===f?void 0:f.encode(r);this._natsConnection.publish(t+".claim.exchange",s)}))}deleteClaim({id:e}){return P(this,void 0,void 0,(function*(){throw this._cacheClient&&(yield this._cacheClient.deleteClaim({claimId:e})),new X}))}subscribeToMessages({topic:e=this._did+".claim.exchange",messageHandler:t}){var f,r,s;return P(this,void 0,void 0,(function*(){if(this._natsConnection){this._exchangeSubscription=this._natsConnection.subscribe(e);try{for(var n,i=R(this._exchangeSubscription);!(n=yield i.next()).done;){const e=n.value,f=null===(s=this._jsonCodec)||void 0===s?void 0:s.decode(e.data);t(f)}}catch(e){f={error:e}}finally{try{n&&!n.done&&(r=i.return)&&(yield r.call(i))}finally{if(f)throw f.error}}}}))}unsubscribeFromMessages(){return P(this,void 0,void 0,(function*(){this._exchangeSubscription&&this._exchangeSubscription.unsubscribe()}))}getRequestedClaims({did:e,isAccepted:t,parentNamespace:f}){return P(this,void 0,void 0,(function*(){if(!this._cacheClient)throw new X;return this._cacheClient.getRequestedClaims({did:e,isAccepted:t,parentNamespace:f})}))}getIssuedClaims({did:e,isAccepted:t,parentNamespace:f}){return P(this,void 0,void 0,(function*(){if(!this._cacheClient)throw new X;return this._cacheClient.getIssuedClaims({did:e,isAccepted:t,parentNamespace:f})}))}nonOwnedNodesOf({namespace:e,type:t,owner:f}){return P(this,void 0,void 0,(function*(){if(![exports.ENSNamespaceTypes.Roles,exports.ENSNamespaceTypes.Application,exports.ENSNamespaceTypes.Organization].includes(t))throw new Error(exports.ERROR_MESSAGES.ENS_TYPE_NOT_SUPPORTED);if(this._address){const r=t===exports.ENSNamespaceTypes.Roles?[e]:t===exports.ENSNamespaceTypes.Application?[e,exports.ENSNamespaceTypes.Application]:[e,exports.ENSNamespaceTypes.Application,exports.ENSNamespaceTypes.Organization];return Promise.all(r.map(e=>this.getOwner({namespace:e}))).then(e=>e.filter(e=>![f,be].includes(e)))}throw new Error(exports.ERROR_MESSAGES.USER_NOT_LOGGED_IN)}))}namespacesWithRelations(e){return P(this,void 0,void 0,(function*(){return Promise.all(e.map(e=>P(this,void 0,void 0,(function*(){const t=yield this.getOwner({namespace:e});return{namespace:e,owner:t}}))))}))}}const{bigNumberify:xe}=s.utils;Object.defineProperty(exports,"Algorithms",{enumerable:!0,get:function(){return e.Algorithms}}),Object.defineProperty(exports,"DIDAttribute",{enumerable:!0,get:function(){return e.DIDAttribute}}),Object.defineProperty(exports,"Encoding",{enumerable:!0,get:function(){return e.Encoding}}),Object.defineProperty(exports,"PubKeyType",{enumerable:!0,get:function(){return e.PubKeyType}}),exports.IAM=Te,exports.NATS_EXCHANGE_TOPIC="claim.exchange",exports.SafeIam=class extends Te{constructor(e,t){super(t),this.safeAppSdk=e,this._safeAddress=""}send(e){const t=Object.create(null,{send:{get:()=>super.send}});return P(this,void 0,void 0,(function*(){const f=xe((yield this._transactionOverrides.gasLimit)||"").toNumber();e.from===this._safeAddress?yield this.safeAppSdk.txs.send({txs:e.calls.map(e=>Object.assign(Object.assign({},e),{value:e.value||"0"})),params:{safeTxGas:f}}):e.from===this._address&&(yield t.send.call(this,e))}))}setAddress(){const e=Object.create(null,{setAddress:{get:()=>super.setAddress}});return P(this,void 0,void 0,(function*(){yield e.setAddress.call(this),this._safeAddress=(yield this.safeAppSdk.getSafeInfo()).safeAddress}))}get safeAddress(){return this._safeAddress}getENSTypesByOwner({type:e,owner:t}){if(!this._cacheClient)throw new X;switch(e){case exports.ENSNamespaceTypes.Organization:case exports.ENSNamespaceTypes.Application:case exports.ENSNamespaceTypes.Roles:return Promise.all([super.getENSTypesByOwner({type:e,owner:t}),super.getENSTypesByOwner({type:e,owner:this._safeAddress})]).then(([e,t])=>[...e,...t])}}validateOwnership({namespace:e,type:t}){const f=Object.create(null,{nonOwnedNodesOf:{get:()=>super.nonOwnedNodesOf}});return P(this,void 0,void 0,(function*(){if(this._address&&this._safeAddress){const r=yield f.nonOwnedNodesOf.call(this,{namespace:e,type:t,owner:this._address}),s=yield f.nonOwnedNodesOf.call(this,{namespace:e,type:t,owner:this._safeAddress});return r.length<s.length?r:s}throw new Error(exports.ERROR_MESSAGES.USER_NOT_LOGGED_IN)}))}isOwner({domain:e,user:t=this._address}){const f=Object.create(null,{isOwner:{get:()=>super.isOwner}});return P(this,void 0,void 0,(function*(){return(yield f.isOwner.call(this,{domain:e,user:t}))||t===this._address&&(yield f.isOwner.call(this,{domain:e,user:this._safeAddress}))}))}validateChangeOwnership({namespaces:e,newOwner:t}){return P(this,void 0,void 0,(function*(){return(yield this.namespacesWithRelations(e)).reduce((e,{namespace:f,owner:r})=>(r===t?e.alreadyFinished.push(f):r===this._address||r===this.safeAddress?e.changeOwnerNamespaces.push(f):e.notOwnedNamespaces.push(f),e),{notOwnedNamespaces:new Array,alreadyFinished:new Array,changeOwnerNamespaces:new Array})}))}validateDeletePossibility({namespaces:e}){return P(this,void 0,void 0,(function*(){return(yield this.namespacesWithRelations(e)).reduce((e,{namespace:t,owner:f})=>(f===be?e.alreadyFinished.push(t):f===this._address||f===this.safeAddress?e.namespacesToDelete.push(t):e.notOwnedNamespaces.push(t),e),{alreadyFinished:new Array,namespacesToDelete:new Array,notOwnedNamespaces:new Array})}))}getOrgHierarchy({namespace:e}){return P(this,void 0,void 0,(function*(){if(!this._cacheClient)throw new X;const t=yield this._cacheClient.getOrgHierarchy({namespace:e});return[t,...t.subOrgs||[],...t.apps||[],...t.roles||[]].forEach(e=>e.isOwnedByCurrentUser=[this._address,this.safeAddress].includes(e.owner)),t}))}},exports.VOLTA_CHAIN_ID=73799,exports.getSubdomains=Ae,exports.setCacheClientOptions=function(e,t){me[e]=Object.assign(Object.assign({},me[e]),t)},exports.setChainConfig=function(e,t){ye[e]=Object.assign(Object.assign({},ye[e]),t)},exports.setMessagingOptions=function(e,t){ge[e]=Object.assign(Object.assign({},ge[e]),t)};

Error: Error: invalid signer or provider (argument="signerOrProvider", value={"ready":{},"_lastBlockNumber":-2,"_balances":{},"_events":[],"_pollingInterval":4000,"_emitted":{"block":-2},"_fastQueryDate":1623909478836,"connection":{"url":"https://volta-rpc.energyweb.org/"},"_network":{"chainId":73799,"name":"unknown"},"_fastBlockNumber":12143092,"_fastBlockNumberPromise":{}}, code=INVALID_ARGUMENT, version=contracts/5.3.0)
    at Te.<anonymous> (/home/piotr/did-repro/node_modules/iam-client-lib/dist/iam-client-lib.js:1:208494)
    at Generator.throw (<anonymous>)
    at o (/home/piotr/did-repro/node_modules/iam-client-lib/dist/iam-client-lib.js:1:1688)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
Harasz commented 2 years ago

Hi @kosecki123, I've created Jira task for, we will take a look into the problem soon.

jrhender commented 2 years ago

Closing as iam-client-lib's logging has been significantly improved