# @ddn/ddn-aob

> 这个是ddn链上资产包

Latest version **1.0.4** (published 2019-08-20) · ISC license · 0 weekly downloads

## Install

```sh
npm install @ddn/ddn-aob
pnpm add @ddn/ddn-aob
yarn add @ddn/ddn-aob
bun add @ddn/ddn-aob
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2019-08-20 |
| First published | 2019-08-16 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Unpacked size | 61.1 KB |
| Known vulnerabilities | 0 (+6 in 2 direct dependencies) |
| Install scripts | no |
| Author | wly |
| Maintainers | ebookchain, evanlai, imfly, softwaiter |

## Links

- npm: https://www.npmjs.com/package/@ddn/ddn-aob
- npm.io page: https://npm.io/package/@ddn/ddn-aob

## Dependencies (8)

- [async](https://npm.io/package/async.md) ^2.6.1
- [mathjs](https://npm.io/package/mathjs.md) ^5.4.0
- [ed25519](https://npm.io/package/ed25519.md) 0.0.4
- [sequelize](https://npm.io/package/sequelize.md) ^4.42.0
- [underscore](https://npm.io/package/underscore.md) ^1.9.1
- [@ddn/ddn-utils](https://npm.io/package/@ddn/ddn-utils.md) ^1.0.0
- [@ddn/bignum-utils](https://npm.io/package/@ddn/bignum-utils.md) ^1.0.0
- [@ddn/ddn-asset-base](https://npm.io/package/@ddn/ddn-asset-base.md) ^1.0.3

## Recent versions

- 1.0.4 (latest) — 2019-08-20
- 1.0.3 — 2019-08-20
- 1.0.2 — 2019-08-16
- 1.0.1 — 2019-08-16
- 1.0.0 — 2019-08-16

## README

DDN链上资产包
===

交易体创建方法：<br/>
ddnJS.assetPlugin.createPluginAsset(trsType, assetInfo, secret, secondSecret)<br/>
参数：<br/>
&emsp;&emsp;trsType: 创建交易的类型<br/>
&emsp;&emsp;assetInfo: 创建交易的具体内容<br/>
&emsp;&emsp;secret: 账号的密码<br/>
&emsp;&emsp;secondSecret: 二级密码；(可不传)<br/>
返回：<br/>
&emsp;&emsp;创建成功的交易体对象<br/>

一、issuer
====  
注册发行商
```
trsType: 60
assetInfo: {  
              name: "DDD", // 资产名
              desc: "J G V", // 资产简介
              issuer_id: node.Eaccount.address, // 资产创建者地址（账号）
              fee: '10000000000', // 手续费
            }  
```

二、asset
====  
注册资产
```
trsType: 61
assetInfo: {  
                name: "DDD.NCR", // 币种名称
                desc: "DDD新币种", // 币种简介
                maximum: "100000000", // 发行量（最大值）
                precision: 2, // 精度
                strategy: '', // 策略
                allow_blacklist: '0', // 黑名单
                allow_whitelist: '0', // 白名单
                allow_writeoff: '0', // 是否允许注销
                fee: '50000000000' // 手续费
            }  
```

三、issue
====  
发行资产
```
trsType: 64
assetInfo: {  
                currency: "DDD.NCR", // 币种
                aobAmount: "100000", // 发行量（字符串）
                fee: "10000000" //手续费
            }
```

四、transfer
====  
交易对应资产
```
trsType: 65
assetInfo: {  
                receive_address: "xxxxxxxxx", // 接受者地址
                currency: "DDD.NCR", // 币种
                aobAmount: "10", // 转账金额
                message: '测试转账' // 附加信息，可选
            }
```

五、setfalg
===
设置资产参数
```
trsType: 62
assetInfo: {
                currency: "DDN.NCR",    //币种
                flag_type: 1,   //参数设置对象（1：黑白名单设置，2：是否注销设置）
                flag: 1     //参数值：flag_type=1（0：黑名单，1：白名单，2：默认），flag_type=2（0：默认，1：注销）
           }
```

六、acl
===
设置黑白名但列表
```
trsType: 63
assetInfo: {
                currency: "DDN.NCR",    //币种
                flag: 1,    //设置类型（0：黑名单，1：白名单）
                operator: "+",  //操作（+：增加，-：删除）
                list: "xxxxxxxxxxxxxxxxx, yyyyyyyyyyyyyyyyyy"   //黑白名单具体列表内容，多个逗号分隔
           }
```

---
_Source: https://npm.io/package/@ddn/ddn-aob · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
