///
import { AxiosResponse } from 'axios';
export default function JupiterClient(opts: IJupiterClientOpts): {
recordKey: string;
config: {
feeNQT: number;
deadline: number;
minimumFndrAccountBalance: number;
minimumUserAccountBalance: number;
jupNqtDecimals: number;
};
client: import("axios").AxiosInstance;
nqtToJup(nqt: string): string;
jupToNqt(jup: string): string;
decrypt: (text: string) => Promise;
encrypt: (input: string | Buffer) => Promise;
loadDatabase(): Promise;
getBalance(address?: string): Promise;
createNewAddress(passphrase: string): Promise<{
address: any;
publicKey: any;
requestProcessingTime: any;
account: any;
}>;
sendMoney(recipientAddr: string): Promise;
parseEncryptedRecord(cipherText: string): Promise;
storeRecord(record: any): Promise;
decryptRecord(message: ITransactionAttachmentDecryptedMessage): Promise;
getAllTransactions(withMessage?: boolean, type?: number): Promise;
request(verb: 'get' | 'post', path: string, opts?: IRequestOpts | undefined): Promise;
};
interface IJupiterClientOpts {
server: string;
address: string;
passphrase: string;
encryptSecret: string;
publicKey?: string;
feeNQT?: number;
deadline?: number;
minimumFndrAccountBalance?: number;
minimumUserAccountBalance?: number;
jupNqtDecimals?: number;
}
interface IRequestOpts {
params?: any;
}
interface ITransactionAttachment {
[key: string]: any;
}
interface ITransactionAttachmentDecryptedMessage {
data: string;
nonce: string;
isText: boolean;
isCompressed: boolean;
}
interface ITransaction {
signature: string;
transactionIndex: number;
type: number;
phased: boolean;
ecBlockId: string;
signatureHash: string;
attachment: ITransactionAttachment;
senderRS: string;
subtype: number;
amountNQT: string;
recipientRS: string;
block: string;
blockTimestamp: number;
deadline: number;
timestamp: number;
height: number;
senderPublicKey: string;
feeNQT: string;
confirmations: number;
fullHash: string;
version: number;
sender: string;
recipient: string;
ecBlockHeight: number;
transaction: string;
}
export {};