Some checks failed
morphit-release / Build + publish release tarball (push) Has been cancelled
125 lines
4.5 KiB
TypeScript
125 lines
4.5 KiB
TypeScript
/**
|
|
* @file Blurt account type definitions.
|
|
* @author Johan Nordberg <code@johan-nordberg.com>
|
|
* @license
|
|
* Copyright (c) 2017 Johan Nordberg. All Rights Reserved.
|
|
*
|
|
* Redistribution and use in source and binary forms, with or without modification,
|
|
* are permitted provided that the following conditions are met:
|
|
*
|
|
* 1. Redistribution of source code must retain the above copyright notice, this
|
|
* list of conditions and the following disclaimer.
|
|
*
|
|
* 2. Redistribution in binary form must reproduce the above copyright notice,
|
|
* this list of conditions and the following disclaimer in the documentation
|
|
* and/or other materials provided with the distribution.
|
|
*
|
|
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
* may be used to endorse or promote products derived from this software without
|
|
* specific prior written permission.
|
|
*
|
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
|
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
|
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
|
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
*
|
|
* You acknowledge that this software is not designed, licensed or intended for use
|
|
* in the design, construction, operation or maintenance of any military facility.
|
|
*/
|
|
import { PublicKey } from '../crypto';
|
|
import { Asset } from './asset';
|
|
export interface AuthorityType {
|
|
weight_threshold: number;
|
|
account_auths: [string, number][];
|
|
key_auths: [string | PublicKey, number][];
|
|
}
|
|
export declare class Authority implements AuthorityType {
|
|
weight_threshold: number;
|
|
account_auths: [string, number][];
|
|
key_auths: [string | PublicKey, number][];
|
|
constructor({ weight_threshold, account_auths, key_auths }: AuthorityType);
|
|
/** Convenience to create a new instance from PublicKey or authority object. */
|
|
static from(value: string | PublicKey | AuthorityType): Authority;
|
|
}
|
|
export interface Account {
|
|
id: number;
|
|
name: string;
|
|
owner: Authority;
|
|
active: Authority;
|
|
posting: Authority;
|
|
memo_key: string;
|
|
json_metadata: string;
|
|
posting_json_metadata: string;
|
|
proxy: string;
|
|
last_owner_update: string;
|
|
last_account_update: string;
|
|
created: string;
|
|
mined: boolean;
|
|
recovery_account: string;
|
|
last_account_recovery: string;
|
|
reset_account: string;
|
|
comment_count: number;
|
|
lifetime_vote_count: number;
|
|
post_count: number;
|
|
can_vote: boolean;
|
|
voting_manabar: {
|
|
current_mana: string | number;
|
|
last_update_time: number;
|
|
};
|
|
voting_power: number;
|
|
balance: string | Asset;
|
|
savings_balance: string | Asset;
|
|
savings_withdraw_requests: number;
|
|
reward_blurt_balance: string | Asset;
|
|
reward_vesting_balance: string | Asset;
|
|
reward_vesting_blurt: string | Asset;
|
|
vesting_shares: string | Asset;
|
|
delegated_vesting_shares: string | Asset;
|
|
received_vesting_shares: string | Asset;
|
|
vesting_withdraw_rate: string | Asset;
|
|
next_vesting_withdrawal: string;
|
|
withdrawn: number | string;
|
|
to_withdraw: number | string;
|
|
withdraw_routes: number;
|
|
curation_rewards: number | string;
|
|
posting_rewards: number | string;
|
|
proxied_vsf_votes: number[];
|
|
witnesses_voted_for: number;
|
|
last_post: string;
|
|
last_root_post: string;
|
|
last_vote_time: string;
|
|
post_bandwidth: number;
|
|
pending_claimed_accounts: number;
|
|
}
|
|
export interface ExtendedAccount extends Account {
|
|
/**
|
|
* Convert vesting_shares to vesting blurt.
|
|
*/
|
|
vesting_balance: string | Asset;
|
|
/**
|
|
* Transfer to/from vesting.
|
|
*/
|
|
transfer_history: any[];
|
|
/**
|
|
* Limit order / cancel / fill.
|
|
*/
|
|
market_history: any[];
|
|
post_history: any[];
|
|
vote_history: any[];
|
|
other_history: any[];
|
|
witness_votes: string[];
|
|
tags_usage: string[];
|
|
guest_bloggers: string[];
|
|
open_orders?: any[];
|
|
comments?: any[];
|
|
blog?: any[];
|
|
feed?: any[];
|
|
recent_replies?: any[];
|
|
recommended?: any[];
|
|
}
|