Skip to main content

Crate bitwarden_wasm_internal

Crate bitwarden_wasm_internal 

Source
Expand description

§bitwarden-wasm-internal

Note: This is only for internal use. Bitwarden will not provide any support for this crate.

Bitwarden WASM internal exposes WebAssembly bindings for the Bitwarden SDK. This crate should contain no logic but rather only handle WASM unique conversions and bindings. Business logic MUST be placed in the relevant feature crates.

§Getting Started

§Requirements

  • wasm32-unknown-unknown rust target.
  • binaryen installed for wasm-opt and wasm2js.
  • npm packages must be installed in the npm folder. Run npm ci inside:
    • OSS: crates/bitwarden-wasm-internal/npm
    • Commercial: crates/bitwarden-wasm-internal/bitwarden_license/npm
rustup target add wasm32-unknown-unknown
brew install binaryen

§Building

# dev
./build.sh

# dev with commercial license
./build.sh -b

# release
./build.sh -r

# release with commercial license
./build.sh -r -b

Modules§

client 🔒
custom_types 🔒
flight_recorder 🔒
WASM bindings for the Flight Recorder.
init 🔒
platform 🔒
pure_crypto 🔒
ssh 🔒

Structs§

AutotypeCredentials
The credentials the render process found for an AutotypeGetCredentialsRequest.
AutotypeGetCredentialsRequest
A request from the main process, sent when the user presses the Autotype shortcut, asking the render process for the credentials to autotype into the focused app.
AutotypeGetCredentialsResponse
A response to an AutotypeGetCredentialsRequest.
AutotypeListRunningAppsRequest
A request asking the receiving client for the applications that are currently running.
AutotypeListRunningAppsResponse
A response to an AutotypeListRunningAppsRequest.
AutotypeRunningApp
A running application.
AutotypeSetEnabledRequest
A request asking the receiving client to enable or disable Autotype.
AutotypeSetEnabledResponse
A response to an AutotypeSetEnabledRequest.
AutotypeSetKeyboardShortcutRequest
A request asking the receiving client to change the keyboard shortcut Autotype is triggered by.
AutotypeSetKeyboardShortcutResponse
A response to an AutotypeSetKeyboardShortcutRequest.
ChannelError
DebugClient
Root of the debug-capability tree. Routes to per-crate capability handles.
DeserializeError
EmergencyAccessClient
Client for emergency access operations, performed as the grantor or the grantee.
EmergencyAccessId
NewType wrapper for EmergencyAccessId
FlightRecorderClient
WASM client for reading Flight Recorder logs.
GranteeEmergencyAccess
An emergency access seen by the grantor, describing the trusted grantee.
GrantorEmergencyAccess
An emergency access seen by the grantee, describing the grantor who trusts them.
InviteLinkAdminClient
Client for organization invite link administrative (organization-key) operations: creating, refreshing, updating, deleting, and inspecting invite links. Returned views carry the recovered invite secret in their URL fragment.
InviteLinkClient
Client for organization invite link operations.
InviteLinkUserClient
Client for organization invite link invitee (user) operations: checking link status, validating email eligibility, and accepting or self-confirming an invite.
IpcEndpointSendResult
The outcome of delivering a broadcast message to one member of a [BroadcastGroup]. JavaScript counterpart of [EndpointSendResult].
JsCommunicationBackend
JavaScript implementation of the CommunicationBackend trait for IPC communication.
JsCommunicationBackendSender
JavaScript interface for handling outgoing messages from the IPC framework.
JsIpcClient
JavaScript wrapper around the IPC client. For more information, see the [IpcClient] trait documentation.
JsIpcClientSubscription
JavaScript wrapper around the IPC client subscription. For more information, see the [IpcClientSubscription] documentation.
JsServerCommunicationConfigClient
JavaScript wrapper for ServerCommunicationConfigClient
JsServerCommunicationConfigPlatformApi
Thread-safe JavaScript implementation of ServerCommunicationConfigPlatformApi
JsServerCommunicationConfigRepository
Thread-safe JavaScript implementation of ServerCommunicationConfigRepository
JsSessionRepository
Thread safe JavaScript implementation of the SessionRepository trait for IPC sessions.
ManagedSettingsClient
Handle to the host system’s Unified Endpoint Management profile.
OrganizationInviteLinkSsoView
SSO details for an organization referenced by an invite link status.
OrganizationInviteLinkStatusView
The status of an organization invite link, used to verify basic availability before an invitee attempts to accept.
OrganizationInviteLinkView
An organization invite link with reconstructed URL for display by the client.
OrganizationUserBulkResponse
The outcome of a bulk member operation for one organization member.
OrganizationUsersManagementClient
Client for administering the members of an organization.
PasswordManagerClient
The main entry point for the Bitwarden SDK in WebAssembly environments
RawJsAutotypeDriver
JavaScript implementation of the various Autotype operations.
RawJsAutotypeRenderDriver
JavaScript implementation of the Autotype operations applied in the render process.
RawJsServerCommunicationConfigPlatformApi
JavaScript interface for the ServerCommunicationConfigPlatformApi
RawJsServerCommunicationConfigRepository
JavaScript interface for the ServerCommunicationConfigRepository
RawJsSessionRepository
JavaScript interface for handling outgoing messages from the IPC framework.
RawJsSharedUnlockDriver
JavaScript implementation of shared unlock operations used by shared unlock protocol.
SharedUnlockPeer
Shared-unlock peer for WASM clients.
StateDebug
Typed debug handle over the SDK’s state registry: a generic browse across every registered repository, both client-managed and SDK-managed.

