You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create an info() method that calls that endpoint without auth.
The method should be micropay(url, tokenTypeHash, amount) . The method should:
spin up another TwinClient for the provided url and call info() on it.
get the destinationAddress from there; also verify that tokenTypeHash and amountmakes sense, otherwise error intelligently using a custom error of type TwinMicropayError , subclassed from TwinError. The custom errors can be subclassed further into TwinMicropayAmountMismatchError and TwinMicropayTokenMismatchError.
Then attempt to perform the payment and proxying. Stream results back to the user. Convert any errors we don't know about into TwinErrors.
The text was updated successfully, but these errors were encountered:
The method should be micropay(url, tokenTypeHash, amount) . ...
Enterprise server can accept any http method + body if required by the paywall server. micropay(url, tokenTypeHash, amount) signature doesn't allow for anything but a request with a predetermined method (GET?) and no body.
Alternatively we could add optional request config like micropay(url, tokenTypeHash, amount, { method?, body?})
Class constructor signature should be TwinClient({url: "https://blah.blah.biz.todaq.net/", apiKey: "xyz"}).
Create an info() method that calls that endpoint without auth.
The method should be micropay(url, tokenTypeHash, amount) . The method should:
The text was updated successfully, but these errors were encountered: