Git Product home page Git Product logo

flow-api's Introduction

Flow API

⚠️ Due large amount of usage, we have to disable the public API for now. ⚠️

⚠️ Here is the instruction to deploy the project ⚠️

For network, by default the network is mainnet, if you want to query in testnet Just add network=testnet query on the url

http://localhost:3000/api/{endpoint}?network=testnet

NFT Catalog API

All NFT collection

http://localhost:3000/api/nft/collections

Single NFT collection

http://localhost:3000/api/nft/collection?collectionIdentifier={collectionIdentifier}

http://localhost:3000/api/nft/collection?collectionIdentifier=Flovatar

Single NFT

http://localhost:3000/api/nft/single?address={address}&id={nftID}&collectionIdentifier={NFTCollectionID}

http://localhost:3000/api/nft/single?address=0x95601dba5c2506eb&id=1343&collectionIdentifier=Flovatar

Get all NFT IDs under one account

http://localhost:3000/api/nft/id?address={address}

http://localhost:3000/api/nft/id?address=0x95601dba5c2506eb

Get all NFTs under one account with pagination

http://localhost:3000/api/nft/list?address={address}&offset={offset}&limit={limit}

http://localhost:3000/api/nft/list?address=0x95601dba5c2506eb&offset=0&limit=10

Get NFTs under one account and specific collection with pagination

http://localhost:3000/api/nft/collectionList?address={address}&offset={offset}&limit={limit}&collectionIdentifier={NFTCollectionID}

http://localhost:3000/api/nft/collectionList?address=0x95601dba5c2506eb&offset=0&limit=10&collectionIdentifier=Flovatar

Generate NFT init transaction

http://localhost:3000/api/nft/generateInit?collectionIdentifier={NFTCollectionID}

http://localhost:3000/api/nft/generateInit?collectionIdentifier=Flovatar

Transaction Template API (FLIX)

Query Transaction Template (POST)

http://localhost:3000/api/template

{
    "cadence": "import FungibleToken from 0x9a0766d93b6608b7\ntransaction(amount: UFix64, to: Address) {\nlet vault: @FungibleToken.Vault\nprepare(signer: AuthAccount) {\nself.vault <- signer\n.borrow<&{FungibleToken.Provider}>(from: /storage/flowTokenVault)!\n.withdraw(amount: amount)\n}\nexecute {\ngetAccount(to)\n.getCapability(/public/flowTokenReceiver)!\n.borrow<&{FungibleToken.Receiver}>()!\n.deposit(from: <-self.vault)\n}\n}",
    "network": "testnet"
}

or

http://localhost:3000/api/template?network=testnet

{
    "cadence_base64":"aW1wb3J0IEZ1bmdpYmxlVG9rZW4gZnJvbSAweDlhMDc2NmQ5M2I2NjA4YjcKdHJhbnNhY3Rpb24oYW1vdW50OiBVRml4NjQsIHRvOiBBZGRyZXNzKSB7CmxldCB2YXVsdDogQEZ1bmdpYmxlVG9rZW4uVmF1bHQKcHJlcGFyZShzaWduZXI6IEF1dGhBY2NvdW50KSB7CnNlbGYudmF1bHQgPC0gc2lnbmVyCi5ib3Jyb3c8JntGdW5naWJsZVRva2VuLlByb3ZpZGVyfT4oZnJvbTogL3N0b3JhZ2UvZmxvd1Rva2VuVmF1bHQpIQoud2l0aGRyYXcoYW1vdW50OiBhbW91bnQpCn0KZXhlY3V0ZSB7CmdldEFjY291bnQodG8pCi5nZXRDYXBhYmlsaXR5KC9wdWJsaWMvZmxvd1Rva2VuUmVjZWl2ZXIpIQouYm9ycm93PCZ7RnVuZ2libGVUb2tlbi5SZWNlaXZlcn0+KCkhCi5kZXBvc2l0KGZyb206IDwtc2VsZi52YXVsdCkKfQp9",
}

Domain API

Query domain by address

http://localhost:3000/api/domain?address={address}

http://localhost:3000/api/domain?address=0x84221fe0294044d7

Query address by domain name

http://localhost:3000/api/domain/address?name={name}

http://localhost:3000/api/domain/address?name=flow

Account Creation

Please refer to this repo https://github.com/Outblock/flow-account-api

flow-api's People

Contributors

lmcmz avatar morganpage avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.