Closed dangdennis closed 2 years ago
If I start my server without authentication, I get
[error] Unexpected event in state :domain_lookup of type :info:
{:timeout, #Reference<0.2556804254.3388211201.221625>, {:cow_http2_machine, :preface_timeout}}
{:state, #PID<0.487.0>, {:up, #Reference<0.2556804254.3388211201.221607>},
'flow-mainnet.g.alchemy.com', 443, "http", 'flow-mainnet.g.alchemy.com', 443,
[],
%{
http2_opts: %{settings_timeout: :infinity},
protocols: [:http2],
retry: 100,
retry_fun: &GRPC.Adapter.Gun.retry_fun/2,
tcp_opts: [nodelay: true],
transport: :tcp
}, :undefined, :undefined, :gun_tcp, true, {:tcp, :tcp_closed, :tcp_error},
:undefined, :undefined, :gun_default_event_h, :undefined}
Hardly helpful.
Hey @dangdennis! I pushed a branch called metadata
, which should support the :metadata
config option exactly like you have it in your original post.
Can you point your project to the new branch in the repo here and let me know if that works for you?
Thank you! I’ll try asap. I did this exact same thing in my fork but maybe the root connect isn’t doing what I expected. We shall see!
@dangdennis Just pushed another update and tested it with Alchemy. You'll need to add secure: true
to your config, but it should work now.
Pushing the update to hex.
Works for me too.
Heya, we met in the Flow discord long ago when I myself started writing an elixir sdk!
I'd like to pass metadata into the grpc connection to utilize Alchemy's flow node. Their grpc api requires an additional api key in the metadata.
I figured the config api can take in additional keywords, one of which would be
:metadata
. But for the life of me, I can't figure out how to use the pass :metadata to the GRPC.Stub.connect. The lib did implement here - see issue. Ultimately metadata key-vals are passed along as header values.Example API I'm playing with in my fork.