@triveria/wallet 0.0.116 → 0.0.118

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/api.d.ts +132 -0
  2. package/api.js +214 -0
  3. package/common.js +40 -1
  4. package/package.json +1 -1
package/api.d.ts CHANGED
@@ -831,6 +831,44 @@ export interface ModelError {
831
831
  */
832
832
  'Message': string;
833
833
  }
834
+ /**
835
+ *
836
+ * @export
837
+ * @interface Oauth2AccessTokenResponse
838
+ */
839
+ export interface Oauth2AccessTokenResponse {
840
+ /**
841
+ *
842
+ * @type {string}
843
+ * @memberof Oauth2AccessTokenResponse
844
+ */
845
+ 'access_token': string;
846
+ /**
847
+ *
848
+ * @type {string}
849
+ * @memberof Oauth2AccessTokenResponse
850
+ */
851
+ 'token_type': string;
852
+ /**
853
+ *
854
+ * @type {string}
855
+ * @memberof Oauth2AccessTokenResponse
856
+ */
857
+ 'expires_in': string;
858
+ }
859
+ /**
860
+ *
861
+ * @export
862
+ * @interface Oauth2RedirectUriResponse
863
+ */
864
+ export interface Oauth2RedirectUriResponse {
865
+ /**
866
+ *
867
+ * @type {string}
868
+ * @memberof Oauth2RedirectUriResponse
869
+ */
870
+ 'redirect_uri': string;
871
+ }
834
872
  /**
835
873
  *
836
874
  * @export
@@ -1530,6 +1568,29 @@ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration
1530
1568
  * @throws {RequiredError}
1531
1569
  */
