mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
Update nostr-tools bundle to restore nip46 handshake
This commit is contained in:
1 parent
9f078b3a22
commit
3e160a5035
10 files changed
+20
-20
No files matched your search
@@ -7,8 +7,8 @@
|
||||
<!-- Link to your main stylesheet -->
|
||||
|
||||
<link rel="stylesheet" href="../../css/tailwind.generated.css" />
|
||||
<!-- Load nostr‑tools v2.10.4 -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/[email protected]0.4/lib/nostr.bundle.min.js"></script>
|
||||
<!-- Load nostr‑tools v2.17.0 -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/[email protected]7.0/lib/nostr.bundle.min.js"></script>
|
||||
</head>
|
||||
<body class="iframe-form" data-ds="new">
|
||||
<div class="container">
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<script type="module" src="./theme-sync.js"></script>
|
||||
<!-- Link to your main stylesheet -->
|
||||
<link rel="stylesheet" href="../../css/tailwind.generated.css" />
|
||||
<!-- Load nostr‑tools v2.10.4 -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/[email protected]0.4/lib/nostr.bundle.min.js"></script>
|
||||
<!-- Load nostr‑tools v2.17.0 -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/[email protected]7.0/lib/nostr.bundle.min.js"></script>
|
||||
</head>
|
||||
<body class="iframe-form" data-ds="new">
|
||||
<div class="container">
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<script type="module" src="./theme-sync.js"></script>
|
||||
<!-- Link to your main stylesheet -->
|
||||
<link rel="stylesheet" href="../../css/tailwind.generated.css" />
|
||||
<!-- Load nostr‑tools v2.10.4 -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/[email protected]0.4/lib/nostr.bundle.min.js"></script>
|
||||
<!-- Load nostr‑tools v2.17.0 -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/[email protected]7.0/lib/nostr.bundle.min.js"></script>
|
||||
</head>
|
||||
<body class="iframe-form" data-ds="new">
|
||||
<div class="container">
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<script type="module" src="./theme-sync.js"></script>
|
||||
<!-- Link to your main stylesheet -->
|
||||
<link rel="stylesheet" href="../../css/tailwind.generated.css" />
|
||||
<!-- Load nostr‑tools v2.10.4 -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/[email protected]0.4/lib/nostr.bundle.min.js"></script>
|
||||
<!-- Load nostr‑tools v2.17.0 -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/[email protected]7.0/lib/nostr.bundle.min.js"></script>
|
||||
</head>
|
||||
<body class="iframe-form" data-ds="new">
|
||||
<div class="container">
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<script type="module" src="./theme-sync.js"></script>
|
||||
<!-- Link to your main stylesheet -->
|
||||
<link rel="stylesheet" href="../../css/tailwind.generated.css" />
|
||||
<!-- Load nostr‑tools v2.10.4 -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/[email protected]0.4/lib/nostr.bundle.min.js"></script>
|
||||
<!-- Load nostr‑tools v2.17.0 -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/[email protected]7.0/lib/nostr.bundle.min.js"></script>
|
||||
</head>
|
||||
<body class="iframe-form" data-ds="new">
|
||||
<div class="container">
|
||||
|
||||
@@ -4,7 +4,7 @@ const LOCAL_IMPORT_TIMEOUT = 2500;
|
||||
const NODE_IMPORT_TIMEOUT = 1500;
|
||||
const SCRIPT_FALLBACK_TIMEOUT = 6000;
|
||||
const CDN_BUNDLE_URL =
|
||||
"https://cdn.jsdelivr.net/npm/[email protected]0.4/lib/nostr.bundle.min.js";
|
||||
"https://cdn.jsdelivr.net/npm/[email protected]7.0/lib/nostr.bundle.min.js";
|
||||
const LOCAL_BUNDLE_RELATIVE_URL = "../vendor/nostr-tools.bundle.min.js";
|
||||
|
||||
const moduleUrl =
|
||||
|
||||
Generated
+1
-1
@@ -20,7 +20,7 @@
|
||||
"cross-env": "^7.0.3",
|
||||
"esbuild": "^0.25.10",
|
||||
"jsdom": "^24.0.0",
|
||||
"nostr-tools": "^2.10.4",
|
||||
"nostr-tools": "^2.17.0",
|
||||
"pixelmatch": "^5.3.0",
|
||||
"pngjs": "^7.0.0",
|
||||
"postcss": "^8.4.41",
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@
|
||||
"cross-env": "^7.0.3",
|
||||
"esbuild": "^0.25.10",
|
||||
"jsdom": "^24.0.0",
|
||||
"nostr-tools": "^2.10.4",
|
||||
"nostr-tools": "^2.17.0",
|
||||
"pixelmatch": "^5.3.0",
|
||||
"pngjs": "^7.0.0",
|
||||
"postcss": "^8.4.41",
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<!--
|
||||
Nostr Ephemeral DM Tester (Using finalizeEvent)
|
||||
|
||||
This HTML file demonstrates how to create a simple ephemeral DM tool using nostr‑tools v2.10.4.
|
||||
This HTML file demonstrates how to create a simple ephemeral DM tool using nostr‑tools v2.17.0.
|
||||
|
||||
Key steps:
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
- Nostr protocol specifications and community examples.
|
||||
-->
|
||||
|
||||
<!-- Load nostr‑tools v2.10.4 -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/[email protected]0.4/lib/nostr.bundle.min.js"></script>
|
||||
<!-- Load nostr‑tools v2.17.0 -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/[email protected]7.0/lib/nostr.bundle.min.js"></script>
|
||||
</head>
|
||||
<body class="bg-surface font-sans text-text" data-ds="new">
|
||||
<main
|
||||
|
||||
Vendored
+4
-4
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Minified by jsDelivr using Terser v5.37.0.
|
||||
* Original file: /npm/[email protected]0.4/lib/nostr.bundle.js
|
||||
* Minified by jsDelivr using Terser v5.39.0.
|
||||
* Original file: /npm/[email protected]7.0/lib/nostr.bundle.js
|
||||
*
|
||||
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
|
||||
*/
|
||||
"use strict";var NostrTools=(()=>{var t=Object.defineProperty,e=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,o=(e,n)=>{for(var r in n)t(e,r,{get:n[r],enumerable:!0})},i={};function s(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function a(t,...e){if(!(t instanceof Uint8Array))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(t.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}function c(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}o(i,{Relay:()=>Pr,SimplePool:()=>qr,finalizeEvent:()=>qe,fj:()=>xr,generateSecretKey:()=>Pe,getEventHash:()=>$e,getFilterLimit:()=>vr,getPublicKey:()=>Ce,kinds:()=>je,matchFilter:()=>br,matchFilters:()=>mr,mergeFilters:()=>Er,nip04:()=>Ro,nip05:()=>Oi,nip10:()=>Ci,nip11:()=>Mi,nip13:()=>Di,nip18:()=>Wi,nip19:()=>Mr,nip21:()=>Yi,nip25:()=>es,nip27:()=>os,nip28:()=>cs,nip30:()=>ps,nip39:()=>Es,nip42:()=>Lr,nip44:()=>As,nip47:()=>oa,nip57:()=>ca,nip59:()=>pa,nip98:()=>Ua,parseReferences:()=>Oo,serializeEvent:()=>Ne,sortEvents:()=>de,utils:()=>Se,validateEvent:()=>fe,verifiedSymbol:()=>le,verifyEvent:()=>Me});var u="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,l=t=>t instanceof Uint8Array,h=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),f=(t,e)=>t<<32-e|t>>>e;if(!(68===new Uint8Array(new Uint32Array([287454020]).buffer)[0]))throw new Error("Non little-endian hardware is not supported");function d(t){if("string"==typeof t&&(t=function(t){if("string"!=typeof t)throw new Error("utf8ToBytes expected string, got "+typeof t);return new Uint8Array((new TextEncoder).encode(t))}(t)),!l(t))throw new Error("expected Uint8Array, got "+typeof t);return t}var p=class{clone(){return this._cloneInto()}};function g(t){const e=e=>t().update(d(e)).digest(),n=t();return e.outputLen=n.outputLen,e.blockLen=n.blockLen,e.create=()=>t(),e}function y(t=32){if(u&&"function"==typeof u.getRandomValues)return u.getRandomValues(new Uint8Array(t));throw new Error("crypto.getRandomValues must be defined")}var w=class extends p{constructor(t,e,n,r){super(),this.blockLen=t,this.outputLen=e,this.padOffset=n,this.isLE=r,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=h(this.buffer)}update(t){c(this);const{view:e,buffer:n,blockLen:r}=this,o=(t=d(t)).length;for(let i=0;i<o;){const s=Math.min(r-this.pos,o-i);if(s!==r)n.set(t.subarray(i,i+s),this.pos),this.pos+=s,i+=s,this.pos===r&&(this.process(e,0),this.pos=0);else{const e=h(t);for(;r<=o-i;i+=r)this.process(e,i)}}return this.length+=t.length,this.roundClean(),this}digestInto(t){c(this),function(t,e){a(t);const n=e.outputLen;if(t.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}(t,this),this.finished=!0;const{buffer:e,view:n,blockLen:r,isLE:o}=this;let{pos:i}=this;e[i++]=128,this.buffer.subarray(i).fill(0),this.padOffset>r-i&&(this.process(n,0),i=0);for(let t=i;t<r;t++)e[t]=0;!function(t,e,n,r){if("function"==typeof t.setBigUint64)return t.setBigUint64(e,n,r);const o=BigInt(32),i=BigInt(4294967295),s=Number(n>>o&i),a=Number(n&i),c=r?4:0,u=r?0:4;t.setUint32(e+c,s,r),t.setUint32(e+u,a,r)}(n,r-8,BigInt(8*this.length),o),this.process(n,0);const s=h(t),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=u/4,f=this.get();if(l>f.length)throw new Error("_sha2: outputLen bigger than state");for(let t=0;t<l;t++)s.setUint32(4*t,f[t],o)}digest(){const{buffer:t,outputLen:e}=this;this.digestInto(t);const n=t.slice(0,e);return this.destroy(),n}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:e,buffer:n,length:r,finished:o,destroyed:i,pos:s}=this;return t.length=r,t.pos=s,t.finished=o,t.destroyed=i,r%e&&t.buffer.set(n),t}},b=(t,e,n)=>t&e^t&n^e&n,m=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),E=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),v=new Uint32Array(64),x=class extends w{constructor(){super(64,32,8,!1),this.A=0|E[0],this.B=0|E[1],this.C=0|E[2],this.D=0|E[3],this.E=0|E[4],this.F=0|E[5],this.G=0|E[6],this.H=0|E[7]}get(){const{A:t,B:e,C:n,DLine truncated
|
||||
//# sourceMappingURL=/sm/f29f5f5418a4e9d4df57df00b6b51f97de02afef7a8d582c6c8814bdab32efb1.map
|
||||
"use strict";var NostrTools=(()=>{var t=Object.defineProperty,e=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,o=(e,n)=>{for(var r in n)t(e,r,{get:n[r],enumerable:!0})},i={};function s(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function a(t,...e){if(!(t instanceof Uint8Array))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(t.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}function c(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}o(i,{Relay:()=>Cr,SimplePool:()=>Mr,finalizeEvent:()=>qe,fj:()=>xr,generateSecretKey:()=>He,getEventHash:()=>_e,getFilterLimit:()=>vr,getPublicKey:()=>Ce,kinds:()=>je,matchFilter:()=>br,matchFilters:()=>mr,mergeFilters:()=>Er,nip04:()=>$o,nip05:()=>Ri,nip10:()=>Mi,nip11:()=>zi,nip13:()=>Ki,nip17:()=>Gi,nip18:()=>Zs,nip19:()=>jr,nip21:()=>Qs,nip25:()=>na,nip27:()=>ia,nip28:()=>ua,nip30:()=>ga,nip39:()=>va,nip42:()=>Lr,nip44:()=>Yi,nip47:()=>ka,nip54:()=>Ua,nip57:()=>Ta,nip59:()=>Ji,nip98:()=>Ha,parseReferences:()=>Ro,serializeEvent:()=>Ne,sortEvents:()=>de,utils:()=>Se,validateEvent:()=>fe,verifiedSymbol:()=>le,verifyEvent:()=>Me});var u="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,l=t=>t instanceof Uint8Array,h=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),f=(t,e)=>t<<32-e|t>>>e;if(!(68===new Uint8Array(new Uint32Array([287454020]).buffer)[0]))throw new Error("Non little-endian hardware is not supported");function d(t){if("string"==typeof t&&(t=function(t){if("string"!=typeof t)throw new Error("utf8ToBytes expected string, got "+typeof t);return new Uint8Array((new TextEncoder).encode(t))}(t)),!l(t))throw new Error("expected Uint8Array, got "+typeof t);return t}var p=class{clone(){return this._cloneInto()}};function g(t){const e=e=>t().update(d(e)).digest(),n=t();return e.outputLen=n.outputLen,e.blockLen=n.blockLen,e.create=()=>t(),e}function y(t=32){if(u&&"function"==typeof u.getRandomValues)return u.getRandomValues(new Uint8Array(t));throw new Error("crypto.getRandomValues must be defined")}var w=class extends p{constructor(t,e,n,r){super(),this.blockLen=t,this.outputLen=e,this.padOffset=n,this.isLE=r,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=h(this.buffer)}update(t){c(this);const{view:e,buffer:n,blockLen:r}=this,o=(t=d(t)).length;for(let i=0;i<o;){const s=Math.min(r-this.pos,o-i);if(s!==r)n.set(t.subarray(i,i+s),this.pos),this.pos+=s,i+=s,this.pos===r&&(this.process(e,0),this.pos=0);else{const e=h(t);for(;r<=o-i;i+=r)this.process(e,i)}}return this.length+=t.length,this.roundClean(),this}digestInto(t){c(this),function(t,e){a(t);const n=e.outputLen;if(t.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}(t,this),this.finished=!0;const{buffer:e,view:n,blockLen:r,isLE:o}=this;let{pos:i}=this;e[i++]=128,this.buffer.subarray(i).fill(0),this.padOffset>r-i&&(this.process(n,0),i=0);for(let t=i;t<r;t++)e[t]=0;!function(t,e,n,r){if("function"==typeof t.setBigUint64)return t.setBigUint64(e,n,r);const o=BigInt(32),i=BigInt(4294967295),s=Number(n>>o&i),a=Number(n&i),c=r?4:0,u=r?0:4;t.setUint32(e+c,s,r),t.setUint32(e+u,a,r)}(n,r-8,BigInt(8*this.length),o),this.process(n,0);const s=h(t),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=u/4,f=this.get();if(l>f.length)throw new Error("_sha2: outputLen bigger than state");for(let t=0;t<l;t++)s.setUint32(4*t,f[t],o)}digest(){const{buffer:t,outputLen:e}=this;this.digestInto(t);const n=t.slice(0,e);return this.destroy(),n}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:e,buffer:n,length:r,finished:o,destroyed:i,pos:s}=this;return t.length=r,t.pos=s,t.finished=o,t.destroyed=i,r%e&&t.buffer.set(n),t}},b=(t,e,n)=>t&e^t&n^e&n,m=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),E=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),v=new Uint32Array(64),x=class extends w{constructor(){super(64,32,8,!1),this.A=0|E[0],this.B=0|E[1],this.C=0|E[2],this.D=0|E[3],this.E=0|E[4],this.F=0|E[5],this.G=0|E[6],this.H=0|E[7]Line truncated
|
||||
//# sourceMappingURL=/sm/8a637fc3be698500d2b32d47068de522c987ef5def0a7be9de886b2e0952c2a5.map
|
||||
Reference in new issue
Block a user