wallet-connect-button-vue 1.0.9 → 1.0.10
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/index.esm.js +20 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +20 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -38,7 +38,7 @@ const _hoisted_2 = {
|
|
|
38
38
|
class: "attributes"
|
|
39
39
|
};
|
|
40
40
|
const _hoisted_3 = { class: "verification-card" };
|
|
41
|
-
const _hoisted_4 = ["text", "usecase", "start-url", "lang"];
|
|
41
|
+
const _hoisted_4 = ["text", "usecase", "start-url", "lang", "help-base-url", "same-device-ul", "cross-device-ul"];
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
const _sfc_main = {
|
|
@@ -49,7 +49,9 @@ const _sfc_main = {
|
|
|
49
49
|
onSuccess: { type: Function, required: true },
|
|
50
50
|
apiKey: { type: String, required: false },
|
|
51
51
|
walletConnectHost: { type: String, required: false },
|
|
52
|
-
lang: { type: String, required: false, default: 'nl' }
|
|
52
|
+
lang: { type: String, required: false, default: 'nl' },
|
|
53
|
+
helpBaseUrl: { type: String, required: false },
|
|
54
|
+
issuance: { type: Boolean, required: false }
|
|
53
55
|
},
|
|
54
56
|
setup(__props) {
|
|
55
57
|
|
|
@@ -66,6 +68,17 @@ const startUrl = computed(() => {
|
|
|
66
68
|
return `${baseUrl}/api/create-session?lang=en&return_url=${encodeURIComponent(returnUrl)}`;
|
|
67
69
|
});
|
|
68
70
|
|
|
71
|
+
const constructURI = (session_type) => {
|
|
72
|
+
const request_uri = `https://issuance.wallet-connect.eu/disclosure/${props.clientId}/request_uri?session_type=${session_type}`;
|
|
73
|
+
const request_uri_method = "post";
|
|
74
|
+
const client_id_uri = `${props.clientId}.example.com`;
|
|
75
|
+
|
|
76
|
+
return `walletdebuginteraction://wallet.edi.rijksoverheid.nl/disclosure_based_issuance?request_uri=${encodeURIComponent(request_uri)}&request_uri_method=${request_uri_method}&client_id=${client_id_uri}`;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
const sameDeviceUl = computed(() => constructURI("same_device"));
|
|
80
|
+
const crossDeviceUl = computed(() => constructURI("cross_device"));
|
|
81
|
+
|
|
69
82
|
const handleSuccess = (e) => {
|
|
70
83
|
const customEvent = e;
|
|
71
84
|
if (customEvent.detail && customEvent.detail.length > 1) {
|
|
@@ -162,9 +175,12 @@ return (_ctx, _cache) => {
|
|
|
162
175
|
ref_key: "buttonRef",
|
|
163
176
|
ref: buttonRef,
|
|
164
177
|
text: props.label,
|
|
165
|
-
usecase: __props.clientId,
|
|
178
|
+
usecase: props.issuance ? '' : __props.clientId,
|
|
166
179
|
"start-url": startUrl.value,
|
|
167
|
-
lang: props.lang
|
|
180
|
+
lang: props.lang,
|
|
181
|
+
"help-base-url": props.helpBaseUrl,
|
|
182
|
+
"same-device-ul": sameDeviceUl.value,
|
|
183
|
+
"cross-device-ul": crossDeviceUl.value
|
|
168
184
|
}, null, 8 /* PROPS */, _hoisted_4))
|
|
169
185
|
}
|
|
170
186
|
}
|