@cardanowall/sdk-ts 0.0.0

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.
Files changed (67) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +207 -0
  3. package/dist/client/index.cjs +2695 -0
  4. package/dist/client/index.cjs.map +1 -0
  5. package/dist/client/index.d.cts +397 -0
  6. package/dist/client/index.d.ts +397 -0
  7. package/dist/client/index.js +2641 -0
  8. package/dist/client/index.js.map +1 -0
  9. package/dist/conformance/cli.cjs +4901 -0
  10. package/dist/conformance/cli.cjs.map +1 -0
  11. package/dist/conformance/cli.d.cts +18 -0
  12. package/dist/conformance/cli.d.ts +18 -0
  13. package/dist/conformance/cli.js +4878 -0
  14. package/dist/conformance/cli.js.map +1 -0
  15. package/dist/fetch/index.cjs +335 -0
  16. package/dist/fetch/index.cjs.map +1 -0
  17. package/dist/fetch/index.d.cts +13 -0
  18. package/dist/fetch/index.d.ts +13 -0
  19. package/dist/fetch/index.js +323 -0
  20. package/dist/fetch/index.js.map +1 -0
  21. package/dist/fetch-outbound-BT5-NiYN.d.cts +76 -0
  22. package/dist/fetch-outbound-BT5-NiYN.d.ts +76 -0
  23. package/dist/hash/index.cjs +25 -0
  24. package/dist/hash/index.cjs.map +1 -0
  25. package/dist/hash/index.d.cts +1 -0
  26. package/dist/hash/index.d.ts +1 -0
  27. package/dist/hash/index.js +21 -0
  28. package/dist/hash/index.js.map +1 -0
  29. package/dist/identity/index.cjs +1388 -0
  30. package/dist/identity/index.cjs.map +1 -0
  31. package/dist/identity/index.d.cts +27 -0
  32. package/dist/identity/index.d.ts +27 -0
  33. package/dist/identity/index.js +1362 -0
  34. package/dist/identity/index.js.map +1 -0
  35. package/dist/ids/index.cjs +146 -0
  36. package/dist/ids/index.cjs.map +1 -0
  37. package/dist/ids/index.d.cts +55 -0
  38. package/dist/ids/index.d.ts +55 -0
  39. package/dist/ids/index.js +135 -0
  40. package/dist/ids/index.js.map +1 -0
  41. package/dist/index-BhnlWJAY.d.cts +10 -0
  42. package/dist/index-BhnlWJAY.d.ts +10 -0
  43. package/dist/index-Cg1QqVmA.d.cts +19 -0
  44. package/dist/index-Cg1QqVmA.d.ts +19 -0
  45. package/dist/index.cjs +7127 -0
  46. package/dist/index.cjs.map +1 -0
  47. package/dist/index.d.cts +21 -0
  48. package/dist/index.d.ts +21 -0
  49. package/dist/index.js +7004 -0
  50. package/dist/index.js.map +1 -0
  51. package/dist/merkle/index.cjs +396 -0
  52. package/dist/merkle/index.cjs.map +1 -0
  53. package/dist/merkle/index.d.cts +2 -0
  54. package/dist/merkle/index.d.ts +2 -0
  55. package/dist/merkle/index.js +387 -0
  56. package/dist/merkle/index.js.map +1 -0
  57. package/dist/types-B8Q3gW54.d.ts +123 -0
  58. package/dist/types-BQMtbRCb.d.cts +321 -0
  59. package/dist/types-BQMtbRCb.d.ts +321 -0
  60. package/dist/types-CLXdbjqr.d.cts +123 -0
  61. package/dist/verifier/index.cjs +4901 -0
  62. package/dist/verifier/index.cjs.map +1 -0
  63. package/dist/verifier/index.d.cts +176 -0
  64. package/dist/verifier/index.d.ts +176 -0
  65. package/dist/verifier/index.js +4848 -0
  66. package/dist/verifier/index.js.map +1 -0
  67. package/package.json +108 -0
