UNPKG

@fioprotocol/fiosdk

Version:

The Foundation for Interwallet Operability (FIO) is a consortium of leading blockchain wallets, exchanges and payments providers that seeks to accelerate blockchain adoption by reducing the risk, complexity, and inconvenience of sending and receiving cryp

30 lines (24 loc) 804 B
import {EndPoint, PublicAddressResponse} from '../../entities' import {RequestConfig} from '../Transactions' import {Query} from './Query' export type PublicAddressQueryProps = { fioAddress: string chainCode: string tokenCode: string, } export type PublicAddressQueryData = { fio_address: string, chain_code: string, token_code: string, } export class GetPublicAddress extends Query<PublicAddressQueryData, PublicAddressResponse> { public ENDPOINT = `chain/${EndPoint.getPublicAddress}` as const constructor(config: RequestConfig, public props: PublicAddressQueryProps) { super(config) } public getData = () => ({ chain_code: this.props.chainCode, fio_address: this.props.fioAddress, token_code: this.props.tokenCode, }) }