eluv-io / elv-live-js

Eluvio Live JavaScript SDK
MIT License
4 stars 3 forks source link

Add NFT token URI update by hash #133

Closed elv-serban closed 1 year ago

elv-serban commented 1 year ago

New command to simplify updating generative NFTs (where each token may have a different URI). The new command just takes a new hash (hq__) and retrieves all the current token URIs, updates just the hash, and sets them back.

By default it runs in dry_run mode and just prints out the new hashes that it would set. So you must specify --dry_run false to get it to set the URIs.

Usage:

./elv-live tenant_update_token_uri
 tenant_update_token_uri <tenant> <addr> <hash> [options]

Reset the token URI(s) for tenant NFT contract(s)

Positionals:
  tenant  Tenant ID                                          [string] [required]
  addr    NFT contract address                               [string] [required]
  hash    New NFT template object hash                       [string] [required]

Options:
      --version  Show version number                                   [boolean]
  -v, --verbose  Verbose mode                                          [boolean]
      --as_url   Alternate authority service URL (include '/as/' route if
                 necessary)                                             [string]
      --help     Show help                                             [boolean]
      --dry_run  Default 'true'                                        [boolean]

Example:

./elv-live tenant_update_token_uri iten4TXq2en3qtu3JREnE5tSLRf9zLod  0xb914ad493a0a4fe5a899dc21b66a509bcf8f1ed9 hq__LUSGZREUAjYHRqz8mDxFDBX94M4UyyCTKx732gt82KdnauuSx5TadVXu3zDAmARQeCuMtDxLWr