NillionNetwork / builder-resources

This repository contains code examples, SDK release bundles and helpful tooling for the Nillion builders

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] missing BlobSecret in python client

wwwehr opened this issue · comments

Describe the bug
I expect that the python client would have a way to encode bytes into a secret type. This doesn't appear in the docs nor is it clear how to implement it in the case that the types cast automagically.

How to reproduce
Experimentally following the established naming conventions I tried the following code:

my_blob1 = py_nillion_client.SecretBlob(bytearray("this is a string"))

Also, when inspecting the python client library I don't see the expected BlobSecret as I can see the others.

dir(py_nillion_client)
['ComputeFinishedEvent', 'ComputeScheduledEvent', 'ConnectionMode', 'FinalResult', 'NillionClient', 'NodeKey', 'PaymentsConfig', 'Permissions', 'ProgramBindings', 'PublicVariableInteger', 'PublicVariableUnsignedInteger', 'PublicVariables', 'SecretInteger', 'SecretUnsignedInteger', 'Secrets', 'UserKey', '__all__', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', 'py_nillion_client', 'version']

Expected behavior
I expect arbitrary data to be stored onto the Nillion network.

Code links

  • n/a

Desktop (please complete the following information):

  • OS: linux
  • Browser n/a
  • Version n/a

Example of this usage is found here
1420f6a

    my_blob1 = py_nillion_client.SecretBlob(
        bytearray("this is a test blob".encode("utf-8"))
    )