Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@solana/keys

Package Overview
Dependencies
Maintainers
13
Versions
1526
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@solana/keys - npm Package Compare versions

Comparing version 2.0.0-experimental.7b00896 to 2.0.0-experimental.7d4c36d

12

dist/index.browser.js

@@ -24,5 +24,15 @@ import bs58 from 'bs58';

}
function getBase58EncodedAddressComparator() {
return new Intl.Collator("en", {
caseFirst: "lower",
ignorePunctuation: false,
localeMatcher: "best fit",
numeric: false,
sensitivity: "variant",
usage: "sort"
}).compare;
}
export { assertIsBase58EncodedAddress };
export { assertIsBase58EncodedAddress, getBase58EncodedAddressComparator };
//# sourceMappingURL=out.js.map
//# sourceMappingURL=index.browser.js.map

@@ -207,4 +207,15 @@ this.globalThis = this.globalThis || {};

}
function getBase58EncodedAddressComparator() {
return new Intl.Collator("en", {
caseFirst: "lower",
ignorePunctuation: false,
localeMatcher: "best fit",
numeric: false,
sensitivity: "variant",
usage: "sort"
}).compare;
}
exports.assertIsBase58EncodedAddress = assertIsBase58EncodedAddress;
exports.getBase58EncodedAddressComparator = getBase58EncodedAddressComparator;

@@ -211,0 +222,0 @@ return exports;

@@ -24,5 +24,15 @@ import bs58 from 'bs58';

}
function getBase58EncodedAddressComparator() {
return new Intl.Collator("en", {
caseFirst: "lower",
ignorePunctuation: false,
localeMatcher: "best fit",
numeric: false,
sensitivity: "variant",
usage: "sort"
}).compare;
}
export { assertIsBase58EncodedAddress };
export { assertIsBase58EncodedAddress, getBase58EncodedAddressComparator };
//# sourceMappingURL=out.js.map
//# sourceMappingURL=index.native.js.map

@@ -24,5 +24,15 @@ import bs58 from 'bs58';

}
function getBase58EncodedAddressComparator() {
return new Intl.Collator("en", {
caseFirst: "lower",
ignorePunctuation: false,
localeMatcher: "best fit",
numeric: false,
sensitivity: "variant",
usage: "sort"
}).compare;
}
export { assertIsBase58EncodedAddress };
export { assertIsBase58EncodedAddress, getBase58EncodedAddressComparator };
//# sourceMappingURL=out.js.map
//# sourceMappingURL=index.node.js.map

3

dist/index.production.min.js

@@ -5,5 +5,6 @@ this.globalThis = this.globalThis || {};

