Profile / Thread styles

This commit is contained in:
2023-07-24 15:30:21 +01:00
parent d292e658fc
commit 076d5d8cd5
67 changed files with 684 additions and 602 deletions

View File

@ -1,6 +1,4 @@
import { MessageEncryptor, MessageEncryptorPayload, MessageEncryptorVersion } from "index";
import { base64 } from "@scure/base";
import { secp256k1 } from "@noble/curves/secp256k1";
export class Nip4WebCryptoEncryptor implements MessageEncryptor {
@ -20,7 +18,7 @@ export class Nip4WebCryptoEncryptor implements MessageEncryptor {
iv: iv,
},
key,
data
data,
);
return {
ciphertext: new Uint8Array(result),

View File

@ -94,7 +94,7 @@ export class Nip46Signer implements EventSigner {
"#p": [this.#localPubkey],
},
],
() => {}
() => {},
);
if (isBunker) {
@ -181,7 +181,7 @@ export class Nip46Signer implements EventSigner {
result: "ack",
error: "",
},
unwrap(this.#remotePubkey)
unwrap(this.#remotePubkey),
);
id = "connect";
}

View File

@ -37,7 +37,7 @@ export class Nip7Signer implements EventSigner {
throw new Error("Cannot use NIP-07 signer, not found!");
}
return await barrierQueue(Nip7Queue, () =>
unwrap(window.nostr?.nip04?.encrypt).call(window.nostr?.nip04, key, content)
unwrap(window.nostr?.nip04?.encrypt).call(window.nostr?.nip04, key, content),
);
}
@ -46,7 +46,7 @@ export class Nip7Signer implements EventSigner {
throw new Error("Cannot use NIP-07 signer, not found!");
}
return await barrierQueue(Nip7Queue, () =>
unwrap(window.nostr?.nip04?.decrypt).call(window.nostr?.nip04, otherKey, content)
unwrap(window.nostr?.nip04?.decrypt).call(window.nostr?.nip04, otherKey, content),
);
}