Options
All
  • Public
  • Public/Protected
  • All
Menu

dsteem

Index

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Object literals

Type aliases

AssetSymbol

AssetSymbol: "STEEM" | "VESTS" | "SBD" | "TESTS" | "TBD"

Asset symbol string.

Bignum

Bignum: string

Large number that may be unsafe to represent natively in JavaScript.

DiscussionQueryCategory

DiscussionQueryCategory: "active" | "blog" | "cashout" | "children" | "comments" | "feed" | "hot" | "promoted" | "trending" | "votes" | "created"

Possible categories for get_discussions_by_*.

KeyRole

KeyRole: "owner" | "active" | "posting" | "memo"

OperationName

OperationName: "account_create" | "account_create_with_delegation" | "account_update" | "account_update2" | "account_witness_proxy" | "account_witness_vote" | "cancel_transfer_from_savings" | "change_recovery_account" | "claim_account" | "claim_reward_balance" | "create_proposal" | "comment" | "comment_options" | "convert" | "create_claimed_account" | "custom" | "custom_binary" | "custom_json" | "decline_voting_rights" | "delegate_vesting_shares" | "delete_comment" | "escrow_approve" | "escrow_dispute" | "escrow_release" | "escrow_transfer" | "feed_publish" | "limit_order_cancel" | "limit_order_create" | "limit_order_create2" | "pow" | "pow2" | "recover_account" | "remove_proposal" | "report_over_production" | "request_account_recovery" | "reset_account" | "set_reset_account" | "set_withdraw_vesting_route" | "transfer" | "transfer_from_savings" | "transfer_to_savings" | "transfer_to_vesting" | "update_proposal_votes" | "vote" | "withdraw_vesting" | "witness_set_properties" | "witness_update"

Operation name.

PriceType

PriceType: Price | object

Serializer

Serializer: function

Type declaration

    • (buffer: ByteBuffer, data: any): void
    • Parameters

      • buffer: ByteBuffer
      • data: any

      Returns void

VirtualOperationName

VirtualOperationName: "author_reward" | "comment_benefactor_reward" | "comment_payout_update" | "comment_reward" | "curation_reward" | "fill_convert_request" | "fill_order" | "fill_transfer_from_savings" | "fill_vesting_withdraw" | "hardfork" | "interest" | "liquidity_reward" | "return_vesting_delegation" | "shutdown_witness"

Virtual operation name.

Variables

Const AuthoritySerializer

AuthoritySerializer: (Anonymous function) = ObjectSerializer([['weight_threshold', UInt32Serializer],['account_auths', FlatMapSerializer(StringSerializer, UInt16Serializer)],['key_auths', FlatMapSerializer(PublicKeySerializer, UInt16Serializer)],])

Const BeneficiarySerializer

BeneficiarySerializer: (Anonymous function) = ObjectSerializer([['account', StringSerializer],['weight', UInt16Serializer],])

Const ChainPropertiesSerializer

ChainPropertiesSerializer: (Anonymous function) = ObjectSerializer([['account_creation_fee', AssetSerializer],['maximum_block_size', UInt32Serializer],['sbd_interest_rate', UInt16Serializer],])

Const DEFAULT_ADDRESS_PREFIX

DEFAULT_ADDRESS_PREFIX: "STM" = "STM"

Main steem network address prefix.

Const DEFAULT_CHAIN_ID

DEFAULT_CHAIN_ID: Buffer = Buffer.from('0000000000000000000000000000000000000000000000000000000000000000', 'hex')

Main steem network chain id.

Const NETWORK_ID

NETWORK_ID: Buffer = Buffer.from([0x80])

Network id used in WIF-encoding.

Const OperationSerializers

OperationSerializers: object

Type declaration

Const PriceSerializer

PriceSerializer: (Anonymous function) = ObjectSerializer([['base', AssetSerializer],['quote', AssetSerializer],])

Const SignedBlockHeaderSerializer

SignedBlockHeaderSerializer: (Anonymous function) = ObjectSerializer([['previous', BinarySerializer(20)],['timestamp', DateSerializer],['witness', StringSerializer],['transaction_merkle_root', BinarySerializer(20)],['extensions', ArraySerializer(VoidSerializer)],['witness_signature', BinarySerializer(65)],])

Const TransactionSerializer

