All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.savl.ripple.client.Account Maven / Gradle / Ivy

There is a newer version: 1.0.2
Show newest version

package com.savl.ripple.client;

import com.savl.ripple.client.pubsub.Publisher;
import com.savl.ripple.client.subscriptions.TrackedAccountRoot;
import com.savl.ripple.client.transactions.TransactionManager;
import com.savl.ripple.core.coretypes.AccountID;
import com.savl.ripple.crypto.ecdsa.IKeyPair;

/*
 *
 * We want this guy to be able to track accounts we have the secret for or not
 *
 * */
public class Account {
    private final Publisher publisher = new Publisher();
    public TransactionManager transactionManager() {
        return tm;
    }
    public Publisher publisher() {
        return publisher;
    }
    // events enumeration
    public static interface events extends Publisher.Callback {}
    public static interface OnServerInfo extends events {}

    private TrackedAccountRoot accountRoot;
    private TransactionManager tm;
    public IKeyPair keyPair;

    public AccountID id() {
        return id;
    }

    public TrackedAccountRoot getAccountRoot() {
        return accountRoot;
    }

    public void setAccountRoot(TrackedAccountRoot accountRoot) {
        Account.this.accountRoot = accountRoot;
    }

    private AccountID id;

    public Account(AccountID id,
                   IKeyPair keyPair, TrackedAccountRoot root,
                   TransactionManager tm) {
        this.id = id;
        this.accountRoot = root;
        this.tm = tm;
        this.keyPair = keyPair;
    }

    @Override
    public String toString() {
        return id.toString();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy