diff --git a/src/api.ts b/src/api.ts index c2b0245c..ee8eb686 100644 --- a/src/api.ts +++ b/src/api.ts @@ -69,7 +69,7 @@ import * as transactionUtils from './transaction/utils' import * as schemaValidator from './common/schema-validator' import {getServerInfo, getFee} from './common/serverinfo' import {clamp} from './ledger/utils' -import {Instructions} from './transaction/types' +import {Instructions, Prepare} from './transaction/types' export type APIOptions = { server?: string, @@ -205,7 +205,8 @@ class RippleAPI extends EventEmitter { * * You can later submit the transaction with `submit()`. */ - async prepareTransaction(txJSON: object, instructions: Instructions = {}) { + async prepareTransaction(txJSON: object, instructions: Instructions = {}): + Promise { return transactionUtils.prepareTransaction(txJSON, this, instructions) } diff --git a/src/transaction/types.ts b/src/transaction/types.ts index 1724578e..50b87144 100644 --- a/src/transaction/types.ts +++ b/src/transaction/types.ts @@ -22,10 +22,10 @@ export type Instructions = { export type Prepare = { txJSON: string, instructions: { - fee: string, - sequence: number, - maxLedgerVersion?: number - } + fee: string, + sequence: number, + maxLedgerVersion?: number + } } export type Submit = {