You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
mleku 9f39ca8a62
Refactor export functionality in App.svelte to support both GET and POST methods for event exports, enhancing flexibility in user permissions. Update server-side handling to accommodate pubkey filtering and improve response handling for file downloads. Adjust UI components to reflect these changes, ensuring a seamless user experience.
3 months ago
..
README.md Refactor export functionality in App.svelte to support both GET and POST methods for event exports, enhancing flexibility in user permissions. Update server-side handling to accommodate pubkey filtering and improve response handling for file downloads. Adjust UI components to reflect these changes, ensuring a seamless user experience. 3 months ago
client.go Add NWC protocol handling and NIP-44 encryption and decryption functions. 4 months ago
crypto_test.go Add NWC protocol handling and NIP-44 encryption and decryption functions. 4 months ago
mock_wallet_service.go Add NWC protocol handling and NIP-44 encryption and decryption functions. 4 months ago
nwc_test.go Add NWC protocol handling and NIP-44 encryption and decryption functions. 4 months ago
uri.go Add NWC protocol handling and NIP-44 encryption and decryption functions. 4 months ago

README.md

NWC Client

Nostr Wallet Connect (NIP-47) client implementation.

Usage

import "orly.dev/pkg/protocol/nwc"

// Create client from NWC connection URI
client, err := nwc.NewClient("nostr+walletconnect://...")
if err != nil {
    log.Fatal(err)
}

// Make requests
var info map[string]any
err = client.Request(ctx, "get_info", nil, &info)

var balance map[string]any
err = client.Request(ctx, "get_balance", nil, &balance)

var invoice map[string]any
params := map[string]any{"amount": 1000, "description": "test"}
err = client.Request(ctx, "make_invoice", params, &invoice)

Methods

  • get_info - Get wallet info
  • get_balance - Get wallet balance
  • make_invoice - Create invoice
  • lookup_invoice - Check invoice status
  • pay_invoice - Pay invoice

Payment Notifications

// Subscribe to payment notifications
err = client.SubscribeNotifications(ctx, func(notificationType string, notification map[string]any) error {
    if notificationType == "payment_received" {
        amount := notification["amount"].(float64)
        description := notification["description"].(string)
        // Process payment...
    }
    return nil
})

Features

  • NIP-44 encryption
  • Event signing
  • Relay communication
  • Payment notifications
  • Error handling