@cheqd/sdk 5.3.2 → 5.3.3-develop.2

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 (112) hide show
  1. package/README.md +310 -0
  2. package/build/cjs/index.d.ts +92 -1
  3. package/build/cjs/index.d.ts.map +1 -1
  4. package/build/cjs/index.js +75 -2
  5. package/build/cjs/index.js.map +1 -1
  6. package/build/cjs/modules/_.d.ts +61 -0
  7. package/build/cjs/modules/_.d.ts.map +1 -1
  8. package/build/cjs/modules/_.js +50 -0
  9. package/build/cjs/modules/_.js.map +1 -1
  10. package/build/cjs/modules/did.d.ts +278 -0
  11. package/build/cjs/modules/did.d.ts.map +1 -1
  12. package/build/cjs/modules/did.js +242 -0
  13. package/build/cjs/modules/did.js.map +1 -1
  14. package/build/cjs/modules/feeabstraction.d.ts +297 -2
  15. package/build/cjs/modules/feeabstraction.d.ts.map +1 -1
  16. package/build/cjs/modules/feeabstraction.js +235 -4
  17. package/build/cjs/modules/feeabstraction.js.map +1 -1
  18. package/build/cjs/modules/feemarket.d.ts +154 -21
  19. package/build/cjs/modules/feemarket.d.ts.map +1 -1
  20. package/build/cjs/modules/feemarket.js +133 -22
  21. package/build/cjs/modules/feemarket.js.map +1 -1
  22. package/build/cjs/modules/resource.d.ts +143 -0
  23. package/build/cjs/modules/resource.d.ts.map +1 -1
  24. package/build/cjs/modules/resource.js +131 -0
  25. package/build/cjs/modules/resource.js.map +1 -1
  26. package/build/cjs/querier.d.ts +50 -0
  27. package/build/cjs/querier.d.ts.map +1 -1
  28. package/build/cjs/querier.js +50 -0
  29. package/build/cjs/querier.js.map +1 -1
  30. package/build/cjs/registry.d.ts +14 -0
  31. package/build/cjs/registry.d.ts.map +1 -1
  32. package/build/cjs/registry.js +14 -0
  33. package/build/cjs/registry.js.map +1 -1
  34. package/build/cjs/signer.d.ts +172 -1
  35. package/build/cjs/signer.d.ts.map +1 -1
  36. package/build/cjs/signer.js +172 -1
  37. package/build/cjs/signer.js.map +1 -1
  38. package/build/cjs/types.d.ts +91 -0
  39. package/build/cjs/types.d.ts.map +1 -1
  40. package/build/cjs/types.js +17 -0
  41. package/build/cjs/types.js.map +1 -1
  42. package/build/cjs/utils.d.ts +191 -3
  43. package/build/cjs/utils.d.ts.map +1 -1
  44. package/build/cjs/utils.js +196 -0
  45. package/build/cjs/utils.js.map +1 -1
  46. package/build/esm/index.d.ts +92 -1
  47. package/build/esm/index.d.ts.map +1 -1
  48. package/build/esm/index.js +74 -1
  49. package/build/esm/index.js.map +1 -1
  50. package/build/esm/modules/_.d.ts +42 -0
  51. package/build/esm/modules/_.d.ts.map +1 -1
  52. package/build/esm/modules/_.js +32 -0
  53. package/build/esm/modules/_.js.map +1 -1
  54. package/build/esm/modules/did.d.ts +274 -0
  55. package/build/esm/modules/did.d.ts.map +1 -1
  56. package/build/esm/modules/did.js +242 -0
  57. package/build/esm/modules/did.js.map +1 -1
  58. package/build/esm/modules/feeabstraction.d.ts +277 -2
  59. package/build/esm/modules/feeabstraction.d.ts.map +1 -1
  60. package/build/esm/modules/feeabstraction.js +221 -2
  61. package/build/esm/modules/feeabstraction.js.map +1 -1
  62. package/build/esm/modules/feemarket.d.ts +152 -21
  63. package/build/esm/modules/feemarket.d.ts.map +1 -1
  64. package/build/esm/modules/feemarket.js +131 -21
  65. package/build/esm/modules/feemarket.js.map +1 -1
  66. package/build/esm/modules/resource.d.ts +142 -0
  67. package/build/esm/modules/resource.d.ts.map +1 -1
  68. package/build/esm/modules/resource.js +130 -0
  69. package/build/esm/modules/resource.js.map +1 -1
  70. package/build/esm/querier.d.ts +50 -0
  71. package/build/esm/querier.d.ts.map +1 -1
  72. package/build/esm/querier.js +50 -0
  73. package/build/esm/querier.js.map +1 -1
  74. package/build/esm/registry.d.ts +14 -0
  75. package/build/esm/registry.d.ts.map +1 -1
  76. package/build/esm/registry.js +14 -0
  77. package/build/esm/registry.js.map +1 -1
  78. package/build/esm/signer.d.ts +122 -0
  79. package/build/esm/signer.d.ts.map +1 -1
  80. package/build/esm/signer.js +122 -0
  81. package/build/esm/signer.js.map +1 -1
  82. package/build/esm/types.d.ts +92 -0
  83. package/build/esm/types.d.ts.map +1 -1
  84. package/build/esm/types.js +17 -0
  85. package/build/esm/types.js.map +1 -1
  86. package/build/esm/utils.d.ts +181 -3
  87. package/build/esm/utils.d.ts.map +1 -1
  88. package/build/esm/utils.js +172 -0
  89. package/build/esm/utils.js.map +1 -1
  90. package/build/types/index.d.ts +92 -1
  91. package/build/types/index.d.ts.map +1 -1
  92. package/build/types/modules/_.d.ts +42 -0
  93. package/build/types/modules/_.d.ts.map +1 -1
  94. package/build/types/modules/did.d.ts +274 -0
  95. package/build/types/modules/did.d.ts.map +1 -1
  96. package/build/types/modules/feeabstraction.d.ts +277 -2
  97. package/build/types/modules/feeabstraction.d.ts.map +1 -1
  98. package/build/types/modules/feemarket.d.ts +152 -21
  99. package/build/types/modules/feemarket.d.ts.map +1 -1
  100. package/build/types/modules/resource.d.ts +142 -0
  101. package/build/types/modules/resource.d.ts.map +1 -1
  102. package/build/types/querier.d.ts +50 -0
  103. package/build/types/querier.d.ts.map +1 -1
  104. package/build/types/registry.d.ts +14 -0
  105. package/build/types/registry.d.ts.map +1 -1
  106. package/build/types/signer.d.ts +122 -0
  107. package/build/types/signer.d.ts.map +1 -1
  108. package/build/types/types.d.ts +92 -0
  109. package/build/types/types.d.ts.map +1 -1
  110. package/build/types/utils.d.ts +181 -3
  111. package/build/types/utils.d.ts.map +1 -1
  112. package/package.json +4 -4
