@solana/keys 2.0.0-experimental.ee9f3d8 → 2.0.0-experimental.f040ea3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -31
- package/dist/index.browser.cjs +12 -102
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.js +10 -98
- package/dist/index.browser.js.map +1 -1
- package/dist/index.development.js +24 -321
- package/dist/index.development.js.map +1 -1
- package/dist/index.native.js +10 -87
- package/dist/index.native.js.map +1 -1
- package/dist/index.node.cjs +12 -91
- package/dist/index.node.cjs.map +1 -1
- package/dist/index.node.js +10 -87
- package/dist/index.node.js.map +1 -1
- package/dist/index.production.min.js +8 -6
- package/dist/types/index.d.ts +1 -2
- package/dist/types/signatures.d.ts +6 -0
- package/package.json +14 -17
- package/dist/types/base58.d.ts +0 -10
- package/dist/types/guard.d.ts +0 -5
- package/dist/types/pubkey.d.ts +0 -3
package/dist/index.node.cjs
CHANGED
|
@@ -1,85 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
// ../build-scripts/env-shim.ts
|
|
6
|
-
var __DEV__ = /* @__PURE__ */ (() => process["env"].NODE_ENV === "development")();
|
|
7
|
-
function assertIsBase58EncodedAddress(putativeBase58EncodedAddress) {
|
|
8
|
-
try {
|
|
9
|
-
if (
|
|
10
|
-
// Lowest address (32 bytes of zeroes)
|
|
11
|
-
putativeBase58EncodedAddress.length < 32 || // Highest address (32 bytes of 255)
|
|
12
|
-
putativeBase58EncodedAddress.length > 44
|
|
13
|
-
) {
|
|
14
|
-
throw new Error("Expected input string to decode to a byte array of length 32.");
|
|
15
|
-
}
|
|
16
|
-
const bytes = umiSerializers.base58.serialize(putativeBase58EncodedAddress);
|
|
17
|
-
const numBytes = bytes.byteLength;
|
|
18
|
-
if (numBytes !== 32) {
|
|
19
|
-
throw new Error(`Expected input string to decode to a byte array of length 32. Actual length: ${numBytes}`);
|
|
20
|
-
}
|
|
21
|
-
} catch (e) {
|
|
22
|
-
throw new Error(`\`${putativeBase58EncodedAddress}\` is not a base-58 encoded address`, {
|
|
23
|
-
cause: e
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
function getBase58EncodedAddressCodec(config) {
|
|
28
|
-
return umiSerializers.string({
|
|
29
|
-
description: config?.description ?? (__DEV__ ? "A 32-byte account address" : ""),
|
|
30
|
-
encoding: umiSerializers.base58,
|
|
31
|
-
size: 32
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
function getBase58EncodedAddressComparator() {
|
|
35
|
-
return new Intl.Collator("en", {
|
|
36
|
-
caseFirst: "lower",
|
|
37
|
-
ignorePunctuation: false,
|
|
38
|
-
localeMatcher: "best fit",
|
|
39
|
-
numeric: false,
|
|
40
|
-
sensitivity: "variant",
|
|
41
|
-
usage: "sort"
|
|
42
|
-
}).compare;
|
|
43
|
-
}
|
|
44
|
-
var cachedEd25519Decision;
|
|
45
|
-
async function isEd25519CurveSupported(subtle) {
|
|
46
|
-
if (cachedEd25519Decision === void 0) {
|
|
47
|
-
cachedEd25519Decision = new Promise((resolve) => {
|
|
48
|
-
subtle.generateKey(
|
|
49
|
-
"Ed25519",
|
|
50
|
-
/* extractable */
|
|
51
|
-
false,
|
|
52
|
-
["sign", "verify"]
|
|
53
|
-
).catch(() => {
|
|
54
|
-
resolve(cachedEd25519Decision = false);
|
|
55
|
-
}).then(() => {
|
|
56
|
-
resolve(cachedEd25519Decision = true);
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
if (typeof cachedEd25519Decision === "boolean") {
|
|
61
|
-
return cachedEd25519Decision;
|
|
62
|
-
} else {
|
|
63
|
-
return await cachedEd25519Decision;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
async function assertKeyGenerationIsAvailable() {
|
|
67
|
-
if (typeof globalThis.crypto === "undefined" || typeof globalThis.crypto.subtle?.generateKey !== "function") {
|
|
68
|
-
throw new Error("No key generation implementation could be found");
|
|
69
|
-
}
|
|
70
|
-
if (!await isEd25519CurveSupported(globalThis.crypto.subtle)) {
|
|
71
|
-
throw new Error("This runtime does not support the generation of Ed25519 keypairs");
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
async function assertKeyExporterIsAvailable() {
|
|
75
|
-
if (typeof globalThis.crypto === "undefined" || typeof globalThis.crypto.subtle?.exportKey !== "function") {
|
|
76
|
-
throw new Error("No key export implementation could be found");
|
|
77
|
-
}
|
|
78
|
-
}
|
|
3
|
+
var assertions = require('@solana/assertions');
|
|
79
4
|
|
|
80
5
|
// src/key-pair.ts
|
|
81
6
|
async function generateKeyPair() {
|
|
82
|
-
await assertKeyGenerationIsAvailable();
|
|
7
|
+
await assertions.assertKeyGenerationIsAvailable();
|
|
83
8
|
const keyPair = await crypto.subtle.generateKey(
|
|
84
9
|
/* algorithm */
|
|
85
10
|
"Ed25519",
|
|
@@ -92,22 +17,18 @@ async function generateKeyPair() {
|
|
|
92
17
|
);
|
|
93
18
|
return keyPair;
|
|
94
19
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
const [base58EncodedAddress] = getBase58EncodedAddressCodec().deserialize(new Uint8Array(publicKeyBytes));
|
|
104
|
-
return base58EncodedAddress;
|
|
20
|
+
async function signBytes(key, data) {
|
|
21
|
+
await assertions.assertSigningCapabilityIsAvailable();
|
|
22
|
+
const signedData = await crypto.subtle.sign("Ed25519", key, data);
|
|
23
|
+
return new Uint8Array(signedData);
|
|
24
|
+
}
|
|
25
|
+
async function verifySignature(key, signature, data) {
|
|
26
|
+
await assertions.assertVerificationCapabilityIsAvailable();
|
|
27
|
+
return await crypto.subtle.verify("Ed25519", key, signature, data);
|
|
105
28
|
}
|
|
106
29
|
|
|
107
|
-
exports.assertIsBase58EncodedAddress = assertIsBase58EncodedAddress;
|
|
108
30
|
exports.generateKeyPair = generateKeyPair;
|
|
109
|
-
exports.
|
|
110
|
-
exports.
|
|
111
|
-
exports.getBase58EncodedAddressFromPublicKey = getBase58EncodedAddressFromPublicKey;
|
|
31
|
+
exports.signBytes = signBytes;
|
|
32
|
+
exports.verifySignature = verifySignature;
|
|
112
33
|
//# sourceMappingURL=out.js.map
|
|
113
34
|
//# sourceMappingURL=index.node.cjs.map
|
package/dist/index.node.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../src/key-pair.ts","../src/signatures.ts"],"names":[],"mappings":";AAAA,SAAS,sCAAsC;AAE/C,eAAsB,kBAA0C;AAC5D,QAAM,+BAA+B;AACrC,QAAM,UAAU,MAAM,OAAO,OAAO;AAAA;AAAA,IAChB;AAAA;AAAA;AAAA,IACE;AAAA;AAAA;AAAA,IACC,CAAC,QAAQ,QAAQ;AAAA,EACxC;AACA,SAAO;AACX;;;ACVA,SAAS,oCAAoC,+CAA+C;AAI5F,eAAsB,UAAU,KAAgB,MAA6C;AACzF,QAAM,mCAAmC;AACzC,QAAM,aAAa,MAAM,OAAO,OAAO,KAAK,WAAW,KAAK,IAAI;AAChE,SAAO,IAAI,WAAW,UAAU;AACpC;AAEA,eAAsB,gBAAgB,KAAgB,WAA6B,MAAoC;AACnH,QAAM,wCAAwC;AAC9C,SAAO,MAAM,OAAO,OAAO,OAAO,WAAW,KAAK,WAAW,IAAI;AACrE","sourcesContent":["import { assertKeyGenerationIsAvailable } from '@solana/assertions';\n\nexport async function generateKeyPair(): Promise<CryptoKeyPair> {\n await assertKeyGenerationIsAvailable();\n const keyPair = await crypto.subtle.generateKey(\n /* algorithm */ 'Ed25519', // Native implementation status: https://github.com/WICG/webcrypto-secure-curves/issues/20\n /* extractable */ false, // Prevents the bytes of the private key from being visible to JS.\n /* allowed uses */ ['sign', 'verify']\n );\n return keyPair as CryptoKeyPair;\n}\n","import { assertSigningCapabilityIsAvailable, assertVerificationCapabilityIsAvailable } from '@solana/assertions';\n\nexport type Ed25519Signature = Uint8Array & { readonly __brand: unique symbol };\n\nexport async function signBytes(key: CryptoKey, data: Uint8Array): Promise<Ed25519Signature> {\n await assertSigningCapabilityIsAvailable();\n const signedData = await crypto.subtle.sign('Ed25519', key, data);\n return new Uint8Array(signedData) as Ed25519Signature;\n}\n\nexport async function verifySignature(key: CryptoKey, signature: Ed25519Signature, data: Uint8Array): Promise<boolean> {\n await assertVerificationCapabilityIsAvailable();\n return await crypto.subtle.verify('Ed25519', key, signature, data);\n}\n"]}
|
package/dist/index.node.js
CHANGED
|
@@ -1,79 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
// ../build-scripts/env-shim.ts
|
|
4
|
-
var __DEV__ = /* @__PURE__ */ (() => process["env"].NODE_ENV === "development")();
|
|
5
|
-
function assertIsBase58EncodedAddress(putativeBase58EncodedAddress) {
|
|
6
|
-
try {
|
|
7
|
-
if (
|
|
8
|
-
// Lowest address (32 bytes of zeroes)
|
|
9
|
-
putativeBase58EncodedAddress.length < 32 || // Highest address (32 bytes of 255)
|
|
10
|
-
putativeBase58EncodedAddress.length > 44
|
|
11
|
-
) {
|
|
12
|
-
throw new Error("Expected input string to decode to a byte array of length 32.");
|
|
13
|
-
}
|
|
14
|
-
const bytes = base58.serialize(putativeBase58EncodedAddress);
|
|
15
|
-
const numBytes = bytes.byteLength;
|
|
16
|
-
if (numBytes !== 32) {
|
|
17
|
-
throw new Error(`Expected input string to decode to a byte array of length 32. Actual length: ${numBytes}`);
|
|
18
|
-
}
|
|
19
|
-
} catch (e) {
|
|
20
|
-
throw new Error(`\`${putativeBase58EncodedAddress}\` is not a base-58 encoded address`, {
|
|
21
|
-
cause: e
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
function getBase58EncodedAddressCodec(config) {
|
|
26
|
-
return string({
|
|
27
|
-
description: config?.description ?? (__DEV__ ? "A 32-byte account address" : ""),
|
|
28
|
-
encoding: base58,
|
|
29
|
-
size: 32
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
function getBase58EncodedAddressComparator() {
|
|
33
|
-
return new Intl.Collator("en", {
|
|
34
|
-
caseFirst: "lower",
|
|
35
|
-
ignorePunctuation: false,
|
|
36
|
-
localeMatcher: "best fit",
|
|
37
|
-
numeric: false,
|
|
38
|
-
sensitivity: "variant",
|
|
39
|
-
usage: "sort"
|
|
40
|
-
}).compare;
|
|
41
|
-
}
|
|
42
|
-
var cachedEd25519Decision;
|
|
43
|
-
async function isEd25519CurveSupported(subtle) {
|
|
44
|
-
if (cachedEd25519Decision === void 0) {
|
|
45
|
-
cachedEd25519Decision = new Promise((resolve) => {
|
|
46
|
-
subtle.generateKey(
|
|
47
|
-
"Ed25519",
|
|
48
|
-
/* extractable */
|
|
49
|
-
false,
|
|
50
|
-
["sign", "verify"]
|
|
51
|
-
).catch(() => {
|
|
52
|
-
resolve(cachedEd25519Decision = false);
|
|
53
|
-
}).then(() => {
|
|
54
|
-
resolve(cachedEd25519Decision = true);
|
|
55
|
-
});
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
if (typeof cachedEd25519Decision === "boolean") {
|
|
59
|
-
return cachedEd25519Decision;
|
|
60
|
-
} else {
|
|
61
|
-
return await cachedEd25519Decision;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
async function assertKeyGenerationIsAvailable() {
|
|
65
|
-
if (typeof globalThis.crypto === "undefined" || typeof globalThis.crypto.subtle?.generateKey !== "function") {
|
|
66
|
-
throw new Error("No key generation implementation could be found");
|
|
67
|
-
}
|
|
68
|
-
if (!await isEd25519CurveSupported(globalThis.crypto.subtle)) {
|
|
69
|
-
throw new Error("This runtime does not support the generation of Ed25519 keypairs");
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
async function assertKeyExporterIsAvailable() {
|
|
73
|
-
if (typeof globalThis.crypto === "undefined" || typeof globalThis.crypto.subtle?.exportKey !== "function") {
|
|
74
|
-
throw new Error("No key export implementation could be found");
|
|
75
|
-
}
|
|
76
|
-
}
|
|
1
|
+
import { assertKeyGenerationIsAvailable, assertSigningCapabilityIsAvailable, assertVerificationCapabilityIsAvailable } from '@solana/assertions';
|
|
77
2
|
|
|
78
3
|
// src/key-pair.ts
|
|
79
4
|
async function generateKeyPair() {
|
|
@@ -90,18 +15,16 @@ async function generateKeyPair() {
|
|
|
90
15
|
);
|
|
91
16
|
return keyPair;
|
|
92
17
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
const [base58EncodedAddress] = getBase58EncodedAddressCodec().deserialize(new Uint8Array(publicKeyBytes));
|
|
102
|
-
return base58EncodedAddress;
|
|
18
|
+
async function signBytes(key, data) {
|
|
19
|
+
await assertSigningCapabilityIsAvailable();
|
|
20
|
+
const signedData = await crypto.subtle.sign("Ed25519", key, data);
|
|
21
|
+
return new Uint8Array(signedData);
|
|
22
|
+
}
|
|
23
|
+
async function verifySignature(key, signature, data) {
|
|
24
|
+
await assertVerificationCapabilityIsAvailable();
|
|
25
|
+
return await crypto.subtle.verify("Ed25519", key, signature, data);
|
|
103
26
|
}
|
|
104
27
|
|
|
105
|
-
export {
|
|
28
|
+
export { generateKeyPair, signBytes, verifySignature };
|
|
106
29
|
//# sourceMappingURL=out.js.map
|
|
107
30
|
//# sourceMappingURL=index.node.js.map
|
package/dist/index.node.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../src/key-pair.ts","../src/signatures.ts"],"names":[],"mappings":";AAAA,SAAS,sCAAsC;AAE/C,eAAsB,kBAA0C;AAC5D,QAAM,+BAA+B;AACrC,QAAM,UAAU,MAAM,OAAO,OAAO;AAAA;AAAA,IAChB;AAAA;AAAA;AAAA,IACE;AAAA;AAAA;AAAA,IACC,CAAC,QAAQ,QAAQ;AAAA,EACxC;AACA,SAAO;AACX;;;ACVA,SAAS,oCAAoC,+CAA+C;AAI5F,eAAsB,UAAU,KAAgB,MAA6C;AACzF,QAAM,mCAAmC;AACzC,QAAM,aAAa,MAAM,OAAO,OAAO,KAAK,WAAW,KAAK,IAAI;AAChE,SAAO,IAAI,WAAW,UAAU;AACpC;AAEA,eAAsB,gBAAgB,KAAgB,WAA6B,MAAoC;AACnH,QAAM,wCAAwC;AAC9C,SAAO,MAAM,OAAO,OAAO,OAAO,WAAW,KAAK,WAAW,IAAI;AACrE","sourcesContent":["import { assertKeyGenerationIsAvailable } from '@solana/assertions';\n\nexport async function generateKeyPair(): Promise<CryptoKeyPair> {\n await assertKeyGenerationIsAvailable();\n const keyPair = await crypto.subtle.generateKey(\n /* algorithm */ 'Ed25519', // Native implementation status: https://github.com/WICG/webcrypto-secure-curves/issues/20\n /* extractable */ false, // Prevents the bytes of the private key from being visible to JS.\n /* allowed uses */ ['sign', 'verify']\n );\n return keyPair as CryptoKeyPair;\n}\n","import { assertSigningCapabilityIsAvailable, assertVerificationCapabilityIsAvailable } from '@solana/assertions';\n\nexport type Ed25519Signature = Uint8Array & { readonly __brand: unique symbol };\n\nexport async function signBytes(key: CryptoKey, data: Uint8Array): Promise<Ed25519Signature> {\n await assertSigningCapabilityIsAvailable();\n const signedData = await crypto.subtle.sign('Ed25519', key, data);\n return new Uint8Array(signedData) as Ed25519Signature;\n}\n\nexport async function verifySignature(key: CryptoKey, signature: Ed25519Signature, data: Uint8Array): Promise<boolean> {\n await assertVerificationCapabilityIsAvailable();\n return await crypto.subtle.verify('Ed25519', key, signature, data);\n}\n"]}
|
|
@@ -2,13 +2,15 @@ this.globalThis = this.globalThis || {};
|
|
|
2
2
|
this.globalThis.solanaWeb3 = (function (exports) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
function n(){if(!globalThis.isSecureContext)throw new Error("Cryptographic operations are only allowed in secure browser contexts. Read more here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts")}var e;async function y(t){return e===void 0&&(e=new Promise(o=>{t.generateKey("Ed25519",!1,["sign","verify"]).catch(()=>{o(e=!1);}).then(()=>{o(e=!0);});})),typeof e=="boolean"?e:await e}async function a(){if(n(),typeof globalThis.crypto>"u"||typeof globalThis.crypto.subtle?.generateKey!="function")throw new Error("No key generation implementation could be found");if(!await y(globalThis.crypto.subtle))throw new Error(`This runtime does not support the generation of Ed25519 key pairs.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
exports.
|
|
7
|
+
Install and import \`@solana/webcrypto-ed25519-polyfill\` before generating keys in environments that do not support Ed25519.
|
|
8
|
+
|
|
9
|
+
For a list of runtimes that currently support Ed25519 operations, visit https://github.com/WICG/webcrypto-secure-curves/issues/20`)}async function s(){if(n(),typeof globalThis.crypto>"u"||typeof globalThis.crypto.subtle?.sign!="function")throw new Error("No signing implementation could be found")}async function l(){if(n(),typeof globalThis.crypto>"u"||typeof globalThis.crypto.subtle?.verify!="function")throw new Error("No signature verification implementation could be found")}async function d(){return await a(),await crypto.subtle.generateKey("Ed25519",!1,["sign","verify"])}async function m(t,o){await s();let r=await crypto.subtle.sign("Ed25519",t,o);return new Uint8Array(r)}async function w(t,o,r){return await l(),await crypto.subtle.verify("Ed25519",t,o,r)}
|
|
10
|
+
|
|
11
|
+
exports.generateKeyPair = d;
|
|
12
|
+
exports.signBytes = m;
|
|
13
|
+
exports.verifySignature = w;
|
|
12
14
|
|
|
13
15
|
return exports;
|
|
14
16
|
|
package/dist/types/index.d.ts
CHANGED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type Ed25519Signature = Uint8Array & {
|
|
2
|
+
readonly __brand: unique symbol;
|
|
3
|
+
};
|
|
4
|
+
export declare function signBytes(key: CryptoKey, data: Uint8Array): Promise<Ed25519Signature>;
|
|
5
|
+
export declare function verifySignature(key: CryptoKey, signature: Ed25519Signature, data: Uint8Array): Promise<boolean>;
|
|
6
|
+
//# sourceMappingURL=signatures.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solana/keys",
|
|
3
|
-
"version": "2.0.0-experimental.
|
|
3
|
+
"version": "2.0.0-experimental.f040ea3",
|
|
4
4
|
"description": "Helpers for generating and transforming key material",
|
|
5
5
|
"exports": {
|
|
6
6
|
"browser": {
|
|
@@ -49,29 +49,25 @@
|
|
|
49
49
|
"node": ">=17.4"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@
|
|
52
|
+
"@solana/assertions": "2.0.0-experimental.f040ea3"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@solana/eslint-config-solana": "^1.0.2",
|
|
56
|
-
"@swc/
|
|
57
|
-
"@
|
|
58
|
-
"@
|
|
59
|
-
"@typescript-eslint/
|
|
60
|
-
"@typescript-eslint/parser": "^6.0.0",
|
|
56
|
+
"@swc/jest": "^0.2.28",
|
|
57
|
+
"@types/jest": "^29.5.5",
|
|
58
|
+
"@typescript-eslint/eslint-plugin": "^6.7.0",
|
|
59
|
+
"@typescript-eslint/parser": "^6.3.0",
|
|
61
60
|
"agadoo": "^3.0.0",
|
|
62
61
|
"eslint": "^8.45.0",
|
|
63
62
|
"eslint-plugin-jest": "^27.2.3",
|
|
64
|
-
"eslint-plugin-react-hooks": "^4.6.0",
|
|
65
63
|
"eslint-plugin-sort-keys-fix": "^1.1.2",
|
|
66
|
-
"jest": "^29.
|
|
67
|
-
"jest-environment-jsdom": "^29.6.
|
|
64
|
+
"jest": "^29.7.0",
|
|
65
|
+
"jest-environment-jsdom": "^29.6.4",
|
|
68
66
|
"jest-runner-eslint": "^2.1.0",
|
|
69
67
|
"jest-runner-prettier": "^1.0.0",
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"tsup": "6.7.0",
|
|
74
|
-
"typescript": "^5.1.6",
|
|
68
|
+
"prettier": "^2.8",
|
|
69
|
+
"tsup": "7.2.0",
|
|
70
|
+
"typescript": "^5.2.2",
|
|
75
71
|
"version-from-git": "^1.1.1",
|
|
76
72
|
"build-scripts": "0.0.0",
|
|
77
73
|
"test-config": "0.0.0",
|
|
@@ -90,11 +86,12 @@
|
|
|
90
86
|
"compile:typedefs": "tsc -p ./tsconfig.declarations.json",
|
|
91
87
|
"dev": "jest -c node_modules/test-config/jest-dev.config.ts --rootDir . --watch",
|
|
92
88
|
"publish-packages": "pnpm publish --tag experimental --access public --no-git-checks",
|
|
89
|
+
"style:fix": "pnpm eslint --fix src/* && pnpm prettier -w src/*",
|
|
93
90
|
"test:lint": "jest -c node_modules/test-config/jest-lint.config.ts --rootDir . --silent",
|
|
94
91
|
"test:prettier": "jest -c node_modules/test-config/jest-prettier.config.ts --rootDir . --silent",
|
|
95
92
|
"test:treeshakability:browser": "agadoo dist/index.browser.js",
|
|
96
|
-
"test:treeshakability:native": "agadoo dist/index.
|
|
97
|
-
"test:treeshakability:node": "agadoo dist/index.
|
|
93
|
+
"test:treeshakability:native": "agadoo dist/index.native.js",
|
|
94
|
+
"test:treeshakability:node": "agadoo dist/index.node.js",
|
|
98
95
|
"test:typecheck": "tsc --noEmit",
|
|
99
96
|
"test:unit:browser": "jest -c node_modules/test-config/jest-unit.config.browser.ts --rootDir . --silent",
|
|
100
97
|
"test:unit:node": "jest -c node_modules/test-config/jest-unit.config.node.ts --rootDir . --silent"
|
package/dist/types/base58.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Serializer } from '@metaplex-foundation/umi-serializers';
|
|
2
|
-
export type Base58EncodedAddress<TAddress extends string = string> = TAddress & {
|
|
3
|
-
readonly __base58EncodedAddress: unique symbol;
|
|
4
|
-
};
|
|
5
|
-
export declare function assertIsBase58EncodedAddress(putativeBase58EncodedAddress: string): asserts putativeBase58EncodedAddress is Base58EncodedAddress<typeof putativeBase58EncodedAddress>;
|
|
6
|
-
export declare function getBase58EncodedAddressCodec(config?: Readonly<{
|
|
7
|
-
description: string;
|
|
8
|
-
}>): Serializer<Base58EncodedAddress>;
|
|
9
|
-
export declare function getBase58EncodedAddressComparator(): (x: string, y: string) => number;
|
|
10
|
-
//# sourceMappingURL=base58.d.ts.map
|
package/dist/types/guard.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare function assertKeyGenerationIsAvailable(): Promise<void>;
|
|
2
|
-
export declare function assertKeyExporterIsAvailable(): Promise<void>;
|
|
3
|
-
export declare function assertSigningCapabilityIsAvailable(): Promise<void>;
|
|
4
|
-
export declare function assertVerificationCapabilityIsAvailable(): Promise<void>;
|
|
5
|
-
//# sourceMappingURL=guard.d.ts.map
|
package/dist/types/pubkey.d.ts
DELETED