@ar.io/sdk 2.3.1 → 2.3.2-alpha.2
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 +19 -0
- package/bundles/web.bundle.min.js +2 -2
- package/lib/cjs/common/io.js +5 -0
- package/lib/cjs/version.js +1 -1
- package/lib/esm/common/io.js +5 -0
- package/lib/esm/version.js +1 -1
- package/lib/types/common/io.d.ts +1 -0
- package/lib/types/io.d.ts +11 -0
- package/lib/types/version.d.ts +1 -1
- package/package.json +1 -1
package/lib/cjs/common/io.js
CHANGED
|
@@ -341,6 +341,11 @@ class IOReadable {
|
|
|
341
341
|
tags: [{ name: 'Action', value: 'Get-Registration-Fees' }],
|
|
342
342
|
});
|
|
343
343
|
}
|
|
344
|
+
async getDemandFactor() {
|
|
345
|
+
return this.process.read({
|
|
346
|
+
tags: [{ name: 'Action', value: 'Demand-Factor' }],
|
|
347
|
+
});
|
|
348
|
+
}
|
|
344
349
|
}
|
|
345
350
|
exports.IOReadable = IOReadable;
|
|
346
351
|
class IOWriteable extends IOReadable {
|
package/lib/cjs/version.js
CHANGED
package/lib/esm/common/io.js
CHANGED
|
@@ -337,6 +337,11 @@ export class IOReadable {
|
|
|
337
337
|
tags: [{ name: 'Action', value: 'Get-Registration-Fees' }],
|
|
338
338
|
});
|
|
339
339
|
}
|
|
340
|
+
async getDemandFactor() {
|
|
341
|
+
return this.process.read({
|
|
342
|
+
tags: [{ name: 'Action', value: 'Demand-Factor' }],
|
|
343
|
+
});
|
|
344
|
+
}
|
|
340
345
|
}
|
|
341
346
|
export class IOWriteable extends IOReadable {
|
|
342
347
|
signer;
|
package/lib/esm/version.js
CHANGED
package/lib/types/common/io.d.ts
CHANGED
|
@@ -90,6 +90,7 @@ export declare class IOReadable implements AoIORead {
|
|
|
90
90
|
name: string;
|
|
91
91
|
}): Promise<number>;
|
|
92
92
|
getRegistrationFees(): Promise<AoRegistrationFees>;
|
|
93
|
+
getDemandFactor(): Promise<number>;
|
|
93
94
|
}
|
|
94
95
|
export declare class IOWriteable extends IOReadable implements AoIOWrite {
|
|
95
96
|
protected process: AOProcess;
|
package/lib/types/io.d.ts
CHANGED
|
@@ -123,6 +123,15 @@ export type AoEpochData = {
|
|
|
123
123
|
distributionTimestamp: Timestamp;
|
|
124
124
|
distributions: AoEpochDistributionData;
|
|
125
125
|
};
|
|
126
|
+
export type AoGatewayService = {
|
|
127
|
+
fqdn: string;
|
|
128
|
+
path: string;
|
|
129
|
+
protocol: 'https';
|
|
130
|
+
port: number;
|
|
131
|
+
};
|
|
132
|
+
export type AoGatewayServices = {
|
|
133
|
+
bundlers: AoGatewayService[];
|
|
134
|
+
} | undefined;
|
|
126
135
|
export type AoGateway = {
|
|
127
136
|
settings: AoGatewaySettings;
|
|
128
137
|
stats: AoGatewayStats;
|
|
@@ -135,6 +144,7 @@ export type AoGateway = {
|
|
|
135
144
|
operatorStake: number;
|
|
136
145
|
status: 'joined' | 'leaving';
|
|
137
146
|
weights: AoGatewayWeights;
|
|
147
|
+
services: AoGatewayServices;
|
|
138
148
|
};
|
|
139
149
|
export type AoGatewayStats = {
|
|
140
150
|
passedConsecutiveEpochs: number;
|
|
@@ -273,6 +283,7 @@ export interface AoIORead {
|
|
|
273
283
|
quantity?: number;
|
|
274
284
|
}): Promise<number>;
|
|
275
285
|
getRegistrationFees(): Promise<AoRegistrationFees>;
|
|
286
|
+
getDemandFactor(): Promise<number>;
|
|
276
287
|
}
|
|
277
288
|
export interface AoIOWrite extends AoIORead {
|
|
278
289
|
transfer({ target, qty, }: {
|
package/lib/types/version.d.ts
CHANGED