@ar.io/sdk 3.9.0-alpha.4 → 3.9.0-alpha.6
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 +70 -52
- package/lib/cjs/common/contracts/ao-process.js +54 -38
- package/lib/cjs/common/io.js +12 -6
- package/lib/cjs/utils/arweave.js +87 -1
- package/lib/cjs/version.js +1 -1
- package/lib/esm/common/contracts/ao-process.js +54 -38
- package/lib/esm/common/io.js +13 -7
- package/lib/esm/utils/arweave.js +83 -0
- package/lib/esm/version.js +1 -1
- package/lib/types/common/contracts/ao-process.d.ts +1 -1
- package/lib/types/utils/arweave.d.ts +18 -1
- package/lib/types/version.d.ts +1 -1
- package/package.json +1 -1
package/lib/esm/version.js
CHANGED
|
@@ -2,7 +2,7 @@ import { AOContract, AoClient, AoSigner } from '../../types/index.js';
|
|
|
2
2
|
import { ILogger } from '../logger.js';
|
|
3
3
|
export declare class AOProcess implements AOContract {
|
|
4
4
|
private logger;
|
|
5
|
-
|
|
5
|
+
readonly ao: AoClient;
|
|
6
6
|
readonly processId: string;
|
|
7
7
|
constructor({ processId, ao, logger, }: {
|
|
8
8
|
processId: string;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import Arweave from 'arweave';
|
|
17
|
-
import { BlockHeight } from '../types/common.js';
|
|
17
|
+
import { AoClient, BlockHeight } from '../types/common.js';
|
|
18
18
|
import { AoEligibleDistribution, AoEpochData, AoEpochDistributed, PaginationParams, PaginationResult } from '../types/io.js';
|
|
19
19
|
export declare const validateArweaveId: (id: string) => boolean;
|
|
20
20
|
export declare function isBlockHeight(height: string | number): height is BlockHeight;
|
|
@@ -46,6 +46,18 @@ export declare const getEpochDataFromGql: ({ arweave, epochIndex, processId, ret
|
|
|
46
46
|
retries?: number;
|
|
47
47
|
gqlUrl?: string;
|
|
48
48
|
}) => Promise<AoEpochData<AoEpochDistributed> | undefined>;
|
|
49
|
+
export declare const getEpochDataFromGqlWithCUFallback: ({ arweave, ao, epochIndex, processId, }: {
|
|
50
|
+
arweave: Arweave;
|
|
51
|
+
ao: AoClient;
|
|
52
|
+
epochIndex: number;
|
|
53
|
+
processId?: string;
|
|
54
|
+
}) => Promise<AoEpochData<AoEpochDistributed> | undefined>;
|
|
55
|
+
export declare const getEpochDataFromGqlFallback: ({ ao, epochIndex, processId, gqlUrl, }: {
|
|
56
|
+
ao: AoClient;
|
|
57
|
+
epochIndex: number;
|
|
58
|
+
processId?: string;
|
|
59
|
+
gqlUrl?: string;
|
|
60
|
+
}) => Promise<AoEpochData<AoEpochDistributed> | undefined>;
|
|
49
61
|
/**
|
|
50
62
|
* Get the epoch with distribution data for the current epoch
|
|
51
63
|
* @param arweave - The Arweave instance
|
|
@@ -58,5 +70,10 @@ export declare const epochDistributionNoticeGqlQuery: ({ epochIndex, processId,
|
|
|
58
70
|
processId?: string | undefined;
|
|
59
71
|
authorities?: string[] | undefined;
|
|
60
72
|
}) => string;
|
|
73
|
+
export declare const epochDistributionNoticeGqlQueryFallback: ({ processId, owners, }: {
|
|
74
|
+
epochIndex: number;
|
|
75
|
+
processId?: string;
|
|
76
|
+
owners?: string[];
|
|
77
|
+
}) => string;
|
|
61
78
|
export declare function sortAndPaginateEpochDataIntoEligibleDistributions(epochData?: AoEpochData, params?: PaginationParams<AoEligibleDistribution>): PaginationResult<AoEligibleDistribution>;
|
|
62
79
|
export declare function removeEligibleRewardsFromEpochData(epochData?: AoEpochData): AoEpochData | undefined;
|
package/lib/types/version.d.ts
CHANGED