@secondlayer/stacks 6.0.0 → 6.1.1
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/dist/shared/stacks-esm-0pc6tmf0.js +50 -0
- package/dist/shared/{stacks-qex691bh.js.map → stacks-esm-0pc6tmf0.js.map} +2 -2
- package/dist/shared/{stacks-qt8ehebn.js → stacks-esm-16d82wyc.js} +10 -10
- package/dist/shared/{stacks-qt8ehebn.js.map → stacks-esm-16d82wyc.js.map} +2 -2
- package/dist/shared/{stacks-qs5fzts5.js → stacks-esm-7a0ehykf.js} +43 -43
- package/dist/shared/{stacks-qs5fzts5.js.map → stacks-esm-7a0ehykf.js.map} +2 -2
- package/dist/shared/{stacks-4hs8r4q2.js → stacks-esm-7v18h5dk.js} +4 -4
- package/dist/shared/{stacks-xjkn3en1.cjs.map → stacks-esm-7v18h5dk.js.map} +2 -2
- package/dist/shared/{stacks-71k0vmct.js → stacks-esm-8f5catbf.js} +126 -126
- package/dist/shared/{stacks-71k0vmct.js.map → stacks-esm-8f5catbf.js.map} +2 -2
- package/dist/shared/{stacks-wxfd6r4b.js → stacks-esm-8jt6k8p3.js} +13 -13
- package/dist/shared/{stacks-wxfd6r4b.js.map → stacks-esm-8jt6k8p3.js.map} +2 -2
- package/dist/shared/{stacks-x0qqwrev.js → stacks-esm-a20wyky3.js} +92 -92
- package/dist/shared/{stacks-agk106zs.cjs.map → stacks-esm-a20wyky3.js.map} +2 -2
- package/dist/shared/{stacks-gjz26k6b.js → stacks-esm-b54n1jdx.js} +102 -58
- package/dist/shared/stacks-esm-b54n1jdx.js.map +12 -0
- package/dist/shared/{stacks-9c1yam8b.js → stacks-esm-cmtj5vky.js} +162 -162
- package/dist/shared/{stacks-9c1yam8b.js.map → stacks-esm-cmtj5vky.js.map} +2 -2
- package/dist/shared/{stacks-z90xdr1x.js → stacks-esm-e2qhfgke.js} +36 -36
- package/dist/shared/{stacks-z90xdr1x.js.map → stacks-esm-e2qhfgke.js.map} +2 -2
- package/dist/shared/{stacks-v03zef3g.js → stacks-esm-ea4m4bk7.js} +117 -117
- package/dist/shared/{stacks-v03zef3g.js.map → stacks-esm-ea4m4bk7.js.map} +2 -2
- package/dist/shared/{stacks-69nq48jp.js → stacks-esm-hkw1kvd4.js} +140 -140
- package/dist/shared/{stacks-69nq48jp.js.map → stacks-esm-hkw1kvd4.js.map} +2 -2
- package/dist/shared/{stacks-qcae5852.js → stacks-esm-k108pemv.js} +4 -4
- package/dist/shared/{stacks-qcae5852.js.map → stacks-esm-k108pemv.js.map} +2 -2
- package/dist/shared/stacks-esm-kbz5s6v8.js +84 -0
- package/dist/shared/{stacks-4d7c3x27.js.map → stacks-esm-kbz5s6v8.js.map} +2 -2
- package/dist/shared/{stacks-kg1npstf.js → stacks-esm-mt1thm7k.js} +9 -9
- package/dist/shared/{stacks-kg1npstf.js.map → stacks-esm-mt1thm7k.js.map} +2 -2
- package/dist/shared/{stacks-yvb7rvwk.js → stacks-esm-n1mekwnb.js} +9 -9
- package/dist/shared/{stacks-8vzxax5e.cjs.map → stacks-esm-n1mekwnb.js.map} +2 -2
- package/dist/shared/{stacks-mftyrc60.js → stacks-esm-nt5hf8ht.js} +34 -34
- package/dist/shared/{stacks-mftyrc60.js.map → stacks-esm-nt5hf8ht.js.map} +2 -2
- package/dist/shared/{stacks-51ybf135.js → stacks-esm-phgy8yqf.js} +210 -210
- package/dist/shared/{stacks-51ybf135.js.map → stacks-esm-phgy8yqf.js.map} +2 -2
- package/dist/shared/{stacks-mbt36bzt.js → stacks-esm-pxv6ny92.js} +116 -116
- package/dist/shared/{stacks-mbt36bzt.js.map → stacks-esm-pxv6ny92.js.map} +2 -2
- package/dist/shared/{stacks-8brgfvqx.js → stacks-esm-qfzxhdqz.js} +19 -19
- package/dist/shared/{stacks-8brgfvqx.js.map → stacks-esm-qfzxhdqz.js.map} +2 -2
- package/dist/shared/{stacks-fd4rx56e.js → stacks-esm-snj9s2q8.js} +43 -43
- package/dist/shared/{stacks-fd4rx56e.js.map → stacks-esm-snj9s2q8.js.map} +2 -2
- package/dist/shared/{stacks-yajyej2y.js → stacks-esm-ss9ap75h.js} +28 -28
- package/dist/shared/{stacks-yajyej2y.js.map → stacks-esm-ss9ap75h.js.map} +2 -2
- package/dist/shared/{stacks-1m3m1agc.js → stacks-esm-t88hc019.js} +18 -18
- package/dist/shared/{stacks-1m3m1agc.js.map → stacks-esm-t88hc019.js.map} +2 -2
- package/dist/shared/stacks-esm-tdrdye4y.js +48 -0
- package/dist/shared/{stacks-enpj9krt.cjs.map → stacks-esm-tdrdye4y.js.map} +2 -2
- package/dist/src/accounts/index.cjs +565 -9
- package/dist/src/accounts/index.cjs.map +10 -4
- package/dist/src/accounts/index.d.cts +1 -1
- package/dist/src/accounts/index.d.ts +1 -1
- package/dist/src/accounts/index.js +26 -26
- package/dist/src/accounts/index.js.map +2 -2
- package/dist/src/actions/index.cjs +3860 -44
- package/dist/src/actions/index.cjs.map +65 -3
- package/dist/src/actions/index.d.cts +1 -1
- package/dist/src/actions/index.d.ts +1 -1
- package/dist/src/actions/index.js +102 -103
- package/dist/src/actions/index.js.map +1 -1
- package/dist/src/bitcoin/index.cjs +2506 -31
- package/dist/src/bitcoin/index.cjs.map +31 -3
- package/dist/src/bitcoin/index.d.cts +92 -92
- package/dist/src/bitcoin/index.d.ts +92 -92
- package/dist/src/bitcoin/index.js +88 -90
- package/dist/src/bitcoin/index.js.map +2 -2
- package/dist/src/bns/index.cjs +4435 -10
- package/dist/src/bns/index.cjs.map +50 -3
- package/dist/src/bns/index.d.cts +1 -1
- package/dist/src/bns/index.d.ts +1 -1
- package/dist/src/bns/index.js +39 -41
- package/dist/src/bns/index.js.map +2 -2
- package/dist/src/chains/index.cjs +141 -5
- package/dist/src/chains/index.cjs.map +5 -3
- package/dist/src/chains/index.d.cts +1 -1
- package/dist/src/chains/index.d.ts +1 -1
- package/dist/src/chains/index.js +12 -12
- package/dist/src/chains/index.js.map +1 -1
- package/dist/src/clarity/index.cjs +2021 -1
- package/dist/src/clarity/index.cjs.map +24 -3
- package/dist/src/clarity/index.d.cts +1 -1
- package/dist/src/clarity/index.d.ts +1 -1
- package/dist/src/clarity/index.js +170 -171
- package/dist/src/clarity/index.js.map +1 -1
- package/dist/src/connect/index.cjs +19 -19
- package/dist/src/connect/index.cjs.map +2 -2
- package/dist/src/connect/index.d.cts +1 -1
- package/dist/src/connect/index.d.ts +1 -1
- package/dist/src/connect/index.js +19 -19
- package/dist/src/connect/index.js.map +2 -2
- package/dist/src/connect/walletconnect/index.cjs +6 -46
- package/dist/src/connect/walletconnect/index.cjs.map +3 -4
- package/dist/src/connect/walletconnect/index.d.cts +1 -1
- package/dist/src/connect/walletconnect/index.d.ts +1 -1
- package/dist/src/connect/walletconnect/index.js +6 -46
- package/dist/src/connect/walletconnect/index.js.map +3 -4
- package/dist/src/filters/index.cjs +727 -1
- package/dist/src/filters/index.cjs.map +11 -3
- package/dist/src/filters/index.d.cts +76 -13
- package/dist/src/filters/index.d.ts +76 -13
- package/dist/src/filters/index.js +30 -26
- package/dist/src/filters/index.js.map +1 -1
- package/dist/src/index.cjs +4000 -126
- package/dist/src/index.cjs.map +69 -4
- package/dist/src/index.d.cts +658 -607
- package/dist/src/index.d.ts +658 -607
- package/dist/src/index.js +219 -219
- package/dist/src/index.js.map +2 -2
- package/dist/src/postconditions/index.cjs +1728 -1
- package/dist/src/postconditions/index.cjs.map +20 -3
- package/dist/src/postconditions/index.d.cts +1 -1
- package/dist/src/postconditions/index.d.ts +1 -1
- package/dist/src/postconditions/index.js +16 -17
- package/dist/src/postconditions/index.js.map +1 -1
- package/dist/src/pox/index.cjs +3866 -11
- package/dist/src/pox/index.cjs.map +48 -3
- package/dist/src/pox/index.d.cts +1 -1
- package/dist/src/pox/index.d.ts +1 -1
- package/dist/src/pox/index.js +40 -41
- package/dist/src/pox/index.js.map +2 -2
- package/dist/src/pox5/index.cjs +4124 -95
- package/dist/src/pox5/index.cjs.map +55 -4
- package/dist/src/pox5/index.d.cts +9 -1
- package/dist/src/pox5/index.d.ts +9 -1
- package/dist/src/pox5/index.js +210 -209
- package/dist/src/pox5/index.js.map +3 -3
- package/dist/src/sbtc/index.cjs +3719 -16
- package/dist/src/sbtc/index.cjs.map +47 -3
- package/dist/src/sbtc/index.d.cts +1 -1
- package/dist/src/sbtc/index.d.ts +1 -1
- package/dist/src/sbtc/index.js +39 -40
- package/dist/src/sbtc/index.js.map +2 -2
- package/dist/src/simnet/index.cjs +16 -16
- package/dist/src/simnet/index.cjs.map +2 -2
- package/dist/src/simnet/index.d.cts +1 -1
- package/dist/src/simnet/index.d.ts +1 -1
- package/dist/src/simnet/index.js +16 -16
- package/dist/src/simnet/index.js.map +2 -2
- package/dist/src/stackingdao/index.cjs +3747 -3
- package/dist/src/stackingdao/index.cjs.map +45 -3
- package/dist/src/stackingdao/index.d.cts +1 -1
- package/dist/src/stackingdao/index.d.ts +1 -1
- package/dist/src/stackingdao/index.js +26 -27
- package/dist/src/stackingdao/index.js.map +2 -2
- package/dist/src/subscriptions/index.cjs +160 -6
- package/dist/src/subscriptions/index.cjs.map +6 -3
- package/dist/src/subscriptions/index.d.cts +1 -1
- package/dist/src/subscriptions/index.d.ts +1 -1
- package/dist/src/subscriptions/index.js +14 -15
- package/dist/src/subscriptions/index.js.map +1 -1
- package/dist/src/transactions/index.cjs +2189 -49
- package/dist/src/transactions/index.cjs.map +23 -3
- package/dist/src/transactions/index.d.cts +1 -1
- package/dist/src/transactions/index.d.ts +1 -1
- package/dist/src/transactions/index.js +104 -105
- package/dist/src/transactions/index.js.map +1 -1
- package/dist/src/utils/index.cjs +503 -69
- package/dist/src/utils/index.cjs.map +9 -3
- package/dist/src/utils/index.d.cts +1 -1
- package/dist/src/utils/index.d.ts +1 -1
- package/dist/src/utils/index.js +131 -131
- package/dist/src/utils/index.js.map +2 -2
- package/package.json +1 -1
- package/dist/shared/stacks-02actsrx.cjs +0 -17
- package/dist/shared/stacks-02actsrx.cjs.map +0 -10
- package/dist/shared/stacks-03vfm21t.cjs +0 -222
- package/dist/shared/stacks-03vfm21t.cjs.map +0 -12
- package/dist/shared/stacks-24h5k94q.cjs +0 -74
- package/dist/shared/stacks-24h5k94q.cjs.map +0 -11
- package/dist/shared/stacks-37kz5t9f.cjs +0 -764
- package/dist/shared/stacks-37kz5t9f.cjs.map +0 -23
- package/dist/shared/stacks-3mt2q2na.cjs +0 -65
- package/dist/shared/stacks-3mt2q2na.cjs.map +0 -9
- package/dist/shared/stacks-4d7c3x27.js +0 -84
- package/dist/shared/stacks-4hs8r4q2.js.map +0 -10
- package/dist/shared/stacks-8vzxax5e.cjs +0 -45
- package/dist/shared/stacks-agk106zs.cjs +0 -267
- package/dist/shared/stacks-bdgh9n83.cjs +0 -212
- package/dist/shared/stacks-bdgh9n83.cjs.map +0 -11
- package/dist/shared/stacks-dpxnxhqb.cjs +0 -51
- package/dist/shared/stacks-dpxnxhqb.cjs.map +0 -11
- package/dist/shared/stacks-ee53k9j2.cjs +0 -651
- package/dist/shared/stacks-ee53k9j2.cjs.map +0 -13
- package/dist/shared/stacks-enpj9krt.cjs +0 -38
- package/dist/shared/stacks-f35mnrmg.cjs +0 -164
- package/dist/shared/stacks-f35mnrmg.cjs.map +0 -10
- package/dist/shared/stacks-fhzwsn5d.cjs +0 -261
- package/dist/shared/stacks-fhzwsn5d.cjs.map +0 -12
- package/dist/shared/stacks-gjz26k6b.js.map +0 -12
- package/dist/shared/stacks-gza2n1zs.cjs +0 -73
- package/dist/shared/stacks-gza2n1zs.cjs.map +0 -11
- package/dist/shared/stacks-kem68d80.cjs +0 -156
- package/dist/shared/stacks-kem68d80.cjs.map +0 -10
- package/dist/shared/stacks-n98w7g57.cjs +0 -234
- package/dist/shared/stacks-n98w7g57.cjs.map +0 -10
- package/dist/shared/stacks-p337hp6m.cjs +0 -336
- package/dist/shared/stacks-p337hp6m.cjs.map +0 -25
- package/dist/shared/stacks-q34k4vnc.cjs +0 -286
- package/dist/shared/stacks-q34k4vnc.cjs.map +0 -12
- package/dist/shared/stacks-qex691bh.js +0 -50
- package/dist/shared/stacks-rryme9bv.cjs +0 -569
- package/dist/shared/stacks-rryme9bv.cjs.map +0 -13
- package/dist/shared/stacks-s5vej5z6.cjs +0 -410
- package/dist/shared/stacks-s5vej5z6.cjs.map +0 -15
- package/dist/shared/stacks-sdqkapct.cjs +0 -67
- package/dist/shared/stacks-sdqkapct.cjs.map +0 -12
- package/dist/shared/stacks-v2rfr46a.js +0 -48
- package/dist/shared/stacks-v2rfr46a.js.map +0 -10
- package/dist/shared/stacks-vea7nde7.cjs +0 -731
- package/dist/shared/stacks-vea7nde7.cjs.map +0 -13
- package/dist/shared/stacks-wk8yp13j.cjs +0 -33
- package/dist/shared/stacks-wk8yp13j.cjs.map +0 -11
- package/dist/shared/stacks-x0qqwrev.js.map +0 -12
- package/dist/shared/stacks-xjkn3en1.cjs +0 -42
- package/dist/shared/stacks-xnrywjf1.cjs +0 -131
- package/dist/shared/stacks-xnrywjf1.cjs.map +0 -11
- package/dist/shared/stacks-yvb7rvwk.js.map +0 -10
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../src/utils/signature.ts", "../src/utils/keys.ts"],
|
|
3
|
+
"sources": ["../src/utils/encoding.ts", "../src/utils/hash.ts", "../src/utils/c32.ts", "../src/utils/constants.ts", "../src/utils/address.ts", "../src/utils/units.ts", "../src/utils/signature.ts", "../src/utils/keys.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
+
"const hexes = Array.from({ length: 256 }, (_, i) =>\n\ti.toString(16).padStart(2, \"0\"),\n);\n\nexport function bytesToHex(bytes: Uint8Array): string {\n\tlet hex = \"\";\n\tfor (const b of bytes) {\n\t\thex += hexes[b];\n\t}\n\treturn hex;\n}\n\nexport function hexToBytes(hex: string): Uint8Array {\n\tlet h = without0x(hex);\n\tif (h.length % 2) h = `0${h}`;\n\n\tconst array = new Uint8Array(h.length / 2);\n\tfor (let i = 0; i < array.length; i++) {\n\t\tconst j = i * 2;\n\t\tconst byte = Number.parseInt(h.slice(j, j + 2), 16);\n\t\tif (Number.isNaN(byte) || byte < 0)\n\t\t\tthrow new Error(\"Invalid byte sequence\");\n\t\tarray[i] = byte;\n\t}\n\treturn array;\n}\n\nexport function with0x(value: string): string {\n\treturn /^0x/i.test(value) ? value : `0x${value}`;\n}\n\nexport function without0x(value: string): string {\n\treturn /^0x/i.test(value) ? value.slice(2) : value;\n}\n\nexport function utf8ToBytes(str: string): Uint8Array {\n\treturn new TextEncoder().encode(str);\n}\n\nexport function bytesToUtf8(bytes: Uint8Array): string {\n\treturn new TextDecoder().decode(bytes);\n}\n\nexport function asciiToBytes(str: string): Uint8Array {\n\tconst bytes = new Uint8Array(str.length);\n\tfor (let i = 0; i < str.length; i++) {\n\t\tbytes[i] = str.charCodeAt(i) & 0xff;\n\t}\n\treturn bytes;\n}\n\nexport function bytesToAscii(bytes: Uint8Array): string {\n\treturn String.fromCharCode(...bytes);\n}\n\nexport function concatBytes(...arrays: Uint8Array[]): Uint8Array {\n\t// biome-ignore lint/style/noNonNullAssertion: bit-encoding routine where index is provably bounded by surrounding loop/length checks\n\tif (arrays.length === 1) return arrays[0]!;\n\tconst length = arrays.reduce((a, arr) => a + arr.length, 0);\n\tconst result = new Uint8Array(length);\n\tlet pad = 0;\n\tfor (const arr of arrays) {\n\t\tresult.set(arr, pad);\n\t\tpad += arr.length;\n\t}\n\treturn result;\n}\n\nexport type IntegerType = number | string | bigint | Uint8Array;\n\nexport function intToBigInt(value: IntegerType): bigint {\n\tif (typeof value === \"bigint\") return value;\n\tif (typeof value === \"string\") return BigInt(value);\n\tif (typeof value === \"number\") {\n\t\tif (!Number.isInteger(value))\n\t\t\tthrow new RangeError(\"Values of type 'number' must be an integer.\");\n\t\tif (value > Number.MAX_SAFE_INTEGER)\n\t\t\tthrow new RangeError(\n\t\t\t\t`Values of type 'number' must be <= ${Number.MAX_SAFE_INTEGER}. Use BigInt instead.`,\n\t\t\t);\n\t\treturn BigInt(value);\n\t}\n\tif (value instanceof Uint8Array) return BigInt(`0x${bytesToHex(value)}`);\n\tthrow new TypeError(\"Must be a number, bigint, string, or Uint8Array.\");\n}\n\nexport function intToBytes(value: IntegerType, byteLength: number): Uint8Array {\n\treturn bigIntToBytes(intToBigInt(value), byteLength);\n}\n\nexport function bigIntToBytes(value: bigint, length = 16): Uint8Array {\n\tconst hex = value.toString(16).padStart(length * 2, \"0\");\n\treturn hexToBytes(hex);\n}\n\nexport function intToHex(integer: IntegerType, byteLength = 8): string {\n\tconst value = typeof integer === \"bigint\" ? integer : intToBigInt(integer);\n\treturn value.toString(16).padStart(byteLength * 2, \"0\");\n}\n\nexport function toTwos(value: bigint, width: bigint): bigint {\n\tconst limit = BigInt(1) << (width - BigInt(1));\n\tif (value < -limit || value > limit - BigInt(1)) {\n\t\tthrow new Error(`Unable to represent integer in width: ${width}`);\n\t}\n\tif (value >= BigInt(0)) return value;\n\treturn value + (BigInt(1) << width);\n}\n\nexport function fromTwos(value: bigint, width: bigint): bigint {\n\tif (value & (BigInt(1) << (width - BigInt(1)))) {\n\t\treturn value - (BigInt(1) << width);\n\t}\n\treturn value;\n}\n\nexport function bytesToTwosBigInt(bytes: Uint8Array): bigint {\n\tif (bytes.length === 0) return 0n;\n\tconst hex = bytesToHex(bytes);\n\tif (hex.length === 0) return 0n;\n\treturn fromTwos(BigInt(`0x${hex}`), BigInt(bytes.byteLength * 8));\n}\n\nexport function writeUInt32BE(value: number): Uint8Array {\n\tconst buf = new Uint8Array(4);\n\tbuf[0] = (value >>> 24) & 0xff;\n\tbuf[1] = (value >>> 16) & 0xff;\n\tbuf[2] = (value >>> 8) & 0xff;\n\tbuf[3] = value & 0xff;\n\treturn buf;\n}\n\nexport function readUInt32BE(bytes: Uint8Array, offset = 0): number {\n\treturn (\n\t\t// biome-ignore lint/style/noNonNullAssertion: bit-encoding routine where index is provably bounded by surrounding loop/length checks\n\t\t((bytes[offset]! << 24) |\n\t\t\t// biome-ignore lint/style/noNonNullAssertion: bit-encoding routine where index is provably bounded by surrounding loop/length checks\n\t\t\t(bytes[offset + 1]! << 16) |\n\t\t\t// biome-ignore lint/style/noNonNullAssertion: bit-encoding routine where index is provably bounded by surrounding loop/length checks\n\t\t\t(bytes[offset + 2]! << 8) |\n\t\t\t// biome-ignore lint/style/noNonNullAssertion: bit-encoding routine where index is provably bounded by surrounding loop/length checks\n\t\t\tbytes[offset + 3]!) >>>\n\t\t0\n\t);\n}\n\nexport function writeUInt16BE(value: number): Uint8Array {\n\tconst buf = new Uint8Array(2);\n\tbuf[0] = (value >>> 8) & 0xff;\n\tbuf[1] = value & 0xff;\n\treturn buf;\n}\n\nexport function readUInt16BE(bytes: Uint8Array, offset = 0): number {\n\t// biome-ignore lint/style/noNonNullAssertion: bit-encoding routine where index is provably bounded by surrounding loop/length checks\n\treturn ((bytes[offset]! << 8) | bytes[offset + 1]!) >>> 0;\n}\n\nexport function writeUInt8(value: number): Uint8Array {\n\treturn new Uint8Array([value & 0xff]);\n}\n",
|
|
6
|
+
"import { ripemd160 } from \"@noble/hashes/legacy.js\";\nimport { sha256 } from \"@noble/hashes/sha2.js\";\nimport { sha512_256 } from \"@noble/hashes/sha2.js\";\nimport { bytesToHex } from \"./encoding.ts\";\n\nexport { sha256, sha512_256, ripemd160 };\n\n/** RIPEMD160(SHA256(input)) — standard Bitcoin/Stacks address hash */\nexport function hash160(input: Uint8Array): Uint8Array {\n\treturn ripemd160(sha256(input));\n}\n\n/** Hash used for transaction IDs */\nexport function txidFromBytes(data: Uint8Array): string {\n\treturn bytesToHex(sha512_256(data));\n}\n\n/** hash160 as hex — used for P2PKH address derivation */\nexport function hashP2PKH(input: Uint8Array): string {\n\treturn bytesToHex(hash160(input));\n}\n",
|
|
7
|
+
"import { sha256 } from \"@noble/hashes/sha2.js\";\nimport { bytesToHex, hexToBytes } from \"./encoding.ts\";\n\nconst C32 = \"0123456789ABCDEFGHJKMNPQRSTVWXYZ\";\nconst HEX = \"0123456789abcdef\";\n\nfunction c32normalize(input: string): string {\n\treturn input.toUpperCase().replace(/O/g, \"0\").replace(/L|I/g, \"1\");\n}\n\nfunction c32encode(inputHex: string): string {\n\tlet hex = inputHex;\n\tif (hex.length % 2 !== 0) hex = `0${hex}`;\n\thex = hex.toLowerCase();\n\n\tconst res: string[] = [];\n\tlet carry = 0;\n\tfor (let i = hex.length - 1; i >= 0; i--) {\n\t\tif (carry < 4) {\n\t\t\t// biome-ignore lint/style/noNonNullAssertion: bit-encoding routine where index is provably bounded by surrounding loop/length checks\n\t\t\tconst currentCode = HEX.indexOf(hex[i]!) >> carry;\n\t\t\t// biome-ignore lint/style/noNonNullAssertion: bit-encoding routine where index is provably bounded by surrounding loop/length checks\n\t\t\tconst nextCode = i !== 0 ? HEX.indexOf(hex[i - 1]!) : 0;\n\t\t\tconst nextBits = 1 + carry;\n\t\t\tconst nextLowBits = (nextCode % (1 << nextBits)) << (5 - nextBits);\n\t\t\t// biome-ignore lint/style/noNonNullAssertion: bit-encoding routine where index is provably bounded by surrounding loop/length checks\n\t\t\tres.unshift(C32[currentCode + nextLowBits]!);\n\t\t\tcarry = nextBits;\n\t\t} else {\n\t\t\tcarry = 0;\n\t\t}\n\t}\n\n\t// Strip leading c32 zeros\n\tlet leadingZeros = 0;\n\twhile (leadingZeros < res.length && res[leadingZeros] === \"0\") leadingZeros++;\n\tconst stripped = res.slice(leadingZeros);\n\n\t// Preserve leading zero bytes from hex\n\tconst bytes = hexToBytes(hex);\n\tlet zeroBytesCount = 0;\n\twhile (zeroBytesCount < bytes.length && bytes[zeroBytesCount] === 0)\n\t\tzeroBytesCount++;\n\tconst prefix = Array(zeroBytesCount).fill(C32[0]) as string[];\n\n\treturn [...prefix, ...stripped].join(\"\");\n}\n\nfunction c32decode(c32input: string): string {\n\tconst input = c32normalize(c32input);\n\tif (!input.match(`^[${C32}]*$`)) throw new Error(\"Not a c32-encoded string\");\n\n\tconst zeroPrefix = input.match(`^${C32[0]}*`);\n\tconst numLeadingZeroBytes = zeroPrefix ? zeroPrefix[0]?.length : 0;\n\n\tconst res: string[] = [];\n\tlet carry = 0;\n\tlet carryBits = 0;\n\tfor (let i = input.length - 1; i >= 0; i--) {\n\t\tif (carryBits === 4) {\n\t\t\t// biome-ignore lint/style/noNonNullAssertion: bit-encoding routine where index is provably bounded by surrounding loop/length checks\n\t\t\tres.unshift(HEX[carry]!);\n\t\t\tcarryBits = 0;\n\t\t\tcarry = 0;\n\t\t}\n\t\t// biome-ignore lint/style/noNonNullAssertion: bit-encoding routine where index is provably bounded by surrounding loop/length checks\n\t\tconst currentValue = (C32.indexOf(input[i]!) << carryBits) + carry;\n\t\t// biome-ignore lint/style/noNonNullAssertion: bit-encoding routine where index is provably bounded by surrounding loop/length checks\n\t\tres.unshift(HEX[currentValue % 16]!);\n\t\tcarryBits += 1;\n\t\tcarry = currentValue >> 4;\n\t\tif (carry > 1 << carryBits) throw new Error(\"Panic error in c32 decoding\");\n\t}\n\t// biome-ignore lint/style/noNonNullAssertion: bit-encoding routine where index is provably bounded by surrounding loop/length checks\n\tres.unshift(HEX[carry]!);\n\n\tif (res.length % 2 === 1) res.unshift(\"0\");\n\n\t// Strip leading hex zeros\n\tlet hexLeadingZeros = 0;\n\twhile (hexLeadingZeros < res.length && res[hexLeadingZeros] === \"0\")\n\t\thexLeadingZeros++;\n\tlet hexStr = res.slice(hexLeadingZeros - (hexLeadingZeros % 2)).join(\"\");\n\n\tfor (let i = 0; i < numLeadingZeroBytes; i++) hexStr = `00${hexStr}`;\n\n\treturn hexStr;\n}\n\nfunction c32checksum(dataHex: string): string {\n\treturn bytesToHex(sha256(sha256(hexToBytes(dataHex))).slice(0, 4));\n}\n\nfunction c32checkEncode(version: number, data: string): string {\n\tif (version < 0 || version >= 32)\n\t\tthrow new Error(\"Invalid version (must be between 0 and 31)\");\n\tif (!data.match(/^[0-9a-fA-F]*$/))\n\t\tthrow new Error(\"Invalid data (not a hex string)\");\n\n\tlet d = data.toLowerCase();\n\tif (d.length % 2 !== 0) d = `0${d}`;\n\n\tlet versionHex = version.toString(16);\n\tif (versionHex.length === 1) versionHex = `0${versionHex}`;\n\n\tconst checksumHex = c32checksum(`${versionHex}${d}`);\n\treturn `${C32[version]}${c32encode(`${d}${checksumHex}`)}`;\n}\n\nfunction c32checkDecode(c32data: string): [number, string] {\n\tconst normalized = c32normalize(c32data);\n\tconst dataHex = c32decode(normalized.slice(1));\n\t// biome-ignore lint/style/noNonNullAssertion: bit-encoding routine where index is provably bounded by surrounding loop/length checks\n\tconst version = C32.indexOf(normalized[0]!);\n\tconst checksum = dataHex.slice(-8);\n\n\tlet versionHex = version.toString(16);\n\tif (versionHex.length === 1) versionHex = `0${versionHex}`;\n\n\tif (\n\t\tc32checksum(`${versionHex}${dataHex.substring(0, dataHex.length - 8)}`) !==\n\t\tchecksum\n\t) {\n\t\tthrow new Error(\"Invalid c32check string: checksum mismatch\");\n\t}\n\n\treturn [version, dataHex.substring(0, dataHex.length - 8)];\n}\n\nexport function c32address(version: number, hash160hex: string): string {\n\tif (!hash160hex.match(/^[0-9a-fA-F]{40}$/)) {\n\t\tthrow new Error(\"Invalid argument: not a hash160 hex string\");\n\t}\n\treturn `S${c32checkEncode(version, hash160hex)}`;\n}\n\nexport function c32addressDecode(c32addr: string): [number, string] {\n\tif (c32addr.length <= 5)\n\t\tthrow new Error(\"Invalid c32 address: invalid length\");\n\tif (c32addr[0] !== \"S\")\n\t\tthrow new Error('Invalid c32 address: must start with \"S\"');\n\treturn c32checkDecode(c32addr.slice(1));\n}\n",
|
|
8
|
+
"// Clarity integer bounds\nexport const MAX_U128: bigint = (1n << 128n) - 1n;\nexport const MAX_I128: bigint = (1n << 127n) - 1n;\nexport const MIN_I128: bigint = -(1n << 127n);\n\n/** C32-encoded address version bytes for single-sig and multi-sig on each network. */\nexport const AddressVersion = {\n\tMainnetSingleSig: 22,\n\tMainnetMultiSig: 20,\n\tTestnetSingleSig: 26,\n\tTestnetMultiSig: 21,\n} as const;\nexport type AddressVersion =\n\t(typeof AddressVersion)[keyof typeof AddressVersion];\n\n/** Mainnet burn address (all-zero hash160). */\nexport const ZERO_ADDRESS = \"SP000000000000000000002Q6VF78\";\n/** Testnet burn address (all-zero hash160). */\nexport const TESTNET_ZERO_ADDRESS = \"ST000000000000000000002AMW42H\";\n\n/** Number of microSTX per 1 STX (10^6). */\nexport const MICROSTX_PER_STX = 1_000_000n;\n",
|
|
9
|
+
"import { c32address, c32addressDecode } from \"./c32.ts\";\nimport { AddressVersion } from \"./constants.ts\";\nimport { bytesToHex, hexToBytes, without0x } from \"./encoding.ts\";\nimport { hash160 } from \"./hash.ts\";\n\nexport { c32address, c32addressDecode };\n\n/**\n * Derive the single-sig Stacks address for a compressed public key.\n */\nexport function publicKeyToAddress(\n\tpublicKey: string | Uint8Array,\n\tnetwork: \"mainnet\" | \"testnet\" = \"mainnet\",\n): string {\n\tconst bytes =\n\t\ttypeof publicKey === \"string\"\n\t\t\t? hexToBytes(without0x(publicKey))\n\t\t\t: publicKey;\n\tconst version =\n\t\tnetwork === \"mainnet\"\n\t\t\t? AddressVersion.MainnetSingleSig\n\t\t\t: AddressVersion.TestnetSingleSig;\n\treturn c32address(version, bytesToHex(hash160(bytes)));\n}\n\n/** Clarity contract-name grammar: leading letter, then letters/digits/`-`/`_`.\n * Underscore is legal (SIP-002) and deployed contracts use it — matches the\n * pattern the Index API already accepts for contract ids. */\nexport const CONTRACT_NAME_REGEX: RegExp = /^[a-zA-Z][a-zA-Z0-9_-]{0,127}$/;\n\nexport function validateStacksAddress(address: string): boolean {\n\ttry {\n\t\tc32addressDecode(address);\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\n\n/** Alias for validateStacksAddress — matches future.md naming. */\nexport const isValidAddress: (address: string) => boolean =\n\tvalidateStacksAddress;\n\n/** Parse a principal into its parts, or null when malformed. The single\n * definition of \"valid principal\" for this package: exactly one optional\n * `.name` segment (never two), a c32-decodable address, and a contract name\n * matching the Clarity grammar. */\nexport function parsePrincipal(\n\tvalue: string,\n): { address: string; contractName?: string } | null {\n\tconst parts = value.split(\".\");\n\tif (parts.length > 2) return null;\n\tconst [address, contractName] = parts as [string, string | undefined];\n\tif (!validateStacksAddress(address)) return null;\n\tif (contractName === undefined) return { address };\n\tif (!CONTRACT_NAME_REGEX.test(contractName)) return null;\n\treturn { address, contractName };\n}\n\n/** Split `address.name` into its parts. Throws on anything `parsePrincipal`\n * rejects, and on a bare address with no contract name. */\nexport function parseContractId(contractId: string): [string, string] {\n\tconst parsed = parsePrincipal(contractId);\n\tif (!parsed?.contractName)\n\t\tthrow new Error(`Invalid contract identifier: ${contractId}`);\n\treturn [parsed.address, parsed.contractName];\n}\n\nexport function isClarityName(name: string): boolean {\n\tconst regex = /^[a-zA-Z]([a-zA-Z0-9]|[-_!?+<>=/*])*$|^[-+=/*]$|^[<>]=?$/;\n\treturn regex.test(name) && name.length < 128;\n}\n\n/**\n * Compare two Stacks addresses for equality (case-insensitive, version-aware).\n * Throws if either address is invalid.\n */\nexport function isAddressEqual(a: string, b: string): boolean {\n\tconst [versionA, hashA] = c32addressDecode(a);\n\tconst [versionB, hashB] = c32addressDecode(b);\n\treturn versionA === versionB && hashA.toLowerCase() === hashB.toLowerCase();\n}\n\n/** Extract the version byte from a Stacks address (22, 20, 26, or 21). */\nexport function addressToVersion(address: string): number {\n\treturn c32addressDecode(address)[0];\n}\n\n/**\n * Build a contract address from deployer + contract name.\n * Validates both parts; returns `deployer.contractName`.\n */\nexport function getContractAddress(\n\tdeployer: string,\n\tcontractName: string,\n): string {\n\tif (!validateStacksAddress(deployer)) {\n\t\tthrow new Error(`Invalid deployer address: ${deployer}`);\n\t}\n\tif (!isClarityName(contractName)) {\n\t\tthrow new Error(`Invalid contract name: ${contractName}`);\n\t}\n\treturn `${deployer}.${contractName}`;\n}\n",
|
|
10
|
+
"/**\n * Format a bigint value with decimal places.\n * @example formatUnits(1000000n, 6) → \"1.0\"\n * @example formatUnits(1500000n, 6) → \"1.5\"\n */\nexport function formatUnits(\n\tvalue: bigint | number | string,\n\tdecimals: number,\n): string {\n\tlet v = BigInt(value);\n\n\tconst negative = v < 0n;\n\tif (negative) v = -v;\n\n\tconst divisor = 10n ** BigInt(decimals);\n\tconst integer = (v / divisor).toString();\n\tlet fraction = (v % divisor).toString().padStart(decimals, \"0\");\n\n\t// Trim trailing zeros, but keep at least one decimal\n\tfraction = fraction.replace(/0+$/, \"\") || \"0\";\n\n\tconst result = `${integer}.${fraction}`;\n\treturn negative ? `-${result}` : result;\n}\n\n/**\n * Parse a decimal string into a bigint with the given number of decimals.\n * @example parseUnits(\"1.5\", 6) → 1500000n\n * @example parseUnits(\"1\", 6) → 1000000n\n */\nconst DECIMAL_STRING = /^-?\\d+(\\.\\d+)?$/;\n\nexport function parseUnits(value: string | number, decimals: number): bigint {\n\tif (typeof value === \"number\" && !Number.isFinite(value)) {\n\t\tthrow new RangeError(`Cannot parse ${value} as a decimal amount`);\n\t}\n\t// Numbers small or large enough to print in exponent form (1e-7, 1e21)\n\t// go through toFixed so the digits survive. A number the fixed form\n\t// cannot hold exactly (too many decimals, or too small for one unit) is\n\t// refused rather than rounded, so amounts never shrink silently.\n\tlet str = typeof value === \"number\" ? value.toFixed(decimals) : value.trim();\n\tif (!DECIMAL_STRING.test(str)) {\n\t\tthrow new RangeError(\n\t\t\t`Cannot parse \"${value}\" as a decimal amount: expected digits with an optional fraction, like \"1.5\"`,\n\t\t);\n\t}\n\tif (typeof value === \"number\" && Number(str) !== value) {\n\t\tthrow new RangeError(\n\t\t\t`Cannot parse ${value} with ${decimals} decimals: pass the amount as a string to keep every digit`,\n\t\t);\n\t}\n\n\tconst negative = str.startsWith(\"-\");\n\tif (negative) str = str.slice(1);\n\n\tconst [integer = \"\", fraction = \"\"] = str.split(\".\");\n\n\tif (fraction.length > decimals) {\n\t\tthrow new Error(\n\t\t\t`Too many decimal places: \"${value}\" has ${fraction.length} decimals, max is ${decimals}`,\n\t\t);\n\t}\n\n\tconst padded = fraction.padEnd(decimals, \"0\");\n\tconst result = BigInt(integer + padded);\n\treturn negative ? -result : result;\n}\n\n/**\n * Format microSTX to STX string (6 decimals).\n * @example formatStx(1000000n) → \"1.0\"\n */\nexport function formatStx(microStx: bigint | number | string): string {\n\treturn formatUnits(microStx, 6);\n}\n\n/**\n * Parse STX string to microSTX bigint (6 decimals).\n * @example parseStx(\"1.5\") → 1500000n\n */\nexport function parseStx(stx: string | number): bigint {\n\treturn parseUnits(stx, 6);\n}\n",
|
|
5
11
|
"import { sha256 } from \"@noble/hashes/sha2.js\";\nimport { Signature as NobleSignature, verify } from \"@noble/secp256k1\";\nimport { c32address } from \"./address.ts\";\nimport { AddressVersion } from \"./constants.ts\";\nimport { concatBytes, hexToBytes, utf8ToBytes } from \"./encoding.ts\";\nimport { hashP2PKH } from \"./hash.ts\";\n\nexport interface RecoverableSignature {\n\t/** Recovery id (0–3) */\n\trecovery: number;\n\t/** 32-byte r value as hex */\n\tr: string;\n\t/** 32-byte s value as hex */\n\ts: string;\n}\n\n// --- Format conversion ---\n\n/**\n * Parse a 65-byte VRS hex signature into components.\n * VRS format: recovery (1 byte) + r (32 bytes) + s (32 bytes)\n */\nexport function parseSignature(hex: string): RecoverableSignature {\n\tconst clean = hex.startsWith(\"0x\") ? hex.slice(2) : hex;\n\tif (clean.length !== 130) {\n\t\tthrow new Error(\n\t\t\t`Invalid signature length: expected 130 hex chars, got ${clean.length}`,\n\t\t);\n\t}\n\treturn {\n\t\trecovery: Number.parseInt(clean.slice(0, 2), 16),\n\t\tr: clean.slice(2, 66),\n\t\ts: clean.slice(66, 130),\n\t};\n}\n\n/**\n * Serialize a recoverable signature to 65-byte VRS hex (130 chars).\n */\nexport function serializeSignature(sig: RecoverableSignature): string {\n\tconst v = sig.recovery.toString(16).padStart(2, \"0\");\n\treturn v + sig.r + sig.s;\n}\n\n/** Convert VRS hex to RSV hex: r+s (128 chars) + recovery (2 chars). */\nexport function signatureVrsToRsv(vrs: string): string {\n\tconst clean = vrs.startsWith(\"0x\") ? vrs.slice(2) : vrs;\n\treturn clean.slice(2) + clean.slice(0, 2);\n}\n\n/** Convert RSV hex to VRS hex: recovery (2 chars) + r+s (128 chars). */\nexport function signatureRsvToVrs(rsv: string): string {\n\tconst clean = rsv.startsWith(\"0x\") ? rsv.slice(2) : rsv;\n\treturn clean.slice(-2) + clean.slice(0, -2);\n}\n\n// --- Recovery ---\n\n/**\n * Recover a public key from a message hash and VRS signature.\n * @returns hex-encoded public key (33 bytes compressed, or 65 bytes uncompressed)\n */\nexport function recoverPublicKey(\n\thash: Uint8Array | string,\n\tsignature: string,\n\tcompressed = true,\n): string {\n\tconst parsed = parseSignature(signature);\n\tconst rs = parsed.r + parsed.s;\n\tconst sig = NobleSignature.fromCompact(rs).addRecoveryBit(parsed.recovery);\n\tconst msgHash = typeof hash === \"string\" ? hexToBytes(hash) : hash;\n\tconst point = sig.recoverPublicKey(msgHash);\n\treturn point.toHex(compressed);\n}\n\n/**\n * Recover a Stacks address from a message hash and VRS signature.\n * @param addressVersion defaults to MainnetSingleSig (22)\n */\nexport function recoverAddress(\n\thash: Uint8Array | string,\n\tsignature: string,\n\taddressVersion: number = AddressVersion.MainnetSingleSig,\n): string {\n\tconst pubkey = recoverPublicKey(hash, signature, true);\n\tconst pubkeyHash = hashP2PKH(hexToBytes(pubkey));\n\treturn c32address(addressVersion, pubkeyHash);\n}\n\n// --- Verification ---\n\n/**\n * Verify an ECDSA signature against a message hash and public key.\n * Accepts compact (64-byte) signature as hex or Uint8Array.\n */\nexport function verifySignature(\n\thash: Uint8Array | string,\n\tsignature: string | Uint8Array,\n\tpublicKey: string | Uint8Array,\n): boolean {\n\treturn verify(signature, hash, publicKey, { lowS: false });\n}\n\n/** Bitcoin-style varint encoding for message length prefix. */\nfunction encodeVarint(n: number): Uint8Array {\n\tif (n < 0xfd) return new Uint8Array([n]);\n\tif (n <= 0xffff) {\n\t\tconst buf = new Uint8Array(3);\n\t\tbuf[0] = 0xfd;\n\t\tbuf[1] = n & 0xff;\n\t\tbuf[2] = (n >> 8) & 0xff;\n\t\treturn buf;\n\t}\n\tconst buf = new Uint8Array(5);\n\tbuf[0] = 0xfe;\n\tbuf[1] = n & 0xff;\n\tbuf[2] = (n >> 8) & 0xff;\n\tbuf[3] = (n >> 16) & 0xff;\n\tbuf[4] = (n >> 24) & 0xff;\n\treturn buf;\n}\n\nconst STACKS_MESSAGE_PREFIX = \"\\x17Stacks Signed Message:\\n\";\nconst LEGACY_MESSAGE_PREFIX = \"\\x18Stacks Message Signing:\\n\";\n\n/** Hash a message with the Stacks structured message prefix. */\nfunction hashMessage(message: string | Uint8Array, prefix: string): Uint8Array {\n\tconst messageBytes =\n\t\ttypeof message === \"string\" ? utf8ToBytes(message) : message;\n\tconst prefixBytes = utf8ToBytes(prefix);\n\tconst lengthBytes = encodeVarint(messageBytes.length);\n\treturn sha256(concatBytes(prefixBytes, lengthBytes, messageBytes));\n}\n\n/**\n * Verify a signed Stacks message.\n * Parses a VRS signature, extracts r+s for verification.\n * Falls back to legacy prefix if standard prefix fails.\n */\nexport function verifyMessageSignature(\n\tmessage: string | Uint8Array,\n\tsignature: string,\n\tpublicKey: string,\n): boolean {\n\tconst parsed = parseSignature(signature);\n\tconst compactSig = parsed.r + parsed.s;\n\n\tconst msgHash = hashMessage(message, STACKS_MESSAGE_PREFIX);\n\tif (verify(compactSig, msgHash, publicKey, { lowS: false })) return true;\n\n\t// Fallback to legacy prefix\n\tif (typeof message === \"string\") {\n\t\tconst legacyHash = hashMessage(message, LEGACY_MESSAGE_PREFIX);\n\t\tif (verify(compactSig, legacyHash, publicKey, { lowS: false })) return true;\n\t}\n\n\treturn false;\n}\n",
|
|
6
12
|
"import { Point, etc } from \"@noble/secp256k1\";\nimport { bytesToHex, hexToBytes } from \"./encoding.ts\";\n\n/** Compress a public key to 33 bytes (hex). */\nexport function compressPublicKey(publicKey: string | Uint8Array): string {\n\tconst hex = typeof publicKey === \"string\" ? publicKey : bytesToHex(publicKey);\n\treturn Point.fromHex(hex).toHex(true);\n}\n\n/** Uncompress a public key to 65 bytes (hex). */\nexport function uncompressPublicKey(publicKey: string | Uint8Array): string {\n\tconst hex = typeof publicKey === \"string\" ? publicKey : bytesToHex(publicKey);\n\treturn Point.fromHex(hex).toHex(false);\n}\n\n/** Check if a public key is in compressed format (starts with 0x02 or 0x03). */\nexport function isCompressedPublicKey(publicKey: string | Uint8Array): boolean {\n\tconst bytes =\n\t\ttypeof publicKey === \"string\" ? hexToBytes(publicKey) : publicKey;\n\treturn bytes.length === 33 && (bytes[0] === 0x02 || bytes[0] === 0x03);\n}\n\n/** Generate cryptographically secure random bytes. Defaults to 32 bytes. */\nexport function randomBytes(length?: number): Uint8Array {\n\treturn etc.randomBytes(length ?? 32);\n}\n"
|
|
7
13
|
],
|
|
8
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAuB,IAAvB;AACoD,IAApD;AAqBO,SAAS,cAAc,CAAC,KAAmC;AAAA,EACjE,MAAM,QAAQ,IAAI,WAAW,IAAI,IAAI,IAAI,MAAM,CAAC,IAAI;AAAA,EACpD,IAAI,MAAM,WAAW,KAAK;AAAA,IACzB,MAAM,IAAI,MACT,yDAAyD,MAAM,QAChE;AAAA,EACD;AAAA,EACA,OAAO;AAAA,IACN,UAAU,OAAO,SAAS,MAAM,MAAM,GAAG,CAAC,GAAG,EAAE;AAAA,IAC/C,GAAG,MAAM,MAAM,GAAG,EAAE;AAAA,IACpB,GAAG,MAAM,MAAM,IAAI,GAAG;AAAA,EACvB;AAAA;AAMM,SAAS,kBAAkB,CAAC,KAAmC;AAAA,EACrE,MAAM,IAAI,IAAI,SAAS,SAAS,EAAE,EAAE,SAAS,GAAG,GAAG;AAAA,EACnD,OAAO,IAAI,IAAI,IAAI,IAAI;AAAA;AAIjB,SAAS,iBAAiB,CAAC,KAAqB;AAAA,EACtD,MAAM,QAAQ,IAAI,WA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;
|
|
|
150
150
|
declare function isCompressedPublicKey(publicKey: string | Uint8Array): boolean;
|
|
151
151
|
/** Generate cryptographically secure random bytes. Defaults to 32 bytes. */
|
|
152
152
|
declare function randomBytes(length?: number): Uint8Array;
|
|
153
|
-
export {
|
|
153
|
+
export { AddressVersion, CONTRACT_NAME_REGEX, IntegerType, MAX_I128, MAX_U128, MICROSTX_PER_STX, MIN_I128, RecoverableSignature, TESTNET_ZERO_ADDRESS, ZERO_ADDRESS, addressToVersion, asciiToBytes, bigIntToBytes, bytesToAscii, bytesToHex, bytesToTwosBigInt, bytesToUtf8, c32address, c32addressDecode, compressPublicKey, concatBytes, formatStx, formatUnits, fromTwos, getContractAddress, hash160, hashP2PKH, hexToBytes, intToBigInt, intToBytes, intToHex, isAddressEqual, isClarityName, isCompressedPublicKey, isValidAddress, parseContractId, parsePrincipal, parseSignature, parseStx, parseUnits, publicKeyToAddress, randomBytes, readUInt16BE, readUInt32BE, recoverAddress, recoverPublicKey, ripemd160, serializeSignature, sha256, sha512_256, signatureRsvToVrs, signatureVrsToRsv, toTwos, txidFromBytes, uncompressPublicKey, utf8ToBytes, validateStacksAddress, verifyMessageSignature, verifySignature, with0x, without0x, writeUInt16BE, writeUInt32BE, writeUInt8 };
|
|
@@ -150,4 +150,4 @@ declare function uncompressPublicKey(publicKey: string | Uint8Array): string;
|
|
|
150
150
|
declare function isCompressedPublicKey(publicKey: string | Uint8Array): boolean;
|
|
151
151
|
/** Generate cryptographically secure random bytes. Defaults to 32 bytes. */
|
|
152
152
|
declare function randomBytes(length?: number): Uint8Array;
|
|
153
|
-
export {
|
|
153
|
+
export { AddressVersion, CONTRACT_NAME_REGEX, IntegerType, MAX_I128, MAX_U128, MICROSTX_PER_STX, MIN_I128, RecoverableSignature, TESTNET_ZERO_ADDRESS, ZERO_ADDRESS, addressToVersion, asciiToBytes, bigIntToBytes, bytesToAscii, bytesToHex, bytesToTwosBigInt, bytesToUtf8, c32address, c32addressDecode, compressPublicKey, concatBytes, formatStx, formatUnits, fromTwos, getContractAddress, hash160, hashP2PKH, hexToBytes, intToBigInt, intToBytes, intToHex, isAddressEqual, isClarityName, isCompressedPublicKey, isValidAddress, parseContractId, parsePrincipal, parseSignature, parseStx, parseUnits, publicKeyToAddress, randomBytes, readUInt16BE, readUInt32BE, recoverAddress, recoverPublicKey, ripemd160, serializeSignature, sha256, sha512_256, signatureRsvToVrs, signatureVrsToRsv, toTwos, txidFromBytes, uncompressPublicKey, utf8ToBytes, validateStacksAddress, verifyMessageSignature, verifySignature, with0x, without0x, writeUInt16BE, writeUInt32BE, writeUInt8 };
|
package/dist/src/utils/index.js
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
bytesToHex2,
|
|
3
|
+
hexToBytes2,
|
|
4
|
+
with0x2,
|
|
5
|
+
without0x2,
|
|
6
|
+
utf8ToBytes2,
|
|
7
|
+
bytesToUtf82,
|
|
8
|
+
asciiToBytes2,
|
|
9
|
+
bytesToAscii2,
|
|
10
|
+
concatBytes2,
|
|
11
|
+
intToBigInt2,
|
|
12
|
+
intToBytes2,
|
|
13
|
+
bigIntToBytes2,
|
|
14
|
+
intToHex2,
|
|
15
|
+
toTwos2,
|
|
16
|
+
fromTwos2,
|
|
17
|
+
bytesToTwosBigInt2,
|
|
18
|
+
writeUInt32BE2,
|
|
19
|
+
readUInt32BE2,
|
|
20
|
+
writeUInt16BE2,
|
|
21
|
+
readUInt16BE2,
|
|
22
|
+
writeUInt82,
|
|
23
|
+
c32address2,
|
|
24
|
+
c32addressDecode2,
|
|
25
|
+
ripemd1602,
|
|
26
|
+
sha2562,
|
|
27
|
+
sha512_2562,
|
|
28
|
+
hash1602,
|
|
29
|
+
txidFromBytes2,
|
|
30
|
+
hashP2PKH2
|
|
31
|
+
} from "../../shared/stacks-esm-7a0ehykf.js";
|
|
7
32
|
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
} from "../../shared/stacks-
|
|
33
|
+
MAX_U1282,
|
|
34
|
+
MAX_I1282,
|
|
35
|
+
MIN_I1282,
|
|
36
|
+
AddressVersion2,
|
|
37
|
+
ZERO_ADDRESS2,
|
|
38
|
+
TESTNET_ZERO_ADDRESS2,
|
|
39
|
+
MICROSTX_PER_STX2,
|
|
40
|
+
publicKeyToAddress2,
|
|
41
|
+
CONTRACT_NAME_REGEX2,
|
|
42
|
+
validateStacksAddress2,
|
|
43
|
+
isValidAddress2,
|
|
44
|
+
parsePrincipal2,
|
|
45
|
+
parseContractId2,
|
|
46
|
+
isClarityName2,
|
|
47
|
+
isAddressEqual2,
|
|
48
|
+
addressToVersion2,
|
|
49
|
+
getContractAddress2
|
|
50
|
+
} from "../../shared/stacks-esm-kbz5s6v8.js";
|
|
26
51
|
import {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
bytesToUtf8,
|
|
33
|
-
c32address,
|
|
34
|
-
c32addressDecode,
|
|
35
|
-
concatBytes,
|
|
36
|
-
fromTwos,
|
|
37
|
-
hash160,
|
|
38
|
-
hashP2PKH,
|
|
39
|
-
hexToBytes,
|
|
40
|
-
intToBigInt,
|
|
41
|
-
intToBytes,
|
|
42
|
-
intToHex,
|
|
43
|
-
readUInt16BE,
|
|
44
|
-
readUInt32BE,
|
|
45
|
-
ripemd160,
|
|
46
|
-
sha256,
|
|
47
|
-
sha512_256,
|
|
48
|
-
toTwos,
|
|
49
|
-
txidFromBytes,
|
|
50
|
-
utf8ToBytes,
|
|
51
|
-
with0x,
|
|
52
|
-
without0x,
|
|
53
|
-
writeUInt16BE,
|
|
54
|
-
writeUInt32BE,
|
|
55
|
-
writeUInt8
|
|
56
|
-
} from "../../shared/stacks-qs5fzts5.js";
|
|
52
|
+
formatUnits2,
|
|
53
|
+
parseUnits2,
|
|
54
|
+
formatStx2,
|
|
55
|
+
parseStx2
|
|
56
|
+
} from "../../shared/stacks-esm-n1mekwnb.js";
|
|
57
57
|
// src/utils/signature.ts
|
|
58
|
-
import { sha256
|
|
58
|
+
import { sha256 } from "@noble/hashes/sha2.js";
|
|
59
59
|
import { Signature as NobleSignature, verify } from "@noble/secp256k1";
|
|
60
60
|
function parseSignature(hex) {
|
|
61
61
|
const clean = hex.startsWith("0x") ? hex.slice(2) : hex;
|
|
@@ -84,14 +84,14 @@ function recoverPublicKey(hash, signature, compressed = true) {
|
|
|
84
84
|
const parsed = parseSignature(signature);
|
|
85
85
|
const rs = parsed.r + parsed.s;
|
|
86
86
|
const sig = NobleSignature.fromCompact(rs).addRecoveryBit(parsed.recovery);
|
|
87
|
-
const msgHash = typeof hash === "string" ?
|
|
87
|
+
const msgHash = typeof hash === "string" ? hexToBytes2(hash) : hash;
|
|
88
88
|
const point = sig.recoverPublicKey(msgHash);
|
|
89
89
|
return point.toHex(compressed);
|
|
90
90
|
}
|
|
91
|
-
function recoverAddress(hash, signature, addressVersion =
|
|
91
|
+
function recoverAddress(hash, signature, addressVersion = AddressVersion2.MainnetSingleSig) {
|
|
92
92
|
const pubkey = recoverPublicKey(hash, signature, true);
|
|
93
|
-
const pubkeyHash =
|
|
94
|
-
return
|
|
93
|
+
const pubkeyHash = hashP2PKH2(hexToBytes2(pubkey));
|
|
94
|
+
return c32address2(addressVersion, pubkeyHash);
|
|
95
95
|
}
|
|
96
96
|
function verifySignature(hash, signature, publicKey) {
|
|
97
97
|
return verify(signature, hash, publicKey, { lowS: false });
|
|
@@ -100,11 +100,11 @@ function encodeVarint(n) {
|
|
|
100
100
|
if (n < 253)
|
|
101
101
|
return new Uint8Array([n]);
|
|
102
102
|
if (n <= 65535) {
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
return
|
|
103
|
+
const buf = new Uint8Array(3);
|
|
104
|
+
buf[0] = 253;
|
|
105
|
+
buf[1] = n & 255;
|
|
106
|
+
buf[2] = n >> 8 & 255;
|
|
107
|
+
return buf;
|
|
108
108
|
}
|
|
109
109
|
const buf = new Uint8Array(5);
|
|
110
110
|
buf[0] = 254;
|
|
@@ -119,10 +119,10 @@ var STACKS_MESSAGE_PREFIX = `\x17Stacks Signed Message:
|
|
|
119
119
|
var LEGACY_MESSAGE_PREFIX = `\x18Stacks Message Signing:
|
|
120
120
|
`;
|
|
121
121
|
function hashMessage(message, prefix) {
|
|
122
|
-
const messageBytes = typeof message === "string" ?
|
|
123
|
-
const prefixBytes =
|
|
122
|
+
const messageBytes = typeof message === "string" ? utf8ToBytes2(message) : message;
|
|
123
|
+
const prefixBytes = utf8ToBytes2(prefix);
|
|
124
124
|
const lengthBytes = encodeVarint(messageBytes.length);
|
|
125
|
-
return
|
|
125
|
+
return sha256(concatBytes2(prefixBytes, lengthBytes, messageBytes));
|
|
126
126
|
}
|
|
127
127
|
function verifyMessageSignature(message, signature, publicKey) {
|
|
128
128
|
const parsed = parseSignature(signature);
|
|
@@ -140,84 +140,84 @@ function verifyMessageSignature(message, signature, publicKey) {
|
|
|
140
140
|
// src/utils/keys.ts
|
|
141
141
|
import { Point, etc } from "@noble/secp256k1";
|
|
142
142
|
function compressPublicKey(publicKey) {
|
|
143
|
-
const hex = typeof publicKey === "string" ? publicKey :
|
|
143
|
+
const hex = typeof publicKey === "string" ? publicKey : bytesToHex2(publicKey);
|
|
144
144
|
return Point.fromHex(hex).toHex(true);
|
|
145
145
|
}
|
|
146
146
|
function uncompressPublicKey(publicKey) {
|
|
147
|
-
const hex = typeof publicKey === "string" ? publicKey :
|
|
147
|
+
const hex = typeof publicKey === "string" ? publicKey : bytesToHex2(publicKey);
|
|
148
148
|
return Point.fromHex(hex).toHex(false);
|
|
149
149
|
}
|
|
150
150
|
function isCompressedPublicKey(publicKey) {
|
|
151
|
-
const bytes = typeof publicKey === "string" ?
|
|
151
|
+
const bytes = typeof publicKey === "string" ? hexToBytes2(publicKey) : publicKey;
|
|
152
152
|
return bytes.length === 33 && (bytes[0] === 2 || bytes[0] === 3);
|
|
153
153
|
}
|
|
154
154
|
function randomBytes(length) {
|
|
155
155
|
return etc.randomBytes(length ?? 32);
|
|
156
156
|
}
|
|
157
157
|
export {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
ripemd160,
|
|
176
|
-
recoverPublicKey,
|
|
177
|
-
recoverAddress,
|
|
178
|
-
readUInt32BE,
|
|
179
|
-
readUInt16BE,
|
|
180
|
-
randomBytes,
|
|
181
|
-
publicKeyToAddress,
|
|
182
|
-
parseUnits,
|
|
183
|
-
parseStx,
|
|
184
|
-
parseSignature,
|
|
185
|
-
parsePrincipal,
|
|
186
|
-
parseContractId,
|
|
187
|
-
isValidAddress,
|
|
188
|
-
isCompressedPublicKey,
|
|
189
|
-
isClarityName,
|
|
190
|
-
isAddressEqual,
|
|
191
|
-
intToHex,
|
|
192
|
-
intToBytes,
|
|
193
|
-
intToBigInt,
|
|
194
|
-
hexToBytes,
|
|
195
|
-
hashP2PKH,
|
|
196
|
-
hash160,
|
|
197
|
-
getContractAddress,
|
|
198
|
-
fromTwos,
|
|
199
|
-
formatUnits,
|
|
200
|
-
formatStx,
|
|
201
|
-
concatBytes,
|
|
158
|
+
AddressVersion2 as AddressVersion,
|
|
159
|
+
CONTRACT_NAME_REGEX2 as CONTRACT_NAME_REGEX,
|
|
160
|
+
MAX_I1282 as MAX_I128,
|
|
161
|
+
MAX_U1282 as MAX_U128,
|
|
162
|
+
MICROSTX_PER_STX2 as MICROSTX_PER_STX,
|
|
163
|
+
MIN_I1282 as MIN_I128,
|
|
164
|
+
TESTNET_ZERO_ADDRESS2 as TESTNET_ZERO_ADDRESS,
|
|
165
|
+
ZERO_ADDRESS2 as ZERO_ADDRESS,
|
|
166
|
+
addressToVersion2 as addressToVersion,
|
|
167
|
+
asciiToBytes2 as asciiToBytes,
|
|
168
|
+
bigIntToBytes2 as bigIntToBytes,
|
|
169
|
+
bytesToAscii2 as bytesToAscii,
|
|
170
|
+
bytesToHex2 as bytesToHex,
|
|
171
|
+
bytesToTwosBigInt2 as bytesToTwosBigInt,
|
|
172
|
+
bytesToUtf82 as bytesToUtf8,
|
|
173
|
+
c32address2 as c32address,
|
|
174
|
+
c32addressDecode2 as c32addressDecode,
|
|
202
175
|
compressPublicKey,
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
176
|
+
concatBytes2 as concatBytes,
|
|
177
|
+
formatStx2 as formatStx,
|
|
178
|
+
formatUnits2 as formatUnits,
|
|
179
|
+
fromTwos2 as fromTwos,
|
|
180
|
+
getContractAddress2 as getContractAddress,
|
|
181
|
+
hash1602 as hash160,
|
|
182
|
+
hashP2PKH2 as hashP2PKH,
|
|
183
|
+
hexToBytes2 as hexToBytes,
|
|
184
|
+
intToBigInt2 as intToBigInt,
|
|
185
|
+
intToBytes2 as intToBytes,
|
|
186
|
+
intToHex2 as intToHex,
|
|
187
|
+
isAddressEqual2 as isAddressEqual,
|
|
188
|
+
isClarityName2 as isClarityName,
|
|
189
|
+
isCompressedPublicKey,
|
|
190
|
+
isValidAddress2 as isValidAddress,
|
|
191
|
+
parseContractId2 as parseContractId,
|
|
192
|
+
parsePrincipal2 as parsePrincipal,
|
|
193
|
+
parseSignature,
|
|
194
|
+
parseStx2 as parseStx,
|
|
195
|
+
parseUnits2 as parseUnits,
|
|
196
|
+
publicKeyToAddress2 as publicKeyToAddress,
|
|
197
|
+
randomBytes,
|
|
198
|
+
readUInt16BE2 as readUInt16BE,
|
|
199
|
+
readUInt32BE2 as readUInt32BE,
|
|
200
|
+
recoverAddress,
|
|
201
|
+
recoverPublicKey,
|
|
202
|
+
ripemd1602 as ripemd160,
|
|
203
|
+
serializeSignature,
|
|
204
|
+
sha2562 as sha256,
|
|
205
|
+
sha512_2562 as sha512_256,
|
|
206
|
+
signatureRsvToVrs,
|
|
207
|
+
signatureVrsToRsv,
|
|
208
|
+
toTwos2 as toTwos,
|
|
209
|
+
txidFromBytes2 as txidFromBytes,
|
|
210
|
+
uncompressPublicKey,
|
|
211
|
+
utf8ToBytes2 as utf8ToBytes,
|
|
212
|
+
validateStacksAddress2 as validateStacksAddress,
|
|
213
|
+
verifyMessageSignature,
|
|
214
|
+
verifySignature,
|
|
215
|
+
with0x2 as with0x,
|
|
216
|
+
without0x2 as without0x,
|
|
217
|
+
writeUInt16BE2 as writeUInt16BE,
|
|
218
|
+
writeUInt32BE2 as writeUInt32BE,
|
|
219
|
+
writeUInt82 as writeUInt8
|
|
220
220
|
};
|
|
221
221
|
|
|
222
|
-
//# debugId=
|
|
222
|
+
//# debugId=996326C0E97649BF64756E2164756E21
|
|
223
223
|
//# sourceMappingURL=index.js.map
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"import { sha256 } from \"@noble/hashes/sha2.js\";\nimport { Signature as NobleSignature, verify } from \"@noble/secp256k1\";\nimport { c32address } from \"./address.ts\";\nimport { AddressVersion } from \"./constants.ts\";\nimport { concatBytes, hexToBytes, utf8ToBytes } from \"./encoding.ts\";\nimport { hashP2PKH } from \"./hash.ts\";\n\nexport interface RecoverableSignature {\n\t/** Recovery id (0–3) */\n\trecovery: number;\n\t/** 32-byte r value as hex */\n\tr: string;\n\t/** 32-byte s value as hex */\n\ts: string;\n}\n\n// --- Format conversion ---\n\n/**\n * Parse a 65-byte VRS hex signature into components.\n * VRS format: recovery (1 byte) + r (32 bytes) + s (32 bytes)\n */\nexport function parseSignature(hex: string): RecoverableSignature {\n\tconst clean = hex.startsWith(\"0x\") ? hex.slice(2) : hex;\n\tif (clean.length !== 130) {\n\t\tthrow new Error(\n\t\t\t`Invalid signature length: expected 130 hex chars, got ${clean.length}`,\n\t\t);\n\t}\n\treturn {\n\t\trecovery: Number.parseInt(clean.slice(0, 2), 16),\n\t\tr: clean.slice(2, 66),\n\t\ts: clean.slice(66, 130),\n\t};\n}\n\n/**\n * Serialize a recoverable signature to 65-byte VRS hex (130 chars).\n */\nexport function serializeSignature(sig: RecoverableSignature): string {\n\tconst v = sig.recovery.toString(16).padStart(2, \"0\");\n\treturn v + sig.r + sig.s;\n}\n\n/** Convert VRS hex to RSV hex: r+s (128 chars) + recovery (2 chars). */\nexport function signatureVrsToRsv(vrs: string): string {\n\tconst clean = vrs.startsWith(\"0x\") ? vrs.slice(2) : vrs;\n\treturn clean.slice(2) + clean.slice(0, 2);\n}\n\n/** Convert RSV hex to VRS hex: recovery (2 chars) + r+s (128 chars). */\nexport function signatureRsvToVrs(rsv: string): string {\n\tconst clean = rsv.startsWith(\"0x\") ? rsv.slice(2) : rsv;\n\treturn clean.slice(-2) + clean.slice(0, -2);\n}\n\n// --- Recovery ---\n\n/**\n * Recover a public key from a message hash and VRS signature.\n * @returns hex-encoded public key (33 bytes compressed, or 65 bytes uncompressed)\n */\nexport function recoverPublicKey(\n\thash: Uint8Array | string,\n\tsignature: string,\n\tcompressed = true,\n): string {\n\tconst parsed = parseSignature(signature);\n\tconst rs = parsed.r + parsed.s;\n\tconst sig = NobleSignature.fromCompact(rs).addRecoveryBit(parsed.recovery);\n\tconst msgHash = typeof hash === \"string\" ? hexToBytes(hash) : hash;\n\tconst point = sig.recoverPublicKey(msgHash);\n\treturn point.toHex(compressed);\n}\n\n/**\n * Recover a Stacks address from a message hash and VRS signature.\n * @param addressVersion defaults to MainnetSingleSig (22)\n */\nexport function recoverAddress(\n\thash: Uint8Array | string,\n\tsignature: string,\n\taddressVersion: number = AddressVersion.MainnetSingleSig,\n): string {\n\tconst pubkey = recoverPublicKey(hash, signature, true);\n\tconst pubkeyHash = hashP2PKH(hexToBytes(pubkey));\n\treturn c32address(addressVersion, pubkeyHash);\n}\n\n// --- Verification ---\n\n/**\n * Verify an ECDSA signature against a message hash and public key.\n * Accepts compact (64-byte) signature as hex or Uint8Array.\n */\nexport function verifySignature(\n\thash: Uint8Array | string,\n\tsignature: string | Uint8Array,\n\tpublicKey: string | Uint8Array,\n): boolean {\n\treturn verify(signature, hash, publicKey, { lowS: false });\n}\n\n/** Bitcoin-style varint encoding for message length prefix. */\nfunction encodeVarint(n: number): Uint8Array {\n\tif (n < 0xfd) return new Uint8Array([n]);\n\tif (n <= 0xffff) {\n\t\tconst buf = new Uint8Array(3);\n\t\tbuf[0] = 0xfd;\n\t\tbuf[1] = n & 0xff;\n\t\tbuf[2] = (n >> 8) & 0xff;\n\t\treturn buf;\n\t}\n\tconst buf = new Uint8Array(5);\n\tbuf[0] = 0xfe;\n\tbuf[1] = n & 0xff;\n\tbuf[2] = (n >> 8) & 0xff;\n\tbuf[3] = (n >> 16) & 0xff;\n\tbuf[4] = (n >> 24) & 0xff;\n\treturn buf;\n}\n\nconst STACKS_MESSAGE_PREFIX = \"\\x17Stacks Signed Message:\\n\";\nconst LEGACY_MESSAGE_PREFIX = \"\\x18Stacks Message Signing:\\n\";\n\n/** Hash a message with the Stacks structured message prefix. */\nfunction hashMessage(message: string | Uint8Array, prefix: string): Uint8Array {\n\tconst messageBytes =\n\t\ttypeof message === \"string\" ? utf8ToBytes(message) : message;\n\tconst prefixBytes = utf8ToBytes(prefix);\n\tconst lengthBytes = encodeVarint(messageBytes.length);\n\treturn sha256(concatBytes(prefixBytes, lengthBytes, messageBytes));\n}\n\n/**\n * Verify a signed Stacks message.\n * Parses a VRS signature, extracts r+s for verification.\n * Falls back to legacy prefix if standard prefix fails.\n */\nexport function verifyMessageSignature(\n\tmessage: string | Uint8Array,\n\tsignature: string,\n\tpublicKey: string,\n): boolean {\n\tconst parsed = parseSignature(signature);\n\tconst compactSig = parsed.r + parsed.s;\n\n\tconst msgHash = hashMessage(message, STACKS_MESSAGE_PREFIX);\n\tif (verify(compactSig, msgHash, publicKey, { lowS: false })) return true;\n\n\t// Fallback to legacy prefix\n\tif (typeof message === \"string\") {\n\t\tconst legacyHash = hashMessage(message, LEGACY_MESSAGE_PREFIX);\n\t\tif (verify(compactSig, legacyHash, publicKey, { lowS: false })) return true;\n\t}\n\n\treturn false;\n}\n",
|
|
6
6
|
"import { Point, etc } from \"@noble/secp256k1\";\nimport { bytesToHex, hexToBytes } from \"./encoding.ts\";\n\n/** Compress a public key to 33 bytes (hex). */\nexport function compressPublicKey(publicKey: string | Uint8Array): string {\n\tconst hex = typeof publicKey === \"string\" ? publicKey : bytesToHex(publicKey);\n\treturn Point.fromHex(hex).toHex(true);\n}\n\n/** Uncompress a public key to 65 bytes (hex). */\nexport function uncompressPublicKey(publicKey: string | Uint8Array): string {\n\tconst hex = typeof publicKey === \"string\" ? publicKey : bytesToHex(publicKey);\n\treturn Point.fromHex(hex).toHex(false);\n}\n\n/** Check if a public key is in compressed format (starts with 0x02 or 0x03). */\nexport function isCompressedPublicKey(publicKey: string | Uint8Array): boolean {\n\tconst bytes =\n\t\ttypeof publicKey === \"string\" ? hexToBytes(publicKey) : publicKey;\n\treturn bytes.length === 33 && (bytes[0] === 0x02 || bytes[0] === 0x03);\n}\n\n/** Generate cryptographically secure random bytes. Defaults to 32 bytes. */\nexport function randomBytes(length?: number): Uint8Array {\n\treturn etc.randomBytes(length ?? 32);\n}\n"
|
|
7
7
|
],
|
|
8
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA
|
|
9
|
-
"debugId": "
|
|
8
|
+
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;AAAA;AAQ3D,SAAS,sBAAsB,CACrC,SACA,WACA,WACU;AAAA,EACV,MAAM,SAAS,eAAe,SAAS;AAAA,EACvC,MAAM,aAAa,OAAO,IAAI,OAAO;AAAA,EAErC,MAAM,UAAU,YAAY,SAAS,qBAAqB;AAAA,EAC1D,IAAI,OAAO,YAAY,SAAS,WAAW,EAAE,MAAM,MAAM,CAAC;AAAA,IAAG,OAAO;AAAA,EAGpE,IAAI,OAAO,YAAY,UAAU;AAAA,IAChC,MAAM,aAAa,YAAY,SAAS,qBAAqB;AAAA,IAC7D,IAAI,OAAO,YAAY,YAAY,WAAW,EAAE,MAAM,MAAM,CAAC;AAAA,MAAG,OAAO;AAAA,EACxE;AAAA,EAEA,OAAO;AAAA;;AC5JR;AAIO,SAAS,iBAAiB,CAAC,WAAwC;AAAA,EACzE,MAAM,MAAM,OAAO,cAAc,WAAW,YAAY,YAAW,SAAS;AAAA,EAC5E,OAAO,MAAM,QAAQ,GAAG,EAAE,MAAM,IAAI;AAAA;AAI9B,SAAS,mBAAmB,CAAC,WAAwC;AAAA,EAC3E,MAAM,MAAM,OAAO,cAAc,WAAW,YAAY,YAAW,SAAS;AAAA,EAC5E,OAAO,MAAM,QAAQ,GAAG,EAAE,MAAM,KAAK;AAAA;AAI/B,SAAS,qBAAqB,CAAC,WAAyC;AAAA,EAC9E,MAAM,QACL,OAAO,cAAc,WAAW,YAAW,SAAS,IAAI;AAAA,EACzD,OAAO,MAAM,WAAW,OAAO,MAAM,OAAO,KAAQ,MAAM,OAAO;AAAA;AAI3D,SAAS,WAAW,CAAC,QAA6B;AAAA,EACxD,OAAO,IAAI,YAAY,UAAU,EAAE;AAAA;",
|
|
9
|
+
"debugId": "996326C0E97649BF64756E2164756E21",
|
|
10
10
|
"names": []
|
|
11
11
|
}
|
package/package.json
CHANGED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
// src/accounts/providerToAccount.ts
|
|
2
|
-
async function providerToAccount(provider) {
|
|
3
|
-
const result = await provider.request("stx_getAddresses");
|
|
4
|
-
const entry = result?.addresses?.[0];
|
|
5
|
-
if (!entry?.address || !entry?.publicKey) {
|
|
6
|
-
throw new Error("Provider did not return a valid address");
|
|
7
|
-
}
|
|
8
|
-
return {
|
|
9
|
-
type: "provider",
|
|
10
|
-
address: entry.address,
|
|
11
|
-
publicKey: entry.publicKey,
|
|
12
|
-
provider
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
//# debugId=92C250F1EE7F3F3064756E2164756E21
|
|
17
|
-
//# sourceMappingURL=stacks-02actsrx.cjs.map
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/accounts/providerToAccount.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import type { ProviderAccount, StacksProvider } from \"./types.ts\";\n\n/** Create a ProviderAccount by querying the wallet for addresses */\nexport async function providerToAccount(\n\tprovider: StacksProvider,\n): Promise<ProviderAccount> {\n\tconst result = await provider.request(\"stx_getAddresses\");\n\n\tconst entry = result?.addresses?.[0];\n\tif (!entry?.address || !entry?.publicKey) {\n\t\tthrow new Error(\"Provider did not return a valid address\");\n\t}\n\n\treturn {\n\t\ttype: \"provider\",\n\t\taddress: entry.address,\n\t\tpublicKey: entry.publicKey,\n\t\tprovider,\n\t};\n}\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": ";AAGA,eAAsB,iBAAiB,CACtC,UAC2B;AAAA,EAC3B,MAAM,SAAS,MAAM,SAAS,QAAQ,kBAAkB;AAAA,EAExD,MAAM,QAAQ,QAAQ,YAAY;AAAA,EAClC,IAAI,CAAC,OAAO,WAAW,CAAC,OAAO,WAAW;AAAA,IACzC,MAAM,IAAI,MAAM,yCAAyC;AAAA,EAC1D;AAAA,EAEA,OAAO;AAAA,IACN,MAAM;AAAA,IACN,SAAS,MAAM;AAAA,IACf,WAAW,MAAM;AAAA,IACjB;AAAA,EACD;AAAA;",
|
|
8
|
-
"debugId": "92C250F1EE7F3F3064756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|