@@ -0,0 +1,123 @@
1
+ import { ValidationIssue, PoeRecord } from '@cardanowall/poe-standard';
2
+ import { H as HttpCallRecord, F as FetchOutbound } from './fetch-outbound-BT5-NiYN.cjs';
3
+
4
+ type Verdict = 'valid' | 'pending' | 'failed';
5
+ type ExitCode = 0 | 1 | 2 | 3;
6
+ type Profile = 'core' | 'signed' | 'sealed' | 'recipient-sealed';
7
+ type Network = 'cardano:mainnet';
8
+ declare const PROFILE_RANK: Readonly<Record<Profile, number>>;
9
+
10
+ interface VerifyTxInput {
11
+ readonly txHash: string;
12
+ readonly profile?: Profile;
13
+ readonly cardanoGatewayChain?: ReadonlyArray<string>;
14
+ readonly blockfrostProjectId?: string;
15
+ readonly arweaveGatewayChain?: ReadonlyArray<string>;
16
+ readonly ipfsGatewayChain?: ReadonlyArray<string>;
17
+ readonly confirmationDepthThreshold?: number;
18
+ readonly denyHosts?: ReadonlyArray<string>;
19
+ readonly verifyMerkle?: boolean;
20
+ readonly decryption?: ReadonlyArray<{
21
+ readonly itemIndex: number;
22
+ readonly recipientSecretKey: Uint8Array;
23
+ } | {
24
+ readonly itemIndex: number;
25
+ readonly passphrase: string;
26
+ }>;
27
+ readonly ciphertextBytes?: Readonly<Record<number, Uint8Array>>;
28
+ readonly merkleLeaves?: Readonly<Record<number, Uint8Array>>;
29
+ readonly cardanoNetwork?: 'mainnet' | 'preprod';
30
+ readonly fetchOutbound?: FetchOutbound;
31
+ }
32
+ type SignatureVerdict = 'valid' | 'invalid' | 'unsupported' | 'unresolved';
33
+ type SignatureFailureReason = 'MALFORMED_SIG_COSE_SIGN1' | 'SIGNATURE_UNSUPPORTED' | 'SIGNER_KEY_UNRESOLVED' | 'SIGNATURE_INVALID' | 'WALLET_ADDRESS_MISMATCH';
34
+ type SignerType = 'in-signature-kid' | 'wallet-inline-key';
35
+ interface VerifyRecordSignature {
36
+ readonly index: number;
37
+ readonly verdict: SignatureVerdict;
38
+ readonly signer_pub?: string;
39
+ readonly signer_type?: SignerType;
40
+ readonly reason?: SignatureFailureReason;
41
+ }
42
+ type DecryptionVerdict = 'decrypted' | 'wrong-key' | 'tampered-header' | 'tampered-ciphertext' | 'wrong-input-shape' | 'no-enc-envelope' | 'ciphertext-unavailable' | 'content-unavailable' | 'skipped' | 'kdf-failed';
43
+ interface VerifyItemDecryption {
44
+ readonly item_index: number;
45
+ readonly verdict: DecryptionVerdict;
46
+ readonly plaintext_hash_ok?: boolean;
47
+ readonly reason?: string;
48
+ }
49
+ type ItemHashCheck = {
50
+ readonly item_index: number;
51
+ readonly alg: string;
52
+ readonly ok: boolean;
53
+ };
54
+ type MerkleVerdict = 'valid' | 'mismatch' | 'unavailable' | 'format-unsupported' | 'unsupported';
55
+ interface VerifyMerkleCheck {
56
+ readonly merkle_index: number;
57
+ readonly alg: string;
58
+ readonly verdict: MerkleVerdict;
59
+ readonly root_recomputed?: Uint8Array;
60
+ readonly reason?: string;
61
+ }
62
+ interface VerifyUriCheck {
63
+ readonly item_index: number;
64
+ readonly uri: string;
65
+ readonly ok: boolean;
66
+ readonly reason?: string;
67
+ }
68
+ interface VerifyTxWitness {
69
+ readonly type: 'vkey';
70
+ readonly vkey: string;
71
+ readonly key_hash: string;
72
+ readonly signature_valid: boolean;
73
+ }
74
+ interface VerifyTxOutput {
75
+ readonly address: string;
76
+ readonly lovelace: string;
77
+ }
78
+ interface VerifyTxSummary {
79
+ readonly fee_lovelace: string;
80
+ readonly input_count: number;
81
+ readonly output_count: number;
82
+ readonly outputs: ReadonlyArray<VerifyTxOutput>;
83
+ readonly total_output_lovelace: string;
84
+ readonly script_witness_count: number;
85
+ readonly invalid_before?: number;
86
+ readonly invalid_hereafter?: number;
87
+ readonly required_signer_key_hashes?: ReadonlyArray<string>;
88
+ readonly network_id?: number;
89
+ }
90
+ interface VerifyReport {
91
+ readonly tx_hash: string;
92
+ readonly network: Network;
93
+ readonly verdict: Verdict;
94
+ readonly exit_code: ExitCode;
95
+ readonly profile: Profile;
96
+ readonly num_confirmations: number;
97
+ readonly confirmation_depth_threshold: number;
98
+ readonly block_time?: number;
99
+ readonly block_slot?: number;
100
+ readonly metadata_present: boolean;
101
+ readonly validation: {
102
+ readonly valid: boolean;
103
+ readonly issues?: ReadonlyArray<ValidationIssue>;
104
+ readonly warnings?: ReadonlyArray<ValidationIssue>;
105
+ readonly info?: ReadonlyArray<ValidationIssue>;
106
+ };
107
+ readonly record?: PoeRecord;
108
+ readonly record_signatures?: ReadonlyArray<VerifyRecordSignature>;
109
+ readonly tx_witnesses?: ReadonlyArray<VerifyTxWitness>;
110
+ readonly tx_summary?: VerifyTxSummary;
111
+ readonly metadata_labels?: ReadonlyArray<number>;
112
+ readonly item_hash_checks?: ReadonlyArray<ItemHashCheck>;
113
+ readonly item_decryptions?: ReadonlyArray<VerifyItemDecryption>;
114
+ readonly merkle_checks?: ReadonlyArray<VerifyMerkleCheck>;
115
+ readonly uri_checks?: ReadonlyArray<VerifyUriCheck>;
116
+ readonly supersedes_resolved?: {
117
+ readonly tx: string;
118
+ readonly exists: boolean;
119
+ };
120
+ readonly http_calls: ReadonlyArray<HttpCallRecord>;
121
+ }
122
+
123
+ export { type DecryptionVerdict as D, type ExitCode as E, type ItemHashCheck as I, type MerkleVerdict as M, type Network as N, PROFILE_RANK as P, type SignatureFailureReason as S, type Verdict as V, type Profile as a, type SignatureVerdict as b, type SignerType as c, type VerifyItemDecryption as d, type VerifyMerkleCheck as e, type VerifyRecordSignature as f, type VerifyReport as g, type VerifyTxInput as h, type VerifyTxOutput as i, type VerifyTxSummary as j, type VerifyTxWitness as k, type VerifyUriCheck as l };