diff --git a/docs/json-cadence-spec.md b/docs/json-cadence-spec.md index 60cab0e..c56d3a9 100644 --- a/docs/json-cadence-spec.md +++ b/docs/json-cadence-spec.md @@ -453,20 +453,69 @@ These are basic types like `Int`, `String`, or `StoragePath`. ```json { - "kind": "Any" | "AnyStruct" | "AnyResource" | "AnyStructAttachment" | "AnyResourceAttachment" | "Type" | - "Void" | "Never" | "Bool" | "String" | "Character" | - "Bytes" | "Address" | "Number" | "SignedNumber" | - "Integer" | "SignedInteger" | "FixedPoint" | - "SignedFixedPoint" | "Int" | "Int8" | "Int16" | - "Int32" | "Int64" | "Int128" | "Int256" | "UInt" | - "UInt8" | "UInt16" | "UInt32" | "UInt64" | "UInt128" | - "UInt256" | "Word8" | "Word16" | "Word32" | "Word64" | - "Fix64" | "UFix64" | "Path" | "CapabilityPath" | "StoragePath" | - "PublicPath" | "PrivatePath" | "AuthAccount" | "PublicAccount" | - "AuthAccount.Keys" | "PublicAccount.Keys" | "AuthAccount.Contracts" | - "PublicAccount.Contracts" | "DeployedContract" | "AccountKey" | "Block" -} -``` + "kind": +} +``` + +Where `kind` is one of: + +- `Account` +- `AccountCapabilityController` +- `AccountKey` +- `Address` +- `AnyResource` +- `AnyResourceAttachment` +- `AnyStruct` +- `AnyStructAttachment` +- `Block` +- `Bool` +- `Capability` +- `CapabilityPath` +- `Character` +- `DeployedContract` +- `DeploymentResult` +- `Fix64` +- `FixedPoint` +- `FixedSizeUnsignedInteger` +- `HashAlgorithm` +- `HashableStruct` +- `Int` +- `Int128` +- `Int16` +- `Int256` +- `Int32` +- `Int64` +- `Int8` +- `Integer` +- `Never` +- `Number` +- `Path` +- `PrivatePath` +- `PublicKey` +- `PublicPath` +- `SignatureAlgorithm` +- `SignedFixedPoint` +- `SignedInteger` +- `SignedNumber` +- `StorageCapabilityController` +- `StoragePath` +- `String` +- `Type` +- `UFix64` +- `UInt` +- `UInt128` +- `UInt16` +- `UInt256` +- `UInt32` +- `UInt64` +- `UInt8` +- `Void` +- `Word128` +- `Word16` +- `Word256` +- `Word32` +- `Word64` +- `Word8` ### Example diff --git a/docs/language/environment-information.md b/docs/language/environment-information.md index 36f4a66..480b96d 100644 --- a/docs/language/environment-information.md +++ b/docs/language/environment-information.md @@ -6,7 +6,7 @@ sidebar_position: 29 ## Transaction Information To get the addresses of the signers of a transaction, -use the `address` field of each signing `AuthAccount` +use the `address` field of each signing `Account` that is passed to the transaction's `prepare` phase. There is currently no API that allows getting other transaction information. diff --git a/docs/solidity-to-cadence.md b/docs/solidity-to-cadence.md index 984237f..7903616 100644 --- a/docs/solidity-to-cadence.md +++ b/docs/solidity-to-cadence.md @@ -317,7 +317,7 @@ transaction(addressAmountMap: {Address: UFix64}) { // The Vault resource that holds the tokens that are being transferred let vaultRef: &ExampleToken.Vault - prepare(signer: AuthAccount) { + prepare(signer: auth(Storage) &Account) { // Get a reference to the signer's stored vault self.vaultRef = signer.storage.borrow<&ExampleToken.Vault>(from: ExampleToken.VaultStoragePath) diff --git a/docs/tutorial/08-marketplace-compose.md b/docs/tutorial/08-marketplace-compose.md index 19dcb6b..38cc172 100644 --- a/docs/tutorial/08-marketplace-compose.md +++ b/docs/tutorial/08-marketplace-compose.md @@ -333,7 +333,7 @@ access(all) contract ExampleMarketplace { } // purchase lets a user send tokens to purchase an NFT that is for sale - access(all) fun purchase(tokenID: UInt64, + access(all) fun purchase(tokenID: UInt64, recipient: Capability<&ExampleNFT.Collection>, buyTokens: @ExampleToken.Vault) { pre { self.prices[tokenID] != nil: @@ -395,7 +395,7 @@ access(all) contract ExampleMarketplace { access(all) fun createSaleCollection( ownerCollection: Capability, ownerVault: Capability<&{ExampleToken.Receiver}> - ): @SaleCollection + ): @SaleCollection { return <- create SaleCollection(ownerCollection: ownerCollection, ownerVault: ownerVault) } @@ -485,7 +485,7 @@ Then, users can get that capability from [the public path](../language/accounts/ borrow it, and access the functionality that the owner specified. ```cadence -// Get account 0x06's PublicAccount object +// Get the account object for address 0x06 let publicAccount = getAccount(0x06) // Retrieve a Vault Receiver Capability from the account's public storage