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.
Example
Section titled “Example”const transport = new PostMessageTransport({ url: "https://oisy.com/sign" });const signer = new Signer({ transport });Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new PostMessageTransport(
options):PostMessageTransport
Defined in: src/web/postMessageTransport.ts:102
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”PostMessageTransport
Methods
Section titled “Methods”establishChannel()
Section titled “establishChannel()”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.
Returns
Section titled “Returns”Promise<PostMessageChannel>
Throws
Section titled “Throws”If called outside a click handler
(when detectNonClickEstablishment is enabled), if the window
cannot be opened, or if the handshake times out.