@ar.io/sdk 3.19.0-alpha.1 → 3.19.0-alpha.11

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 (40) hide show
  1. package/README.md +155 -7
  2. package/bundles/web.bundle.min.js +88 -72
  3. package/lib/cjs/cli/cli.js +14 -1
  4. package/lib/cjs/cli/commands/antCommands.js +82 -16
  5. package/lib/cjs/cli/options.js +36 -1
  6. package/lib/cjs/cli/utils.js +25 -11
  7. package/lib/cjs/common/ant.js +452 -12
  8. package/lib/cjs/common/io.js +2 -2
  9. package/lib/cjs/constants.js +2 -1
  10. package/lib/cjs/types/ant.js +18 -0
  11. package/lib/cjs/utils/ant.js +4 -0
  12. package/lib/cjs/utils/ao.js +3 -1
  13. package/lib/cjs/utils/processes.js +1 -1
  14. package/lib/cjs/version.js +1 -1
  15. package/lib/esm/cli/cli.js +16 -3
  16. package/lib/esm/cli/commands/antCommands.js +81 -17
  17. package/lib/esm/cli/options.js +35 -0
  18. package/lib/esm/cli/utils.js +24 -11
  19. package/lib/esm/common/ant.js +453 -13
  20. package/lib/esm/common/io.js +2 -2
  21. package/lib/esm/constants.js +1 -0
  22. package/lib/esm/types/ant.js +18 -0
  23. package/lib/esm/utils/ant.js +4 -0
  24. package/lib/esm/utils/ao.js +3 -1
  25. package/lib/esm/utils/processes.js +1 -1
  26. package/lib/esm/version.js +1 -1
  27. package/lib/types/cli/commands/antCommands.d.ts +12 -0
  28. package/lib/types/cli/options.d.ts +25 -0
  29. package/lib/types/cli/types.d.ts +1 -0
  30. package/lib/types/cli/utils.d.ts +15 -2
  31. package/lib/types/common/ant.d.ts +167 -6
  32. package/lib/types/common/io.d.ts +1 -1
  33. package/lib/types/constants.d.ts +1 -0
  34. package/lib/types/types/ant.d.ts +131 -9
  35. package/lib/types/types/common.d.ts +31 -0
  36. package/lib/types/utils/ant.d.ts +4 -0
  37. package/lib/types/utils/ao.d.ts +2 -1
  38. package/lib/types/utils/processes.d.ts +1 -1
  39. package/lib/types/version.d.ts +1 -1
  40. package/package.json +3 -2
@@ -126,6 +126,37 @@ export type SpawnAntProgressEvent = {
126
126
  owner: WalletAddress;
127
127
  };
128
128
  };
129
+ export type UpgradeAntProgressEvent = SpawnAntProgressEvent & {
130
+ 'checking-version': {
131
+ antProcessId: string;
132
+ antRegistryId: string;
133
+ };
134
+ 'fetching-affiliated-names': {
135
+ arioProcessId: string;
136
+ antProcessId: string;
137
+ };
138
+ 'reassigning-name': {
139
+ name: string;
140
+ arioProcessId: string;
141
+ antProcessId: string;
142
+ };
143
+ 'validating-names': {
144
+ arioProcessId: string;
145
+ antProcessId: string;
146
+ names: string[];
147
+ };
148
+ 'failed-to-reassign-name': {
149
+ name: string;
150
+ arioProcessId: string;
151
+ antProcessId: string;
152
+ error?: Error;
153
+ };
154
+ 'successfully-reassigned-name': {
155
+ name: string;
156
+ arioProcessId: string;
157
+ antProcessId: string;
158
+ };
159
+ };
129
160
  export type BuyArNSNameProgressEvents = SpawnAntProgressEvent & {
130
161
  'buying-name': AoBuyRecordParams;
131
162
  };
@@ -24,10 +24,14 @@ import { ANTRecords, AoANTState, HyperBeamANTState, SortedANTRecords } from '../
24
24
  * @param antRecords - The ANT records to sort.
25
25
  */
26
26
  export declare const sortANTRecords: (antRecords: ANTRecords) => SortedANTRecords;
27
+ /**
28
+ * @deprecated - this is no longer necessary because HyperBeam now uses the AoANTState type
29
+ */
27
30
  export declare const isHyperBeamANTState: (state: any) => state is HyperBeamANTState;
28
31
  /**
29
32
  * Convert HyperBeam serialized ANT state to backwards compatible format.
30
33
  *
34
+ * @deprecated - this is no longer necessary because HyperBeam now uses the AOANTState type
31
35
  * @param state - The HyperBeam serialized ANT state.
32
36
  */
33
37
  export declare const convertHyperBeamStateToAoANTState: (initialState: HyperBeamANTState) => AoANTState;
@@ -30,9 +30,10 @@ export type SpawnANTParams = {
30
30
  onSigningProgress?: (name: keyof SpawnAntProgressEvent, payload: SpawnAntProgressEvent[keyof SpawnAntProgressEvent]) => void;
31
31
  };
32
32
  export declare function spawnANT({ signer, module, ao, scheduler, state, tags, antRegistryId, logger, authority, onSigningProgress, }: SpawnANTParams): Promise<ProcessId>;
33
- export declare function forkANT({ signer, antProcessId, logger, ao, antRegistryId, onSigningProgress, }: {
33
+ export declare function forkANT({ signer, antProcessId, logger, ao, moduleId, antRegistryId, onSigningProgress, }: {
34
34
  signer: AoSigner;
35
35
  antProcessId: string;
36
+ moduleId?: string;
36
37
  logger?: Logger;
37
38
  ao?: AoClient;
38
39
  antRegistryId?: string;
@@ -3,7 +3,7 @@ import { ILogger } from '../common/logger.js';
3
3
  import { AoANTRegistryRead } from '../types/ant-registry.js';
4
4
  import { AoARIORead, AoArNSNameData, AoClient, ProcessId, WalletAddress } from '../types/index.js';
5
5
  /**
6
- * @beta This API is in beta and may change in the future.
6
+ * @deprecated Use getArNSRecordsForAddress instead
7
7
  */
8
8
  export declare const getANTProcessesOwnedByWallet: ({ address, registry, }: {
9
9
  address: WalletAddress;
@@ -13,4 +13,4 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- export declare const version = "3.18.2";
16
+ export declare const version = "3.19.0-alpha.10";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ar.io/sdk",
3
- "version": "3.19.0-alpha.1",
3
+ "version": "3.19.0-alpha.11",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/ar-io/ar-io-sdk.git"
@@ -81,7 +81,8 @@
81
81
  "example:esm": "cd examples/esm && yarn && node index.mjs",
82
82
  "example:cjs": "yarn build:cjs && yarn link && cd examples/cjs && yarn && node index.cjs",
83
83
  "example:web": "yarn build:web && http-server --port 8080 --host -o examples/web",
84
- "example:vite": "yarn build:esm && yarn link && cd examples/vite && yarn && yarn start"
84
+ "example:vite": "yarn build:esm && yarn link && cd examples/vite && yarn && yarn start",
85
+ "cli:local": "node lib/esm/cli/cli.js"
85
86
  },
86
87
  "devDependencies": {
87
88
  "@commitlint/cli": "^17.1.2",