rosetta-sdk-typescript
Version:
Typescript SDK to create and interact with Rosetta API implementations.
71 lines (70 loc) • 3.82 kB
TypeScript
/**
* Rosetta
* Build Once. Integrate Your Blockchain Everywhere.
*
* The version of the OpenAPI document: 1.4.10
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { BalanceExemption, ModelError, OperationStatus } from './';
/**
* Allow specifies supported Operation status, Operation types, and all possible error statuses. This Allow object is used by clients to validate the correctness of a Rosetta Server implementation. It is expected that these clients will error if they receive some response that contains any of the above information that is not specified here.
* @export
* @interface Allow
*/
export interface Allow {
/**
* All Operation.Status this implementation supports. Any status that is returned during parsing that is not listed here will cause client validation to error.
* @type {Array<OperationStatus>}
* @memberof Allow
*/
operation_statuses: Array<OperationStatus>;
/**
* All Operation.Type this implementation supports. Any type that is returned during parsing that is not listed here will cause client validation to error.
* @type {Array<string>}
* @memberof Allow
*/
operation_types: Array<string>;
/**
* All Errors that this implementation could return. Any error that is returned during parsing that is not listed here will cause client validation to error.
* @type {Array<ModelError>}
* @memberof Allow
*/
errors: Array<ModelError>;
/**
* Any Rosetta implementation that supports querying the balance of an account at any height in the past should set this to true.
* @type {boolean}
* @memberof Allow
*/
historical_balance_lookup: boolean;
/**
* If populated, `timestamp_start_index` indicates the first block index where block timestamps are considered valid (i.e. all blocks less than `timestamp_start_index` could have invalid timestamps). This is useful when the genesis block (or blocks) of a network have timestamp 0. If not populated, block timestamps are assumed to be valid for all available blocks.
* @type {number}
* @memberof Allow
*/
timestamp_start_index?: number;
/**
* All methods that are supported by the /call endpoint. Communicating which parameters should be provided to /call is the responsibility of the implementer (this is en lieu of defining an entire type system and requiring the implementer to define that in Allow).
* @type {Array<string>}
* @memberof Allow
*/
call_methods: Array<string>;
/**
* BalanceExemptions is an array of BalanceExemption indicating which account balances could change without a corresponding Operation. BalanceExemptions should be used sparingly as they may introduce significant complexity for integrators that attempt to reconcile all account balance changes. If your implementation relies on any BalanceExemptions, you MUST implement historical balance lookup (the ability to query an account balance at any BlockIdentifier).
* @type {Array<BalanceExemption>}
* @memberof Allow
*/
balance_exemptions: Array<BalanceExemption>;
/**
* Any Rosetta implementation that can update an AccountIdentifier's unspent coins based on the contents of the mempool should populate this field as true. If false, requests to `/account/coins` that set `include_mempool` as true will be automatically rejected.
* @type {boolean}
* @memberof Allow
*/
mempool_coins: boolean;
}
export declare function AllowFromJSON(json: any): Allow;
export declare function AllowFromJSONTyped(json: any, ignoreDiscriminator: boolean): Allow;
export declare function AllowToJSON(value?: Allow | null): any;