miner7777 has asked for the wisdom of the Perl Monks concerning the following question:

Does anyone have working Perl code for Coinbase Advanced API authentication? It uses json web tokens and 256-bit ECC cryptography. I have been at it for several days now and can get close, but have run into issues I cannot resolve. Tried Crypt::JWT for ES256 when using ActiveState Perl on Windows 10. The Python example that Coinbase provides works in Python 3.8, but I have not successfully translated it to Perl. Thanks!

Replies are listed 'Best First'.
Re: Coinbase Advanced API
by marto (Cardinal) on Feb 07, 2024 at 14:17 UTC

      Or maybe even providing the code you've already written so someone has something to maybe actually look at and perhaps point out problem(s).

      But it's probably that thing you did on line 134. It's ALWAYS line 134.

      The cake is a lie.
      The cake is a lie.
      The cake is a lie.

Re: Coinbase Advanced API
by perlfan (Parson) on Feb 29, 2024 at 05:15 UTC
    With most APIs, the most time will be spent on getting Authentication right, I've study more than a few Python clients so that is a good suggestion if that one works, just to see how they do the auth. You can link the Python code if your goal is to replicate the auth scheme. Better even, accurate developer docs :-)
Re: Coinbase Advanced API
by perlfan (Parson) on Aug 25, 2024 at 20:10 UTC
    I know I am late to the party, but I concur that dealing with authentication is 90% of the hurdle. I've had do all kinds of things like examine Python code before - not that it's easy to tease out. The general things you need tend to be the same like, MIME::Base64 and Digest::SHA, but the way they want you to combine strings (keys, usernames, password) and the headers they want you to provide are always a crap shoot.

    I am not going to post the code because idk if it's correct and it seems wrong to do in the monastery, but chatgpt seems to be happy suggesting a Perl solution for this. If you make some progress and have questions, please report back.

    update: this is awkward, I was gone so long I forgot I had replied to this and didn't even notice. hopefully the additional info is helpful