Enums§

AcceptInviteLinkError
Errors returned from crate::InviteLinkUserClient::accept_and_optionally_confirm.
AccountRecoveryV2UpgradeError
Errors returned when upgrading members’ account recovery keys.
EmergencyAccessAcceptError
Errors returned when accepting an emergency access invite.
EmergencyAccessApproveError
Errors returned when approving an emergency access request.
EmergencyAccessConfirmError
Errors returned when confirming an emergency contact.
EmergencyAccessDeleteError
Errors returned when deleting an emergency access.
EmergencyAccessGetError
Errors returned when fetching an emergency access.
EmergencyAccessGetGrantorPoliciesError
Errors returned when fetching the policies that apply to a grantor.
EmergencyAccessInitiateError
Errors returned when requesting emergency access.
EmergencyAccessInviteError
Errors returned when inviting an emergency contact.
EmergencyAccessListGrantedError
Errors returned when listing the emergency accesses granted to the current user.
EmergencyAccessListTrustedError
Errors returned when listing the current user’s trusted emergency contacts.
EmergencyAccessReinviteError
Errors returned when re-sending an emergency access invite.
EmergencyAccessRejectError
Errors returned when rejecting an emergency access request.
EmergencyAccessStatus
Where an emergency access is in its lifecycle.
EmergencyAccessTakeoverError
Errors returned when taking over a grantor’s account through emergency access.
EmergencyAccessType
What the grantee may do once access is granted.
EmergencyAccessUpdateError
Errors returned when editing an emergency access.
EmergencyAccessViewError
Errors returned when viewing a grantor’s vault items through emergency access.
InviteLinkError
Errors returned from invite link client operations, except accepting an invite (see AcceptInviteLinkError).
OrganizationUsersManagementError
Errors returned from OrganizationUsersManagementClient operations.
WasmCommunicationError
Error type for the WASM communication backend’s send and receive operations.

Traits§

EmergencyAccessClientExt
Extension trait that exposes EmergencyAccessClient on [Client].
InviteLinkClientExt
Extension trait that exposes InviteLinkClient on [Client].
OrganizationUsersManagementClientExt
Extension trait exposing OrganizationUsersManagementClient on [Client].

Functions§

autotype_request_get_credentials
Sends an AutotypeGetCredentialsRequest to the desktop render process, asking for the credentials to autotype into the focused app. The response’s credentials is empty when no vault item matches.
autotype_request_list_running_apps
Asks the desktop main process which applications are currently running.
autotype_request_set_enabled
Sends an AutotypeSetEnabledRequest to the desktop main process and reports whether the requested change was successful.
autotype_request_set_keyboard_shortcut
Sends an AutotypeSetKeyboardShortcutRequest to the desktop main process and reports whether the requested shortcut was applied.
init_sdk
Initialize the SDK. Must be called before using any other API. Only the first invocation has effect; subsequent calls are ignored.
ipc_register_discover_handler
Registers a DiscoverHandler so that the client can respond to DiscoverRequests.
ipc_request_discover
Sends a DiscoverRequest to the specified destination and returns the response.
register_autotype_handlers
This registers the Autotype handlers so the client responds to Autotype requests through the RawJsAutotypeDriver. Call this on the desktop main process’s IPC client.
register_autotype_render_handlers
This registers the Autotype handlers so the client responds to Autotype requests from the main process through the RawJsAutotypeRenderDriver. Call this on the desktop render process’s IPC client.