Skip to content

.js_ref needed in some places to make things work #40

Closed

Description

@dan-distributive

Example: this doesn't work:

id = wallet.get("id")
dcp.identity.set(id)

But this does!

id = wallet.get("id").js_ref
dcp.identity.set(id)

There are a few other places where that's the case too:
dcp.compute.marketValue() # doesn't work
vs.
dcp.compute.marketValue().js_ref. # works

Is there a clean or even a hacky way to modify bifrost2 to either generally or selectively fix these (or other) calls?

Min repro:

import dcp
dcp.init()

ks = dcp.wallet.get("id")
dcp.identity.set(ks)

Uncaught TypeError: Address must be composed of only hex digits; [object Object] is invalid
dcpEth$$Address@/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/dcp/js/node_modules/dcp-client/dist/dcp-client-bundle.js:1:1206757
62272/wallet$$Keystore/<@/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/dcp/js/node_modules/dcp-client/dist/dcp-client-bundle.js:1:1220709
wallet$$Keystore@/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/dcp/js/node_modules/dcp-client/dist/dcp-client-bundle.js:1:1223804
wallet$$IdKeystore@/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/dcp/js/node_modules/dcp-client/dist/dcp-client-bundle.js:1:1224728
identity$$set@/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/dcp/js/node_modules/dcp-client/dist/dcp-client-bundle.js:1:1127597
Uncaught Error: Python TypeError: 'NoneType' object is not callable

Activity

  1. dan-distributive commented on Jan 12, 2026

    @dan-distributive
    Author

    We'll do the work! just looking for advice or guidance :)

  2. JosephAcernese commented on Apr 23, 2026

    @JosephAcernese
    Contributor

    Resolved in PR #42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions