Class

Spec

Spec(entries) → {Promise.<module:contract.Client>}

Constructor

# new Spec(entries) → {Promise.<module:contract.Client>}

Generates a Spec instance from contract specs in any of the following forms:

  • An XDR encoded stream of xdr.ScSpecEntry entries, the format of the spec stored inside Wasm files.
  • A base64 XDR encoded stream of xdr.ScSpecEntry entries.
  • An array of xdr.ScSpecEntry.
  • An array of base64 XDR encoded xdr.ScSpecEntry.
Parameters:
Name Type Description
entries Buffer | string | Array | Array

View Source lib/contract/spec.d.ts, line 36

If the contract spec cannot be obtained from the provided wasm binary.

Error

A Promise that resolves to a Client instance.

Promise.<module:contract.Client>