@@ -5,47 +5,119 @@ import { AbstractCheqdSDKModule, MinimalImportableCheqdSDKModule } from './_.js'
5
5
  import { DidStdFee, IContext, QueryExtensionSetup } from '../types.js';
6
6
  import { CheqdQuerier } from '../querier.js';
7
7
  import { CheqdSigningStargateClient } from '../signer.js';
8
+ /** Default extension key for fee market-related query operations */
8
9
  export declare const defaultFeemarketExtensionKey: "feemarket";
10
+ /**
11
+ * Protobuf message type literals for fee market operations.
12
+ * Used for consistent message type identification across the module.
13
+ */
9
14
  export declare const protobufLiterals: {
15
+ /** Gas price response message type */
10
16
  readonly GasPriceResponse: "GasPriceResponse";
17
+ /** Gas prices response message type */
11
18
  readonly GasPricesResponse: "GasPricesResponse";
19
+ /** Parameters response message type */
12
20
  readonly ParamsResponse: "ParamsResponse";
13
21
  };
22
+ /** Type URL for GasPriceResponse messages */
14
23
  export declare const typeUrlGasPriceResponse: "/feemarket.feemarket.v1.GasPriceResponse";
24
+ /** Type URL for GasPricesResponse messages */
15
25
  export declare const typeUrlGasPricesResponse: "/feemarket.feemarket.v1.GasPricesResponse";
26
+ /** Type URL for ParamsResponse messages */
16
27
  export declare const typeUrlParamsResponse: "/feemarket.feemarket.v1.ParamsResponse";
28
+ /**
29
+ * Default gas price tier names for fee calculation.
30
+ * Provides predefined tiers for different transaction priority levels.
31
+ */
17
32
  export declare const defaultGasPriceTiers: {
33
+ /** Low priority tier with lowest gas prices */
18
34
  readonly Low: "DefaultLowTier";
35
+ /** Average priority tier with moderate gas prices */
19
36
  readonly Avg: "DefaultAvgTier";
37
+ /** High priority tier with highest gas prices */
20
38
  readonly High: "DefaultHighTier";
21
39
  };
40
+ /** Type representing the available default gas price tiers */
22
41
  export type DefaultGasPriceTiers = (typeof defaultGasPriceTiers)[keyof typeof defaultGasPriceTiers];
42
+ /**
43
+ * Encode object interface for GasPriceResponse messages.
44
+ * Used for type-safe message encoding in gas price operations.
45
+ */
23
46
  export interface GasPriceEncodeObject extends EncodeObject {
24
47
  readonly typeUrl: typeof typeUrlGasPriceResponse;
25
48
  readonly value: Partial<GasPriceResponse>;
26
49
  }
