@creit.tech/stellar-wallets-kit
Version:
A kit to handle all Stellar Wallets at once
1 lines • 1.73 kB
Source Map (JSON)
{"version":3,"file":"utils.cjs","sources":["../src/utils.ts"],"sourcesContent":["import { AlbedoModule } from './modules/albedo.module';\nimport { FreighterModule } from './modules/freighter.module';\nimport { LobstrModule } from './modules/lobstr.module';\nimport { RabetModule } from './modules/rabet.module';\nimport { xBullModule } from './modules/xbull.module';\nimport { HotWalletModule } from './modules/hotwallet.module';\nimport { HanaModule } from './modules/hana.module';\nimport { ModuleInterface } from './types';\n\nexport function allowAllModules(): ModuleInterface[] {\n return [\n new AlbedoModule(),\n new FreighterModule(),\n new RabetModule(),\n new xBullModule(),\n new LobstrModule(),\n new HanaModule(),\n new HotWalletModule(),\n ];\n}\n\nexport function parseError(e: any) {\n return {\n code: e?.error?.code || e?.code || -1,\n message: e?.error?.message || e?.message || (typeof e === 'string' && e) || 'Unhandled error from the wallet',\n ext: e?.error?.ext || e?.ext,\n };\n}\n"],"names":["AlbedoModule","FreighterModule","RabetModule","xBullModule","LobstrModule","HanaModule","HotWalletModule"],"mappings":";;;;;;;;;;SASgB,eAAe,GAAA;IAC7B,OAAO;AACL,QAAA,IAAIA,0BAAY,EAAE;AAClB,QAAA,IAAIC,gCAAe,EAAE;AACrB,QAAA,IAAIC,wBAAW,EAAE;AACjB,QAAA,IAAIC,wBAAW,EAAE;AACjB,QAAA,IAAIC,0BAAY,EAAE;AAClB,QAAA,IAAIC,sBAAU,EAAE;AAChB,QAAA,IAAIC,gCAAe,EAAE;KACtB;AACH;AAEM,SAAU,UAAU,CAAC,CAAM,EAAA;IAC/B,OAAO;AACL,QAAA,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,IAAI,IAAI,CAAC,EAAE,IAAI,IAAI,CAAC,CAAC;QACrC,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,OAAO,IAAI,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC,IAAI,iCAAiC;QAC7G,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,EAAE,GAAG;KAC7B;AACH;;;;;"}