UNPKG

@mcchadwick/fiosdk

Version:

The Foundation for Interwallet Operability (FIO) is a consortium of leading blockchain wallets, exchanges and payments providers that seeks to accelerate blockchain adoption by reducing the risk, complexity, and inconvenience of sending and receiving cryp

29 lines (25 loc) 829 B
import { SignedTransaction } from './SignedTransaction' import { Constants } from '../../utils/constants' export class PrepareTransaction extends SignedTransaction { ENDPOINT: string = 'chain/push_transaction'; ACTION: string = 'trnsfiopubky'; ACCOUNT: string = Constants.defaultAccount; data: any constructor(action: string, account: string, data: any){ super(); if(action) this.ACTION = action; if (account) this.ACCOUNT = account; this.data = data; } public async execute(privateKey: string, publicKey: string): Promise<any> { return super.execute(privateKey, publicKey, true); } getData(): any { let actor = this.getActor(); let data = { ...this.data, actor: actor, }; return data; } }