return chainClient().accounts.createAddress(data)
},
listAddresses: (accountId) => {
- return chainClient().accounts.listAddresses(accountId)
+ return chainClient().accounts.listAddresses({accountId})
}
}
createReceiverBatch: (params, cb) => shared.createBatch(client, '/create-account-receiver', params, {cb}),
- listAddresses: (accountId) => shared.query(client, 'accounts', '/list-addresses', {account_id: accountId}),
+ listAddresses: (params) => shared.query(client, 'accounts', '/list-addresses', params),
validateAddresses: (address, cb) => shared.query(client, 'accounts', '/validate-address', {'address': address}, {cb})
}
.then(resp => new shared.BatchResponse(resp)),
cb
),
+
+ estimateGas: (template, cb) => shared.tryCallback(
+ client.request('/estimate-transaction-gas', {'transactionTemplate': template}).then(resp => checkForError(resp)),
+ cb
+ )
}
}
}
)
}).then((body) => {
+ if(body.status === 'fail'){
+ throw body
+ }
// After processing the response, convert snakecased field names to
// camelcase to match language conventions.
return skipSnakeize? body : camelize(body)