system{ name = "215159697776981712.node1" transaction-signer = [ {name = "257091603041653856.super_admin" pwd = "super_admin"}, {name = "215159697776981712.node1" pwd = "123"} ] did-contract { //以下合约名和版本号必须跟部署里面的合约名以及版本号必须一致,在业务链中可以不用部署,但是可以用来注册账户、操作、授权功能 contract-name="RdidOperateAuthorizeTPL" contract-version=1 //版本号需要配置为整数 //如果是在单纯的业务链的创世块中,可以不用定义以下部分。 deploy{ contract-name="RdidOperateAuthorizeTPL" contract-version=1 //版本号需要配置为整数 contract-code-path="src/main/scala/rep/sc/tpl/did/RdidOperateAuthorizeTPL.scala" transaction-signer="257091603041653856.super_admin" } //账户注册时,账户的证书要放到相应的位置,如:在国际密码体系下(jks/{netword-id}/{account-name}.{account-cert-name}.cer) account-registration=[ { account-cert-name="super_admin" account-name="257091603041653856" phone-code="18912345678" transaction-signer="257091603041653856.super_admin" }, { account-cert-name="node1" account-name="215159697776981712" phone-code="18912345678" transaction-signer="257091603041653856.super_admin" }, { account-cert-name="node2" account-name="904703631549900672" phone-code="18912345678" transaction-signer="257091603041653856.super_admin" }, { account-cert-name="node3" account-name="989038588418990208" phone-code="18912345678" transaction-signer="257091603041653856.super_admin" }, { account-cert-name="node4" account-name="645377164372772928" phone-code="18912345678" transaction-signer="257091603041653856.super_admin" }, { account-cert-name="node5" account-name="379552050023903168" phone-code="18912345678" transaction-signer="257091603041653856.super_admin" } ] //操作注册 operate-registration=[ { operate-name="RdidOperateAuthorizeTPL.signUpSigner" operate-desc="注册RDID" is-publish=false is-contract-operate=true transaction-signer="257091603041653856.super_admin" }, { operate-name="RdidOperateAuthorizeTPL.updateSignerStatus" operate-desc="禁用或启用RDID" is-publish=false is-contract-operate=true transaction-signer="257091603041653856.super_admin" }, { operate-name="RdidOperateAuthorizeTPL.updateSigner" operate-desc="更新信息" is-publish=false is-contract-operate=true transaction-signer="257091603041653856.super_admin" }, { operate-name="RdidOperateAuthorizeTPL.signUpCertificate" operate-desc="用户注册证书" is-publish=true is-contract-operate=true transaction-signer="257091603041653856.super_admin" }, { operate-name="RdidOperateAuthorizeTPL.updateCertificateStatus" operate-desc="用户禁用或启用证书" is-publish=true is-contract-operate=true transaction-signer="257091603041653856.super_admin" }, { operate-name="RdidOperateAuthorizeTPL.signUpAllTypeCertificate" operate-desc="用户可为所有人注册证书,需授权" is-publish=false is-contract-operate=true transaction-signer="257091603041653856.super_admin" }, { operate-name="RdidOperateAuthorizeTPL.updateAllTypeCertificateStatus" operate-desc="用户可为所有人禁用或启用证书,需授权,super_admin特殊处理" is-publish=false is-contract-operate=true transaction-signer="257091603041653856.super_admin" }, { operate-name="RdidOperateAuthorizeTPL.signUpOperate" operate-desc="注册操作,自己注册自己" is-publish=true is-contract-operate=true transaction-signer="257091603041653856.super_admin" }, { operate-name="RdidOperateAuthorizeTPL.updateOperateStatus" operate-desc="禁用或启用操作,自己更新自己名下的操作" is-publish=true is-contract-operate=true transaction-signer="257091603041653856.super_admin" }, { operate-name="RdidOperateAuthorizeTPL.grantOperate" operate-desc="授权操作" is-publish=true is-contract-operate=true transaction-signer="257091603041653856.super_admin" }, { operate-name="RdidOperateAuthorizeTPL.updateGrantOperateStatus" operate-desc="禁用或启用授权" is-publish=true is-contract-operate=true transaction-signer="257091603041653856.super_admin" }, { operate-name="RdidOperateAuthorizeTPL.bindCertToAuthorize" operate-desc="绑定证书到授权操作" is-publish=true is-contract-operate=true transaction-signer="257091603041653856.super_admin" }, { operate-name="*.deploy" operate-desc="发布合约操作" is-publish=false is-contract-operate=true transaction-signer="257091603041653856.super_admin" }, { operate-name="*.setState" operate-desc="改变合约状态操作" is-publish=false is-contract-operate=true transaction-signer="257091603041653856.super_admin" }, { operate-name="chaininfo.chaininfo" operate-desc="获取链信息" is-publish=true is-contract-operate=false transaction-signer="257091603041653856.super_admin" }, { operate-name="chaininfo.node" operate-desc="返回组网节点数量" is-publish=true is-contract-operate=false transaction-signer="257091603041653856.super_admin" }, { operate-name="chaininfo.getcachetransnumber" operate-desc="返回系统缓存交易数量" is-publish=true is-contract-operate=false transaction-signer="257091603041653856.super_admin" }, { operate-name="chaininfo.getAcceptedTransNumber" operate-desc="返回系统接收到的交易数量" is-publish=true is-contract-operate=false transaction-signer="257091603041653856.super_admin" }, { operate-name="block.hash" operate-desc="返回指定id的区块" is-publish=false is-contract-operate=false transaction-signer="257091603041653856.super_admin" }, { operate-name="block.blockHeight" operate-desc="返回指定高度的区块" is-publish=false is-contract-operate=false transaction-signer="257091603041653856.super_admin" }, { operate-name="block.getTransNumberOfBlock" operate-desc="返回指定高度区块包含的交易数" is-publish=true is-contract-operate=false transaction-signer="257091603041653856.super_admin" }, { operate-name="block.blocktime" operate-desc="返回指定高度的区块的出块时间" is-publish=true is-contract-operate=false transaction-signer="257091603041653856.super_admin" }, { operate-name="block.blocktimeoftran" operate-desc="返回指定交易的入块时间" is-publish=true is-contract-operate=false transaction-signer="257091603041653856.super_admin" }, { operate-name="block.stream" operate-desc="返回指定高度的区块字节流" is-publish=false is-contract-operate=false transaction-signer="257091603041653856.super_admin" }, { operate-name="transaction" operate-desc="返回指定id的交易" is-publish=false is-contract-operate=false transaction-signer="257091603041653856.super_admin" }, { operate-name="transaction.stream" operate-desc="返回指定id的交易字节流" is-publish=false is-contract-operate=false transaction-signer="257091603041653856.super_admin" }, { operate-name="transaction.postTranByString" operate-desc="提交带签名的交易" is-publish=true is-contract-operate=false transaction-signer="257091603041653856.super_admin" }, { operate-name="transaction.postTranStream" operate-desc="提交带签名的交易字节流" is-publish=true is-contract-operate=false transaction-signer="257091603041653856.super_admin" }, { operate-name="transaction.postTran" operate-desc="提交交易" is-publish=true is-contract-operate=false transaction-signer="257091603041653856.super_admin" }, { operate-name="transaction.tranInfoAndHeight" operate-desc="回指定id的交易信息及所在区块高度" is-publish=false is-contract-operate=false transaction-signer="257091603041653856.super_admin" }, { operate-name="db.query" operate-desc="查询合约存储在DB中的数据" is-publish=false is-contract-operate=false transaction-signer="257091603041653856.super_admin" } ] //授权注册 authorizes-registration = [ { actions-Granteds = ["RdidOperateAuthorizeTPL.signUpSigner" ,"RdidOperateAuthorizeTPL.updateSignerStatus" ,"RdidOperateAuthorizeTPL.updateSigner" ,"RdidOperateAuthorizeTPL.signUpCertificate" ,"RdidOperateAuthorizeTPL.updateCertificateStatus" ,"RdidOperateAuthorizeTPL.signUpAllTypeCertificate" ,"RdidOperateAuthorizeTPL.updateAllTypeCertificateStatus" ,"RdidOperateAuthorizeTPL.signUpOperate" ,"RdidOperateAuthorizeTPL.updateOperateStatus" ,"RdidOperateAuthorizeTPL.grantOperate" ,"RdidOperateAuthorizeTPL.updateGrantOperateStatus" ,"RdidOperateAuthorizeTPL.bindCertToAuthorize" ,"*.deploy" ,"*.setState" ,"chaininfo.chaininfo" ,"chaininfo.node" ,"chaininfo.getcachetransnumber" ,"chaininfo.getAcceptedTransNumber" ,"block.hash" ,"block.blockHeight" ,"block.getTransNumberOfBlock" ,"block.blocktime" ,"block.blocktimeoftran" ,"block.stream" ,"transaction" ,"transaction.stream" ,"transaction.postTranByString" ,"transaction.postTranStream" ,"transaction.postTran" ,"transaction.tranInfoAndHeight" ,"db.query"] grantees = ["215159697776981712","12110107bi45jh675g","122000002n00123567","921000005k36123789","921000006e0012v696"] is-transfer = true transaction-signer="257091603041653856.super_admin" } ] //自定义调用合约,在DID合约中,目前没有自定义调用 custom-contract-invokes=[] } custom-contracts=[ { deploy{ contract-name="ContractAssetsTPL" contract-version=1 //版本号需要配置为整数 contract-code-path="src/main/scala/rep/sc/tpl/ContractAssetsTPL.scala" transaction-signer="215159697776981712.node1" } operate-registration=[ { operate-name="ContractAssetsTPL.transfer" operate-desc="转账交易" is-publish=true is-contract-operate=true transaction-signer="215159697776981712.node1" }, { operate-name="ContractAssetsTPL.set" operate-desc="初始化账户" is-publish=false is-contract-operate=true transaction-signer="215159697776981712.node1" }, { operate-name="ContractAssetsTPL.putProof" operate-desc="存证" is-publish=true is-contract-operate=true transaction-signer="215159697776981712.node1" } ] custom-contract-invokes=[ { contract-name="ContractAssetsTPL" contract-version=1 //版本号需要配置为整数 method-name="set" method-parameter=""api_req/json/gm/setGm.json"" //调用合约的参数从json文件中读取 transaction-signer="257091603041653856.super_admin" } ] }, { deploy{ contract-name="RVerifiableCredentialTPL" contract-version=1 //版本号需要配置为整数 contract-code-path="src/main/scala/rep/sc/tpl/did/RVerifiableCredentialTPL.scala" transaction-signer="215159697776981712.node1" } operate-registration=[ { operate-name="RVerifiableCredentialTPL.signupCCS" operate-desc="注册可验证凭据属性结构" is-publish=true is-contract-operate=true transaction-signer="215159697776981712.node1" }, { operate-name="RVerifiableCredentialTPL.updateCCSStatus" operate-desc="更新可验证凭据属性结构有效状态" is-publish=false is-contract-operate=true transaction-signer="215159697776981712.node1" }, { operate-name="RVerifiableCredentialTPL.signupVCStatus" operate-desc="注册可验证凭据状态" is-publish=true is-contract-operate=true transaction-signer="215159697776981712.node1" }, { operate-name="RVerifiableCredentialTPL.updateVCStatus" operate-desc="更新可验证凭据状态" is-publish=true is-contract-operate=true transaction-signer="215159697776981712.node1" }, { operate-name="RVerifiableCredentialTPL.revokeVCClaims" operate-desc="撤销可验证凭据属性状态" is-publish=true is-contract-operate=true transaction-signer="215159697776981712.node1" } ] custom-contract-invokes=[ ] }, { deploy{ contract-name="InterfaceCooperation" contract-version=1 //版本号需要配置为整数 contract-code-path="src/main/scala/rep/sc/tpl/cooper/InterfaceCooperation.scala" transaction-signer="257091603041653856.super_admin" } operate-registration=[ { operate-name="InterfaceCooperation.registerApiDefinition" operate-desc="注册接口定义" is-publish=false is-contract-operate=true transaction-signer="215159697776981712.node1" }, { operate-name="InterfaceCooperation.registerApiService" operate-desc="注册接口服务" is-publish=false is-contract-operate=true transaction-signer="215159697776981712.node1" }, { operate-name="InterfaceCooperation.registerApiAckReceive" operate-desc="注册接口应答" is-publish=false is-contract-operate=true transaction-signer="215159697776981712.node1" }, { operate-name="InterfaceCooperation.reqAckProof" operate-desc="请求应答存证" is-publish=false is-contract-operate=true transaction-signer="215159697776981712.node1" } ] custom-contract-invokes=[ ] } ] }