0.0.4 • Published 9 months ago

@onflow/six-topshot-setup-collection v0.0.4

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
9 months ago

@onflow/six-topshot-setup-collection

Stored Interaction for setting up an account with an NBA TopShot collection.

Status

  • Last Updated: Sept 22 2021
  • Stable: No
  • Risk of Breaking Change: Very High

Known Upcoming Changes:

  • Potential changes to all aspects of Stored Interactions

Install

npm install @onflow/six-topshot-setup-collection

Configuration

To use this Stored Interaction, you must configure FCL with certain account addresses which contain contracts imported by this Stored Interaction.

DependenciesMainnetTestnet
0xTOPSHOT0x0b2a3299cc857e290x877931736ee77cff

Example (for mainnet):

fcl.config()
  .put("0xTOPSHOT", "0x0b2a3299cc857e29")

Example (for testnet):

fcl.config()
  .put("0xTOPSHOT", "0x877931736ee77cff")

Usage:

import * as fcl from "@onflow/fcl"
import { template as topshotSetupCollection } from "@onflow/six-topshot-setup-collection"

fcl.config().put("accessNode", "http://localhost:8080");

const response = await fcl.send([
  topshotSetupCollection({
    proposer: fcl.currentUser().authorization,
    authorization: fcl.currentUser().authorization,     
    payer: fcl.currentUser().authorization,             
  })
])

Hashing

Hashing Code:

  console.log(crypto.createHash('sha256').update(CODE, 'utf8').digest('hex'))
0.0.2-alpha.0

10 months ago

0.0.3

9 months ago

0.0.2

9 months ago

0.0.4

9 months ago

0.0.1

3 years ago