@ar.io/sdk 2.6.0-alpha.3 → 2.6.0-alpha.4
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/bundles/web.bundle.min.js +60 -60
- 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 +2 -1
- package/lib/types/types/io.d.ts +12 -0
- package/lib/types/version.d.ts +1 -1
- package/package.json +1 -1
package/lib/cjs/common/io.js
CHANGED
|
@@ -314,6 +314,11 @@ class IOReadable {
|
|
|
314
314
|
tags: [{ name: 'Action', value: 'Demand-Factor' }],
|
|
315
315
|
});
|
|
316
316
|
}
|
|
317
|
+
async getDemandFactorSettings() {
|
|
318
|
+
return this.process.read({
|
|
319
|
+
tags: [{ name: 'Action', value: 'Demand-Factor-Settings' }],
|
|
320
|
+
});
|
|
321
|
+
}
|
|
317
322
|
// Auctions
|
|
318
323
|
async getArNSAuctions(params) {
|
|
319
324
|
return this.process.read({
|
package/lib/cjs/version.js
CHANGED
package/lib/esm/common/io.js
CHANGED
|
@@ -310,6 +310,11 @@ export class IOReadable {
|
|
|
310
310
|
tags: [{ name: 'Action', value: 'Demand-Factor' }],
|
|
311
311
|
});
|
|
312
312
|
}
|
|
313
|
+
async getDemandFactorSettings() {
|
|
314
|
+
return this.process.read({
|
|
315
|
+
tags: [{ name: 'Action', value: 'Demand-Factor-Settings' }],
|
|
316
|
+
});
|
|
317
|
+
}
|
|
313
318
|
// Auctions
|
|
314
319
|
async getArNSAuctions(params) {
|
|
315
320
|
return this.process.read({
|
package/lib/esm/version.js
CHANGED
package/lib/types/common/io.d.ts
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import Arweave from 'arweave';
|
|
17
17
|
import { AoArNSNameDataWithName, AoArNSReservedNameData, AoAuction, AoBalanceWithAddress, AoEpochDistributionData, AoEpochObservationData, AoGatewayWithAddress, AoJoinNetworkParams, AoMessageResult, AoPrimaryName, AoPrimaryNameRequest, AoRedelegationFeeInfo, AoTokenSupplyData, AoUpdateGatewaySettingsParams, AoWeightedObserver, ContractSigner, PaginationParams, PaginationResult, ProcessConfiguration, TransactionId, WalletAddress, WithSigner, WriteOptions } from '../types/index.js';
|
|
18
|
-
import { AoArNSNameData, AoArNSReservedNameDataWithName, AoAuctionPriceData, AoDelegation, AoEpochData, AoEpochSettings, AoGateway, AoGatewayDelegateWithAddress, AoGatewayRegistrySettings, AoGatewayVault, AoIORead, AoIOWrite, AoRegistrationFees, AoVaultData, AoWalletVault, EpochInput } from '../types/io.js';
|
|
18
|
+
import { AoArNSNameData, AoArNSReservedNameDataWithName, AoAuctionPriceData, AoDelegation, AoEpochData, AoEpochSettings, AoGateway, AoGatewayDelegateWithAddress, AoGatewayRegistrySettings, AoGatewayVault, AoIORead, AoIOWrite, AoRegistrationFees, AoVaultData, AoWalletVault, DemandFactorSettings, EpochInput } from '../types/io.js';
|
|
19
19
|
import { mIOToken } from '../types/token.js';
|
|
20
20
|
import { AOProcess } from './contracts/ao-process.js';
|
|
21
21
|
export declare class IO {
|
|
@@ -111,6 +111,7 @@ export declare class IOReadable implements AoIORead {
|
|
|
111
111
|
}): Promise<number>;
|
|
112
112
|
getRegistrationFees(): Promise<AoRegistrationFees>;
|
|
113
113
|
getDemandFactor(): Promise<number>;
|
|
114
|
+
getDemandFactorSettings(): Promise<DemandFactorSettings>;
|
|
114
115
|
getArNSAuctions(params?: PaginationParams<AoAuction>): Promise<PaginationResult<AoAuction>>;
|
|
115
116
|
getArNSAuction({ name, }: {
|
|
116
117
|
name: string;
|
package/lib/types/types/io.d.ts
CHANGED
|
@@ -264,6 +264,17 @@ export type AoGatewayRegistrySettings = {
|
|
|
264
264
|
failedEpochSlashRate: number;
|
|
265
265
|
};
|
|
266
266
|
};
|
|
267
|
+
export type DemandFactorSettings = {
|
|
268
|
+
periodZeroStartTimestamp: number;
|
|
269
|
+
movingAvgPeriodCount: number;
|
|
270
|
+
periodLengthMs: number;
|
|
271
|
+
demandFactorBaseValue: number;
|
|
272
|
+
demandFactorMin: number;
|
|
273
|
+
demandFactorUpAdjustment: number;
|
|
274
|
+
demandFactorDownAdjustment: number;
|
|
275
|
+
stepDownThreshold: number;
|
|
276
|
+
criteria: string;
|
|
277
|
+
};
|
|
267
278
|
export interface AoIORead {
|
|
268
279
|
getInfo(): Promise<{
|
|
269
280
|
Ticker: string;
|
|
@@ -330,6 +341,7 @@ export interface AoIORead {
|
|
|
330
341
|
}): Promise<number>;
|
|
331
342
|
getRegistrationFees(): Promise<AoRegistrationFees>;
|
|
332
343
|
getDemandFactor(): Promise<number>;
|
|
344
|
+
getDemandFactorSettings(): Promise<DemandFactorSettings>;
|
|
333
345
|
getVaults(params?: PaginationParams<AoWalletVault>): Promise<PaginationResult<AoWalletVault>>;
|
|
334
346
|
getVault({ address, vaultId, }: {
|
|
335
347
|
address: WalletAddress;
|
package/lib/types/version.d.ts
CHANGED