Draft
Conversation
Collaborator
Author
|
Here’s another example for using this with supabase native authentication and e2e encryption. apiKey := "sb_publishable_key"
supabaseURL := "https://myrandomstring.supabase.co"
username := "user@domain.com"
password := "mypassword"
response, err := cdk_ffi.SupabaseSignin(supabaseURL, apiKey, username, password)
if err != nil {
return WalletResult{}, err
}
wdb, err := cdk_ffi.WalletSupabaseDatabaseWithSupabaseAuth(supabaseURL,
apiKey)
if err != nil {
return WalletResult{}, fmt.Errorf("failed to create supabase db concetion: %w", err)
}
wdb.SetEncryptionPassword(password, "salt")
wdb.SetJwtToken(&response.AccessToken)
wdb.SetRefreshToken(response.RefreshToken)
err = wdb.KvWrite("test", "namespace", "key", []byte("value"))
if err != nil {
return WalletResult{}, fmt.Errorf("failed to get mint info: %w", err)
}
value, err := wdb.KvRead("test", "namespace", "value")
if err != nil {
return WalletResult{}, fmt.Errorf("failed to get mint info: %w", err)
} |
Resolve conflicts keeping main's 0.15.1 versions and API changes while preserving supabase and auth feature additions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update the Supabase wallet database backend to support main's new WalletDatabase trait methods: - Saga operations: add_saga, get_saga, update_saga (with optimistic locking), delete_saga, get_incomplete_sagas - Proof reservation: reserve_proofs, release_proofs, get_reserved_proofs - Quote reservation: reserve_melt_quote, release_melt_quote, reserve_mint_quote, release_mint_quote - KV store: kv_read, kv_list (delegated from Database trait) Also adds new fields to table structs and conversions: - MintQuote/MeltQuote: used_by_operation, version - ProofInfo: used_by_operation, created_by_operation - Transaction: saga_id Includes SQL migration 002 for new columns and saga table. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…wallet-supabase # Conflicts: # Cargo.lock.msrv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Introducing supabase db to the cdk wallet.
Todo:
call_rpcfunction to invoke custom db rpcSetTokenExpiration(set exp internally based on access token)serde(flatten)?.crate::impl_ffi_wallet_database!This example reuses the keycloak token for auth wallet and supabase.
My supabase is configured to use the jwt token from keycloak for user authentication and RBAC (golang):
Notes to the reviewers
Suggested CHANGELOG Updates
CHANGED
ADDED
REMOVED
FIXED
Checklist
just final-checkbefore committing