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§

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, and recovering the invite secret.
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.
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.
OrganizationInviteLink
An organization invite link as persisted by the server.
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
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.
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§

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.