TransactionSerializer: (Anonymous function) = ObjectSerializer([['ref_block_num', UInt16Serializer],['ref_block_prefix', UInt32Serializer],['expiration', DateSerializer],['operations', ArraySerializer(OperationSerializer)],['extensions', ArraySerializer(StringSerializer)],])

Const VERSION

VERSION: string = packageVersion

Library version.

Const VariableBinarySerializer

VariableBinarySerializer: (Anonymous function) = BinarySerializer()

Const fetch

fetch: any = global['fetch']

Functions

Const ArraySerializer

  • ArraySerializer(itemSerializer: Serializer): (Anonymous function)

Const AssetSerializer

  • AssetSerializer(buffer: ByteBuffer, data: Asset | string | number): void

Const BinarySerializer

  • BinarySerializer(size?: undefined | number): (Anonymous function)

Const BooleanSerializer

  • BooleanSerializer(buffer: ByteBuffer, data: boolean): void

Const DateSerializer

  • DateSerializer(buffer: ByteBuffer, data: string): void

Const FlatMapSerializer

Const Int16Serializer

  • Int16Serializer(buffer: ByteBuffer, data: number): void

Const Int32Serializer

  • Int32Serializer(buffer: ByteBuffer, data: number): void

Const Int64Serializer

  • Int64Serializer(buffer: ByteBuffer, data: number): void

Const Int8Serializer

  • Int8Serializer(buffer: ByteBuffer, data: number): void

Const ObjectSerializer

  • ObjectSerializer(keySerializers: Array<[string, Serializer]>): (Anonymous function)

Const OperationDataSerializer

  • OperationDataSerializer(operationId: number, definitions: Array<[string, Serializer]>): (Anonymous function)

Const OperationSerializer

  • OperationSerializer(buffer: ByteBuffer, operation: Operation): void

Const OptionalSerializer

  • OptionalSerializer(valueSerializer: Serializer): (Anonymous function)

Const PublicKeySerializer

  • PublicKeySerializer(buffer: ByteBuffer, data: PublicKey | string | null): void

Const StaticVariantSerializer

  • StaticVariantSerializer(itemSerializers: Serializer[]): (Anonymous function)

Const StringSerializer

  • StringSerializer(buffer: ByteBuffer, data: string): void

Const UInt16Serializer

  • UInt16Serializer(buffer: ByteBuffer, data: number): void

Const UInt32Serializer

  • UInt32Serializer(buffer: ByteBuffer, data: number): void

Const UInt64Serializer

  • UInt64Serializer(buffer: ByteBuffer, data: number): void

Const UInt8Serializer

  • UInt8Serializer(buffer: ByteBuffer, data: number): void

Const VoidSerializer

  • VoidSerializer(buffer: ByteBuffer): never

buildWitnessUpdateOp

copy

  • copy<T>(object: T): T
  • Return a deep copy of a JSON-serializable object.

    Type parameters

    • T

    Parameters

    • object: T

    Returns T

decodePrivate

  • decodePrivate(encodedKey: string): Buffer
  • Decode bs58+doubleSha256-checksum encoded private key.

    Parameters

    • encodedKey: string

    Returns Buffer

decodePublic

  • decodePublic(encodedKey: string): object
  • Decode bs58+ripemd160-checksum encoded public key.

    Parameters

    • encodedKey: string

    Returns object

    • key: Buffer
    • prefix: string

Const defaultBackoff

  • defaultBackoff(tries: number): number
  • Default backoff function. min(tries*10^2, 10 seconds)

    Parameters

    • tries: number

    Returns number

doubleSha256

  • doubleSha256(input: Buffer | string): Buffer
  • Return 2-round sha256 hash of input.

    Parameters

    • input: Buffer | string

    Returns Buffer

encodePrivate

  • encodePrivate(key: Buffer): string
  • Encode bs58+doubleSha256-checksum private key.

    Parameters

    • key: Buffer

    Returns string

encodePublic

  • encodePublic(key: Buffer, prefix: string): string
  • Encode public key with bs58+ripemd160-checksum.

    Parameters

    • key: Buffer
    • prefix: string

    Returns string

getVestingSharePrice

getVests

  • getVests(account: Account, subtract_delegated?: boolean, add_received?: boolean): number
  • Returns the vests of specified account. Default: Subtract delegated & add received

    Parameters

    • account: Account
    • Default value subtract_delegated: boolean = true
    • Default value add_received: boolean = true

    Returns number

