Skip to content
VerifiedXVerifiedX Docs
verifiedx.io
verifiedx.io

Smart Contracts

This section covers integration for VFX Smart Contracts with third party applications via the Core CLI’s API.

Check out this repository, which includes full examples of the smart contract integrations in Node.js. It predates the VerifiedX rebrand and still lives under the legacy ReserveBlockIO organization: https://github.com/ReserveBlockIO/rbx-integration-js-examples

  1. You will need a core CLI running with its API enabled

    • Either press 10 to enable the API in the CLI’s interface
    • Or, you can launch it like so: ./VerifiedXCore enableapi
  2. If the wallet will be running on an alternate machine, you’ll need to enable the openapi flag when launching

    • ./VerifiedXCore enableapi openapi
    • This will allow you to communicate to the CLI’s API outside of localhost
  3. If you run it with openapi, you must also seed an apitoken. Without an apitoken (or an APIPassword with AlwaysRequireAPIPassword=true), the node refuses openapi and keeps the API on localhost.

    • ./VerifiedXCore enableapi openapi apitoken=random_lowercase_string
    • Then, in all requests you will need to add this key/value into your headers: {"apitoken": "random_lowercase_string"}
    • If this is not included and/or is not the correct token, the API will throw a 403 error
  4. There are many more API endpoints available. Visit http://localhost:7292/swagger on the machine running the CLI+API to review and interact with everything that’s available. Under openapi, Swagger answers only requests that carry the apitoken header.

  5. You’ll see a reference to CLI_BASE_URL throughout the examples. This should be set to http://localhost:7292 in most cases.

  1. Compiling & Minting

  2. Transferring NFTs

  3. Burning NFTs

  4. Evolving NFTs

  5. Auction Houses

  6. Collections

  7. Listings