@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
@@ -10,29 +10,115 @@ import { Any } from 'cosmjs-types/google/protobuf/any.js';
10
10
  import { Coin } from 'cosmjs-types/cosmos/base/v1beta1/coin.js';
11
11
  import { CheqdQuerier } from './querier.js';
12
12
  import { TxExtension } from './types';
13
+ /**
14
+ * Calculates the transaction fee for DID operations using gas limit and gas price.
15
+ *
16
+ * @param gasLimit - Maximum amount of gas units that can be consumed by the transaction
17
+ * @param gasPrice - Price per gas unit, either as a string or GasPrice object
18
+ * @returns DidStdFee object containing the calculated fee structure
19
+ */
13
20
  export declare function calculateDidFee(gasLimit: number, gasPrice: string | GasPrice): DidStdFee;
21
+ /**
22
+ * Creates SignerInfo objects for transaction authentication from signer data.
23
+ * Each signer info contains the public key, sequence number, and signing mode.
24
+ *
25
+ * @param signers - Array of signer objects containing public keys and sequence numbers
26
+ * @param signMode - Signing mode to use (e.g., SIGN_MODE_DIRECT)
27
+ * @returns Array of SignerInfo objects for transaction authentication
28
+ */
14
29
  export declare function makeSignerInfos(signers: ReadonlyArray<{
15
30
  readonly pubkey: Any;
16
31
  readonly sequence: number;
17
32
  }>, signMode: SignMode): SignerInfo[];
33
+ /**
34
+ * Creates encoded AuthInfo bytes for DID transactions with fee payer support.
35
+ * The AuthInfo contains signer information, fee details, and gas limit.
36
+ *
37
+ * @param signers - Array of signer objects with public keys and sequence numbers
38
+ * @param feeAmount - Array of coins representing the transaction fee
39
+ * @param gasLimit - Maximum gas units that can be consumed
40
+ * @param feePayer - Address of the account paying the transaction fees
41
+ * @param signMode - Signing mode to use, defaults to SIGN_MODE_DIRECT
42
+ * @returns Encoded AuthInfo as Uint8Array for transaction construction
43
+ */
18
44
  export declare function makeDidAuthInfoBytes(signers: ReadonlyArray<{
19
45
  readonly pubkey: Any;
20
46
  readonly sequence: number;
21
47
  }>, feeAmount: readonly Coin[], gasLimit: bigint, feePayer: string, signMode?: SignMode): Uint8Array;
