Open sezaru opened 6 years ago
Hello,
I'm trying to use your library inside an Elixir project to deserialize a LND macaroon admin.macaroon file.
admin.macaroon
I'm using this code inside the REPL:
{:ok, file} = File.read "admin.macaroon" encoded = Base.encode64(file) {:ok, mac} = :macaroon.deserialize(encoded)
which will give me the error:
** (MatchError) no match of right hand side value: {:error, :macaroon_invalid}
Testing the same file with pythons pymacaroons works, so it seems a specific deserialization problem with the library.
Since I cannot paste here the binary data from admin.macaroon I will post a link to the file directly and also the base64 with it: admin.macaroon
AgEDbG5kArsBAwoQ5TMSJjie992RIEsCGCuq5xIBMBoWCgdhZGRyZXNzEgRyZWFkEgV3cml0ZRoTCgRpbmZvEgRyZWFkEgV3cml0ZRoXCghpbnZvaWNlcxIEcmVhZBIFd3JpdGUaFgoHbWVzc2FnZRIEcmVhZBIFd3JpdGUaFwoIb2ZmY2hhaW4SBHJlYWQSBXdyaXRlGhYKB29uY2hhaW4SBHJlYWQSBXdyaXRlGhQKBXBlZXJzEgRyZWFkEgV3cml0ZQAABiBoyNHs3jlsGlXIZEV8HtJuIiCh+vA56AFg9poHdCG6zA==
Thanks for the report, I'll look into it shortly
@sezaru can you try branch v2-serialization?
Very nice! It works like a charm with the v2-serialization.
Hello,
I'm trying to use your library inside an Elixir project to deserialize a LND macaroon
admin.macaroon
file.I'm using this code inside the REPL:
which will give me the error:
Testing the same file with pythons pymacaroons works, so it seems a specific deserialization problem with the library.
Since I cannot paste here the binary data from admin.macaroon I will post a link to the file directly and also the base64 with it: admin.macaroon
AgEDbG5kArsBAwoQ5TMSJjie992RIEsCGCuq5xIBMBoWCgdhZGRyZXNzEgRyZWFkEgV3cml0ZRoTCgRpbmZvEgRyZWFkEgV3cml0ZRoXCghpbnZvaWNlcxIEcmVhZBIFd3JpdGUaFgoHbWVzc2FnZRIEcmVhZBIFd3JpdGUaFwoIb2ZmY2hhaW4SBHJlYWQSBXdyaXRlGhYKB29uY2hhaW4SBHJlYWQSBXdyaXRlGhQKBXBlZXJzEgRyZWFkEgV3cml0ZQAABiBoyNHs3jlsGlXIZEV8HtJuIiCh+vA56AFg9poHdCG6zA==