@ar.io/sdk 1.2.2 → 2.0.0-alpha.10

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.
Files changed (68) hide show
  1. package/README.md +148 -60
  2. package/bundles/web.bundle.min.js +132 -331
  3. package/lib/cjs/common/ant.js +147 -206
  4. package/lib/cjs/common/contracts/ao-process.js +1 -1
  5. package/lib/cjs/common/http.js +1 -2
  6. package/lib/cjs/common/index.js +0 -5
  7. package/lib/cjs/common/io.js +39 -31
  8. package/lib/cjs/common/logger.js +31 -19
  9. package/lib/cjs/types.js +0 -1
  10. package/lib/cjs/utils/arweave.js +1 -15
  11. package/lib/cjs/utils/http-client.js +1 -1
  12. package/lib/cjs/utils/index.js +1 -2
  13. package/lib/cjs/utils/{graphql/processes.js → processes.js} +35 -10
  14. package/lib/cjs/version.js +1 -1
  15. package/lib/esm/common/ant.js +144 -203
  16. package/lib/esm/common/contracts/ao-process.js +2 -2
  17. package/lib/esm/common/http.js +2 -3
  18. package/lib/esm/common/index.js +0 -5
  19. package/lib/esm/common/io.js +39 -28
  20. package/lib/esm/common/logger.js +29 -14
  21. package/lib/esm/types.js +0 -1
  22. package/lib/esm/utils/arweave.js +0 -12
  23. package/lib/esm/utils/http-client.js +2 -2
  24. package/lib/esm/utils/index.js +1 -2
  25. package/lib/esm/utils/{graphql/processes.js → processes.js} +33 -9
  26. package/lib/esm/version.js +1 -1
  27. package/lib/types/common/ant.d.ts +53 -175
  28. package/lib/types/common/contracts/ao-process.d.ts +2 -2
  29. package/lib/types/common/http.d.ts +3 -2
  30. package/lib/types/common/index.d.ts +0 -4
  31. package/lib/types/common/io.d.ts +5 -4
  32. package/lib/types/common/logger.d.ts +10 -3
  33. package/lib/types/common.d.ts +1 -145
  34. package/lib/types/io.d.ts +28 -3
  35. package/lib/types/types.d.ts +0 -1
  36. package/lib/types/utils/arweave.d.ts +0 -5
  37. package/lib/types/utils/http-client.d.ts +2 -2
  38. package/lib/types/utils/index.d.ts +1 -2
  39. package/lib/types/utils/{graphql/processes.d.ts → processes.d.ts} +4 -1
  40. package/lib/types/version.d.ts +1 -1
  41. package/package.json +8 -13
  42. package/lib/cjs/arns-service.js +0 -2
  43. package/lib/cjs/common/ant-ao.js +0 -297
  44. package/lib/cjs/common/ar-io.js +0 -741
  45. package/lib/cjs/common/contracts/remote-contract.js +0 -55
  46. package/lib/cjs/common/contracts/warp-contract.js +0 -176
  47. package/lib/cjs/common/warp.js +0 -25
  48. package/lib/cjs/utils/graphql/index.js +0 -34
  49. package/lib/cjs/utils/graphql/smartweave.js +0 -309
  50. package/lib/cjs/utils/smartweave.js +0 -58
  51. package/lib/esm/arns-service.js +0 -1
  52. package/lib/esm/common/ant-ao.js +0 -292
  53. package/lib/esm/common/ar-io.js +0 -735
  54. package/lib/esm/common/contracts/remote-contract.js +0 -51
  55. package/lib/esm/common/contracts/warp-contract.js +0 -172
  56. package/lib/esm/common/warp.js +0 -22
  57. package/lib/esm/utils/graphql/index.js +0 -18
  58. package/lib/esm/utils/graphql/smartweave.js +0 -303
  59. package/lib/esm/utils/smartweave.js +0 -50
  60. package/lib/types/arns-service.d.ts +0 -23
  61. package/lib/types/common/ant-ao.d.ts +0 -194
  62. package/lib/types/common/ar-io.d.ts +0 -551
  63. package/lib/types/common/contracts/remote-contract.d.ts +0 -38
  64. package/lib/types/common/contracts/warp-contract.d.ts +0 -43
  65. package/lib/types/common/warp.d.ts +0 -1
  66. package/lib/types/utils/graphql/index.d.ts +0 -18
  67. package/lib/types/utils/graphql/smartweave.d.ts +0 -47
  68. package/lib/types/utils/smartweave.d.ts +0 -41
