{"version":3,"file":"RendezvousChannel.js","names":[],"sources":["../../src/rendezvous/RendezvousChannel.ts"],"sourcesContent":["/*\nCopyright 2022 The Matrix.org Foundation C.I.C.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\nimport { RendezvousCode, RendezvousIntent, RendezvousFailureReason } from \".\";\n\nexport interface RendezvousChannel {\n /**\n * @returns the checksum/confirmation digits to be shown to the user\n */\n connect(): Promise;\n\n /**\n * Send a payload via the channel.\n * @param data - payload to send\n */\n send(data: T): Promise;\n\n /**\n * Receive a payload from the channel.\n * @returns the received payload\n */\n receive(): Promise | undefined>;\n\n /**\n * Close the channel and clear up any resources.\n */\n close(): Promise;\n\n /**\n * @returns a representation of the channel that can be encoded in a QR or similar\n */\n generateCode(intent: RendezvousIntent): Promise;\n\n cancel(reason: RendezvousFailureReason): Promise;\n}\n"],"mappings":""}