From d6463464291c5c9c58756018305d773728208e8a Mon Sep 17 00:00:00 2001 From: darkdrag00n Date: Wed, 31 May 2023 21:58:30 +0530 Subject: [PATCH] Add docs for AuthAccount.check --- docs/cadence/language/accounts.mdx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/cadence/language/accounts.mdx b/docs/cadence/language/accounts.mdx index 7e4a796dfb..4cf2fc6a87 100644 --- a/docs/cadence/language/accounts.mdx +++ b/docs/cadence/language/accounts.mdx @@ -221,6 +221,14 @@ pub struct AuthAccount { /// The path must be a storage path, i.e., only the domain `storage` is allowed pub fun borrow(from: StoragePath): T? + /// Returns true if the object in account storage under the given path satisfies the given type, + /// i.e. could be borrowed using the given type. + /// + /// The given type must not necessarily be exactly the same as the type of the borrowed object. + /// + /// The path must be a storage path, i.e., only the domain `storage` is allowed. + pub fun check(from: StoragePath): Bool + /// Creates a capability at the given public or private path, /// which targets the given public, private, or storage path. ///