@@ -1,47 +0,0 @@
1
- /// <reference types="node" />
2
- /**
3
- * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
4
- *
5
- * This program is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU Affero General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU Affero General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU Affero General Public License
16
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
- */
18
- import Arweave from 'arweave';
19
- import { DataProtocolTransaction } from '../../types.js';
20
- export declare const MAX_REQUEST_SIZE = 100;
21
- /**
22
- * @param arweave - arweave instance to perform gql request
23
- * @param address - address of the wallet to get transactions for
24
- * @param signal - signal to abort the request
25
- * @returns @type {Promise<DataProtocolTransaction[]>} - returns the list of data protocol txs, for e.g smartweave contracts
26
- */
27
- export declare function getSmartweaveContractsFromGQL({ address, arweave, signal, }: {
28
- arweave: Arweave;
29
- address: string;
30
- signal?: AbortSignal;
31
- }): Promise<DataProtocolTransaction[]>;
32
- /**
33
- * @param arweave - arweave instance to perform gql request
34
- * @param address - address of the wallet to get transactions for
35
- * @param contractTxId - contract tx id to filter the transactions
36
- * @param signal - signal to abort the request
37
- * @returns @type {Promise<DataProtocolTransaction[]>} - returns the list of data protocol txs, for e.g smartweave contracts
38
- */
39
- export declare function getSmartweaveTransactionsFromGQL({ address, contractTxId, arweave, signal, }: {
40
- arweave: Arweave;
41
- address: string;
42
- contractTxId: string;
43
- signal?: AbortSignal;
44
- }): Promise<DataProtocolTransaction[]>;
45
- export declare function getContractsTransferredToOrControlledByWallet(arweave: Arweave, params: {
46
- address: string;
47
- }, signal?: AbortSignal): Promise<DataProtocolTransaction[]>;
@@ -1,41 +0,0 @@
1
- /**
2
- * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
3
- *
4
- * This program is free software: you can redistribute it and/or modify
5
- * it under the terms of the GNU Affero General Public License as published by
6
- * the Free Software Foundation, either version 3 of the License, or
7
- * (at your option) any later version.
8
- *
9
- * This program is distributed in the hope that it will be useful,
10
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- * GNU Affero General Public License for more details.
13
- *
14
- * You should have received a copy of the GNU Affero General Public License
15
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
16
- */
17
- import Arweave from 'arweave';
18
- import { EvaluationManifest } from 'warp-contracts';
19
- import { RemoteContract, WarpContract } from '../common/index.js';
20
- import { SortKey } from '../types.js';
21
- export declare function isSortKey(sortKey: string): sortKey is SortKey;
22
- export declare class SmartWeaveSortKey {
23
- private _sortKey;
24
- constructor(sortKey: string);
25
- static validate(sortKey: string): boolean;
26
- toString(): string;
27
- parts(): string[];
28
- blockHeight(): number;
29
- timestamp(): number;
30
- hash(): string;
31
- }
32
- export declare function getContractManifest({ arweave, contractTxId, }: {
33
- arweave: Arweave;
34
- contractTxId: string;
35
- }): Promise<EvaluationManifest>;
36
- export declare function isContractConfiguration<T>(config: object): config is {
37
- contract: WarpContract<T> | RemoteContract<T>;
38
- };
39
- export declare function isContractTxIdConfiguration(config: object): config is {
40
- contractTxId: string;
41
- };