@penumbra-zone/bech32m
Advanced tools
Comparing version 5.1.0 to 6.0.0
@@ -1,83 +0,20 @@ | ||
declare const _default: { | ||
readonly passet: { | ||
readonly prefix: "passet"; | ||
readonly stringLength: 65; | ||
readonly byteLength: 32; | ||
readonly innerName: "inner"; | ||
}; | ||
readonly pauctid: { | ||
readonly prefix: "pauctid"; | ||
readonly stringLength: 66; | ||
readonly byteLength: 32; | ||
readonly innerName: "inner"; | ||
}; | ||
readonly penumbra: { | ||
readonly prefix: "penumbra"; | ||
readonly stringLength: 143; | ||
readonly byteLength: 80; | ||
readonly innerName: "inner"; | ||
}; | ||
readonly penumbracompat1: { | ||
readonly prefix: "penumbracompat1"; | ||
readonly stringLength: 150; | ||
readonly byteLength: 80; | ||
readonly innerName: "inner"; | ||
}; | ||
readonly penumbrafullviewingkey: { | ||
readonly prefix: "penumbrafullviewingkey"; | ||
readonly stringLength: 132; | ||
readonly byteLength: 64; | ||
readonly innerName: "inner"; | ||
}; | ||
readonly penumbragovern: { | ||
readonly prefix: "penumbragovern"; | ||
readonly stringLength: 73; | ||
readonly byteLength: 32; | ||
readonly innerName: "gk"; | ||
}; | ||
readonly penumbraspendkey: { | ||
readonly prefix: "penumbraspendkey"; | ||
readonly stringLength: 75; | ||
readonly byteLength: 32; | ||
readonly innerName: "inner"; | ||
}; | ||
readonly penumbravalid: { | ||
readonly prefix: "penumbravalid"; | ||
readonly stringLength: 72; | ||
readonly byteLength: 32; | ||
readonly innerName: "ik"; | ||
}; | ||
readonly penumbrawalletid: { | ||
readonly prefix: "penumbrawalletid"; | ||
readonly stringLength: 75; | ||
readonly byteLength: 32; | ||
readonly innerName: "inner"; | ||
}; | ||
readonly plpid: { | ||
readonly prefix: "plpid"; | ||
readonly stringLength: 64; | ||
readonly byteLength: 32; | ||
readonly innerName: "inner"; | ||
}; | ||
}; | ||
declare const PENUMBRA_BECH32M_ADDRESS_LENGTH: 143; | ||
declare const PENUMBRA_BECH32M_ADDRESS_PREFIX: "penumbra"; | ||
declare const PENUMBRA_BECH32M_ASSETID_LENGTH: 65; | ||
declare const PENUMBRA_BECH32M_ASSETID_PREFIX: "passet"; | ||
declare const PENUMBRA_BECH32M_AUCTION_LENGTH: 66; | ||
declare const PENUMBRA_BECH32M_AUCTION_PREFIX: "pauctid"; | ||
declare const PENUMBRA_BECH32M_FULLVIEWINGKEY_LENGTH: 132; | ||
declare const PENUMBRA_BECH32M_FULLVIEWINGKEY_PREFIX: "penumbrafullviewingkey"; | ||
declare const PENUMBRA_BECH32M_GOVERNANCEID_LENGTH: 73; | ||
declare const PENUMBRA_BECH32M_GOVERNANCEID_PREFIX: "penumbragovern"; | ||
declare const PENUMBRA_BECH32M_SPENDKEY_LENGTH: 75; | ||
declare const PENUMBRA_BECH32M_SPENDKEY_PREFIX: "penumbraspendkey"; | ||
declare const PENUMBRA_BECH32M_IDENTITYKEY_LENGTH: 72; | ||
declare const PENUMBRA_BECH32M_IDENTITYKEY_PREFIX: "penumbravalid"; | ||
declare const PENUMBRA_BECH32M_WALLETID_LENGTH: 75; | ||
declare const PENUMBRA_BECH32M_WALLETID_PREFIX: "penumbrawalletid"; | ||
declare const PENUMBRA_BECH32M_POSITIONID_LENGTH: 64; | ||
declare const PENUMBRA_BECH32M_POSITIONID_PREFIX: "plpid"; | ||
export { PENUMBRA_BECH32M_ADDRESS_LENGTH, PENUMBRA_BECH32M_ADDRESS_PREFIX, PENUMBRA_BECH32M_ASSETID_LENGTH, PENUMBRA_BECH32M_ASSETID_PREFIX, PENUMBRA_BECH32M_AUCTION_LENGTH, PENUMBRA_BECH32M_AUCTION_PREFIX, PENUMBRA_BECH32M_FULLVIEWINGKEY_LENGTH, PENUMBRA_BECH32M_FULLVIEWINGKEY_PREFIX, PENUMBRA_BECH32M_GOVERNANCEID_LENGTH, PENUMBRA_BECH32M_GOVERNANCEID_PREFIX, PENUMBRA_BECH32M_IDENTITYKEY_LENGTH, PENUMBRA_BECH32M_IDENTITYKEY_PREFIX, PENUMBRA_BECH32M_POSITIONID_LENGTH, PENUMBRA_BECH32M_POSITIONID_PREFIX, PENUMBRA_BECH32M_SPENDKEY_LENGTH, PENUMBRA_BECH32M_SPENDKEY_PREFIX, PENUMBRA_BECH32M_WALLETID_LENGTH, PENUMBRA_BECH32M_WALLETID_PREFIX, _default as default }; | ||
import SPEC from './format'; | ||
export default SPEC; | ||
export declare const PENUMBRA_BECH32M_ADDRESS_LENGTH: 143; | ||
export declare const PENUMBRA_BECH32M_ADDRESS_PREFIX: "penumbra"; | ||
export declare const PENUMBRA_BECH32M_ASSETID_LENGTH: 65; | ||
export declare const PENUMBRA_BECH32M_ASSETID_PREFIX: "passet"; | ||
export declare const PENUMBRA_BECH32M_AUCTION_LENGTH: 66; | ||
export declare const PENUMBRA_BECH32M_AUCTION_PREFIX: "pauctid"; | ||
export declare const PENUMBRA_BECH32M_FULLVIEWINGKEY_LENGTH: 132; | ||
export declare const PENUMBRA_BECH32M_FULLVIEWINGKEY_PREFIX: "penumbrafullviewingkey"; | ||
export declare const PENUMBRA_BECH32M_GOVERNANCEID_LENGTH: 73; | ||
export declare const PENUMBRA_BECH32M_GOVERNANCEID_PREFIX: "penumbragovern"; | ||
export declare const PENUMBRA_BECH32M_SPENDKEY_LENGTH: 75; | ||
export declare const PENUMBRA_BECH32M_SPENDKEY_PREFIX: "penumbraspendkey"; | ||
export declare const PENUMBRA_BECH32M_IDENTITYKEY_LENGTH: 72; | ||
export declare const PENUMBRA_BECH32M_IDENTITYKEY_PREFIX: "penumbravalid"; | ||
export declare const PENUMBRA_BECH32M_WALLETID_LENGTH: 75; | ||
export declare const PENUMBRA_BECH32M_WALLETID_PREFIX: "penumbrawalletid"; | ||
export declare const PENUMBRA_BECH32M_POSITIONID_LENGTH: 64; | ||
export declare const PENUMBRA_BECH32M_POSITIONID_PREFIX: "plpid"; |
@@ -1,1 +0,20 @@ | ||
import{e as a,f as b,g as c,h as d,i as e,j as f,k as g,l as h,m as i,n as j,o as k,p as l,q as m,r as n,s as o,t as p,u as q,v as r,w as s}from"./chunk-FQ3DGBGS.js";export{b as PENUMBRA_BECH32M_ADDRESS_LENGTH,c as PENUMBRA_BECH32M_ADDRESS_PREFIX,d as PENUMBRA_BECH32M_ASSETID_LENGTH,e as PENUMBRA_BECH32M_ASSETID_PREFIX,f as PENUMBRA_BECH32M_AUCTION_LENGTH,g as PENUMBRA_BECH32M_AUCTION_PREFIX,h as PENUMBRA_BECH32M_FULLVIEWINGKEY_LENGTH,i as PENUMBRA_BECH32M_FULLVIEWINGKEY_PREFIX,j as PENUMBRA_BECH32M_GOVERNANCEID_LENGTH,k as PENUMBRA_BECH32M_GOVERNANCEID_PREFIX,n as PENUMBRA_BECH32M_IDENTITYKEY_LENGTH,o as PENUMBRA_BECH32M_IDENTITYKEY_PREFIX,r as PENUMBRA_BECH32M_POSITIONID_LENGTH,s as PENUMBRA_BECH32M_POSITIONID_PREFIX,l as PENUMBRA_BECH32M_SPENDKEY_LENGTH,m as PENUMBRA_BECH32M_SPENDKEY_PREFIX,p as PENUMBRA_BECH32M_WALLETID_LENGTH,q as PENUMBRA_BECH32M_WALLETID_PREFIX,a as default}; | ||
import SPEC from './format'; | ||
export default SPEC; | ||
export const PENUMBRA_BECH32M_ADDRESS_LENGTH = SPEC.penumbra.stringLength; | ||
export const PENUMBRA_BECH32M_ADDRESS_PREFIX = SPEC.penumbra.prefix; | ||
export const PENUMBRA_BECH32M_ASSETID_LENGTH = SPEC.passet.stringLength; | ||
export const PENUMBRA_BECH32M_ASSETID_PREFIX = SPEC.passet.prefix; | ||
export const PENUMBRA_BECH32M_AUCTION_LENGTH = SPEC.pauctid.stringLength; | ||
export const PENUMBRA_BECH32M_AUCTION_PREFIX = SPEC.pauctid.prefix; | ||
export const PENUMBRA_BECH32M_FULLVIEWINGKEY_LENGTH = SPEC.penumbrafullviewingkey.stringLength; | ||
export const PENUMBRA_BECH32M_FULLVIEWINGKEY_PREFIX = SPEC.penumbrafullviewingkey.prefix; | ||
export const PENUMBRA_BECH32M_GOVERNANCEID_LENGTH = SPEC.penumbragovern.stringLength; | ||
export const PENUMBRA_BECH32M_GOVERNANCEID_PREFIX = SPEC.penumbragovern.prefix; | ||
export const PENUMBRA_BECH32M_SPENDKEY_LENGTH = SPEC.penumbraspendkey.stringLength; | ||
export const PENUMBRA_BECH32M_SPENDKEY_PREFIX = SPEC.penumbraspendkey.prefix; | ||
export const PENUMBRA_BECH32M_IDENTITYKEY_LENGTH = SPEC.penumbravalid.stringLength; | ||
export const PENUMBRA_BECH32M_IDENTITYKEY_PREFIX = SPEC.penumbravalid.prefix; | ||
export const PENUMBRA_BECH32M_WALLETID_LENGTH = SPEC.penumbrawalletid.stringLength; | ||
export const PENUMBRA_BECH32M_WALLETID_PREFIX = SPEC.penumbrawalletid.prefix; | ||
export const PENUMBRA_BECH32M_POSITIONID_LENGTH = SPEC.plpid.stringLength; | ||
export const PENUMBRA_BECH32M_POSITIONID_PREFIX = SPEC.plpid.prefix; |
@@ -1,12 +0,10 @@ | ||
export { PENUMBRA_BECH32M_ASSETID_LENGTH, PENUMBRA_BECH32M_ASSETID_PREFIX } from './index.js'; | ||
declare const innerName: "inner"; | ||
declare const bech32mAssetId: ({ [innerName]: bytes }: { | ||
declare const prefix: "passet"; | ||
export declare const bech32mAssetId: ({ [innerName]: bytes }: { | ||
[innerName]: Uint8Array; | ||
}) => `passet1${string}`; | ||
declare const assetIdFromBech32m: (passet1: string) => { | ||
export declare const assetIdFromBech32m: (passet1: string) => { | ||
[innerName]: Uint8Array; | ||
}; | ||
declare const isAssetId: (check: string) => check is `passet1${string}`; | ||
export { assetIdFromBech32m, bech32mAssetId, isAssetId }; | ||
export declare const isAssetId: (check: string) => check is `${typeof prefix}1${string}`; | ||
export { PENUMBRA_BECH32M_ASSETID_LENGTH, PENUMBRA_BECH32M_ASSETID_PREFIX } from '.'; |
@@ -1,1 +0,19 @@ | ||
import{a as s,c as n}from"./chunk-T7SUF5JM.js";import{a as e,d as t,h as m,i as p}from"./chunk-FQ3DGBGS.js";var o=e.passet,i=t.passet,A=({[o]:r})=>n(r,i),c=r=>({[o]:s(r,i)}),E=r=>{try{return c(r),!0}catch{return!1}};export{m as PENUMBRA_BECH32M_ASSETID_LENGTH,p as PENUMBRA_BECH32M_ASSETID_PREFIX,c as assetIdFromBech32m,A as bech32mAssetId,E as isAssetId}; | ||
import { fromBech32m, toBech32m } from './format/convert'; | ||
import { Inner } from './format/inner'; | ||
import { Prefixes } from './format/prefix'; | ||
const innerName = Inner.passet; | ||
const prefix = Prefixes.passet; | ||
export const bech32mAssetId = ({ [innerName]: bytes }) => toBech32m(bytes, prefix); | ||
export const assetIdFromBech32m = (passet1) => ({ | ||
[innerName]: fromBech32m(passet1, prefix), | ||
}); | ||
export const isAssetId = (check) => { | ||
try { | ||
assetIdFromBech32m(check); | ||
return true; | ||
} | ||
catch { | ||
return false; | ||
} | ||
}; | ||
export { PENUMBRA_BECH32M_ASSETID_LENGTH, PENUMBRA_BECH32M_ASSETID_PREFIX } from '.'; |
@@ -1,12 +0,10 @@ | ||
export { PENUMBRA_BECH32M_AUCTION_LENGTH, PENUMBRA_BECH32M_AUCTION_PREFIX } from './index.js'; | ||
declare const innerName: "inner"; | ||
declare const bech32mAuctionId: ({ [innerName]: bytes }: { | ||
declare const prefix: "pauctid"; | ||
export declare const bech32mAuctionId: ({ [innerName]: bytes }: { | ||
[innerName]: Uint8Array; | ||
}) => `pauctid1${string}`; | ||
declare const auctionIdFromBech32: (pauctid1: string) => { | ||
export declare const auctionIdFromBech32: (pauctid1: string) => { | ||
[innerName]: Uint8Array; | ||
}; | ||
declare const isAuctionId: (check: string) => check is `pauctid1${string}`; | ||
export { auctionIdFromBech32, bech32mAuctionId, isAuctionId }; | ||
export declare const isAuctionId: (check: string) => check is `${typeof prefix}1${string}`; | ||
export { PENUMBRA_BECH32M_AUCTION_LENGTH, PENUMBRA_BECH32M_AUCTION_PREFIX } from '.'; |
@@ -1,1 +0,19 @@ | ||
import{a as n,c as o}from"./chunk-T7SUF5JM.js";import{a as t,d as e,j as m,k as p}from"./chunk-FQ3DGBGS.js";var i=t.pauctid,c=e.pauctid,x=({[i]:r})=>o(r,c),s=r=>({[i]:n(r,c)}),A=r=>{try{return s(r),!0}catch{return!1}};export{m as PENUMBRA_BECH32M_AUCTION_LENGTH,p as PENUMBRA_BECH32M_AUCTION_PREFIX,s as auctionIdFromBech32,x as bech32mAuctionId,A as isAuctionId}; | ||
import { fromBech32m, toBech32m } from './format/convert'; | ||
import { Inner } from './format/inner'; | ||
import { Prefixes } from './format/prefix'; | ||
const innerName = Inner.pauctid; | ||
const prefix = Prefixes.pauctid; | ||
export const bech32mAuctionId = ({ [innerName]: bytes }) => toBech32m(bytes, prefix); | ||
export const auctionIdFromBech32 = (pauctid1) => ({ | ||
[innerName]: fromBech32m(pauctid1, prefix), | ||
}); | ||
export const isAuctionId = (check) => { | ||
try { | ||
auctionIdFromBech32(check); | ||
return true; | ||
} | ||
catch { | ||
return false; | ||
} | ||
}; | ||
export { PENUMBRA_BECH32M_AUCTION_LENGTH, PENUMBRA_BECH32M_AUCTION_PREFIX } from '.'; |
@@ -1,12 +0,10 @@ | ||
export { PENUMBRA_BECH32M_ADDRESS_LENGTH, PENUMBRA_BECH32M_ADDRESS_PREFIX } from './index.js'; | ||
declare const innerName: "inner"; | ||
declare const bech32mAddress: ({ [innerName]: bytes }: { | ||
declare const prefix: "penumbra"; | ||
export declare const bech32mAddress: ({ [innerName]: bytes }: { | ||
[innerName]: Uint8Array; | ||
}) => `penumbra1${string}`; | ||
declare const addressFromBech32m: (penumbra1: string) => { | ||
export declare const addressFromBech32m: (penumbra1: string) => { | ||
[innerName]: Uint8Array; | ||
}; | ||
declare const isAddress: (check: string) => check is `penumbra1${string}`; | ||
export { addressFromBech32m, bech32mAddress, isAddress }; | ||
export declare const isAddress: (check: string) => check is `${typeof prefix}1${string}`; | ||
export { PENUMBRA_BECH32M_ADDRESS_LENGTH, PENUMBRA_BECH32M_ADDRESS_PREFIX } from '.'; |
@@ -1,1 +0,19 @@ | ||
import{a as n,c as o}from"./chunk-T7SUF5JM.js";import{a as e,d as t,f as m,g as p}from"./chunk-FQ3DGBGS.js";var s=e.penumbra,i=t.penumbra,A=({[s]:r})=>o(r,i),c=r=>({[s]:n(r,i)}),E=r=>{try{return c(r),!0}catch{return!1}};export{m as PENUMBRA_BECH32M_ADDRESS_LENGTH,p as PENUMBRA_BECH32M_ADDRESS_PREFIX,c as addressFromBech32m,A as bech32mAddress,E as isAddress}; | ||
import { fromBech32m, toBech32m } from './format/convert'; | ||
import { Inner } from './format/inner'; | ||
import { Prefixes } from './format/prefix'; | ||
const innerName = Inner.penumbra; | ||
const prefix = Prefixes.penumbra; | ||
export const bech32mAddress = ({ [innerName]: bytes }) => toBech32m(bytes, prefix); | ||
export const addressFromBech32m = (penumbra1) => ({ | ||
[innerName]: fromBech32m(penumbra1, prefix), | ||
}); | ||
export const isAddress = (check) => { | ||
try { | ||
addressFromBech32m(check); | ||
return true; | ||
} | ||
catch { | ||
return false; | ||
} | ||
}; | ||
export { PENUMBRA_BECH32M_ADDRESS_LENGTH, PENUMBRA_BECH32M_ADDRESS_PREFIX } from '.'; |
@@ -1,11 +0,8 @@ | ||
export { PENUMBRA_BECH32M_ADDRESS_LENGTH, PENUMBRA_BECH32M_ADDRESS_PREFIX } from './index.js'; | ||
declare const innerName: "inner"; | ||
declare const bech32CompatAddress: ({ [innerName]: bytes }: { | ||
export declare const bech32CompatAddress: ({ [innerName]: bytes }: { | ||
[innerName]: Uint8Array; | ||
}) => `penumbracompat11${string}`; | ||
declare const compatAddressFromBech32: (penumbracompat1: string) => { | ||
export declare const compatAddressFromBech32: (penumbracompat1: string) => { | ||
[innerName]: Uint8Array; | ||
}; | ||
export { bech32CompatAddress, compatAddressFromBech32 }; | ||
export { PENUMBRA_BECH32M_ADDRESS_LENGTH, PENUMBRA_BECH32M_ADDRESS_PREFIX } from '.'; |
@@ -1,1 +0,10 @@ | ||
import{b as t,d as m}from"./chunk-T7SUF5JM.js";import{a as e,d as o,f as i,g as a}from"./chunk-FQ3DGBGS.js";var n=e.penumbracompat1,p=o.penumbracompat1,A=({[n]:r})=>m(r,p),E=r=>({[n]:t(r,p)});export{i as PENUMBRA_BECH32M_ADDRESS_LENGTH,a as PENUMBRA_BECH32M_ADDRESS_PREFIX,A as bech32CompatAddress,E as compatAddressFromBech32}; | ||
import { fromBech32, toBech32 } from './format/convert'; | ||
import { Inner } from './format/inner'; | ||
import { Prefixes } from './format/prefix'; | ||
const innerName = Inner.penumbracompat1; | ||
const prefix = Prefixes.penumbracompat1; | ||
export const bech32CompatAddress = ({ [innerName]: bytes }) => toBech32(bytes, prefix); | ||
export const compatAddressFromBech32 = (penumbracompat1) => ({ | ||
[innerName]: fromBech32(penumbracompat1, prefix), | ||
}); | ||
export { PENUMBRA_BECH32M_ADDRESS_LENGTH, PENUMBRA_BECH32M_ADDRESS_PREFIX } from '.'; |
@@ -1,12 +0,10 @@ | ||
export { PENUMBRA_BECH32M_FULLVIEWINGKEY_LENGTH, PENUMBRA_BECH32M_FULLVIEWINGKEY_PREFIX } from './index.js'; | ||
declare const innerName: "inner"; | ||
declare const bech32mFullViewingKey: ({ [innerName]: bytes }: { | ||
declare const prefix: "penumbrafullviewingkey"; | ||
export declare const bech32mFullViewingKey: ({ [innerName]: bytes }: { | ||
[innerName]: Uint8Array; | ||
}) => `penumbrafullviewingkey1${string}`; | ||
declare const fullViewingKeyFromBech32m: (penumbrafullviewingkey1: string) => { | ||
export declare const fullViewingKeyFromBech32m: (penumbrafullviewingkey1: string) => { | ||
[innerName]: Uint8Array; | ||
}; | ||
declare const isFullViewingKey: (check: string) => check is `penumbrafullviewingkey1${string}`; | ||
export { bech32mFullViewingKey, fullViewingKeyFromBech32m, isFullViewingKey }; | ||
export declare const isFullViewingKey: (check: string) => check is `${typeof prefix}1${string}`; | ||
export { PENUMBRA_BECH32M_FULLVIEWINGKEY_LENGTH, PENUMBRA_BECH32M_FULLVIEWINGKEY_PREFIX } from '.'; |
@@ -1,1 +0,19 @@ | ||
import{a as n,c as t}from"./chunk-T7SUF5JM.js";import{a as r,d as i,l as f,m as p}from"./chunk-FQ3DGBGS.js";var o=r.penumbrafullviewingkey,m=i.penumbrafullviewingkey,u=({[o]:e})=>t(e,m),s=e=>({[o]:n(e,m)}),y=e=>{try{return s(e),!0}catch{return!1}};export{f as PENUMBRA_BECH32M_FULLVIEWINGKEY_LENGTH,p as PENUMBRA_BECH32M_FULLVIEWINGKEY_PREFIX,u as bech32mFullViewingKey,s as fullViewingKeyFromBech32m,y as isFullViewingKey}; | ||
import { fromBech32m, toBech32m } from './format/convert'; | ||
import { Inner } from './format/inner'; | ||
import { Prefixes } from './format/prefix'; | ||
const innerName = Inner.penumbrafullviewingkey; | ||
const prefix = Prefixes.penumbrafullviewingkey; | ||
export const bech32mFullViewingKey = ({ [innerName]: bytes }) => toBech32m(bytes, prefix); | ||
export const fullViewingKeyFromBech32m = (penumbrafullviewingkey1) => ({ | ||
[innerName]: fromBech32m(penumbrafullviewingkey1, prefix), | ||
}); | ||
export const isFullViewingKey = (check) => { | ||
try { | ||
fullViewingKeyFromBech32m(check); | ||
return true; | ||
} | ||
catch { | ||
return false; | ||
} | ||
}; | ||
export { PENUMBRA_BECH32M_FULLVIEWINGKEY_LENGTH, PENUMBRA_BECH32M_FULLVIEWINGKEY_PREFIX } from '.'; |
@@ -1,12 +0,10 @@ | ||
export { PENUMBRA_BECH32M_GOVERNANCEID_LENGTH, PENUMBRA_BECH32M_GOVERNANCEID_PREFIX } from './index.js'; | ||
declare const innerName: "gk"; | ||
declare const bech32mGovernanceId: ({ [innerName]: bytes }: { | ||
declare const prefix: "penumbragovern"; | ||
export declare const bech32mGovernanceId: ({ [innerName]: bytes }: { | ||
[innerName]: Uint8Array; | ||
}) => `penumbragovern1${string}`; | ||
declare const governanceIdFromBech32: (penumbragovern1: string) => { | ||
export declare const governanceIdFromBech32: (penumbragovern1: string) => { | ||
[innerName]: Uint8Array; | ||
}; | ||
declare const isGovernanceId: (check: string) => check is `penumbragovern1${string}`; | ||
export { bech32mGovernanceId, governanceIdFromBech32, isGovernanceId }; | ||
export declare const isGovernanceId: (check: string) => check is `${typeof prefix}1${string}`; | ||
export { PENUMBRA_BECH32M_GOVERNANCEID_LENGTH, PENUMBRA_BECH32M_GOVERNANCEID_PREFIX } from '.'; |
@@ -1,1 +0,19 @@ | ||
import{a as o,c as t}from"./chunk-T7SUF5JM.js";import{a as e,d as n,n as c,o as p}from"./chunk-FQ3DGBGS.js";var i=e.penumbragovern,m=n.penumbragovern,N=({[i]:r})=>t(r,m),s=r=>({[i]:o(r,m)}),x=r=>{try{return s(r),!0}catch{return!1}};export{c as PENUMBRA_BECH32M_GOVERNANCEID_LENGTH,p as PENUMBRA_BECH32M_GOVERNANCEID_PREFIX,N as bech32mGovernanceId,s as governanceIdFromBech32,x as isGovernanceId}; | ||
import { fromBech32m, toBech32m } from './format/convert'; | ||
import { Inner } from './format/inner'; | ||
import { Prefixes } from './format/prefix'; | ||
const innerName = Inner.penumbragovern; | ||
const prefix = Prefixes.penumbragovern; | ||
export const bech32mGovernanceId = ({ [innerName]: bytes }) => toBech32m(bytes, prefix); | ||
export const governanceIdFromBech32 = (penumbragovern1) => ({ | ||
[innerName]: fromBech32m(penumbragovern1, prefix), | ||
}); | ||
export const isGovernanceId = (check) => { | ||
try { | ||
governanceIdFromBech32(check); | ||
return true; | ||
} | ||
catch { | ||
return false; | ||
} | ||
}; | ||
export { PENUMBRA_BECH32M_GOVERNANCEID_LENGTH, PENUMBRA_BECH32M_GOVERNANCEID_PREFIX } from '.'; |
@@ -1,12 +0,10 @@ | ||
export { PENUMBRA_BECH32M_SPENDKEY_LENGTH, PENUMBRA_BECH32M_SPENDKEY_PREFIX } from './index.js'; | ||
declare const innerName: "inner"; | ||
declare const bech32mSpendKey: ({ [innerName]: bytes }: { | ||
declare const prefix: "penumbraspendkey"; | ||
export declare const bech32mSpendKey: ({ [innerName]: bytes }: { | ||
[innerName]: Uint8Array; | ||
}) => `penumbraspendkey1${string}`; | ||
declare const spendKeyFromBech32m: (penumbraspendkey1: string) => { | ||
export declare const spendKeyFromBech32m: (penumbraspendkey1: string) => { | ||
[innerName]: Uint8Array; | ||
}; | ||
declare const isSpendKey: (check: string) => check is `penumbraspendkey1${string}`; | ||
export { bech32mSpendKey, isSpendKey, spendKeyFromBech32m }; | ||
export declare const isSpendKey: (check: string) => check is `${typeof prefix}1${string}`; | ||
export { PENUMBRA_BECH32M_SPENDKEY_LENGTH, PENUMBRA_BECH32M_SPENDKEY_PREFIX } from '.'; |
@@ -1,1 +0,19 @@ | ||
import{a as t,c as o}from"./chunk-T7SUF5JM.js";import{a as r,d as n,p as m,q as s}from"./chunk-FQ3DGBGS.js";var p=r.penumbraspendkey,i=n.penumbraspendkey,E=({[p]:e})=>o(e,i),c=e=>({[p]:t(e,i)}),x=e=>{try{return c(e),!0}catch{return!1}};export{m as PENUMBRA_BECH32M_SPENDKEY_LENGTH,s as PENUMBRA_BECH32M_SPENDKEY_PREFIX,E as bech32mSpendKey,x as isSpendKey,c as spendKeyFromBech32m}; | ||
import { fromBech32m, toBech32m } from './format/convert'; | ||
import { Inner } from './format/inner'; | ||
import { Prefixes } from './format/prefix'; | ||
const innerName = Inner.penumbraspendkey; | ||
const prefix = Prefixes.penumbraspendkey; | ||
export const bech32mSpendKey = ({ [innerName]: bytes }) => toBech32m(bytes, prefix); | ||
export const spendKeyFromBech32m = (penumbraspendkey1) => ({ | ||
[innerName]: fromBech32m(penumbraspendkey1, prefix), | ||
}); | ||
export const isSpendKey = (check) => { | ||
try { | ||
spendKeyFromBech32m(check); | ||
return true; | ||
} | ||
catch { | ||
return false; | ||
} | ||
}; | ||
export { PENUMBRA_BECH32M_SPENDKEY_LENGTH, PENUMBRA_BECH32M_SPENDKEY_PREFIX } from '.'; |
@@ -1,12 +0,10 @@ | ||
export { PENUMBRA_BECH32M_IDENTITYKEY_LENGTH, PENUMBRA_BECH32M_IDENTITYKEY_PREFIX } from './index.js'; | ||
declare const innerName: "ik"; | ||
declare const bech32mIdentityKey: ({ [innerName]: bytes }: { | ||
declare const prefix: "penumbravalid"; | ||
export declare const bech32mIdentityKey: ({ [innerName]: bytes }: { | ||
[innerName]: Uint8Array; | ||
}) => `penumbravalid1${string}`; | ||
declare const identityKeyFromBech32m: (penumbravalid1: string) => { | ||
export declare const identityKeyFromBech32m: (penumbravalid1: string) => { | ||
[innerName]: Uint8Array; | ||
}; | ||
declare const isIdentityKey: (check: string) => check is `penumbravalid1${string}`; | ||
export { bech32mIdentityKey, identityKeyFromBech32m, isIdentityKey }; | ||
export declare const isIdentityKey: (check: string) => check is `${typeof prefix}1${string}`; | ||
export { PENUMBRA_BECH32M_IDENTITYKEY_LENGTH, PENUMBRA_BECH32M_IDENTITYKEY_PREFIX } from '.'; |
@@ -1,1 +0,19 @@ | ||
import{a as n,c as i}from"./chunk-T7SUF5JM.js";import{a as e,d as t,r as p,s}from"./chunk-FQ3DGBGS.js";var o=e.penumbravalid,m=t.penumbravalid,E=({[o]:r})=>i(r,m),c=r=>({[o]:n(r,m)}),x=r=>{try{return c(r),!0}catch{return!1}};export{p as PENUMBRA_BECH32M_IDENTITYKEY_LENGTH,s as PENUMBRA_BECH32M_IDENTITYKEY_PREFIX,E as bech32mIdentityKey,c as identityKeyFromBech32m,x as isIdentityKey}; | ||
import { fromBech32m, toBech32m } from './format/convert'; | ||
import { Inner } from './format/inner'; | ||
import { Prefixes } from './format/prefix'; | ||
const innerName = Inner.penumbravalid; | ||
const prefix = Prefixes.penumbravalid; | ||
export const bech32mIdentityKey = ({ [innerName]: bytes }) => toBech32m(bytes, prefix); | ||
export const identityKeyFromBech32m = (penumbravalid1) => ({ | ||
[innerName]: fromBech32m(penumbravalid1, prefix), | ||
}); | ||
export const isIdentityKey = (check) => { | ||
try { | ||
identityKeyFromBech32m(check); | ||
return true; | ||
} | ||
catch { | ||
return false; | ||
} | ||
}; | ||
export { PENUMBRA_BECH32M_IDENTITYKEY_LENGTH, PENUMBRA_BECH32M_IDENTITYKEY_PREFIX } from '.'; |
@@ -1,12 +0,10 @@ | ||
export { PENUMBRA_BECH32M_WALLETID_LENGTH, PENUMBRA_BECH32M_WALLETID_PREFIX } from './index.js'; | ||
declare const innerName: "inner"; | ||
declare const bech32mWalletId: ({ [innerName]: bytes }: { | ||
declare const prefix: "penumbrawalletid"; | ||
export declare const bech32mWalletId: ({ [innerName]: bytes }: { | ||
[innerName]: Uint8Array; | ||
}) => `penumbrawalletid1${string}`; | ||
declare const walletIdFromBech32m: (penumbrawalletid1: string) => { | ||
export declare const walletIdFromBech32m: (penumbrawalletid1: string) => { | ||
[innerName]: Uint8Array; | ||
}; | ||
declare const isWalletId: (check: string) => check is `penumbrawalletid1${string}`; | ||
export { bech32mWalletId, isWalletId, walletIdFromBech32m }; | ||
export declare const isWalletId: (check: string) => check is `${typeof prefix}1${string}`; | ||
export { PENUMBRA_BECH32M_WALLETID_LENGTH, PENUMBRA_BECH32M_WALLETID_PREFIX } from '.'; |
@@ -1,1 +0,19 @@ | ||
import{a as n,c as o}from"./chunk-T7SUF5JM.js";import{a as e,d as t,t as a,u as p}from"./chunk-FQ3DGBGS.js";var i=e.penumbrawalletid,m=t.penumbrawalletid,x=({[i]:r})=>o(r,m),s=r=>({[i]:n(r,m)}),E=r=>{try{return s(r),!0}catch{return!1}};export{a as PENUMBRA_BECH32M_WALLETID_LENGTH,p as PENUMBRA_BECH32M_WALLETID_PREFIX,x as bech32mWalletId,E as isWalletId,s as walletIdFromBech32m}; | ||
import { fromBech32m, toBech32m } from './format/convert'; | ||
import { Inner } from './format/inner'; | ||
import { Prefixes } from './format/prefix'; | ||
const innerName = Inner.penumbrawalletid; | ||
const prefix = Prefixes.penumbrawalletid; | ||
export const bech32mWalletId = ({ [innerName]: bytes }) => toBech32m(bytes, prefix); | ||
export const walletIdFromBech32m = (penumbrawalletid1) => ({ | ||
[innerName]: fromBech32m(penumbrawalletid1, prefix), | ||
}); | ||
export const isWalletId = (check) => { | ||
try { | ||
walletIdFromBech32m(check); | ||
return true; | ||
} | ||
catch { | ||
return false; | ||
} | ||
}; | ||
export { PENUMBRA_BECH32M_WALLETID_LENGTH, PENUMBRA_BECH32M_WALLETID_PREFIX } from '.'; |
@@ -1,12 +0,10 @@ | ||
export { PENUMBRA_BECH32M_POSITIONID_LENGTH, PENUMBRA_BECH32M_POSITIONID_PREFIX } from './index.js'; | ||
declare const innerName: "inner"; | ||
declare const bech32mPositionId: ({ [innerName]: bytes }: { | ||
declare const prefix: "plpid"; | ||
export declare const bech32mPositionId: ({ [innerName]: bytes }: { | ||
[innerName]: Uint8Array; | ||
}) => `plpid1${string}`; | ||
declare const positionIdFromBech32: (plpid1: string) => { | ||
export declare const positionIdFromBech32: (plpid1: string) => { | ||
[innerName]: Uint8Array; | ||
}; | ||
declare const isPositionId: (check: string) => check is `plpid1${string}`; | ||
export { bech32mPositionId, isPositionId, positionIdFromBech32 }; | ||
export declare const isPositionId: (check: string) => check is `${typeof prefix}1${string}`; | ||
export { PENUMBRA_BECH32M_POSITIONID_LENGTH, PENUMBRA_BECH32M_POSITIONID_PREFIX } from '.'; |
@@ -1,1 +0,19 @@ | ||
import{a as o,c as i}from"./chunk-T7SUF5JM.js";import{a as t,d as e,v as s,w as m}from"./chunk-FQ3DGBGS.js";var n=t.plpid,p=e.plpid,x=({[n]:r})=>i(r,p),c=r=>({[n]:o(r,p)}),N=r=>{try{return c(r),!0}catch{return!1}};export{s as PENUMBRA_BECH32M_POSITIONID_LENGTH,m as PENUMBRA_BECH32M_POSITIONID_PREFIX,x as bech32mPositionId,N as isPositionId,c as positionIdFromBech32}; | ||
import { fromBech32m, toBech32m } from './format/convert'; | ||
import { Inner } from './format/inner'; | ||
import { Prefixes } from './format/prefix'; | ||
const innerName = Inner.plpid; | ||
const prefix = Prefixes.plpid; | ||
export const bech32mPositionId = ({ [innerName]: bytes }) => toBech32m(bytes, prefix); | ||
export const positionIdFromBech32 = (plpid1) => ({ | ||
[innerName]: fromBech32m(plpid1, prefix), | ||
}); | ||
export const isPositionId = (check) => { | ||
try { | ||
positionIdFromBech32(check); | ||
return true; | ||
} | ||
catch { | ||
return false; | ||
} | ||
}; | ||
export { PENUMBRA_BECH32M_POSITIONID_LENGTH, PENUMBRA_BECH32M_POSITIONID_PREFIX } from '.'; |
{ | ||
"name": "@penumbra-zone/bech32m", | ||
"version": "5.1.0", | ||
"version": "6.0.0", | ||
"license": "(MIT OR Apache-2.0)", | ||
"description": "Tools for manipulating Penumbra bech32m strings", | ||
"type": "module", | ||
"engine": { | ||
"node": ">=22" | ||
}, | ||
"files": [ | ||
"./dist", | ||
"README.md", | ||
"CHANGELOG.md" | ||
"dist", | ||
"!dist/**/*.test.*", | ||
"!dist/test/util" | ||
], | ||
@@ -25,15 +28,8 @@ "exports": { | ||
}, | ||
"devDependencies": { | ||
"@buf/penumbra-zone_penumbra.bufbuild_es": "1.9.0-20240528180215-8fe1c79485f8.1", | ||
"tsup": "^8.1.0" | ||
}, | ||
"peerDependencies": { | ||
"@buf/penumbra-zone_penumbra.bufbuild_es": "1.9.0-20240528180215-8fe1c79485f8.1" | ||
}, | ||
"scripts": { | ||
"build": "tsup src/*.ts --dts --minify --format esm", | ||
"clean": "rm -rfv dist", | ||
"lint": "eslint src", | ||
"build": "tsc --build", | ||
"clean": "rm -rfv dist package penumbra-zone-*.tgz tsconfig.tsbuildinfo", | ||
"lint": "tsc --noEmit && eslint src", | ||
"test": "vitest run" | ||
} | ||
} |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
30488
1
0
36
678