1532
1570
  issuerCredentialTypesList: (url: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
1571
+ /**
1572
+ *
1573
+ * @param {string} walletId
1574
+ * @param {string} scope
1575
+ * @param {string} clientId
1576
+ * @param {string} redirectUri
1577
+ * @param {string} responseType
1578
+ * @param {string} state
1579
+ * @param {string} nonce
1580
+ * @param {*} [options] Override http request option.
1581
+ * @throws {RequiredError}
1582
+ */
1583
+ oauth2Auth: (walletId: string, scope: string, clientId: string, redirectUri: string, responseType: string, state: string, nonce: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
1584
+ /**
1585
+ *
1586
+ * @param {string} grantType Value MUST be set to \\\&quot;authorization_code\\\&quot;.
1587
+ * @param {string} code The authorization code received from the.
1588
+ * @param {string} [redirectUri] REQUIRED, if the \\\&quot;redirect_uri\\\&quot; parameter was included in the authorization request.
1589
+ * @param {string} [clientId] REQUIRED, if the client is not authenticating with the authorization server.
1590
+ * @param {*} [options] Override http request option.
1591
+ * @throws {RequiredError}
1592
+ */
1593
+ oauth2Token: (grantType: string, code: string, redirectUri?: string, clientId?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
1533
1594
  /**
1534
1595
  * Issue verifiable credential using OIDC4VCI offer acceptance
1535
1596
  * @param {string} walletId
@@ -1812,6 +1873,29 @@ export declare const DefaultApiFp: (configuration?: Configuration) => {
1812
1873
  * @throws {RequiredError}
1813
1874
  */
1814
1875
  issuerCredentialTypesList(url: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<CredentialType>>>;
1876
+ /**
1877
+ *
1878
+ * @param {string} walletId
1879
+ * @param {string} scope
1880
+ * @param {string} clientId
1881
+ * @param {string} redirectUri
1882
+ * @param {string} responseType
1883
+ * @param {string} state
1884
+ * @param {string} nonce
1885
+ * @param {*} [options] Override http request option.
1886
+ * @throws {RequiredError}
1887
+ */
1888
+ oauth2Auth(walletId: string, scope: string, clientId: string, redirectUri: string, responseType: string, state: string, nonce: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Oauth2RedirectUriResponse>>;
1889
+ /**
1890
+ *
1891
+ * @param {string} grantType Value MUST be set to \\\&quot;authorization_code\\\&quot;.
1892
+ * @param {string} code The authorization code received from the.
1893
+ * @param {string} [redirectUri] REQUIRED, if the \\\&quot;redirect_uri\\\&quot; parameter was included in the authorization request.
1894
+ * @param {string} [clientId] REQUIRED, if the client is not authenticating with the authorization server.
1895
+ * @param {*} [options] Override http request option.
1896
+ * @throws {RequiredError}
1897
+ */
1898
+ oauth2Token(grantType: string, code: string, redirectUri?: string, clientId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Oauth2AccessTokenResponse>>;
1815
1899
  /**
1816
1900
  * Issue verifiable credential using OIDC4VCI offer acceptance
1817
1901
  * @param {string} walletId
@@ -2094,6 +2178,29 @@ export declare const DefaultApiFactory: (configuration?: Configuration, basePath
2094
2178
  * @throws {RequiredError}
2095
2179
  */
2096
2180
  issuerCredentialTypesList(url: string, options?: any): AxiosPromise<Array<CredentialType>>;
2181
+ /**
2182
+ *
2183
+ * @param {string} walletId
2184
+ * @param {string} scope
2185
+ * @param {string} clientId
2186
+ * @param {string} redirectUri
2187
+ * @param {string} responseType
2188
+ * @param {string} state
2189
+ * @param {string} nonce
2190
+ * @param {*} [options] Override http request option.
2191
+ * @throws {RequiredError}
2192
+ */
2193
+ oauth2Auth(walletId: string, scope: string, clientId: string, redirectUri: string, responseType: string, state: string, nonce: string, options?: any): AxiosPromise<Oauth2RedirectUriResponse>;
2194
+ /**
2195
+ *
2196
+ * @param {string} grantType Value MUST be set to \\\&quot;authorization_code\\\&quot;.
2197
+ * @param {string} code The authorization code received from the.
2198
+ * @param {string} [redirectUri] REQUIRED, if the \\\&quot;redirect_uri\\\&quot; parameter was included in the authorization request.
2199
+ * @param {string} [clientId] REQUIRED, if the client is not authenticating with the authorization server.
2200
+ * @param {*} [options] Override http request option.
2201
+ * @throws {RequiredError}
2202
+ */
2203
+ oauth2Token(grantType: string, code: string, redirectUri?: string, clientId?: string, options?: any): AxiosPromise<Oauth2AccessTokenResponse>;
2097
2204
  /**
2098
2205
  * Issue verifiable credential using OIDC4VCI offer acceptance
2099
2206
  * @param {string} walletId
@@ -2394,6 +2501,31 @@ export declare class DefaultApi extends BaseAPI {
2394
2501
  * @memberof DefaultApi
2395
2502
  */
2396
2503
  issuerCredentialTypesList(url: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<CredentialType[], any>>;
2504
+ /**
2505
+ *
2506
+ * @param {string} walletId
2507
+ * @param {string} scope
2508
+ * @param {string} clientId
2509
+ * @param {string} redirectUri
2510
+ * @param {string} responseType
2511
+ * @param {string} state
2512
+ * @param {string} nonce
2513
+ * @param {*} [options] Override http request option.
2514
+ * @throws {RequiredError}
2515
+ * @memberof DefaultApi
2516
+ */
2517
+ oauth2Auth(walletId: string, scope: string, clientId: string, redirectUri: string, responseType: string, state: string, nonce: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Oauth2RedirectUriResponse, any>>;
2518
+ /**
2519
+ *
2520
+ * @param {string} grantType Value MUST be set to \\\&quot;authorization_code\\\&quot;.
2521
+ * @param {string} code The authorization code received from the.
2522
+ * @param {string} [redirectUri] REQUIRED, if the \\\&quot;redirect_uri\\\&quot; parameter was included in the authorization request.
2523
+ * @param {string} [clientId] REQUIRED, if the client is not authenticating with the authorization server.
2524
+ * @param {*} [options] Override http request option.
2525
+ * @throws {RequiredError}
2526
+ * @memberof DefaultApi
2527
+ */
2528
+ oauth2Token(grantType: string, code: string, redirectUri?: string, clientId?: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Oauth2AccessTokenResponse, any>>;
2397
2529
  /**
2398
2530
  * Issue verifiable credential using OIDC4VCI offer acceptance
2399
2531
  * @param {string} walletId
package/api.js CHANGED
@@ -663,6 +663,125 @@ const DefaultApiAxiosParamCreator = function (configuration) {
663
663
  options: localVarRequestOptions,
664
664
  };
665
665
  }),
666
+ /**
667
+ *
668
+ * @param {string} walletId
669
+ * @param {string} scope
670
+ * @param {string} clientId
671
+ * @param {string} redirectUri
672
+ * @param {string} responseType
673
+ * @param {string} state
674
+ * @param {string} nonce
675
+ * @param {*} [options] Override http request option.
676
+ * @throws {RequiredError}
677
+ */
678
+ oauth2Auth: (walletId, scope, clientId, redirectUri, responseType, state, nonce, options = {}) => __awaiter(this, void 0, void 0, function* () {
679
+ // verify required parameter 'walletId' is not null or undefined
680
+ (0, common_1.assertParamExists)('oauth2Auth', 'walletId', walletId);
681
+ // verify required parameter 'scope' is not null or undefined
682
+ (0, common_1.assertParamExists)('oauth2Auth', 'scope', scope);
683
+ // verify required parameter 'clientId' is not null or undefined
684
+ (0, common_1.assertParamExists)('oauth2Auth', 'clientId', clientId);
685
+ // verify required parameter 'redirectUri' is not null or undefined
686
+ (0, common_1.assertParamExists)('oauth2Auth', 'redirectUri', redirectUri);
687
+ // verify required parameter 'responseType' is not null or undefined
688
+ (0, common_1.assertParamExists)('oauth2Auth', 'responseType', responseType);
689
+ // verify required parameter 'state' is not null or undefined
690
+ (0, common_1.assertParamExists)('oauth2Auth', 'state', state);
691
+ // verify required parameter 'nonce' is not null or undefined
692
+ (0, common_1.assertParamExists)('oauth2Auth', 'nonce', nonce);
693
+ const localVarPath = `/oauth2/auth`;
694
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
695
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
696
+ let baseOptions;
697
+ if (configuration) {
698
+ baseOptions = configuration.baseOptions;
699
+ }
700
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
701
+ const localVarHeaderParameter = {};
702
+ const localVarQueryParameter = {};
703
+ const localVarFormParams = new URLSearchParams();
704
+ // authentication accessToken required
705
+ // http bearer authentication required
706
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
707
+ if (walletId != null) {
708
+ localVarHeaderParameter['wallet-id'] = String(walletId);
709
+ }
710
+ if (scope !== undefined) {
711
+ localVarFormParams.set('scope', scope);
712
+ }
713
+ if (clientId !== undefined) {
714
+ localVarFormParams.set('client_id', clientId);
715
+ }
716
+ if (redirectUri !== undefined) {
717
+ localVarFormParams.set('redirect_uri', redirectUri);
718
+ }
719
+ if (responseType !== undefined) {
720
+ localVarFormParams.set('response_type', responseType);
721
+ }
722
+ if (state !== undefined) {
723
+ localVarFormParams.set('state', state);
724
+ }
725
+ if (nonce !== undefined) {
726
+ localVarFormParams.set('nonce', nonce);
727
+ }
728
+ localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';
729
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
730
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
731
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
732
+ localVarRequestOptions.data = localVarFormParams.toString();
733
+ return {
734
+ url: (0, common_1.toPathString)(localVarUrlObj),
735
+ options: localVarRequestOptions,
736
+ };
737
+ }),
738
+ /**
739
+ *
740
+ * @param {string} grantType Value MUST be set to \\\&quot;authorization_code\\\&quot;.
741
+ * @param {string} code The authorization code received from the.
742
+ * @param {string} [redirectUri] REQUIRED, if the \\\&quot;redirect_uri\\\&quot; parameter was included in the authorization request.
743
+ * @param {string} [clientId] REQUIRED, if the client is not authenticating with the authorization server.
744
+ * @param {*} [options] Override http request option.
745
+ * @throws {RequiredError}
746
+ */
747
+ oauth2Token: (grantType, code, redirectUri, clientId, options = {}) => __awaiter(this, void 0, void 0, function* () {
748
+ // verify required parameter 'grantType' is not null or undefined
749
+ (0, common_1.assertParamExists)('oauth2Token', 'grantType', grantType);
750
+ // verify required parameter 'code' is not null or undefined
751
+ (0, common_1.assertParamExists)('oauth2Token', 'code', code);
752
+ const localVarPath = `/oauth2/token`;
753
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
754
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
755
+ let baseOptions;
756
+ if (configuration) {
757
+ baseOptions = configuration.baseOptions;
758
+ }
759
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
760
+ const localVarHeaderParameter = {};
761
+ const localVarQueryParameter = {};
762
+ const localVarFormParams = new URLSearchParams();
763
+ if (grantType !== undefined) {
764
+ localVarFormParams.set('grant_type', grantType);
765
+ }
766
+ if (code !== undefined) {
767
+ localVarFormParams.set('code', code);
768
+ }
769
+ if (redirectUri !== undefined) {
770
+ localVarFormParams.set('redirect_uri', redirectUri);
771
+ }
772
+ if (clientId !== undefined) {
773
+ localVarFormParams.set('client_id', clientId);
774
+ }
775
+ localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';
776
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
777
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
778
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
779
+ localVarRequestOptions.data = localVarFormParams.toString();
780
+ return {
781
+ url: (0, common_1.toPathString)(localVarUrlObj),
782
+ options: localVarRequestOptions,
783
+ };
784
+ }),
666
785
  /**
667
786
  * Issue verifiable credential using OIDC4VCI offer acceptance
668
787
  * @param {string} walletId
@@ -1581,6 +1700,45 @@ const DefaultApiFp = function (configuration) {
1581
1700
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1582
1701
  });
1583
1702
  },
1703
+ /**
1704
+ *
1705
+ * @param {string} walletId
1706
+ * @param {string} scope
1707
+ * @param {string} clientId
1708
+ * @param {string} redirectUri
1709
+ * @param {string} responseType
1710
+ * @param {string} state
1711
+ * @param {string} nonce
1712
+ * @param {*} [options] Override http request option.
1713
+ * @throws {RequiredError}
1714
+ */
1715
+ oauth2Auth(walletId, scope, clientId, redirectUri, responseType, state, nonce, options) {
1716
+ var _a, _b, _c;
1717
+ return __awaiter(this, void 0, void 0, function* () {
1718
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.oauth2Auth(walletId, scope, clientId, redirectUri, responseType, state, nonce, options);
1719
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1720
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['DefaultApi.oauth2Auth']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1721
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1722
+ });
1723
+ },
1724
+ /**
1725
+ *
1726
+ * @param {string} grantType Value MUST be set to \\\&quot;authorization_code\\\&quot;.
1727
+ * @param {string} code The authorization code received from the.
1728
+ * @param {string} [redirectUri] REQUIRED, if the \\\&quot;redirect_uri\\\&quot; parameter was included in the authorization request.
1729
+ * @param {string} [clientId] REQUIRED, if the client is not authenticating with the authorization server.
1730
+ * @param {*} [options] Override http request option.
1731
+ * @throws {RequiredError}
1732
+ */
1733
+ oauth2Token(grantType, code, redirectUri, clientId, options) {
1734
+ var _a, _b, _c;
1735
+ return __awaiter(this, void 0, void 0, function* () {
1736
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.oauth2Token(grantType, code, redirectUri, clientId, options);
1737
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1738
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['DefaultApi.oauth2Token']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1739
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1740
+ });
1741
+ },
1584
1742
  /**
1585
1743
  * Issue verifiable credential using OIDC4VCI offer acceptance
1586
1744
  * @param {string} walletId
@@ -2051,6 +2209,33 @@ const DefaultApiFactory = function (configuration, basePath, axios) {
2051
2209
  issuerCredentialTypesList(url, options) {
2052
2210
  return localVarFp.issuerCredentialTypesList(url, options).then((request) => request(axios, basePath));
2053
2211
  },
2212
+ /**
2213
+ *
2214
+ * @param {string} walletId
2215
+ * @param {string} scope
2216
+ * @param {string} clientId
2217
+ * @param {string} redirectUri
2218
+ * @param {string} responseType
2219
+ * @param {string} state
2220
+ * @param {string} nonce
2221
+ * @param {*} [options] Override http request option.
2222
+ * @throws {RequiredError}
2223
+ */
2224
+ oauth2Auth(walletId, scope, clientId, redirectUri, responseType, state, nonce, options) {
2225
+ return localVarFp.oauth2Auth(walletId, scope, clientId, redirectUri, responseType, state, nonce, options).then((request) => request(axios, basePath));
2226
+ },
2227
+ /**
2228
+ *
2229
+ * @param {string} grantType Value MUST be set to \\\&quot;authorization_code\\\&quot;.
2230
+ * @param {string} code The authorization code received from the.
2231
+ * @param {string} [redirectUri] REQUIRED, if the \\\&quot;redirect_uri\\\&quot; parameter was included in the authorization request.
2232
+ * @param {string} [clientId] REQUIRED, if the client is not authenticating with the authorization server.
2233
+ * @param {*} [options] Override http request option.
2234
+ * @throws {RequiredError}
2235
+ */
2236
+ oauth2Token(grantType, code, redirectUri, clientId, options) {
2237
+ return localVarFp.oauth2Token(grantType, code, redirectUri, clientId, options).then((request) => request(axios, basePath));
2238
+ },
2054
2239
  /**
2055
2240
  * Issue verifiable credential using OIDC4VCI offer acceptance
2056
2241
  * @param {string} walletId
@@ -2423,6 +2608,35 @@ class DefaultApi extends base_1.BaseAPI {
2423
2608
  issuerCredentialTypesList(url, options) {
2424
2609
  return (0, exports.DefaultApiFp)(this.configuration).issuerCredentialTypesList(url, options).then((request) => request(this.axios, this.basePath));
2425
2610
  }
2611
+ /**
2612
+ *
2613
+ * @param {string} walletId
2614
+ * @param {string} scope
2615
+ * @param {string} clientId
2616
+ * @param {string} redirectUri
2617
+ * @param {string} responseType
2618
+ * @param {string} state
2619
+ * @param {string} nonce
2620
+ * @param {*} [options] Override http request option.
2621
+ * @throws {RequiredError}
2622
+ * @memberof DefaultApi
2623
+ */
2624
+ oauth2Auth(walletId, scope, clientId, redirectUri, responseType, state, nonce, options) {
2625
+ return (0, exports.DefaultApiFp)(this.configuration).oauth2Auth(walletId, scope, clientId, redirectUri, responseType, state, nonce, options).then((request) => request(this.axios, this.basePath));
2626
+ }
2627
+ /**
2628
+ *
2629
+ * @param {string} grantType Value MUST be set to \\\&quot;authorization_code\\\&quot;.
2630
+ * @param {string} code The authorization code received from the.
2631
+ * @param {string} [redirectUri] REQUIRED, if the \\\&quot;redirect_uri\\\&quot; parameter was included in the authorization request.
2632
+ * @param {string} [clientId] REQUIRED, if the client is not authenticating with the authorization server.
2633
+ * @param {*} [options] Override http request option.
2634
+ * @throws {RequiredError}
2635
+ * @memberof DefaultApi
2636
+ */
2637
+ oauth2Token(grantType, code, redirectUri, clientId, options) {
2638
+ return (0, exports.DefaultApiFp)(this.configuration).oauth2Token(grantType, code, redirectUri, clientId, options).then((request) => request(this.axios, this.basePath));
2639
+ }
2426
2640
  /**
2427
2641
  * Issue verifiable credential using OIDC4VCI offer acceptance
2428
2642
  * @param {string} walletId
package/common.js CHANGED
@@ -135,10 +135,49 @@ const serializeDataIfNeeded = function (value, requestOptions, configuration) {
135
135
  ? configuration.isJsonMime(requestOptions.headers['Content-Type'])
136
136
  : nonString;
137
137
  return needsSerialization
138
- ? JSON.stringify(value !== undefined ? value : {})
138
+ ? JSON.stringify(value !== undefined ? convertMapsAndSetsToPlain(value) : {})
139
139
  : (value || "");
140
140
  };
141
141
  exports.serializeDataIfNeeded = serializeDataIfNeeded;
142
+ function convertMapsAndSetsToPlain(value) {
143
+ if (typeof Set === "undefined")
144
+ return value;
145
+ if (typeof Map === "undefined")
146
+ return value;
147
+ if (typeof value !== "object" || !value) {
148
+ return value;
149
+ }
150
+ if (value instanceof Set) {
151
+ return Array.from(value).map(item => convertMapsAndSetsToPlain(item));
152
+ }
153
+ if (value instanceof Map) {
154
+ const entries = [];
155
+ value.forEach((value, key) => {
156
+ entries.push([key, convertMapsAndSetsToPlain(value)]);
157
+ });
158
+ return objectFromEntries(entries);
159
+ }
160
+ if (Array.isArray(value)) {
161
+ return value.map(it => convertMapsAndSetsToPlain(it));
162
+ }
163
+ return objectFromEntries(objectEntries(value)
164
+ .map(([k, v]) => [k, convertMapsAndSetsToPlain(v)]));
165
+ }
166
+ /**
167
+ * Ponyfill for Object.entries
168
+ */
169
+ function objectEntries(object) {
170
+ return Object.keys(object).map(key => [key, object[key]]);
171
+ }
172
+ /**
173
+ * Ponyfill for Object.fromEntries
174
+ */
175
+ function objectFromEntries(entries) {
176
+ return [...entries].reduce((object, [key, val]) => {
177
+ object[key] = val;
178
+ return object;
179
+ }, {});
180
+ }
142
181
  /**
143
182
  *
144
183
  * @export
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@triveria/wallet",
3
3
  "private": false,
4
- "version": "0.0.116",
4
+ "version": "0.0.118",
5
5
  "description": "",
6
6
  "main": "index.js",
7
7
  "scripts": {