@hashgraphonline/standards-sdk 0.1.186 → 0.1.188
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/README.md +3 -0
- package/dist/browser/services/registry-broker/client/agent-network.d.ts +974 -0
- package/dist/browser/services/registry-broker/client/agent-network.d.ts.map +1 -0
- package/dist/browser/services/registry-broker/client/base-client.d.ts +4 -0
- package/dist/browser/services/registry-broker/client/base-client.d.ts.map +1 -1
- package/dist/browser/services/registry-broker/client.d.ts +1 -0
- package/dist/browser/services/registry-broker/client.d.ts.map +1 -1
- package/dist/browser/standards-sdk.browser.js +149 -0
- package/dist/browser/standards-sdk.browser.js.map +1 -1
- package/dist/browser-root/services/registry-broker/client/agent-network.d.ts +974 -0
- package/dist/browser-root/services/registry-broker/client/agent-network.d.ts.map +1 -0
- package/dist/browser-root/services/registry-broker/client/base-client.d.ts +4 -0
- package/dist/browser-root/services/registry-broker/client/base-client.d.ts.map +1 -1
- package/dist/browser-root/services/registry-broker/client.d.ts +1 -0
- package/dist/browser-root/services/registry-broker/client.d.ts.map +1 -1
- package/dist/browser-root/standards-sdk.root-browser.js +404 -15
- package/dist/browser-root/standards-sdk.root-browser.js.map +1 -1
- package/dist/cjs/services/registry-broker/client/agent-network.d.ts +974 -0
- package/dist/cjs/services/registry-broker/client/agent-network.d.ts.map +1 -0
- package/dist/cjs/services/registry-broker/client/base-client.d.ts +4 -0
- package/dist/cjs/services/registry-broker/client/base-client.d.ts.map +1 -1
- package/dist/cjs/services/registry-broker/client.d.ts +1 -0
- package/dist/cjs/services/registry-broker/client.d.ts.map +1 -1
- package/dist/cjs/standards-sdk.cjs +2 -2
- package/dist/cjs/standards-sdk.cjs.map +1 -1
- package/dist/es/services/registry-broker/client/agent-network.d.ts +974 -0
- package/dist/es/services/registry-broker/client/agent-network.d.ts.map +1 -0
- package/dist/es/services/registry-broker/client/base-client.d.ts +4 -0
- package/dist/es/services/registry-broker/client/base-client.d.ts.map +1 -1
- package/dist/es/services/registry-broker/client.d.ts +1 -0
- package/dist/es/services/registry-broker/client.d.ts.map +1 -1
- package/dist/es/standards-sdk.es.js +50 -27
- package/dist/es/standards-sdk.es.js.map +1 -1
- package/dist/es/standards-sdk.es104.js +1 -1
- package/dist/es/standards-sdk.es106.js +1 -1
- package/dist/es/standards-sdk.es108.js +1 -1
- package/dist/es/standards-sdk.es11.js +1 -1
- package/dist/es/standards-sdk.es110.js +1 -1
- package/dist/es/standards-sdk.es116.js +2 -2
- package/dist/es/standards-sdk.es12.js +1 -1
- package/dist/es/standards-sdk.es120.js +4 -4
- package/dist/es/standards-sdk.es121.js +11 -11
- package/dist/es/standards-sdk.es126.js +1 -1
- package/dist/es/standards-sdk.es132.js +3 -2
- package/dist/es/standards-sdk.es132.js.map +1 -1
- package/dist/es/standards-sdk.es147.js +2 -2
- package/dist/es/standards-sdk.es148.js +1 -1
- package/dist/es/standards-sdk.es150.js +23 -14
- package/dist/es/standards-sdk.es150.js.map +1 -1
- package/dist/es/standards-sdk.es152.js +372 -248
- package/dist/es/standards-sdk.es152.js.map +1 -1
- package/dist/es/standards-sdk.es153.js +259 -4
- package/dist/es/standards-sdk.es153.js.map +1 -1
- package/dist/es/standards-sdk.es154.js +4 -81
- package/dist/es/standards-sdk.es154.js.map +1 -1
- package/dist/es/standards-sdk.es155.js +71 -77
- package/dist/es/standards-sdk.es155.js.map +1 -1
- package/dist/es/standards-sdk.es156.js +80 -53
- package/dist/es/standards-sdk.es156.js.map +1 -1
- package/dist/es/standards-sdk.es157.js +59 -2546
- package/dist/es/standards-sdk.es157.js.map +1 -1
- package/dist/es/standards-sdk.es158.js +2547 -159
- package/dist/es/standards-sdk.es158.js.map +1 -1
- package/dist/es/standards-sdk.es159.js +159 -7
- package/dist/es/standards-sdk.es159.js.map +1 -1
- package/dist/es/standards-sdk.es16.js +3 -2
- package/dist/es/standards-sdk.es16.js.map +1 -1
- package/dist/es/standards-sdk.es160.js +7 -86
- package/dist/es/standards-sdk.es160.js.map +1 -1
- package/dist/es/standards-sdk.es161.js +64 -43
- package/dist/es/standards-sdk.es161.js.map +1 -1
- package/dist/es/standards-sdk.es162.js +57 -186
- package/dist/es/standards-sdk.es162.js.map +1 -1
- package/dist/es/standards-sdk.es163.js +188 -20
- package/dist/es/standards-sdk.es163.js.map +1 -1
- package/dist/es/standards-sdk.es164.js +22 -54
- package/dist/es/standards-sdk.es164.js.map +1 -1
- package/dist/es/standards-sdk.es165.js +41 -78
- package/dist/es/standards-sdk.es165.js.map +1 -1
- package/dist/es/standards-sdk.es166.js +81 -35
- package/dist/es/standards-sdk.es166.js.map +1 -1
- package/dist/es/standards-sdk.es167.js +36 -191
- package/dist/es/standards-sdk.es167.js.map +1 -1
- package/dist/es/standards-sdk.es168.js +191 -43
- package/dist/es/standards-sdk.es168.js.map +1 -1
- package/dist/es/standards-sdk.es169.js +46 -39
- package/dist/es/standards-sdk.es169.js.map +1 -1
- package/dist/es/standards-sdk.es170.js +37 -44
- package/dist/es/standards-sdk.es170.js.map +1 -1
- package/dist/es/standards-sdk.es171.js +46 -39
- package/dist/es/standards-sdk.es171.js.map +1 -1
- package/dist/es/standards-sdk.es172.js +29 -102
- package/dist/es/standards-sdk.es172.js.map +1 -1
- package/dist/es/standards-sdk.es173.js +104 -36
- package/dist/es/standards-sdk.es173.js.map +1 -1
- package/dist/es/standards-sdk.es174.js +43 -33
- package/dist/es/standards-sdk.es174.js.map +1 -1
- package/dist/es/standards-sdk.es175.js +44 -72
- package/dist/es/standards-sdk.es175.js.map +1 -1
- package/dist/es/standards-sdk.es176.js +65 -61
- package/dist/es/standards-sdk.es176.js.map +1 -1
- package/dist/es/standards-sdk.es177.js +63 -39
- package/dist/es/standards-sdk.es177.js.map +1 -1
- package/dist/es/standards-sdk.es178.js +44 -36
- package/dist/es/standards-sdk.es178.js.map +1 -1
- package/dist/es/standards-sdk.es179.js +36 -30
- package/dist/es/standards-sdk.es179.js.map +1 -1
- package/dist/es/standards-sdk.es18.js +6 -5
- package/dist/es/standards-sdk.es18.js.map +1 -1
- package/dist/es/standards-sdk.es180.js +30 -34
- package/dist/es/standards-sdk.es180.js.map +1 -1
- package/dist/es/standards-sdk.es181.js +34 -48
- package/dist/es/standards-sdk.es181.js.map +1 -1
- package/dist/es/standards-sdk.es182.js +48 -138
- package/dist/es/standards-sdk.es182.js.map +1 -1
- package/dist/es/standards-sdk.es183.js +133 -37
- package/dist/es/standards-sdk.es183.js.map +1 -1
- package/dist/es/standards-sdk.es184.js +34 -12474
- package/dist/es/standards-sdk.es184.js.map +1 -1
- package/dist/es/standards-sdk.es185.js +12477 -12
- package/dist/es/standards-sdk.es185.js.map +1 -1
- package/dist/es/standards-sdk.es186.js +55 -671
- package/dist/es/standards-sdk.es186.js.map +1 -1
- package/dist/es/standards-sdk.es188.js +71 -63
- package/dist/es/standards-sdk.es188.js.map +1 -1
- package/dist/es/standards-sdk.es189.js +192 -48
- package/dist/es/standards-sdk.es189.js.map +1 -1
- package/dist/es/standards-sdk.es19.js +4 -3
- package/dist/es/standards-sdk.es19.js.map +1 -1
- package/dist/es/standards-sdk.es190.js +15 -79
- package/dist/es/standards-sdk.es190.js.map +1 -1
- package/dist/es/standards-sdk.es191.js +659 -187
- package/dist/es/standards-sdk.es191.js.map +1 -1
- package/dist/es/standards-sdk.es198.js +60 -126
- package/dist/es/standards-sdk.es198.js.map +1 -1
- package/dist/es/standards-sdk.es199.js +104 -482
- package/dist/es/standards-sdk.es199.js.map +1 -1
- package/dist/es/standards-sdk.es200.js +480 -222
- package/dist/es/standards-sdk.es200.js.map +1 -1
- package/dist/es/standards-sdk.es201.js +239 -176
- package/dist/es/standards-sdk.es201.js.map +1 -1
- package/dist/es/standards-sdk.es202.js +178 -101
- package/dist/es/standards-sdk.es202.js.map +1 -1
- package/dist/es/standards-sdk.es203.js +75 -108
- package/dist/es/standards-sdk.es203.js.map +1 -1
- package/dist/es/standards-sdk.es204.js +116 -148
- package/dist/es/standards-sdk.es204.js.map +1 -1
- package/dist/es/standards-sdk.es205.js +146 -646
- package/dist/es/standards-sdk.es205.js.map +1 -1
- package/dist/es/standards-sdk.es206.js +661 -162
- package/dist/es/standards-sdk.es206.js.map +1 -1
- package/dist/es/standards-sdk.es207.js +156 -206
- package/dist/es/standards-sdk.es207.js.map +1 -1
- package/dist/es/standards-sdk.es208.js +219 -223
- package/dist/es/standards-sdk.es208.js.map +1 -1
- package/dist/es/standards-sdk.es209.js +242 -0
- package/dist/es/standards-sdk.es209.js.map +1 -0
- package/dist/es/standards-sdk.es22.js +1 -1
- package/dist/es/standards-sdk.es27.js +6 -5
- package/dist/es/standards-sdk.es27.js.map +1 -1
- package/dist/es/standards-sdk.es30.js +1 -1
- package/dist/es/standards-sdk.es31.js +1 -1
- package/dist/es/standards-sdk.es35.js +4 -3
- package/dist/es/standards-sdk.es35.js.map +1 -1
- package/dist/es/standards-sdk.es36.js +3 -3
- package/dist/es/standards-sdk.es37.js +1 -1
- package/dist/es/standards-sdk.es4.js +1 -1
- package/dist/es/standards-sdk.es53.js +1 -1
- package/dist/es/standards-sdk.es56.js +1 -1
- package/dist/es/standards-sdk.es59.js +1 -1
- package/dist/es/standards-sdk.es62.js +1 -1
- package/dist/es/standards-sdk.es63.js +2 -2
- package/dist/es/standards-sdk.es64.js +1 -1
- package/dist/es/standards-sdk.es65.js +1 -1
- package/dist/es/standards-sdk.es67.js +4 -3
- package/dist/es/standards-sdk.es67.js.map +1 -1
- package/dist/es/standards-sdk.es7.js +1 -1
- package/dist/es/standards-sdk.es71.js +1 -1
- package/dist/es/standards-sdk.es72.js +2 -2
- package/dist/es/standards-sdk.es75.js +3 -3
- package/dist/es/standards-sdk.es76.js +1 -1
- package/dist/es/standards-sdk.es78.js +1 -1
- package/dist/es/standards-sdk.es83.js +1 -1
- package/dist/es/standards-sdk.es84.js +3 -2
- package/dist/es/standards-sdk.es84.js.map +1 -1
- package/dist/es/standards-sdk.es85.js +1 -1
- package/dist/es/standards-sdk.es88.js +1 -1
- package/dist/es/standards-sdk.es90.js +1 -1
- package/dist/es/standards-sdk.es94.js +3 -3
- package/dist/es/standards-sdk.es98.js +1 -1
- package/dist/es/standards-sdk.es99.js +1 -1
- package/package.json +1 -1
|
@@ -1,687 +1,187 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
if (
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const findPatternStart = (size, matcher) => {
|
|
15
|
-
for (let startIndex = segments.length - size; startIndex >= 0; startIndex -= 1) {
|
|
16
|
-
if (matcher(startIndex)) {
|
|
17
|
-
return startIndex;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return -1;
|
|
21
|
-
};
|
|
22
|
-
const replaceAt = (startIndex, consumed) => [
|
|
23
|
-
...segments.slice(0, startIndex),
|
|
24
|
-
"api",
|
|
25
|
-
"guard",
|
|
26
|
-
...segments.slice(startIndex + consumed)
|
|
27
|
-
].join("/");
|
|
28
|
-
const registryStart = findPatternStart(
|
|
29
|
-
4,
|
|
30
|
-
(startIndex) => segments[startIndex] === "registry" && segments[startIndex + 1] === "api" && /^v\d+$/.test(segments[startIndex + 2] ?? "") && segments[startIndex + 3] === "guard"
|
|
31
|
-
);
|
|
32
|
-
if (registryStart >= 0) {
|
|
33
|
-
return replaceAt(registryStart, 4);
|
|
34
|
-
}
|
|
35
|
-
const apiVersionStart = findPatternStart(
|
|
36
|
-
3,
|
|
37
|
-
(startIndex) => segments[startIndex] === "api" && /^v\d+$/.test(segments[startIndex + 1] ?? "") && segments[startIndex + 2] === "guard"
|
|
38
|
-
);
|
|
39
|
-
if (apiVersionStart >= 0) {
|
|
40
|
-
return replaceAt(apiVersionStart, 3);
|
|
41
|
-
}
|
|
42
|
-
for (let index = segments.length - 1; index >= 0; index -= 1) {
|
|
43
|
-
if (segments[index] === "guard" && segments[index - 1] !== "api") {
|
|
44
|
-
return [
|
|
45
|
-
...segments.slice(0, index),
|
|
46
|
-
"api",
|
|
47
|
-
"guard",
|
|
48
|
-
...segments.slice(index + 1)
|
|
49
|
-
].join("/");
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
return path;
|
|
53
|
-
}
|
|
54
|
-
function buildPortalCanonicalGuardUrl(baseUrl, path) {
|
|
55
|
-
const target = new URL(path, "https://guard.local");
|
|
56
|
-
const normalizedBasePath = (() => {
|
|
57
|
-
try {
|
|
58
|
-
const base = new URL(baseUrl);
|
|
59
|
-
return base.pathname.replace(/\/+$/, "");
|
|
60
|
-
} catch {
|
|
61
|
-
return baseUrl.replace(/\/+$/, "");
|
|
62
|
-
}
|
|
63
|
-
})();
|
|
64
|
-
const requestedPath = `${normalizedBasePath}${target.pathname}`;
|
|
65
|
-
const canonicalPath = toPortalCanonicalGuardPath(requestedPath);
|
|
66
|
-
const canonicalRelativePath = `${canonicalPath}${target.search}`;
|
|
67
|
-
try {
|
|
68
|
-
const base = new URL(baseUrl);
|
|
69
|
-
return `${base.origin}${canonicalRelativePath}`;
|
|
70
|
-
} catch {
|
|
71
|
-
return canonicalRelativePath;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
async function requestPortalFirstJson(client, path, init) {
|
|
75
|
-
try {
|
|
76
|
-
return await client.requestJson(path, init);
|
|
77
|
-
} catch (error) {
|
|
78
|
-
if (isStatusError(error) && (error.status === 404 || error.status === 501)) {
|
|
79
|
-
return client.requestAbsoluteJson(
|
|
80
|
-
buildPortalCanonicalGuardUrl(client.baseUrl, path),
|
|
81
|
-
init
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
throw error;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
async function getGuardSession(client) {
|
|
88
|
-
const raw = await requestPortalFirstJson(
|
|
89
|
-
client,
|
|
90
|
-
"/guard/auth/session",
|
|
91
|
-
{
|
|
92
|
-
method: "GET"
|
|
93
|
-
}
|
|
94
|
-
);
|
|
95
|
-
return client.parseWithSchema(
|
|
96
|
-
raw,
|
|
97
|
-
guardSessionResponseSchema,
|
|
98
|
-
"guard session response"
|
|
99
|
-
);
|
|
100
|
-
}
|
|
101
|
-
async function getGuardEntitlements(client) {
|
|
102
|
-
const raw = await requestPortalFirstJson(
|
|
103
|
-
client,
|
|
104
|
-
"/guard/entitlements",
|
|
105
|
-
{
|
|
106
|
-
method: "GET"
|
|
107
|
-
}
|
|
108
|
-
);
|
|
109
|
-
return client.parseWithSchema(
|
|
110
|
-
raw,
|
|
111
|
-
guardSessionResponseSchema,
|
|
112
|
-
"guard entitlements response"
|
|
113
|
-
);
|
|
114
|
-
}
|
|
115
|
-
async function getGuardBillingBalance(client) {
|
|
116
|
-
const raw = await requestPortalFirstJson(
|
|
117
|
-
client,
|
|
118
|
-
"/guard/billing/balance",
|
|
119
|
-
{
|
|
120
|
-
method: "GET"
|
|
121
|
-
}
|
|
122
|
-
);
|
|
123
|
-
return client.parseWithSchema(
|
|
124
|
-
raw,
|
|
125
|
-
guardBalanceResponseSchema,
|
|
126
|
-
"guard billing balance response"
|
|
127
|
-
);
|
|
128
|
-
}
|
|
129
|
-
async function getGuardFeed(client, limit) {
|
|
130
|
-
const params = new URLSearchParams();
|
|
131
|
-
if (typeof limit === "number" && Number.isFinite(limit) && Math.trunc(limit) > 0) {
|
|
132
|
-
params.set("limit", String(Math.trunc(limit)));
|
|
133
|
-
}
|
|
134
|
-
const query = params.toString();
|
|
135
|
-
const suffix = query ? `?${query}` : "";
|
|
136
|
-
const raw = await requestPortalFirstJson(
|
|
137
|
-
client,
|
|
138
|
-
`/guard/feed${suffix}`,
|
|
139
|
-
{
|
|
140
|
-
method: "GET"
|
|
141
|
-
}
|
|
142
|
-
);
|
|
1
|
+
import { creditBalanceResponseSchema, creditProvidersResponseSchema, hbarPurchaseIntentResponseSchema, creditPurchaseResponseSchema, x402MinimumsResponseSchema, x402CreditPurchaseResponseSchema } from "./standards-sdk.es158.js";
|
|
2
|
+
import { normalizeHexPrivateKey } from "./standards-sdk.es209.js";
|
|
3
|
+
import { optionalImport } from "./standards-sdk.es187.js";
|
|
4
|
+
async function getCreditsBalance(client, params = {}) {
|
|
5
|
+
const query = new URLSearchParams();
|
|
6
|
+
const normalizedAccountId = params.accountId?.trim();
|
|
7
|
+
if (normalizedAccountId) {
|
|
8
|
+
query.set("accountId", normalizedAccountId);
|
|
9
|
+
}
|
|
10
|
+
const suffix = query.size > 0 ? `?${query.toString()}` : "";
|
|
11
|
+
const raw = await client.requestJson(`/credits/balance${suffix}`, {
|
|
12
|
+
method: "GET"
|
|
13
|
+
});
|
|
143
14
|
return client.parseWithSchema(
|
|
144
15
|
raw,
|
|
145
|
-
|
|
146
|
-
"
|
|
16
|
+
creditBalanceResponseSchema,
|
|
17
|
+
"credit balance response"
|
|
147
18
|
);
|
|
148
19
|
}
|
|
149
|
-
async function
|
|
150
|
-
const raw = await
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
{
|
|
154
|
-
method: "GET"
|
|
155
|
-
}
|
|
156
|
-
);
|
|
20
|
+
async function getCreditProviders(client) {
|
|
21
|
+
const raw = await client.requestJson("/credits/providers", {
|
|
22
|
+
method: "GET"
|
|
23
|
+
});
|
|
157
24
|
return client.parseWithSchema(
|
|
158
25
|
raw,
|
|
159
|
-
|
|
160
|
-
"
|
|
26
|
+
creditProvidersResponseSchema,
|
|
27
|
+
"credit providers response"
|
|
161
28
|
);
|
|
162
29
|
}
|
|
163
|
-
async function
|
|
164
|
-
const
|
|
165
|
-
|
|
166
|
-
|
|
30
|
+
async function createHbarPurchaseIntent(client, payload) {
|
|
31
|
+
const body = {};
|
|
32
|
+
const normalizedAccountId = payload.accountId?.trim();
|
|
33
|
+
if (normalizedAccountId) {
|
|
34
|
+
body.accountId = normalizedAccountId;
|
|
167
35
|
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
`/guard/trust/by-hash/${encodeURIComponent(normalizedHash)}`,
|
|
171
|
-
{ method: "GET" }
|
|
172
|
-
);
|
|
173
|
-
return client.parseWithSchema(
|
|
174
|
-
raw,
|
|
175
|
-
guardTrustByHashResponseSchema,
|
|
176
|
-
"guard trust by hash response"
|
|
177
|
-
);
|
|
178
|
-
}
|
|
179
|
-
async function resolveGuardTrust(client, query) {
|
|
180
|
-
const params = new URLSearchParams();
|
|
181
|
-
if (query.ecosystem?.trim()) {
|
|
182
|
-
params.set("ecosystem", query.ecosystem.trim());
|
|
36
|
+
if (payload.credits !== void 0) {
|
|
37
|
+
body.credits = payload.credits;
|
|
183
38
|
}
|
|
184
|
-
if (
|
|
185
|
-
|
|
39
|
+
if (payload.hbarAmount !== void 0) {
|
|
40
|
+
body.hbarAmount = payload.hbarAmount;
|
|
186
41
|
}
|
|
187
|
-
if (
|
|
188
|
-
|
|
42
|
+
if (payload.memo?.trim()) {
|
|
43
|
+
body.memo = payload.memo.trim();
|
|
189
44
|
}
|
|
190
|
-
const
|
|
191
|
-
|
|
192
|
-
client,
|
|
193
|
-
`/guard/trust/resolve${suffix}`,
|
|
194
|
-
{ method: "GET" }
|
|
195
|
-
);
|
|
196
|
-
return client.parseWithSchema(
|
|
197
|
-
raw,
|
|
198
|
-
guardTrustResolveResponseSchema,
|
|
199
|
-
"guard trust resolve response"
|
|
200
|
-
);
|
|
201
|
-
}
|
|
202
|
-
async function getGuardRevocations(client) {
|
|
203
|
-
const raw = await requestPortalFirstJson(
|
|
204
|
-
client,
|
|
205
|
-
"/guard/revocations",
|
|
45
|
+
const raw = await client.requestJson(
|
|
46
|
+
"/credits/payments/hbar/intent",
|
|
206
47
|
{
|
|
207
|
-
method: "
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
return client.parseWithSchema(
|
|
211
|
-
raw,
|
|
212
|
-
guardRevocationResponseSchema,
|
|
213
|
-
"guard revocations response"
|
|
214
|
-
);
|
|
215
|
-
}
|
|
216
|
-
async function fetchGuardAdvisories(client) {
|
|
217
|
-
const raw = await requestPortalFirstJson(
|
|
218
|
-
client,
|
|
219
|
-
"/guard/advisories",
|
|
220
|
-
{
|
|
221
|
-
method: "GET"
|
|
222
|
-
}
|
|
223
|
-
);
|
|
224
|
-
return client.parseWithSchema(
|
|
225
|
-
raw,
|
|
226
|
-
guardRevocationResponseSchema,
|
|
227
|
-
"guard advisories response"
|
|
228
|
-
);
|
|
229
|
-
}
|
|
230
|
-
async function fetchGuardPolicy(client) {
|
|
231
|
-
const raw = await requestPortalFirstJson(
|
|
232
|
-
client,
|
|
233
|
-
"/guard/policy/fetch",
|
|
234
|
-
{
|
|
235
|
-
method: "GET"
|
|
236
|
-
}
|
|
237
|
-
);
|
|
238
|
-
return client.parseWithSchema(
|
|
239
|
-
raw,
|
|
240
|
-
guardPolicySchema,
|
|
241
|
-
"guard policy response"
|
|
242
|
-
);
|
|
243
|
-
}
|
|
244
|
-
async function getGuardInventory(client) {
|
|
245
|
-
const raw = await requestPortalFirstJson(
|
|
246
|
-
client,
|
|
247
|
-
"/guard/inventory",
|
|
248
|
-
{
|
|
249
|
-
method: "GET"
|
|
250
|
-
}
|
|
251
|
-
);
|
|
252
|
-
return client.parseWithSchema(
|
|
253
|
-
raw,
|
|
254
|
-
guardInventoryResponseSchema,
|
|
255
|
-
"guard inventory response"
|
|
256
|
-
);
|
|
257
|
-
}
|
|
258
|
-
async function getGuardReceiptHistory(client) {
|
|
259
|
-
const raw = await requestPortalFirstJson(
|
|
260
|
-
client,
|
|
261
|
-
"/guard/history",
|
|
262
|
-
{
|
|
263
|
-
method: "GET"
|
|
48
|
+
method: "POST",
|
|
49
|
+
headers: { "content-type": "application/json" },
|
|
50
|
+
body
|
|
264
51
|
}
|
|
265
52
|
);
|
|
266
53
|
return client.parseWithSchema(
|
|
267
54
|
raw,
|
|
268
|
-
|
|
269
|
-
"
|
|
55
|
+
hbarPurchaseIntentResponseSchema,
|
|
56
|
+
"hbar purchase intent response"
|
|
270
57
|
);
|
|
271
58
|
}
|
|
272
|
-
async function
|
|
273
|
-
const
|
|
274
|
-
|
|
275
|
-
|
|
59
|
+
async function loadX402Dependencies(client) {
|
|
60
|
+
const [{ default: axios }, x402Axios, x402Types] = await Promise.all([
|
|
61
|
+
import("axios"),
|
|
62
|
+
optionalImport("x402-axios"),
|
|
63
|
+
optionalImport("x402/types")
|
|
64
|
+
]);
|
|
65
|
+
if (!x402Axios || !x402Types) {
|
|
66
|
+
throw new Error(
|
|
67
|
+
"x402-axios and x402/types are required for X402 flows. Install them to enable ledger payments."
|
|
68
|
+
);
|
|
276
69
|
}
|
|
277
|
-
const
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
}
|
|
292
|
-
return client.parseWithSchema(
|
|
293
|
-
raw,
|
|
294
|
-
guardAbomResponseSchema,
|
|
295
|
-
"guard abom response"
|
|
296
|
-
);
|
|
70
|
+
const withPaymentInterceptor = x402Axios.withPaymentInterceptor;
|
|
71
|
+
const decodePaymentResponse = x402Axios.decodeXPaymentResponse;
|
|
72
|
+
const createX402Signer = x402Types.createSigner;
|
|
73
|
+
const createPaymentClient = (walletClient) => {
|
|
74
|
+
const axiosClient = axios.create({
|
|
75
|
+
baseURL: client.baseUrl,
|
|
76
|
+
headers: {
|
|
77
|
+
...client.getDefaultHeaders(),
|
|
78
|
+
"content-type": "application/json"
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
const paymentClient = withPaymentInterceptor(axiosClient, walletClient);
|
|
82
|
+
return paymentClient;
|
|
83
|
+
};
|
|
84
|
+
return { createPaymentClient, decodePaymentResponse, createX402Signer };
|
|
297
85
|
}
|
|
298
|
-
|
|
299
|
-
const
|
|
300
|
-
if (
|
|
301
|
-
throw new Error("
|
|
86
|
+
function calculateHbarAmountParam(hbarAmount) {
|
|
87
|
+
const tinybars = Math.ceil(hbarAmount * 1e8);
|
|
88
|
+
if (tinybars <= 0) {
|
|
89
|
+
throw new Error("Calculated purchase amount must be positive");
|
|
302
90
|
}
|
|
303
|
-
|
|
304
|
-
client,
|
|
305
|
-
`/guard/abom/${encodeURIComponent(normalizedArtifactId)}`,
|
|
306
|
-
{ method: "GET" }
|
|
307
|
-
);
|
|
308
|
-
return client.parseWithSchema(
|
|
309
|
-
raw,
|
|
310
|
-
guardAbomResponseSchema,
|
|
311
|
-
"guard artifact abom response"
|
|
312
|
-
);
|
|
313
|
-
}
|
|
314
|
-
async function exportGuardReceipts(client) {
|
|
315
|
-
const raw = await requestPortalFirstJson(
|
|
316
|
-
client,
|
|
317
|
-
"/guard/receipts/export",
|
|
318
|
-
{
|
|
319
|
-
method: "GET"
|
|
320
|
-
}
|
|
321
|
-
);
|
|
322
|
-
return client.parseWithSchema(
|
|
323
|
-
raw,
|
|
324
|
-
guardReceiptExportResponseSchema,
|
|
325
|
-
"guard receipt export response"
|
|
326
|
-
);
|
|
91
|
+
return tinybars / 1e8;
|
|
327
92
|
}
|
|
328
|
-
async function
|
|
329
|
-
const
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
}
|
|
342
|
-
async function getGuardDevices(client) {
|
|
343
|
-
const raw = await requestPortalFirstJson(
|
|
344
|
-
client,
|
|
345
|
-
"/guard/devices",
|
|
346
|
-
{
|
|
347
|
-
method: "GET"
|
|
348
|
-
}
|
|
349
|
-
);
|
|
350
|
-
return client.parseWithSchema(
|
|
351
|
-
raw,
|
|
352
|
-
guardDeviceListResponseSchema,
|
|
353
|
-
"guard devices response"
|
|
354
|
-
);
|
|
355
|
-
}
|
|
356
|
-
async function getGuardAlertPreferences(client) {
|
|
357
|
-
const raw = await requestPortalFirstJson(
|
|
358
|
-
client,
|
|
359
|
-
"/guard/alerts/preferences",
|
|
360
|
-
{
|
|
361
|
-
method: "GET"
|
|
362
|
-
}
|
|
363
|
-
);
|
|
364
|
-
return client.parseWithSchema(
|
|
365
|
-
raw,
|
|
366
|
-
guardAlertPreferencesSchema,
|
|
367
|
-
"guard alert preferences response"
|
|
368
|
-
);
|
|
369
|
-
}
|
|
370
|
-
async function updateGuardAlertPreferences(client, payload) {
|
|
371
|
-
const raw = await requestPortalFirstJson(
|
|
372
|
-
client,
|
|
373
|
-
"/guard/alerts/preferences",
|
|
374
|
-
{
|
|
375
|
-
method: "PUT",
|
|
376
|
-
body: payload
|
|
377
|
-
}
|
|
378
|
-
);
|
|
379
|
-
return client.parseWithSchema(
|
|
380
|
-
raw,
|
|
381
|
-
guardAlertPreferencesSchema,
|
|
382
|
-
"guard alert preferences response"
|
|
383
|
-
);
|
|
384
|
-
}
|
|
385
|
-
async function getGuardExceptions(client) {
|
|
386
|
-
const raw = await requestPortalFirstJson(
|
|
387
|
-
client,
|
|
388
|
-
"/guard/exceptions",
|
|
389
|
-
{
|
|
390
|
-
method: "GET"
|
|
391
|
-
}
|
|
392
|
-
);
|
|
393
|
-
return client.parseWithSchema(
|
|
394
|
-
raw,
|
|
395
|
-
guardExceptionListResponseSchema,
|
|
396
|
-
"guard exceptions response"
|
|
397
|
-
);
|
|
398
|
-
}
|
|
399
|
-
async function getGuardWatchlist(client) {
|
|
400
|
-
const raw = await requestPortalFirstJson(
|
|
401
|
-
client,
|
|
402
|
-
"/guard/watchlist",
|
|
403
|
-
{
|
|
404
|
-
method: "GET"
|
|
405
|
-
}
|
|
406
|
-
);
|
|
407
|
-
return client.parseWithSchema(
|
|
408
|
-
raw,
|
|
409
|
-
guardWatchlistResponseSchema,
|
|
410
|
-
"guard watchlist response"
|
|
411
|
-
);
|
|
412
|
-
}
|
|
413
|
-
async function lookupGuardWatchlist(client, payload) {
|
|
414
|
-
const raw = await requestPortalFirstJson(
|
|
415
|
-
client,
|
|
416
|
-
"/guard/watchlist/lookup",
|
|
417
|
-
{
|
|
418
|
-
method: "POST",
|
|
419
|
-
body: payload
|
|
420
|
-
}
|
|
421
|
-
);
|
|
422
|
-
return client.parseWithSchema(
|
|
423
|
-
raw,
|
|
424
|
-
guardWatchlistLookupResponseSchema,
|
|
425
|
-
"guard watchlist lookup response"
|
|
426
|
-
);
|
|
427
|
-
}
|
|
428
|
-
async function getGuardPainSignals(client) {
|
|
429
|
-
const raw = await requestPortalFirstJson(
|
|
430
|
-
client,
|
|
431
|
-
"/guard/signals/pain",
|
|
432
|
-
{
|
|
433
|
-
method: "GET"
|
|
434
|
-
}
|
|
435
|
-
);
|
|
436
|
-
return client.parseWithSchema(
|
|
437
|
-
raw,
|
|
438
|
-
guardPainSignalListResponseSchema,
|
|
439
|
-
"guard pain signals response"
|
|
440
|
-
);
|
|
441
|
-
}
|
|
442
|
-
async function getGuardAggregatedPainSignals(client) {
|
|
443
|
-
const raw = await requestPortalFirstJson(
|
|
444
|
-
client,
|
|
445
|
-
"/guard/signals/pain/aggregate",
|
|
446
|
-
{
|
|
447
|
-
method: "GET"
|
|
448
|
-
}
|
|
449
|
-
);
|
|
450
|
-
return client.parseWithSchema(
|
|
451
|
-
raw,
|
|
452
|
-
guardPainSignalAggregateResponseSchema,
|
|
453
|
-
"guard aggregated pain signals response"
|
|
454
|
-
);
|
|
455
|
-
}
|
|
456
|
-
async function getGuardPreflightVerdict(client, path, payload) {
|
|
457
|
-
const raw = await requestPortalFirstJson(client, path, {
|
|
93
|
+
async function purchaseCreditsWithHbar(client, params) {
|
|
94
|
+
const body = {
|
|
95
|
+
accountId: params.accountId,
|
|
96
|
+
payerKey: params.privateKey,
|
|
97
|
+
hbarAmount: calculateHbarAmountParam(params.hbarAmount)
|
|
98
|
+
};
|
|
99
|
+
if (params.memo) {
|
|
100
|
+
body.memo = params.memo;
|
|
101
|
+
}
|
|
102
|
+
if (params.metadata) {
|
|
103
|
+
body.metadata = params.metadata;
|
|
104
|
+
}
|
|
105
|
+
const raw = await client.requestJson("/credits/purchase", {
|
|
458
106
|
method: "POST",
|
|
459
|
-
|
|
107
|
+
headers: { "content-type": "application/json" },
|
|
108
|
+
body
|
|
460
109
|
});
|
|
461
110
|
return client.parseWithSchema(
|
|
462
111
|
raw,
|
|
463
|
-
|
|
464
|
-
"
|
|
465
|
-
);
|
|
466
|
-
}
|
|
467
|
-
async function getGuardPreInstallVerdict(client, payload) {
|
|
468
|
-
return getGuardPreflightVerdict(
|
|
469
|
-
client,
|
|
470
|
-
"/guard/verdict/pre-install",
|
|
471
|
-
payload
|
|
472
|
-
);
|
|
473
|
-
}
|
|
474
|
-
async function getGuardPreExecutionVerdict(client, payload) {
|
|
475
|
-
return getGuardPreflightVerdict(
|
|
476
|
-
client,
|
|
477
|
-
"/guard/verdict/pre-execution",
|
|
478
|
-
payload
|
|
479
|
-
);
|
|
480
|
-
}
|
|
481
|
-
async function ingestGuardPainSignals(client, items) {
|
|
482
|
-
const raw = await requestPortalFirstJson(
|
|
483
|
-
client,
|
|
484
|
-
"/guard/signals/pain",
|
|
485
|
-
{
|
|
486
|
-
method: "POST",
|
|
487
|
-
body: { items }
|
|
488
|
-
}
|
|
489
|
-
);
|
|
490
|
-
return client.parseWithSchema(
|
|
491
|
-
raw,
|
|
492
|
-
guardPainSignalListResponseSchema,
|
|
493
|
-
"guard pain signals response"
|
|
494
|
-
);
|
|
495
|
-
}
|
|
496
|
-
async function submitGuardReceipts(client, payload) {
|
|
497
|
-
const raw = await requestPortalFirstJson(
|
|
498
|
-
client,
|
|
499
|
-
"/guard/receipts/submit",
|
|
500
|
-
{
|
|
501
|
-
method: "POST",
|
|
502
|
-
body: payload
|
|
503
|
-
}
|
|
504
|
-
);
|
|
505
|
-
return client.parseWithSchema(
|
|
506
|
-
raw,
|
|
507
|
-
guardReceiptSyncResponseSchema,
|
|
508
|
-
"guard receipt submit response"
|
|
112
|
+
creditPurchaseResponseSchema,
|
|
113
|
+
"credit purchase response"
|
|
509
114
|
);
|
|
510
115
|
}
|
|
511
|
-
async function
|
|
512
|
-
const raw = await
|
|
513
|
-
|
|
514
|
-
"
|
|
515
|
-
{
|
|
516
|
-
method: "POST",
|
|
517
|
-
body: payload
|
|
518
|
-
}
|
|
116
|
+
async function getX402Minimums(client) {
|
|
117
|
+
const raw = await client.requestJson(
|
|
118
|
+
"/credits/purchase/x402/minimums",
|
|
119
|
+
{ method: "GET" }
|
|
519
120
|
);
|
|
520
121
|
return client.parseWithSchema(
|
|
521
122
|
raw,
|
|
522
|
-
|
|
523
|
-
"
|
|
123
|
+
x402MinimumsResponseSchema,
|
|
124
|
+
"x402 minimums response"
|
|
524
125
|
);
|
|
525
126
|
}
|
|
526
|
-
async function
|
|
527
|
-
const
|
|
528
|
-
if (!
|
|
529
|
-
throw new Error("
|
|
127
|
+
async function purchaseCreditsWithX402(client, params) {
|
|
128
|
+
const { createPaymentClient, decodePaymentResponse } = await loadX402Dependencies(client);
|
|
129
|
+
if (!Number.isFinite(params.credits) || params.credits <= 0) {
|
|
130
|
+
throw new Error("credits must be a positive number");
|
|
530
131
|
}
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
`/guard/watchlist/${encodeURIComponent(normalizedArtifactId)}`,
|
|
534
|
-
{ method: "DELETE" }
|
|
535
|
-
);
|
|
536
|
-
return client.parseWithSchema(
|
|
537
|
-
raw,
|
|
538
|
-
guardWatchlistResponseSchema,
|
|
539
|
-
"guard watchlist response"
|
|
540
|
-
);
|
|
541
|
-
}
|
|
542
|
-
async function addGuardException(client, payload) {
|
|
543
|
-
const raw = await requestPortalFirstJson(
|
|
544
|
-
client,
|
|
545
|
-
"/guard/exceptions",
|
|
546
|
-
{
|
|
547
|
-
method: "POST",
|
|
548
|
-
body: payload
|
|
549
|
-
}
|
|
550
|
-
);
|
|
551
|
-
return client.parseWithSchema(
|
|
552
|
-
raw,
|
|
553
|
-
guardExceptionListResponseSchema,
|
|
554
|
-
"guard exceptions response"
|
|
555
|
-
);
|
|
556
|
-
}
|
|
557
|
-
async function requestGuardException(client, payload) {
|
|
558
|
-
const raw = await requestPortalFirstJson(
|
|
559
|
-
client,
|
|
560
|
-
"/guard/exceptions/request",
|
|
561
|
-
{
|
|
562
|
-
method: "POST",
|
|
563
|
-
body: payload
|
|
564
|
-
}
|
|
565
|
-
);
|
|
566
|
-
return client.parseWithSchema(
|
|
567
|
-
raw,
|
|
568
|
-
guardExceptionListResponseSchema,
|
|
569
|
-
"guard exception request response"
|
|
570
|
-
);
|
|
571
|
-
}
|
|
572
|
-
async function syncGuardInventory(client, payload) {
|
|
573
|
-
const raw = await requestPortalFirstJson(
|
|
574
|
-
client,
|
|
575
|
-
"/guard/inventory/sync",
|
|
576
|
-
{
|
|
577
|
-
method: "POST",
|
|
578
|
-
body: payload
|
|
579
|
-
}
|
|
580
|
-
);
|
|
581
|
-
return client.parseWithSchema(
|
|
582
|
-
raw,
|
|
583
|
-
guardReceiptSyncResponseSchema,
|
|
584
|
-
"guard inventory sync response"
|
|
585
|
-
);
|
|
586
|
-
}
|
|
587
|
-
async function removeGuardException(client, exceptionId) {
|
|
588
|
-
const normalizedExceptionId = exceptionId.trim();
|
|
589
|
-
if (!normalizedExceptionId) {
|
|
590
|
-
throw new Error("exceptionId is required");
|
|
132
|
+
if (params.usdAmount !== void 0 && (!Number.isFinite(params.usdAmount) || params.usdAmount <= 0)) {
|
|
133
|
+
throw new Error("usdAmount must be a positive number when provided");
|
|
591
134
|
}
|
|
592
|
-
const
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
)
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
"/guard/team/policy-pack",
|
|
621
|
-
{
|
|
622
|
-
method: "PUT",
|
|
623
|
-
body: payload
|
|
624
|
-
}
|
|
625
|
-
);
|
|
626
|
-
return client.parseWithSchema(
|
|
627
|
-
raw,
|
|
628
|
-
guardTeamPolicyPackSchema,
|
|
629
|
-
"guard team policy pack response"
|
|
630
|
-
);
|
|
135
|
+
const body = {
|
|
136
|
+
accountId: params.accountId,
|
|
137
|
+
credits: params.credits
|
|
138
|
+
};
|
|
139
|
+
if (params.usdAmount !== void 0) {
|
|
140
|
+
body.usdAmount = params.usdAmount;
|
|
141
|
+
}
|
|
142
|
+
if (params.description) {
|
|
143
|
+
body.description = params.description;
|
|
144
|
+
}
|
|
145
|
+
if (params.metadata) {
|
|
146
|
+
body.metadata = params.metadata;
|
|
147
|
+
}
|
|
148
|
+
const paymentClient = createPaymentClient(params.walletClient);
|
|
149
|
+
const response = await paymentClient.post("/credits/purchase/x402", body);
|
|
150
|
+
const parsed = client.parseWithSchema(
|
|
151
|
+
response.data,
|
|
152
|
+
x402CreditPurchaseResponseSchema,
|
|
153
|
+
"x402 credit purchase response"
|
|
154
|
+
);
|
|
155
|
+
const responseHeaders = response.headers ?? {};
|
|
156
|
+
const paymentHeader = typeof responseHeaders["x-payment-response"] === "string" ? responseHeaders["x-payment-response"] : void 0;
|
|
157
|
+
const decodedPayment = paymentHeader !== void 0 ? decodePaymentResponse(paymentHeader) : void 0;
|
|
158
|
+
return {
|
|
159
|
+
...parsed,
|
|
160
|
+
paymentResponseHeader: paymentHeader,
|
|
161
|
+
paymentResponse: decodedPayment
|
|
162
|
+
};
|
|
631
163
|
}
|
|
632
|
-
async function
|
|
633
|
-
const
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
);
|
|
164
|
+
async function buyCreditsWithX402(client, params) {
|
|
165
|
+
const network = params.network ?? "base";
|
|
166
|
+
const { createX402Signer } = await loadX402Dependencies(client);
|
|
167
|
+
const normalizedKey = normalizeHexPrivateKey(params.evmPrivateKey);
|
|
168
|
+
const walletClient = await createX402Signer(network, normalizedKey);
|
|
169
|
+
return purchaseCreditsWithX402(client, {
|
|
170
|
+
accountId: params.accountId,
|
|
171
|
+
credits: params.credits,
|
|
172
|
+
usdAmount: params.usdAmount,
|
|
173
|
+
description: params.description,
|
|
174
|
+
metadata: params.metadata,
|
|
175
|
+
walletClient
|
|
176
|
+
});
|
|
646
177
|
}
|
|
647
178
|
export {
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
getGuardAggregatedPainSignals,
|
|
656
|
-
getGuardAlertPreferences,
|
|
657
|
-
getGuardArtifactTimeline,
|
|
658
|
-
getGuardBillingBalance,
|
|
659
|
-
getGuardDevices,
|
|
660
|
-
getGuardEntitlements,
|
|
661
|
-
getGuardExceptions,
|
|
662
|
-
getGuardFeed,
|
|
663
|
-
getGuardInventory,
|
|
664
|
-
getGuardInventoryDiff,
|
|
665
|
-
getGuardOverview,
|
|
666
|
-
getGuardPainSignals,
|
|
667
|
-
getGuardPreExecutionVerdict,
|
|
668
|
-
getGuardPreInstallVerdict,
|
|
669
|
-
getGuardReceiptHistory,
|
|
670
|
-
getGuardRevocations,
|
|
671
|
-
getGuardSession,
|
|
672
|
-
getGuardTeamPolicyPack,
|
|
673
|
-
getGuardTrustByHash,
|
|
674
|
-
getGuardWatchlist,
|
|
675
|
-
ingestGuardPainSignals,
|
|
676
|
-
lookupGuardWatchlist,
|
|
677
|
-
removeGuardException,
|
|
678
|
-
removeGuardWatchlistItem,
|
|
679
|
-
requestGuardException,
|
|
680
|
-
resolveGuardTrust,
|
|
681
|
-
submitGuardReceipts,
|
|
682
|
-
syncGuardInventory,
|
|
683
|
-
syncGuardReceipts,
|
|
684
|
-
updateGuardAlertPreferences,
|
|
685
|
-
updateGuardTeamPolicyPack
|
|
179
|
+
buyCreditsWithX402,
|
|
180
|
+
createHbarPurchaseIntent,
|
|
181
|
+
getCreditProviders,
|
|
182
|
+
getCreditsBalance,
|
|
183
|
+
getX402Minimums,
|
|
184
|
+
purchaseCreditsWithHbar,
|
|
185
|
+
purchaseCreditsWithX402
|
|
686
186
|
};
|
|
687
187
|
//# sourceMappingURL=standards-sdk.es205.js.map
|