@gearbox-protocol/sdk 13.0.0-next.25 → 13.0.0-next.26
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.
|
@@ -52,6 +52,9 @@ function getRpcProviderUrl(provider, network, apiKey, protocol = "http") {
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
function getAlchemyUrl(network, apiKey, protocol = "http") {
|
|
55
|
+
if (!apiKey) {
|
|
56
|
+
return void 0;
|
|
57
|
+
}
|
|
55
58
|
const alchemyDomain = ALCHEMY_DOMAINS[network];
|
|
56
59
|
if (!alchemyDomain) {
|
|
57
60
|
return void 0;
|
|
@@ -95,6 +98,9 @@ const ALCHEMY_DOMAINS = {
|
|
|
95
98
|
Somnia: null
|
|
96
99
|
};
|
|
97
100
|
function getDrpcUrl(network, apiKey, protocol = "http") {
|
|
101
|
+
if (!apiKey) {
|
|
102
|
+
return void 0;
|
|
103
|
+
}
|
|
98
104
|
const net = DRPC_NETS[network];
|
|
99
105
|
return net ? `${protocol}s://lb.drpc.live/${net}/${apiKey}` : void 0;
|
|
100
106
|
}
|
|
@@ -117,6 +123,9 @@ const ANKR_DOMAINS = {
|
|
|
117
123
|
Somnia: "somnia_mainnet"
|
|
118
124
|
};
|
|
119
125
|
function getAnkrUrl(network, apiKey, protocol = "http") {
|
|
126
|
+
if (!apiKey) {
|
|
127
|
+
return void 0;
|
|
128
|
+
}
|
|
120
129
|
const net = ANKR_DOMAINS[network];
|
|
121
130
|
const sep = protocol === "ws" ? "/ws/" : "/";
|
|
122
131
|
return net ? `${protocol}s://rpc.ankr.com/${net}${sep}${apiKey}` : void 0;
|
|
@@ -140,6 +149,9 @@ const THIRDWEB_DOMAINS = {
|
|
|
140
149
|
Somnia: import_sdk.chains.Somnia.id.toString()
|
|
141
150
|
};
|
|
142
151
|
function getThirdWebUrl(network, apiKey, protocol = "http") {
|
|
152
|
+
if (!apiKey) {
|
|
153
|
+
return void 0;
|
|
154
|
+
}
|
|
143
155
|
if (protocol === "ws") {
|
|
144
156
|
return void 0;
|
|
145
157
|
}
|
|
@@ -22,6 +22,9 @@ function getRpcProviderUrl(provider, network, apiKey, protocol = "http") {
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
function getAlchemyUrl(network, apiKey, protocol = "http") {
|
|
25
|
+
if (!apiKey) {
|
|
26
|
+
return void 0;
|
|
27
|
+
}
|
|
25
28
|
const alchemyDomain = ALCHEMY_DOMAINS[network];
|
|
26
29
|
if (!alchemyDomain) {
|
|
27
30
|
return void 0;
|
|
@@ -65,6 +68,9 @@ const ALCHEMY_DOMAINS = {
|
|
|
65
68
|
Somnia: null
|
|
66
69
|
};
|
|
67
70
|
function getDrpcUrl(network, apiKey, protocol = "http") {
|
|
71
|
+
if (!apiKey) {
|
|
72
|
+
return void 0;
|
|
73
|
+
}
|
|
68
74
|
const net = DRPC_NETS[network];
|
|
69
75
|
return net ? `${protocol}s://lb.drpc.live/${net}/${apiKey}` : void 0;
|
|
70
76
|
}
|
|
@@ -87,6 +93,9 @@ const ANKR_DOMAINS = {
|
|
|
87
93
|
Somnia: "somnia_mainnet"
|
|
88
94
|
};
|
|
89
95
|
function getAnkrUrl(network, apiKey, protocol = "http") {
|
|
96
|
+
if (!apiKey) {
|
|
97
|
+
return void 0;
|
|
98
|
+
}
|
|
90
99
|
const net = ANKR_DOMAINS[network];
|
|
91
100
|
const sep = protocol === "ws" ? "/ws/" : "/";
|
|
92
101
|
return net ? `${protocol}s://rpc.ankr.com/${net}${sep}${apiKey}` : void 0;
|
|
@@ -110,6 +119,9 @@ const THIRDWEB_DOMAINS = {
|
|
|
110
119
|
Somnia: chains.Somnia.id.toString()
|
|
111
120
|
};
|
|
112
121
|
function getThirdWebUrl(network, apiKey, protocol = "http") {
|
|
122
|
+
if (!apiKey) {
|
|
123
|
+
return void 0;
|
|
124
|
+
}
|
|
113
125
|
if (protocol === "ws") {
|
|
114
126
|
return void 0;
|
|
115
127
|
}
|
|
@@ -8,11 +8,11 @@ export declare const rpcProvidersSchema: z.ZodEnum<{
|
|
|
8
8
|
ankr: "ankr";
|
|
9
9
|
}>;
|
|
10
10
|
export type RpcProvider = z.infer<typeof rpcProvidersSchema>;
|
|
11
|
-
export declare function getRpcProviderUrl(provider: RpcProvider, network: NetworkType, apiKey
|
|
12
|
-
export declare function getAlchemyUrl(network: NetworkType, apiKey
|
|
13
|
-
export declare function getDrpcUrl(network: NetworkType, apiKey
|
|
14
|
-
export declare function getAnkrUrl(network: NetworkType, apiKey
|
|
15
|
-
export declare function getThirdWebUrl(network: NetworkType, apiKey
|
|
11
|
+
export declare function getRpcProviderUrl(provider: RpcProvider, network: NetworkType, apiKey?: string, protocol?: "http" | "ws"): string | undefined;
|
|
12
|
+
export declare function getAlchemyUrl(network: NetworkType, apiKey?: string, protocol?: "http" | "ws"): string | undefined;
|
|
13
|
+
export declare function getDrpcUrl(network: NetworkType, apiKey?: string, protocol?: "http" | "ws"): string | undefined;
|
|
14
|
+
export declare function getAnkrUrl(network: NetworkType, apiKey?: string, protocol?: "http" | "ws"): string | undefined;
|
|
15
|
+
export declare function getThirdWebUrl(network: NetworkType, apiKey?: string, protocol?: "http" | "ws"): string | undefined;
|
|
16
16
|
export declare function getErpcKey(network: NetworkType, projectId?: string, urlBase?: string): string | undefined;
|
|
17
17
|
/**
|
|
18
18
|
Non-existent event:
|