)
            }

            reader.addEventListener('load', readFile)
            reader.readAsArrayBuffer(file)
        })
    }

    async function bufferToSha256(buffer) {
        return window.crypto.subtle.digest('SHA-256', buffer)
    }

    async function fileToSha256Hex(file) {
        const buffer = await fileToArrayBuffer(file)
        const hash = await bufferToSha256(arrayBufferToBuffer(buffer))
        return hexString(hash)
    }

    function copyFundingAddress() {
        let copyText = doc