@j0nnyboi/amman
Version:
A modern mandatory toolbelt to help test solana SDK libraries and apps on a locally running validator.
39 lines (38 loc) • 1.45 kB
TypeScript
/// <reference types="node" />
import { AccountInfo } from '@safecoin/web3.js';
import { SnapshotConfig } from './assets';
import { RelayConfig } from './relay/types';
import { StorageConfig } from './storage';
import { ValidatorConfig } from './validator/types';
export { RelayAccountState, AccountDiff, } from '@j0nnyboi/amman-client';
export declare type DeepPartial<T> = {
[P in keyof T]?: T[P] extends Array<infer I> ? Array<DeepPartial<I>> : DeepPartial<T[P]>;
};
/**
* Amman Config
*
* @property validatorConfig Validator configuration
* @property relayConfig Relay configuration
* @property storageConfig Mock Storage configuration
* @property streamTransactionLogs if `true` the `solana logs` command is
* spawned and its output piped through a prettifier, defaults to run except when in a CI environment
*/
export declare type AmmanConfig = {
validator?: ValidatorConfig;
relay?: RelayConfig;
storage?: StorageConfig;
snapshot?: SnapshotConfig;
streamTransactionLogs?: boolean;
assetsFolder?: string;
};
export declare type AmmanAccount = {
pretty(): Record<string, any>;
};
/**
* The type that an account provider needs to implement so that amman can deserialize account data.
* @category diagnostics
*/
export declare type AmmanAccountProvider = {
byteSize: number | ((args: any) => void);
fromAccountInfo(accountInfo: AccountInfo<Buffer>, offset?: number): [AmmanAccount, number];
};