50
+ /**
51
+ * Type guard function to check if an object is a GasPriceEncodeObject.
52
+ *
53
+ * @param obj - EncodeObject to check
54
+ * @returns True if the object is a GasPriceEncodeObject
55
+ */
27
56
  export declare function isGasPriceEncodeObject(obj: EncodeObject): obj is GasPriceEncodeObject;
57
+ /**
58
+ * Encode object interface for GasPricesResponse messages.
59
+ * Used for type-safe message encoding in gas prices query operations.
60
+ */
28
61
  export interface GasPricesEncodeObject extends EncodeObject {
29
62
  readonly typeUrl: typeof typeUrlGasPricesResponse;
30
63
  readonly value: Partial<GasPricesResponse>;
31
64
  }
65
+ /**
66
+ * Type guard function to check if an object is a GasPricesEncodeObject.
67
+ *
68
+ * @param obj - EncodeObject to check
69
+ * @returns True if the object is a GasPricesEncodeObject
70
+ */
32
71
  export declare function isGasPricesEncodeObject(obj: EncodeObject): obj is GasPricesEncodeObject;
72
+ /**
73
+ * Encode object interface for ParamsResponse messages.
74
+ * Used for type-safe message encoding in fee market parameters operations.
75
+ */
33
76
  export interface ParamsEncodeObject extends EncodeObject {
34
77
  readonly typeUrl: typeof typeUrlParamsResponse;
35
78
  readonly value: Partial<ParamsResponse>;
36
79
  }
80
+ /**
81
+ * Type guard function to check if an object is a ParamsEncodeObject.
82
+ *
83
+ * @param obj - EncodeObject to check
84
+ * @returns True if the object is a ParamsEncodeObject
85
+ */
37
86
  export declare function isParamsEncodeObject(obj: EncodeObject): obj is ParamsEncodeObject;
87
+ /** Minimal importable version of the fee market module for clean external interfaces */
38
88
  export type MinimalImportableFeemarketModule = MinimalImportableCheqdSDKModule<FeemarketModule>;
89
+ /**
90
+ * Fee market extension interface for querier functionality.
91
+ * Provides methods for querying gas prices and fee market parameters.
92
+ */
39
93
  export type FeemarketExtension = {
40
94
  readonly [defaultFeemarketExtensionKey]: {
95
+ /** Query gas price for a specific denomination */
41
96
  readonly gasPrice: (denom: string) => Promise<GasPriceResponse>;
97
+ /** Query all available gas prices */
42
98
  readonly gasPrices: () => Promise<GasPricesResponse>;
99
+ /** Query fee market module parameters */
43
100
  readonly params: () => Promise<ParamsResponse>;
44
101
  };
45
102
  };
103
+ /**
104
+ * Sets up the fee market extension for the querier client.
105
+ * Creates and configures the fee market-specific query methods.
106
+ *
107
+ * @param base - Base QueryClient to extend
108
+ * @returns Configured fee market extension with query methods
109
+ */
46
110
  export declare const setupFeemarketExtension: (base: QueryClient) => FeemarketExtension;