isCanonicalSignature

  • isCanonicalSignature(signature: Buffer): boolean
  • Return true if signature is canonical, otherwise false.

    Parameters

    • signature: Buffer

    Returns boolean

iteratorStream

  • iteratorStream<T>(iterator: AsyncIterableIterator<T>): ReadableStream
  • Return a stream that emits iterator values.

    Type parameters

    • T

    Parameters

    • iterator: AsyncIterableIterator<T>

    Returns ReadableStream

retryingFetch

  • retryingFetch(url: string, opts: any, timeout: number, backoff: function, fetchTimeout?: undefined | function): Promise<any>
  • Fetch API wrapper that retries until timeout is reached.

    Parameters

    • url: string
    • opts: any
    • timeout: number
    • backoff: function
        • (tries: number): number
        • Parameters

          • tries: number

          Returns number

    • Optional fetchTimeout: undefined | function

    Returns Promise<any>

ripemd160

  • ripemd160(input: Buffer | string): Buffer
  • Return ripemd160 hash of input.

    Parameters

    • input: Buffer | string

    Returns Buffer

serialize

  • serialize(serializer: Serializer, data: any): Buffer

sha256

  • sha256(input: Buffer | string): Buffer
  • Return sha256 hash of input.

    Parameters

    • input: Buffer | string

    Returns Buffer

signTransaction

sleep

  • sleep(ms: number): Promise<void>
  • Sleep for N milliseconds.

    Parameters

    • ms: number

    Returns Promise<void>

transactionDigest

  • Return the sha256 transaction digest.

    Parameters

    • transaction: Transaction | SignedTransaction
    • Default value chainId: Buffer = DEFAULT_CHAIN_ID

      The chain id to use when creating the hash.

    Returns Buffer

waitForEvent

  • waitForEvent<T>(emitter: EventEmitter, eventName: string | symbol): Promise<T>
  • Return a promise that will resove when a specific event is emitted.

    Type parameters

    • T

    Parameters

    • emitter: EventEmitter
    • eventName: string | symbol

    Returns Promise<T>

Object literals

Const Types

Types: object

Array

Array: ArraySerializer = ArraySerializer

Asset

Asset: AssetSerializer = AssetSerializer

Authority

Authority: (Anonymous function) = AuthoritySerializer

Binary

Binary: BinarySerializer = BinarySerializer

Boolean

Boolean: BooleanSerializer = BooleanSerializer

Date

Date: DateSerializer = DateSerializer

FlatMap

FlatMap: FlatMapSerializer = FlatMapSerializer

Int16

Int16: Int16Serializer = Int16Serializer

Int32

Int32: Int32Serializer = Int32Serializer

Int64

Int64: Int64Serializer = Int64Serializer

Int8

Int8: Int8Serializer = Int8Serializer

Object

Object: ObjectSerializer = ObjectSerializer

Operation

Operation: OperationSerializer = OperationSerializer

Optional

Optional: OptionalSerializer = OptionalSerializer

Price

Price: (Anonymous function) = PriceSerializer

PublicKey

PublicKey: PublicKeySerializer = PublicKeySerializer

StaticVariant

StaticVariant: StaticVariantSerializer = StaticVariantSerializer

String

String: StringSerializer = StringSerializer

Transaction

Transaction: (Anonymous function) = TransactionSerializer

UInt16

UInt16: UInt16Serializer = UInt16Serializer

UInt32

UInt32: UInt32Serializer = UInt32Serializer

UInt64

UInt64: UInt64Serializer = UInt64Serializer

UInt8

UInt8: UInt8Serializer = UInt8Serializer

Void

Void: VoidSerializer = VoidSerializer

Const cryptoUtils

cryptoUtils: object

Misc crypto utility functions.

decodePrivate

decodePrivate: decodePrivate

doubleSha256

doubleSha256: doubleSha256

encodePrivate

encodePrivate: encodePrivate

encodePublic

encodePublic: encodePublic

isCanonicalSignature

isCanonicalSignature: isCanonicalSignature

ripemd160

ripemd160: ripemd160

sha256

sha256: sha256

signTransaction

signTransaction: signTransaction

transactionDigest

transactionDigest: transactionDigest

Generated using TypeDoc