{"version":3,"file":"index.mjs","sources":["../../../../../../src/mods/secp256k1/signature/index.ts"],"sourcesContent":["import { Base16 } from \"@hazae41/base16\"\nimport { Box } from \"@hazae41/box\"\nimport { Bytes, Uint8Array } from \"@hazae41/bytes\"\nimport { Cursor } from \"@hazae41/cursor\"\nimport { RawHexString, ZeroHexString } from \"@hazae41/hexane\"\nimport { Secp256k1 } from \"@hazae41/secp256k1\"\nimport { Copiable } from \"libs/copiable/index.js\"\nimport { BytesAsInteger, CopiableBytesAsInteger, NumberAsInteger, RawHexAsInteger, ZeroHexAsInteger } from \"../../convert/index.js\"\n\nexport type Signature =\n  | RsvZeroHexSignature\n  | RsvBytesSignature\n  | ZeroHexSignature\n  | BytesSignature\n  | ExtSignature\n\nexport namespace Signature {\n\n  export type From =\n    | RsvZeroHexSignature.From\n    | RsvBytesSignature.From\n    | ZeroHexSignature.From\n    | BytesSignature.From\n    | ExtSignature.From\n\n  export function fromOrThrow(from: Signature.From): Signature {\n    if (from instanceof Secp256k1.SignatureAndRecovery)\n      return from\n    if (from instanceof Uint8Array)\n      return BytesSignature.fromBytesOrThrow(from)\n    if (typeof from === \"object\")\n      return RsvZeroHexSignature.fromRsvOrThrow(from)\n    return ZeroHexSignature.fromOtherOrThrow(from)\n  }\n\n}\n\nexport type RsvSignature =\n  | RsvZeroHexSignature\n  | RsvBytesSignature\n\nexport namespace RsvSignature {\n\n  export type From =\n    | RsvZeroHexSignature.From\n    | RsvBytesSignature.From\n\n}\n\nexport interface RsvZeroHexSignatureInit {\n  readonly r: ZeroHexString<32>\n  readonly s: ZeroHexString<32>\n  readonly v: number\n}\n\nexport class RsvZeroHexSignature {\n\n  constructor(\n    readonly r: ZeroHexString<32>,\n    readonly s: ZeroHexString<32>,\n    readonly v: number\n  ) { }\n\n}\n\nexport namespace RsvZeroHexSignature {\n\n  export interface From {\n    readonly r: ZeroHexAsInteger.From\n    readonly s: ZeroHexAsInteger.From\n    readonly v: NumberAsInteger.From\n  }\n\n  export function fromOrThrow(from: Signature.From): RsvZeroHexSignature {\n    if (from instanceof Secp256k1.SignatureAndRecovery)\n      return fromExtOrThrow(from)\n    if (from instanceof Uint8Array)\n      return fromBytesOrThrow(from)\n    if (typeof from === \"object\")\n      return fromRsvOrThrow(from)\n    return fromOtherOrThrow(from)\n  }\n\n  export function fromExtOrThrow(from: ExtSignature): RsvZeroHexSignature {\n    using slice = from.exportOrThrow()\n\n    const cursor = new Cursor(slice.bytes)\n\n    const hr = Base16.get().getOrThrow().encodeOrThrow(cursor.readOrThrow(32)) as ZeroHexString<32>\n    const hs = Base16.get().getOrThrow().encodeOrThrow(cursor.readOrThrow(32)) as ZeroHexString<32>\n\n    const v = cursor.readUint8OrThrow()\n\n    return new RsvZeroHexSignature(hr, hs, v)\n  }\n\n  export function fromBytesOrThrow(from: Uint8Array): RsvZeroHexSignature {\n    const cursor = new Cursor(from)\n\n    const hr = Base16.get().getOrThrow().encodeOrThrow(cursor.readOrThrow(32)) as ZeroHexString<32>\n    const hs = Base16.get().getOrThrow().encodeOrThrow(cursor.readOrThrow(32)) as ZeroHexString<32>\n\n    const v = cursor.readUint8OrThrow()\n\n    return new RsvZeroHexSignature(hr, hs, v)\n  }\n\n  export function fromRsvOrThrow(from: RsvSignature.From): RsvZeroHexSignature {\n    const { r, s, v } = from\n\n    const hr = ZeroHexAsInteger.Length.fromOrThrow(r, 32)\n    const hs = ZeroHexAsInteger.Length.fromOrThrow(s, 32)\n    const nv = NumberAsInteger.fromOrThrow(v)\n\n    return new RsvZeroHexSignature(hr, hs, nv)\n  }\n\n  export function fromOtherOrThrow(from: ZeroHexAsInteger.From): RsvZeroHexSignature {\n    const bytes = BytesAsInteger.Length.fromOrThrow(from, 65)\n\n    const cursor = new Cursor(bytes)\n\n    const hr = Base16.get().getOrThrow().encodeOrThrow(cursor.readOrThrow(32)) as ZeroHexString<32>\n    const hs = Base16.get().getOrThrow().encodeOrThrow(cursor.readOrThrow(32)) as ZeroHexString<32>\n\n    const v = cursor.readUint8OrThrow()\n\n    return new RsvZeroHexSignature(hr, hs, v)\n  }\n\n}\n\nexport interface RsvBytesSignature {\n  readonly r: Uint8Array<32>\n  readonly s: Uint8Array<32>\n  readonly v: number\n}\n\nexport class RsvBytesSignature {\n\n  constructor(\n    readonly r: Uint8Array<32>,\n    readonly s: Uint8Array<32>,\n    readonly v: number\n  ) { }\n\n}\n\nexport namespace RsvBytesSignature {\n\n  export interface From {\n    readonly r: BytesAsInteger.From\n    readonly s: BytesAsInteger.From\n    readonly v: NumberAsInteger.From\n  }\n\n  export function fromOrThrow(from: Signature.From): RsvBytesSignature {\n    if (from instanceof Secp256k1.SignatureAndRecovery)\n      return fromExtOrThrow(from)\n    if (from instanceof Uint8Array)\n      return fromBytesOrThrow(from)\n    if (typeof from === \"object\")\n      return fromRsvOrThrow(from)\n    return fromOtherOrThrow(from)\n  }\n\n  export function fromExtOrThrow(from: ExtSignature): RsvBytesSignature {\n    using slice = from.exportOrThrow()\n\n    const cursor = new Cursor(slice.bytes)\n\n    const r = cursor.readAndCopyOrThrow(32)\n    const s = cursor.readAndCopyOrThrow(32)\n    const v = cursor.readUint8OrThrow()\n\n    return new RsvBytesSignature(r, s, v)\n  }\n\n  export function fromBytesOrThrow(from: Uint8Array): RsvBytesSignature {\n    const cursor = new Cursor(from)\n\n    const r = cursor.readAndCopyOrThrow(32)\n    const s = cursor.readAndCopyOrThrow(32)\n    const v = cursor.readUint8OrThrow()\n\n    return new RsvBytesSignature(r, s, v)\n  }\n\n  export function fromRsvOrThrow(from: RsvSignature.From): RsvBytesSignature {\n    const { r, s, v } = from\n\n    const br = BytesAsInteger.Length.fromOrThrow(r, 32)\n    const bs = BytesAsInteger.Length.fromOrThrow(s, 32)\n    const nv = NumberAsInteger.fromOrThrow(v)\n\n    return new RsvBytesSignature(br, bs, nv)\n  }\n\n  export function fromOtherOrThrow(from: BytesAsInteger.From): RsvBytesSignature {\n    const bytes = BytesAsInteger.Length.fromOrThrow(from, 65)\n\n    const cursor = new Cursor(bytes)\n\n    const r = cursor.readAndCopyOrThrow(32)\n    const s = cursor.readAndCopyOrThrow(32)\n    const v = cursor.readUint8OrThrow()\n\n    return new RsvBytesSignature(r, s, v)\n  }\n\n}\n\nexport type ZeroHexSignature = ZeroHexString<65>\n\nexport namespace ZeroHexSignature {\n\n  export type From = ZeroHexAsInteger.From\n\n  export function fromOrThrow(from: Signature.From): ZeroHexSignature {\n    if (from instanceof Secp256k1.SignatureAndRecovery)\n      return fromExtOrThrow(from)\n    if (from instanceof Uint8Array)\n      return fromBytesOrThrow(from)\n    if (typeof from === \"object\")\n      return fromRsvOrThrow(from)\n    return fromOtherOrThrow(from)\n  }\n\n  export function fromExtOrThrow(from: ExtSignature): ZeroHexSignature {\n    using slice = from.exportOrThrow()\n\n    const base16 = Base16.get().getOrThrow().encodeOrThrow(slice.bytes)\n\n    return `0x${base16}` as ZeroHexString<65>\n  }\n\n  export function fromBytesOrThrow(from: Uint8Array): ZeroHexSignature {\n    const bytes = Bytes.castOrThrow(from, 65)\n    const base16 = Base16.get().getOrThrow().encodeOrThrow(bytes)\n\n    return `0x${base16}` as ZeroHexString<65>\n  }\n\n  export function fromRsvOrThrow(from: RsvSignature.From): ZeroHexSignature {\n    const { r, s, v } = from\n\n    const hr = RawHexAsInteger.Length.fromOrThrow(r, 32)\n    const hs = RawHexAsInteger.Length.fromOrThrow(s, 32)\n\n    const hvx = RawHexAsInteger.fromOrThrow(v)\n    const hvp = RawHexString.padStart(hvx)\n\n    return `0x${hr}${hs}${hvp}` as ZeroHexString<65>\n  }\n\n  export function fromOtherOrThrow(from: ZeroHexAsInteger.From): ZeroHexSignature {\n    return ZeroHexAsInteger.Length.fromOrThrow(from, 65)\n  }\n\n}\n\nexport type BytesSignature = Uint8Array<65>\n\nexport namespace BytesSignature {\n\n  export type From = BytesAsInteger.From\n\n  export function fromOrThrow(from: Signature.From): BytesSignature {\n    if (from instanceof Secp256k1.SignatureAndRecovery)\n      return fromExtOrThrow(from)\n    if (from instanceof Uint8Array)\n      return fromBytesOrThrow(from)\n    if (typeof from === \"object\")\n      return fromRsvOrThrow(from)\n    return fromOtherOrThrow(from)\n  }\n\n  export function fromExtOrThrow(from: ExtSignature): BytesSignature {\n    return Copiable.copyAndDispose(from.exportOrThrow()) as Uint8Array<65>\n  }\n\n  export function fromBytesOrThrow(from: Uint8Array): BytesSignature {\n    return Bytes.castOrThrow(from, 65) as Uint8Array<65>\n  }\n\n  export function fromRsvOrThrow(from: RsvSignature.From): BytesSignature {\n    const { r, s, v } = from\n\n    using br = CopiableBytesAsInteger.Length.fromOrThrow(r, 32)\n    using bs = CopiableBytesAsInteger.Length.fromOrThrow(s, 32)\n\n    const cursor = new Cursor(new Uint8Array(65))\n\n    cursor.writeOrThrow(br.bytes)\n    cursor.writeOrThrow(bs.bytes)\n\n    cursor.writeUint8OrThrow(NumberAsInteger.fromOrThrow(v))\n\n    return cursor.bytes as Uint8Array<65>\n  }\n\n  export function fromOtherOrThrow(from: BytesAsInteger.From): BytesSignature {\n    return BytesAsInteger.Length.fromOrThrow(from, 65)\n  }\n\n}\n\nexport type ExtSignature = Secp256k1.SignatureAndRecovery\n\nexport namespace ExtSignature {\n\n  export type From = Secp256k1.SignatureAndRecovery\n\n  export function fromOrThrow(from: Signature.From): Box<ExtSignature> {\n    if (from instanceof Secp256k1.SignatureAndRecovery)\n      return fromExtOrThrow(from)\n    if (from instanceof Uint8Array)\n      return fromBytesOrThrow(from)\n    if (typeof from === \"object\")\n      return fromRsvOrThrow(from)\n    return fromOtherOrThrow(from)\n  }\n\n  export function fromRsvOrThrow(from: RsvSignature.From): Box<ExtSignature> {\n    const { r, s, v } = from\n\n    using br = CopiableBytesAsInteger.Length.fromOrThrow(r, 32)\n    using bs = CopiableBytesAsInteger.Length.fromOrThrow(s, 32)\n\n    const cursor = new Cursor(new Uint8Array(65))\n\n    cursor.writeOrThrow(br.bytes)\n    cursor.writeOrThrow(bs.bytes)\n\n    cursor.writeUint8OrThrow(NumberAsInteger.fromOrThrow(v))\n\n    return new Box(Secp256k1.get().getOrThrow().SignatureAndRecovery.importOrThrow(cursor.bytes))\n  }\n\n  export function fromBytesOrThrow(from: Uint8Array): Box<ExtSignature> {\n    return new Box(Secp256k1.get().getOrThrow().SignatureAndRecovery.importOrThrow(Bytes.castOrThrow(from, 65)))\n  }\n\n  export function fromOtherOrThrow(from: BytesAsInteger.From): Box<ExtSignature> {\n    return new Box(Secp256k1.get().getOrThrow().SignatureAndRecovery.importOrThrow(BytesAsInteger.Length.fromOrThrow(from, 65)))\n  }\n\n  export function fromExtOrThrow(from: ExtSignature): Box<ExtSignature> {\n    return Box.createAsDropped(from)\n  }\n\n}"],"names":[],"mappings":";;;;;;;;;;AAgBM,IAAW;AAAjB,CAAA,UAAiB,SAAS,EAAA;IASxB,SAAgB,WAAW,CAAC,IAAoB,EAAA;AAC9C,QAAA,IAAI,IAAI,YAAY,SAAS,CAAC,oBAAoB;AAChD,YAAA,OAAO,IAAI;QACb,IAAI,IAAI,YAAY,UAAU;AAC5B,YAAA,OAAO,cAAc,CAAC,gBAAgB,CAAC,IAAI,CAAC;QAC9C,IAAI,OAAO,IAAI,KAAK,QAAQ;AAC1B,YAAA,OAAO,mBAAmB,CAAC,cAAc,CAAC,IAAI,CAAC;AACjD,QAAA,OAAO,gBAAgB,CAAC,gBAAgB,CAAC,IAAI,CAAC;;AAPhC,IAAA,SAAA,CAAA,WAAW,cAQ1B;AAEH,CAAC,EAnBgB,SAAS,KAAT,SAAS,GAmBzB,EAAA,CAAA,CAAA;MAoBY,mBAAmB,CAAA;AAGnB,IAAA,CAAA;AACA,IAAA,CAAA;AACA,IAAA,CAAA;AAHX,IAAA,WAAA,CACW,CAAoB,EACpB,CAAoB,EACpB,CAAS,EAAA;QAFT,IAAC,CAAA,CAAA,GAAD,CAAC;QACD,IAAC,CAAA,CAAA,GAAD,CAAC;QACD,IAAC,CAAA,CAAA,GAAD,CAAC;;AAGb;AAED,CAAA,UAAiB,mBAAmB,EAAA;IAQlC,SAAgB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