Vishal | Flow
Vishal | Flow
FFlow
Created by ElDumbo on 5/21/2024 in #🛠│developer-questions
Luke | Flow Community (2024-05-21)
8 replies
FFlow
Created by ElDumbo on 5/21/2024 in #🛠│developer-questions
Luke | Flow Community (2024-05-21)
if you are using REST, then the API is here: https://developers.flow.com/http-api
8 replies
FFlow
Created by ElDumbo on 5/21/2024 in #🛠│developer-questions
Luke | Flow Community (2024-05-21)
gRPC endpoints are documented here - https://developers.flow.com/networks/node-ops/access-onchain-data/access-nodes/accessing-data/access-api flow cli uses gRPC and to get the latest block you do flow blocks get latest -n mainnet
8 replies
FFlow
Created by Vishal | Flow on 3/1/2024 in #🛠│developer-questions
vishal (2024-03-01)
6 replies
FFlow
Created by Vishal | Flow on 3/1/2024 in #🛠│developer-questions
vishal (2024-03-01)
New script - pub fun main(ownerAddress: Address) : {String : [UInt64]} { let account = getAuthAccount(ownerAddress) let items : {String : [UInt64]} = {} NFTCatalog.forEachCatalogKey(fun (key: String): Bool { // but how do I get hold of the catalog here? to do a catalog[key]
6 replies
FFlow
Created by Vishal | Flow on 3/1/2024 in #🛠│developer-questions
vishal (2024-03-01)
Old script - import MetadataViews from 0x1d7e57aa55817448 import NFTCatalog from 0x49a7cda3a1eecc29 import NFTRetrieval from 0x49a7cda3a1eecc29 pub fun main(ownerAddress: Address) : {String : [UInt64]} { let catalog = NFTCatalog.getCatalog() // Want to replace this call as per deprecation notice let account = getAuthAccount(ownerAddress) let items : {String : [UInt64]} = {} for key in catalog.keys { let value = catalog[key]! let tempPathStr = "catalogIDs".concat(key) if let tempPublicPath = PublicPath(identifier: tempPathStr) { account.link<&{MetadataViews.ResolverCollection}>( tempPublicPath, target: value.collectionData.storagePath ) let collectionCap = account.getCapability<&AnyResource{MetadataViews.ResolverCollection}>(tempPublicPath) if !collectionCap.check() { continue } let ids = NFTRetrieval.getNFTIDsFromCap(collectionIdentifier : key, collectionCap : collectionCap) if ids.length > 0 { items[key] = ids } } } return items }
6 replies
FFlow
Created by Vishal | Flow on 3/1/2024 in #🛠│developer-questions
vishal (2024-03-01)
I found a script that uses the old function call..and am trying to figure out how to use the new call..specifically, how to get hold of the catalog within the function that is passed in
6 replies
FFlow
Created by Vishal | Flow on 3/1/2024 in #🛠│developer-questions
vishal (2024-03-01)
6 replies