Skip to content

PostMessageTransport

Defined in: src/web/postMessageTransport.ts:99

ICRC-29 post message transport for communicating with web-based signers.

Opens a window to the signer’s URL and establishes a communication channel using the ICRC-29 heartbeat protocol (icrc29_status polling). Messages are exchanged via window.postMessage.

https://github.com/dfinity/wg-identity-authentication/blob/main/topics/icrc_29_window_post_message_transport.md

const transport = new PostMessageTransport({ url: "https://oisy.com/sign" });
const signer = new Signer({ transport });

new PostMessageTransport(options): PostMessageTransport

Defined in: src/web/postMessageTransport.ts:102

PostMessageTransportOptions

PostMessageTransport

establishChannel(): Promise<PostMessageChannel>

Defined in: src/web/postMessageTransport.ts:142

Opens the signer window and establishes a communication channel via the ICRC-29 heartbeat handshake.

Promise<PostMessageChannel>

If called outside a click handler (when detectNonClickEstablishment is enabled), if the window cannot be opened, or if the handshake times out.

Transport.establishChannel