cardano-graphql Provider
rhyslbw opened this issue · 0 comments
1. Hoist the Provider to the core package
The prototype modelled the concept of remote wallets, and required the Provider to be typed as either Cardano
or Wallet
. We have de-scoped this to focus exclusively on client-side wallets, so the concept can be reduced to what is observed here:
cardano-js-sdk/prototype/src/Provider/CardanoProvider.ts
Lines 10 to 15 in 854cf42
Align the Provider
interface with the API defined by Ogmios, as this is a reflection of the Cardano model. i.e :
submitTransaction
->submitTx
queryUtxosByAddress
->utxo
Replace the types defined here with what can be imported by the @cardano-ogmios/client
package:
cardano-js-sdk/prototype/src/Provider/CardanoProvider.ts
Lines 5 to 8 in 854cf42
We will add other methods in later tasks.
2. Create a new package called @cardano-sdk/cardano-graphql-provider
Create an implementation of the provider using @cardano-graphql/client-ts
.
Here's a sample from the prototype:
cardano-js-sdk/prototype/src/lib/Providers/ClientHttpProvider.ts
Lines 1 to 11 in 854cf42
Use the public testnet
for basic tests where applicable, selecting a random address using the explorer. It's acceptable to defer tests for the submitTx
until we have covered this feature.