chore(js): publish 0.1.7

This commit is contained in:
nazeh
2024-08-01 16:04:25 +03:00
parent ab4a8c309c
commit 381a634692
7 changed files with 16 additions and 17 deletions

View File

@@ -1,5 +1,5 @@
nodejs/*
browser.js
coverage
node_modules
package-lock.json
pubky*

View File

@@ -24,7 +24,7 @@ let homeserver = PublicKey.from("8pinxxgqs41n4aididenw5apqp1urfmzdztr8jt4abrkdn4
await client.signup(keypair, homeserver)
const publicKey = keypair.public_key();
const publicKey = keypair.publicKey();
// Pubky URL
let url = `pubky://${publicKey.z32()}/pub/example.com/arbitrary`;

View File

@@ -2,7 +2,7 @@
"name": "@synonymdev/pubky",
"type": "module",
"description": "Pubky client",
"version": "0.1.4",
"version": "0.1.7",
"license": "MIT",
"repository": {
"type": "git",
@@ -17,16 +17,15 @@
"prepublishOnly": "npm run build && npm run test"
},
"files": [
"nodejs/*",
"index.js",
"browser.js"
"nodejs/pubky_bg.wasm",
"nodejs/pubky.js",
"nodejs/pubky.d.ts",
"browser.js",
"index.js"
],
"main": "index.js",
"browser": "browser.js",
"types": "pubky.d.ts",
"sideEffects": [
"./snippets/*"
],
"types": "nodejs/pubky.d.ts",
"keywords": [
"web",
"dht",

View File

@@ -6,7 +6,7 @@ test('auth', async (t) => {
const client = PubkyClient.testnet();
const keypair = Keypair.random()
const publicKey = keypair.public_key()
const publicKey = keypair.publicKey()
const homeserver = PublicKey.from('8pinxxgqs41n4aididenw5apqp1urfmzdztr8jt4abrkdn435ewo')
await client.signup(keypair, homeserver)

View File

@@ -7,7 +7,7 @@ test('generate keys from a seed', async (t) => {
const keypair = Keypair.from_secret_key(secretkey)
const publicKey = keypair.public_key()
const publicKey = keypair.publicKey()
t.is(publicKey.z32(), 'gcumbhd7sqit6nn457jxmrwqx9pyymqwamnarekgo3xppqo6a19o')
})

View File

@@ -10,7 +10,7 @@ test('public: put/get', async (t) => {
const homeserver = PublicKey.from('8pinxxgqs41n4aididenw5apqp1urfmzdztr8jt4abrkdn435ewo');
await client.signup(keypair, homeserver);
const publicKey = keypair.public_key();
const publicKey = keypair.publicKey();
let url = `pubky://${publicKey.z32()}/pub/example.com/arbitrary`;
@@ -49,7 +49,7 @@ test("not found", async (t) => {
const homeserver = PublicKey.from('8pinxxgqs41n4aididenw5apqp1urfmzdztr8jt4abrkdn435ewo');
await client.signup(keypair, homeserver);
const publicKey = keypair.public_key();
const publicKey = keypair.publicKey();
let url = `pubky://${publicKey.z32()}/pub/example.com/arbitrary`;
@@ -62,7 +62,7 @@ test("unauthorized", async (t) => {
const client = PubkyClient.testnet();
const keypair = Keypair.random()
const publicKey = keypair.public_key()
const publicKey = keypair.publicKey()
const homeserver = PublicKey.from('8pinxxgqs41n4aididenw5apqp1urfmzdztr8jt4abrkdn435ewo')
await client.signup(keypair, homeserver)
@@ -90,7 +90,7 @@ test("forbidden", async (t) => {
const client = PubkyClient.testnet();
const keypair = Keypair.random()
const publicKey = keypair.public_key()
const publicKey = keypair.publicKey()
const homeserver = PublicKey.from('8pinxxgqs41n4aididenw5apqp1urfmzdztr8jt4abrkdn435ewo')
await client.signup(keypair, homeserver)

View File

@@ -22,7 +22,7 @@ impl Keypair {
Self(pkarr::Keypair::from_secret_key(&bytes))
}
#[wasm_bindgen]
#[wasm_bindgen(js_name = "publicKey")]
/// Returns the [PublicKey] of this keypair.
pub fn public_key(&self) -> PublicKey {
PublicKey(self.0.public_key())