@sundaeswap/sprinkles 0.4.0 → 0.5.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 (83) hide show
  1. package/dist/cjs/Sprinkle/__tests__/encryption.test.js +20 -8
  2. package/dist/cjs/Sprinkle/__tests__/encryption.test.js.map +1 -1
  3. package/dist/cjs/Sprinkle/__tests__/enhancements.test.js +41 -16
  4. package/dist/cjs/Sprinkle/__tests__/enhancements.test.js.map +1 -1
  5. package/dist/cjs/Sprinkle/__tests__/fill-in-struct.test.js +85 -38
  6. package/dist/cjs/Sprinkle/__tests__/fill-in-struct.test.js.map +1 -1
  7. package/dist/cjs/Sprinkle/__tests__/show-menu.test.js +93 -7
  8. package/dist/cjs/Sprinkle/__tests__/show-menu.test.js.map +1 -1
  9. package/dist/cjs/Sprinkle/__tests__/tx-dialog.test.js +21 -0
  10. package/dist/cjs/Sprinkle/__tests__/tx-dialog.test.js.map +1 -1
  11. package/dist/cjs/Sprinkle/encryption.js +131 -0
  12. package/dist/cjs/Sprinkle/encryption.js.map +1 -0
  13. package/dist/cjs/Sprinkle/index.js +307 -362
  14. package/dist/cjs/Sprinkle/index.js.map +1 -1
  15. package/dist/cjs/Sprinkle/prompts.js +393 -0
  16. package/dist/cjs/Sprinkle/prompts.js.map +1 -0
  17. package/dist/cjs/Sprinkle/schemas.js +97 -0
  18. package/dist/cjs/Sprinkle/schemas.js.map +1 -0
  19. package/dist/cjs/Sprinkle/tx-dialog.js +101 -0
  20. package/dist/cjs/Sprinkle/tx-dialog.js.map +1 -0
  21. package/dist/cjs/Sprinkle/type-guards.js +42 -0
  22. package/dist/cjs/Sprinkle/type-guards.js.map +1 -0
  23. package/dist/cjs/Sprinkle/types.js +49 -0
  24. package/dist/cjs/Sprinkle/types.js.map +1 -0
  25. package/dist/cjs/Sprinkle/wallet.js +98 -0
  26. package/dist/cjs/Sprinkle/wallet.js.map +1 -0
  27. package/dist/esm/Sprinkle/__tests__/encryption.test.js +20 -8
  28. package/dist/esm/Sprinkle/__tests__/encryption.test.js.map +1 -1
  29. package/dist/esm/Sprinkle/__tests__/enhancements.test.js +41 -16
  30. package/dist/esm/Sprinkle/__tests__/enhancements.test.js.map +1 -1
  31. package/dist/esm/Sprinkle/__tests__/fill-in-struct.test.js +85 -38
  32. package/dist/esm/Sprinkle/__tests__/fill-in-struct.test.js.map +1 -1
  33. package/dist/esm/Sprinkle/__tests__/show-menu.test.js +94 -8
  34. package/dist/esm/Sprinkle/__tests__/show-menu.test.js.map +1 -1
  35. package/dist/esm/Sprinkle/__tests__/tx-dialog.test.js +21 -0
  36. package/dist/esm/Sprinkle/__tests__/tx-dialog.test.js.map +1 -1
  37. package/dist/esm/Sprinkle/encryption.js +117 -0
  38. package/dist/esm/Sprinkle/encryption.js.map +1 -0
  39. package/dist/esm/Sprinkle/index.js +161 -347
  40. package/dist/esm/Sprinkle/index.js.map +1 -1
  41. package/dist/esm/Sprinkle/prompts.js +385 -0
  42. package/dist/esm/Sprinkle/prompts.js.map +1 -0
  43. package/dist/esm/Sprinkle/schemas.js +91 -0
  44. package/dist/esm/Sprinkle/schemas.js.map +1 -0
  45. package/dist/esm/Sprinkle/tx-dialog.js +90 -0
  46. package/dist/esm/Sprinkle/tx-dialog.js.map +1 -0
  47. package/dist/esm/Sprinkle/type-guards.js +24 -0
  48. package/dist/esm/Sprinkle/type-guards.js.map +1 -0
  49. package/dist/esm/Sprinkle/types.js +42 -0
  50. package/dist/esm/Sprinkle/types.js.map +1 -0
  51. package/dist/esm/Sprinkle/wallet.js +90 -0
  52. package/dist/esm/Sprinkle/wallet.js.map +1 -0
  53. package/dist/types/Sprinkle/encryption.d.ts +43 -0
  54. package/dist/types/Sprinkle/encryption.d.ts.map +1 -0
  55. package/dist/types/Sprinkle/index.d.ts +11 -177
  56. package/dist/types/Sprinkle/index.d.ts.map +1 -1
  57. package/dist/types/Sprinkle/prompts.d.ts +94 -0
  58. package/dist/types/Sprinkle/prompts.d.ts.map +1 -0
  59. package/dist/types/Sprinkle/schemas.d.ts +125 -0
  60. package/dist/types/Sprinkle/schemas.d.ts.map +1 -0
  61. package/dist/types/Sprinkle/tx-dialog.d.ts +37 -0
  62. package/dist/types/Sprinkle/tx-dialog.d.ts.map +1 -0
  63. package/dist/types/Sprinkle/type-guards.d.ts +22 -0
  64. package/dist/types/Sprinkle/type-guards.d.ts.map +1 -0
  65. package/dist/types/Sprinkle/types.d.ts +62 -0
  66. package/dist/types/Sprinkle/types.d.ts.map +1 -0
  67. package/dist/types/Sprinkle/wallet.d.ts +27 -0
  68. package/dist/types/Sprinkle/wallet.d.ts.map +1 -0
  69. package/dist/types/tsconfig.build.tsbuildinfo +1 -1
  70. package/package.json +1 -1
  71. package/src/Sprinkle/__tests__/encryption.test.ts +21 -8
  72. package/src/Sprinkle/__tests__/enhancements.test.ts +41 -15
  73. package/src/Sprinkle/__tests__/fill-in-struct.test.ts +104 -38
  74. package/src/Sprinkle/__tests__/show-menu.test.ts +96 -8
  75. package/src/Sprinkle/__tests__/tx-dialog.test.ts +21 -0
  76. package/src/Sprinkle/encryption.ts +130 -0
  77. package/src/Sprinkle/index.ts +254 -496
  78. package/src/Sprinkle/prompts.ts +481 -0
  79. package/src/Sprinkle/schemas.ts +111 -0
  80. package/src/Sprinkle/tx-dialog.ts +100 -0
  81. package/src/Sprinkle/type-guards.ts +51 -0
  82. package/src/Sprinkle/types.ts +73 -0
  83. package/src/Sprinkle/wallet.ts +133 -0