48
+ /**
49
+ * Extended SigningStargateClient specifically designed for Cheqd blockchain operations.
50
+ * Provides enhanced transaction signing, broadcasting, and DID-specific functionality
51
+ * with support for custom fee payers and advanced retry mechanisms.
52
+ */
22
53
  export declare class CheqdSigningStargateClient extends SigningStargateClient {
54
+ /** Map of DID signing algorithms for different verification method types */
23
55
  private didSigners;
56
+ /** Gas price configuration for transaction fee calculation */
24
57
  private readonly _gasPrice;
58
+ /** Offline signer instance for transaction signing */
25
59
  private readonly _signer;
60
+ /** RPC endpoint URL for blockchain communication */
26
61
  private readonly endpoint?;
62
+ /** Maximum gas limit allowed for transactions */
27
63
  static readonly maxGasLimit: number;
64
+ /**
65
+ * Creates a new CheqdSigningStargateClient by establishing a connection to the specified endpoint.
66
+ * This is the primary factory method for creating a signing client instance.
67
+ *
68
+ * @param endpoint - RPC endpoint URL or HttpEndpoint object to connect to
69
+ * @param signer - Offline signer for transaction signing
70
+ * @param options - Additional client configuration options including registry and gas price
71
+ * @returns Promise resolving to a connected CheqdSigningStargateClient instance
72
+ */
28
73
  static connectWithSigner(endpoint: string | HttpEndpoint, signer: OfflineSigner, options?: (SigningStargateClientOptions & {
29
74
  endpoint?: string;
30
75
  }) | undefined): Promise<CheqdSigningStargateClient>;
76
+ /**
77
+ * Constructs a new CheqdSigningStargateClient instance with the provided Comet client and signer.
78
+ *
79
+ * @param cometClient - Comet client for blockchain communication
80
+ * @param signer - Offline signer for transaction signing
81
+ * @param options - Additional configuration options including registry, gas price, and endpoint
82
+ */
31
83
  constructor(cometClient: CometClient | undefined, signer: OfflineSigner, options?: SigningStargateClientOptions & {
32
84
  endpoint?: string;
33
85
  });
86
+ /**
87
+ * Signs and broadcasts a transaction to the blockchain network.
88
+ * Supports automatic fee calculation and custom fee payer functionality.
89
+ *
90
+ * @param signerAddress - Address of the account signing the transaction
91
+ * @param messages - Array of messages to include in the transaction
92
+ * @param fee - Fee configuration: 'auto' for automatic calculation, number for multiplier, or DidStdFee object
93
+ * @param memo - Optional transaction memo string
94
+ * @returns Promise resolving to DeliverTxResponse with transaction results
95
+ * @throws Error if gas price is not set when using automatic fee calculation
96
+ */
34
97
  signAndBroadcast(signerAddress: string, messages: readonly EncodeObject[], fee: DidStdFee | 'auto' | number, memo?: string): Promise<DeliverTxResponse>;
98
+ /**
99
+ * Signs a transaction without broadcasting it to the network.
100
+ * Creates a signed transaction that can be broadcast later.
101
+ *
102
+ * @param signerAddress - Address of the account signing the transaction
103
+ * @param messages - Array of messages to include in the transaction
104
+ * @param fee - Fee configuration for the transaction
105
+ * @param memo - Transaction memo string
106
+ * @param explicitSignerData - Optional explicit signer data to avoid querying the chain
107
+ * @returns Promise resolving to TxRaw containing the signed transaction
108
+ */
35
109
  sign(signerAddress: string, messages: readonly EncodeObject[], fee: DidStdFee, memo: string, explicitSignerData?: SignerData): Promise<TxRaw>;
110
+ /**
111
+ * Internal method for direct signing of transactions using SIGN_MODE_DIRECT.
112
+ * Handles the low-level transaction construction and signing process.
113
+ *
114
+ * @param signerAddress - Address of the account signing the transaction
115
+ * @param messages - Array of messages to include in the transaction
116
+ * @param fee - Fee configuration for the transaction
117
+ * @param memo - Transaction memo string
118
+ * @param signerData - Account data including number, sequence, and chain ID
119
+ * @returns Promise resolving to TxRaw containing the signed transaction
120
+ * @private
121
+ */
36
122
  private _signDirect;
37
123
  /**
38
124
  * Broadcasts a signed transaction to the network and monitors its inclusion in a block,
@@ -57,9 +143,45 @@ export declare class CheqdSigningStargateClient extends SigningStargateClient {
57
143
  broadcastTx(tx: Uint8Array, timeoutMs?: number, pollIntervalMs?: number, maxRetries?: number): Promise<DeliverTxResponse>;
58
144
  simulate(signerAddress: string, messages: readonly EncodeObject[], memo: string | undefined): Promise<number>;
59
145
  constructSimulateExtension(querier: CheqdQuerier): Promise<TxExtension>;
146
+ /**
147
+ * Batches multiple messages into optimal groups based on gas limits.
148
+ * Simulates each message individually and groups them to maximize throughput
149
+ * while staying within gas constraints.
150
+ *
151
+ * @param messages - Array of messages to batch
152
+ * @param signerAddress - Address of the account that will sign the transactions
153
+ * @param memo - Optional transaction memo
154
+ * @param maxGasLimit - Maximum gas limit per batch, defaults to 30,000,000
155
+ * @returns Promise resolving to MessageBatch with grouped messages and gas estimates
156
+ */
60
157
  batchMessages(messages: readonly EncodeObject[], signerAddress: string, memo?: string, maxGasLimit?: number): Promise<MessageBatch>;
158
+ /**
159
+ * Validates and initializes DID signers for the provided verification methods.
160
+ * Ensures that all verification method types are supported and assigns appropriate signers.
161
+ *
162
+ * @param verificationMethods - Array of verification methods to validate
163
+ * @returns Promise resolving to the configured signer algorithm map
164
+ * @throws Error if no verification methods are provided or unsupported types are found
165
+ */
61
166
  checkDidSigners(verificationMethods?: Partial<VerificationMethod>[]): Promise<TSignerAlgo>;
167
+ /**
168
+ * Retrieves the appropriate DID signer for a specific verification method.
169
+ * Looks up the verification method by ID and returns the corresponding signer function.
170
+ *
171
+ * @param verificationMethodId - ID of the verification method to get signer for
172
+ * @param verificationMethods - Array of available verification methods
173
+ * @returns Promise resolving to a signer function that takes a secret key
174
+ * @throws Error if the verification method is not found
175
+ */
62
176
  getDidSigner(verificationMethodId: string, verificationMethods: Partial<VerificationMethod>[]): Promise<(secretKey: Uint8Array) => Signer>;
177
+ /**
178
+ * Signs a CreateDidDoc transaction payload using the provided signing inputs.
179
+ * Validates verification methods and creates signatures for each signing input.
180
+ *
181
+ * @param signInputs - Array of signing inputs containing verification method IDs and private keys
182
+ * @param payload - CreateDidDoc payload to sign
183
+ * @returns Promise resolving to array of SignInfo objects with signatures
184
+ */
63
185
  signCreateDidDocTx(signInputs: ISignInputs[], payload: MsgCreateDidDocPayload): Promise<SignInfo[]>;
64
186
  signUpdateDidDocTx(signInputs: ISignInputs[], payload: MsgUpdateDidDocPayload, externalControllers?: DIDDocument[], previousDidDocument?: DIDDocument): Promise<SignInfo[]>;
65
187
  signDeactivateDidDocTx(signInputs: ISignInputs[], payload: MsgDeactivateDidDocPayload, verificationMethod: VerificationMethod[]): Promise<SignInfo[]>;
@@ -1 +1 @@
1
- {"version":3,"file":"signer.d.ts","sourceRoot":"","sources":["../../esm/src/signer.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,YAAY,EAEZ,aAAa,EAIb,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACN,iBAAiB,EACjB,QAAQ,EACR,YAAY,EACZ,qBAAqB,EACrB,4BAA4B,EAE5B,UAAU,EAGV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAgB,MAAM,wBAAwB,CAAC;AAEnE,OAAO,EACN,sBAAsB,EACtB,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C,kBAAkB,EAAE,kBAAkB,EAAE,GACtC,OAAO,CAAC,QAAQ,EAAE,CAAC;WAoBT,cAAc,CAAC,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;CAgClG"}
@@ -12,93 +12,185 @@ import { GetTxResponse, SimulateResponse } from 'cosmjs-types/cosmos/tx/v1beta1/
12
12
  import { Any } from 'cosmjs-types/google/protobuf/any.js';
13
13
  import { Pubkey } from '@cosmjs/amino';
14
14
  export { DIDDocument, VerificationMethod, Service, ServiceEndpoint, JsonWebKey } from 'did-resolver';
15
+ /** Supported Cheqd blockchain networks */
15
16
  export declare enum CheqdNetwork {
17
+ /** Production network for live transactions */
16
18
  Mainnet = "mainnet",
19
+ /** Test network for development and testing */
17
20
  Testnet = "testnet"
18
21
  }
22
+ /** Function type for setting up query extensions on a base QueryClient */
19
23
  export type QueryExtensionSetup<T> = (base: QueryClient) => T;
24
+ /**
25
+ * Utility type for creating exclusive extension objects where only one extension can be active at a time.
26
+ * Ensures type safety when working with mutually exclusive extensions.
27
+ */
20
28
  export type CheqdExtension<K extends string, V = any> = {
21
29
  [P in K]: Record<P, V> & Partial<Record<Exclude<K, P>, never>> extends infer O ? {
22
30
  [Q in keyof O]: O[Q];
23
31
  } : never;
24
32
  }[K];
33
+ /** Union type of all supported Cheqd query extensions */
25
34
  export type CheqdExtensions = DidExtension | ResourceExtension | FeemarketExtension | FeeabstractionExtension;
35
+ /**
36
+ * Extension interface for transaction-related operations.
37
+ * Provides methods for transaction retrieval and simulation.
38
+ */
26
39
  export interface TxExtension {
27
40
  readonly tx: {
41
+ /** Retrieves a transaction by its ID */
28
42
  getTx: (txId: string) => Promise<GetTxResponse>;
43
+ /** Simulates a transaction to estimate gas usage and validate execution */
29
44
  simulate: (messages: readonly Any[], memo: string | undefined, signer: Pubkey, signerAddress: string, sequence: number, gasLimit: number) => Promise<SimulateResponse>;
30
45
  };
31
46
  }
47
+ /** Generic interface for module methods that can be executed with variable arguments */
32
48
  export interface IModuleMethod {
33
49
  (...args: any[]): Promise<any>;
34
50
  }
51
+ /** Map of method names to their corresponding module method implementations */
52
+ /** Map of method names to their corresponding module method implementations */
35
53
  export interface IModuleMethodMap extends Record<string, IModuleMethod> {
36
54
  }
55
+ /** Context interface providing access to the SDK instance for module methods */
37
56
  export interface IContext {
38
57
  sdk: CheqdSDK;
39
58
  }
59
+ /** DID document with associated metadata from resolution results */
40
60
  export type DIDDocumentWithMetadata = Pick<DIDResolutionResult, 'didDocument' | 'didDocumentMetadata'>;
61
+ /**
62
+ * Result of DID specification validation containing validation status,
63
+ * error information, and converted protobuf objects.
64
+ */
41
65
  export type SpecValidationResult = {
66
+ /** Whether the validation passed */
42
67
  valid: boolean;
68
+ /** Error message if validation failed */
43
69
  error?: string;
70
+ /** Converted verification methods in protobuf format */
44
71
  protobufVerificationMethod?: ProtobufVerificationMethod[];
72
+ /** Converted services in protobuf format */
45
73
  protobufService?: ProtobufService[];
46
74
  };
75
+ /**
76
+ * Result of authentication validation for DID operations,
77
+ * including resolved external controllers and previous document state.
78
+ */
47
79
  export type AuthenticationValidationResult = {
80
+ /** Whether the authentication validation passed */
48
81
  valid: boolean;
82
+ /** Error message if validation failed */
49
83
  error?: string;
84
+ /** Resolved external controller DID documents */
50
85
  externalControllersDocuments?: DIDDocument[];
86
+ /** Previous version of the DID document for updates */
51
87
  previousDidDocument?: DIDDocument;
52
88
  };
89
+ /**
90
+ * Batched messages grouped by gas consumption limits,
91
+ * with corresponding gas estimates for each batch.
92
+ */
53
93
  export type MessageBatch = {
94
+ /** Array of message batches grouped by gas limits */
54
95
  readonly batches: EncodeObject[][];
96
+ /** Gas estimates for each corresponding batch */
55
97
  readonly gas: number[];
56
98
  };
99
+ /** Supported verification method types for DID documents */
57
100
  export declare enum VerificationMethods {
101
+ /** Ed25519 verification key (2020 specification) */
58
102
  Ed255192020 = "Ed25519VerificationKey2020",
103
+ /** Ed25519 verification key (2018 specification) */
59
104
  Ed255192018 = "Ed25519VerificationKey2018",
105
+ /** JSON Web Key (2020 specification) */
60
106
  JWK = "JsonWebKey2020"
61
107
  }
108
+ /** Supported algorithms for generating method-specific identifiers */
62
109
  export declare enum MethodSpecificIdAlgo {
110
+ /** Base58 Bitcoin encoding */
63
111
  Base58 = "base58btc",
112
+ /** UUID format */
64
113
  Uuid = "uuid"
65
114
  }
115
+ /** Map of verification method types to their corresponding signer algorithms */
66
116
  export type TSignerAlgo = {
67
117
  [key in VerificationMethods as string]?: (secretKey: Uint8Array) => Signer;
68
118
  };
119
+ /**
120
+ * Interface for signing inputs containing verification method details
121
+ * and the private key required for signing operations.
122
+ */
69
123
  export interface ISignInputs {
124
+ /** ID of the verification method to use for signing */
70
125
  verificationMethodId: string;
126
+ /** Type of cryptographic key (Ed25519, Secp256k1, or P256) */
71
127
  keyType?: 'Ed25519' | 'Secp256k1' | 'P256';
128
+ /** Private key in hexadecimal format */
72
129
  privateKeyHex: string;
73
130
  }
131
+ /**
132
+ * Interface representing a cryptographic key pair with optional algorithm specification.
133
+ */
74
134
  export interface IKeyPair {
135
+ /** Public key string */
75
136
  publicKey: string;
137
+ /** Private key string */
76
138
  privateKey: string;
139
+ /** Optional algorithm used for key generation */
77
140
  algo?: MethodSpecificIdAlgo;
78
141
  }
142
+ /** Generic key-value pair interface for flexible data storage */
79
143
  export interface IKeyValuePair {
144
+ /** The key identifier */
80
145
  key: string;
146
+ /** The associated value (can be any type) */
81
147
  value: any;
82
148
  }
149
+ /** String type for verification key prefixes */
83
150
  export type TVerificationKeyPrefix = string;
151
+ /** Template literal type for creating verification key identifiers with prefix and number */
84
152
  export type TVerificationKey<K extends TVerificationKeyPrefix, N extends number> = `${K}-${N}`;
153
+ /**
154
+ * Interface for verification key structures with strongly typed DID URLs and key IDs.
155
+ * Provides type safety for Cheqd DID identifiers and verification key relationships.
156
+ */
85
157
  export interface IVerificationKeys {
158
+ /** Method-specific identifier for the DID */
86
159
  readonly methodSpecificId: TMethodSpecificId;
160
+ /** Fully qualified DID URL for the Cheqd network */
87
161
  readonly didUrl: `did:cheqd:${CheqdNetwork}:${IVerificationKeys['methodSpecificId']}` extends string ? string : never;
162
+ /** Key identifier combining DID URL with verification key fragment */
88
163
  readonly keyId: `${IVerificationKeys['didUrl']}#${TVerificationKey<TVerificationKeyPrefix, number>}`;
164
+ /** Public key string representation */
89
165
  readonly publicKey: string;
90
166
  }
167
+ /** String type representing a method-specific identifier for DIDs */
91
168
  export type TMethodSpecificId = string;
169
+ /**
170
+ * DID-specific fee structure extending standard fee with payer and granter support.
171
+ * Enables fee delegation and payment by third parties for DID operations.
172
+ */
92
173
  export interface DidStdFee {
174
+ /** Array of coins representing the fee amount */
93
175
  readonly amount: readonly Coin[];
176
+ /** Gas limit for the transaction */
94
177
  readonly gas: string;
178
+ /** Optional address of the account paying the fees */
95
179
  payer?: string;
180
+ /** Optional address of the account granting fee payment permissions */
96
181
  granter?: string;
97
182
  }
183
+ /**
184
+ * Utility object providing type guard functions for ISignInputs validation.
185
+ * Contains helper methods to validate and type-check signing input objects.
186
+ */
98
187
  export declare const ISignInputs: {
188
+ /** Type guard function to check if an object array contains valid ISignInputs */
99
189
  isSignInput(object: Object[]): object is ISignInputs[];
100
190
  };
191
+ /** Enumeration of supported service types for DID documents */
101
192
  export declare enum ServiceType {
193
+ /** Service type for linking domain names to DIDs */
102
194
  LinkedDomains = "LinkedDomains"
103
195
  }
104
196
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../esm/src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,OAAO,IAAI,eAAe,EAC1B,kBAAkB,IAAI,0BAA0B,EAChD,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,MAAM,EAA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Q,CAAC,KAAK,EAAE,GAAG,iBAAiB,CAAC,QAAQ,CAAC,IAAI,gBAAgB,CAAC,sBAAsB,EAAE,MAAM,CAAC,EAAE,CAAC;IACrG,uCAAuC;IACvC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC3B;AAED,qEAAqE;AACrE,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC;AAEvC;;;GAGG;AACH,MAAM,WAAW,SAAS;IACzB,iDAAiD;IACjD,QAAQ,CAAC,MAAM,EAAE,SAAS,IAAI,EAAE,CAAC;IACjC,oCAAoC;IACpC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,sDAAsD;IACtD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uEAAuE;IACvE,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW;IACvB,iFAAiF;wBAC7D,MAAM,EAAE,GAAG,MAAM,IAAI,WAAW,EAAE;CAGtD,CAAC;AAEF,+DAA+D;AAC/D,oBAAY,WAAW;IACtB,oDAAoD;IACpD,aAAa,kBAAkB;CAC/B"}
@@ -6,40 +6,218 @@ import { Service as ProtoService, DidDoc } from '@cheqd/ts-proto/cheqd/did/v2/in
6
6
  import { MsgCreateResourcePayload } from '@cheqd/ts-proto/cheqd/resource/v2/index.js';
7
7
  import { Coin } from 'cosmjs-types/cosmos/base/v1beta1/coin';
8
8
  import { BackoffOptions } from 'exponential-backoff';
9
+ /**
10
+ * Represents an importable Ed25519 key with hexadecimal encoding.
11
+ * This type ensures type safety for Ed25519 key operations.
12
+ */
9
13
  export type TImportableEd25519Key = {
14
+ /** Public key in hexadecimal format */
10
15
  publicKeyHex: string;
16
+ /** Private key in hexadecimal format */
11
17
  privateKeyHex: string;
18
+ /** Key identifier */
12
19
  kid: string;
20
+ /** Key type, must be 'Ed25519' */
13
21
  type: 'Ed25519';
14
22
  };
23
+ /**
24
+ * Utility object for validating TImportableEd25519Key objects.
25
+ * Provides type guard functionality to ensure key structure integrity.
26
+ */
15
27
  export declare const TImportableEd25519Key: {
28
+ /**
29
+ * Type guard to validate if an object is a valid TImportableEd25519Key.
30
+ *
31
+ * @param key - Object to validate
32
+ * @returns True if the object is a valid TImportableEd25519Key
33
+ */
16
34
  isValid(key: any): key is TImportableEd25519Key;
17
35
  };
36
+ /**
37
+ * Compares two arrays of key-value pairs for equality.
38
+ *
39
+ * @param kv1 - First array of key-value pairs
40
+ * @param kv2 - Second array of key-value pairs
41
+ * @returns True if both arrays contain identical key-value pairs in the same order
42
+ */
18
43
  export declare function isEqualKeyValuePair(kv1: IKeyValuePair[], kv2: IKeyValuePair[]): boolean;
44
+ /**
45
+ * Extended English mnemonic class with additional validation patterns.
46
+ * Provides regex pattern matching for mnemonic phrase validation.
47
+ */
19
48
  export declare class EnglishMnemonic extends _ {
49
+ /** Regular expression pattern for validating English mnemonic phrases */
20
50
  static readonly _mnemonicMatcher: RegExp;
21
51
  }
52
+ /**
53
+ * Creates signing inputs from an importable Ed25519 key by matching it with verification methods.
54
+ * Supports multiple verification method types and key formats.
55
+ *
56
+ * @param key - The Ed25519 key to create signing inputs from
57
+ * @param verificationMethod - Array of verification methods to match against
58
+ * @returns Signing inputs containing verification method ID and private key
59
+ * @throws Error if key validation fails or no matching verification method is found
60
+ */
22
61
  export declare function createSignInputsFromImportableEd25519Key(key: TImportableEd25519Key, verificationMethod: VerificationMethod[]): ISignInputs;
62
+ /**
63
+ * Creates a raw Ed25519 key pair using the StableLib library.
64
+ *
65
+ * @param seed - Optional seed string for deterministic key generation
66
+ * @returns Raw KeyPair object with publicKey and secretKey as Uint8Arrays
67
+ */
23
68
  export declare function createKeyPairRaw(seed?: string): KeyPair;
69
+ /**
70
+ * Creates an Ed25519 key pair with Base64-encoded keys.
71
+ *
72
+ * @param seed - Optional seed string for deterministic key generation
73
+ * @returns Key pair with Base64-encoded public and private keys
74
+ */
24
75
  export declare function createKeyPairBase64(seed?: string): IKeyPair;
76
+ /**
77
+ * Creates an Ed25519 key pair with hexadecimal-encoded keys.
78
+ *
79
+ * @param seed - Optional seed string for deterministic key generation
80
+ * @returns Key pair with hexadecimal-encoded public and private keys
81
+ */
25
82
  export declare function createKeyPairHex(seed?: string): IKeyPair;
83
+ /**
84
+ * Creates verification keys structure with DID URLs and key identifiers.
85
+ * Supports multiple algorithm types and network configurations.
86
+ *
87
+ * @param publicKey - Public key in base64 or hex format
88
+ * @param algo - Algorithm for method-specific ID generation
89
+ * @param keyFragment - Key fragment for the verification key identifier
90
+ * @param network - Cheqd network (defaults to Testnet)
91
+ * @param methodSpecificId - Optional pre-computed method-specific ID
92
+ * @param didUrl - Optional pre-computed DID URL
93
+ * @returns Verification keys structure with all identifiers
94
+ * @throws Error if public key format is invalid
95
+ */
26
96
  export declare function createVerificationKeys(publicKey: string, algo: MethodSpecificIdAlgo, keyFragment: TVerificationKey<TVerificationKeyPrefix, number>, network?: CheqdNetwork, methodSpecificId?: TMethodSpecificId, didUrl?: string): IVerificationKeys;
97
+ /**
98
+ * Creates DID verification methods from verification method types and keys.
99
+ * Supports Ed25519 keys in multiple formats (multibase, base58, JWK).
100
+ *
101
+ * @param verificationMethodTypes - Array of verification method types to create
102
+ * @param verificationKeys - Array of verification keys corresponding to each type
103
+ * @returns Array of formatted verification methods for DID documents
104
+ */
27
105
  export declare function createDidVerificationMethod(verificationMethodTypes: VerificationMethods[], verificationKeys: IVerificationKeys[]): VerificationMethod[];
106
+ /**
107
+ * Creates a complete DID document payload with verification methods and controllers.
108
+ *
109
+ * @param verificationMethods - Array of verification methods for the DID
110
+ * @param verificationKeys - Array of verification keys for authentication
111
+ * @param controller - Optional array of controller DIDs (defaults to self-controlled)
112
+ * @returns Complete DID document with all required fields
113
+ * @throws Error if verification methods or keys are missing
114
+ */
28
115
  export declare function createDidPayload(verificationMethods: VerificationMethod[], verificationKeys: IVerificationKeys[], controller?: string[]): DIDDocument;
116
+ /**
117
+ * Validates a DID document against the Cheqd specification and converts to protobuf format.
118
+ * Ensures all required fields are present and verification methods are supported.
119
+ *
120
+ * @param didDocument - DID document to validate
121
+ * @returns Validation result with protobuf conversion or error details
122
+ */
29
123
  export declare function validateSpecCompliantPayload(didDocument: DIDDocument): SpecValidationResult;
124
+ /**
125
+ * Creates a Cosmos wallet from a seed phrase or private key.
126
+ * Supports both HD wallets from mnemonics and direct key wallets.
127
+ *
128
+ * @param cosmosPayerSeed - Mnemonic phrase or private key hex string
129
+ * @returns Promise resolving to either HD wallet or direct key wallet
130
+ */
30
131
  export declare function createCosmosPayerWallet(cosmosPayerSeed: string): Promise<DirectSecp256k1HdWallet | DirectSecp256k1Wallet>;
132
+ /**
133
+ * Converts a raw Ed25519 public key to multibase format with proper multicodec header.
134
+ *
135
+ * @param key - Raw Ed25519 public key as Uint8Array
136
+ * @returns Multibase-encoded string with Ed25519 multicodec prefix
137
+ */
31
138
  export declare function toMultibaseRaw(key: Uint8Array): string;
32
- export declare function createMsgCreateDidDocPayloadToSign(didPayload: DIDDocument, versionId: string): Promise<Uint8Array<ArrayBufferLike>>;
139
+ /**
140
+ * Creates a MsgCreateDidDoc payload ready for signing.
141
+ * Validates the DID document and converts it to protobuf format.
142
+ *
143
+ * @param didPayload - DID document to create message payload from
144
+ * @param versionId - Version identifier for the DID document
145
+ * @returns Encoded message payload bytes ready for signing
146
+ */
147
+ export declare function createMsgCreateDidDocPayloadToSign(didPayload: DIDDocument, versionId: string): Promise<Uint8Array<ArrayBuffer>>;
148
+ /** Alias for createMsgCreateDidDocPayloadToSign - used for DID document updates */
33
149
  export declare const createMsgUpdateDidDocPayloadToSign: typeof createMsgCreateDidDocPayloadToSign;
34
- export declare function createMsgDeactivateDidDocPayloadToSign(didPayload: DIDDocument, versionId?: string): Uint8Array<ArrayBufferLike>;
35
- export declare function createMsgResourcePayloadToSign(payload: Partial<MsgCreateResourcePayload> | MsgCreateResourcePayload): Uint8Array<ArrayBufferLike>;
150
+ /**
151
+ * Creates a MsgDeactivateDidDoc payload ready for signing.
152
+ *
153
+ * @param didPayload - DID document containing the ID to deactivate
154
+ * @param versionId - Optional version identifier for the DID document
155
+ * @returns Encoded message payload bytes ready for signing
156
+ */
157
+ export declare function createMsgDeactivateDidDocPayloadToSign(didPayload: DIDDocument, versionId?: string): Uint8Array<ArrayBuffer>;
158
+ /**
159
+ * Creates a resource payload ready for signing.
160
+ *
161
+ * @param payload - Resource payload to encode
162
+ * @returns Encoded resource payload bytes ready for signing
163
+ */
164
+ export declare function createMsgResourcePayloadToSign(payload: Partial<MsgCreateResourcePayload> | MsgCreateResourcePayload): Uint8Array<ArrayBuffer>;
165
+ /**
166
+ * Converts a public key to a Cosmos account address.
167
+ *
168
+ * @param publicKeyHex - Public key in hexadecimal format
169
+ * @returns Bech32-encoded Cosmos account address with 'cheqd' prefix
170
+ */
36
171
  export declare function getCosmosAccount(publicKeyHex: string): string;
172
+ /**
173
+ * Checks the balance of all coins for a given address on the blockchain.
174
+ *
175
+ * @param address - Bech32-encoded account address to check balance for
176
+ * @param rpcAddress - RPC endpoint URL of the blockchain node
177
+ * @returns Promise resolving to array of coin balances
178
+ */
37
179
  export declare function checkBalance(address: string, rpcAddress: string): Promise<readonly Coin[]>;
180
+ /**
181
+ * Checks if a given input is valid JSON.
182
+ *
183
+ * @param input - Input to validate as JSON
184
+ * @returns True if the input is a valid JSON string
185
+ */
38
186
  export declare function isJSON(input: any): boolean;
187
+ /** Default configuration options for exponential backoff retry logic */
39
188
  export declare const DefaultBackoffOptions: BackoffOptions;
40
189
  export declare function retry<T>(fn: () => Promise<T>, options?: BackoffOptions): Promise<T | undefined>;
190
+ /**
191
+ * Normalizes the authentication property of a DID document to an array of strings.
192
+ * Extracts authentication method identifiers from mixed string/object format.
193
+ *
194
+ * @param didDocument - DID document to normalize authentication for
195
+ * @returns Array of authentication method identifiers
196
+ * @throws Error if authentication section is missing
197
+ */
41
198
  export declare function normalizeAuthentication(didDocument: DIDDocument): string[];
199
+ /**
200
+ * Normalizes the controller property of a DID document to an array of strings.
201
+ * Defaults to self-controlled if no controller is specified.
202
+ *
203
+ * @param didDocument - DID document to normalize controller for
204
+ * @returns Array of controller DID identifiers
205
+ */
42
206
  export declare function normalizeController(didDocument: DIDDocument): string[];
207
+ /**
208
+ * Normalizes DID document services to protobuf format.
209
+ * Converts service endpoints to arrays and includes optional properties.
210
+ *
211
+ * @param didDocument - DID document containing services to normalize
212
+ * @returns Array of protobuf-formatted services or undefined if no services
213
+ */
43
214
  export declare function normalizeService(didDocument: DIDDocument): ProtoService[] | undefined;
215
+ /**
216
+ * Converts protobuf services back to standard DID document service format.
217
+ * Handles special context requirements for LinkedDomains services.
218
+ *
219
+ * @param didDocument - Protobuf DID document containing services to denormalize
220
+ * @returns Array of standard DID document services
221
+ */
44
222
  export declare function denormalizeService(didDocument: DidDoc): Service[];
45
223
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../esm/src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,QAAQ,EACR,aAAa,EACb,WAAW,EACX,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,sBAAsB,EACtB,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,WAAW,EACX,oBAAoB,EAEpB,OAAO,EAEP,MAAM,YAAY,CAAC;AAIpB,OAAO,EAA4C,OAAO,EAAE,MAAM,oBAAoB,CAAC;AACvF,OAAO,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACvF,OAAO,EAAE,eAAe,IAAI,CAAC,EAAU,MAAM,gBAAgB,CAAC;AAI9D,OAAO,EAEN,OAAO,IAAI,YAAY,EAGvB,MAAM,EACN,MAAM,uCAAuC,CAAC;AAE/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AAGtF,OAAO,EAAE,IAAI,EAAE,MAAM,uCAAuC,CAAC;AAC7D,OAAO,EAAW,cAAc,EAAE,MAAM,qB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AS,CAYrF;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,EAAE,CAmBjE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cheqd/sdk",
3
- "version": "5.3.2",
3
+ "version": "5.3.3-develop.2",
4
4
  "description": "A TypeScript SDK built with CosmJS to interact with the cheqd network ledger",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Cheqd Foundation Limited (https://github.com/cheqd)",
@@ -105,7 +105,7 @@
105
105
  "@semantic-release/commit-analyzer": "^13.0.1",
106
106
  "@semantic-release/git": "^10.0.1",
107
107
  "@semantic-release/github": "^11.0.3",
108
- "@semantic-release/npm": "^12.0.1",
108
+ "@semantic-release/npm": "^12.0.2",
109
109
  "@semantic-release/release-notes-generator": "^14.0.3",
110
110
  "@types/jest": "^29.5.14",
111
111
  "@types/long-cjs": "npm:@types/long@^4.0.2",
@@ -116,9 +116,9 @@
116
116
  "conventional-changelog-conventionalcommits": "^9.0.0",
117
117
  "cross-env": "^7.0.3",
118
118
  "husky": "^9.1.7",
119
- "jest": "^29.7.0",
119
+ "jest": "^30.0.0",
120
120
  "prettier": "^3.5.3",
121
- "semantic-release": "^24.2.5",
121
+ "semantic-release": "^24.2.6",
122
122
  "ts-jest": "^29.3.4",
123
123
  "typescript": "^5.8.3"
124
124
  },