mirror of
https://github.com/aljazceru/pubky-core.git
synced 2026-01-03 06:14:34 +01:00
chore(js): publish 0.1.7
This commit is contained in:
2
pubky/pkg/.gitignore
vendored
2
pubky/pkg/.gitignore
vendored
@@ -1,5 +1,5 @@
|
||||
nodejs/*
|
||||
browser.js
|
||||
coverage
|
||||
node_modules
|
||||
package-lock.json
|
||||
pubky*
|
||||
|
||||
@@ -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`;
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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')
|
||||
})
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user