尝试在本地计算机上为NEM创建multisig帐户但收到错误

问题描述 投票:0回答:1

大家好我试图从Buildfire中创建插件来创建NEM帐户并使用本地网络将其更改为multisig帐户(ei localhost)以下是所需内容的代码片段我想问天气有问题在json中制作JSON缺失位或我需要查找的任何其他错误时,我试图查找错误并且它是解决方案但没有遇到任何结果。我得到的错误是:

“错误:”内部服务器错误“消息:”属性事务的预期值,但未找到“状态:500”

let done = $.ajax({
        url: "http://127.0.0.1:7890/account/generate"
    }).done(function (data) {
        /// check you have data to report on
        ///if (data && data.list && data.list.length) {
            /// fill in the UI with the new data

        var report = data;
        PubKey = report.publicKey;
        PKey = report.privateKey;
        $('#address').text("Created Account");
            $('#balance').text(report.address);
            $('#summary').text(report.privateKey);
            $('#vested').text(report.publicKey)
        ///}
    });

var date = new Date();
            var TS = date.getTime();
            var xyz = {
                xyz: JSON.stringify({
                    "transaction":
                            {
                                "timeStamp": TS, ///needs to be changed to current timestamp from creating of account
                                "fee": 20, ///have to check
                                "type": 4097,
                                "deadline": TS + 30000, ///need to be changed
                                "version": -1744830462, /// main(real) network 1744830465,
                                "signer": PubKey,
                                "modifications": [
                                    {
                                        "modificationType": 1,
                                        "cosignatoryAccount": PbKey
                                    }
                                ],
                                "minCosignatories" : {
                                    "relativeChange": 1
                                }
                            },
                    "privateKey": PKey
                })
            };

fetch("http://127.0.0.1:7890/transaction/prepare-announce",{
                method : 'POST',
                headers : {
                    'Accept': 'application/json, text/plain, */*',
                    'Content-Type': 'application/json'
                },
                body : JSON.stringify(xyz)
            }).then(function (response) {
                return response.json();
            })
                    .then(function (result) {
                        alert(result);
                    }).catch (function (error) {
                        console.log('Request failed', error);
                    });
javascript html nem
1个回答
0
投票

你尝试过正常的交易吗?它看起来你不签署你的交易。并且不要在网络上找到您的私钥。

© www.soinside.com 2019 - 2024. All rights reserved.