Griptape.js
  • What is Griptape.js?
  • 🛹Getting Started
  • 🚀Bootstrapping Your App
  • 🗞️Interacting with Contracts
    • Contract Definitions
      • More on Definitions
    • Creating Contract Clients
    • Built-In Definitions
    • Extending Contract Definitions
    • Contract Registry
    • Instantiating Contracts
  • 🔑Using Viewing Keys and Permits
    • Using the viewing key manager
    • Using Keplr with Griptape
    • Managing Permits
  • 🕢Handling Events
  • ⚒️Using Utilities
  • 🔀API Reference
    • Bootstrap
    • Contracts
    • Viewing Keys
    • Permits
    • Events
    • Utilities
  • 🐝Tricks Tutorials
    • React Tutorials
      • Hello, Griptape
      • Hello, Contracts
      • Hello, Events
      • Hello, Viewing Keys
      • Hello, Permits
      • Hello, Transactions
      • Hello, Mint
    • Vue Tutorials
      • Hello, Griptape
      • Hello, Contracts
      • Hello, Events
      • Hello, Viewing Keys
      • Hello, Permits
      • Hello, Transactions
      • Hello, Mint
  • 💾Hackathon
    • Welcome Packet
    • Getting Set Up
    • Glossary
Powered by GitBook
On this page
  • enablePermit(BaseContract, string[])
  • hasPermit(BaseContract)
  1. API Reference

Permits

PreviousViewing KeysNextEvents

Last updated 3 years ago

enablePermit(, string[])

Arguments:

  • {}: a contract specification object

  • {string[]}: string permissions array.

Returns: Nothing.

Description: This function receives a contract object and a permissions array, then gets the contract address so it can check in local storage if that contract has permit. If the contract does not have a permit, then an encrypted signature is created with your wallet, which is then sent to the contract, which is able to validate whether that signature is yours or not.

Finally, the permit is added to the local storage.

hasPermit()

Arguments:

  • {}: a contract specification object.

Returns: Nothing.

Description: This function receives a contract object, then gets its address so it can check in local storage if that contract has permit if so it returns true, otherwise it returns false.

🔀
BaseContract
BaseContract
BaseContract
BaseContract