Implement NIP-19 bech32-encoded private and public keys

https://github.com/nostr-protocol/nips/blob/master/19.md
This commit is contained in:
Wilson Silva
2023-11-20 09:59:27 +07:00
parent 3fffcd1a4e
commit 3520cf8219
58 changed files with 1189 additions and 104 deletions

45
sig/vendor/faye/websocket/api.rbs vendored Normal file
View File

@@ -0,0 +1,45 @@
# Added only to satisfy the Steep requirements. Not 100% reliable.
module Faye
class WebSocket
module API
CONNECTING: Integer
OPEN: Integer
CLOSING: Integer
CLOSED: Integer
CLOSE_TIMEOUT: Integer
@driver: untyped
@ping: nil
@ping_id: Integer
@stream: nil
@proxy: nil
@ping_timer: nil
@close_timer: nil
@close_params: [String, Integer]?
@onerror: nil
@onclose: nil
@onmessage: nil
@onopen: nil
attr_reader url: untyped
attr_reader ready_state: Integer
attr_reader buffered_amount: Integer
def initialize: (?Hash[untyped, untyped] options) -> void
def write: (untyped data) -> untyped
def send: (untyped message) -> false
def ping: (?String message) -> false
def close: (?nil code, ?nil reason) -> untyped
def protocol: -> String
private
def open: -> nil
def receive_message: (untyped data) -> nil
def emit_error: (untyped message) -> nil
def begin_close: (String reason, Integer code, ?Hash[untyped, untyped] options) -> nil
def finalize_close: -> nil
def parse: (untyped data) -> untyped
end
end
end

43
sig/vendor/faye/websocket/client.rbs vendored Normal file
View File

@@ -0,0 +1,43 @@
# Added only to satisfy the Steep requirements. Not 100% reliable.
module Faye
class WebSocket
class Client
DEFAULT_PORTS: Hash[String, Integer]
SECURE_PROTOCOLS: [String, String]
include EventEmitter
include API
@url: untyped
@endpoint: untyped
@origin_tls: Hash[untyped, untyped]
@socket_tls: Hash[untyped, untyped]
@driver: bot
@proxy: nil
@ssl_verifier: untyped
@stream: untyped
def initialize: (untyped url, ?Array[String] protocols, ?Hash[untyped, untyped] options) -> void
private
def configure_proxy: (Hash[untyped, untyped] proxy) -> nil
def start_tls: (untyped uri, Hash[untyped, untyped] options) -> nil
def on_connect: (untyped stream) -> untyped
def on_network_error: (nil error) -> untyped
def ssl_verify_peer: (untyped cert) -> untyped
def ssl_handshake_completed: -> untyped
module Connection
attr_accessor parent: bot
def connection_completed: -> untyped
def ssl_verify_peer: (untyped cert) -> untyped
def ssl_handshake_completed: -> untyped
def receive_data: (untyped data) -> untyped
def unbind: (?nil error) -> untyped
def write: (untyped data) -> nil
end
end
end
end