/* tslint:disable */ /* eslint-disable */ /** * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { mapValues } from '../runtime'; /** * * @export * @interface TransferHistoryItem */ export interface TransferHistoryItem { /** * * @type {string} * @memberof TransferHistoryItem */ id: string; /** * * @type {number} * @memberof TransferHistoryItem */ asset_id: number; /** * * @type {string} * @memberof TransferHistoryItem */ amount: string; /** * * @type {string} * @memberof TransferHistoryItem */ fee: string; /** * * @type {number} * @memberof TransferHistoryItem */ timestamp: number; /** * * @type {string} * @memberof TransferHistoryItem */ type: TransferHistoryItemTypeEnum; /** * * @type {string} * @memberof TransferHistoryItem */ from_l1_address: string; /** * * @type {string} * @memberof TransferHistoryItem */ to_l1_address: string; /** * * @type {number} * @memberof TransferHistoryItem */ from_account_index: number; /** * * @type {number} * @memberof TransferHistoryItem */ to_account_index: number; /** * * @type {string} * @memberof TransferHistoryItem */ from_route: TransferHistoryItemFromRouteEnum; /** * * @type {string} * @memberof TransferHistoryItem */ to_route: TransferHistoryItemToRouteEnum; /** * * @type {string} * @memberof TransferHistoryItem */ tx_hash: string; } /** * @export */ export const TransferHistoryItemTypeEnum = { L2TransferInflow: 'L2TransferInflow', L2TransferOutflow: 'L2TransferOutflow', L2BurnSharesInflow: 'L2BurnSharesInflow', L2BurnSharesOutflow: 'L2BurnSharesOutflow', L2MintSharesInflow: 'L2MintSharesInflow', L2MintSharesOutflow: 'L2MintSharesOutflow', L2SelfTransfer: 'L2SelfTransfer', L2StakeAssetInflow: 'L2StakeAssetInflow', L2StakeAssetOutflow: 'L2StakeAssetOutflow', L2UnstakeAssetInflow: 'L2UnstakeAssetInflow', L2UnstakeAssetOutflow: 'L2UnstakeAssetOutflow', L2ForceBurnSharesInflow: 'L2ForceBurnSharesInflow', L2ForceBurnSharesOutflow: 'L2ForceBurnSharesOutflow' } as const; export type TransferHistoryItemTypeEnum = typeof TransferHistoryItemTypeEnum[keyof typeof TransferHistoryItemTypeEnum]; /** * @export */ export const TransferHistoryItemFromRouteEnum = { Spot: 'spot', Perps: 'perps' } as const; export type TransferHistoryItemFromRouteEnum = typeof TransferHistoryItemFromRouteEnum[keyof typeof TransferHistoryItemFromRouteEnum]; /** * @export */ export const TransferHistoryItemToRouteEnum = { Spot: 'spot', Perps: 'perps' } as const; export type TransferHistoryItemToRouteEnum = typeof TransferHistoryItemToRouteEnum[keyof typeof TransferHistoryItemToRouteEnum]; /** * Check if a given object implements the TransferHistoryItem interface. */ export function instanceOfTransferHistoryItem(value: object): value is TransferHistoryItem { if (!('id' in value) || value['id'] === undefined) return false; if (!('asset_id' in value) || value['asset_id'] === undefined) return false; if (!('amount' in value) || value['amount'] === undefined) return false; if (!('fee' in value) || value['fee'] === undefined) return false; if (!('timestamp' in value) || value['timestamp'] === undefined) return false; if (!('type' in value) || value['type'] === undefined) return false; if (!('from_l1_address' in value) || value['from_l1_address'] === undefined) return false; if (!('to_l1_address' in value) || value['to_l1_address'] === undefined) return false; if (!('from_account_index' in value) || value['from_account_index'] === undefined) return false; if (!('to_account_index' in value) || value['to_account_index'] === undefined) return false; if (!('from_route' in value) || value['from_route'] === undefined) return false; if (!('to_route' in value) || value['to_route'] === undefined) return false; if (!('tx_hash' in value) || value['tx_hash'] === undefined) return false; return true; } export function TransferHistoryItemFromJSON(json: any): TransferHistoryItem { return TransferHistoryItemFromJSONTyped(json, false); } export function TransferHistoryItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransferHistoryItem { if (json == null) { return json; } return { 'id': json['id'], 'asset_id': json['asset_id'], 'amount': json['amount'], 'fee': json['fee'], 'timestamp': json['timestamp'], 'type': json['type'], 'from_l1_address': json['from_l1_address'], 'to_l1_address': json['to_l1_address'], 'from_account_index': json['from_account_index'], 'to_account_index': json['to_account_index'], 'from_route': json['from_route'], 'to_route': json['to_route'], 'tx_hash': json['tx_hash'], }; } export function TransferHistoryItemToJSON(value?: TransferHistoryItem | null): any { if (value == null) { return value; } return { 'id': value['id'], 'asset_id': value['asset_id'], 'amount': value['amount'], 'fee': value['fee'], 'timestamp': value['timestamp'], 'type': value['type'], 'from_l1_address': value['from_l1_address'], 'to_l1_address': value['to_l1_address'], 'from_account_index': value['from_account_index'], 'to_account_index': value['to_account_index'], 'from_route': value['from_route'], 'to_route': value['to_route'], 'tx_hash': value['tx_hash'], }; }