111
+ /**
112
+ * Fee Market Module class providing comprehensive fee market functionality.
113
+ * Handles gas price queries, dynamic fee calculation, and fee market parameter management.
114
+ */
47
115
  export declare class FeemarketModule extends AbstractCheqdSDKModule {
48
116
  static readonly registryTypes: Iterable<[string, GeneratedType]>;
117
+ /**
118
+ * Default gas prices for different priority tiers.
119
+ * Used as fallback when live gas price queries are unavailable.
120
+ */
49
121
  static readonly defaultGasPrices: {
50
122
  readonly DefaultLowTier: {
51
123
  readonly amount: "5000";
@@ -60,51 +132,110 @@ export declare class FeemarketModule extends AbstractCheqdSDKModule {
60
132
  readonly denom: "ncheq";
61
133
  };
62
134
  };
135
+ /** Gas offset factor used for adjusting live gas prices */
63
136
  static readonly gasOffsetFactor: number;
137
+ /** Address of the fee collector account that receives transaction fees */
64
138
  static readonly feeCollectorAddress: "cheqd13pxn9n3qw79e03844rdadagmg0nshmwfszqu0g";
139
+ /** Address of the fee market module account */
65
140
  static readonly moduleAccountAddress: "cheqd1el68mjnzv87uurqks8u29tec0cj3297047g2dl";
141
+ /** Querier extension setup function for fee market operations */
66
142
  static readonly querierExtensionSetup: QueryExtensionSetup<FeemarketExtension>;
143
+ /** Querier instance with fee market extension capabilities */
67
144
  querier: CheqdQuerier & FeemarketExtension;
145
+ /**
146
+ * Constructs a new fee market module instance.
147
+ *
148
+ * @param signer - Signing client for blockchain transactions
149
+ * @param querier - Querier client with fee market extension for data retrieval
150
+ */
68
151
  constructor(signer: CheqdSigningStargateClient, querier: CheqdQuerier & FeemarketExtension);
152
+ /**
153
+ * Gets the registry types for fee market message encoding/decoding.
154
+ *
155
+ * @returns Iterable of [typeUrl, GeneratedType] pairs for the registry
156
+ */
69
157
  getRegistryTypes(): Iterable<[string, GeneratedType]>;
158
+ /**
159
+ * Gets the querier extension setup for fee market operations.
160
+ *
161
+ * @returns Query extension setup function for fee market functionality
162
+ */
70
163
  getQuerierExtensionSetup(): QueryExtensionSetup<FeemarketExtension>;
164
+ /**
165
+ * Queries the current gas price for a specific denomination.
166
+ * Retrieves live gas price data from the fee market module.
167
+ *
168
+ * @param denom - Token denomination to query gas price for
169
+ * @param context - Optional SDK context for accessing clients
170
+ * @returns Promise resolving to the gas price response
171
+ */
71
172
  queryGasPrice(denom: string, context?: IContext): Promise<GasPriceResponse>;
173
+ /**
174
+ * Queries all available gas prices from the fee market.
175
+ * Retrieves comprehensive gas pricing information for all denominations.
176
+ *
177
+ * @param context - Optional SDK context for accessing clients
178
+ * @returns Promise resolving to the gas prices response
179
+ */
72
180
  queryGasPrices(context?: IContext): Promise<GasPricesResponse>;
181
+ /**
182
+ * Queries the fee market module parameters.
183
+ * Retrieves configuration settings for the fee market functionality.
184
+ *
185
+ * @param context - Optional SDK context for accessing clients
186
+ * @returns Promise resolving to the parameters response
187
+ */
73
188
  queryParams(context?: IContext): Promise<ParamsResponse>;
74
189
  /**
75
- * Generate gas price by denom by live polling. If live poll fails, the error is bubbled up.
76
- * @param denom
77
- * @returns GasPrice
190
+ * Generates gas price for a denomination by live polling the fee market.
191
+ * Queries current gas prices and adjusts them using the gas offset factor.
192
+ * Throws an error if live polling fails.
193
+ *
194
+ * @param denom - Token denomination to generate gas price for
195
+ * @param context - Optional SDK context for accessing clients
196
+ * @returns Promise resolving to the calculated gas price
197
+ * @throws Error if live poll for gas price fails or returns invalid data
78
198
  */
79
199
  generateGasPrice(denom: string, context?: IContext): Promise<GasPrice>;
80
200
  /**
81
- * Generate offline gas price by denom by static tier.
82
- * @param denom
83
- * @param tier
84
- * @returns GasPrice
201
+ * Generates offline gas price for a denomination using static tier pricing.
202
+ * Uses predefined gas prices as fallback when live polling is unavailable.
203
+ *
204
+ * @param denom - Token denomination to generate gas price for
205
+ * @param tier - Priority tier for gas price calculation (defaults to Low)
206
+ * @returns Promise resolving to the static gas price
207
+ * @throws Error if denomination or tier is invalid
85
208
  */
86
209
  generateOfflineGasPrice(denom: string, tier?: DefaultGasPriceTiers): Promise<GasPrice>;
87
210
  /**
88
- * Generate safe gas price by denom by live polling with fallback to offline gas price. If live poll fails, the error is caught and offline gas price is generated.
89
- * @param denom
90
- * @param tier
91
- * @returns GasPrice
211
+ * Generates safe gas price with automatic fallback to offline pricing.
212
+ * Attempts live polling first, falls back to static tier pricing if it fails.
213
+ *
214
+ * @param denom - Token denomination to generate gas price for
215
+ * @param tier - Priority tier for fallback gas price calculation (defaults to Low)
216
+ * @param context - Optional SDK context for accessing clients
217
+ * @returns Promise resolving to the gas price (live or fallback)
92
218
  */
93
219
  generateSafeGasPrice(denom: string, tier?: DefaultGasPriceTiers, context?: IContext): Promise<GasPrice>;
94
220
  /**
95
- * Generate safe gas price by denom by live polling with exponential backoff to offline gas price.
96
- * @param denom
97
- * @param tier
98
- * @param backoffOptions
99
- * @returns GasPrice
221
+ * Generates safe gas price with exponential backoff retry mechanism.
222
+ * Retries live polling with exponential backoff before falling back to offline pricing.
223
+ *
224
+ * @param denom - Token denomination to generate gas price for
225
+ * @param tier - Priority tier for fallback gas price calculation (defaults to Low)
226
+ * @param backoffOptions - Retry configuration options (defaults to DefaultBackoffOptions)
227
+ * @param context - Optional SDK context for accessing clients
228
+ * @returns Promise resolving to the gas price (live with retries or fallback)
100
229
  */
101
230
  generateSafeGasPriceWithExponentialBackoff(denom: string, tier?: DefaultGasPriceTiers, backoffOptions?: Partial<import("exponential-backoff").IBackOffOptions>, context?: IContext): Promise<GasPrice>;
102
231
  /**
103
- * Generate fees from gas price. Use with live polling for gas price.
104
- * @param gasPrice
105
- * @param payer
106
- * @param gas
107
- * @returns DidStdFee
232
+ * Generates transaction fees from a given gas price.
233
+ * Calculates the total fee amount based on gas price and gas limit.
234
+ *
235
+ * @param gasPrice - Gas price to use for fee calculation
236
+ * @param payer - Address of the account paying the transaction fees
237
+ * @param gas - Gas limit for the transaction (defaults to '200000')
238
+ * @returns Standard fee configuration for the transaction
108
239
  */
109
240
  static generateFeesFromGasPrice(gasPrice: GasPrice, payer: string, gas?: string): DidStdFee;
110
241
  }
@@ -1 +1 @@
1
- {"version":3,"file":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uBAAuB,CAC5B,KAAK,EAAE,MAAM,EACb,IAAI,GAAE,oBAA+C,GACnD,OAAO,CAAC,QAAQ,CAAC;IAepB;;;;;;;;OAQG;IACG,oBAAoB,CACzB,KAAK,EAAE,MAAM,EACb,IAAI,GAAE,oBAA+C,EACrD,OAAO,CAAC,EAAE,QAAQ,GAChB,OAAO,CAAC,QAAQ,CAAC;IAYpB;;;;;;;;;OASG;IACG,0CAA0C,CAC/C,KAAK,EAAE,MAAM,EACb,IAAI,GAAE,oBAA+C,EACrD,cAAc,yDAAwB,EACtC,OAAO,CAAC,EAAE,QAAQ,GAChB,OAAO,CAAC,QAAQ,CAAC;IAapB;;;;;;;;OAQG;IACH,MAAM,CAAC,wBAAwB,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,SAAW,GAAG,SAAS;CAO7F"}
@@ -6,57 +6,199 @@ import { Metadata, MsgCreateResource, MsgCreateResourcePayload, QueryCollectionR
6
6
  import { DeliverTxResponse, QueryClient } from '@cosmjs/stargate';
7
7
  import { SignInfo } from '@cheqd/ts-proto/cheqd/did/v2/index.js';
8
8
  import { CheqdQuerier } from '../querier.js';
9
+ /** Default extension key for resource-related query operations */
9
10
  export declare const defaultResourceExtensionKey: "resource";
11
+ /**
12
+ * Protobuf message type literals for resource operations.
13
+ * Used for consistent message type identification across the module.
14
+ */
10
15
  export declare const protobufLiterals: {
16
+ /** Create resource message type */
11
17
  readonly MsgCreateResource: "MsgCreateResource";
18
+ /** Create resource response message type */
12
19
  readonly MsgCreateResourceResponse: "MsgCreateResourceResponse";
13
20
  };
21
+ /** Type URL for MsgCreateResource messages */
14
22
  export declare const typeUrlMsgCreateResource: "/cheqd.resource.v2.MsgCreateResource";
23
+ /** Type URL for MsgCreateResourceResponse messages */
15
24
  export declare const typeUrlMsgCreateResourceResponse: "/cheqd.resource.v2.MsgCreateResourceResponse";
25
+ /**
26
+ * Encode object interface for MsgCreateResource messages.
27
+ * Used for type-safe message encoding in resource creation transactions.
28
+ */
16
29
  export interface MsgCreateResourceEncodeObject extends EncodeObject {
17
30
  readonly typeUrl: typeof typeUrlMsgCreateResource;
18
31
  readonly value: Partial<MsgCreateResource>;
19
32
  }
33
+ /**
34
+ * Type guard function to check if an object is a MsgCreateResourceEncodeObject.
35
+ *
36
+ * @param obj - EncodeObject to check
37
+ * @returns True if the object is a MsgCreateResourceEncodeObject
38
+ */
20
39
  export declare function isMsgCreateResourceEncodeObject(obj: EncodeObject): obj is MsgCreateResourceEncodeObject;
40
+ /** Minimal importable version of the resource module for clean external interfaces */
21
41
  export type MinimalImportableResourceModule = MinimalImportableCheqdSDKModule<ResourceModule>;
42
+ /**
43
+ * Resource extension interface for querier functionality.
44
+ * Provides methods for querying resources and their metadata.
45
+ */
22
46
  export type ResourceExtension = {
23
47
  readonly [defaultResourceExtensionKey]: {
48
+ /** Query a specific resource by collection and resource ID */
24
49
  readonly resource: (collectionId: string, resourceId: string) => Promise<ResourceWithMetadata>;
50
+ /** Query metadata for a specific resource */
25
51
  readonly resourceMetadata: (collectionId: string, resourceId: string) => Promise<Metadata>;
52
+ /** Query all resources in a collection with pagination support */
26
53
  readonly collectionResources: (collectionId: string, paginationKey?: Uint8Array) => Promise<QueryCollectionResourcesResponse>;
27
54
  };
28
55
  };
56
+ /**
57
+ * Sets up the resource extension for the querier client.
58
+ * Creates and configures the resource-specific query methods.
59
+ *
60
+ * @param base - Base QueryClient to extend
61
+ * @returns Configured resource extension with query methods
62
+ */
29
63
  export declare const setupResourceExtension: (base: QueryClient) => ResourceExtension;
64
+ /**
65
+ * Resource Module class providing comprehensive linked resource functionality.
66
+ * Handles creation, querying, and metadata management of resources linked to DID documents.
67
+ */
30
68
  export declare class ResourceModule extends AbstractCheqdSDKModule {
31
69
  static readonly registryTypes: Iterable<[string, GeneratedType]>;
70
+ /** Base denomination for Cheqd network transactions */
32
71
  static readonly baseMinimalDenom: "ncheq";
72
+ /**
73
+ * Standard fee amounts for different resource types.
74
+ * Fees vary based on resource content type and processing requirements.
75
+ */
33
76
  static readonly fees: {
77
+ /** Default fee for creating image resources */
34
78
  readonly DefaultCreateResourceImageFee: {
35
79
  readonly amount: "10000000000";
36
80
  readonly denom: "ncheq";
37
81
  };
82
+ /** Default fee for creating JSON resources */
38
83
  readonly DefaultCreateResourceJsonFee: {
39
84
  readonly amount: "10000000000";
40
85
  readonly denom: "ncheq";
41
86
  };
87
+ /** Default fee for creating other types of resources */
42
88
  readonly DefaultCreateResourceDefaultFee: {
43
89
  readonly amount: "10000000000";
44
90
  readonly denom: "ncheq";
45
91
  };
46
92
  };
93
+ /** Querier extension setup function for resource operations */
47
94
  static readonly querierExtensionSetup: QueryExtensionSetup<ResourceExtension>;
95
+ /** Querier instance with resource extension capabilities */
48
96
  querier: CheqdQuerier & ResourceExtension;
97
+ /**
98
+ * Constructs a new resource module instance.
99
+ *
100
+ * @param signer - Signing client for blockchain transactions
101
+ * @param querier - Querier client with resource extension for data retrieval
102
+ */
49
103
  constructor(signer: CheqdSigningStargateClient, querier: CheqdQuerier & ResourceExtension);
104
+ /**
105
+ * Gets the registry types for resource message encoding/decoding.
106
+ *
107
+ * @returns Iterable of [typeUrl, GeneratedType] pairs for the registry
108
+ */
50
109
  getRegistryTypes(): Iterable<[string, GeneratedType]>;
110
+ /**
111
+ * Gets the querier extension setup for resource operations.
112
+ *
113
+ * @returns Query extension setup function for resource functionality
114
+ */
51
115
  getQuerierExtensionSetup(): QueryExtensionSetup<ResourceExtension>;
116
+ /**
117
+ * Signs a resource payload with provided signature inputs.
118
+ * Creates a complete signed resource message ready for blockchain submission.
119
+ *
120
+ * @param payload - Resource payload to sign
121
+ * @param signInputs - Signing inputs or pre-computed signatures
122
+ * @returns Promise resolving to the signed resource message
123
+ */
52
124
  static signPayload(payload: MsgCreateResourcePayload, signInputs: ISignInputs[] | SignInfo[]): Promise<MsgCreateResource>;
125
+ /**
126
+ * Creates a linked resource transaction on the blockchain.
127
+ * Handles automatic fee calculation based on resource content type and size.
128
+ *
129
+ * @param signInputs - Signing inputs or pre-computed signatures for the transaction
130
+ * @param resourcePayload - Resource payload containing data and metadata
131
+ * @param address - Address of the account submitting the transaction
132
+ * @param fee - Transaction fee configuration or 'auto' for automatic calculation
133
+ * @param memo - Optional transaction memo
134
+ * @param context - Optional SDK context for accessing clients
135
+ * @returns Promise resolving to the transaction response
136
+ * @throws Error if linked resource data is empty when automatic fee calculation is requested
137
+ */
53
138
  createLinkedResourceTx(signInputs: ISignInputs[] | SignInfo[], resourcePayload: Partial<MsgCreateResourcePayload>, address: string, fee?: DidStdFee | 'auto' | number, memo?: string, context?: IContext): Promise<DeliverTxResponse>;
139
+ /**
140
+ * Queries a specific linked resource by collection and resource ID.
141
+ * Retrieves the complete resource data along with its metadata.
142
+ *
143
+ * @param collectionId - ID of the collection containing the resource
144
+ * @param resourceId - ID of the resource to query
145
+ * @param context - Optional SDK context for accessing clients
146
+ * @returns Promise resolving to the resource with metadata
147
+ */
54
148
  queryLinkedResource(collectionId: string, resourceId: string, context?: IContext): Promise<ResourceWithMetadata>;
149
+ /**
150
+ * Queries metadata for a specific linked resource.
151
+ * Retrieves only the metadata without the resource content data.
152
+ *
153
+ * @param collectionId - ID of the collection containing the resource
154
+ * @param resourceId - ID of the resource to query metadata for
155
+ * @param context - Optional SDK context for accessing clients
156
+ * @returns Promise resolving to the resource metadata
157
+ */
55
158
  queryLinkedResourceMetadata(collectionId: string, resourceId: string, context?: IContext): Promise<Metadata>;
159
+ /**
160
+ * Queries all resources in a collection with pagination support.
161
+ * Retrieves a list of all resources belonging to a specific collection.
162
+ *
163
+ * @param collectionId - ID of the collection to query resources for
164
+ * @param context - Optional SDK context for accessing clients
165
+ * @returns Promise resolving to the collection resources response with pagination
166
+ */
56
167
  queryLinkedResources(collectionId: string, context?: IContext): Promise<QueryCollectionResourcesResponse>;
168
+ /**
169
+ * Reads and determines the MIME type of resource content.
170
+ * Analyzes the content to identify the appropriate MIME type for fee calculation and validation.
171
+ *
172
+ * @param content - Resource content as byte array
173
+ * @returns Promise resolving to the detected MIME type string
174
+ */
57
175
  static readMimeType(content: Uint8Array): Promise<string>;
176
+ /**
177
+ * Generates fee configuration for image resource creation transactions.
178
+ * Uses higher gas limits appropriate for image processing and storage.
179
+ *
180
+ * @param feePayer - Address of the account that will pay the transaction fees
181
+ * @param granter - Optional address of the account granting fee payment permissions
182
+ * @returns Promise resolving to the fee configuration for image resources
183
+ */
58
184
  static generateCreateResourceImageFees(feePayer: string, granter?: string): Promise<DidStdFee>;
185
+ /**
186
+ * Generates fee configuration for JSON resource creation transactions.
187
+ * Uses gas limits optimized for JSON data processing and validation.
188
+ *
189
+ * @param feePayer - Address of the account that will pay the transaction fees
190
+ * @param granter - Optional address of the account granting fee payment permissions
191
+ * @returns Promise resolving to the fee configuration for JSON resources
192
+ */
59
193
  static generateCreateResourceJsonFees(feePayer: string, granter?: string): Promise<DidStdFee>;
194
+ /**
195
+ * Generates fee configuration for default resource creation transactions.
196
+ * Uses standard gas limits for generic resource types and binary data.
197
+ *
198
+ * @param feePayer - Address of the account that will pay the transaction fees
199
+ * @param granter - Optional address of the account granting fee payment permissions
200
+ * @returns Promise resolving to the fee configuration for default resources
201
+ */
60
202
  static generateCreateResourceDefaultFees(feePayer: string, granter?: string): Promise<DidStdFee>;
61
203
  }
62
204
  //# sourceMappingURL=resource.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../../../esm/src/modules/resource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,+BAA+B,EAAE,MAAM,QAAQ,CAAC;AACjF,OAAO,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACpF,OAAO,EACN,QAAQ,EACR,iBAAiB,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IACG,2BAA2B,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;IAOlH;;;;;;;OAOG;IACG,oBAAoB,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,gCAAgC,CAAC;IAO/G;;;;;;OAMG;WACU,YAAY,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC;IAM/D;;;;;;;OAOG;WACU,+BAA+B,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;IASpG;;;;;;;OAOG;WACU,8BAA8B,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;IASnG;;;;;;;OAOG;WACU,iCAAiC,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;CAQtG"}
@@ -1,12 +1,62 @@
1
1
  import { QueryClient } from '@cosmjs/stargate';
2
2
  import { CometClient, ConsensusParams } from '@cosmjs/tendermint-rpc';
3
3
  import { QueryExtensionSetup, CheqdExtensions } from './types.js';
4
+ /**
5
+ * Extended QueryClient specifically designed for the Cheqd blockchain network.
6
+ * Provides enhanced querying capabilities with support for custom extensions
7
+ * and consensus parameter retrieval.
8
+ */
4
9
  export declare class CheqdQuerier extends QueryClient {
10
+ /**
11
+ * Constructs a new CheqdQuerier instance with the provided Comet client.
12
+ *
13
+ * @param cometClient - Comet client for blockchain communication
14
+ */
5
15
  constructor(cometClient: CometClient);
16
+ /**
17
+ * Retrieves the consensus parameters from the blockchain network.
18
+ * This method creates a temporary connection to fetch the latest block results
19
+ * and extract consensus update information.
20
+ *
21
+ * @param url - RPC URL of the blockchain node
22
+ * @returns Promise resolving to consensus parameters or undefined if not available
23
+ */
6
24
  static getConsensusParameters(url: string): Promise<ConsensusParams | undefined>;
25
+ /**
26
+ * Creates a new CheqdQuerier instance by establishing a connection to the specified RPC URL.
27
+ * This is the primary method for creating a querier instance for blockchain communication.
28
+ *
29
+ * @param url - RPC URL of the blockchain node to connect to
30
+ * @returns Promise resolving to a connected CheqdQuerier instance
31
+ */
7
32
  static connect(url: string): Promise<CheqdQuerier>;
33
+ /**
34
+ * Creates a CheqdQuerier instance from an existing Comet client.
35
+ * Useful when you already have an established client connection.
36
+ *
37
+ * @param client - Existing Comet client
38
+ * @returns Promise resolving to a CheqdQuerier instance using the provided client
39
+ */
8
40
  static fromClient(client: CometClient): Promise<CheqdQuerier>;
41
+ /**
42
+ * Creates a CheqdQuerier instance with a single query extension.
43
+ * Extensions provide specialized query capabilities for specific blockchain modules.
44
+ *
45
+ * @param url - RPC URL of the blockchain node to connect to
46
+ * @param extension - Query extension setup to add specialized query functionality
47
+ * @returns Promise resolving to a CheqdQuerier instance with the specified extension
48
+ */
9
49
  static connectWithExtension(url: string, extension: QueryExtensionSetup<CheqdExtensions>): Promise<CheqdQuerier & CheqdExtensions>;
50
+ /**
51
+ * Creates a CheqdQuerier instance with multiple query extensions.
52
+ * This method supports adding multiple specialized query capabilities for different
53
+ * blockchain modules in a single operation. For single extensions, it delegates
54
+ * to connectWithExtension for efficiency.
55
+ *
56
+ * @param url - RPC URL of the blockchain node to connect to
57
+ * @param extensions - Variable number of query extension setups to add functionality
58
+ * @returns Promise resolving to a CheqdQuerier instance with all specified extensions
59
+ */
10
60
  static connectWithExtensions(url: string, ...extensions: QueryExtensionSetup<CheqdExtensions>[]): Promise<CheqdQuerier & CheqdExtensions>;
11
61
  }
12
62
  //# sourceMappingURL=querier.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"querier.d.ts","sourceRoot":"","sources":["../../esm/src/querier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AA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EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC;IAInE;;;;;;;OAOG;WACU,oBAAoB,CAChC,GAAG,EAAE,MAAM,EACX,SAAS,EAAE,mBAAmB,CAAC,eAAe,CAAC,GAC7C,OAAO,CAAC,YAAY,GAAG,eAAe,CAAC;IAK1C;;;;;;;;;OASG;WACU,qBAAqB,CACjC,GAAG,EAAE,MAAM,EACX,GAAG,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,EAAE,GACnD,OAAO,CAAC,YAAY,GAAG,eAAe,CAAC;CAY1C"}
@@ -1,4 +1,18 @@
1
1
  import { Registry, GeneratedType } from '@cosmjs/proto-signing';
2
+ /**
3
+ * Creates a default Cheqd registry with optional custom types.
4
+ * The registry is used for encoding and decoding protobuf messages in blockchain transactions.
5
+ * It includes all default Stargate types and any additional custom types provided.
6
+ *
7
+ * @param customTypes - Optional iterable of custom type mappings to add to the registry.
8
+ * Each entry should be a tuple of [typeUrl, GeneratedType].
9
+ * @returns A configured Registry instance with default and custom types
10
+ */
2
11
  export declare function createDefaultCheqdRegistry(customTypes?: Iterable<[string, GeneratedType]>): Registry;
12
+ /**
13
+ * Pre-configured Cheqd registry instance with default Stargate types.
14
+ * This is a ready-to-use registry for basic blockchain operations that don't require
15
+ * custom message types. For applications needing custom types, use createDefaultCheqdRegistry instead.
16
+ */
3
17
  export declare const CheqdRegistry: Registry;
4
18
  //# sourceMappingURL=registry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../esm/src/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAIhE,wBAAgB,0BAA0B,CAAC,WAAW,CAAC,EAAE,QAAQ,CAAC,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,GAAG,QAAQ,CAGpG;AAED,eAAO,MAAM,aAAa,UAAqC,CAAC"}
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../esm/src/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAIhE;;;;;;;;GAQG;AACH,wBAAgB,0BAA0B,CAAC,WAAW,CAAC,EAAE,QAAQ,CAAC,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,GAAG,QAAQ,CAGpG;AAED;;;;GAIG;AACH,eAAO,MAAM,aAAa,UAAqC,CAAC"}