@amadeus-protocol/sdk 1.0.7 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/chain.d.ts +144 -117
- package/dist/api/chain.d.ts.map +1 -1
- package/dist/api/chain.js +175 -146
- package/dist/api/chain.js.map +1 -1
- package/dist/api/contract.d.ts +78 -60
- package/dist/api/contract.d.ts.map +1 -1
- package/dist/api/contract.js +102 -75
- package/dist/api/contract.js.map +1 -1
- package/dist/api/epoch.d.ts +65 -66
- package/dist/api/epoch.d.ts.map +1 -1
- package/dist/api/epoch.js +90 -98
- package/dist/api/epoch.js.map +1 -1
- package/dist/api/peer.d.ts +77 -78
- package/dist/api/peer.d.ts.map +1 -1
- package/dist/api/peer.js +93 -94
- package/dist/api/peer.js.map +1 -1
- package/dist/api/proof.d.ts +44 -23
- package/dist/api/proof.d.ts.map +1 -1
- package/dist/api/proof.js +56 -29
- package/dist/api/proof.js.map +1 -1
- package/dist/api/transaction.d.ts +68 -69
- package/dist/api/transaction.d.ts.map +1 -1
- package/dist/api/transaction.js +84 -84
- package/dist/api/transaction.js.map +1 -1
- package/dist/api/wallet.d.ts +36 -37
- package/dist/api/wallet.d.ts.map +1 -1
- package/dist/api/wallet.js +47 -50
- package/dist/api/wallet.js.map +1 -1
- package/dist/client.d.ts +66 -68
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +231 -276
- package/dist/client.js.map +1 -1
- package/dist/constants.d.ts +13 -10
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +49 -45
- package/dist/constants.js.map +1 -1
- package/dist/contract-state.d.ts +6 -3
- package/dist/contract-state.d.ts.map +1 -1
- package/dist/contract-state.js +88 -106
- package/dist/contract-state.js.map +1 -1
- package/dist/contracts/abi-types.d.ts +32 -32
- package/dist/contracts/abi-types.d.ts.map +1 -1
- package/dist/contracts/coin.d.ts +13 -20
- package/dist/contracts/coin.d.ts.map +1 -1
- package/dist/contracts/coin.js +42 -38
- package/dist/contracts/coin.js.map +1 -1
- package/dist/contracts/contract-call.d.ts +14 -16
- package/dist/contracts/contract-call.d.ts.map +1 -1
- package/dist/contracts/contract-call.js +45 -54
- package/dist/contracts/contract-call.js.map +1 -1
- package/dist/contracts/contract.d.ts +24 -55
- package/dist/contracts/contract.d.ts.map +1 -1
- package/dist/contracts/contract.js +63 -101
- package/dist/contracts/contract.js.map +1 -1
- package/dist/contracts/lockup/abi.d.ts +54 -51
- package/dist/contracts/lockup/abi.d.ts.map +1 -1
- package/dist/contracts/lockup/abi.js +65 -74
- package/dist/contracts/lockup/abi.js.map +1 -1
- package/dist/contracts/lockup/helpers.d.ts +22 -18
- package/dist/contracts/lockup/helpers.d.ts.map +1 -1
- package/dist/contracts/lockup/helpers.js +44 -47
- package/dist/contracts/lockup/helpers.js.map +1 -1
- package/dist/contracts/lockup/parsers.d.ts +7 -3
- package/dist/contracts/lockup/parsers.d.ts.map +1 -1
- package/dist/contracts/lockup/parsers.js +51 -55
- package/dist/contracts/lockup/parsers.js.map +1 -1
- package/dist/contracts/lockup/storage-keys.d.ts +5 -2
- package/dist/contracts/lockup/storage-keys.d.ts.map +1 -1
- package/dist/contracts/lockup/storage-keys.js +54 -70
- package/dist/contracts/lockup/storage-keys.js.map +1 -1
- package/dist/contracts/lockup/types.d.ts +73 -70
- package/dist/contracts/lockup/types.d.ts.map +1 -1
- package/dist/contracts/lockup-prime/abi.d.ts +328 -325
- package/dist/contracts/lockup-prime/abi.d.ts.map +1 -1
- package/dist/contracts/lockup-prime/abi.js +397 -417
- package/dist/contracts/lockup-prime/abi.js.map +1 -1
- package/dist/contracts/lockup-prime/helpers.d.ts +35 -31
- package/dist/contracts/lockup-prime/helpers.d.ts.map +1 -1
- package/dist/contracts/lockup-prime/helpers.js +131 -137
- package/dist/contracts/lockup-prime/helpers.js.map +1 -1
- package/dist/contracts/lockup-prime/parsers.d.ts +9 -5
- package/dist/contracts/lockup-prime/parsers.d.ts.map +1 -1
- package/dist/contracts/lockup-prime/parsers.js +61 -61
- package/dist/contracts/lockup-prime/parsers.js.map +1 -1
- package/dist/contracts/lockup-prime/storage-keys.d.ts +7 -4
- package/dist/contracts/lockup-prime/storage-keys.d.ts.map +1 -1
- package/dist/contracts/lockup-prime/storage-keys.js +64 -80
- package/dist/contracts/lockup-prime/storage-keys.js.map +1 -1
- package/dist/contracts/lockup-prime/types.d.ts +92 -89
- package/dist/contracts/lockup-prime/types.d.ts.map +1 -1
- package/dist/contracts/lockup-prime/types.js +12 -13
- package/dist/contracts/lockup-prime/types.js.map +1 -1
- package/dist/contracts/nft/abi.d.ts +104 -0
- package/dist/contracts/nft/abi.d.ts.map +1 -0
- package/dist/contracts/nft/abi.js +135 -0
- package/dist/contracts/nft/abi.js.map +1 -0
- package/dist/contracts/nft/helpers.d.ts +21 -0
- package/dist/contracts/nft/helpers.d.ts.map +1 -0
- package/dist/contracts/nft/helpers.js +61 -0
- package/dist/contracts/nft/helpers.js.map +1 -0
- package/dist/contracts/nft/types.d.ts +47 -0
- package/dist/contracts/nft/types.d.ts.map +1 -0
- package/dist/conversion.d.ts +5 -2
- package/dist/conversion.d.ts.map +1 -1
- package/dist/conversion.js +45 -50
- package/dist/conversion.js.map +1 -1
- package/dist/crypto.d.ts +14 -16
- package/dist/crypto.d.ts.map +1 -1
- package/dist/crypto.js +121 -140
- package/dist/crypto.js.map +1 -1
- package/dist/encoding.d.ts +11 -8
- package/dist/encoding.d.ts.map +1 -1
- package/dist/encoding.js +123 -144
- package/dist/encoding.js.map +1 -1
- package/dist/encryption.d.ts +15 -12
- package/dist/encryption.d.ts.map +1 -1
- package/dist/encryption.js +119 -117
- package/dist/encryption.js.map +1 -1
- package/dist/explorer.d.ts +10 -7
- package/dist/explorer.d.ts.map +1 -1
- package/dist/explorer.js +51 -48
- package/dist/explorer.js.map +1 -1
- package/dist/formatters.d.ts +8 -5
- package/dist/formatters.d.ts.map +1 -1
- package/dist/formatters.js +67 -68
- package/dist/formatters.js.map +1 -1
- package/dist/index.d.ts +42 -54
- package/dist/index.js +39 -54
- package/dist/mnemonic.d.ts +99 -0
- package/dist/mnemonic.d.ts.map +1 -0
- package/dist/mnemonic.js +119 -0
- package/dist/mnemonic.js.map +1 -0
- package/dist/networks.d.ts +14 -17
- package/dist/networks.d.ts.map +1 -1
- package/dist/networks.js +40 -36
- package/dist/networks.js.map +1 -1
- package/dist/schemas.js +75 -79
- package/dist/schemas.js.map +1 -1
- package/dist/sdk.d.ts +69 -65
- package/dist/sdk.d.ts.map +1 -1
- package/dist/sdk.js +126 -117
- package/dist/sdk.js.map +1 -1
- package/dist/serialization.d.ts +8 -18
- package/dist/serialization.d.ts.map +1 -1
- package/dist/serialization.js +207 -260
- package/dist/serialization.js.map +1 -1
- package/dist/signing.js +67 -67
- package/dist/signing.js.map +1 -1
- package/dist/transaction-builder.d.ts +175 -184
- package/dist/transaction-builder.d.ts.map +1 -1
- package/dist/transaction-builder.js +295 -344
- package/dist/transaction-builder.js.map +1 -1
- package/dist/transaction-errors.d.ts +10 -12
- package/dist/transaction-errors.d.ts.map +1 -1
- package/dist/transaction-errors.js +145 -166
- package/dist/transaction-errors.js.map +1 -1
- package/dist/types.d.ts +530 -450
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +169 -183
- package/dist/types.js.map +1 -1
- package/dist/validation.d.ts +24 -26
- package/dist/validation.d.ts.map +1 -1
- package/dist/validation.js +194 -192
- package/dist/validation.js.map +1 -1
- package/package.json +5 -3
- package/dist/api/index.d.ts +0 -8
- package/dist/api/index.d.ts.map +0 -1
- package/dist/api/index.js +0 -8
- package/dist/api/index.js.map +0 -1
- package/dist/contracts/abi-types.js +0 -8
- package/dist/contracts/abi-types.js.map +0 -1
- package/dist/contracts/index.d.ts +0 -7
- package/dist/contracts/index.d.ts.map +0 -1
- package/dist/contracts/index.js +0 -7
- package/dist/contracts/index.js.map +0 -1
- package/dist/contracts/lockup/calls.d.ts +0 -23
- package/dist/contracts/lockup/calls.d.ts.map +0 -1
- package/dist/contracts/lockup/calls.js +0 -25
- package/dist/contracts/lockup/calls.js.map +0 -1
- package/dist/contracts/lockup/index.d.ts +0 -6
- package/dist/contracts/lockup/index.d.ts.map +0 -1
- package/dist/contracts/lockup/index.js +0 -6
- package/dist/contracts/lockup/index.js.map +0 -1
- package/dist/contracts/lockup/types.js +0 -7
- package/dist/contracts/lockup/types.js.map +0 -1
- package/dist/contracts/lockup-prime/calls.d.ts +0 -53
- package/dist/contracts/lockup-prime/calls.d.ts.map +0 -1
- package/dist/contracts/lockup-prime/calls.js +0 -60
- package/dist/contracts/lockup-prime/calls.js.map +0 -1
- package/dist/contracts/lockup-prime/index.d.ts +0 -6
- package/dist/contracts/lockup-prime/index.d.ts.map +0 -1
- package/dist/contracts/lockup-prime/index.js +0 -6
- package/dist/contracts/lockup-prime/index.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/schemas.d.ts +0 -67
- package/dist/schemas.d.ts.map +0 -1
- package/dist/signing.d.ts +0 -39
- package/dist/signing.d.ts.map +0 -1
package/dist/schemas.js
CHANGED
|
@@ -1,103 +1,99 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
//#region src/schemas.ts
|
|
1
3
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { Schema } from 'effect';
|
|
4
|
+
* Effect Schema definitions for validation
|
|
5
|
+
*
|
|
6
|
+
* Provides reusable schemas for validating common data types used throughout the SDK
|
|
7
|
+
*/
|
|
7
8
|
/**
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
* Base58 character set regex pattern
|
|
10
|
+
* Base58 excludes 0, O, I, l to avoid visual confusion
|
|
11
|
+
*/
|
|
11
12
|
const BASE58_PATTERN = /^[1-9A-HJ-NP-Za-km-z]+$/;
|
|
12
13
|
/**
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
* Schema for Base58 encoded hash (used for transaction IDs, entry hashes, etc.)
|
|
15
|
+
*/
|
|
16
|
+
const Base58HashSchema = Schema.String.pipe(Schema.nonEmptyString(), Schema.pattern(BASE58_PATTERN, {
|
|
17
|
+
identifier: "Base58Hash",
|
|
18
|
+
description: "Base58 encoded hash string"
|
|
18
19
|
}));
|
|
19
20
|
/**
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
* Schema for Base58 encoded address
|
|
22
|
+
*/
|
|
23
|
+
const Base58AddressSchema = Schema.String.pipe(Schema.nonEmptyString(), Schema.pattern(BASE58_PATTERN, {
|
|
24
|
+
identifier: "Base58Address",
|
|
25
|
+
description: "Base58 encoded address string"
|
|
25
26
|
}));
|
|
26
27
|
/**
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
* Schema for Base58 encoded public key
|
|
29
|
+
*/
|
|
30
|
+
const Base58PublicKeySchema = Schema.String.pipe(Schema.nonEmptyString(), Schema.pattern(BASE58_PATTERN, {
|
|
31
|
+
identifier: "Base58PublicKey",
|
|
32
|
+
description: "Base58 encoded public key string"
|
|
32
33
|
}));
|
|
33
34
|
/**
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
identifier: 'TransactionSort'
|
|
38
|
-
});
|
|
35
|
+
* Schema for transaction sort order
|
|
36
|
+
*/
|
|
37
|
+
const TransactionSortSchema = Schema.Literal("asc", "desc").annotations({ identifier: "TransactionSort" });
|
|
39
38
|
/**
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}).annotations({
|
|
54
|
-
identifier: 'TransactionFilters'
|
|
55
|
-
});
|
|
39
|
+
* Schema for transaction filters
|
|
40
|
+
* Validates optional fields when they are present
|
|
41
|
+
*/
|
|
42
|
+
const TransactionFiltersSchema = Schema.Struct({
|
|
43
|
+
limit: Schema.optional(Schema.NonNegativeInt),
|
|
44
|
+
offset: Schema.optional(Schema.NonNegativeInt),
|
|
45
|
+
sort: Schema.optional(TransactionSortSchema),
|
|
46
|
+
cursor: Schema.optional(Schema.String),
|
|
47
|
+
cursor_b58: Schema.optional(Schema.String),
|
|
48
|
+
contract: Schema.optional(Schema.String),
|
|
49
|
+
contract_b58: Schema.optional(Schema.String),
|
|
50
|
+
function: Schema.optional(Schema.String),
|
|
51
|
+
type: Schema.optional(Schema.Literal("sent", "recv"))
|
|
52
|
+
}).annotations({ identifier: "TransactionFilters" });
|
|
56
53
|
/**
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
54
|
+
* Schema for non-empty string
|
|
55
|
+
*/
|
|
56
|
+
const NonEmptyStringSchema = Schema.String.pipe(Schema.nonEmptyString());
|
|
60
57
|
/**
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
58
|
+
* Schema for non-empty Uint8Array
|
|
59
|
+
*/
|
|
60
|
+
const NonEmptyUint8ArraySchema = Schema.instanceOf(Uint8Array).pipe(Schema.filter((arr) => arr.length > 0, {
|
|
61
|
+
identifier: "NonEmptyUint8Array",
|
|
62
|
+
description: "Non-empty Uint8Array"
|
|
66
63
|
}));
|
|
67
64
|
/**
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
65
|
+
* Schema for ArrayBuffer (can be converted to Uint8Array)
|
|
66
|
+
*/
|
|
67
|
+
const NonEmptyArrayBufferSchema = Schema.instanceOf(ArrayBuffer).pipe(Schema.filter((buf) => buf.byteLength > 0, {
|
|
68
|
+
identifier: "NonEmptyArrayBuffer",
|
|
69
|
+
description: "Non-empty ArrayBuffer"
|
|
73
70
|
}));
|
|
74
71
|
/**
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
72
|
+
* Schema for transaction data (Uint8Array or non-empty Base58 string)
|
|
73
|
+
*/
|
|
74
|
+
const TransactionDataSchema = Schema.Union(NonEmptyUint8ArraySchema, Base58HashSchema).annotations({
|
|
75
|
+
identifier: "TransactionData",
|
|
76
|
+
description: "Transaction data as Uint8Array or Base58 encoded string"
|
|
80
77
|
});
|
|
81
78
|
/**
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
79
|
+
* Schema for contract key (Uint8Array or Base58 string)
|
|
80
|
+
*/
|
|
81
|
+
const ContractKeySchema = Schema.Union(NonEmptyUint8ArraySchema, Base58HashSchema).annotations({
|
|
82
|
+
identifier: "ContractKey",
|
|
83
|
+
description: "Contract key as Uint8Array or Base58 encoded string"
|
|
87
84
|
});
|
|
88
85
|
/**
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
86
|
+
* Schema for bytecode (Uint8Array or ArrayBuffer)
|
|
87
|
+
*/
|
|
88
|
+
const BytecodeSchema = Schema.Union(NonEmptyUint8ArraySchema, NonEmptyArrayBufferSchema).annotations({
|
|
89
|
+
identifier: "Bytecode",
|
|
90
|
+
description: "Contract bytecode as Uint8Array or ArrayBuffer"
|
|
94
91
|
});
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
*/
|
|
99
|
-
export const SafePositiveNumberSchema = Schema.Int.pipe(Schema.positive(), Schema.filter((n) => n <= Number.MAX_SAFE_INTEGER, {
|
|
100
|
-
identifier: 'SafePositiveNumber',
|
|
101
|
-
description: 'Positive integer within safe integer range'
|
|
92
|
+
Schema.Int.pipe(Schema.positive(), Schema.filter((n) => n <= Number.MAX_SAFE_INTEGER, {
|
|
93
|
+
identifier: "SafePositiveNumber",
|
|
94
|
+
description: "Positive integer within safe integer range"
|
|
102
95
|
}));
|
|
96
|
+
//#endregion
|
|
97
|
+
export { Base58AddressSchema, Base58HashSchema, Base58PublicKeySchema, BytecodeSchema, ContractKeySchema, NonEmptyStringSchema, TransactionDataSchema, TransactionFiltersSchema };
|
|
98
|
+
|
|
103
99
|
//# sourceMappingURL=schemas.js.map
|
package/dist/schemas.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.js","
|
|
1
|
+
{"version":3,"file":"schemas.js","names":[],"sources":["../src/schemas.ts"],"sourcesContent":["/**\n * Effect Schema definitions for validation\n *\n * Provides reusable schemas for validating common data types used throughout the SDK\n */\n\nimport { Schema } from 'effect'\n\n/**\n * Base58 character set regex pattern\n * Base58 excludes 0, O, I, l to avoid visual confusion\n */\nconst BASE58_PATTERN = /^[1-9A-HJ-NP-Za-km-z]+$/\n\n/**\n * Schema for Base58 encoded hash (used for transaction IDs, entry hashes, etc.)\n */\nexport const Base58HashSchema = Schema.String.pipe(\n\tSchema.nonEmptyString(),\n\tSchema.pattern(BASE58_PATTERN, {\n\t\tidentifier: 'Base58Hash',\n\t\tdescription: 'Base58 encoded hash string'\n\t})\n)\n\n/**\n * Schema for Base58 encoded address\n */\nexport const Base58AddressSchema = Schema.String.pipe(\n\tSchema.nonEmptyString(),\n\tSchema.pattern(BASE58_PATTERN, {\n\t\tidentifier: 'Base58Address',\n\t\tdescription: 'Base58 encoded address string'\n\t})\n)\n\n/**\n * Schema for Base58 encoded public key\n */\nexport const Base58PublicKeySchema = Schema.String.pipe(\n\tSchema.nonEmptyString(),\n\tSchema.pattern(BASE58_PATTERN, {\n\t\tidentifier: 'Base58PublicKey',\n\t\tdescription: 'Base58 encoded public key string'\n\t})\n)\n\n/**\n * Schema for transaction sort order\n */\nexport const TransactionSortSchema = Schema.Literal('asc', 'desc').annotations({\n\tidentifier: 'TransactionSort'\n})\n\n/**\n * Schema for transaction filters\n * Validates optional fields when they are present\n */\nexport const TransactionFiltersSchema = Schema.Struct({\n\tlimit: Schema.optional(Schema.NonNegativeInt),\n\toffset: Schema.optional(Schema.NonNegativeInt),\n\tsort: Schema.optional(TransactionSortSchema),\n\tcursor: Schema.optional(Schema.String),\n\tcursor_b58: Schema.optional(Schema.String),\n\tcontract: Schema.optional(Schema.String),\n\tcontract_b58: Schema.optional(Schema.String),\n\tfunction: Schema.optional(Schema.String),\n\ttype: Schema.optional(Schema.Literal('sent', 'recv'))\n}).annotations({\n\tidentifier: 'TransactionFilters'\n})\n\n/**\n * Schema for non-empty string\n */\nexport const NonEmptyStringSchema = Schema.String.pipe(Schema.nonEmptyString())\n\n/**\n * Schema for non-empty Uint8Array\n */\nexport const NonEmptyUint8ArraySchema = Schema.instanceOf(Uint8Array).pipe(\n\tSchema.filter((arr) => arr.length > 0, {\n\t\tidentifier: 'NonEmptyUint8Array',\n\t\tdescription: 'Non-empty Uint8Array'\n\t})\n)\n\n/**\n * Schema for ArrayBuffer (can be converted to Uint8Array)\n */\nexport const NonEmptyArrayBufferSchema = Schema.instanceOf(ArrayBuffer).pipe(\n\tSchema.filter((buf) => buf.byteLength > 0, {\n\t\tidentifier: 'NonEmptyArrayBuffer',\n\t\tdescription: 'Non-empty ArrayBuffer'\n\t})\n)\n\n/**\n * Schema for transaction data (Uint8Array or non-empty Base58 string)\n */\nexport const TransactionDataSchema = Schema.Union(\n\tNonEmptyUint8ArraySchema,\n\tBase58HashSchema\n).annotations({\n\tidentifier: 'TransactionData',\n\tdescription: 'Transaction data as Uint8Array or Base58 encoded string'\n})\n\n/**\n * Schema for contract key (Uint8Array or Base58 string)\n */\nexport const ContractKeySchema = Schema.Union(\n\tNonEmptyUint8ArraySchema,\n\tBase58HashSchema\n).annotations({\n\tidentifier: 'ContractKey',\n\tdescription: 'Contract key as Uint8Array or Base58 encoded string'\n})\n\n/**\n * Schema for bytecode (Uint8Array or ArrayBuffer)\n */\nexport const BytecodeSchema = Schema.Union(\n\tNonEmptyUint8ArraySchema,\n\tNonEmptyArrayBufferSchema\n).annotations({\n\tidentifier: 'Bytecode',\n\tdescription: 'Contract bytecode as Uint8Array or ArrayBuffer'\n})\n\n/**\n * Schema for safe positive integer (>= 1, within safe integer range)\n * Uses built-in Schema.Int and Schema.positive() with MAX_SAFE_INTEGER constraint\n */\nexport const SafePositiveNumberSchema = Schema.Int.pipe(\n\tSchema.positive(),\n\tSchema.filter((n) => n <= Number.MAX_SAFE_INTEGER, {\n\t\tidentifier: 'SafePositiveNumber',\n\t\tdescription: 'Positive integer within safe integer range'\n\t})\n)\n"],"mappings":";;;;;;;;;;;AAYA,MAAM,iBAAiB;;;;AAKvB,MAAa,mBAAmB,OAAO,OAAO,KAC7C,OAAO,gBAAgB,EACvB,OAAO,QAAQ,gBAAgB;CAC9B,YAAY;CACZ,aAAa;CACb,CAAC,CACF;;;;AAKD,MAAa,sBAAsB,OAAO,OAAO,KAChD,OAAO,gBAAgB,EACvB,OAAO,QAAQ,gBAAgB;CAC9B,YAAY;CACZ,aAAa;CACb,CAAC,CACF;;;;AAKD,MAAa,wBAAwB,OAAO,OAAO,KAClD,OAAO,gBAAgB,EACvB,OAAO,QAAQ,gBAAgB;CAC9B,YAAY;CACZ,aAAa;CACb,CAAC,CACF;;;;AAKD,MAAa,wBAAwB,OAAO,QAAQ,OAAO,OAAO,CAAC,YAAY,EAC9E,YAAY,mBACZ,CAAC;;;;;AAMF,MAAa,2BAA2B,OAAO,OAAO;CACrD,OAAO,OAAO,SAAS,OAAO,eAAe;CAC7C,QAAQ,OAAO,SAAS,OAAO,eAAe;CAC9C,MAAM,OAAO,SAAS,sBAAsB;CAC5C,QAAQ,OAAO,SAAS,OAAO,OAAO;CACtC,YAAY,OAAO,SAAS,OAAO,OAAO;CAC1C,UAAU,OAAO,SAAS,OAAO,OAAO;CACxC,cAAc,OAAO,SAAS,OAAO,OAAO;CAC5C,UAAU,OAAO,SAAS,OAAO,OAAO;CACxC,MAAM,OAAO,SAAS,OAAO,QAAQ,QAAQ,OAAO,CAAC;CACrD,CAAC,CAAC,YAAY,EACd,YAAY,sBACZ,CAAC;;;;AAKF,MAAa,uBAAuB,OAAO,OAAO,KAAK,OAAO,gBAAgB,CAAC;;;;AAK/E,MAAa,2BAA2B,OAAO,WAAW,WAAW,CAAC,KACrE,OAAO,QAAQ,QAAQ,IAAI,SAAS,GAAG;CACtC,YAAY;CACZ,aAAa;CACb,CAAC,CACF;;;;AAKD,MAAa,4BAA4B,OAAO,WAAW,YAAY,CAAC,KACvE,OAAO,QAAQ,QAAQ,IAAI,aAAa,GAAG;CAC1C,YAAY;CACZ,aAAa;CACb,CAAC,CACF;;;;AAKD,MAAa,wBAAwB,OAAO,MAC3C,0BACA,iBACA,CAAC,YAAY;CACb,YAAY;CACZ,aAAa;CACb,CAAC;;;;AAKF,MAAa,oBAAoB,OAAO,MACvC,0BACA,iBACA,CAAC,YAAY;CACb,YAAY;CACZ,aAAa;CACb,CAAC;;;;AAKF,MAAa,iBAAiB,OAAO,MACpC,0BACA,0BACA,CAAC,YAAY;CACb,YAAY;CACZ,aAAa;CACb,CAAC;AAMsC,OAAO,IAAI,KAClD,OAAO,UAAU,EACjB,OAAO,QAAQ,MAAM,KAAK,OAAO,kBAAkB;CAClD,YAAY;CACZ,aAAa;CACb,CAAC,CACF"}
|
package/dist/sdk.d.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
1
|
+
import { AmadeusSDKConfig } from "./types.js";
|
|
2
|
+
import { AmadeusClient } from "./client.js";
|
|
3
|
+
import { ChainAPI } from "./api/chain.js";
|
|
4
|
+
import { ContractAPI } from "./api/contract.js";
|
|
5
|
+
import { EpochAPI } from "./api/epoch.js";
|
|
6
|
+
import { PeerAPI } from "./api/peer.js";
|
|
7
|
+
import { ProofAPI } from "./api/proof.js";
|
|
8
|
+
import { TransactionAPI } from "./api/transaction.js";
|
|
9
|
+
import { WalletAPI } from "./api/wallet.js";
|
|
10
|
+
|
|
11
|
+
//#region src/sdk.d.ts
|
|
10
12
|
/**
|
|
11
13
|
* Main Amadeus SDK class
|
|
12
14
|
*
|
|
@@ -40,61 +42,63 @@ import { ChainAPI, PeerAPI, TransactionAPI, WalletAPI, ContractAPI, EpochAPI, Pr
|
|
|
40
42
|
* const scores = await sdk.epoch.getScore()
|
|
41
43
|
* ```
|
|
42
44
|
*/
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
45
|
+
declare class AmadeusSDK {
|
|
46
|
+
/** HTTP client instance */
|
|
47
|
+
readonly client: AmadeusClient;
|
|
48
|
+
/** Chain API module for blockchain queries */
|
|
49
|
+
readonly chain: ChainAPI;
|
|
50
|
+
/** Peer API module for network information */
|
|
51
|
+
readonly peer: PeerAPI;
|
|
52
|
+
/** Transaction API module for submitting transactions */
|
|
53
|
+
readonly transaction: TransactionAPI;
|
|
54
|
+
/** Wallet API module for balance queries */
|
|
55
|
+
readonly wallet: WalletAPI;
|
|
56
|
+
/** Contract API module for smart contract interactions */
|
|
57
|
+
readonly contract: ContractAPI;
|
|
58
|
+
/** Epoch API module for epoch and validator data */
|
|
59
|
+
readonly epoch: EpochAPI;
|
|
60
|
+
/** Proof API module for validator proofs */
|
|
61
|
+
readonly proof: ProofAPI;
|
|
62
|
+
/**
|
|
63
|
+
* Create a new AmadeusSDK instance
|
|
64
|
+
*
|
|
65
|
+
* @param config - SDK configuration
|
|
66
|
+
* @throws {AmadeusSDKError} If configuration is invalid
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```ts
|
|
70
|
+
* // Use default node URL
|
|
71
|
+
* const sdk = new AmadeusSDK({})
|
|
72
|
+
*
|
|
73
|
+
* // Use custom node URL
|
|
74
|
+
* const sdk = new AmadeusSDK({
|
|
75
|
+
* baseUrl: 'https://custom-node.com/api',
|
|
76
|
+
* timeout: 60000
|
|
77
|
+
* })
|
|
78
|
+
* ```
|
|
79
|
+
*/
|
|
80
|
+
constructor(config?: AmadeusSDKConfig);
|
|
81
|
+
/**
|
|
82
|
+
* Get SDK version
|
|
83
|
+
*/
|
|
84
|
+
static getVersion(): string;
|
|
85
|
+
/**
|
|
86
|
+
* Get the current configuration
|
|
87
|
+
*/
|
|
88
|
+
getConfig(): AmadeusSDKConfig;
|
|
89
|
+
/**
|
|
90
|
+
* Update the base URL
|
|
91
|
+
*/
|
|
92
|
+
setBaseUrl(url: string): void;
|
|
93
|
+
/**
|
|
94
|
+
* Update headers
|
|
95
|
+
*/
|
|
96
|
+
setHeaders(headers: Record<string, string>): void;
|
|
97
|
+
/**
|
|
98
|
+
* Cancel ongoing requests
|
|
99
|
+
*/
|
|
100
|
+
cancel(): void;
|
|
99
101
|
}
|
|
102
|
+
//#endregion
|
|
103
|
+
export { AmadeusSDK };
|
|
100
104
|
//# sourceMappingURL=sdk.d.ts.map
|
package/dist/sdk.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.d.ts","
|
|
1
|
+
{"version":3,"file":"sdk.d.ts","names":[],"sources":["../src/sdk.ts"],"mappings":";;;;;;;;;;;;;AAqDA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAAa,UAAA;;WAEI,MAAA,EAAQ,aAAA;EAyCZ;EAAA,SAtCI,KAAA,EAAO,QAAA;EA6DvB;EAAA,SA1DgB,IAAA,EAAM,OAAA;EAiEtB;EAAA,SA9DgB,WAAA,EAAa,cAAA;EAqE7B;EAAA,SAlEgB,MAAA,EAAQ,SAAA;EAkEb;EAAA,SA/DK,QAAA,EAAU,WAAA;EAsEpB;EAAA,SAnEU,KAAA,EAAO,QAAA;;WAGP,KAAA,EAAO,QAAA;;;;;;;;;;;;;;;;;;;cAoBX,MAAA,GAAQ,gBAAA;;;;SAgBb,UAAA,CAAA;;;;EAOP,SAAA,CAAA,GAAa,gBAAA;;;;EAOb,UAAA,CAAW,GAAA;;;;EAOX,UAAA,CAAW,OAAA,EAAS,MAAA;;;;EAOpB,MAAA,CAAA;AAAA"}
|
package/dist/sdk.js
CHANGED
|
@@ -1,120 +1,129 @@
|
|
|
1
|
+
import { NODE_API_URL, SDK_VERSION } from "./constants.js";
|
|
2
|
+
import { AmadeusClient } from "./client.js";
|
|
3
|
+
import { ChainAPI } from "./api/chain.js";
|
|
4
|
+
import { ContractAPI } from "./api/contract.js";
|
|
5
|
+
import { EpochAPI } from "./api/epoch.js";
|
|
6
|
+
import { PeerAPI } from "./api/peer.js";
|
|
7
|
+
import { ProofAPI } from "./api/proof.js";
|
|
8
|
+
import { TransactionAPI } from "./api/transaction.js";
|
|
9
|
+
import { WalletAPI } from "./api/wallet.js";
|
|
10
|
+
//#region src/sdk.ts
|
|
1
11
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import { AmadeusClient } from './client';
|
|
8
|
-
import { ChainAPI, PeerAPI, TransactionAPI, WalletAPI, ContractAPI, EpochAPI, ProofAPI } from './api';
|
|
9
|
-
import { SDK_VERSION, NODE_API_URL } from './constants';
|
|
12
|
+
* Amadeus SDK
|
|
13
|
+
*
|
|
14
|
+
* Main SDK class that provides access to all API modules and utilities.
|
|
15
|
+
* This is the primary entry point for interacting with the Amadeus Protocol.
|
|
16
|
+
*/
|
|
10
17
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
18
|
+
* Main Amadeus SDK class
|
|
19
|
+
*
|
|
20
|
+
* Provides a unified interface to interact with the Amadeus Protocol.
|
|
21
|
+
* All API modules are accessible through this class instance.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* import { AmadeusSDK } from '@amadeus-protocol/sdk'
|
|
26
|
+
*
|
|
27
|
+
* // Initialize SDK with default node URL
|
|
28
|
+
* const sdk = new AmadeusSDK({
|
|
29
|
+
* baseUrl: 'https://mainnet-rpc.ama.one/api'
|
|
30
|
+
* })
|
|
31
|
+
*
|
|
32
|
+
* // Query chain
|
|
33
|
+
* const tip = await sdk.chain.getTip()
|
|
34
|
+
* const stats = await sdk.chain.getStats()
|
|
35
|
+
*
|
|
36
|
+
* // Query wallet balances
|
|
37
|
+
* const balance = await sdk.wallet.getBalance('5Kd3N...', 'AMA')
|
|
38
|
+
* const allBalances = await sdk.wallet.getAllBalances('5Kd3N...')
|
|
39
|
+
*
|
|
40
|
+
* // Submit transaction
|
|
41
|
+
* const result = await sdk.transaction.submit(txPacked)
|
|
42
|
+
*
|
|
43
|
+
* // Query contracts
|
|
44
|
+
* const contractData = await sdk.contract.get(key)
|
|
45
|
+
*
|
|
46
|
+
* // Query epoch data
|
|
47
|
+
* const scores = await sdk.epoch.getScore()
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
var AmadeusSDK = class {
|
|
51
|
+
/** HTTP client instance */
|
|
52
|
+
client;
|
|
53
|
+
/** Chain API module for blockchain queries */
|
|
54
|
+
chain;
|
|
55
|
+
/** Peer API module for network information */
|
|
56
|
+
peer;
|
|
57
|
+
/** Transaction API module for submitting transactions */
|
|
58
|
+
transaction;
|
|
59
|
+
/** Wallet API module for balance queries */
|
|
60
|
+
wallet;
|
|
61
|
+
/** Contract API module for smart contract interactions */
|
|
62
|
+
contract;
|
|
63
|
+
/** Epoch API module for epoch and validator data */
|
|
64
|
+
epoch;
|
|
65
|
+
/** Proof API module for validator proofs */
|
|
66
|
+
proof;
|
|
67
|
+
/**
|
|
68
|
+
* Create a new AmadeusSDK instance
|
|
69
|
+
*
|
|
70
|
+
* @param config - SDK configuration
|
|
71
|
+
* @throws {AmadeusSDKError} If configuration is invalid
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```ts
|
|
75
|
+
* // Use default node URL
|
|
76
|
+
* const sdk = new AmadeusSDK({})
|
|
77
|
+
*
|
|
78
|
+
* // Use custom node URL
|
|
79
|
+
* const sdk = new AmadeusSDK({
|
|
80
|
+
* baseUrl: 'https://custom-node.com/api',
|
|
81
|
+
* timeout: 60000
|
|
82
|
+
* })
|
|
83
|
+
* ```
|
|
84
|
+
*/
|
|
85
|
+
constructor(config = { baseUrl: NODE_API_URL }) {
|
|
86
|
+
this.client = new AmadeusClient(config);
|
|
87
|
+
this.chain = new ChainAPI(this.client);
|
|
88
|
+
this.peer = new PeerAPI(this.client);
|
|
89
|
+
this.transaction = new TransactionAPI(this.client);
|
|
90
|
+
this.wallet = new WalletAPI(this.client);
|
|
91
|
+
this.contract = new ContractAPI(this.client);
|
|
92
|
+
this.epoch = new EpochAPI(this.client);
|
|
93
|
+
this.proof = new ProofAPI(this.client);
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Get SDK version
|
|
97
|
+
*/
|
|
98
|
+
static getVersion() {
|
|
99
|
+
return SDK_VERSION;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Get the current configuration
|
|
103
|
+
*/
|
|
104
|
+
getConfig() {
|
|
105
|
+
return this.client.getConfig();
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Update the base URL
|
|
109
|
+
*/
|
|
110
|
+
setBaseUrl(url) {
|
|
111
|
+
this.client.setBaseUrl(url);
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Update headers
|
|
115
|
+
*/
|
|
116
|
+
setHeaders(headers) {
|
|
117
|
+
this.client.setHeaders(headers);
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Cancel ongoing requests
|
|
121
|
+
*/
|
|
122
|
+
cancel() {
|
|
123
|
+
this.client.cancel();
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
//#endregion
|
|
127
|
+
export { AmadeusSDK };
|
|
128
|
+
|
|
120
129
|
//# sourceMappingURL=sdk.js.map
|
package/dist/sdk.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.js","
|
|
1
|
+
{"version":3,"file":"sdk.js","names":[],"sources":["../src/sdk.ts"],"sourcesContent":["/**\n * Amadeus SDK\n *\n * Main SDK class that provides access to all API modules and utilities.\n * This is the primary entry point for interacting with the Amadeus Protocol.\n */\n\nimport { AmadeusClient } from './client'\nimport type { AmadeusSDKConfig } from './types'\nimport {\n\tChainAPI,\n\tPeerAPI,\n\tTransactionAPI,\n\tWalletAPI,\n\tContractAPI,\n\tEpochAPI,\n\tProofAPI\n} from './api'\nimport { SDK_VERSION, NODE_API_URL } from './constants'\n\n/**\n * Main Amadeus SDK class\n *\n * Provides a unified interface to interact with the Amadeus Protocol.\n * All API modules are accessible through this class instance.\n *\n * @example\n * ```ts\n * import { AmadeusSDK } from '@amadeus-protocol/sdk'\n *\n * // Initialize SDK with default node URL\n * const sdk = new AmadeusSDK({\n * baseUrl: 'https://mainnet-rpc.ama.one/api'\n * })\n *\n * // Query chain\n * const tip = await sdk.chain.getTip()\n * const stats = await sdk.chain.getStats()\n *\n * // Query wallet balances\n * const balance = await sdk.wallet.getBalance('5Kd3N...', 'AMA')\n * const allBalances = await sdk.wallet.getAllBalances('5Kd3N...')\n *\n * // Submit transaction\n * const result = await sdk.transaction.submit(txPacked)\n *\n * // Query contracts\n * const contractData = await sdk.contract.get(key)\n *\n * // Query epoch data\n * const scores = await sdk.epoch.getScore()\n * ```\n */\nexport class AmadeusSDK {\n\t/** HTTP client instance */\n\tpublic readonly client: AmadeusClient\n\n\t/** Chain API module for blockchain queries */\n\tpublic readonly chain: ChainAPI\n\n\t/** Peer API module for network information */\n\tpublic readonly peer: PeerAPI\n\n\t/** Transaction API module for submitting transactions */\n\tpublic readonly transaction: TransactionAPI\n\n\t/** Wallet API module for balance queries */\n\tpublic readonly wallet: WalletAPI\n\n\t/** Contract API module for smart contract interactions */\n\tpublic readonly contract: ContractAPI\n\n\t/** Epoch API module for epoch and validator data */\n\tpublic readonly epoch: EpochAPI\n\n\t/** Proof API module for validator proofs */\n\tpublic readonly proof: ProofAPI\n\n\t/**\n\t * Create a new AmadeusSDK instance\n\t *\n\t * @param config - SDK configuration\n\t * @throws {AmadeusSDKError} If configuration is invalid\n\t *\n\t * @example\n\t * ```ts\n\t * // Use default node URL\n\t * const sdk = new AmadeusSDK({})\n\t *\n\t * // Use custom node URL\n\t * const sdk = new AmadeusSDK({\n\t * baseUrl: 'https://custom-node.com/api',\n\t * timeout: 60000\n\t * })\n\t * ```\n\t */\n\tconstructor(config: AmadeusSDKConfig = { baseUrl: NODE_API_URL }) {\n\t\tthis.client = new AmadeusClient(config)\n\n\t\t// Initialize API modules\n\t\tthis.chain = new ChainAPI(this.client)\n\t\tthis.peer = new PeerAPI(this.client)\n\t\tthis.transaction = new TransactionAPI(this.client)\n\t\tthis.wallet = new WalletAPI(this.client)\n\t\tthis.contract = new ContractAPI(this.client)\n\t\tthis.epoch = new EpochAPI(this.client)\n\t\tthis.proof = new ProofAPI(this.client)\n\t}\n\n\t/**\n\t * Get SDK version\n\t */\n\tstatic getVersion(): string {\n\t\treturn SDK_VERSION\n\t}\n\n\t/**\n\t * Get the current configuration\n\t */\n\tgetConfig(): AmadeusSDKConfig {\n\t\treturn this.client.getConfig()\n\t}\n\n\t/**\n\t * Update the base URL\n\t */\n\tsetBaseUrl(url: string): void {\n\t\tthis.client.setBaseUrl(url)\n\t}\n\n\t/**\n\t * Update headers\n\t */\n\tsetHeaders(headers: Record<string, string>): void {\n\t\tthis.client.setHeaders(headers)\n\t}\n\n\t/**\n\t * Cancel ongoing requests\n\t */\n\tcancel(): void {\n\t\tthis.client.cancel()\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqDA,IAAa,aAAb,MAAwB;;CAEvB;;CAGA;;CAGA;;CAGA;;CAGA;;CAGA;;CAGA;;CAGA;;;;;;;;;;;;;;;;;;;CAoBA,YAAY,SAA2B,EAAE,SAAS,cAAc,EAAE;EACjE,KAAK,SAAS,IAAI,cAAc,OAAO;EAGvC,KAAK,QAAQ,IAAI,SAAS,KAAK,OAAO;EACtC,KAAK,OAAO,IAAI,QAAQ,KAAK,OAAO;EACpC,KAAK,cAAc,IAAI,eAAe,KAAK,OAAO;EAClD,KAAK,SAAS,IAAI,UAAU,KAAK,OAAO;EACxC,KAAK,WAAW,IAAI,YAAY,KAAK,OAAO;EAC5C,KAAK,QAAQ,IAAI,SAAS,KAAK,OAAO;EACtC,KAAK,QAAQ,IAAI,SAAS,KAAK,OAAO;;;;;CAMvC,OAAO,aAAqB;EAC3B,OAAO;;;;;CAMR,YAA8B;EAC7B,OAAO,KAAK,OAAO,WAAW;;;;;CAM/B,WAAW,KAAmB;EAC7B,KAAK,OAAO,WAAW,IAAI;;;;;CAM5B,WAAW,SAAuC;EACjD,KAAK,OAAO,WAAW,QAAQ;;;;;CAMhC,SAAe;EACd,KAAK,OAAO,QAAQ"}
|