@@ -0,0 +1,125 @@
1
+ import type { TExact } from "./types.js";
2
+ /**
3
+ * Network selection schema (mainnet, preview, preprod).
4
+ */
5
+ export declare const NetworkSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"mainnet">, import("@sinclair/typebox").TLiteral<"preview">, import("@sinclair/typebox").TLiteral<"preprod">]>;
6
+ /**
7
+ * Recursive multisig script module for Cardano native scripts.
8
+ */
9
+ export declare const MultisigScriptModule: import("@sinclair/typebox").TModule<{
10
+ MultisigScript: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
11
+ Signature: import("@sinclair/typebox").TObject<{
12
+ key_hash: import("@sinclair/typebox").TString;
13
+ }>;
14
+ }>, import("@sinclair/typebox").TObject<{
15
+ AllOf: import("@sinclair/typebox").TObject<{
16
+ scripts: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TRef<"MultisigScript">>;
17
+ }>;
18
+ }>, import("@sinclair/typebox").TObject<{
19
+ AnyOf: import("@sinclair/typebox").TObject<{
20
+ scripts: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TRef<"MultisigScript">>;
21
+ }>;
22
+ }>, import("@sinclair/typebox").TObject<{
23
+ AtLeast: import("@sinclair/typebox").TObject<{
24
+ required: import("@sinclair/typebox").TBigInt;
25
+ scripts: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TRef<"MultisigScript">>;
26
+ }>;
27
+ }>, import("@sinclair/typebox").TObject<{
28
+ Before: import("@sinclair/typebox").TObject<{
29
+ time: import("@sinclair/typebox").TBigInt;
30
+ }>;
31
+ }>, import("@sinclair/typebox").TObject<{
32
+ After: import("@sinclair/typebox").TObject<{
33
+ time: import("@sinclair/typebox").TBigInt;
34
+ }>;
35
+ }>, import("@sinclair/typebox").TObject<{
36
+ Script: import("@sinclair/typebox").TObject<{
37
+ script_hash: import("@sinclair/typebox").TString;
38
+ }>;
39
+ }>]>;
40
+ }, {
41
+ MultisigScript: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
42
+ Signature: import("@sinclair/typebox").TObject<{
43
+ key_hash: import("@sinclair/typebox").TString;
44
+ }>;
45
+ }>, import("@sinclair/typebox").TObject<{
46
+ AllOf: import("@sinclair/typebox").TObject<{
47
+ scripts: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TRef<"MultisigScript">>;
48
+ }>;
49
+ }>, import("@sinclair/typebox").TObject<{
50
+ AnyOf: import("@sinclair/typebox").TObject<{
51
+ scripts: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TRef<"MultisigScript">>;
52
+ }>;
53
+ }>, import("@sinclair/typebox").TObject<{
54
+ AtLeast: import("@sinclair/typebox").TObject<{
55
+ required: import("@sinclair/typebox").TBigInt;
56
+ scripts: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TRef<"MultisigScript">>;
57
+ }>;
58
+ }>, import("@sinclair/typebox").TObject<{
59
+ Before: import("@sinclair/typebox").TObject<{
60
+ time: import("@sinclair/typebox").TBigInt;
61
+ }>;
62
+ }>, import("@sinclair/typebox").TObject<{
63
+ After: import("@sinclair/typebox").TObject<{
64
+ time: import("@sinclair/typebox").TBigInt;
65
+ }>;
66
+ }>, import("@sinclair/typebox").TObject<{
67
+ Script: import("@sinclair/typebox").TObject<{
68
+ script_hash: import("@sinclair/typebox").TString;
69
+ }>;
70
+ }>]>;
71
+ }>;
72
+ export declare const MultisigScript: import("@sinclair/typebox").TImport<{
73
+ MultisigScript: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
74
+ Signature: import("@sinclair/typebox").TObject<{
75
+ key_hash: import("@sinclair/typebox").TString;
76
+ }>;
77
+ }>, import("@sinclair/typebox").TObject<{
78
+ AllOf: import("@sinclair/typebox").TObject<{
79
+ scripts: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TRef<"MultisigScript">>;
80
+ }>;
81
+ }>, import("@sinclair/typebox").TObject<{
82
+ AnyOf: import("@sinclair/typebox").TObject<{
83
+ scripts: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TRef<"MultisigScript">>;
84
+ }>;
85
+ }>, import("@sinclair/typebox").TObject<{
86
+ AtLeast: import("@sinclair/typebox").TObject<{
87
+ required: import("@sinclair/typebox").TBigInt;
88
+ scripts: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TRef<"MultisigScript">>;
89
+ }>;
90
+ }>, import("@sinclair/typebox").TObject<{
91
+ Before: import("@sinclair/typebox").TObject<{
92
+ time: import("@sinclair/typebox").TBigInt;
93
+ }>;
94
+ }>, import("@sinclair/typebox").TObject<{
95
+ After: import("@sinclair/typebox").TObject<{
96
+ time: import("@sinclair/typebox").TBigInt;
97
+ }>;
98
+ }>, import("@sinclair/typebox").TObject<{
99
+ Script: import("@sinclair/typebox").TObject<{
100
+ script_hash: import("@sinclair/typebox").TString;
101
+ }>;
102
+ }>]>;
103
+ }, "MultisigScript">;
104
+ export type TMultisigScript = TExact<typeof MultisigScript>;
105
+ /**
106
+ * Provider settings schema for blockchain data providers.
107
+ */
108
+ export declare const ProviderSettingsSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
109
+ type: import("@sinclair/typebox").TLiteral<"blockfrost">;
110
+ projectId: import("@sinclair/typebox").TString;
111
+ }>, import("@sinclair/typebox").TObject<{
112
+ type: import("@sinclair/typebox").TLiteral<"maestro">;
113
+ apiKey: import("@sinclair/typebox").TString;
114
+ }>]>;
115
+ /**
116
+ * Wallet settings schema for hot and cold wallets.
117
+ */
118
+ export declare const WalletSettingsSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
119
+ type: import("@sinclair/typebox").TLiteral<"hot">;
120
+ privateKey: import("@sinclair/typebox").TString;
121
+ }>, import("@sinclair/typebox").TObject<{
122
+ type: import("@sinclair/typebox").TLiteral<"cold">;
123
+ address: import("@sinclair/typebox").TString;
124
+ }>]>;
125
+ //# sourceMappingURL=schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/Sprinkle/schemas.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEzC;;GAEG;AACH,eAAO,MAAM,aAAa,yLAIxB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4D/B,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAAgD,CAAC;AAC5E,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;IASjC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;;IAa/B,CAAC"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Transaction dialog helper utilities.
3
+ * Functions for working with transaction signatures and display.
4
+ */
5
+ import { Core, HotWallet } from "@blaze-cardano/sdk";
6
+ /**
7
+ * Get the payment key hash from a HotWallet's first address.
8
+ */
9
+ export declare function getWalletPaymentKeyHash(wallet: HotWallet): Promise<string | null>;
10
+ /**
11
+ * Count the number of vkey signatures in a transaction's witness set.
12
+ */
13
+ export declare function countSignatures(tx: Core.Transaction): number;
14
+ /**
15
+ * Check if a specific public key has already signed the transaction.
16
+ * Compares by vkey (public key bytes).
17
+ */
18
+ export declare function hasVkeySigned(tx: Core.Transaction, vkeyHex: string): boolean;
19
+ /**
20
+ * Get the list of required signer key hashes from the transaction body.
21
+ */
22
+ export declare function getRequiredSigners(tx: Core.Transaction): string[];
23
+ /**
24
+ * Compute the transaction body hash for display.
25
+ */
26
+ export declare function getTxBodyHash(tx: Core.Transaction): string;
27
+ /**
28
+ * Format a hash for display: first 8 chars + ... + last 8 chars.
29
+ */
30
+ export declare function formatHash(hash: string): string;
31
+ /**
32
+ * Merge signatures from source transaction into target transaction.
33
+ * Prevents duplicate signatures by comparing vkey (public key).
34
+ * Returns the count of newly added signatures.
35
+ */
36
+ export declare function mergeSignatures(target: Core.Transaction, source: Core.Transaction): number;
37
+ //# sourceMappingURL=tx-dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tx-dialog.d.ts","sourceRoot":"","sources":["../../../src/Sprinkle/tx-dialog.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAGrD;;GAEG;AACH,wBAAsB,uBAAuB,CAC3C,MAAM,EAAE,SAAS,GAChB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAUxB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,IAAI,CAAC,WAAW,GAAG,MAAM,CAG5D;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,EAAE,EAAE,IAAI,CAAC,WAAW,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAK5E;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,IAAI,CAAC,WAAW,GAAG,MAAM,EAAE,CAIjE;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAAE,EAAE,IAAI,CAAC,WAAW,GAAG,MAAM,CAG1D;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAG/C;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,IAAI,CAAC,WAAW,EACxB,MAAM,EAAE,IAAI,CAAC,WAAW,GACvB,MAAM,CAsBR"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Type guard utilities for TypeBox schema types.
3
+ * These are internal helpers used by FillInStruct, encryption, and other modules.
4
+ */
5
+ import { type TBigInt, type TLiteral, type TObject, type TSchema, type TString, type TTuple, type TUnion, type TArray, type TThis, type TRef, type TImport, type TOptional } from "@sinclair/typebox";
6
+ export declare const isOptional: <T extends TSchema>(t: T) => t is TOptional<T>;
7
+ export declare const isImport: (t: TSchema) => t is TImport;
8
+ export declare const isArray: (t: TSchema) => t is TArray;
9
+ export declare const isBigInt: (t: TSchema) => t is TBigInt;
10
+ export declare const isLiteral: (t: TSchema) => t is TLiteral;
11
+ export declare const isObject: (t: TSchema) => t is TObject;
12
+ export declare const isRef: (t: TSchema) => t is TRef;
13
+ export declare const isString: (t: TSchema) => t is TString;
14
+ export declare const isThis: (t: TSchema) => t is TThis;
15
+ export declare const isTuple: (t: TSchema) => t is TTuple;
16
+ export declare const isUnion: (t: TSchema) => t is TUnion;
17
+ /**
18
+ * Check if a schema field is marked as sensitive.
19
+ * Sensitive fields are encrypted when saved and masked when displayed.
20
+ */
21
+ export declare const isSensitive: (t: TSchema) => boolean;
22
+ //# sourceMappingURL=type-guards.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type-guards.d.ts","sourceRoot":"","sources":["../../../src/Sprinkle/type-guards.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEL,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,MAAM,EACX,KAAK,MAAM,EACX,KAAK,MAAM,EACX,KAAK,KAAK,EACV,KAAK,IAAI,EACT,KAAK,OAAO,EACZ,KAAK,SAAS,EAEf,MAAM,mBAAmB,CAAC;AAE3B,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,OAAO,EAAE,GAAG,CAAC,KAAG,CAAC,IAAI,SAAS,CAAC,CAAC,CACrC,CAAC;AAEjC,eAAO,MAAM,QAAQ,GAAI,GAAG,OAAO,KAAG,CAAC,IAAI,OAA+B,CAAC;AAE3E,eAAO,MAAM,OAAO,GAAI,GAAG,OAAO,KAAG,CAAC,IAAI,MAA6B,CAAC;AAExE,eAAO,MAAM,QAAQ,GAAI,GAAG,OAAO,KAAG,CAAC,IAAI,OAA+B,CAAC;AAE3E,eAAO,MAAM,SAAS,GAAI,GAAG,OAAO,KAAG,CAAC,IAAI,QAAiC,CAAC;AAE9E,eAAO,MAAM,QAAQ,GAAI,GAAG,OAAO,KAAG,CAAC,IAAI,OAA+B,CAAC;AAE3E,eAAO,MAAM,KAAK,GAAI,GAAG,OAAO,KAAG,CAAC,IAAI,IAAyB,CAAC;AAElE,eAAO,MAAM,QAAQ,GAAI,GAAG,OAAO,KAAG,CAAC,IAAI,OAA+B,CAAC;AAE3E,eAAO,MAAM,MAAM,GAAI,GAAG,OAAO,KAAG,CAAC,IAAI,KAA2B,CAAC;AAErE,eAAO,MAAM,OAAO,GAAI,GAAG,OAAO,KAAG,CAAC,IAAI,MAA6B,CAAC;AAExE,eAAO,MAAM,OAAO,GAAI,GAAG,OAAO,KAAG,CAAC,IAAI,MAA6B,CAAC;AAExE;;;GAGG;AACH,eAAO,MAAM,WAAW,GAAI,GAAG,OAAO,KAAG,OACJ,CAAC"}
@@ -0,0 +1,62 @@
1
+ import { Core } from "@blaze-cardano/sdk";
2
+ import type { Static, TSchema } from "@sinclair/typebox";
3
+ /**
4
+ * Utility type to extract the static type from a TypeBox schema.
5
+ */
6
+ export type TExact<T> = T extends TSchema ? Static<T> : T;
7
+ /**
8
+ * Options for encrypting/decrypting sensitive fields in settings.
9
+ */
10
+ export interface IEncryptionOptions {
11
+ encrypt: (plaintext: string) => string;
12
+ decrypt: (ciphertext: string) => Promise<string>;
13
+ }
14
+ /**
15
+ * Options for configuring a Sprinkle instance.
16
+ */
17
+ export interface ISprinkleOptions {
18
+ encryption?: IEncryptionOptions;
19
+ }
20
+ /**
21
+ * Metadata for a profile.
22
+ */
23
+ export interface IProfileMeta {
24
+ name: string;
25
+ description?: string;
26
+ createdAt: string;
27
+ updatedAt: string;
28
+ }
29
+ /**
30
+ * Current profile information including ID.
31
+ */
32
+ export interface ICurrentProfile extends IProfileMeta {
33
+ id: string;
34
+ }
35
+ /**
36
+ * Profile entry as returned by scanProfiles().
37
+ */
38
+ export interface IProfileEntry {
39
+ id: string;
40
+ meta: IProfileMeta;
41
+ }
42
+ /**
43
+ * Result of the TxDialog interaction.
44
+ */
45
+ export interface TxDialogResult {
46
+ action: "submitted" | "signed" | "cancelled";
47
+ txId?: string;
48
+ tx: Core.Transaction;
49
+ }
50
+ /**
51
+ * Options for TxDialog.
52
+ */
53
+ export interface TxDialogOptions {
54
+ beforeSign?: () => Promise<void>;
55
+ }
56
+ /**
57
+ * Error thrown when user cancels a prompt via Escape key.
58
+ */
59
+ export declare class UserCancelledError extends Error {
60
+ constructor(message?: string);
61
+ }
62
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/Sprinkle/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEzD;;GAEG;AACH,MAAM,MAAM,MAAM,CAAC,CAAC,IAAI,CAAC,SAAS,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,CAAC;IACvC,OAAO,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;CAClD;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,UAAU,CAAC,EAAE,kBAAkB,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,eAAgB,SAAQ,YAAY;IACnD,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,YAAY,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,WAAW,GAAG,QAAQ,GAAG,WAAW,CAAC;IAC7C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,UAAU,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAClC;AAED;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,KAAK;gBAC/B,OAAO,GAAE,MAAuC;CAI7D"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Wallet and provider setup utilities.
3
+ * Functions for creating providers, wallets, and Blaze instances.
4
+ */
5
+ import { type Provider } from "@blaze-cardano/query";
6
+ import { Blaze, type Wallet } from "@blaze-cardano/sdk";
7
+ import { type TExact } from "./types.js";
8
+ import { NetworkSchema, ProviderSettingsSchema, WalletSettingsSchema } from "./schemas.js";
9
+ /**
10
+ * Creates a blockchain data provider based on settings.
11
+ */
12
+ export declare function GetProvider(network: TExact<typeof NetworkSchema>, settings: TExact<typeof ProviderSettingsSchema>): Promise<Provider>;
13
+ /**
14
+ * Creates a wallet instance based on settings.
15
+ */
16
+ export declare function GetWallet(settings: TExact<typeof WalletSettingsSchema>, provider: Provider): Promise<Wallet>;
17
+ /**
18
+ * Creates a Blaze instance with provider and wallet.
19
+ */
20
+ export declare function GetBlaze(network: TExact<typeof NetworkSchema>, providerSettings: TExact<typeof ProviderSettingsSchema>, walletSettings: TExact<typeof WalletSettingsSchema>): Promise<Blaze<Provider, Wallet>>;
21
+ /**
22
+ * Generates a new wallet from a BIP39 mnemonic phrase.
23
+ * Displays the 24-word recovery phrase and requires user confirmation.
24
+ * @returns The Bip32PrivateKey hex string for storage
25
+ */
26
+ export declare function generateWalletFromMnemonic(): Promise<string>;
27
+ //# sourceMappingURL=wallet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../../../src/Sprinkle/wallet.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAc,KAAK,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EACL,KAAK,EAIL,KAAK,MAAM,EACZ,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAsB,KAAK,MAAM,EAAE,MAAM,YAAY,CAAC;AAC7D,OAAO,EACL,aAAa,EACb,sBAAsB,EACtB,oBAAoB,EACrB,MAAM,cAAc,CAAC;AAEtB;;GAEG;AACH,wBAAsB,WAAW,CAC/B,OAAO,EAAE,MAAM,CAAC,OAAO,aAAa,CAAC,EACrC,QAAQ,EAAE,MAAM,CAAC,OAAO,sBAAsB,CAAC,GAC9C,OAAO,CAAC,QAAQ,CAAC,CAsBnB;AAED;;GAEG;AACH,wBAAsB,SAAS,CAC7B,QAAQ,EAAE,MAAM,CAAC,OAAO,oBAAoB,CAAC,EAC7C,QAAQ,EAAE,QAAQ,GACjB,OAAO,CAAC,MAAM,CAAC,CAiBjB;AAED;;GAEG;AACH,wBAAsB,QAAQ,CAC5B,OAAO,EAAE,MAAM,CAAC,OAAO,aAAa,CAAC,EACrC,gBAAgB,EAAE,MAAM,CAAC,OAAO,sBAAsB,CAAC,EACvD,cAAc,EAAE,MAAM,CAAC,OAAO,oBAAoB,CAAC,GAClD,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAIlC;AAED;;;;GAIG;AACH,wBAAsB,0BAA0B,IAAI,OAAO,CAAC,MAAM,CAAC,CAqClE"}