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

38 lines (31 loc) 1.21 kB
import {Account, Action, EndPoint, RenewFioAddressResponse} from '../../entities' import {validationRules} from '../../utils/validation' import {RequestConfig} from '../Transactions' import { SignedTransaction } from './SignedTransaction' export type RenewFioAddressRequestProps = { fioAddress: string maxFee: number technologyProviderId: string, } export type RenewFioAddressRequestData = { fio_address: string max_fee: number tpid: string actor: string, } export class RenewFioAddress extends SignedTransaction<RenewFioAddressRequestData, RenewFioAddressResponse> { public ENDPOINT = `chain/${EndPoint.renewFioAddress}` as const public ACTION = Action.renewAddress public ACCOUNT = Account.address constructor(config: RequestConfig, public props: RenewFioAddressRequestProps) { super(config) this.validationData = {fioAddress: props.fioAddress, tpid: props.technologyProviderId} this.validationRules = validationRules.renewFioAddress } public getData = () => ({ actor: this.getActor(), fio_address: this.props.fioAddress, max_fee: this.props.maxFee, tpid: this.props.technologyProviderId, }) }