@0xpolygonid/js-sdk 1.13.0 → 1.14.0
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.
- package/dist/browser/esm/index.js +56 -20
- package/dist/browser/esm/index.js.map +1 -1
- package/dist/browser/umd/index.js +55 -19
- package/dist/browser/umd/index.js.map +1 -1
- package/dist/node/cjs/iden3comm/handlers/fetch.js +26 -12
- package/dist/node/cjs/proof/common.js +17 -4
- package/dist/node/cjs/verifiable/constants.js +13 -4
- package/dist/node/esm/iden3comm/handlers/fetch.js +26 -12
- package/dist/node/esm/proof/common.js +17 -4
- package/dist/node/esm/verifiable/constants.js +12 -3
- package/dist/types/iden3comm/types/protocol/credentials.d.ts +3 -3
- package/dist/types/iden3comm/types/protocol/payment.d.ts +3 -2
- package/dist/types/verifiable/constants.d.ts +11 -3
- package/package.json +1 -1
|
@@ -57,9 +57,17 @@ class FetchHandler extends message_handler_1.AbstractMessageHandler {
|
|
|
57
57
|
}
|
|
58
58
|
async handle(message, ctx) {
|
|
59
59
|
switch (message.type) {
|
|
60
|
-
case constants_2.PROTOCOL_MESSAGE_TYPE.CREDENTIAL_OFFER_MESSAGE_TYPE:
|
|
61
|
-
await this.handleOfferMessage(message, ctx);
|
|
62
|
-
|
|
60
|
+
case constants_2.PROTOCOL_MESSAGE_TYPE.CREDENTIAL_OFFER_MESSAGE_TYPE: {
|
|
61
|
+
const result = await this.handleOfferMessage(message, ctx);
|
|
62
|
+
if (Array.isArray(result)) {
|
|
63
|
+
const credWallet = this.opts?.credentialWallet;
|
|
64
|
+
if (!credWallet)
|
|
65
|
+
throw new Error('Credential wallet is not provided');
|
|
66
|
+
await credWallet.saveAll(result);
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
return result;
|
|
70
|
+
}
|
|
63
71
|
case constants_2.PROTOCOL_MESSAGE_TYPE.CREDENTIAL_FETCH_REQUEST_MESSAGE_TYPE:
|
|
64
72
|
return this.handleFetchRequest(message);
|
|
65
73
|
case constants_2.PROTOCOL_MESSAGE_TYPE.CREDENTIAL_ISSUANCE_RESPONSE_MESSAGE_TYPE:
|
|
@@ -73,8 +81,7 @@ class FetchHandler extends message_handler_1.AbstractMessageHandler {
|
|
|
73
81
|
ctx.mediaType = constants_1.MediaType.ZKPMessage;
|
|
74
82
|
}
|
|
75
83
|
const credentials = [];
|
|
76
|
-
for (
|
|
77
|
-
const credentialInfo = offerMessage.body.credentials[index];
|
|
84
|
+
for (const credentialInfo of offerMessage.body.credentials) {
|
|
78
85
|
const guid = uuid.v4();
|
|
79
86
|
const fetchRequest = {
|
|
80
87
|
id: guid,
|
|
@@ -98,7 +105,6 @@ class FetchHandler extends message_handler_1.AbstractMessageHandler {
|
|
|
98
105
|
senderDID,
|
|
99
106
|
...packerOpts
|
|
100
107
|
}));
|
|
101
|
-
let message;
|
|
102
108
|
try {
|
|
103
109
|
if (!offerMessage?.body?.url) {
|
|
104
110
|
throw new Error(`could not fetch W3C credential, body url is missing`);
|
|
@@ -111,14 +117,18 @@ class FetchHandler extends message_handler_1.AbstractMessageHandler {
|
|
|
111
117
|
},
|
|
112
118
|
body: token
|
|
113
119
|
});
|
|
114
|
-
|
|
115
|
-
|
|
120
|
+
const arrayBuffer = await resp.arrayBuffer();
|
|
121
|
+
if (!arrayBuffer.byteLength) {
|
|
122
|
+
throw new Error(`could not fetch , ${credentialInfo?.id}, response is empty`);
|
|
123
|
+
}
|
|
124
|
+
const { unpackedMessage: message } = await this._packerMgr.unpack(new Uint8Array(arrayBuffer));
|
|
125
|
+
if (message.type !== constants_2.PROTOCOL_MESSAGE_TYPE.CREDENTIAL_ISSUANCE_RESPONSE_MESSAGE_TYPE) {
|
|
126
|
+
return message;
|
|
116
127
|
}
|
|
117
|
-
message = await resp.json();
|
|
118
128
|
credentials.push(verifiable_1.W3CCredential.fromJSON(message.body.credential));
|
|
119
129
|
}
|
|
120
130
|
catch (e) {
|
|
121
|
-
throw new Error(`could not fetch
|
|
131
|
+
throw new Error(`could not fetch protocol message for credential offer id: , ${credentialInfo?.id}, error: ${e.message ?? e}`);
|
|
122
132
|
}
|
|
123
133
|
}
|
|
124
134
|
return credentials;
|
|
@@ -137,11 +147,15 @@ class FetchHandler extends message_handler_1.AbstractMessageHandler {
|
|
|
137
147
|
throw new Error(`jws packer options are required for ${constants_1.MediaType.SignedMessage}`);
|
|
138
148
|
}
|
|
139
149
|
const offerMessage = await FetchHandler.unpackMessage(this._packerMgr, offer, constants_2.PROTOCOL_MESSAGE_TYPE.CREDENTIAL_OFFER_MESSAGE_TYPE);
|
|
140
|
-
|
|
150
|
+
const result = await this.handleOfferMessage(offerMessage, {
|
|
141
151
|
mediaType: opts?.mediaType,
|
|
142
152
|
headers: opts?.headers,
|
|
143
153
|
packerOptions: opts?.packerOptions
|
|
144
154
|
});
|
|
155
|
+
if (Array.isArray(result)) {
|
|
156
|
+
return result;
|
|
157
|
+
}
|
|
158
|
+
throw new Error('invalid protocol message response');
|
|
145
159
|
}
|
|
146
160
|
async handleFetchRequest(msgRequest) {
|
|
147
161
|
if (!msgRequest.to) {
|
|
@@ -154,7 +168,7 @@ class FetchHandler extends message_handler_1.AbstractMessageHandler {
|
|
|
154
168
|
const userDID = js_iden3_core_1.DID.parse(msgRequest.from);
|
|
155
169
|
const credId = msgRequest.body?.id;
|
|
156
170
|
if (!credId) {
|
|
157
|
-
throw new Error('
|
|
171
|
+
throw new Error('invalid credential id in fetch request body');
|
|
158
172
|
}
|
|
159
173
|
if (!this.opts?.credentialWallet) {
|
|
160
174
|
throw new Error('please, provide credential wallet in options');
|
|
@@ -129,10 +129,23 @@ const parseQueryMetadata = async (propertyQuery, ldContextJSON, credentialType,
|
|
|
129
129
|
if (!(0, circuits_1.isValidOperation)(query.datatype, propertyQuery.operator)) {
|
|
130
130
|
throw new Error(`operator ${propertyQuery.operator} is not supported for datatype ${query.datatype}`);
|
|
131
131
|
}
|
|
132
|
-
|
|
133
|
-
propertyQuery.
|
|
134
|
-
|
|
135
|
-
|
|
132
|
+
if ((propertyQuery.operator === circuits_1.Operators.NOOP || propertyQuery.operator === circuits_1.Operators.SD) &&
|
|
133
|
+
propertyQuery.operatorValue) {
|
|
134
|
+
throw new Error(`operator value should be undefined for ${propertyQuery.operator} operator`);
|
|
135
|
+
}
|
|
136
|
+
let values;
|
|
137
|
+
switch (propertyQuery.operator) {
|
|
138
|
+
case circuits_1.Operators.NOOP:
|
|
139
|
+
case circuits_1.Operators.SD:
|
|
140
|
+
values = [];
|
|
141
|
+
break;
|
|
142
|
+
case circuits_1.Operators.EXISTS:
|
|
143
|
+
values = transformExistsValue(propertyQuery.operatorValue);
|
|
144
|
+
break;
|
|
145
|
+
default:
|
|
146
|
+
values = await (0, exports.transformQueryValueToBigInts)(propertyQuery.operatorValue, query.datatype);
|
|
147
|
+
}
|
|
148
|
+
query.values = values;
|
|
136
149
|
}
|
|
137
150
|
return query;
|
|
138
151
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PaymentType = exports.PaymentRequestDataType = exports.PaymentRequestType = exports.RefreshServiceType = exports.SubjectPosition = exports.MerklizedRootPosition = exports.ProofPurpose = exports.CredentialStatusType = exports.ProofType = exports.VerifiableConstants = void 0;
|
|
3
|
+
exports.SupportedCurrencies = exports.PaymentType = exports.PaymentRequestDataType = exports.PaymentRequestType = exports.RefreshServiceType = exports.SubjectPosition = exports.MerklizedRootPosition = exports.ProofPurpose = exports.CredentialStatusType = exports.ProofType = exports.VerifiableConstants = void 0;
|
|
4
4
|
/** Verifiable constants */
|
|
5
5
|
exports.VerifiableConstants = Object.freeze({
|
|
6
6
|
ERRORS: {
|
|
@@ -115,7 +115,7 @@ var RefreshServiceType;
|
|
|
115
115
|
})(RefreshServiceType = exports.RefreshServiceType || (exports.RefreshServiceType = {}));
|
|
116
116
|
/**
|
|
117
117
|
* PaymentRequestType type for payment requests
|
|
118
|
-
*
|
|
118
|
+
* @beta
|
|
119
119
|
* @enum {string}
|
|
120
120
|
*/
|
|
121
121
|
var PaymentRequestType;
|
|
@@ -124,7 +124,7 @@ var PaymentRequestType;
|
|
|
124
124
|
})(PaymentRequestType = exports.PaymentRequestType || (exports.PaymentRequestType = {}));
|
|
125
125
|
/**
|
|
126
126
|
* PaymentRequestDataType type for payment requests
|
|
127
|
-
*
|
|
127
|
+
* @beta
|
|
128
128
|
* @enum {string}
|
|
129
129
|
*/
|
|
130
130
|
var PaymentRequestDataType;
|
|
@@ -133,10 +133,19 @@ var PaymentRequestDataType;
|
|
|
133
133
|
})(PaymentRequestDataType = exports.PaymentRequestDataType || (exports.PaymentRequestDataType = {}));
|
|
134
134
|
/**
|
|
135
135
|
* PaymentType type for payment responses
|
|
136
|
-
*
|
|
136
|
+
* @beta
|
|
137
137
|
* @enum {string}
|
|
138
138
|
*/
|
|
139
139
|
var PaymentType;
|
|
140
140
|
(function (PaymentType) {
|
|
141
141
|
PaymentType["Iden3PaymentCryptoV1"] = "Iden3PaymentCryptoV1";
|
|
142
142
|
})(PaymentType = exports.PaymentType || (exports.PaymentType = {}));
|
|
143
|
+
/**
|
|
144
|
+
* Media types for Payment supported currencies
|
|
145
|
+
* @beta
|
|
146
|
+
* @enum {number}
|
|
147
|
+
*/
|
|
148
|
+
var SupportedCurrencies;
|
|
149
|
+
(function (SupportedCurrencies) {
|
|
150
|
+
SupportedCurrencies["ETH"] = "ETH";
|
|
151
|
+
})(SupportedCurrencies = exports.SupportedCurrencies || (exports.SupportedCurrencies = {}));
|
|
@@ -31,9 +31,17 @@ export class FetchHandler extends AbstractMessageHandler {
|
|
|
31
31
|
}
|
|
32
32
|
async handle(message, ctx) {
|
|
33
33
|
switch (message.type) {
|
|
34
|
-
case PROTOCOL_MESSAGE_TYPE.CREDENTIAL_OFFER_MESSAGE_TYPE:
|
|
35
|
-
await this.handleOfferMessage(message, ctx);
|
|
36
|
-
|
|
34
|
+
case PROTOCOL_MESSAGE_TYPE.CREDENTIAL_OFFER_MESSAGE_TYPE: {
|
|
35
|
+
const result = await this.handleOfferMessage(message, ctx);
|
|
36
|
+
if (Array.isArray(result)) {
|
|
37
|
+
const credWallet = this.opts?.credentialWallet;
|
|
38
|
+
if (!credWallet)
|
|
39
|
+
throw new Error('Credential wallet is not provided');
|
|
40
|
+
await credWallet.saveAll(result);
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
return result;
|
|
44
|
+
}
|
|
37
45
|
case PROTOCOL_MESSAGE_TYPE.CREDENTIAL_FETCH_REQUEST_MESSAGE_TYPE:
|
|
38
46
|
return this.handleFetchRequest(message);
|
|
39
47
|
case PROTOCOL_MESSAGE_TYPE.CREDENTIAL_ISSUANCE_RESPONSE_MESSAGE_TYPE:
|
|
@@ -47,8 +55,7 @@ export class FetchHandler extends AbstractMessageHandler {
|
|
|
47
55
|
ctx.mediaType = MediaType.ZKPMessage;
|
|
48
56
|
}
|
|
49
57
|
const credentials = [];
|
|
50
|
-
for (
|
|
51
|
-
const credentialInfo = offerMessage.body.credentials[index];
|
|
58
|
+
for (const credentialInfo of offerMessage.body.credentials) {
|
|
52
59
|
const guid = uuid.v4();
|
|
53
60
|
const fetchRequest = {
|
|
54
61
|
id: guid,
|
|
@@ -72,7 +79,6 @@ export class FetchHandler extends AbstractMessageHandler {
|
|
|
72
79
|
senderDID,
|
|
73
80
|
...packerOpts
|
|
74
81
|
}));
|
|
75
|
-
let message;
|
|
76
82
|
try {
|
|
77
83
|
if (!offerMessage?.body?.url) {
|
|
78
84
|
throw new Error(`could not fetch W3C credential, body url is missing`);
|
|
@@ -85,14 +91,18 @@ export class FetchHandler extends AbstractMessageHandler {
|
|
|
85
91
|
},
|
|
86
92
|
body: token
|
|
87
93
|
});
|
|
88
|
-
|
|
89
|
-
|
|
94
|
+
const arrayBuffer = await resp.arrayBuffer();
|
|
95
|
+
if (!arrayBuffer.byteLength) {
|
|
96
|
+
throw new Error(`could not fetch , ${credentialInfo?.id}, response is empty`);
|
|
97
|
+
}
|
|
98
|
+
const { unpackedMessage: message } = await this._packerMgr.unpack(new Uint8Array(arrayBuffer));
|
|
99
|
+
if (message.type !== PROTOCOL_MESSAGE_TYPE.CREDENTIAL_ISSUANCE_RESPONSE_MESSAGE_TYPE) {
|
|
100
|
+
return message;
|
|
90
101
|
}
|
|
91
|
-
message = await resp.json();
|
|
92
102
|
credentials.push(W3CCredential.fromJSON(message.body.credential));
|
|
93
103
|
}
|
|
94
104
|
catch (e) {
|
|
95
|
-
throw new Error(`could not fetch
|
|
105
|
+
throw new Error(`could not fetch protocol message for credential offer id: , ${credentialInfo?.id}, error: ${e.message ?? e}`);
|
|
96
106
|
}
|
|
97
107
|
}
|
|
98
108
|
return credentials;
|
|
@@ -111,11 +121,15 @@ export class FetchHandler extends AbstractMessageHandler {
|
|
|
111
121
|
throw new Error(`jws packer options are required for ${MediaType.SignedMessage}`);
|
|
112
122
|
}
|
|
113
123
|
const offerMessage = await FetchHandler.unpackMessage(this._packerMgr, offer, PROTOCOL_MESSAGE_TYPE.CREDENTIAL_OFFER_MESSAGE_TYPE);
|
|
114
|
-
|
|
124
|
+
const result = await this.handleOfferMessage(offerMessage, {
|
|
115
125
|
mediaType: opts?.mediaType,
|
|
116
126
|
headers: opts?.headers,
|
|
117
127
|
packerOptions: opts?.packerOptions
|
|
118
128
|
});
|
|
129
|
+
if (Array.isArray(result)) {
|
|
130
|
+
return result;
|
|
131
|
+
}
|
|
132
|
+
throw new Error('invalid protocol message response');
|
|
119
133
|
}
|
|
120
134
|
async handleFetchRequest(msgRequest) {
|
|
121
135
|
if (!msgRequest.to) {
|
|
@@ -128,7 +142,7 @@ export class FetchHandler extends AbstractMessageHandler {
|
|
|
128
142
|
const userDID = DID.parse(msgRequest.from);
|
|
129
143
|
const credId = msgRequest.body?.id;
|
|
130
144
|
if (!credId) {
|
|
131
|
-
throw new Error('
|
|
145
|
+
throw new Error('invalid credential id in fetch request body');
|
|
132
146
|
}
|
|
133
147
|
if (!this.opts?.credentialWallet) {
|
|
134
148
|
throw new Error('please, provide credential wallet in options');
|
|
@@ -123,10 +123,23 @@ export const parseQueryMetadata = async (propertyQuery, ldContextJSON, credentia
|
|
|
123
123
|
if (!isValidOperation(query.datatype, propertyQuery.operator)) {
|
|
124
124
|
throw new Error(`operator ${propertyQuery.operator} is not supported for datatype ${query.datatype}`);
|
|
125
125
|
}
|
|
126
|
-
|
|
127
|
-
propertyQuery.
|
|
128
|
-
|
|
129
|
-
|
|
126
|
+
if ((propertyQuery.operator === Operators.NOOP || propertyQuery.operator === Operators.SD) &&
|
|
127
|
+
propertyQuery.operatorValue) {
|
|
128
|
+
throw new Error(`operator value should be undefined for ${propertyQuery.operator} operator`);
|
|
129
|
+
}
|
|
130
|
+
let values;
|
|
131
|
+
switch (propertyQuery.operator) {
|
|
132
|
+
case Operators.NOOP:
|
|
133
|
+
case Operators.SD:
|
|
134
|
+
values = [];
|
|
135
|
+
break;
|
|
136
|
+
case Operators.EXISTS:
|
|
137
|
+
values = transformExistsValue(propertyQuery.operatorValue);
|
|
138
|
+
break;
|
|
139
|
+
default:
|
|
140
|
+
values = await transformQueryValueToBigInts(propertyQuery.operatorValue, query.datatype);
|
|
141
|
+
}
|
|
142
|
+
query.values = values;
|
|
130
143
|
}
|
|
131
144
|
return query;
|
|
132
145
|
};
|
|
@@ -112,7 +112,7 @@ export var RefreshServiceType;
|
|
|
112
112
|
})(RefreshServiceType || (RefreshServiceType = {}));
|
|
113
113
|
/**
|
|
114
114
|
* PaymentRequestType type for payment requests
|
|
115
|
-
*
|
|
115
|
+
* @beta
|
|
116
116
|
* @enum {string}
|
|
117
117
|
*/
|
|
118
118
|
export var PaymentRequestType;
|
|
@@ -121,7 +121,7 @@ export var PaymentRequestType;
|
|
|
121
121
|
})(PaymentRequestType || (PaymentRequestType = {}));
|
|
122
122
|
/**
|
|
123
123
|
* PaymentRequestDataType type for payment requests
|
|
124
|
-
*
|
|
124
|
+
* @beta
|
|
125
125
|
* @enum {string}
|
|
126
126
|
*/
|
|
127
127
|
export var PaymentRequestDataType;
|
|
@@ -130,10 +130,19 @@ export var PaymentRequestDataType;
|
|
|
130
130
|
})(PaymentRequestDataType || (PaymentRequestDataType = {}));
|
|
131
131
|
/**
|
|
132
132
|
* PaymentType type for payment responses
|
|
133
|
-
*
|
|
133
|
+
* @beta
|
|
134
134
|
* @enum {string}
|
|
135
135
|
*/
|
|
136
136
|
export var PaymentType;
|
|
137
137
|
(function (PaymentType) {
|
|
138
138
|
PaymentType["Iden3PaymentCryptoV1"] = "Iden3PaymentCryptoV1";
|
|
139
139
|
})(PaymentType || (PaymentType = {}));
|
|
140
|
+
/**
|
|
141
|
+
* Media types for Payment supported currencies
|
|
142
|
+
* @beta
|
|
143
|
+
* @enum {number}
|
|
144
|
+
*/
|
|
145
|
+
export var SupportedCurrencies;
|
|
146
|
+
(function (SupportedCurrencies) {
|
|
147
|
+
SupportedCurrencies["ETH"] = "ETH";
|
|
148
|
+
})(SupportedCurrencies || (SupportedCurrencies = {}));
|
|
@@ -18,7 +18,7 @@ export type CredentialsOfferMessage = Required<BasicMessage> & {
|
|
|
18
18
|
/** CredentialsOfferMessageBody is struct the represents offer message */
|
|
19
19
|
export type CredentialsOfferMessageBody = {
|
|
20
20
|
url: string;
|
|
21
|
-
credentials:
|
|
21
|
+
credentials: CredentialOffer[];
|
|
22
22
|
};
|
|
23
23
|
/** CredentialsOnchainOfferMessage represent Iden3message for credential onhcain offer message */
|
|
24
24
|
export type CredentialsOnchainOfferMessage = Required<BasicMessage> & {
|
|
@@ -26,7 +26,7 @@ export type CredentialsOnchainOfferMessage = Required<BasicMessage> & {
|
|
|
26
26
|
};
|
|
27
27
|
/** CredentialsOnchainOfferMessageBody is struct the represents onchain offer message body */
|
|
28
28
|
export type CredentialsOnchainOfferMessageBody = {
|
|
29
|
-
credentials:
|
|
29
|
+
credentials: CredentialOffer[];
|
|
30
30
|
transaction_data: ContractInvokeTransactionData;
|
|
31
31
|
};
|
|
32
32
|
/** CredentialOffer is structure to fetch credential */
|
|
@@ -36,7 +36,7 @@ export type CredentialOffer = {
|
|
|
36
36
|
};
|
|
37
37
|
/** CredentialIssuanceMessage represent Iden3message for credential issuance */
|
|
38
38
|
export type CredentialIssuanceMessage = Required<BasicMessage> & {
|
|
39
|
-
body
|
|
39
|
+
body: IssuanceMessageBody;
|
|
40
40
|
};
|
|
41
41
|
/** IssuanceMessageBody is struct the represents message when credential is issued */
|
|
42
42
|
export type IssuanceMessageBody = {
|
|
@@ -17,8 +17,8 @@ export type PaymentRequestInfo = {
|
|
|
17
17
|
}[];
|
|
18
18
|
type: PaymentRequestType;
|
|
19
19
|
data: PaymentRequestDataInfo;
|
|
20
|
-
expiration
|
|
21
|
-
description
|
|
20
|
+
expiration?: string;
|
|
21
|
+
description?: string;
|
|
22
22
|
};
|
|
23
23
|
/** @beta PaymentRequestDataInfo is struct the represents payment data info for payment-request */
|
|
24
24
|
export type PaymentRequestDataInfo = {
|
|
@@ -27,6 +27,7 @@ export type PaymentRequestDataInfo = {
|
|
|
27
27
|
id: number;
|
|
28
28
|
chainId: number;
|
|
29
29
|
address: string;
|
|
30
|
+
currency: string;
|
|
30
31
|
signature?: string;
|
|
31
32
|
};
|
|
32
33
|
/** @beta PaymentMessage is struct the represents payment message */
|
|
@@ -87,7 +87,7 @@ export declare enum RefreshServiceType {
|
|
|
87
87
|
}
|
|
88
88
|
/**
|
|
89
89
|
* PaymentRequestType type for payment requests
|
|
90
|
-
*
|
|
90
|
+
* @beta
|
|
91
91
|
* @enum {string}
|
|
92
92
|
*/
|
|
93
93
|
export declare enum PaymentRequestType {
|
|
@@ -95,7 +95,7 @@ export declare enum PaymentRequestType {
|
|
|
95
95
|
}
|
|
96
96
|
/**
|
|
97
97
|
* PaymentRequestDataType type for payment requests
|
|
98
|
-
*
|
|
98
|
+
* @beta
|
|
99
99
|
* @enum {string}
|
|
100
100
|
*/
|
|
101
101
|
export declare enum PaymentRequestDataType {
|
|
@@ -103,9 +103,17 @@ export declare enum PaymentRequestDataType {
|
|
|
103
103
|
}
|
|
104
104
|
/**
|
|
105
105
|
* PaymentType type for payment responses
|
|
106
|
-
*
|
|
106
|
+
* @beta
|
|
107
107
|
* @enum {string}
|
|
108
108
|
*/
|
|
109
109
|
export declare enum PaymentType {
|
|
110
110
|
Iden3PaymentCryptoV1 = "Iden3PaymentCryptoV1"
|
|
111
111
|
}
|
|
112
|
+
/**
|
|
113
|
+
* Media types for Payment supported currencies
|
|
114
|
+
* @beta
|
|
115
|
+
* @enum {number}
|
|
116
|
+
*/
|
|
117
|
+
export declare enum SupportedCurrencies {
|
|
118
|
+
ETH = "ETH"
|
|
119
|
+
}
|