NFT數藏實物專案系統開發技術)(成熟原始碼)

Tg_StPv888發表於2023-02-20

 元宇宙本體論的“共享”可以透過標準化的形式表現,標準是在科學研究和理論實踐的基礎上,在一定範圍內經過協商一致獲得的最佳秩序。元宇宙的標準可分為基礎類、技術和平臺類、資料和協議類、內容和資產類、應用和服務類、治理和監管類等五大類。基礎類標準為其他標準建立共同的語言環境,包括術語、本體和分類、程式碼和標識、參考架構等內容。技術和平臺類標準主要規範技術系統的分散式網路、智慧計算、資料流動、資訊保安和隱私保護等I8O量化2857交易8624系統開發


//waxjs rpc例項,注意需要先login()

const wax = new waxjs.WaxJS({


    rpcEndpoint: '

});

const payer_name = "fuckpayforit"; //

const payer_private_key = "


//eosjs rpc例項

const rpc = new eosjs_jsonrpc.JsonRpc(');

const provider = new eosjs_jssig.JsSignatureProvider([payer_private_key]);

const api = new eosjs_api.Api({rpc: rpc, signatureProvider: provider});


//注意broadcast: false,

let transcation_args = await api.transact({


actions: [{

account: 'eosio.token',

name: 'transfer',

authorization: [

    {

        actor: payer_name,

        permission: "active",

    },

    {

        actor: wax.user.account,

        permission: "active",

    },

],

data: {

    from: wax.user.account,

    to: "consumer1111",

    quantity: '0.00010000 WAX',

    memo: 'by waxjs',

},

}],

}, {


blocksBehind: 3,

expireSeconds: 90,

sign: false,

broadcast: false,

});


//首先借助eosjs用【fuckpayforit】

let available_keys = await api.signatureProvider.getAvailableKeys();

let sign_args = {


chainId: api.chainId,

requiredKeys: available_keys,

serializedTransaction: transcation_args.serializedTransaction,

};

transcation_args = await api.signatureProvider.sign(sign_args);

const payer_signatures = transcation_args.signatures;


//

available_keys = await wax.api.signatureProvider.getAvailableKeys();

sign_args = {


chainId: api.chainId,

requiredKeys: available_keys,

serializedTransaction: transcation_args.serializedTransaction,

};

transcation_args = await wax.api.signatureProvider.sign(sign_args);


//合併簽名

transcation_args.signatures = payer_signatures.concat(transcation_args.signatures)


//最後,傳送該筆交易,用eosjs或者用waxjs來傳送都行,一樣的

const result = await api.pushSignedTransaction(transcation_args);


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/70016646/viewspace-2935984/,如需轉載,請註明出處,否則將追究法律責任。

相關文章