{"id":20905938,"url":"https://github.com/ddnlink/ddn-dapp","last_synced_at":"2025-03-12T21:28:51.253Z","repository":{"id":41773827,"uuid":"203092136","full_name":"ddnlink/ddn-dapp","owner":"ddnlink","description":"DDN Dapp","archived":false,"fork":false,"pushed_at":"2022-12-09T23:12:18.000Z","size":99,"stargazers_count":2,"open_issues_count":6,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-19T14:21:56.118Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ddnlink.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-19T03:31:03.000Z","updated_at":"2019-08-22T08:51:57.000Z","dependencies_parsed_at":"2023-01-25T17:30:27.111Z","dependency_job_id":null,"html_url":"https://github.com/ddnlink/ddn-dapp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddnlink%2Fddn-dapp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddnlink%2Fddn-dapp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddnlink%2Fddn-dapp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddnlink%2Fddn-dapp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ddnlink","download_url":"https://codeload.github.com/ddnlink/ddn-dapp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243297254,"owners_count":20268741,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-18T13:28:17.045Z","updated_at":"2025-03-12T21:28:51.230Z","avatar_url":"https://github.com/ddnlink.png","language":"JavaScript","readme":"DDN Dapp\n===\n\n交易体创建方法：\u003cbr/\u003e\nddnJS.assetPlugin.createPluginAsset(trsType, assetInfo, secret, secondSecret)\u003cbr/\u003e\n参数：\u003cbr/\u003e\n\u0026emsp;\u0026emsp;trsType: 创建交易的类型\u003cbr/\u003e\n\u0026emsp;\u0026emsp;assetInfo: 创建交易的具体内容\u003cbr/\u003e\n\u0026emsp;\u0026emsp;secret: 账号的密码\u003cbr/\u003e\n\u0026emsp;\u0026emsp;secondSecret: 二级密码；(可不传)\u003cbr/\u003e\n返回：\u003cbr/\u003e\n\u0026emsp;\u0026emsp;创建成功的交易体对象\u003cbr/\u003e\n\n##一：Dapp  \n注册Dapp\n```\ntrsType: 11\nassetInfo: {  \n                name: DappName, //Dapp名称\n                type: node.DappType.DAPP,   //Dapp类型\n                category: node.randomProperty(node.DappCategory),   //Dapp分类\n                link: node.guestbookDapp.link,  //Dapp程序包链接\n                description: \"A dapp added via API autotest\",   //描述\n                tags: \"handy dizzy pear airplane alike wonder nifty curve young probable tart concentrate\", //标签，空格分隔\n                icon: node.guestbookDapp.icon,  //Dapp Logo链接\n                delegates: delegates.join(\",\"), //Dapp 受托人公钥串，多个用逗号分隔\n                unlock_delegates: 3 //转出操作需要的最小受托人确认数\n           }  \n```\n\n##二：inTransfer  \n向Dapp内转账\n```\ntrsType: 12\nassetInfo: {\n                dapp_id: \"f90e1f741168106f3bbd76e5eea6aa47d725d1e9b78e2ad6f043d0719881ba22\",    //Dapp Id\n                currency: \"DDN\",    //要转入的币种\n                amount: \"100000000\" //要转入的金额\n           }\n```\n\n##三：outTransfer  \n从Dapp向外转账\n```\ntrsType: 13\nassetInfo: {\n                recipient_id: ,  //转账接收账户地址\n                dapp_id: \"f90e1f741168106f3bbd76e5eea6aa47d725d1e9b78e2ad6f043d0719881ba22\",    //Dapp Id\n                currency: \"DDN\",    //要转出的币种\n                aobAmount: \"10000000\"   //要转出的金额,\n                signatures: [   //受托人签名数组，通过方法await node.ddn.transfer.signOutTransfer(trs, delegatePassword)获得\n                    \"xxxxxxxxxxxxxxxxxxxxxxx\",\n                    \"yyyyyyyyyyyyyyyyyyyyyyy\",\n                    \"zzzzzzzzzzzzzzzzzzzzzzz\"\n                ]\n           }\n```\n\n有关Dapp相关信息请查看ddn-docs项目的Dapp部分","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fddnlink%2Fddn-dapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fddnlink%2Fddn-dapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fddnlink%2Fddn-dapp/lists"}