Create an Account in Cadence

cadence
		
			transaction(publicKey: String) {
  prepare(signer: AuthAccount) {
    let key = PublicKey(
        publicKey: publicKey.decodeHex(),
        signatureAlgorithm: SignatureAlgorithm.ECDSA_P256
    )

    let account = AuthAccount(payer: signer)

    account.keys.add(
        publicKey: key,
        hashAlgorithm: HashAlgorithm.SHA3_256,
        weight: 1000.0
    )
  }
}