@xoxno/sdk-js 1.0.44 → 1.0.46
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/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/interactor.cjs.js +1 -1
- package/dist/interactor.esm.js +1 -1
- package/dist/sdk/types.d.ts +1 -7
- package/dist/utils/api.d.ts +11 -2
- package/package.json +1 -1
package/dist/sdk/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { OurRequestInit } from '../utils/api';
|
|
1
2
|
import type { endpoints as routes } from './swagger';
|
|
2
3
|
type RemoveColon<S extends string> = S extends `:${infer R}` ? R : S;
|
|
3
4
|
type CamelCase<S extends string> = S extends `${infer Head}-${infer Tail}` ? `${Head}${CamelCase<Capitalize<Tail>>}` : S;
|
|
@@ -20,13 +21,6 @@ type BodyBag<VB, Defined extends boolean> = Defined extends true ? IsEmptyObj<VB
|
|
|
20
21
|
} : {
|
|
21
22
|
body?: RequireAtLeastOne<VB>;
|
|
22
23
|
};
|
|
23
|
-
type SafeHeaders = Record<string, string> & {
|
|
24
|
-
authorization?: never;
|
|
25
|
-
Authorization?: never;
|
|
26
|
-
};
|
|
27
|
-
export type OurRequestInit = Omit<RequestInit, 'body' | 'headers'> & {
|
|
28
|
-
headers?: SafeHeaders;
|
|
29
|
-
};
|
|
30
24
|
type SecurityModeOf<T> = T extends {
|
|
31
25
|
securityMode: infer S;
|
|
32
26
|
} ? S : undefined;
|
package/dist/utils/api.d.ts
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import type { IChainID } from '@multiversx/sdk-core/out/interface';
|
|
2
|
+
type SafeHeaders = Record<string, string> & {
|
|
3
|
+
authorization?: never;
|
|
4
|
+
Authorization?: never;
|
|
5
|
+
};
|
|
6
|
+
export type OurRequestInit = Omit<RequestInit, 'body' | 'headers'> & {
|
|
7
|
+
headers?: SafeHeaders;
|
|
8
|
+
};
|
|
2
9
|
export declare enum Chain {
|
|
3
10
|
MAINNET = "1",
|
|
4
11
|
DEVNET = "D"
|
|
@@ -6,6 +13,7 @@ export declare enum Chain {
|
|
|
6
13
|
export declare class XOXNOClient {
|
|
7
14
|
apiUrl: string;
|
|
8
15
|
chain: IChainID;
|
|
16
|
+
init: OurRequestInit;
|
|
9
17
|
config: {
|
|
10
18
|
mediaUrl: string;
|
|
11
19
|
gatewayUrl: string;
|
|
@@ -17,11 +25,12 @@ export declare class XOXNOClient {
|
|
|
17
25
|
Manager_SC: string;
|
|
18
26
|
P2P_SC: string;
|
|
19
27
|
};
|
|
20
|
-
constructor({ chain, apiUrl, }?: {
|
|
28
|
+
constructor({ chain, apiUrl, ...init }?: {
|
|
21
29
|
chain?: Chain;
|
|
22
30
|
apiUrl?: string;
|
|
23
|
-
});
|
|
31
|
+
} & OurRequestInit);
|
|
24
32
|
fetchWithTimeout: <T>(path: string, { params, ...options }?: RequestInit & {
|
|
25
33
|
params?: Record<string, any>;
|
|
26
34
|
}) => Promise<T>;
|
|
27
35
|
}
|
|
36
|
+
export {};
|