Returning part of a dataset / vector equivalent

If I have an application that uses data validation:

pub struct Dataset {
    a: String,
    b: String,
    c: String,
    d: String,

I want dataset.a to populate elements in the UI to give users a name for the data they are validating against but b,c,d to remain secret.

Right now I have a public function that returns vector consisting of all dataset.a . But when trying to write a test for this function - I’m not sure of the solidity equivalent to a vector.

Does this approach make sense ?

Sorry for any conceptual misunderstandings…

1 Like

@izokay I’m not sure if I follow your question cc @ainsley

@can I have a secret contract function that returns a vector. Then to get this output I would use something like

        type: '',
        name: '',
    }], task.decryptedOutput)

I am not sure of the type to use that would match a Rust vector. From what I understand I can’t return an array either because the data I return doesn’t have a fixed size

Ahh nevermind… it’s type:'<type>[]'

1 Like