Sha256: d2fb823e648eee8773e0867a2ce597bf9421e79a21bfcb2f1ea1f4d037265784

Contents?: true

Size: 643 Bytes

Versions: 1

Compression:

Stored size: 643 Bytes

Contents

import {TRANSACTION_TYPE} from '@waves/ts-types'
import {
  defaultValue,
  getError,
  ifElse,
  isArray,
  isEq,
  isNaturalNumberLike,
  isNaturalNumberOrZeroLike,
  isNumber,
  isPublicKey,
  isRecipient,
  orEq,
  validateByShema
} from './validators'


const leaseScheme = {
  type: isEq(TRANSACTION_TYPE.LEASE),
  version: orEq([undefined, 2, 3]),
  senderPublicKey: isPublicKey,
  recipient: isRecipient,
  amount: isNaturalNumberLike,
  fee: isNaturalNumberOrZeroLike,
  timestamp: isNumber,
  proofs: ifElse(isArray, defaultValue(true), orEq([ undefined ])),
};

export const leaseValidator = validateByShema(leaseScheme, getError);

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
waves_lib-0.1.0 js/node_modules/@waves/waves-transactions/src/validators/lease.ts