@creit.tech/stellar-wallets-kit
Version:
A kit to handle all Stellar Wallets at once
1 lines • 1.6 kB
Source Map (JSON)
{"version":3,"file":"utils.mjs","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":[],"mappings":";;;;;;;;AASO,SAAS,eAAqC,GAAA;AACnD,EAAO,OAAA;AAAA,IACL,IAAI,YAAa,EAAA;AAAA,IACjB,IAAI,eAAgB,EAAA;AAAA,IACpB,IAAI,WAAY,EAAA;AAAA,IAChB,IAAI,WAAY,EAAA;AAAA,IAChB,IAAI,YAAa,EAAA;AAAA,IACjB,IAAI,UAAW,EAAA;AAAA,IACf,IAAI,eAAgB;AAAA,GACtB;AACF;AAEO,SAAS,WAAW,CAAQ,EAAA;AACjC,EAAO,OAAA;AAAA,IACL,IAAM,EAAA,CAAA,EAAG,KAAO,EAAA,IAAA,IAAQ,GAAG,IAAQ,IAAA,CAAA,CAAA;AAAA,IACnC,OAAA,EAAS,GAAG,KAAO,EAAA,OAAA,IAAW,GAAG,OAAY,IAAA,OAAO,CAAM,KAAA,QAAA,IAAY,CAAM,IAAA,iCAAA;AAAA,IAC5E,GAAK,EAAA,CAAA,EAAG,KAAO,EAAA,GAAA,IAAO,CAAG,EAAA;AAAA,GAC3B;AACF;;;;"}