@ledgerhq/device-management-kit 0.0.0-develop-20260304001325 → 0.0.0-develop-20260306001908
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/lib/cjs/package.json +1 -1
- package/lib/cjs/src/api/index.js +1 -1
- package/lib/cjs/src/api/index.js.map +2 -2
- package/lib/cjs/src/api/utils/Base64String.js +1 -1
- package/lib/cjs/src/api/utils/Base64String.js.map +3 -3
- package/lib/cjs/src/api/utils/Base64String.test.js +1 -1
- package/lib/cjs/src/api/utils/Base64String.test.js.map +3 -3
- package/lib/esm/package.json +1 -1
- package/lib/esm/src/api/index.js +1 -1
- package/lib/esm/src/api/index.js.map +3 -3
- package/lib/esm/src/api/utils/Base64String.js +1 -1
- package/lib/esm/src/api/utils/Base64String.js.map +3 -3
- package/lib/esm/src/api/utils/Base64String.test.js +1 -1
- package/lib/esm/src/api/utils/Base64String.test.js.map +3 -3
- package/lib/types/src/api/index.d.ts +1 -1
- package/lib/types/src/api/index.d.ts.map +1 -1
- package/lib/types/src/api/utils/Base64String.d.ts +1 -0
- package/lib/types/src/api/utils/Base64String.d.ts.map +1 -1
- package/lib/types/tsconfig.prod.tsbuildinfo +1 -1
- package/package.json +1 -1
package/lib/cjs/package.json
CHANGED
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"watch:builds": "pnpm ldmk-tool watch --entryPoints index.ts,src/**/*.ts --tsconfig tsconfig.prod.json",
|
|
65
65
|
"watch:types": "concurrently \"tsc --watch -p tsconfig.prod.json\" \"tsc-alias --watch -p tsconfig.prod.json\""
|
|
66
66
|
},
|
|
67
|
-
"version": "0.0.0-develop-
|
|
67
|
+
"version": "0.0.0-develop-20260306001908"
|
|
68
68
|
}
|
package/lib/cjs/src/api/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var S=Object.defineProperty;var le=Object.getOwnPropertyDescriptor;var ve=Object.getOwnPropertyNames;var Se=Object.prototype.hasOwnProperty;var ge=(p,t)=>{for(var a in t)S(p,a,{get:t[a],enumerable:!0})},v=(p,t,a,g)=>{if(t&&typeof t=="object"||typeof t=="function")for(let c of ve(t))!Se.call(p,c)&&c!==a&&S(p,c,{get:()=>t[c],enumerable:!(g=le(t,c))||g.enumerable});return p},o=(p,t,a)=>(v(p,t,"default"),a&&v(a,t,"default"));var ye=p=>v(S({},"__esModule",{value:!0}),p);var e={};ge(e,{APDU_MAX_PAYLOAD:()=>d.APDU_MAX_PAYLOAD,Apdu:()=>y.Apdu,ApduBuilder:()=>d.ApduBuilder,ApduParser:()=>C.ApduParser,ApduResponse:()=>Q.ApduResponse,AppAlreadyInstalledDAError:()=>r.AppAlreadyInstalledDAError,BatteryStatusType:()=>A.BatteryStatusType,BleDeviceInfos:()=>j.BleDeviceInfos,ByteArrayBuilder:()=>G.ByteArrayBuilder,ByteArrayParser:()=>L.ByteArrayParser,CallTaskInAppDeviceAction:()=>F.CallTaskInAppDeviceAction,CloseAppCommand:()=>E.CloseAppCommand,CommandResultFactory:()=>i.CommandResultFactory,CommandResultStatus:()=>i.CommandResultStatus,CommandUtils:()=>h.CommandUtils,ConnectedDevice:()=>xe.ConnectedDevice,ConsoleLogger:()=>ce.ConsoleLogger,DEFAULT_UNLOCK_TIMEOUT_MS:()=>_.DEFAULT_UNLOCK_TIMEOUT_MS,DefaultLogTagFormatter:()=>de.DefaultLogTagFormatter,DeviceActionStatus:()=>U.DeviceActionStatus,DeviceConnectionStateMachine:()=>Ae.DeviceConnectionStateMachine,DeviceLockedError:()=>r.DeviceLockedError,DeviceManagementKit:()=>me.DeviceManagementKit,DeviceManagementKitBuilder:()=>ne.DeviceManagementKitBuilder,DeviceModel:()=>n.DeviceModel,DeviceModelId:()=>n.DeviceModelId,DeviceNotOnboardedError:()=>r.DeviceNotOnboardedError,DeviceSessionStateType:()=>Z.DeviceSessionStateType,DeviceStatus:()=>M.DeviceStatus,FramerUtils:()=>ie.FramerUtils,GLOBAL_ERRORS:()=>m.GLOBAL_ERRORS,GenuineCheckDeviceAction:()=>$.GenuineCheckDeviceAction,GetAppAndVersionCommand:()=>B.GetAppAndVersionCommand,GetBackgroundImageSizeCommand:()=>x.GetBackgroundImageSizeCommand,GetBackgroundImageSizeCommandError:()=>x.GetBackgroundImageSizeCommandError,GetBatteryStatusCommand:()=>A.GetBatteryStatusCommand,GetDeviceMetadataDeviceAction:()=>V.GetDeviceMetadataDeviceAction,GetDeviceStatusDeviceAction:()=>z.GetDeviceStatusDeviceAction,GetOsVersionCommand:()=>I.GetOsVersionCommand,GlobalCommandError:()=>m.GlobalCommandError,GlobalCommandErrorHandler:()=>m.GlobalCommandErrorHandler,GoToDashboardDeviceAction:()=>P.GoToDashboardDeviceAction,InstallAppDeviceAction:()=>ee.InstallAppDeviceAction,InstallOrUpdateAppsDeviceAction:()=>W.InstallOrUpdateAppsDeviceAction,InvalidGetFirmwareMetadataResponseError:()=>f.InvalidGetFirmwareMetadataResponseError,InvalidStatusWordError:()=>f.InvalidStatusWordError,LEDGER_VENDOR_ID:()=>n.LEDGER_VENDOR_ID,ListAppsCommand:()=>R.ListAppsCommand,ListAppsDeviceAction:()=>w.ListAppsDeviceAction,ListAppsWithMetadataDeviceAction:()=>H.ListAppsWithMetadataDeviceAction,ListInstalledAppsDeviceAction:()=>oe.ListInstalledAppsDeviceAction,LoadCertificateCommand:()=>T.LoadCertificateCommand,LogLevel:()=>se.LogLevel,OpenAppCommand:()=>b.OpenAppCommand,OpenAppDeviceAction:()=>K.OpenAppDeviceAction,OpenAppWithDependenciesDeviceAction:()=>N.OpenAppWithDependenciesDeviceAction,OutOfMemoryDAError:()=>r.OutOfMemoryDAError,RefusedByUserDAError:()=>r.RefusedByUserDAError,SecureChannelError:()=>te.SecureChannelError,SendCommandInAppDeviceAction:()=>q.SendCommandInAppDeviceAction,StaticDeviceModelDataSource:()=>Y.StaticDeviceModelDataSource,TransportConnectedDevice:()=>De.TransportConnectedDevice,TransportDeviceModel:()=>J.TransportDeviceModel,UninstallAppDeviceAction:()=>re.UninstallAppDeviceAction,UnknownDAError:()=>r.UnknownDAError,UnsupportedFirmwareDAError:()=>r.UnsupportedFirmwareDAError,UserInteractionRequired:()=>k.UserInteractionRequired,WebLogsExporterLogger:()=>fe.WebLogsExporterLogger,XStateDeviceAction:()=>X.XStateDeviceAction,base64StringToBuffer:()=>l.base64StringToBuffer,bufferToHexaString:()=>s.bufferToHexaString,connectedDeviceStubBuilder:()=>ue.connectedDeviceStubBuilder,defaultApduReceiverServiceStubBuilder:()=>pe.defaultApduReceiverServiceStubBuilder,defaultApduSenderServiceStubBuilder:()=>ae.defaultApduSenderServiceStubBuilder,formatApduReceivedLog:()=>u.formatApduReceivedLog,formatApduSentLog:()=>u.formatApduSentLog,hexaStringToBuffer:()=>s.hexaStringToBuffer,isBase64String:()=>l.isBase64String,isCommandErrorCode:()=>O.isCommandErrorCode,isHexaString:()=>s.isHexaString,isSuccessCommandResult:()=>i.isSuccessCommandResult,noopLogger:()=>D.noopLogger,noopLoggerFactory:()=>D.noopLoggerFactory});module.exports=ye(e);var y=require("./apdu/model/Apdu"),d=require("./apdu/utils/ApduBuilder"),C=require("./apdu/utils/ApduParser");o(e,require("./apdu/utils/AppBuilderError"),module.exports);var G=require("./apdu/utils/ByteArrayBuilder"),L=require("./apdu/utils/ByteArrayParser"),f=require("./command/Errors"),i=require("./command/model/CommandResult"),E=require("./command/os/CloseAppCommand"),B=require("./command/os/GetAppAndVersionCommand"),x=require("./command/os/GetBackgroundImageSizeCommand"),A=require("./command/os/GetBatteryStatusCommand"),I=require("./command/os/GetOsVersionCommand"),R=require("./command/os/ListAppsCommand"),T=require("./command/os/LoadCertificateCommand"),b=require("./command/os/OpenAppCommand"),O=require("./command/utils/CommandErrors"),h=require("./command/utils/CommandUtils"),m=require("./command/utils/GlobalCommandError"),n=require("./device/DeviceModel"),M=require("./device/DeviceStatus"),U=require("./device-action/model/DeviceActionState"),k=require("./device-action/model/UserInteractionRequired"),F=require("./device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction"),_=require("./device-action/os/Const"),r=require("./device-action/os/Errors"),V=require("./device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction"),z=require("./device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction"),P=require("./device-action/os/GoToDashboard/GoToDashboardDeviceAction"),W=require("./device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction"),w=require("./device-action/os/ListApps/ListAppsDeviceAction"),H=require("./device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction"),K=require("./device-action/os/OpenAppDeviceAction/OpenAppDeviceAction"),N=require("./device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction"),q=require("./device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction"),X=require("./device-action/xstate-utils/XStateDeviceAction"),Y=require("./device-model/data/StaticDeviceModelDataSource"),j=require("./device-model/model/BleDeviceInfos"),J=require("./device-model/model/DeviceModel"),Q=require("./device-session/ApduResponse");o(e,require("./device-session/data/FramerConst"),module.exports);var Z=require("./device-session/DeviceSessionState"),$=require("./secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction"),ee=require("./secure-channel/device-action/InstallApp/InstallAppDeviceAction"),oe=require("./secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction"),re=require("./secure-channel/device-action/UninstallApp/UninstallAppDeviceAction"),te=require("../internal/secure-channel/model/Errors"),pe=require("./device-session/service/DefaultApduReceiverService.stub"),ae=require("./device-session/service/DefaultApduSenderService.stub"),ie=require("./device-session/utils/FramerUtils"),me=require("./DeviceManagementKit"),ne=require("./DeviceManagementKitBuilder");o(e,require("./Error"),module.exports);var D=require("./logger-publisher/utils/noopLoggerFactory"),se=require("./logger-subscriber/model/LogLevel"),ce=require("./logger-subscriber/service/ConsoleLogger"),de=require("./logger-subscriber/service/DefaultLogTagFormatter"),fe=require("./logger-subscriber/service/WebLogsExporterLogger"),xe=require("./transport/model/ConnectedDevice"),Ae=require("./transport/model/DeviceConnectionStateMachine");o(e,require("./transport/model/Errors"),module.exports);var De=require("./transport/model/TransportConnectedDevice"),ue=require("./transport/model/TransportConnectedDevice.stub");o(e,require("./types"),module.exports);var u=require("./utils/apduLogs"),l=require("./utils/Base64String"),s=require("./utils/HexaString");0&&(module.exports={APDU_MAX_PAYLOAD,Apdu,ApduBuilder,ApduParser,ApduResponse,AppAlreadyInstalledDAError,BatteryStatusType,BleDeviceInfos,ByteArrayBuilder,ByteArrayParser,CallTaskInAppDeviceAction,CloseAppCommand,CommandResultFactory,CommandResultStatus,CommandUtils,ConnectedDevice,ConsoleLogger,DEFAULT_UNLOCK_TIMEOUT_MS,DefaultLogTagFormatter,DeviceActionStatus,DeviceConnectionStateMachine,DeviceLockedError,DeviceManagementKit,DeviceManagementKitBuilder,DeviceModel,DeviceModelId,DeviceNotOnboardedError,DeviceSessionStateType,DeviceStatus,FramerUtils,GLOBAL_ERRORS,GenuineCheckDeviceAction,GetAppAndVersionCommand,GetBackgroundImageSizeCommand,GetBackgroundImageSizeCommandError,GetBatteryStatusCommand,GetDeviceMetadataDeviceAction,GetDeviceStatusDeviceAction,GetOsVersionCommand,GlobalCommandError,GlobalCommandErrorHandler,GoToDashboardDeviceAction,InstallAppDeviceAction,InstallOrUpdateAppsDeviceAction,InvalidGetFirmwareMetadataResponseError,InvalidStatusWordError,LEDGER_VENDOR_ID,ListAppsCommand,ListAppsDeviceAction,ListAppsWithMetadataDeviceAction,ListInstalledAppsDeviceAction,LoadCertificateCommand,LogLevel,OpenAppCommand,OpenAppDeviceAction,OpenAppWithDependenciesDeviceAction,OutOfMemoryDAError,RefusedByUserDAError,SecureChannelError,SendCommandInAppDeviceAction,StaticDeviceModelDataSource,TransportConnectedDevice,TransportDeviceModel,UninstallAppDeviceAction,UnknownDAError,UnsupportedFirmwareDAError,UserInteractionRequired,WebLogsExporterLogger,XStateDeviceAction,base64StringToBuffer,bufferToHexaString,connectedDeviceStubBuilder,defaultApduReceiverServiceStubBuilder,defaultApduSenderServiceStubBuilder,formatApduReceivedLog,formatApduSentLog,hexaStringToBuffer,isBase64String,isCommandErrorCode,isHexaString,isSuccessCommandResult,noopLogger,noopLoggerFactory,...require("./apdu/utils/AppBuilderError"),...require("./device-session/data/FramerConst"),...require("./Error"),...require("./transport/model/Errors"),...require("./types")});
|
|
1
|
+
"use strict";var S=Object.defineProperty;var le=Object.getOwnPropertyDescriptor;var ve=Object.getOwnPropertyNames;var Se=Object.prototype.hasOwnProperty;var ge=(p,t)=>{for(var a in t)S(p,a,{get:t[a],enumerable:!0})},v=(p,t,a,g)=>{if(t&&typeof t=="object"||typeof t=="function")for(let f of ve(t))!Se.call(p,f)&&f!==a&&S(p,f,{get:()=>t[f],enumerable:!(g=le(t,f))||g.enumerable});return p},o=(p,t,a)=>(v(p,t,"default"),a&&v(a,t,"default"));var ye=p=>v(S({},"__esModule",{value:!0}),p);var e={};ge(e,{APDU_MAX_PAYLOAD:()=>d.APDU_MAX_PAYLOAD,Apdu:()=>y.Apdu,ApduBuilder:()=>d.ApduBuilder,ApduParser:()=>C.ApduParser,ApduResponse:()=>Q.ApduResponse,AppAlreadyInstalledDAError:()=>r.AppAlreadyInstalledDAError,BatteryStatusType:()=>D.BatteryStatusType,BleDeviceInfos:()=>j.BleDeviceInfos,ByteArrayBuilder:()=>G.ByteArrayBuilder,ByteArrayParser:()=>L.ByteArrayParser,CallTaskInAppDeviceAction:()=>F.CallTaskInAppDeviceAction,CloseAppCommand:()=>E.CloseAppCommand,CommandResultFactory:()=>i.CommandResultFactory,CommandResultStatus:()=>i.CommandResultStatus,CommandUtils:()=>h.CommandUtils,ConnectedDevice:()=>xe.ConnectedDevice,ConsoleLogger:()=>ce.ConsoleLogger,DEFAULT_UNLOCK_TIMEOUT_MS:()=>_.DEFAULT_UNLOCK_TIMEOUT_MS,DefaultLogTagFormatter:()=>fe.DefaultLogTagFormatter,DeviceActionStatus:()=>U.DeviceActionStatus,DeviceConnectionStateMachine:()=>Ae.DeviceConnectionStateMachine,DeviceLockedError:()=>r.DeviceLockedError,DeviceManagementKit:()=>me.DeviceManagementKit,DeviceManagementKitBuilder:()=>ne.DeviceManagementKitBuilder,DeviceModel:()=>n.DeviceModel,DeviceModelId:()=>n.DeviceModelId,DeviceNotOnboardedError:()=>r.DeviceNotOnboardedError,DeviceSessionStateType:()=>Z.DeviceSessionStateType,DeviceStatus:()=>M.DeviceStatus,FramerUtils:()=>ie.FramerUtils,GLOBAL_ERRORS:()=>m.GLOBAL_ERRORS,GenuineCheckDeviceAction:()=>$.GenuineCheckDeviceAction,GetAppAndVersionCommand:()=>B.GetAppAndVersionCommand,GetBackgroundImageSizeCommand:()=>A.GetBackgroundImageSizeCommand,GetBackgroundImageSizeCommandError:()=>A.GetBackgroundImageSizeCommandError,GetBatteryStatusCommand:()=>D.GetBatteryStatusCommand,GetDeviceMetadataDeviceAction:()=>V.GetDeviceMetadataDeviceAction,GetDeviceStatusDeviceAction:()=>z.GetDeviceStatusDeviceAction,GetOsVersionCommand:()=>I.GetOsVersionCommand,GlobalCommandError:()=>m.GlobalCommandError,GlobalCommandErrorHandler:()=>m.GlobalCommandErrorHandler,GoToDashboardDeviceAction:()=>P.GoToDashboardDeviceAction,InstallAppDeviceAction:()=>ee.InstallAppDeviceAction,InstallOrUpdateAppsDeviceAction:()=>W.InstallOrUpdateAppsDeviceAction,InvalidGetFirmwareMetadataResponseError:()=>x.InvalidGetFirmwareMetadataResponseError,InvalidStatusWordError:()=>x.InvalidStatusWordError,LEDGER_VENDOR_ID:()=>n.LEDGER_VENDOR_ID,ListAppsCommand:()=>T.ListAppsCommand,ListAppsDeviceAction:()=>w.ListAppsDeviceAction,ListAppsWithMetadataDeviceAction:()=>H.ListAppsWithMetadataDeviceAction,ListInstalledAppsDeviceAction:()=>oe.ListInstalledAppsDeviceAction,LoadCertificateCommand:()=>R.LoadCertificateCommand,LogLevel:()=>se.LogLevel,OpenAppCommand:()=>b.OpenAppCommand,OpenAppDeviceAction:()=>K.OpenAppDeviceAction,OpenAppWithDependenciesDeviceAction:()=>N.OpenAppWithDependenciesDeviceAction,OutOfMemoryDAError:()=>r.OutOfMemoryDAError,RefusedByUserDAError:()=>r.RefusedByUserDAError,SecureChannelError:()=>te.SecureChannelError,SendCommandInAppDeviceAction:()=>q.SendCommandInAppDeviceAction,StaticDeviceModelDataSource:()=>Y.StaticDeviceModelDataSource,TransportConnectedDevice:()=>De.TransportConnectedDevice,TransportDeviceModel:()=>J.TransportDeviceModel,UninstallAppDeviceAction:()=>re.UninstallAppDeviceAction,UnknownDAError:()=>r.UnknownDAError,UnsupportedFirmwareDAError:()=>r.UnsupportedFirmwareDAError,UserInteractionRequired:()=>k.UserInteractionRequired,WebLogsExporterLogger:()=>de.WebLogsExporterLogger,XStateDeviceAction:()=>X.XStateDeviceAction,base64StringToBuffer:()=>s.base64StringToBuffer,bufferToBase64String:()=>s.bufferToBase64String,bufferToHexaString:()=>c.bufferToHexaString,connectedDeviceStubBuilder:()=>ue.connectedDeviceStubBuilder,defaultApduReceiverServiceStubBuilder:()=>pe.defaultApduReceiverServiceStubBuilder,defaultApduSenderServiceStubBuilder:()=>ae.defaultApduSenderServiceStubBuilder,formatApduReceivedLog:()=>l.formatApduReceivedLog,formatApduSentLog:()=>l.formatApduSentLog,hexaStringToBuffer:()=>c.hexaStringToBuffer,isBase64String:()=>s.isBase64String,isCommandErrorCode:()=>O.isCommandErrorCode,isHexaString:()=>c.isHexaString,isSuccessCommandResult:()=>i.isSuccessCommandResult,noopLogger:()=>u.noopLogger,noopLoggerFactory:()=>u.noopLoggerFactory});module.exports=ye(e);var y=require("./apdu/model/Apdu"),d=require("./apdu/utils/ApduBuilder"),C=require("./apdu/utils/ApduParser");o(e,require("./apdu/utils/AppBuilderError"),module.exports);var G=require("./apdu/utils/ByteArrayBuilder"),L=require("./apdu/utils/ByteArrayParser"),x=require("./command/Errors"),i=require("./command/model/CommandResult"),E=require("./command/os/CloseAppCommand"),B=require("./command/os/GetAppAndVersionCommand"),A=require("./command/os/GetBackgroundImageSizeCommand"),D=require("./command/os/GetBatteryStatusCommand"),I=require("./command/os/GetOsVersionCommand"),T=require("./command/os/ListAppsCommand"),R=require("./command/os/LoadCertificateCommand"),b=require("./command/os/OpenAppCommand"),O=require("./command/utils/CommandErrors"),h=require("./command/utils/CommandUtils"),m=require("./command/utils/GlobalCommandError"),n=require("./device/DeviceModel"),M=require("./device/DeviceStatus"),U=require("./device-action/model/DeviceActionState"),k=require("./device-action/model/UserInteractionRequired"),F=require("./device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction"),_=require("./device-action/os/Const"),r=require("./device-action/os/Errors"),V=require("./device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction"),z=require("./device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction"),P=require("./device-action/os/GoToDashboard/GoToDashboardDeviceAction"),W=require("./device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction"),w=require("./device-action/os/ListApps/ListAppsDeviceAction"),H=require("./device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction"),K=require("./device-action/os/OpenAppDeviceAction/OpenAppDeviceAction"),N=require("./device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction"),q=require("./device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction"),X=require("./device-action/xstate-utils/XStateDeviceAction"),Y=require("./device-model/data/StaticDeviceModelDataSource"),j=require("./device-model/model/BleDeviceInfos"),J=require("./device-model/model/DeviceModel"),Q=require("./device-session/ApduResponse");o(e,require("./device-session/data/FramerConst"),module.exports);var Z=require("./device-session/DeviceSessionState"),$=require("./secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction"),ee=require("./secure-channel/device-action/InstallApp/InstallAppDeviceAction"),oe=require("./secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction"),re=require("./secure-channel/device-action/UninstallApp/UninstallAppDeviceAction"),te=require("../internal/secure-channel/model/Errors"),pe=require("./device-session/service/DefaultApduReceiverService.stub"),ae=require("./device-session/service/DefaultApduSenderService.stub"),ie=require("./device-session/utils/FramerUtils"),me=require("./DeviceManagementKit"),ne=require("./DeviceManagementKitBuilder");o(e,require("./Error"),module.exports);var u=require("./logger-publisher/utils/noopLoggerFactory"),se=require("./logger-subscriber/model/LogLevel"),ce=require("./logger-subscriber/service/ConsoleLogger"),fe=require("./logger-subscriber/service/DefaultLogTagFormatter"),de=require("./logger-subscriber/service/WebLogsExporterLogger"),xe=require("./transport/model/ConnectedDevice"),Ae=require("./transport/model/DeviceConnectionStateMachine");o(e,require("./transport/model/Errors"),module.exports);var De=require("./transport/model/TransportConnectedDevice"),ue=require("./transport/model/TransportConnectedDevice.stub");o(e,require("./types"),module.exports);var l=require("./utils/apduLogs"),s=require("./utils/Base64String"),c=require("./utils/HexaString");0&&(module.exports={APDU_MAX_PAYLOAD,Apdu,ApduBuilder,ApduParser,ApduResponse,AppAlreadyInstalledDAError,BatteryStatusType,BleDeviceInfos,ByteArrayBuilder,ByteArrayParser,CallTaskInAppDeviceAction,CloseAppCommand,CommandResultFactory,CommandResultStatus,CommandUtils,ConnectedDevice,ConsoleLogger,DEFAULT_UNLOCK_TIMEOUT_MS,DefaultLogTagFormatter,DeviceActionStatus,DeviceConnectionStateMachine,DeviceLockedError,DeviceManagementKit,DeviceManagementKitBuilder,DeviceModel,DeviceModelId,DeviceNotOnboardedError,DeviceSessionStateType,DeviceStatus,FramerUtils,GLOBAL_ERRORS,GenuineCheckDeviceAction,GetAppAndVersionCommand,GetBackgroundImageSizeCommand,GetBackgroundImageSizeCommandError,GetBatteryStatusCommand,GetDeviceMetadataDeviceAction,GetDeviceStatusDeviceAction,GetOsVersionCommand,GlobalCommandError,GlobalCommandErrorHandler,GoToDashboardDeviceAction,InstallAppDeviceAction,InstallOrUpdateAppsDeviceAction,InvalidGetFirmwareMetadataResponseError,InvalidStatusWordError,LEDGER_VENDOR_ID,ListAppsCommand,ListAppsDeviceAction,ListAppsWithMetadataDeviceAction,ListInstalledAppsDeviceAction,LoadCertificateCommand,LogLevel,OpenAppCommand,OpenAppDeviceAction,OpenAppWithDependenciesDeviceAction,OutOfMemoryDAError,RefusedByUserDAError,SecureChannelError,SendCommandInAppDeviceAction,StaticDeviceModelDataSource,TransportConnectedDevice,TransportDeviceModel,UninstallAppDeviceAction,UnknownDAError,UnsupportedFirmwareDAError,UserInteractionRequired,WebLogsExporterLogger,XStateDeviceAction,base64StringToBuffer,bufferToBase64String,bufferToHexaString,connectedDeviceStubBuilder,defaultApduReceiverServiceStubBuilder,defaultApduSenderServiceStubBuilder,formatApduReceivedLog,formatApduSentLog,hexaStringToBuffer,isBase64String,isCommandErrorCode,isHexaString,isSuccessCommandResult,noopLogger,noopLoggerFactory,...require("./apdu/utils/AppBuilderError"),...require("./device-session/data/FramerConst"),...require("./Error"),...require("./transport/model/Errors"),...require("./types")});
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/api/index.ts"],
|
|
4
|
-
"sourcesContent": ["\"use strict\";\n\nexport { Apdu } from \"@api/apdu/model/Apdu\";\nexport { APDU_MAX_PAYLOAD, ApduBuilder } from \"@api/apdu/utils/ApduBuilder\";\nexport { ApduParser } from \"@api/apdu/utils/ApduParser\";\nexport * from \"@api/apdu/utils/AppBuilderError\";\nexport { ByteArrayBuilder } from \"@api/apdu/utils/ByteArrayBuilder\";\nexport { ByteArrayParser } from \"@api/apdu/utils/ByteArrayParser\";\nexport { type Command } from \"@api/command/Command\";\nexport {\n InvalidGetFirmwareMetadataResponseError,\n InvalidStatusWordError,\n} from \"@api/command/Errors\";\nexport {\n CommandResultFactory,\n CommandResultStatus,\n isSuccessCommandResult,\n} from \"@api/command/model/CommandResult\";\nexport { CloseAppCommand } from \"@api/command/os/CloseAppCommand\";\nexport {\n GetAppAndVersionCommand,\n type GetAppAndVersionResponse,\n} from \"@api/command/os/GetAppAndVersionCommand\";\nexport {\n GetBackgroundImageSizeCommand,\n GetBackgroundImageSizeCommandError,\n type GetBackgroundImageSizeCommandResult,\n type GetBackgroundImageSizeErrorCodes,\n type GetBackgroundImageSizeResponse,\n} from \"@api/command/os/GetBackgroundImageSizeCommand\";\nexport {\n BatteryStatusType,\n type GetBatteryStatusArgs,\n GetBatteryStatusCommand,\n type GetBatteryStatusResponse,\n} from \"@api/command/os/GetBatteryStatusCommand\";\nexport {\n GetOsVersionCommand,\n type GetOsVersionResponse,\n} from \"@api/command/os/GetOsVersionCommand\";\nexport {\n type ListAppsArgs,\n ListAppsCommand,\n type ListAppsErrorCodes,\n type ListAppsResponse,\n} from \"@api/command/os/ListAppsCommand\";\nexport {\n type LoadCertificateArgs,\n LoadCertificateCommand,\n type LoadCertificateErrorCodes,\n} from \"@api/command/os/LoadCertificateCommand\";\nexport {\n type OpenAppArgs,\n OpenAppCommand,\n} from \"@api/command/os/OpenAppCommand\";\nexport { isCommandErrorCode } from \"@api/command/utils/CommandErrors\";\nexport { CommandUtils } from \"@api/command/utils/CommandUtils\";\nexport {\n GLOBAL_ERRORS,\n GlobalCommandError,\n GlobalCommandErrorHandler,\n} from \"@api/command/utils/GlobalCommandError\";\nexport {\n DeviceModel,\n DeviceModelId,\n LEDGER_VENDOR_ID,\n} from \"@api/device/DeviceModel\";\nexport { DeviceStatus } from \"@api/device/DeviceStatus\";\nexport { type InternalApi } from \"@api/device-action/DeviceAction\";\nexport {\n type DeviceActionState,\n DeviceActionStatus,\n} from \"@api/device-action/model/DeviceActionState\";\nexport { UserInteractionRequired } from \"@api/device-action/model/UserInteractionRequired\";\nexport { CallTaskInAppDeviceAction } from \"@api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction\";\nexport { DEFAULT_UNLOCK_TIMEOUT_MS } from \"@api/device-action/os/Const\";\nexport {\n AppAlreadyInstalledDAError,\n DeviceLockedError,\n DeviceNotOnboardedError,\n OutOfMemoryDAError,\n RefusedByUserDAError,\n UnknownDAError,\n UnsupportedFirmwareDAError,\n} from \"@api/device-action/os/Errors\";\nexport { GetDeviceMetadataDeviceAction } from \"@api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction\";\nexport { GetDeviceStatusDeviceAction } from \"@api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction\";\nexport { GoToDashboardDeviceAction } from \"@api/device-action/os/GoToDashboard/GoToDashboardDeviceAction\";\nexport type {\n GoToDashboardDAError,\n GoToDashboardDAInput,\n GoToDashboardDAIntermediateValue,\n GoToDashboardDAOutput,\n GoToDashboardDARequiredInteraction,\n GoToDashboardDAState,\n} from \"@api/device-action/os/GoToDashboard/types\";\nexport { InstallOrUpdateAppsDeviceAction } from \"@api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction\";\nexport { ListAppsDeviceAction } from \"@api/device-action/os/ListApps/ListAppsDeviceAction\";\nexport { ListAppsWithMetadataDeviceAction } from \"@api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction\";\nexport { OpenAppDeviceAction } from \"@api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction\";\nexport { OpenAppWithDependenciesDeviceAction } from \"@api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction\";\nexport { SendCommandInAppDeviceAction } from \"@api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction\";\nexport {\n type DeviceActionStateMachine,\n XStateDeviceAction,\n} from \"@api/device-action/xstate-utils/XStateDeviceAction\";\nexport { StaticDeviceModelDataSource } from \"@api/device-model/data/StaticDeviceModelDataSource\";\nexport { BleDeviceInfos } from \"@api/device-model/model/BleDeviceInfos\";\nexport { TransportDeviceModel } from \"@api/device-model/model/DeviceModel\";\nexport { ApduResponse } from \"@api/device-session/ApduResponse\";\nexport * from \"@api/device-session/data/FramerConst\";\nexport {\n type DeviceSessionState,\n DeviceSessionStateType,\n} from \"@api/device-session/DeviceSessionState\";\nexport { GenuineCheckDeviceAction } from \"@api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction\";\nexport { InstallAppDeviceAction } from \"@api/secure-channel/device-action/InstallApp/InstallAppDeviceAction\";\nexport { ListInstalledAppsDeviceAction } from \"@api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction\";\nexport { UninstallAppDeviceAction } from \"@api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction\";\nexport { SecureChannelError } from \"@internal/secure-channel/model/Errors\";\n// TODO: remove from exported\nexport { defaultApduReceiverServiceStubBuilder } from \"@api/device-session/service/DefaultApduReceiverService.stub\";\nexport { defaultApduSenderServiceStubBuilder } from \"@api/device-session/service/DefaultApduSenderService.stub\";\nexport { FramerUtils } from \"@api/device-session/utils/FramerUtils\";\nexport { DeviceManagementKit } from \"@api/DeviceManagementKit\";\nexport { DeviceManagementKitBuilder } from \"@api/DeviceManagementKitBuilder\";\nexport * from \"@api/Error\";\nexport {\n noopLogger,\n noopLoggerFactory,\n} from \"@api/logger-publisher/utils/noopLoggerFactory\";\nexport { LogLevel } from \"@api/logger-subscriber/model/LogLevel\";\nexport { ConsoleLogger } from \"@api/logger-subscriber/service/ConsoleLogger\";\nexport { DefaultLogTagFormatter } from \"@api/logger-subscriber/service/DefaultLogTagFormatter\";\nexport { type LogTagFormatter } from \"@api/logger-subscriber/service/LogTagFormatter\";\nexport { WebLogsExporterLogger } from \"@api/logger-subscriber/service/WebLogsExporterLogger\";\nexport { ConnectedDevice } from \"@api/transport/model/ConnectedDevice\";\nexport {\n DeviceConnectionStateMachine,\n type DeviceConnectionStateMachineParams,\n} from \"@api/transport/model/DeviceConnectionStateMachine\";\nexport * from \"@api/transport/model/Errors\";\nexport { TransportConnectedDevice } from \"@api/transport/model/TransportConnectedDevice\";\nexport { connectedDeviceStubBuilder } from \"@api/transport/model/TransportConnectedDevice.stub\";\nexport * from \"@api/types\";\nexport { formatApduReceivedLog, formatApduSentLog } from \"@api/utils/apduLogs\";\nexport {
|
|
5
|
-
"mappings": "meAAA,IAAAA,EAAA,GAAAC,GAAAD,EAAA,
|
|
4
|
+
"sourcesContent": ["\"use strict\";\n\nexport { Apdu } from \"@api/apdu/model/Apdu\";\nexport { APDU_MAX_PAYLOAD, ApduBuilder } from \"@api/apdu/utils/ApduBuilder\";\nexport { ApduParser } from \"@api/apdu/utils/ApduParser\";\nexport * from \"@api/apdu/utils/AppBuilderError\";\nexport { ByteArrayBuilder } from \"@api/apdu/utils/ByteArrayBuilder\";\nexport { ByteArrayParser } from \"@api/apdu/utils/ByteArrayParser\";\nexport { type Command } from \"@api/command/Command\";\nexport {\n InvalidGetFirmwareMetadataResponseError,\n InvalidStatusWordError,\n} from \"@api/command/Errors\";\nexport {\n CommandResultFactory,\n CommandResultStatus,\n isSuccessCommandResult,\n} from \"@api/command/model/CommandResult\";\nexport { CloseAppCommand } from \"@api/command/os/CloseAppCommand\";\nexport {\n GetAppAndVersionCommand,\n type GetAppAndVersionResponse,\n} from \"@api/command/os/GetAppAndVersionCommand\";\nexport {\n GetBackgroundImageSizeCommand,\n GetBackgroundImageSizeCommandError,\n type GetBackgroundImageSizeCommandResult,\n type GetBackgroundImageSizeErrorCodes,\n type GetBackgroundImageSizeResponse,\n} from \"@api/command/os/GetBackgroundImageSizeCommand\";\nexport {\n BatteryStatusType,\n type GetBatteryStatusArgs,\n GetBatteryStatusCommand,\n type GetBatteryStatusResponse,\n} from \"@api/command/os/GetBatteryStatusCommand\";\nexport {\n GetOsVersionCommand,\n type GetOsVersionResponse,\n} from \"@api/command/os/GetOsVersionCommand\";\nexport {\n type ListAppsArgs,\n ListAppsCommand,\n type ListAppsErrorCodes,\n type ListAppsResponse,\n} from \"@api/command/os/ListAppsCommand\";\nexport {\n type LoadCertificateArgs,\n LoadCertificateCommand,\n type LoadCertificateErrorCodes,\n} from \"@api/command/os/LoadCertificateCommand\";\nexport {\n type OpenAppArgs,\n OpenAppCommand,\n} from \"@api/command/os/OpenAppCommand\";\nexport { isCommandErrorCode } from \"@api/command/utils/CommandErrors\";\nexport { CommandUtils } from \"@api/command/utils/CommandUtils\";\nexport {\n GLOBAL_ERRORS,\n GlobalCommandError,\n GlobalCommandErrorHandler,\n} from \"@api/command/utils/GlobalCommandError\";\nexport {\n DeviceModel,\n DeviceModelId,\n LEDGER_VENDOR_ID,\n} from \"@api/device/DeviceModel\";\nexport { DeviceStatus } from \"@api/device/DeviceStatus\";\nexport { type InternalApi } from \"@api/device-action/DeviceAction\";\nexport {\n type DeviceActionState,\n DeviceActionStatus,\n} from \"@api/device-action/model/DeviceActionState\";\nexport { UserInteractionRequired } from \"@api/device-action/model/UserInteractionRequired\";\nexport { CallTaskInAppDeviceAction } from \"@api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction\";\nexport { DEFAULT_UNLOCK_TIMEOUT_MS } from \"@api/device-action/os/Const\";\nexport {\n AppAlreadyInstalledDAError,\n DeviceLockedError,\n DeviceNotOnboardedError,\n OutOfMemoryDAError,\n RefusedByUserDAError,\n UnknownDAError,\n UnsupportedFirmwareDAError,\n} from \"@api/device-action/os/Errors\";\nexport { GetDeviceMetadataDeviceAction } from \"@api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction\";\nexport { GetDeviceStatusDeviceAction } from \"@api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction\";\nexport { GoToDashboardDeviceAction } from \"@api/device-action/os/GoToDashboard/GoToDashboardDeviceAction\";\nexport type {\n GoToDashboardDAError,\n GoToDashboardDAInput,\n GoToDashboardDAIntermediateValue,\n GoToDashboardDAOutput,\n GoToDashboardDARequiredInteraction,\n GoToDashboardDAState,\n} from \"@api/device-action/os/GoToDashboard/types\";\nexport { InstallOrUpdateAppsDeviceAction } from \"@api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction\";\nexport { ListAppsDeviceAction } from \"@api/device-action/os/ListApps/ListAppsDeviceAction\";\nexport { ListAppsWithMetadataDeviceAction } from \"@api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction\";\nexport { OpenAppDeviceAction } from \"@api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction\";\nexport { OpenAppWithDependenciesDeviceAction } from \"@api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction\";\nexport { SendCommandInAppDeviceAction } from \"@api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction\";\nexport {\n type DeviceActionStateMachine,\n XStateDeviceAction,\n} from \"@api/device-action/xstate-utils/XStateDeviceAction\";\nexport { StaticDeviceModelDataSource } from \"@api/device-model/data/StaticDeviceModelDataSource\";\nexport { BleDeviceInfos } from \"@api/device-model/model/BleDeviceInfos\";\nexport { TransportDeviceModel } from \"@api/device-model/model/DeviceModel\";\nexport { ApduResponse } from \"@api/device-session/ApduResponse\";\nexport * from \"@api/device-session/data/FramerConst\";\nexport {\n type DeviceSessionState,\n DeviceSessionStateType,\n} from \"@api/device-session/DeviceSessionState\";\nexport { GenuineCheckDeviceAction } from \"@api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction\";\nexport { InstallAppDeviceAction } from \"@api/secure-channel/device-action/InstallApp/InstallAppDeviceAction\";\nexport { ListInstalledAppsDeviceAction } from \"@api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction\";\nexport { UninstallAppDeviceAction } from \"@api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction\";\nexport { SecureChannelError } from \"@internal/secure-channel/model/Errors\";\n// TODO: remove from exported\nexport { defaultApduReceiverServiceStubBuilder } from \"@api/device-session/service/DefaultApduReceiverService.stub\";\nexport { defaultApduSenderServiceStubBuilder } from \"@api/device-session/service/DefaultApduSenderService.stub\";\nexport { FramerUtils } from \"@api/device-session/utils/FramerUtils\";\nexport { DeviceManagementKit } from \"@api/DeviceManagementKit\";\nexport { DeviceManagementKitBuilder } from \"@api/DeviceManagementKitBuilder\";\nexport * from \"@api/Error\";\nexport {\n noopLogger,\n noopLoggerFactory,\n} from \"@api/logger-publisher/utils/noopLoggerFactory\";\nexport { LogLevel } from \"@api/logger-subscriber/model/LogLevel\";\nexport { ConsoleLogger } from \"@api/logger-subscriber/service/ConsoleLogger\";\nexport { DefaultLogTagFormatter } from \"@api/logger-subscriber/service/DefaultLogTagFormatter\";\nexport { type LogTagFormatter } from \"@api/logger-subscriber/service/LogTagFormatter\";\nexport { WebLogsExporterLogger } from \"@api/logger-subscriber/service/WebLogsExporterLogger\";\nexport { ConnectedDevice } from \"@api/transport/model/ConnectedDevice\";\nexport {\n DeviceConnectionStateMachine,\n type DeviceConnectionStateMachineParams,\n} from \"@api/transport/model/DeviceConnectionStateMachine\";\nexport * from \"@api/transport/model/Errors\";\nexport { TransportConnectedDevice } from \"@api/transport/model/TransportConnectedDevice\";\nexport { connectedDeviceStubBuilder } from \"@api/transport/model/TransportConnectedDevice.stub\";\nexport * from \"@api/types\";\nexport { formatApduReceivedLog, formatApduSentLog } from \"@api/utils/apduLogs\";\nexport {\n base64StringToBuffer,\n bufferToBase64String,\n isBase64String,\n} from \"@api/utils/Base64String\";\nexport {\n bufferToHexaString,\n hexaStringToBuffer,\n isHexaString,\n} from \"@api/utils/HexaString\";\n"],
|
|
5
|
+
"mappings": "meAAA,IAAAA,EAAA,GAAAC,GAAAD,EAAA,uhIAAAE,GAAAF,GAEA,IAAAG,EAAqB,gCACrBC,EAA8C,uCAC9CC,EAA2B,sCAC3BC,EAAAN,EAAc,2CALd,gBAMA,IAAAO,EAAiC,4CACjCC,EAAgC,2CAEhCC,EAGO,+BACPC,EAIO,4CACPC,EAAgC,2CAChCC,EAGO,mDACPC,EAMO,yDACPC,EAKO,mDACPC,EAGO,+CACPC,EAKO,2CACPC,EAIO,kDACPC,EAGO,0CACPC,EAAmC,4CACnCC,EAA6B,2CAC7BC,EAIO,iDACPC,EAIO,mCACPC,EAA6B,oCAE7BC,EAGO,sDACPC,EAAwC,4DACxCC,EAA0C,qFAC1CC,EAA0C,uCAC1ClB,EAQO,wCACPmB,EAA8C,iFAC9CC,EAA4C,6EAC5CC,EAA0C,yEAS1CC,EAAgD,qFAChDC,EAAqC,+DACrCC,EAAiD,uFACjDC,EAAoC,yEACpCC,EAAoD,6FACpDC,EAA6C,2FAC7CC,EAGO,8DACPC,EAA4C,8DAC5CC,EAA+B,kDAC/BjB,EAAqC,+CACrCkB,EAA6B,4CAC7BlC,EAAAN,EAAc,gDA9Gd,gBA+GA,IAAAyC,EAGO,kDACPC,EAAyC,mFACzCC,GAAuC,+EACvCC,GAA8C,6FAC9CC,GAAyC,mFACzCpC,GAAmC,iDAEnCqC,GAAsD,uEACtDC,GAAoD,qEACpDC,GAA4B,iDAC5BC,GAAoC,oCACpCC,GAA2C,2CAC3C5C,EAAAN,EAAc,sBA9Hd,gBA+HA,IAAAmD,EAGO,yDACPC,GAAyB,iDACzBC,GAA8B,wDAC9BC,GAAuC,iEAEvCC,GAAsC,gEACtCC,GAAgC,gDAChCC,GAGO,6DACPnD,EAAAN,EAAc,uCA7Id,gBA8IA,IAAA0D,GAAyC,yDACzCA,GAA2C,8DAC3CpD,EAAAN,EAAc,sBAhJd,gBAiJA,IAAA2D,EAAyD,+BACzDC,EAIO,mCACPC,EAIO",
|
|
6
6
|
"names": ["api_exports", "__export", "__toCommonJS", "import_Apdu", "import_ApduBuilder", "import_ApduParser", "__reExport", "import_ByteArrayBuilder", "import_ByteArrayParser", "import_Errors", "import_CommandResult", "import_CloseAppCommand", "import_GetAppAndVersionCommand", "import_GetBackgroundImageSizeCommand", "import_GetBatteryStatusCommand", "import_GetOsVersionCommand", "import_ListAppsCommand", "import_LoadCertificateCommand", "import_OpenAppCommand", "import_CommandErrors", "import_CommandUtils", "import_GlobalCommandError", "import_DeviceModel", "import_DeviceStatus", "import_DeviceActionState", "import_UserInteractionRequired", "import_CallTaskInAppDeviceAction", "import_Const", "import_GetDeviceMetadataDeviceAction", "import_GetDeviceStatusDeviceAction", "import_GoToDashboardDeviceAction", "import_InstallOrUpdateAppsDeviceAction", "import_ListAppsDeviceAction", "import_ListAppsWithMetadataDeviceAction", "import_OpenAppDeviceAction", "import_OpenAppWithDependenciesDeviceAction", "import_SendCommandInAppDeviceAction", "import_XStateDeviceAction", "import_StaticDeviceModelDataSource", "import_BleDeviceInfos", "import_ApduResponse", "import_DeviceSessionState", "import_GenuineCheckDeviceAction", "import_InstallAppDeviceAction", "import_ListInstalledAppsDeviceAction", "import_UninstallAppDeviceAction", "import_DefaultApduReceiverService", "import_DefaultApduSenderService", "import_FramerUtils", "import_DeviceManagementKit", "import_DeviceManagementKitBuilder", "import_noopLoggerFactory", "import_LogLevel", "import_ConsoleLogger", "import_DefaultLogTagFormatter", "import_WebLogsExporterLogger", "import_ConnectedDevice", "import_DeviceConnectionStateMachine", "import_TransportConnectedDevice", "import_apduLogs", "import_Base64String", "import_HexaString"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var i=Object.defineProperty;var
|
|
1
|
+
"use strict";var i=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var b=(r,n)=>{for(var t in n)i(r,t,{get:n[t],enumerable:!0})},c=(r,n,t,e)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of s(n))!g.call(r,o)&&o!==t&&i(r,o,{get:()=>n[o],enumerable:!(e=u(n,o))||e.enumerable});return r};var l=r=>c(i({},"__esModule",{value:!0}),r);var y={};b(y,{base64StringToBuffer:()=>d,bufferToBase64String:()=>h,isBase64String:()=>a});module.exports=l(y);function a(r){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(r)}function d(r){if(r.length===0)return new Uint8Array;if(!a(r))return null;try{const n=atob(r),t=new Uint8Array(n.length);for(let e=0;e<n.length;e++)t[e]=n.charCodeAt(e);return t}catch{return Uint8Array.from(Buffer.from(r,"base64"))}}function h(r){const n=globalThis;if(typeof n.btoa=="function"){let e="";for(let o=0;o<r.length;o++){const f=r[o];if(f===void 0)throw new Error("Unexpected undefined byte in array.");e+=String.fromCharCode(f)}return n.btoa(e)}const t=n.Buffer;if(typeof t<"u")return t.from(r).toString("base64");throw new Error("No Base64 encoder available in this environment.")}0&&(module.exports={base64StringToBuffer,bufferToBase64String,isBase64String});
|
|
2
2
|
//# sourceMappingURL=Base64String.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/api/utils/Base64String.ts"],
|
|
4
|
-
"sourcesContent": ["export function isBase64String(value: string): boolean {\n // Valid base64 characters are [A-Za-z0-9+/]\n // They are always grouped by 4 characters.\n // Optional padding at the end with one or two '='.\n // see section 4 of: https://www.rfc-editor.org/rfc/rfc4648.txt\n return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(\n value,\n );\n}\n\nexport function base64StringToBuffer(value: string): Uint8Array | null {\n if (value.length === 0) {\n return new Uint8Array();\n }\n if (!isBase64String(value)) {\n return null;\n }\n try {\n // Use the browser implementation of atob\n const base64Decoded = atob(value);\n const buffer = new Uint8Array(base64Decoded.length);\n for (let i = 0; i < base64Decoded.length; i++) {\n buffer[i] = base64Decoded.charCodeAt(i);\n }\n return buffer;\n } catch (_error: unknown) {\n // Use the implementation of Buffer for environments such as node\n return Uint8Array.from(Buffer.from(value, \"base64\"));\n }\n}\n"],
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,0BAAAE,EAAA,mBAAAC,IAAA,eAAAC,
|
|
6
|
-
"names": ["Base64String_exports", "__export", "base64StringToBuffer", "isBase64String", "__toCommonJS", "value", "base64Decoded", "buffer", "i"]
|
|
4
|
+
"sourcesContent": ["export function isBase64String(value: string): boolean {\n // Valid base64 characters are [A-Za-z0-9+/]\n // They are always grouped by 4 characters.\n // Optional padding at the end with one or two '='.\n // see section 4 of: https://www.rfc-editor.org/rfc/rfc4648.txt\n return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(\n value,\n );\n}\n\nexport function base64StringToBuffer(value: string): Uint8Array | null {\n if (value.length === 0) {\n return new Uint8Array();\n }\n if (!isBase64String(value)) {\n return null;\n }\n try {\n // Use the browser implementation of atob\n const base64Decoded = atob(value);\n const buffer = new Uint8Array(base64Decoded.length);\n for (let i = 0; i < base64Decoded.length; i++) {\n buffer[i] = base64Decoded.charCodeAt(i);\n }\n return buffer;\n } catch (_error: unknown) {\n // Use the implementation of Buffer for environments such as node\n return Uint8Array.from(Buffer.from(value, \"base64\"));\n }\n}\n\nexport function bufferToBase64String(bytes: Uint8Array): string {\n const g = globalThis as typeof globalThis & {\n Buffer?: typeof Buffer;\n btoa?: (data: string) => string;\n };\n\n if (typeof g.btoa === \"function\") {\n // convert bytes to a binary string for btoa\n let binary = \"\";\n for (let i = 0; i < bytes.length; i++) {\n const byte = bytes[i];\n if (byte === undefined) {\n throw new Error(\"Unexpected undefined byte in array.\");\n }\n binary += String.fromCharCode(byte);\n }\n return g.btoa(binary);\n }\n\n const Buf = g.Buffer;\n if (typeof Buf !== \"undefined\") {\n return Buf.from(bytes).toString(\"base64\");\n }\n\n throw new Error(\"No Base64 encoder available in this environment.\");\n}\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,0BAAAE,EAAA,yBAAAC,EAAA,mBAAAC,IAAA,eAAAC,EAAAL,GAAO,SAASI,EAAeE,EAAwB,CAKrD,MAAO,mEAAmE,KACxEA,CACF,CACF,CAEO,SAASJ,EAAqBI,EAAkC,CACrE,GAAIA,EAAM,SAAW,EACnB,OAAO,IAAI,WAEb,GAAI,CAACF,EAAeE,CAAK,EACvB,OAAO,KAET,GAAI,CAEF,MAAMC,EAAgB,KAAKD,CAAK,EAC1BE,EAAS,IAAI,WAAWD,EAAc,MAAM,EAClD,QAASE,EAAI,EAAGA,EAAIF,EAAc,OAAQE,IACxCD,EAAOC,CAAC,EAAIF,EAAc,WAAWE,CAAC,EAExC,OAAOD,CACT,MAA0B,CAExB,OAAO,WAAW,KAAK,OAAO,KAAKF,EAAO,QAAQ,CAAC,CACrD,CACF,CAEO,SAASH,EAAqBO,EAA2B,CAC9D,MAAMC,EAAI,WAKV,GAAI,OAAOA,EAAE,MAAS,WAAY,CAEhC,IAAIC,EAAS,GACb,QAASH,EAAI,EAAGA,EAAIC,EAAM,OAAQD,IAAK,CACrC,MAAMI,EAAOH,EAAMD,CAAC,EACpB,GAAII,IAAS,OACX,MAAM,IAAI,MAAM,qCAAqC,EAEvDD,GAAU,OAAO,aAAaC,CAAI,CACpC,CACA,OAAOF,EAAE,KAAKC,CAAM,CACtB,CAEA,MAAME,EAAMH,EAAE,OACd,GAAI,OAAOG,EAAQ,IACjB,OAAOA,EAAI,KAAKJ,CAAK,EAAE,SAAS,QAAQ,EAG1C,MAAM,IAAI,MAAM,kDAAkD,CACpE",
|
|
6
|
+
"names": ["Base64String_exports", "__export", "base64StringToBuffer", "bufferToBase64String", "isBase64String", "__toCommonJS", "value", "base64Decoded", "buffer", "i", "bytes", "g", "binary", "byte", "Buf"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var t=require("./Base64String");describe("Base64String",()=>{describe("isBase64String function",()=>{it("should return true if the value is a valid base64 string",()=>{const e=(0,t.isBase64String)("Zmlyc3QgdG/zdGluZyBz+HI9");expect(e).toBeTruthy()}),it("should return true if the value is a valid base64 string, one padding",()=>{const e=(0,t.isBase64String)("Zmlyc3QgdGVzdGluZyBzdHI=");expect(e).toBeTruthy()}),it("should return true if the value is a valid base64 string, two paddings",()=>{const e=(0,t.isBase64String)("Zmlyc3QgdGVzdGluZyBzdH==");expect(e).toBeTruthy()}),it("should return true for an empty string",()=>{const e=(0,t.isBase64String)("");expect(e).toBeTruthy()}),it("should return false for an invalid base64 string",()=>{const e=(0,t.isBase64String)("invalid base64 string");expect(e).toBeFalsy()}),it("should return false with 3 paddings",()=>{const e=(0,t.isBase64String)("Zmlyc3QgdGVzdGluZyBzd===");expect(e).toBeFalsy()}),it("should return false on incomplete string (not multiple of 4)",()=>{const e=(0,t.isBase64String)("Zmlyc3QgdGVzdGluZyBzdHI");expect(e).toBeFalsy()})}),describe("base64StringToBuffer function",()=>{beforeEach(()=>{vi.resetAllMocks()}),it("should convert empty input to empty buffer",()=>{const e=(0,t.base64StringToBuffer)("");expect(e).toStrictEqual(new Uint8Array)}),it("invalid base64 string converted to null",()=>{const e=(0,t.base64StringToBuffer)("invalid string");expect(e).toStrictEqual(null)}),it("should convert a base64 string to a buffer using browser's atob",()=>{const e=(0,t.base64StringToBuffer)("Zmlyc3QgdGVzdCBzdHJpbmc=");expect(e).toStrictEqual(Uint8Array.from([102,105,114,115,116,32,116,101,115,116,32,115,116,114,105,110,103]))}),it("should convert a base64 string to a buffer using Buffer",()=>{vi.spyOn(global,"atob").mockImplementation(()=>{throw new Error("atob is not defined")});const e=(0,t.base64StringToBuffer)("Zmlyc3QgdGVzdCBzdHJpbmc=");expect(e).toStrictEqual(Uint8Array.from([102,105,114,115,116,32,116,101,115,116,32,115,116,114,105,110,103]))})})});describe("bufferToBase64String",()=>{const a=globalThis.btoa,e=globalThis.Buffer;beforeEach(()=>{vi.restoreAllMocks(),globalThis.btoa=a,globalThis.Buffer=e}),afterAll(()=>{globalThis.btoa=a,globalThis.Buffer=e}),it("should encode an empty buffer to an empty base64 string when btoa is available",()=>{globalThis.btoa=vi.fn(o=>(expect(o).toBe(""),""));const s=new Uint8Array,n=(0,t.bufferToBase64String)(s);expect(n).toBe(""),expect(globalThis.btoa).toHaveBeenCalledTimes(1)}),it("should encode a buffer to base64 using btoa when available",()=>{const s="first testing str",n=Uint8Array.from(s.split("").map(r=>r.charCodeAt(0)));globalThis.btoa=vi.fn(r=>(expect(r).toBe(s),"Zmlyc3QgdGVzdGluZyBzdHI="));const o=(0,t.bufferToBase64String)(n);expect(o).toBe("Zmlyc3QgdGVzdGluZyBzdHI="),expect(globalThis.btoa).toHaveBeenCalledTimes(1)}),it("should encode a buffer to base64 using Buffer when btoa is not available",()=>{globalThis.btoa=void 0;const s="testing str",n=Buffer.from(s,"binary").toString("base64"),o=Uint8Array.from(s.split("").map(i=>i.charCodeAt(0))),r=vi.spyOn(Buffer,"from"),l=(0,t.bufferToBase64String)(o);expect(l).toBe(n),expect(r).toHaveBeenCalledTimes(1)}),it("should throw an error when no Base64 encoder is available",()=>{globalThis.btoa=void 0,globalThis.Buffer=void 0;const s=Uint8Array.from([1,2,3]);expect(()=>(0,t.bufferToBase64String)(s)).toThrowError("No Base64 encoder available in this environment.")}),it("should throw if an undefined byte is encountered (defensive check)",()=>{const s={length:3,0:102,1:void 0,2:111};globalThis.btoa=vi.fn(),expect(()=>(0,t.bufferToBase64String)(s)).toThrowError("Unexpected undefined byte in array.")})});
|
|
2
2
|
//# sourceMappingURL=Base64String.test.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/api/utils/Base64String.test.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["import_Base64String", "result"]
|
|
4
|
+
"sourcesContent": ["/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport {\n base64StringToBuffer,\n bufferToBase64String,\n isBase64String,\n} from \"./Base64String\";\n\ndescribe(\"Base64String\", () => {\n describe(\"isBase64String function\", () => {\n it(\"should return true if the value is a valid base64 string\", () => {\n // GIVEN\n const value = \"Zmlyc3QgdG/zdGluZyBz+HI9\";\n\n // WHEN\n const result = isBase64String(value);\n\n // THEN\n expect(result).toBeTruthy();\n });\n\n it(\"should return true if the value is a valid base64 string, one padding\", () => {\n // GIVEN\n const value = \"Zmlyc3QgdGVzdGluZyBzdHI=\";\n\n // WHEN\n const result = isBase64String(value);\n\n // THEN\n expect(result).toBeTruthy();\n });\n\n it(\"should return true if the value is a valid base64 string, two paddings\", () => {\n // GIVEN\n const value = \"Zmlyc3QgdGVzdGluZyBzdH==\";\n\n // WHEN\n const result = isBase64String(value);\n\n // THEN\n expect(result).toBeTruthy();\n });\n\n it(\"should return true for an empty string\", () => {\n // GIVEN\n const value = \"\";\n\n // WHEN\n const result = isBase64String(value);\n\n // THEN\n expect(result).toBeTruthy();\n });\n\n it(\"should return false for an invalid base64 string\", () => {\n // GIVEN\n const value = \"invalid base64 string\";\n\n // WHEN\n const result = isBase64String(value);\n\n // THEN\n expect(result).toBeFalsy();\n });\n\n it(\"should return false with 3 paddings\", () => {\n // GIVEN\n const value = \"Zmlyc3QgdGVzdGluZyBzd===\";\n\n // WHEN\n const result = isBase64String(value);\n\n // THEN\n expect(result).toBeFalsy();\n });\n\n it(\"should return false on incomplete string (not multiple of 4)\", () => {\n // GIVEN\n const value = \"Zmlyc3QgdGVzdGluZyBzdHI\";\n\n // WHEN\n const result = isBase64String(value);\n\n // THEN\n expect(result).toBeFalsy();\n });\n });\n\n describe(\"base64StringToBuffer function\", () => {\n beforeEach(() => {\n vi.resetAllMocks();\n });\n\n it(\"should convert empty input to empty buffer\", () => {\n // GIVEN\n const value = \"\";\n\n // WHEN\n const result = base64StringToBuffer(value);\n\n // THEN\n expect(result).toStrictEqual(new Uint8Array());\n });\n\n it(\"invalid base64 string converted to null\", () => {\n // GIVEN\n const value = \"invalid string\";\n\n // WHEN\n const result = base64StringToBuffer(value);\n\n // THEN\n expect(result).toStrictEqual(null);\n });\n\n it(\"should convert a base64 string to a buffer using browser's atob\", () => {\n // GIVEN\n const value = \"Zmlyc3QgdGVzdCBzdHJpbmc=\";\n\n // WHEN\n const result = base64StringToBuffer(value);\n\n // THEN\n expect(result).toStrictEqual(\n Uint8Array.from([\n 0x66, 0x69, 0x72, 0x73, 0x74, 0x20, 0x74, 0x65, 0x73, 0x74, 0x20,\n 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67,\n ]),\n );\n });\n\n it(\"should convert a base64 string to a buffer using Buffer\", () => {\n // GIVEN\n vi.spyOn(global, \"atob\").mockImplementation(() => {\n throw new Error(\"atob is not defined\");\n });\n const value = \"Zmlyc3QgdGVzdCBzdHJpbmc=\";\n\n // WHEN\n const result = base64StringToBuffer(value);\n\n // THEN\n expect(result).toStrictEqual(\n Uint8Array.from([\n 0x66, 0x69, 0x72, 0x73, 0x74, 0x20, 0x74, 0x65, 0x73, 0x74, 0x20,\n 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67,\n ]),\n );\n });\n });\n});\n\ndescribe(\"bufferToBase64String\", () => {\n const originalBtoa = (globalThis as any).btoa;\n const originalBuffer = (globalThis as any).Buffer;\n\n beforeEach(() => {\n vi.restoreAllMocks();\n (globalThis as any).btoa = originalBtoa;\n (globalThis as any).Buffer = originalBuffer;\n });\n\n afterAll(() => {\n (globalThis as any).btoa = originalBtoa;\n (globalThis as any).Buffer = originalBuffer;\n });\n\n it(\"should encode an empty buffer to an empty base64 string when btoa is available\", () => {\n // GIVEN\n (globalThis as any).btoa = vi.fn((input: string) => {\n expect(input).toBe(\"\");\n return \"\";\n });\n\n const bytes = new Uint8Array();\n\n // WHEN\n const result = bufferToBase64String(bytes);\n\n // THEN\n expect(result).toBe(\"\");\n expect(globalThis.btoa).toHaveBeenCalledTimes(1);\n });\n\n it(\"should encode a buffer to base64 using btoa when available\", () => {\n // GIVEN\n const text = \"first testing str\";\n const bytes = Uint8Array.from(text.split(\"\").map((c) => c.charCodeAt(0)));\n\n (globalThis as any).btoa = vi.fn((input: string) => {\n expect(input).toBe(text);\n return \"Zmlyc3QgdGVzdGluZyBzdHI=\";\n });\n\n // WHEN\n const result = bufferToBase64String(bytes);\n\n // THEN\n expect(result).toBe(\"Zmlyc3QgdGVzdGluZyBzdHI=\");\n expect(globalThis.btoa).toHaveBeenCalledTimes(1);\n });\n\n it(\"should encode a buffer to base64 using Buffer when btoa is not available\", () => {\n // GIVEN\n (globalThis as any).btoa = undefined;\n\n const text = \"testing str\";\n const expectedBase64 = Buffer.from(text, \"binary\").toString(\"base64\");\n const bytes = Uint8Array.from(text.split(\"\").map((c) => c.charCodeAt(0)));\n\n const bufferFromSpy = vi.spyOn(Buffer, \"from\");\n\n // WHEN\n const result = bufferToBase64String(bytes);\n\n // THEN\n expect(result).toBe(expectedBase64);\n expect(bufferFromSpy).toHaveBeenCalledTimes(1);\n });\n\n it(\"should throw an error when no Base64 encoder is available\", () => {\n // GIVEN\n (globalThis as any).btoa = undefined;\n (globalThis as any).Buffer = undefined;\n\n const bytes = Uint8Array.from([0x01, 0x02, 0x03]);\n\n // WHEN / THEN\n expect(() => bufferToBase64String(bytes)).toThrowError(\n \"No Base64 encoder available in this environment.\",\n );\n });\n\n it(\"should throw if an undefined byte is encountered (defensive check)\", () => {\n // GIVEN\n const bytes = {\n length: 3,\n 0: 0x66,\n 1: undefined,\n 2: 0x6f,\n } as unknown as Uint8Array;\n\n (globalThis as any).btoa = vi.fn();\n\n // WHEN / THEN\n expect(() => bufferToBase64String(bytes)).toThrowError(\n \"Unexpected undefined byte in array.\",\n );\n });\n});\n"],
|
|
5
|
+
"mappings": "aAIA,IAAAA,EAIO,0BAEP,SAAS,eAAgB,IAAM,CAC7B,SAAS,0BAA2B,IAAM,CACxC,GAAG,2DAA4D,IAAM,CAKnE,MAAMC,KAAS,kBAHD,0BAGqB,EAGnC,OAAOA,CAAM,EAAE,WAAW,CAC5B,CAAC,EAED,GAAG,wEAAyE,IAAM,CAKhF,MAAMA,KAAS,kBAHD,0BAGqB,EAGnC,OAAOA,CAAM,EAAE,WAAW,CAC5B,CAAC,EAED,GAAG,yEAA0E,IAAM,CAKjF,MAAMA,KAAS,kBAHD,0BAGqB,EAGnC,OAAOA,CAAM,EAAE,WAAW,CAC5B,CAAC,EAED,GAAG,yCAA0C,IAAM,CAK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AAE,KAAKO,CAAc,EAClC,OAAOC,CAAa,EAAE,sBAAsB,CAAC,CAC/C,CAAC,EAED,GAAG,4DAA6D,IAAM,CAEnE,WAAmB,KAAO,OAC1B,WAAmB,OAAS,OAE7B,MAAMJ,EAAQ,WAAW,KAAK,CAAC,EAAM,EAAM,CAAI,CAAC,EAGhD,OAAO,OAAM,wBAAqBA,CAAK,CAAC,EAAE,aACxC,kDACF,CACF,CAAC,EAED,GAAG,qEAAsE,IAAM,CAE7E,MAAMA,EAAQ,CACZ,OAAQ,EACR,EAAG,IACH,EAAG,OACH,EAAG,GACL,EAEC,WAAmB,KAAO,GAAG,GAAG,EAGjC,OAAO,OAAM,wBAAqBA,CAAK,CAAC,EAAE,aACxC,qCACF,CACF,CAAC,CACH,CAAC",
|
|
6
|
+
"names": ["import_Base64String", "result", "originalBtoa", "originalBuffer", "input", "bytes", "text", "c", "expectedBase64", "bufferFromSpy"]
|
|
7
7
|
}
|
package/lib/esm/package.json
CHANGED
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"watch:builds": "pnpm ldmk-tool watch --entryPoints index.ts,src/**/*.ts --tsconfig tsconfig.prod.json",
|
|
65
65
|
"watch:types": "concurrently \"tsc --watch -p tsconfig.prod.json\" \"tsc-alias --watch -p tsconfig.prod.json\""
|
|
66
66
|
},
|
|
67
|
-
"version": "0.0.0-develop-
|
|
67
|
+
"version": "0.0.0-develop-20260306001908"
|
|
68
68
|
}
|
package/lib/esm/src/api/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Apdu as r}from"./apdu/model/Apdu";import{APDU_MAX_PAYLOAD as p,ApduBuilder as a}from"./apdu/utils/ApduBuilder";import{ApduParser as m}from"./apdu/utils/ApduParser";export*from"./apdu/utils/AppBuilderError";import{ByteArrayBuilder as c}from"./apdu/utils/ByteArrayBuilder";import{ByteArrayParser as
|
|
1
|
+
import{Apdu as r}from"./apdu/model/Apdu";import{APDU_MAX_PAYLOAD as p,ApduBuilder as a}from"./apdu/utils/ApduBuilder";import{ApduParser as m}from"./apdu/utils/ApduParser";export*from"./apdu/utils/AppBuilderError";import{ByteArrayBuilder as c}from"./apdu/utils/ByteArrayBuilder";import{ByteArrayParser as d}from"./apdu/utils/ByteArrayParser";import{InvalidGetFirmwareMetadataResponseError as A,InvalidStatusWordError as D}from"./command/Errors";import{CommandResultFactory as l,CommandResultStatus as v,isSuccessCommandResult as S}from"./command/model/CommandResult";import{CloseAppCommand as y}from"./command/os/CloseAppCommand";import{GetAppAndVersionCommand as G}from"./command/os/GetAppAndVersionCommand";import{GetBackgroundImageSizeCommand as E,GetBackgroundImageSizeCommandError as B}from"./command/os/GetBackgroundImageSizeCommand";import{BatteryStatusType as T,GetBatteryStatusCommand as R}from"./command/os/GetBatteryStatusCommand";import{GetOsVersionCommand as O}from"./command/os/GetOsVersionCommand";import{ListAppsCommand as M}from"./command/os/ListAppsCommand";import{LoadCertificateCommand as k}from"./command/os/LoadCertificateCommand";import{OpenAppCommand as _}from"./command/os/OpenAppCommand";import{isCommandErrorCode as z}from"./command/utils/CommandErrors";import{CommandUtils as W}from"./command/utils/CommandUtils";import{GLOBAL_ERRORS as H,GlobalCommandError as K,GlobalCommandErrorHandler as N}from"./command/utils/GlobalCommandError";import{DeviceModel as X,DeviceModelId as Y,LEDGER_VENDOR_ID as j}from"./device/DeviceModel";import{DeviceStatus as Q}from"./device/DeviceStatus";import{DeviceActionStatus as $}from"./device-action/model/DeviceActionState";import{UserInteractionRequired as oe}from"./device-action/model/UserInteractionRequired";import{CallTaskInAppDeviceAction as te}from"./device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction";import{DEFAULT_UNLOCK_TIMEOUT_MS as ae}from"./device-action/os/Const";import{AppAlreadyInstalledDAError as me,DeviceLockedError as ne,DeviceNotOnboardedError as se,OutOfMemoryDAError as ce,RefusedByUserDAError as fe,UnknownDAError as de,UnsupportedFirmwareDAError as xe}from"./device-action/os/Errors";import{GetDeviceMetadataDeviceAction as De}from"./device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction";import{GetDeviceStatusDeviceAction as le}from"./device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction";import{GoToDashboardDeviceAction as Se}from"./device-action/os/GoToDashboard/GoToDashboardDeviceAction";import{InstallOrUpdateAppsDeviceAction as ye}from"./device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction";import{ListAppsDeviceAction as Ge}from"./device-action/os/ListApps/ListAppsDeviceAction";import{ListAppsWithMetadataDeviceAction as Ee}from"./device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction";import{OpenAppDeviceAction as Ie}from"./device-action/os/OpenAppDeviceAction/OpenAppDeviceAction";import{OpenAppWithDependenciesDeviceAction as Re}from"./device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction";import{SendCommandInAppDeviceAction as Oe}from"./device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction";import{XStateDeviceAction as Me}from"./device-action/xstate-utils/XStateDeviceAction";import{StaticDeviceModelDataSource as ke}from"./device-model/data/StaticDeviceModelDataSource";import{BleDeviceInfos as _e}from"./device-model/model/BleDeviceInfos";import{TransportDeviceModel as ze}from"./device-model/model/DeviceModel";import{ApduResponse as We}from"./device-session/ApduResponse";export*from"./device-session/data/FramerConst";import{DeviceSessionStateType as Ke}from"./device-session/DeviceSessionState";import{GenuineCheckDeviceAction as qe}from"./secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction";import{InstallAppDeviceAction as Ye}from"./secure-channel/device-action/InstallApp/InstallAppDeviceAction";import{ListInstalledAppsDeviceAction as Je}from"./secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction";import{UninstallAppDeviceAction as Ze}from"./secure-channel/device-action/UninstallApp/UninstallAppDeviceAction";import{SecureChannelError as eo}from"../internal/secure-channel/model/Errors";import{defaultApduReceiverServiceStubBuilder as ro}from"./device-session/service/DefaultApduReceiverService.stub";import{defaultApduSenderServiceStubBuilder as po}from"./device-session/service/DefaultApduSenderService.stub";import{FramerUtils as io}from"./device-session/utils/FramerUtils";import{DeviceManagementKit as no}from"./DeviceManagementKit";import{DeviceManagementKitBuilder as co}from"./DeviceManagementKitBuilder";export*from"./Error";import{noopLogger as Ao,noopLoggerFactory as Do}from"./logger-publisher/utils/noopLoggerFactory";import{LogLevel as lo}from"./logger-subscriber/model/LogLevel";import{ConsoleLogger as So}from"./logger-subscriber/service/ConsoleLogger";import{DefaultLogTagFormatter as yo}from"./logger-subscriber/service/DefaultLogTagFormatter";import{WebLogsExporterLogger as Go}from"./logger-subscriber/service/WebLogsExporterLogger";import{ConnectedDevice as Eo}from"./transport/model/ConnectedDevice";import{DeviceConnectionStateMachine as Io}from"./transport/model/DeviceConnectionStateMachine";export*from"./transport/model/Errors";import{TransportConnectedDevice as bo}from"./transport/model/TransportConnectedDevice";import{connectedDeviceStubBuilder as ho}from"./transport/model/TransportConnectedDevice.stub";export*from"./types";import{formatApduReceivedLog as ko,formatApduSentLog as Fo}from"./utils/apduLogs";import{base64StringToBuffer as Vo,bufferToBase64String as zo,isBase64String as Po}from"./utils/Base64String";import{bufferToHexaString as wo,hexaStringToBuffer as Ho,isHexaString as Ko}from"./utils/HexaString";export{p as APDU_MAX_PAYLOAD,r as Apdu,a as ApduBuilder,m as ApduParser,We as ApduResponse,me as AppAlreadyInstalledDAError,T as BatteryStatusType,_e as BleDeviceInfos,c as ByteArrayBuilder,d as ByteArrayParser,te as CallTaskInAppDeviceAction,y as CloseAppCommand,l as CommandResultFactory,v as CommandResultStatus,W as CommandUtils,Eo as ConnectedDevice,So as ConsoleLogger,ae as DEFAULT_UNLOCK_TIMEOUT_MS,yo as DefaultLogTagFormatter,$ as DeviceActionStatus,Io as DeviceConnectionStateMachine,ne as DeviceLockedError,no as DeviceManagementKit,co as DeviceManagementKitBuilder,X as DeviceModel,Y as DeviceModelId,se as DeviceNotOnboardedError,Ke as DeviceSessionStateType,Q as DeviceStatus,io as FramerUtils,H as GLOBAL_ERRORS,qe as GenuineCheckDeviceAction,G as GetAppAndVersionCommand,E as GetBackgroundImageSizeCommand,B as GetBackgroundImageSizeCommandError,R as GetBatteryStatusCommand,De as GetDeviceMetadataDeviceAction,le as GetDeviceStatusDeviceAction,O as GetOsVersionCommand,K as GlobalCommandError,N as GlobalCommandErrorHandler,Se as GoToDashboardDeviceAction,Ye as InstallAppDeviceAction,ye as InstallOrUpdateAppsDeviceAction,A as InvalidGetFirmwareMetadataResponseError,D as InvalidStatusWordError,j as LEDGER_VENDOR_ID,M as ListAppsCommand,Ge as ListAppsDeviceAction,Ee as ListAppsWithMetadataDeviceAction,Je as ListInstalledAppsDeviceAction,k as LoadCertificateCommand,lo as LogLevel,_ as OpenAppCommand,Ie as OpenAppDeviceAction,Re as OpenAppWithDependenciesDeviceAction,ce as OutOfMemoryDAError,fe as RefusedByUserDAError,eo as SecureChannelError,Oe as SendCommandInAppDeviceAction,ke as StaticDeviceModelDataSource,bo as TransportConnectedDevice,ze as TransportDeviceModel,Ze as UninstallAppDeviceAction,de as UnknownDAError,xe as UnsupportedFirmwareDAError,oe as UserInteractionRequired,Go as WebLogsExporterLogger,Me as XStateDeviceAction,Vo as base64StringToBuffer,zo as bufferToBase64String,wo as bufferToHexaString,ho as connectedDeviceStubBuilder,ro as defaultApduReceiverServiceStubBuilder,po as defaultApduSenderServiceStubBuilder,ko as formatApduReceivedLog,Fo as formatApduSentLog,Ho as hexaStringToBuffer,Po as isBase64String,z as isCommandErrorCode,Ko as isHexaString,S as isSuccessCommandResult,Ao as noopLogger,Do as noopLoggerFactory};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/api/index.ts"],
|
|
4
|
-
"sourcesContent": ["\"use strict\";\n\nexport { Apdu } from \"@api/apdu/model/Apdu\";\nexport { APDU_MAX_PAYLOAD, ApduBuilder } from \"@api/apdu/utils/ApduBuilder\";\nexport { ApduParser } from \"@api/apdu/utils/ApduParser\";\nexport * from \"@api/apdu/utils/AppBuilderError\";\nexport { ByteArrayBuilder } from \"@api/apdu/utils/ByteArrayBuilder\";\nexport { ByteArrayParser } from \"@api/apdu/utils/ByteArrayParser\";\nexport { type Command } from \"@api/command/Command\";\nexport {\n InvalidGetFirmwareMetadataResponseError,\n InvalidStatusWordError,\n} from \"@api/command/Errors\";\nexport {\n CommandResultFactory,\n CommandResultStatus,\n isSuccessCommandResult,\n} from \"@api/command/model/CommandResult\";\nexport { CloseAppCommand } from \"@api/command/os/CloseAppCommand\";\nexport {\n GetAppAndVersionCommand,\n type GetAppAndVersionResponse,\n} from \"@api/command/os/GetAppAndVersionCommand\";\nexport {\n GetBackgroundImageSizeCommand,\n GetBackgroundImageSizeCommandError,\n type GetBackgroundImageSizeCommandResult,\n type GetBackgroundImageSizeErrorCodes,\n type GetBackgroundImageSizeResponse,\n} from \"@api/command/os/GetBackgroundImageSizeCommand\";\nexport {\n BatteryStatusType,\n type GetBatteryStatusArgs,\n GetBatteryStatusCommand,\n type GetBatteryStatusResponse,\n} from \"@api/command/os/GetBatteryStatusCommand\";\nexport {\n GetOsVersionCommand,\n type GetOsVersionResponse,\n} from \"@api/command/os/GetOsVersionCommand\";\nexport {\n type ListAppsArgs,\n ListAppsCommand,\n type ListAppsErrorCodes,\n type ListAppsResponse,\n} from \"@api/command/os/ListAppsCommand\";\nexport {\n type LoadCertificateArgs,\n LoadCertificateCommand,\n type LoadCertificateErrorCodes,\n} from \"@api/command/os/LoadCertificateCommand\";\nexport {\n type OpenAppArgs,\n OpenAppCommand,\n} from \"@api/command/os/OpenAppCommand\";\nexport { isCommandErrorCode } from \"@api/command/utils/CommandErrors\";\nexport { CommandUtils } from \"@api/command/utils/CommandUtils\";\nexport {\n GLOBAL_ERRORS,\n GlobalCommandError,\n GlobalCommandErrorHandler,\n} from \"@api/command/utils/GlobalCommandError\";\nexport {\n DeviceModel,\n DeviceModelId,\n LEDGER_VENDOR_ID,\n} from \"@api/device/DeviceModel\";\nexport { DeviceStatus } from \"@api/device/DeviceStatus\";\nexport { type InternalApi } from \"@api/device-action/DeviceAction\";\nexport {\n type DeviceActionState,\n DeviceActionStatus,\n} from \"@api/device-action/model/DeviceActionState\";\nexport { UserInteractionRequired } from \"@api/device-action/model/UserInteractionRequired\";\nexport { CallTaskInAppDeviceAction } from \"@api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction\";\nexport { DEFAULT_UNLOCK_TIMEOUT_MS } from \"@api/device-action/os/Const\";\nexport {\n AppAlreadyInstalledDAError,\n DeviceLockedError,\n DeviceNotOnboardedError,\n OutOfMemoryDAError,\n RefusedByUserDAError,\n UnknownDAError,\n UnsupportedFirmwareDAError,\n} from \"@api/device-action/os/Errors\";\nexport { GetDeviceMetadataDeviceAction } from \"@api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction\";\nexport { GetDeviceStatusDeviceAction } from \"@api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction\";\nexport { GoToDashboardDeviceAction } from \"@api/device-action/os/GoToDashboard/GoToDashboardDeviceAction\";\nexport type {\n GoToDashboardDAError,\n GoToDashboardDAInput,\n GoToDashboardDAIntermediateValue,\n GoToDashboardDAOutput,\n GoToDashboardDARequiredInteraction,\n GoToDashboardDAState,\n} from \"@api/device-action/os/GoToDashboard/types\";\nexport { InstallOrUpdateAppsDeviceAction } from \"@api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction\";\nexport { ListAppsDeviceAction } from \"@api/device-action/os/ListApps/ListAppsDeviceAction\";\nexport { ListAppsWithMetadataDeviceAction } from \"@api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction\";\nexport { OpenAppDeviceAction } from \"@api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction\";\nexport { OpenAppWithDependenciesDeviceAction } from \"@api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction\";\nexport { SendCommandInAppDeviceAction } from \"@api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction\";\nexport {\n type DeviceActionStateMachine,\n XStateDeviceAction,\n} from \"@api/device-action/xstate-utils/XStateDeviceAction\";\nexport { StaticDeviceModelDataSource } from \"@api/device-model/data/StaticDeviceModelDataSource\";\nexport { BleDeviceInfos } from \"@api/device-model/model/BleDeviceInfos\";\nexport { TransportDeviceModel } from \"@api/device-model/model/DeviceModel\";\nexport { ApduResponse } from \"@api/device-session/ApduResponse\";\nexport * from \"@api/device-session/data/FramerConst\";\nexport {\n type DeviceSessionState,\n DeviceSessionStateType,\n} from \"@api/device-session/DeviceSessionState\";\nexport { GenuineCheckDeviceAction } from \"@api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction\";\nexport { InstallAppDeviceAction } from \"@api/secure-channel/device-action/InstallApp/InstallAppDeviceAction\";\nexport { ListInstalledAppsDeviceAction } from \"@api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction\";\nexport { UninstallAppDeviceAction } from \"@api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction\";\nexport { SecureChannelError } from \"@internal/secure-channel/model/Errors\";\n// TODO: remove from exported\nexport { defaultApduReceiverServiceStubBuilder } from \"@api/device-session/service/DefaultApduReceiverService.stub\";\nexport { defaultApduSenderServiceStubBuilder } from \"@api/device-session/service/DefaultApduSenderService.stub\";\nexport { FramerUtils } from \"@api/device-session/utils/FramerUtils\";\nexport { DeviceManagementKit } from \"@api/DeviceManagementKit\";\nexport { DeviceManagementKitBuilder } from \"@api/DeviceManagementKitBuilder\";\nexport * from \"@api/Error\";\nexport {\n noopLogger,\n noopLoggerFactory,\n} from \"@api/logger-publisher/utils/noopLoggerFactory\";\nexport { LogLevel } from \"@api/logger-subscriber/model/LogLevel\";\nexport { ConsoleLogger } from \"@api/logger-subscriber/service/ConsoleLogger\";\nexport { DefaultLogTagFormatter } from \"@api/logger-subscriber/service/DefaultLogTagFormatter\";\nexport { type LogTagFormatter } from \"@api/logger-subscriber/service/LogTagFormatter\";\nexport { WebLogsExporterLogger } from \"@api/logger-subscriber/service/WebLogsExporterLogger\";\nexport { ConnectedDevice } from \"@api/transport/model/ConnectedDevice\";\nexport {\n DeviceConnectionStateMachine,\n type DeviceConnectionStateMachineParams,\n} from \"@api/transport/model/DeviceConnectionStateMachine\";\nexport * from \"@api/transport/model/Errors\";\nexport { TransportConnectedDevice } from \"@api/transport/model/TransportConnectedDevice\";\nexport { connectedDeviceStubBuilder } from \"@api/transport/model/TransportConnectedDevice.stub\";\nexport * from \"@api/types\";\nexport { formatApduReceivedLog, formatApduSentLog } from \"@api/utils/apduLogs\";\nexport {
|
|
5
|
-
"mappings": "AAEA,OAAS,QAAAA,MAAY,uBACrB,OAAS,oBAAAC,EAAkB,eAAAC,MAAmB,8BAC9C,OAAS,cAAAC,MAAkB,6BAC3B,WAAc,kCACd,OAAS,oBAAAC,MAAwB,mCACjC,OAAS,mBAAAC,MAAuB,kCAEhC,OACE,2CAAAC,EACA,0BAAAC,MACK,sBACP,OACE,wBAAAC,EACA,uBAAAC,EACA,0BAAAC,MACK,mCACP,OAAS,mBAAAC,MAAuB,kCAChC,OACE,2BAAAC,MAEK,0CACP,OACE,iCAAAC,EACA,sCAAAC,MAIK,gDACP,OACE,qBAAAC,EAEA,2BAAAC,MAEK,0CACP,OACE,uBAAAC,MAEK,sCACP,OAEE,mBAAAC,MAGK,kCACP,OAEE,0BAAAC,MAEK,yCACP,OAEE,kBAAAC,MACK,iCACP,OAAS,sBAAAC,MAA0B,mCACnC,OAAS,gBAAAC,MAAoB,kCAC7B,OACE,iBAAAC,EACA,sBAAAC,EACA,6BAAAC,MACK,wCACP,OACE,eAAAC,EACA,iBAAAC,EACA,oBAAAC,MACK,0BACP,OAAS,gBAAAC,MAAoB,2BAE7B,OAEE,sBAAAC,MACK,6CACP,OAAS,2BAAAC,OAA+B,mDACxC,OAAS,6BAAAC,OAAiC,4EAC1C,OAAS,6BAAAC,OAAiC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PAYLOAD", "ApduBuilder", "ApduParser", "ByteArrayBuilder", "ByteArrayParser", "InvalidGetFirmwareMetadataResponseError", "InvalidStatusWordError", "CommandResultFactory", "CommandResultStatus", "isSuccessCommandResult", "CloseAppCommand", "GetAppAndVersionCommand", "GetBackgroundImageSizeCommand", "GetBackgroundImageSizeCommandError", "BatteryStatusType", "GetBatteryStatusCommand", "GetOsVersionCommand", "ListAppsCommand", "LoadCertificateCommand", "OpenAppCommand", "isCommandErrorCode", "CommandUtils", "GLOBAL_ERRORS", "GlobalCommandError", "GlobalCommandErrorHandler", "DeviceModel", "DeviceModelId", "LEDGER_VENDOR_ID", "DeviceStatus", "DeviceActionStatus", "UserInteractionRequired", "CallTaskInAppDeviceAction", "DEFAULT_UNLOCK_TIMEOUT_MS", "AppAlreadyInstalledDAError", "DeviceLockedError", "DeviceNotOnboardedError", "OutOfMemoryDAError", "RefusedByUserDAError", "UnknownDAError", "UnsupportedFirmwareDAError", "GetDeviceMetadataDeviceAction", "GetDeviceStatusDeviceAction", "GoToDashboardDeviceAction", "InstallOrUpdateAppsDeviceAction", "ListAppsDeviceAction", "ListAppsWithMetadataDeviceAction", "OpenAppDeviceAction", "OpenAppWithDependenciesDeviceAction", "SendCommandInAppDeviceAction", "XStateDeviceAction", "StaticDeviceModelDataSource", "BleDeviceInfos", "TransportDeviceModel", "ApduResponse", "DeviceSessionStateType", "GenuineCheckDeviceAction", "InstallAppDeviceAction", "ListInstalledAppsDeviceAction", "UninstallAppDeviceAction", "SecureChannelError", "defaultApduReceiverServiceStubBuilder", "defaultApduSenderServiceStubBuilder", "FramerUtils", "DeviceManagementKit", "DeviceManagementKitBuilder", "noopLogger", "noopLoggerFactory", "LogLevel", "ConsoleLogger", "DefaultLogTagFormatter", "WebLogsExporterLogger", "ConnectedDevice", "DeviceConnectionStateMachine", "TransportConnectedDevice", "connectedDeviceStubBuilder", "formatApduReceivedLog", "formatApduSentLog", "base64StringToBuffer", "isBase64String", "bufferToHexaString", "hexaStringToBuffer", "isHexaString"]
|
|
4
|
+
"sourcesContent": ["\"use strict\";\n\nexport { Apdu } from \"@api/apdu/model/Apdu\";\nexport { APDU_MAX_PAYLOAD, ApduBuilder } from \"@api/apdu/utils/ApduBuilder\";\nexport { ApduParser } from \"@api/apdu/utils/ApduParser\";\nexport * from \"@api/apdu/utils/AppBuilderError\";\nexport { ByteArrayBuilder } from \"@api/apdu/utils/ByteArrayBuilder\";\nexport { ByteArrayParser } from \"@api/apdu/utils/ByteArrayParser\";\nexport { type Command } from \"@api/command/Command\";\nexport {\n InvalidGetFirmwareMetadataResponseError,\n InvalidStatusWordError,\n} from \"@api/command/Errors\";\nexport {\n CommandResultFactory,\n CommandResultStatus,\n isSuccessCommandResult,\n} from \"@api/command/model/CommandResult\";\nexport { CloseAppCommand } from \"@api/command/os/CloseAppCommand\";\nexport {\n GetAppAndVersionCommand,\n type GetAppAndVersionResponse,\n} from \"@api/command/os/GetAppAndVersionCommand\";\nexport {\n GetBackgroundImageSizeCommand,\n GetBackgroundImageSizeCommandError,\n type GetBackgroundImageSizeCommandResult,\n type GetBackgroundImageSizeErrorCodes,\n type GetBackgroundImageSizeResponse,\n} from \"@api/command/os/GetBackgroundImageSizeCommand\";\nexport {\n BatteryStatusType,\n type GetBatteryStatusArgs,\n GetBatteryStatusCommand,\n type GetBatteryStatusResponse,\n} from \"@api/command/os/GetBatteryStatusCommand\";\nexport {\n GetOsVersionCommand,\n type GetOsVersionResponse,\n} from \"@api/command/os/GetOsVersionCommand\";\nexport {\n type ListAppsArgs,\n ListAppsCommand,\n type ListAppsErrorCodes,\n type ListAppsResponse,\n} from \"@api/command/os/ListAppsCommand\";\nexport {\n type LoadCertificateArgs,\n LoadCertificateCommand,\n type LoadCertificateErrorCodes,\n} from \"@api/command/os/LoadCertificateCommand\";\nexport {\n type OpenAppArgs,\n OpenAppCommand,\n} from \"@api/command/os/OpenAppCommand\";\nexport { isCommandErrorCode } from \"@api/command/utils/CommandErrors\";\nexport { CommandUtils } from \"@api/command/utils/CommandUtils\";\nexport {\n GLOBAL_ERRORS,\n GlobalCommandError,\n GlobalCommandErrorHandler,\n} from \"@api/command/utils/GlobalCommandError\";\nexport {\n DeviceModel,\n DeviceModelId,\n LEDGER_VENDOR_ID,\n} from \"@api/device/DeviceModel\";\nexport { DeviceStatus } from \"@api/device/DeviceStatus\";\nexport { type InternalApi } from \"@api/device-action/DeviceAction\";\nexport {\n type DeviceActionState,\n DeviceActionStatus,\n} from \"@api/device-action/model/DeviceActionState\";\nexport { UserInteractionRequired } from \"@api/device-action/model/UserInteractionRequired\";\nexport { CallTaskInAppDeviceAction } from \"@api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction\";\nexport { DEFAULT_UNLOCK_TIMEOUT_MS } from \"@api/device-action/os/Const\";\nexport {\n AppAlreadyInstalledDAError,\n DeviceLockedError,\n DeviceNotOnboardedError,\n OutOfMemoryDAError,\n RefusedByUserDAError,\n UnknownDAError,\n UnsupportedFirmwareDAError,\n} from \"@api/device-action/os/Errors\";\nexport { GetDeviceMetadataDeviceAction } from \"@api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction\";\nexport { GetDeviceStatusDeviceAction } from \"@api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction\";\nexport { GoToDashboardDeviceAction } from \"@api/device-action/os/GoToDashboard/GoToDashboardDeviceAction\";\nexport type {\n GoToDashboardDAError,\n GoToDashboardDAInput,\n GoToDashboardDAIntermediateValue,\n GoToDashboardDAOutput,\n GoToDashboardDARequiredInteraction,\n GoToDashboardDAState,\n} from \"@api/device-action/os/GoToDashboard/types\";\nexport { InstallOrUpdateAppsDeviceAction } from \"@api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction\";\nexport { ListAppsDeviceAction } from \"@api/device-action/os/ListApps/ListAppsDeviceAction\";\nexport { ListAppsWithMetadataDeviceAction } from \"@api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction\";\nexport { OpenAppDeviceAction } from \"@api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction\";\nexport { OpenAppWithDependenciesDeviceAction } from \"@api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction\";\nexport { SendCommandInAppDeviceAction } from \"@api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction\";\nexport {\n type DeviceActionStateMachine,\n XStateDeviceAction,\n} from \"@api/device-action/xstate-utils/XStateDeviceAction\";\nexport { StaticDeviceModelDataSource } from \"@api/device-model/data/StaticDeviceModelDataSource\";\nexport { BleDeviceInfos } from \"@api/device-model/model/BleDeviceInfos\";\nexport { TransportDeviceModel } from \"@api/device-model/model/DeviceModel\";\nexport { ApduResponse } from \"@api/device-session/ApduResponse\";\nexport * from \"@api/device-session/data/FramerConst\";\nexport {\n type DeviceSessionState,\n DeviceSessionStateType,\n} from \"@api/device-session/DeviceSessionState\";\nexport { GenuineCheckDeviceAction } from \"@api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction\";\nexport { InstallAppDeviceAction } from \"@api/secure-channel/device-action/InstallApp/InstallAppDeviceAction\";\nexport { ListInstalledAppsDeviceAction } from \"@api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction\";\nexport { UninstallAppDeviceAction } from \"@api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction\";\nexport { SecureChannelError } from \"@internal/secure-channel/model/Errors\";\n// TODO: remove from exported\nexport { defaultApduReceiverServiceStubBuilder } from \"@api/device-session/service/DefaultApduReceiverService.stub\";\nexport { defaultApduSenderServiceStubBuilder } from \"@api/device-session/service/DefaultApduSenderService.stub\";\nexport { FramerUtils } from \"@api/device-session/utils/FramerUtils\";\nexport { DeviceManagementKit } from \"@api/DeviceManagementKit\";\nexport { DeviceManagementKitBuilder } from \"@api/DeviceManagementKitBuilder\";\nexport * from \"@api/Error\";\nexport {\n noopLogger,\n noopLoggerFactory,\n} from \"@api/logger-publisher/utils/noopLoggerFactory\";\nexport { LogLevel } from \"@api/logger-subscriber/model/LogLevel\";\nexport { ConsoleLogger } from \"@api/logger-subscriber/service/ConsoleLogger\";\nexport { DefaultLogTagFormatter } from \"@api/logger-subscriber/service/DefaultLogTagFormatter\";\nexport { type LogTagFormatter } from \"@api/logger-subscriber/service/LogTagFormatter\";\nexport { WebLogsExporterLogger } from \"@api/logger-subscriber/service/WebLogsExporterLogger\";\nexport { ConnectedDevice } from \"@api/transport/model/ConnectedDevice\";\nexport {\n DeviceConnectionStateMachine,\n type DeviceConnectionStateMachineParams,\n} from \"@api/transport/model/DeviceConnectionStateMachine\";\nexport * from \"@api/transport/model/Errors\";\nexport { TransportConnectedDevice } from \"@api/transport/model/TransportConnectedDevice\";\nexport { connectedDeviceStubBuilder } from \"@api/transport/model/TransportConnectedDevice.stub\";\nexport * from \"@api/types\";\nexport { formatApduReceivedLog, formatApduSentLog } from \"@api/utils/apduLogs\";\nexport {\n base64StringToBuffer,\n bufferToBase64String,\n isBase64String,\n} from \"@api/utils/Base64String\";\nexport {\n bufferToHexaString,\n hexaStringToBuffer,\n isHexaString,\n} from \"@api/utils/HexaString\";\n"],
|
|
5
|
+
"mappings": "AAEA,OAAS,QAAAA,MAAY,uBACrB,OAAS,oBAAAC,EAAkB,eAAAC,MAAmB,8BAC9C,OAAS,cAAAC,MAAkB,6BAC3B,WAAc,kCACd,OAAS,oBAAAC,MAAwB,mCACjC,OAAS,mBAAAC,MAAuB,kCAEhC,OACE,2CAAAC,EACA,0BAAAC,MACK,sBACP,OACE,wBAAAC,EACA,uBAAAC,EACA,0BAAAC,MACK,mCACP,OAAS,mBAAAC,MAAuB,kCAChC,OACE,2BAAAC,MAEK,0CACP,OACE,iCAAAC,EACA,sCAAAC,MAIK,gDACP,OACE,qBAAAC,EAEA,2BAAAC,MAEK,0CACP,OACE,uBAAAC,MAEK,sCACP,OAEE,mBAAAC,MAGK,kCACP,OAEE,0BAAAC,MAEK,yCACP,OAEE,kBAAAC,MACK,iCACP,OAAS,sBAAAC,MAA0B,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S,0BAAAC,OAA8B,wDAEvC,OAAS,yBAAAC,OAA6B,uDACtC,OAAS,mBAAAC,OAAuB,uCAChC,OACE,gCAAAC,OAEK,oDACP,WAAc,8BACd,OAAS,4BAAAC,OAAgC,gDACzC,OAAS,8BAAAC,OAAkC,qDAC3C,WAAc,aACd,OAAS,yBAAAC,GAAuB,qBAAAC,OAAyB,sBACzD,OACE,wBAAAC,GACA,wBAAAC,GACA,kBAAAC,OACK,0BACP,OACE,sBAAAC,GACA,sBAAAC,GACA,gBAAAC,OACK",
|
|
6
|
+
"names": ["Apdu", "APDU_MAX_PAYLOAD", "ApduBuilder", "ApduParser", "ByteArrayBuilder", "ByteArrayParser", "InvalidGetFirmwareMetadataResponseError", "InvalidStatusWordError", "CommandResultFactory", "CommandResultStatus", "isSuccessCommandResult", "CloseAppCommand", "GetAppAndVersionCommand", "GetBackgroundImageSizeCommand", "GetBackgroundImageSizeCommandError", "BatteryStatusType", "GetBatteryStatusCommand", "GetOsVersionCommand", "ListAppsCommand", "LoadCertificateCommand", "OpenAppCommand", "isCommandErrorCode", "CommandUtils", "GLOBAL_ERRORS", "GlobalCommandError", "GlobalCommandErrorHandler", "DeviceModel", "DeviceModelId", "LEDGER_VENDOR_ID", "DeviceStatus", "DeviceActionStatus", "UserInteractionRequired", "CallTaskInAppDeviceAction", "DEFAULT_UNLOCK_TIMEOUT_MS", "AppAlreadyInstalledDAError", "DeviceLockedError", "DeviceNotOnboardedError", "OutOfMemoryDAError", "RefusedByUserDAError", "UnknownDAError", "UnsupportedFirmwareDAError", "GetDeviceMetadataDeviceAction", "GetDeviceStatusDeviceAction", "GoToDashboardDeviceAction", "InstallOrUpdateAppsDeviceAction", "ListAppsDeviceAction", "ListAppsWithMetadataDeviceAction", "OpenAppDeviceAction", "OpenAppWithDependenciesDeviceAction", "SendCommandInAppDeviceAction", "XStateDeviceAction", "StaticDeviceModelDataSource", "BleDeviceInfos", "TransportDeviceModel", "ApduResponse", "DeviceSessionStateType", "GenuineCheckDeviceAction", "InstallAppDeviceAction", "ListInstalledAppsDeviceAction", "UninstallAppDeviceAction", "SecureChannelError", "defaultApduReceiverServiceStubBuilder", "defaultApduSenderServiceStubBuilder", "FramerUtils", "DeviceManagementKit", "DeviceManagementKitBuilder", "noopLogger", "noopLoggerFactory", "LogLevel", "ConsoleLogger", "DefaultLogTagFormatter", "WebLogsExporterLogger", "ConnectedDevice", "DeviceConnectionStateMachine", "TransportConnectedDevice", "connectedDeviceStubBuilder", "formatApduReceivedLog", "formatApduSentLog", "base64StringToBuffer", "bufferToBase64String", "isBase64String", "bufferToHexaString", "hexaStringToBuffer", "isHexaString"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function
|
|
1
|
+
function f(r){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(r)}function a(r){if(r.length===0)return new Uint8Array;if(!f(r))return null;try{const n=atob(r),e=new Uint8Array(n.length);for(let t=0;t<n.length;t++)e[t]=n.charCodeAt(t);return e}catch{return Uint8Array.from(Buffer.from(r,"base64"))}}function u(r){const n=globalThis;if(typeof n.btoa=="function"){let t="";for(let o=0;o<r.length;o++){const i=r[o];if(i===void 0)throw new Error("Unexpected undefined byte in array.");t+=String.fromCharCode(i)}return n.btoa(t)}const e=n.Buffer;if(typeof e<"u")return e.from(r).toString("base64");throw new Error("No Base64 encoder available in this environment.")}export{a as base64StringToBuffer,u as bufferToBase64String,f as isBase64String};
|
|
2
2
|
//# sourceMappingURL=Base64String.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/api/utils/Base64String.ts"],
|
|
4
|
-
"sourcesContent": ["export function isBase64String(value: string): boolean {\n // Valid base64 characters are [A-Za-z0-9+/]\n // They are always grouped by 4 characters.\n // Optional padding at the end with one or two '='.\n // see section 4 of: https://www.rfc-editor.org/rfc/rfc4648.txt\n return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(\n value,\n );\n}\n\nexport function base64StringToBuffer(value: string): Uint8Array | null {\n if (value.length === 0) {\n return new Uint8Array();\n }\n if (!isBase64String(value)) {\n return null;\n }\n try {\n // Use the browser implementation of atob\n const base64Decoded = atob(value);\n const buffer = new Uint8Array(base64Decoded.length);\n for (let i = 0; i < base64Decoded.length; i++) {\n buffer[i] = base64Decoded.charCodeAt(i);\n }\n return buffer;\n } catch (_error: unknown) {\n // Use the implementation of Buffer for environments such as node\n return Uint8Array.from(Buffer.from(value, \"base64\"));\n }\n}\n"],
|
|
5
|
-
"mappings": "AAAO,SAASA,EAAeC,EAAwB,CAKrD,MAAO,mEAAmE,KACxEA,CACF,CACF,CAEO,SAASC,EAAqBD,EAAkC,CACrE,GAAIA,EAAM,SAAW,EACnB,OAAO,IAAI,WAEb,GAAI,CAACD,EAAeC,CAAK,EACvB,OAAO,KAET,GAAI,CAEF,MAAME,EAAgB,KAAKF,CAAK,EAC1BG,EAAS,IAAI,WAAWD,EAAc,MAAM,EAClD,QAASE,EAAI,EAAGA,EAAIF,EAAc,OAAQE,IACxCD,EAAOC,CAAC,EAAIF,EAAc,WAAWE,CAAC,EAExC,OAAOD,CACT,MAA0B,CAExB,OAAO,WAAW,KAAK,OAAO,KAAKH,EAAO,QAAQ,CAAC,CACrD,CACF",
|
|
6
|
-
"names": ["isBase64String", "value", "base64StringToBuffer", "base64Decoded", "buffer", "i"]
|
|
4
|
+
"sourcesContent": ["export function isBase64String(value: string): boolean {\n // Valid base64 characters are [A-Za-z0-9+/]\n // They are always grouped by 4 characters.\n // Optional padding at the end with one or two '='.\n // see section 4 of: https://www.rfc-editor.org/rfc/rfc4648.txt\n return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(\n value,\n );\n}\n\nexport function base64StringToBuffer(value: string): Uint8Array | null {\n if (value.length === 0) {\n return new Uint8Array();\n }\n if (!isBase64String(value)) {\n return null;\n }\n try {\n // Use the browser implementation of atob\n const base64Decoded = atob(value);\n const buffer = new Uint8Array(base64Decoded.length);\n for (let i = 0; i < base64Decoded.length; i++) {\n buffer[i] = base64Decoded.charCodeAt(i);\n }\n return buffer;\n } catch (_error: unknown) {\n // Use the implementation of Buffer for environments such as node\n return Uint8Array.from(Buffer.from(value, \"base64\"));\n }\n}\n\nexport function bufferToBase64String(bytes: Uint8Array): string {\n const g = globalThis as typeof globalThis & {\n Buffer?: typeof Buffer;\n btoa?: (data: string) => string;\n };\n\n if (typeof g.btoa === \"function\") {\n // convert bytes to a binary string for btoa\n let binary = \"\";\n for (let i = 0; i < bytes.length; i++) {\n const byte = bytes[i];\n if (byte === undefined) {\n throw new Error(\"Unexpected undefined byte in array.\");\n }\n binary += String.fromCharCode(byte);\n }\n return g.btoa(binary);\n }\n\n const Buf = g.Buffer;\n if (typeof Buf !== \"undefined\") {\n return Buf.from(bytes).toString(\"base64\");\n }\n\n throw new Error(\"No Base64 encoder available in this environment.\");\n}\n"],
|
|
5
|
+
"mappings": "AAAO,SAASA,EAAeC,EAAwB,CAKrD,MAAO,mEAAmE,KACxEA,CACF,CACF,CAEO,SAASC,EAAqBD,EAAkC,CACrE,GAAIA,EAAM,SAAW,EACnB,OAAO,IAAI,WAEb,GAAI,CAACD,EAAeC,CAAK,EACvB,OAAO,KAET,GAAI,CAEF,MAAME,EAAgB,KAAKF,CAAK,EAC1BG,EAAS,IAAI,WAAWD,EAAc,MAAM,EAClD,QAASE,EAAI,EAAGA,EAAIF,EAAc,OAAQE,IACxCD,EAAOC,CAAC,EAAIF,EAAc,WAAWE,CAAC,EAExC,OAAOD,CACT,MAA0B,CAExB,OAAO,WAAW,KAAK,OAAO,KAAKH,EAAO,QAAQ,CAAC,CACrD,CACF,CAEO,SAASK,EAAqBC,EAA2B,CAC9D,MAAMC,EAAI,WAKV,GAAI,OAAOA,EAAE,MAAS,WAAY,CAEhC,IAAIC,EAAS,GACb,QAASJ,EAAI,EAAGA,EAAIE,EAAM,OAAQF,IAAK,CACrC,MAAMK,EAAOH,EAAMF,CAAC,EACpB,GAAIK,IAAS,OACX,MAAM,IAAI,MAAM,qCAAqC,EAEvDD,GAAU,OAAO,aAAaC,CAAI,CACpC,CACA,OAAOF,EAAE,KAAKC,CAAM,CACtB,CAEA,MAAME,EAAMH,EAAE,OACd,GAAI,OAAOG,EAAQ,IACjB,OAAOA,EAAI,KAAKJ,CAAK,EAAE,SAAS,QAAQ,EAG1C,MAAM,IAAI,MAAM,kDAAkD,CACpE",
|
|
6
|
+
"names": ["isBase64String", "value", "base64StringToBuffer", "base64Decoded", "buffer", "i", "bufferToBase64String", "bytes", "g", "binary", "byte", "Buf"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{base64StringToBuffer as l,isBase64String as s}from"./Base64String";describe("Base64String",()=>{describe("isBase64String function",()=>{it("should return true if the value is a valid base64 string",()=>{const
|
|
1
|
+
import{base64StringToBuffer as i,bufferToBase64String as l,isBase64String as s}from"./Base64String";describe("Base64String",()=>{describe("isBase64String function",()=>{it("should return true if the value is a valid base64 string",()=>{const e=s("Zmlyc3QgdG/zdGluZyBz+HI9");expect(e).toBeTruthy()}),it("should return true if the value is a valid base64 string, one padding",()=>{const e=s("Zmlyc3QgdGVzdGluZyBzdHI=");expect(e).toBeTruthy()}),it("should return true if the value is a valid base64 string, two paddings",()=>{const e=s("Zmlyc3QgdGVzdGluZyBzdH==");expect(e).toBeTruthy()}),it("should return true for an empty string",()=>{const e=s("");expect(e).toBeTruthy()}),it("should return false for an invalid base64 string",()=>{const e=s("invalid base64 string");expect(e).toBeFalsy()}),it("should return false with 3 paddings",()=>{const e=s("Zmlyc3QgdGVzdGluZyBzd===");expect(e).toBeFalsy()}),it("should return false on incomplete string (not multiple of 4)",()=>{const e=s("Zmlyc3QgdGVzdGluZyBzdHI");expect(e).toBeFalsy()})}),describe("base64StringToBuffer function",()=>{beforeEach(()=>{vi.resetAllMocks()}),it("should convert empty input to empty buffer",()=>{const e=i("");expect(e).toStrictEqual(new Uint8Array)}),it("invalid base64 string converted to null",()=>{const e=i("invalid string");expect(e).toStrictEqual(null)}),it("should convert a base64 string to a buffer using browser's atob",()=>{const e=i("Zmlyc3QgdGVzdCBzdHJpbmc=");expect(e).toStrictEqual(Uint8Array.from([102,105,114,115,116,32,116,101,115,116,32,115,116,114,105,110,103]))}),it("should convert a base64 string to a buffer using Buffer",()=>{vi.spyOn(global,"atob").mockImplementation(()=>{throw new Error("atob is not defined")});const e=i("Zmlyc3QgdGVzdCBzdHJpbmc=");expect(e).toStrictEqual(Uint8Array.from([102,105,114,115,116,32,116,101,115,116,32,115,116,114,105,110,103]))})})});describe("bufferToBase64String",()=>{const t=globalThis.btoa,e=globalThis.Buffer;beforeEach(()=>{vi.restoreAllMocks(),globalThis.btoa=t,globalThis.Buffer=e}),afterAll(()=>{globalThis.btoa=t,globalThis.Buffer=e}),it("should encode an empty buffer to an empty base64 string when btoa is available",()=>{globalThis.btoa=vi.fn(o=>(expect(o).toBe(""),""));const a=new Uint8Array,n=l(a);expect(n).toBe(""),expect(globalThis.btoa).toHaveBeenCalledTimes(1)}),it("should encode a buffer to base64 using btoa when available",()=>{const a="first testing str",n=Uint8Array.from(a.split("").map(r=>r.charCodeAt(0)));globalThis.btoa=vi.fn(r=>(expect(r).toBe(a),"Zmlyc3QgdGVzdGluZyBzdHI="));const o=l(n);expect(o).toBe("Zmlyc3QgdGVzdGluZyBzdHI="),expect(globalThis.btoa).toHaveBeenCalledTimes(1)}),it("should encode a buffer to base64 using Buffer when btoa is not available",()=>{globalThis.btoa=void 0;const a="testing str",n=Buffer.from(a,"binary").toString("base64"),o=Uint8Array.from(a.split("").map(c=>c.charCodeAt(0))),r=vi.spyOn(Buffer,"from"),u=l(o);expect(u).toBe(n),expect(r).toHaveBeenCalledTimes(1)}),it("should throw an error when no Base64 encoder is available",()=>{globalThis.btoa=void 0,globalThis.Buffer=void 0;const a=Uint8Array.from([1,2,3]);expect(()=>l(a)).toThrowError("No Base64 encoder available in this environment.")}),it("should throw if an undefined byte is encountered (defensive check)",()=>{const a={length:3,0:102,1:void 0,2:111};globalThis.btoa=vi.fn(),expect(()=>l(a)).toThrowError("Unexpected undefined byte in array.")})});
|
|
2
2
|
//# sourceMappingURL=Base64String.test.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/api/utils/Base64String.test.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["base64StringToBuffer", "isBase64String", "result"]
|
|
4
|
+
"sourcesContent": ["/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport {\n base64StringToBuffer,\n bufferToBase64String,\n isBase64String,\n} from \"./Base64String\";\n\ndescribe(\"Base64String\", () => {\n describe(\"isBase64String function\", () => {\n it(\"should return true if the value is a valid base64 string\", () => {\n // GIVEN\n const value = \"Zmlyc3QgdG/zdGluZyBz+HI9\";\n\n // WHEN\n const result = isBase64String(value);\n\n // THEN\n expect(result).toBeTruthy();\n });\n\n it(\"should return true if the value is a valid base64 string, one padding\", () => {\n // GIVEN\n const value = \"Zmlyc3QgdGVzdGluZyBzdHI=\";\n\n // WHEN\n const result = isBase64String(value);\n\n // THEN\n expect(result).toBeTruthy();\n });\n\n it(\"should return true if the value is a valid base64 string, two paddings\", () => {\n // GIVEN\n const value = \"Zmlyc3QgdGVzdGluZyBzdH==\";\n\n // WHEN\n const result = isBase64String(value);\n\n // THEN\n expect(result).toBeTruthy();\n });\n\n it(\"should return true for an empty string\", () => {\n // GIVEN\n const value = \"\";\n\n // WHEN\n const result = isBase64String(value);\n\n // THEN\n expect(result).toBeTruthy();\n });\n\n it(\"should return false for an invalid base64 string\", () => {\n // GIVEN\n const value = \"invalid base64 string\";\n\n // WHEN\n const result = isBase64String(value);\n\n // THEN\n expect(result).toBeFalsy();\n });\n\n it(\"should return false with 3 paddings\", () => {\n // GIVEN\n const value = \"Zmlyc3QgdGVzdGluZyBzd===\";\n\n // WHEN\n const result = isBase64String(value);\n\n // THEN\n expect(result).toBeFalsy();\n });\n\n it(\"should return false on incomplete string (not multiple of 4)\", () => {\n // GIVEN\n const value = \"Zmlyc3QgdGVzdGluZyBzdHI\";\n\n // WHEN\n const result = isBase64String(value);\n\n // THEN\n expect(result).toBeFalsy();\n });\n });\n\n describe(\"base64StringToBuffer function\", () => {\n beforeEach(() => {\n vi.resetAllMocks();\n });\n\n it(\"should convert empty input to empty buffer\", () => {\n // GIVEN\n const value = \"\";\n\n // WHEN\n const result = base64StringToBuffer(value);\n\n // THEN\n expect(result).toStrictEqual(new Uint8Array());\n });\n\n it(\"invalid base64 string converted to null\", () => {\n // GIVEN\n const value = \"invalid string\";\n\n // WHEN\n const result = base64StringToBuffer(value);\n\n // THEN\n expect(result).toStrictEqual(null);\n });\n\n it(\"should convert a base64 string to a buffer using browser's atob\", () => {\n // GIVEN\n const value = \"Zmlyc3QgdGVzdCBzdHJpbmc=\";\n\n // WHEN\n const result = base64StringToBuffer(value);\n\n // THEN\n expect(result).toStrictEqual(\n Uint8Array.from([\n 0x66, 0x69, 0x72, 0x73, 0x74, 0x20, 0x74, 0x65, 0x73, 0x74, 0x20,\n 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67,\n ]),\n );\n });\n\n it(\"should convert a base64 string to a buffer using Buffer\", () => {\n // GIVEN\n vi.spyOn(global, \"atob\").mockImplementation(() => {\n throw new Error(\"atob is not defined\");\n });\n const value = \"Zmlyc3QgdGVzdCBzdHJpbmc=\";\n\n // WHEN\n const result = base64StringToBuffer(value);\n\n // THEN\n expect(result).toStrictEqual(\n Uint8Array.from([\n 0x66, 0x69, 0x72, 0x73, 0x74, 0x20, 0x74, 0x65, 0x73, 0x74, 0x20,\n 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67,\n ]),\n );\n });\n });\n});\n\ndescribe(\"bufferToBase64String\", () => {\n const originalBtoa = (globalThis as any).btoa;\n const originalBuffer = (globalThis as any).Buffer;\n\n beforeEach(() => {\n vi.restoreAllMocks();\n (globalThis as any).btoa = originalBtoa;\n (globalThis as any).Buffer = originalBuffer;\n });\n\n afterAll(() => {\n (globalThis as any).btoa = originalBtoa;\n (globalThis as any).Buffer = originalBuffer;\n });\n\n it(\"should encode an empty buffer to an empty base64 string when btoa is available\", () => {\n // GIVEN\n (globalThis as any).btoa = vi.fn((input: string) => {\n expect(input).toBe(\"\");\n return \"\";\n });\n\n const bytes = new Uint8Array();\n\n // WHEN\n const result = bufferToBase64String(bytes);\n\n // THEN\n expect(result).toBe(\"\");\n expect(globalThis.btoa).toHaveBeenCalledTimes(1);\n });\n\n it(\"should encode a buffer to base64 using btoa when available\", () => {\n // GIVEN\n const text = \"first testing str\";\n const bytes = Uint8Array.from(text.split(\"\").map((c) => c.charCodeAt(0)));\n\n (globalThis as any).btoa = vi.fn((input: string) => {\n expect(input).toBe(text);\n return \"Zmlyc3QgdGVzdGluZyBzdHI=\";\n });\n\n // WHEN\n const result = bufferToBase64String(bytes);\n\n // THEN\n expect(result).toBe(\"Zmlyc3QgdGVzdGluZyBzdHI=\");\n expect(globalThis.btoa).toHaveBeenCalledTimes(1);\n });\n\n it(\"should encode a buffer to base64 using Buffer when btoa is not available\", () => {\n // GIVEN\n (globalThis as any).btoa = undefined;\n\n const text = \"testing str\";\n const expectedBase64 = Buffer.from(text, \"binary\").toString(\"base64\");\n const bytes = Uint8Array.from(text.split(\"\").map((c) => c.charCodeAt(0)));\n\n const bufferFromSpy = vi.spyOn(Buffer, \"from\");\n\n // WHEN\n const result = bufferToBase64String(bytes);\n\n // THEN\n expect(result).toBe(expectedBase64);\n expect(bufferFromSpy).toHaveBeenCalledTimes(1);\n });\n\n it(\"should throw an error when no Base64 encoder is available\", () => {\n // GIVEN\n (globalThis as any).btoa = undefined;\n (globalThis as any).Buffer = undefined;\n\n const bytes = Uint8Array.from([0x01, 0x02, 0x03]);\n\n // WHEN / THEN\n expect(() => bufferToBase64String(bytes)).toThrowError(\n \"No Base64 encoder available in this environment.\",\n );\n });\n\n it(\"should throw if an undefined byte is encountered (defensive check)\", () => {\n // GIVEN\n const bytes = {\n length: 3,\n 0: 0x66,\n 1: undefined,\n 2: 0x6f,\n } as unknown as Uint8Array;\n\n (globalThis as any).btoa = vi.fn();\n\n // WHEN / THEN\n expect(() => bufferToBase64String(bytes)).toThrowError(\n \"Unexpected undefined byte in array.\",\n );\n });\n});\n"],
|
|
5
|
+
"mappings": "AAIA,OACE,wBAAAA,EACA,wBAAAC,EACA,kBAAAC,MACK,iBAEP,SAAS,eAAgB,IAAM,CAC7B,SAAS,0BAA2B,IAAM,CACxC,GAAG,2DAA4D,IAAM,CAKnE,MAAMC,EAASD,EAHD,0BAGqB,EAGnC,OAAOC,CAAM,EAAE,WAAW,CAC5B,CAAC,EAED,GAAG,wEAAyE,IAAM,CAKhF,MAAMA,EAASD,EAHD,0BAGqB,EAGnC,OAAOC,CAAM,EAAE,WAAW,CAC5B,CAAC,EAED,GAAG,yEAA0E,IAAM,CAKjF,MAAMA,EAASD,EAHD,0BAGqB,EAGnC,OAAOC,CAAM,EAAE,WAAW,CAC5B,CAAC,EAED,GAAG,yCAA0C,IAAM,CAKjD,MAAMA,EAASD,EAHD,EAGqB,EAGnC,OAAOC,CAAM,EAAE,WAAW,CAC5B,CAAC,EAED,GAAG,mDAAoD,IAAM,CAK3D,MAAMA,EAASD,EAHD,uBAGqB,EAGnC,OAAOC,CAAM,EAAE,UAAU,CAC3B,CAAC,EAED,GAAG,sCAAuC,IAAM,CAK9C,MAAMA,EAASD,EAHD,0BAGqB,EAGnC,OAAOC,CAAM,EAAE,UAAU,CAC3B,CAAC,EAED,GAAG,+DAAgE,IAAM,CAKvE,MAAMA,EA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H,EAAG,OACH,EAAG,GACL,EAEC,WAAmB,KAAO,GAAG,GAAG,EAGjC,OAAO,IAAMN,EAAqBM,CAAK,CAAC,EAAE,aACxC,qCACF,CACF,CAAC,CACH,CAAC",
|
|
6
|
+
"names": ["base64StringToBuffer", "bufferToBase64String", "isBase64String", "result", "originalBtoa", "originalBuffer", "input", "bytes", "text", "c", "expectedBase64", "bufferFromSpy"]
|
|
7
7
|
}
|
|
@@ -67,6 +67,6 @@ export { TransportConnectedDevice } from "./transport/model/TransportConnectedDe
|
|
|
67
67
|
export { connectedDeviceStubBuilder } from "./transport/model/TransportConnectedDevice.stub";
|
|
68
68
|
export * from "./types";
|
|
69
69
|
export { formatApduReceivedLog, formatApduSentLog } from "./utils/apduLogs";
|
|
70
|
-
export { base64StringToBuffer, isBase64String } from "./utils/Base64String";
|
|
70
|
+
export { base64StringToBuffer, bufferToBase64String, isBase64String, } from "./utils/Base64String";
|
|
71
71
|
export { bufferToHexaString, hexaStringToBuffer, isHexaString, } from "./utils/HexaString";
|
|
72
72
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,cAAc,iCAAiC,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EACL,uCAAuC,EACvC,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,oBAAoB,EACpB,mBAAmB,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CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,uDAAuD,CAAC;AAC/F,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gDAAgD,CAAC;AACtF,OAAO,EAAE,qBAAqB,EAAE,MAAM,sDAAsD,CAAC;AAC7F,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EACL,4BAA4B,EAC5B,KAAK,kCAAkC,GACxC,MAAM,mDAAmD,CAAC;AAC3D,cAAc,6BAA6B,CAAC;AAC5C,OAAO,EAAE,wBAAwB,EAAE,MAAM,+CAA+C,CAAC;AACzF,OAAO,EAAE,0BAA0B,EAAE,MAAM,oDAAoD,CAAC;AAChG,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,cAAc,GACf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,YAAY,GACb,MAAM,uBAAuB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Base64String.d.ts","sourceRoot":"","sources":["../../../../../src/api/utils/Base64String.ts"],"names":[],"mappings":"AAAA,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAQrD;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAmBrE"}
|
|
1
|
+
{"version":3,"file":"Base64String.d.ts","sourceRoot":"","sources":["../../../../../src/api/utils/Base64String.ts"],"names":[],"mappings":"AAAA,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAQrD;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAmBrE;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAyB9D"}
|