1 import bytom from "./bytom";
3 function transaction(bytom) {
7 transaction.prototype.list = function(guid, address, start, limit) {
8 return this.bytom.transaction.list(guid, address, start, limit);
11 transaction.prototype.build = function(guid, to, asset, amount, fee){
12 let retPromise = new Promise((resolve, reject) => {
13 this.bytom.transaction.buildPayment(guid, to, asset, Number(amount*100000000)).then(res => {
21 transaction.prototype.transfer = function(guid, transaction, password){
22 let retPromise = new Promise((resolve, reject) => {
23 this.bytom.transaction.signTransaction(guid, JSON.stringify(transaction), password).then(ret => {
24 this.bytom.transaction.submitPayment(guid, ret.raw_transaction, ret.signatures).then(res3 => {
37 export default transaction;