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-unknownrust target.binaryeninstalled forwasm-optandwasm2js.- npm packages must be installed in the
npmfolder. Runnpm ciinside:- OSS:
crates/bitwarden-wasm-internal/npm - Commercial:
crates/bitwarden-wasm-internal/bitwarden_license/npm
- OSS:
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 -bModules§
- client 🔒
- custom_
types 🔒 - flight_
recorder 🔒 - WASM bindings for the Flight Recorder.
- init 🔒
- platform 🔒
- pure_
crypto 🔒 - ssh 🔒
Structs§
- Channel
Error - Debug
Client - Root of the debug-capability tree. Routes to per-crate capability handles.
- Deserialize
Error - Emergency
Access Client - Client for emergency access operations, performed as the grantor or the grantee.
- Emergency
Access Id - NewType wrapper for
EmergencyAccessId - Flight
Recorder Client - WASM client for reading Flight Recorder logs.
- Grantee
Emergency Access - An emergency access seen by the grantor, describing the trusted grantee.
- Grantor
Emergency Access - An emergency access seen by the grantee, describing the grantor who trusts them.
- Invite
Link Admin Client - Client for organization invite link administrative (organization-key) operations: creating, refreshing, updating, deleting, and inspecting invite links, and recovering the invite secret.
- Invite
Link Client - Client for organization invite link operations.
- Invite
Link User Client - Client for organization invite link invitee (user) operations: checking link status, validating email eligibility, and accepting or self-confirming an invite.
- JsCommunication
Backend - JavaScript implementation of the
CommunicationBackendtrait for IPC communication. - JsCommunication
Backend Sender - JavaScript interface for handling outgoing messages from the IPC framework.
- JsIpc
Client - JavaScript wrapper around the IPC client. For more information, see the
IpcClienttrait documentation. - JsIpc
Client Subscription - JavaScript wrapper around the IPC client subscription. For more information, see the IpcClientSubscription documentation.
- JsServer
Communication Config Client - JavaScript wrapper for ServerCommunicationConfigClient
- JsServer
Communication Config Platform Api - Thread-safe JavaScript implementation of ServerCommunicationConfigPlatformApi
- JsServer
Communication Config Repository - Thread-safe JavaScript implementation of ServerCommunicationConfigRepository
- JsSession
Repository - Thread safe JavaScript implementation of the
SessionRepositorytrait for IPC sessions. - Managed
Settings Client - Handle to the host system’s Unified Endpoint Management profile.
- Organization
Invite Link - An organization invite link as persisted by the server.
- Organization
Invite Link SsoView - SSO details for an organization referenced by an invite link status.
- Organization
Invite Link Status View - The status of an organization invite link, used to verify basic availability before an invitee attempts to accept.
- Organization
Invite Link View - An organization invite link with reconstructed URL for display by the client.
- Organization
User Bulk Response - The outcome of a bulk member operation for one organization member.
- Organization
Users Management Client - Client for administering the members of an organization.
- Password
Manager Client - The main entry point for the Bitwarden SDK in WebAssembly environments
- RawJs
Server Communication Config Platform Api - JavaScript interface for the ServerCommunicationConfigPlatformApi
- RawJs
Server Communication Config Repository - JavaScript interface for the ServerCommunicationConfigRepository
- RawJs
Session Repository - JavaScript interface for handling outgoing messages from the IPC framework.
- RawJs
Shared Unlock Driver - JavaScript implementation of shared unlock operations used by shared unlock protocol.
- Shared
Unlock Peer - Shared-unlock peer for WASM clients.
- State
Debug - Typed debug handle over the SDK’s state registry: a generic browse across every registered repository, both client-managed and SDK-managed.
Enums§
- Accept
Invite Link Error - Errors returned from
crate::InviteLinkUserClient::accept_and_optionally_confirm. - Emergency
Access Accept Error - Errors returned when accepting an emergency access invite.
- Emergency
Access Approve Error - Errors returned when approving an emergency access request.
- Emergency
Access Confirm Error - Errors returned when confirming an emergency contact.
- Emergency
Access Delete Error - Errors returned when deleting an emergency access.
- Emergency
Access GetError - Errors returned when fetching an emergency access.
- Emergency
Access GetGrantor Policies Error - Errors returned when fetching the policies that apply to a grantor.
- Emergency
Access Initiate Error - Errors returned when requesting emergency access.
- Emergency
Access Invite Error - Errors returned when inviting an emergency contact.
- Emergency
Access List Granted Error - Errors returned when listing the emergency accesses granted to the current user.
- Emergency
Access List Trusted Error - Errors returned when listing the current user’s trusted emergency contacts.
- Emergency
Access Reinvite Error - Errors returned when re-sending an emergency access invite.
- Emergency
Access Reject Error - Errors returned when rejecting an emergency access request.
- Emergency
Access Status - Where an emergency access is in its lifecycle.
- Emergency
Access Takeover Error - Errors returned when taking over a grantor’s account through emergency access.
- Emergency
Access Type - What the grantee may do once access is granted.
- Emergency
Access Update Error - Errors returned when editing an emergency access.
- Emergency
Access View Error - Errors returned when viewing a grantor’s vault items through emergency access.
- Invite
Link Error - Errors returned from invite link client operations, except accepting an invite (see
AcceptInviteLinkError). - Organization
Users Management Error - Errors returned from
OrganizationUsersManagementClientoperations. - Wasm
Communication Error - Error type for the WASM communication backend’s send and receive operations.
Traits§
- Emergency
Access Client Ext - Extension trait that exposes
EmergencyAccessClientonClient. - Invite
Link Client Ext - Extension trait that exposes
InviteLinkClientonClient. - Organization
Users Management Client Ext - Extension trait exposing
OrganizationUsersManagementClientonClient.
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.