@cheqd/sdk 5.4.0-develop.3 → 5.4.1-develop.1
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.
- package/build/esm/package.json +1 -1
- package/package.json +1 -1
- package/build/esm/cjs/src/index.d.ts +0 -142
- package/build/esm/cjs/src/index.d.ts.map +0 -1
- package/build/esm/cjs/src/index.js +0 -184
- package/build/esm/cjs/src/index.js.map +0 -1
- package/build/esm/cjs/src/modules/_.d.ts +0 -81
- package/build/esm/cjs/src/modules/_.d.ts.map +0 -1
- package/build/esm/cjs/src/modules/_.js +0 -93
- package/build/esm/cjs/src/modules/_.js.map +0 -1
- package/build/esm/cjs/src/modules/did.d.ts +0 -490
- package/build/esm/cjs/src/modules/did.d.ts.map +0 -1
- package/build/esm/cjs/src/modules/did.js +0 -1274
- package/build/esm/cjs/src/modules/did.js.map +0 -1
- package/build/esm/cjs/src/modules/feeabstraction.d.ts +0 -429
- package/build/esm/cjs/src/modules/feeabstraction.d.ts.map +0 -1
- package/build/esm/cjs/src/modules/feeabstraction.js +0 -474
- package/build/esm/cjs/src/modules/feeabstraction.js.map +0 -1
- package/build/esm/cjs/src/modules/feemarket.d.ts +0 -244
- package/build/esm/cjs/src/modules/feemarket.d.ts.map +0 -1
- package/build/esm/cjs/src/modules/feemarket.js +0 -297
- package/build/esm/cjs/src/modules/feemarket.js.map +0 -1
- package/build/esm/cjs/src/modules/oracle.d.ts +0 -563
- package/build/esm/cjs/src/modules/oracle.d.ts.map +0 -1
- package/build/esm/cjs/src/modules/oracle.js +0 -784
- package/build/esm/cjs/src/modules/oracle.js.map +0 -1
- package/build/esm/cjs/src/modules/resource.d.ts +0 -332
- package/build/esm/cjs/src/modules/resource.d.ts.map +0 -1
- package/build/esm/cjs/src/modules/resource.js +0 -575
- package/build/esm/cjs/src/modules/resource.js.map +0 -1
- package/build/esm/cjs/src/querier.d.ts +0 -83
- package/build/esm/cjs/src/querier.d.ts.map +0 -1
- package/build/esm/cjs/src/querier.js +0 -138
- package/build/esm/cjs/src/querier.js.map +0 -1
- package/build/esm/cjs/src/registry.d.ts +0 -18
- package/build/esm/cjs/src/registry.d.ts.map +0 -1
- package/build/esm/cjs/src/registry.js +0 -23
- package/build/esm/cjs/src/registry.js.map +0 -1
- package/build/esm/cjs/src/signer.d.ts +0 -250
- package/build/esm/cjs/src/signer.d.ts.map +0 -1
- package/build/esm/cjs/src/signer.js +0 -617
- package/build/esm/cjs/src/signer.js.map +0 -1
- package/build/esm/cjs/src/types.d.ts +0 -221
- package/build/esm/cjs/src/types.d.ts.map +0 -1
- package/build/esm/cjs/src/types.js.map +0 -1
- package/build/esm/cjs/src/utils.d.ts +0 -233
- package/build/esm/cjs/src/utils.d.ts.map +0 -1
- package/build/esm/cjs/src/utils.js +0 -571
- package/build/esm/cjs/src/utils.js.map +0 -1
- package/build/esm/esm/src/types.js +0 -43
- package/build/types/cjs/src/index.d.ts +0 -142
- package/build/types/cjs/src/index.d.ts.map +0 -1
- package/build/types/cjs/src/modules/_.d.ts +0 -81
- package/build/types/cjs/src/modules/_.d.ts.map +0 -1
- package/build/types/cjs/src/modules/did.d.ts +0 -490
- package/build/types/cjs/src/modules/did.d.ts.map +0 -1
- package/build/types/cjs/src/modules/feeabstraction.d.ts +0 -429
- package/build/types/cjs/src/modules/feeabstraction.d.ts.map +0 -1
- package/build/types/cjs/src/modules/feemarket.d.ts +0 -244
- package/build/types/cjs/src/modules/feemarket.d.ts.map +0 -1
- package/build/types/cjs/src/modules/oracle.d.ts +0 -563
- package/build/types/cjs/src/modules/oracle.d.ts.map +0 -1
- package/build/types/cjs/src/modules/resource.d.ts +0 -332
- package/build/types/cjs/src/modules/resource.d.ts.map +0 -1
- package/build/types/cjs/src/querier.d.ts +0 -83
- package/build/types/cjs/src/querier.d.ts.map +0 -1
- package/build/types/cjs/src/registry.d.ts +0 -18
- package/build/types/cjs/src/registry.d.ts.map +0 -1
- package/build/types/cjs/src/signer.d.ts +0 -250
- package/build/types/cjs/src/signer.d.ts.map +0 -1
- package/build/types/cjs/src/types.d.ts +0 -221
- package/build/types/cjs/src/types.d.ts.map +0 -1
- package/build/types/cjs/src/utils.d.ts +0 -233
- package/build/types/cjs/src/utils.d.ts.map +0 -1
- /package/build/esm/{esm/src/index.d.ts → index.d.ts} +0 -0
- /package/build/esm/{esm/src/index.d.ts.map → index.d.ts.map} +0 -0
- /package/build/esm/{esm/src/index.js → index.js} +0 -0
- /package/build/esm/{esm/src/index.js.map → index.js.map} +0 -0
- /package/build/esm/{esm/src/modules → modules}/_.d.ts +0 -0
- /package/build/esm/{esm/src/modules → modules}/_.d.ts.map +0 -0
- /package/build/esm/{esm/src/modules → modules}/_.js +0 -0
- /package/build/esm/{esm/src/modules → modules}/_.js.map +0 -0
- /package/build/esm/{esm/src/modules → modules}/did.d.ts +0 -0
- /package/build/esm/{esm/src/modules → modules}/did.d.ts.map +0 -0
- /package/build/esm/{esm/src/modules → modules}/did.js +0 -0
- /package/build/esm/{esm/src/modules → modules}/did.js.map +0 -0
- /package/build/esm/{esm/src/modules → modules}/feeabstraction.d.ts +0 -0
- /package/build/esm/{esm/src/modules → modules}/feeabstraction.d.ts.map +0 -0
- /package/build/esm/{esm/src/modules → modules}/feeabstraction.js +0 -0
- /package/build/esm/{esm/src/modules → modules}/feeabstraction.js.map +0 -0
- /package/build/esm/{esm/src/modules → modules}/feemarket.d.ts +0 -0
- /package/build/esm/{esm/src/modules → modules}/feemarket.d.ts.map +0 -0
- /package/build/esm/{esm/src/modules → modules}/feemarket.js +0 -0
- /package/build/esm/{esm/src/modules → modules}/feemarket.js.map +0 -0
- /package/build/esm/{esm/src/modules → modules}/oracle.d.ts +0 -0
- /package/build/esm/{esm/src/modules → modules}/oracle.d.ts.map +0 -0
- /package/build/esm/{esm/src/modules → modules}/oracle.js +0 -0
- /package/build/esm/{esm/src/modules → modules}/oracle.js.map +0 -0
- /package/build/esm/{esm/src/modules → modules}/resource.d.ts +0 -0
- /package/build/esm/{esm/src/modules → modules}/resource.d.ts.map +0 -0
- /package/build/esm/{esm/src/modules → modules}/resource.js +0 -0
- /package/build/esm/{esm/src/modules → modules}/resource.js.map +0 -0
- /package/build/esm/{esm/src/querier.d.ts → querier.d.ts} +0 -0
- /package/build/esm/{esm/src/querier.d.ts.map → querier.d.ts.map} +0 -0
- /package/build/esm/{esm/src/querier.js → querier.js} +0 -0
- /package/build/esm/{esm/src/querier.js.map → querier.js.map} +0 -0
- /package/build/esm/{esm/src/registry.d.ts → registry.d.ts} +0 -0
- /package/build/esm/{esm/src/registry.d.ts.map → registry.d.ts.map} +0 -0
- /package/build/esm/{esm/src/registry.js → registry.js} +0 -0
- /package/build/esm/{esm/src/registry.js.map → registry.js.map} +0 -0
- /package/build/esm/{esm/src/signer.d.ts → signer.d.ts} +0 -0
- /package/build/esm/{esm/src/signer.d.ts.map → signer.d.ts.map} +0 -0
- /package/build/esm/{esm/src/signer.js → signer.js} +0 -0
- /package/build/esm/{esm/src/signer.js.map → signer.js.map} +0 -0
- /package/build/esm/{esm/src/types.d.ts → types.d.ts} +0 -0
- /package/build/esm/{esm/src/types.d.ts.map → types.d.ts.map} +0 -0
- /package/build/esm/{cjs/src/types.js → types.js} +0 -0
- /package/build/esm/{esm/src/types.js.map → types.js.map} +0 -0
- /package/build/esm/{esm/src/utils.d.ts → utils.d.ts} +0 -0
- /package/build/esm/{esm/src/utils.d.ts.map → utils.d.ts.map} +0 -0
- /package/build/esm/{esm/src/utils.js → utils.js} +0 -0
- /package/build/esm/{esm/src/utils.js.map → utils.js.map} +0 -0
- /package/build/types/{esm/src/index.d.ts → index.d.ts} +0 -0
- /package/build/types/{esm/src/index.d.ts.map → index.d.ts.map} +0 -0
- /package/build/types/{esm/src/modules → modules}/_.d.ts +0 -0
- /package/build/types/{esm/src/modules → modules}/_.d.ts.map +0 -0
- /package/build/types/{esm/src/modules → modules}/did.d.ts +0 -0
- /package/build/types/{esm/src/modules → modules}/did.d.ts.map +0 -0
- /package/build/types/{esm/src/modules → modules}/feeabstraction.d.ts +0 -0
- /package/build/types/{esm/src/modules → modules}/feeabstraction.d.ts.map +0 -0
- /package/build/types/{esm/src/modules → modules}/feemarket.d.ts +0 -0
- /package/build/types/{esm/src/modules → modules}/feemarket.d.ts.map +0 -0
- /package/build/types/{esm/src/modules → modules}/oracle.d.ts +0 -0
- /package/build/types/{esm/src/modules → modules}/oracle.d.ts.map +0 -0
- /package/build/types/{esm/src/modules → modules}/resource.d.ts +0 -0
- /package/build/types/{esm/src/modules → modules}/resource.d.ts.map +0 -0
- /package/build/types/{esm/src/querier.d.ts → querier.d.ts} +0 -0
- /package/build/types/{esm/src/querier.d.ts.map → querier.d.ts.map} +0 -0
- /package/build/types/{esm/src/registry.d.ts → registry.d.ts} +0 -0
- /package/build/types/{esm/src/registry.d.ts.map → registry.d.ts.map} +0 -0
- /package/build/types/{esm/src/signer.d.ts → signer.d.ts} +0 -0
- /package/build/types/{esm/src/signer.d.ts.map → signer.d.ts.map} +0 -0
- /package/build/types/{esm/src/types.d.ts → types.d.ts} +0 -0
- /package/build/types/{esm/src/types.d.ts.map → types.d.ts.map} +0 -0
- /package/build/types/{esm/src/utils.d.ts → utils.d.ts} +0 -0
- /package/build/types/{esm/src/utils.d.ts.map → utils.d.ts.map} +0 -0
|
@@ -1,233 +0,0 @@
|
|
|
1
|
-
import { IKeyPair, IKeyValuePair, ISignInputs, VerificationMethods, TMethodSpecificId, MethodSpecificIdAlgo, TVerificationKey, TVerificationKeyPrefix, CheqdNetwork, IVerificationKeys, VerificationMethod, DIDDocument, SpecValidationResult, Service } from './types';
|
|
2
|
-
import { KeyPair } from '@stablelib/ed25519-cjs';
|
|
3
|
-
import { DirectSecp256k1HdWallet, DirectSecp256k1Wallet } from '@cosmjs/proto-signing-cjs';
|
|
4
|
-
import { EnglishMnemonic as _ } from '@cosmjs/crypto-cjs';
|
|
5
|
-
import { Service as ProtoService, DidDoc } from '@cheqd/ts-proto-cjs/cheqd/did/v2';
|
|
6
|
-
import { MsgCreateResourcePayload } from '@cheqd/ts-proto-cjs/cheqd/resource/v2';
|
|
7
|
-
import { Coin } from 'cosmjs-types-cjs/cosmos/base/v1beta1/coin';
|
|
8
|
-
import { BackoffOptions } from 'exponential-backoff-cjs';
|
|
9
|
-
/**
|
|
10
|
-
* Represents an importable Ed25519 key with hexadecimal encoding.
|
|
11
|
-
* This type ensures type safety for Ed25519 key operations.
|
|
12
|
-
*/
|
|
13
|
-
export type TImportableEd25519Key = {
|
|
14
|
-
/** Public key in hexadecimal format */
|
|
15
|
-
publicKeyHex: string;
|
|
16
|
-
/** Private key in hexadecimal format */
|
|
17
|
-
privateKeyHex: string;
|
|
18
|
-
/** Key identifier */
|
|
19
|
-
kid: string;
|
|
20
|
-
/** Key type, must be 'Ed25519' */
|
|
21
|
-
type: 'Ed25519';
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* Utility object for validating TImportableEd25519Key objects.
|
|
25
|
-
* Provides type guard functionality to ensure key structure integrity.
|
|
26
|
-
*/
|
|
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
|
-
*/
|
|
34
|
-
isValid(key: any): key is TImportableEd25519Key;
|
|
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
|
-
*/
|
|
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
|
-
*/
|
|
48
|
-
export declare class EnglishMnemonic extends _ {
|
|
49
|
-
/** Regular expression pattern for validating English mnemonic phrases */
|
|
50
|
-
static readonly _mnemonicMatcher: RegExp;
|
|
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
|
-
*/
|
|
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
|
-
*/
|
|
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
|
-
*/
|
|
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
|
-
*/
|
|
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
|
-
*/
|
|
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
|
-
*/
|
|
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
|
-
*/
|
|
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
|
-
*/
|
|
123
|
-
export declare function validateSpecCompliantPayload(didDocument: DIDDocument): SpecValidationResult;
|
|
124
|
-
/**
|
|
125
|
-
* Creates a Cosmos wallet from a seed phrase or private key.
|
|
126
|
-
* Automatically detects whether the input is a mnemonic phrase or hex-encoded private key.
|
|
127
|
-
*
|
|
128
|
-
* @param cosmosPayerSeed - Mnemonic phrase or hexadecimal private key
|
|
129
|
-
* @returns Promise resolving to DirectSecp256k1HdWallet or DirectSecp256k1Wallet
|
|
130
|
-
*/
|
|
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
|
-
*/
|
|
138
|
-
export declare function toMultibaseRaw(key: Uint8Array): import("multiformats-cjs/bases/base").Multibase<"z">;
|
|
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 */
|
|
149
|
-
export declare const createMsgUpdateDidDocPayloadToSign: typeof createMsgCreateDidDocPayloadToSign;
|
|
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 deactivation
|
|
155
|
-
* @returns Encoded deactivation message payload bytes ready for signing
|
|
156
|
-
*/
|
|
157
|
-
export declare function createMsgDeactivateDidDocPayloadToSign(didPayload: DIDDocument, versionId?: string): Uint8Array<ArrayBuffer>;
|
|
158
|
-
/**
|
|
159
|
-
* Creates a MsgCreateResource payload ready for signing.
|
|
160
|
-
*
|
|
161
|
-
* @param payload - Resource creation payload (partial or complete)
|
|
162
|
-
* @returns Encoded resource creation message payload bytes ready for signing
|
|
163
|
-
*/
|
|
164
|
-
export declare function createMsgResourcePayloadToSign(payload: Partial<MsgCreateResourcePayload> | MsgCreateResourcePayload): Uint8Array<ArrayBuffer>;
|
|
165
|
-
/**
|
|
166
|
-
* Derives a Cosmos account address from a hexadecimal public key.
|
|
167
|
-
* Converts the public key to the appropriate format and generates a bech32 address.
|
|
168
|
-
*
|
|
169
|
-
* @param publicKeyHex - Secp256k1 public key in hexadecimal format
|
|
170
|
-
* @returns Bech32-encoded Cheqd account address
|
|
171
|
-
*/
|
|
172
|
-
export declare function getCosmosAccount(publicKeyHex: string): string;
|
|
173
|
-
/**
|
|
174
|
-
* Checks the balance of all coins for a given address on the blockchain.
|
|
175
|
-
*
|
|
176
|
-
* @param address - Bech32-encoded account address to check balance for
|
|
177
|
-
* @param rpcAddress - RPC endpoint URL of the blockchain node
|
|
178
|
-
* @returns Promise resolving to array of coin balances
|
|
179
|
-
*/
|
|
180
|
-
export declare function checkBalance(address: string, rpcAddress: string): Promise<readonly Coin[]>;
|
|
181
|
-
/**
|
|
182
|
-
* Checks if a given input is valid JSON.
|
|
183
|
-
*
|
|
184
|
-
* @param input - Input to validate as JSON
|
|
185
|
-
* @returns True if the input is a valid JSON string
|
|
186
|
-
*/
|
|
187
|
-
export declare function isJSON(input: any): boolean;
|
|
188
|
-
/** Default configuration options for exponential backoff retry logic */
|
|
189
|
-
export declare const DefaultBackoffOptions: BackoffOptions;
|
|
190
|
-
/**
|
|
191
|
-
* Retries a function with exponential backoff strategy.
|
|
192
|
-
* Provides configurable retry logic with jitter and delay options.
|
|
193
|
-
*
|
|
194
|
-
* @template T - Return type of the function being retried
|
|
195
|
-
* @param fn - Async function to retry
|
|
196
|
-
* @param options - Optional backoff configuration (uses defaults if not provided)
|
|
197
|
-
* @returns Promise resolving to the function result or undefined if all retries fail
|
|
198
|
-
*/
|
|
199
|
-
export declare function retry<T>(fn: () => Promise<T>, options?: BackoffOptions): Promise<T | undefined>;
|
|
200
|
-
/**
|
|
201
|
-
* Normalizes the authentication property of a DID document to an array of strings.
|
|
202
|
-
* Handles both string references and embedded verification method objects.
|
|
203
|
-
*
|
|
204
|
-
* @param didDocument - DID document to normalize authentication for
|
|
205
|
-
* @returns Array of authentication method identifiers
|
|
206
|
-
* @throws Error if authentication section is missing
|
|
207
|
-
*/
|
|
208
|
-
export declare function normalizeAuthentication(didDocument: DIDDocument): string[];
|
|
209
|
-
/**
|
|
210
|
-
* Normalizes the controller property of a DID document to an array of strings.
|
|
211
|
-
* Defaults to self-controlled if no controller is specified.
|
|
212
|
-
*
|
|
213
|
-
* @param didDocument - DID document to normalize controller for
|
|
214
|
-
* @returns Array of controller DID identifiers
|
|
215
|
-
*/
|
|
216
|
-
export declare function normalizeController(didDocument: DIDDocument): string[];
|
|
217
|
-
/**
|
|
218
|
-
* Normalizes DID document services to protobuf format.
|
|
219
|
-
* Converts service endpoints to arrays and includes optional properties.
|
|
220
|
-
*
|
|
221
|
-
* @param didDocument - DID document containing services to normalize
|
|
222
|
-
* @returns Array of protobuf-formatted services or undefined if no services
|
|
223
|
-
*/
|
|
224
|
-
export declare function normalizeService(didDocument: DIDDocument): ProtoService[] | undefined;
|
|
225
|
-
/**
|
|
226
|
-
* Converts protobuf services back to standard DID document service format.
|
|
227
|
-
* Handles special context requirements for LinkedDomains services.
|
|
228
|
-
*
|
|
229
|
-
* @param didDocument - Protobuf DID document containing services to denormalize
|
|
230
|
-
* @returns Array of standard DID document services
|
|
231
|
-
*/
|
|
232
|
-
export declare function denormalizeService(didDocument: DidDoc): Service[];
|
|
233
|
-
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../cjs/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,EAGpB,OAAO,EACP,MAAM,SAAS,CAAC;AAIjB,OAAO,EAA4C,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAC3F,OAAO,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAC3F,OAAO,EAAE,eAAe,IAAI,CAAC,EAAU,MAAM,oBAAoB,CAAC;AAIlE,OAAO,EAEN,OAAO,IAAI,YAAY,EAGvB,MAAM,EACN,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AAGjF,OAAO,EAAE,IAAI,EAAE,MAAM,2CAA2C,CAAC;AACjE,OAAO,EAAW,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAElE;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG;IACnC,uCAAuC;IACvC,YAAY,EAAE,MAAM,CAAC;IACrB,wCAAwC;IACxC,aAAa,EAAE,MAAM,CAAC;IACtB,qBAAqB;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,kCAAkC;IAClC,IAAI,EAAE,SAAS,CAAC;CAChB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,qBAAqB;IACjC;;;;;OAK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AAM,EAAE,CAS1E;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,WAAW,GAAG,MAAM,EAAE,CAItE;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,WAAW,GAAG,YAAY,EAAE,GAAG,SAAS,CAYrF;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,EAAE,CAqBjE"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|