var V=Object.create;var m=Object.defineProperty;var q=Object.getOwnPropertyDescriptor;var F=Object.getOwnPropertyNames;var T=Object.getPrototypeOf,B=Object.prototype.hasOwnProperty;var $=(e,r)=>()=>(e&&(r=e(e=0)),r);var z=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var k=(e,r,n,p)=>{if(r&&typeof r=="object"||typeof r=="function")for(let v of F(r))!B.call(e,v)&&v!==n&&m(e,v,{get:()=>r[v],enumerable:!(p=q(r,v))||p.enumerable});return e};var G=(e,r,n)=>(n=e!=null?V(T(e)):{},k(r||!e||!e.__esModule?m(n,"default",{value:e,enumerable:!0}):n,e));var l=$(()=>{});var u=z((X,_)=>{l();function I(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var p=0;p<e.length;p++){var v=e.charAt(p),c=v.charCodeAt(0);if(r[c]!==255)throw new TypeError(v+" is ambiguous");r[c]=p;}var b=e.length,U=e.charAt(0),D=Math.log(b)/Math.log(256),O=Math.log(256)/Math.log(b);function R(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(t.length===0)return "";for(var a=0,y=0,i=0,f=t.length;i!==f&&t[i]===0;)i++,a++;for(var s=(f-i)*O+1>>>0,o=new Uint8Array(s);i!==f;){for(var d=t[i],g=0,h=s-1;(d!==0||g<y)&&h!==-1;h--,g++)d+=256*o[h]>>>0,o[h]=d%b>>>0,d=d/b>>>0;if(d!==0)throw new Error("Non-zero carry");y=g,i++;}for(var w=s-y;w!==s&&o[w]===0;)w++;for(var A=U.repeat(a);w<s;++w)A+=e.charAt(o[w]);return A}function x(t){if(typeof t!="string")throw new TypeError("Expected String");if(t.length===0)return new Uint8Array;for(var a=0,y=0,i=0;t[a]===U;)y++,a++;for(var f=(t.length-a)*D+1>>>0,s=new Uint8Array(f);t[a];){var o=r[t.charCodeAt(a)];if(o===255)return;for(var d=0,g=f-1;(o!==0||d<i)&&g!==-1;g--,d++)o+=b*s[g]>>>0,s[g]=o%256>>>0,o=o/256>>>0;if(o!==0)throw new Error("Non-zero carry");i=d,a++;}for(var h=f-i;h!==f&&s[h]===0;)h++;for(var w=new Uint8Array(y+(f-h)),A=y;h!==f;)w[A++]=s[h++];return w}function S(t){var a=x(t);if(a)return a;throw new Error("Non-base"+b+" character")}return {encode:R,decodeUnsafe:x,decode:S}}_.exports=I;});var N=z((Z,M)=>{l();var J=u(),K="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";M.exports=J(K);});l();l();var C=G(N(),1);function L(e){try{if(e.length<32||e.length>44)throw new Error("Expected input string to decode to a byte array of length 32.");let n=C.default.decode(e).byteLength;if(n!==32)throw new Error(`Expected input string to decode to a byte array of length 32. Actual length: ${n}`)}catch(r){throw new Error(`\`${e}\` is not a base-58 encoded address`,{cause:r})}}
var O=Object.create;var x=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var V=Object.getPrototypeOf,q=Object.prototype.hasOwnProperty;var I=(e,r)=>()=>(e&&(r=e(e=0)),r);var U=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var $=(e,r,n,p)=>{if(r&&typeof r=="object"||typeof r=="function")for(let v of S(r))!q.call(e,v)&&v!==n&&x(e,v,{get:()=>r[v],enumerable:!(p=R(r,v))||p.enumerable});return e};var k=(e,r,n)=>(n=e!=null?O(V(e)):{},$(r||!e||!e.__esModule?x(n,"default",{value:e,enumerable:!0}):n,e));var g=I(()=>{});var _=U((X,z)=>{g();function G(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var p=0;p<e.length;p++){var v=e.charAt(p),E=v.charCodeAt(0);if(r[E]!==255)throw new TypeError(v+" is ambiguous");r[E]=p;}var A=e.length,u=e.charAt(0),T=Math.log(A)/Math.log(256),B=Math.log(256)/Math.log(A);function D(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(t.length===0)return "";for(var a=0,y=0,s=0,d=t.length;s!==d&&t[s]===0;)s++,a++;for(var f=(d-s)*B+1>>>0,o=new Uint8Array(f);s!==d;){for(var h=t[s],w=0,i=f-1;(h!==0||w<y)&&i!==-1;i--,w++)h+=256*o[i]>>>0,o[i]=h%A>>>0,h=h/A>>>0;if(h!==0)throw new Error("Non-zero carry");y=w,s++;}for(var l=f-y;l!==f&&o[l]===0;)l++;for(var b=u.repeat(a);l<f;++l)b+=e.charAt(o[l]);return b}function m(t){if(typeof t!="string")throw new TypeError("Expected String");if(t.length===0)return new Uint8Array;for(var a=0,y=0,s=0;t[a]===u;)y++,a++;for(var d=(t.length-a)*T+1>>>0,f=new Uint8Array(d);t[a];){var o=r[t.charCodeAt(a)];if(o===255)return;for(var h=0,w=d-1;(o!==0||h<s)&&w!==-1;w--,h++)o+=A*f[w]>>>0,f[w]=o%256>>>0,o=o/256>>>0;if(o!==0)throw new Error("Non-zero carry");s=h,a++;}for(var i=d-s;i!==d&&f[i]===0;)i++;for(var l=new Uint8Array(y+(d-i)),b=y;i!==d;)l[b++]=f[i++];return l}function F(t){var a=m(t);if(a)return a;throw new Error("Non-base"+A+" character")}return {encode:D,decodeUnsafe:m,decode:F}}z.exports=G;});var M=U((Z,C)=>{g();var J=_(),K="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";C.exports=J(K);});g();g();var N=k(M(),1);function L(e){try{if(e.length<32||e.length>44)throw new Error("Expected input string to decode to a byte array of length 32.");let n=N.default.decode(e).byteLength;if(n!==32)throw new Error(`Expected input string to decode to a byte array of length 32. Actual length: ${n}`)}catch(r){throw new Error(`\`${e}\` is not a base-58 encoded address`,{cause:r})}}function P(){return new Intl.Collator("en",{caseFirst:"lower",ignorePunctuation:!1,localeMatcher:"best fit",numeric:!1,sensitivity:"variant",usage:"sort"}).compare}
exports.assertIsBase58EncodedAddress = L;
exports.getBase58EncodedAddressComparator = P;

@@ -10,0 +11,0 @@ return exports;

@@ -1,5 +0,6 @@

export type Base58EncodedAddress = string & {
export type Base58EncodedAddress<TAddress extends string = string> = TAddress & {
readonly __base58EncodedAddress: unique symbol;
};
export declare function assertIsBase58EncodedAddress(putativeBase58EncodedAddress: string): asserts putativeBase58EncodedAddress is Base58EncodedAddress;
export declare function assertIsBase58EncodedAddress(putativeBase58EncodedAddress: string): asserts putativeBase58EncodedAddress is Base58EncodedAddress<typeof putativeBase58EncodedAddress>;
export declare function getBase58EncodedAddressComparator(): (x: string, y: string) => number;
//# sourceMappingURL=base58.d.ts.map
{
"name": "@solana/keys",
"version": "2.0.0-experimental.7b00896",
"version": "2.0.0-experimental.7d4c36d",
"description": "Helpers for generating and transforming key material",

@@ -49,6 +49,6 @@ "exports": {

"devDependencies": {
"@solana/eslint-config-solana": "^1.0.0",
"@solana/eslint-config-solana": "^1.0.1",
"@swc/core": "^1.3.18",
"@swc/jest": "^0.2.23",
"@types/jest": "^29.5.0",
"@swc/jest": "^0.2.26",
"@types/jest": "^29.5.1",
"@typescript-eslint/eslint-plugin": "^5.57.1",

@@ -63,9 +63,9 @@ "@typescript-eslint/parser": "^5.57.1",

"jest-environment-jsdom": "^29.5.0",
"jest-runner-eslint": "^2.0.0",
"jest-runner-eslint": "^2.1.0",
"jest-runner-prettier": "^1.0.0",
"postcss": "^8.4.12",
"prettier": "^2.7.1",
"prettier": "^2.8.8",
"ts-node": "^10.9.1",
"tsup": "6.7.0",
"typescript": "^5.0.3",
"typescript": "^5.0.4",
"version-from-git": "^1.1.1",

@@ -72,0 +72,0 @@ "build-scripts": "0.0.0",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc