import "loadResource.yjs" @Access("verified") @Permission("SM2") contract LicenceManager{ function onCreate(arg){ Global.owner=requester; Global.applyList = []; Global.accepted={ }; Global.keyPair = SM2Util.generateKeyPair(); } export function getMainFrame(arg){ return "/html/main.html"; } export function init(arg){ print("requester:"+requester +" owner:"+Global.owner); if (requester==Global.owner){ Global.keyPair= JSON.parse(arg); return "success"; } else{ return "forbidden"; } } @LogType("Arg","Result") export function isOwner(arg){ // print("Global.keyPair:"+JSON.stringify(Global.keyPair)); print("Owner:"+Global.owner+" requester:"+requester); return requester==Global.owner; } @LogType("Arg","Result") @Description("参数示例:{\"uuid\":\"IDRCMzBBMzQyLUUyOTAtNThFMC04NzY4LTVEOTRBQTkyRjM1OQ==\",\"remark\":\"备注 \"}") export function apply(arg){ arg = JSON.parse(arg); for (var i=0;i