How to get access to Prim.prinicipalOfBlob

I’m trying to use the new Principal.fromBlob method in the base library, unfortunately it seems like my version of the Prim doesn’t include that yet, is there anyway to update it? I’m on dfx 0.8.4 and moc 0.6.11 and use vessel to fetch the base library from master.

@claudio @rossberg

1 Like

The odd thing is that the method is shown in the documentation, but only available on moc 0.6.20, while dfx 0.8.4 ships with

  • moc 0.6.11
  • some version of the base library (there’s only one release from dfx 0.5.13 in the repo)

Would be nice if the docs enable to change to different versions of dfx to display the base library that’s shipped with them, currently one can always only view the master branch afaik.

@nomeata

I was able to solve the problem by:

  1. changing the compiler version in vessel.dhall to 0.6.20
  2. running vessel bin
  3. copying the files in this directory into dfx cache show

dfx 0.8.5 is out and should support the primitive, but you might still need to patch the base lib (I think it might not include that commit).

DFX_VERSION=0.8.5 sh -ci “$(curl -fsSL https://smartcontracts.org/install.sh)”

2 Likes

Thanks Claudio, that’s way easier! Is there a way to now what release of the base library dfx ships with? Why is there only one release, wouldn’t it be nice to have releases in the base library repo that point to the dfx version, too?

The compiler should be packaged with the commit of base listed here.

I’ll see if I can update the tags on motoko-base.

And yes, this should be easier…

2 Likes

is this something we can consider though?