0.0.4 • Published 9 months ago

@onflow/six-topshot-transfer-moment 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
0xNONFUNGIBLETOKEN0x1d7e57aa558174480x631e88ae7f1d7c20

Example (for mainnet):

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

Example (for testnet):

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

Usage:

import * as fcl from "@onflow/fcl"
import { template as topshotTransferMoment } from "@onflow/six-topshot-transfer-moment"

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

const response = await fcl.send([
  topshotTransferMoment({
    proposer: fcl.currentUser().authorization,
    authorization: fcl.currentUser().authorization,     
    payer: fcl.currentUser().authorization,
    recipient: "0xABC123DEF456",  // Address of the account to transfer the moment to
    withdrawID: "123"             // ID of the moment to transfer
  })
])

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