@visualizevalue/mint-app-base 0.1.40 → 0.1.42
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/package.json
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
<select class="select choose-mode" v-model="mode">
|
|
16
16
|
<option value="file" title="Data URI Encoded File Upload">DATA-URI</option>
|
|
17
17
|
<option value="ipfs" title="Interplanetary File System">IPFS</option>
|
|
18
|
+
<option value="ar" title="Arweave">ARWEAVE</option>
|
|
18
19
|
<option value="http" title="Hypertext Transfer Protocol" disabled>HTTP</option>
|
|
19
20
|
<option value="svg" title="Scalable Vector Graphic" disabled>SVG</option>
|
|
20
21
|
</select>
|
|
@@ -31,6 +32,7 @@
|
|
|
31
32
|
</p>
|
|
32
33
|
</div>
|
|
33
34
|
<FormInput v-else-if="mode === 'ipfs'" v-model="ipfsCid" placeholder="CID (qmx...)" prefix="ipfs://" required />
|
|
35
|
+
<FormInput v-else-if="mode === 'ar'" v-model="arTxId" placeholder="TX ID (frV...)" prefix="ar://" required />
|
|
34
36
|
|
|
35
37
|
<FormInput v-model="name" placeholder="Title" required />
|
|
36
38
|
<FormInput v-model="description" placeholder="Description" />
|
|
@@ -81,6 +83,8 @@ const collection = computed(() => props.collection)
|
|
|
81
83
|
|
|
82
84
|
const mode = ref('file')
|
|
83
85
|
const ipfsCid = ref('')
|
|
86
|
+
// TODO: Rework to plugin architecture. Or at least per renderer logic.
|
|
87
|
+
const arTxId= ref('')
|
|
84
88
|
const image = ref('')
|
|
85
89
|
const name = ref('')
|
|
86
90
|
const description = ref('')
|
|
@@ -104,12 +108,20 @@ watch(ipfsCid, () => {
|
|
|
104
108
|
image.value = ipfsToHttpURI(`ipfs://${validated}`)
|
|
105
109
|
}
|
|
106
110
|
})
|
|
111
|
+
watch(arTxId, () => {
|
|
112
|
+
image.value = `https://arweave.net/${arTxId.value}`
|
|
113
|
+
})
|
|
107
114
|
watch(mode, () => image.value = '')
|
|
108
115
|
|
|
109
116
|
const txFlow = ref()
|
|
110
117
|
const txFlowKey = ref(0)
|
|
111
118
|
const minting = ref(false)
|
|
112
119
|
const mint = async () => {
|
|
120
|
+
if (! image.value) {
|
|
121
|
+
alert(`Empty image data. Please try again.`)
|
|
122
|
+
return
|
|
123
|
+
}
|
|
124
|
+
|
|
113
125
|
const artifact = toByteArray(image.value)
|
|
114
126
|
const artifactChunks = chunkArray(artifact, 4)
|
|
115
127
|
const multiTransactionPrepare = artifactChunks.length > 1
|