UNPKG

@microsoft/useragent-sdk

Version:

SDK for building decentralized identity wallets and enterprise agents.

26 lines 1.02 kB
"use strict"; /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ Object.defineProperty(exports, "__esModule", { value: true }); /** * The base class for all requests to an Identity Hub. */ class HubRequest { constructor(requestType, requestBody) { this.requestType = requestType; this.requestBody = requestBody; } /** * Returns the raw request JSON which will be sent to the Hub. */ async getRequestJson() { return Object.assign({ '@context': 'https://schema.identity.foundation/0.1', '@type': this.requestType, }, this.requestBody); } } exports.default = HubRequest; //# sourceMappingURL=HubRequest.js.map