Socket
Socket
Sign inDemoInstall

@solana/keys

Package Overview
Dependencies
Maintainers
13
Versions
1382
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.cf4231e to 2.0.0-experimental.d16acbd

README.md

2

dist/index.production.min.js

@@ -5,3 +5,3 @@ 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 S=Object.create;var m=Object.defineProperty;var V=Object.getOwnPropertyDescriptor;var q=Object.getOwnPropertyNames;var B=Object.getPrototypeOf,F=Object.prototype.hasOwnProperty;var $=(e,r)=>()=>(e&&(r=e(e=0)),r);var u=(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 l of q(r))!F.call(e,l)&&l!==n&&m(e,l,{get:()=>r[l],enumerable:!(p=V(r,l))||p.enumerable});return e};var G=(e,r,n)=>(n=e!=null?S(B(e)):{},k(r||!e||!e.__esModule?m(n,"default",{value:e,enumerable:!0}):n,e));var w=$(()=>{});var _=u((X,z)=>{w();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 l=e.charAt(p),c=l.charCodeAt(0);if(r[c]!==255)throw new TypeError(l+" is ambiguous");r[c]=p;}var A=e.length,U=e.charAt(0),T=Math.log(A)/Math.log(256),D=Math.log(256)/Math.log(A);function O(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,h=t.length;i!==h&&t[i]===0;)i++,a++;for(var d=(h-i)*D+1>>>0,o=new Uint8Array(d);i!==h;){for(var f=t[i],g=0,s=d-1;(f!==0||g<y)&&s!==-1;s--,g++)f+=256*o[s]>>>0,o[s]=f%A>>>0,f=f/A>>>0;if(f!==0)throw new Error("Non-zero carry");y=g,i++;}for(var v=d-y;v!==d&&o[v]===0;)v++;for(var b=U.repeat(a);v<d;++v)b+=e.charAt(o[v]);return b}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 h=(t.length-a)*T+1>>>0,d=new Uint8Array(h);t[a];){var o=r[t.charCodeAt(a)];if(o===255)return;for(var f=0,g=h-1;(o!==0||f<i)&&g!==-1;g--,f++)o+=A*d[g]>>>0,d[g]=o%256>>>0,o=o/256>>>0;if(o!==0)throw new Error("Non-zero carry");i=f,a++;}for(var s=h-i;s!==h&&d[s]===0;)s++;for(var v=new Uint8Array(y+(h-s)),b=y;s!==h;)v[b++]=d[s++];return v}function R(t){var a=x(t);if(a)return a;throw new Error("Non-base"+A+" character")}return {encode:O,decodeUnsafe:x,decode:R}}z.exports=I;});var N=u((Z,M)=>{w();var J=_(),K="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";M.exports=J(K);});w();w();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})}}

@@ -8,0 +8,0 @@ exports.assertIsBase58EncodedAddress = L;

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

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>;
//# sourceMappingURL=base58.d.ts.map
{
"name": "@solana/keys",
"version": "2.0.0-experimental.cf4231e",
"version": "2.0.0-experimental.d16acbd",
"description": "Helpers for generating and transforming key material",

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

"devDependencies": {
"@solana/eslint-config-solana": "^0.0.4",
"@solana/eslint-config-solana": "^1.0.0",
"@swc/core": "^1.3.18",
"@swc/jest": "^0.2.23",
"@types/jest": "^29.5.0",
"@typescript-eslint/eslint-plugin": "^5.43.0",
"@typescript-eslint/parser": "^5.43.0",
"agadoo": "^2.0.0",
"eslint": "^8.27.0",
"@typescript-eslint/eslint-plugin": "^5.57.1",
"@typescript-eslint/parser": "^5.57.1",
"agadoo": "^3.0.0",
"eslint": "^8.37.0",
"eslint-plugin-jest": "^27.1.5",

@@ -69,4 +69,3 @@ "eslint-plugin-react-hooks": "^4.6.0",

"tsup": "6.7.0",
"turbo": "^1.6.3",
"typescript": "^4.9",
"typescript": "^5.0.3",
"version-from-git": "^1.1.1",

@@ -73,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

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