@ar.io/sdk 2.5.0-alpha.8 → 2.5.0

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.
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import { AOProcess } from '../common/index.js';
17
- import { AoMessageResult, AoPrimaryName, AoPrimaryNameRequest, AtLeastOne, BlockHeight, ProcessId, Timestamp, TransactionId, WalletAddress, WriteOptions } from './index.js';
17
+ import { AoMessageResult, AoPrimaryName, AoPrimaryNameRequest, AoRedelegationFeeInfo, AtLeastOne, BlockHeight, ProcessId, Timestamp, TransactionId, WalletAddress, WriteOptions } from './index.js';
18
18
  import { mIOToken } from './token.js';
19
19
  export type PaginationParams<T = Record<string, never>> = {
20
20
  cursor?: string;
@@ -140,10 +140,8 @@ export type AoWalletVault = AoVaultData & {
140
140
  };
141
141
  export type AoGateway = {
142
142
  settings: AoGatewaySettings;
143
- delegates: AoGatewayDelegates;
144
143
  stats: AoGatewayStats;
145
144
  totalDelegatedStake: number;
146
- vaults: Record<WalletAddress, AoVaultData>;
147
145
  startTimestamp: Timestamp;
148
146
  endTimestamp: Timestamp;
149
147
  observerAddress: WalletAddress;
@@ -239,6 +237,13 @@ export type AoStakeDelegation = AoDelegationBase & {
239
237
  balance: number;
240
238
  };
241
239
  export type AoDelegation = AoStakeDelegation | AoVaultDelegation;
240
+ export type AoGatewayVault = {
241
+ cursorId: string;
242
+ vaultId: TransactionId;
243
+ balance: number;
244
+ endTimestamp: Timestamp;
245
+ startTimestamp: Timestamp;
246
+ };
242
247
  export type AoJoinNetworkParams = Pick<AoGateway, 'operatorStake' | 'observerAddress'> & Partial<AoGatewaySettings>;
243
248
  export type AoUpdateGatewaySettingsParams = AtLeastOne<AoJoinNetworkParams>;
244
249
  export interface AoIORead {
@@ -263,6 +268,12 @@ export interface AoIORead {
263
268
  getDelegations(params: PaginationParams<AoDelegation> & {
264
269
  address: WalletAddress;
265
270
  }): Promise<PaginationResult<AoDelegation>>;
271
+ getAllowedDelegates(params: PaginationParams & {
272
+ address: WalletAddress;
273
+ }): Promise<PaginationResult<WalletAddress>>;
274
+ getGatewayVaults(params: PaginationParams<AoGatewayVault> & {
275
+ address: WalletAddress;
276
+ }): Promise<PaginationResult<AoGatewayVault>>;
266
277
  getBalance(params: {
267
278
  address: WalletAddress;
268
279
  }): Promise<number>;
@@ -320,6 +331,9 @@ export interface AoIORead {
320
331
  name: string;
321
332
  }): Promise<AoPrimaryName>;
322
333
  getPrimaryNames(params?: PaginationParams<AoPrimaryName>): Promise<PaginationResult<AoPrimaryName>>;
334
+ getRedelegationFee(params: {
335
+ address: WalletAddress;
336
+ }): Promise<AoRedelegationFeeInfo>;
323
337
  }
324
338
  export interface AoIOWrite extends AoIORead {
325
339
  transfer({ target, qty, }: {
@@ -383,6 +397,12 @@ export interface AoIOWrite extends AoIORead {
383
397
  requestPrimaryName(params: {
384
398
  name: string;
385
399
  }): Promise<AoMessageResult>;
400
+ redelegateStake(params: {
401
+ target: string;
402
+ source: string;
403
+ stakeQty: number | mIOToken;
404
+ vaultId?: string;
405
+ }, options?: WriteOptions): Promise<AoMessageResult>;
386
406
  }
387
407
  export declare function isProcessConfiguration(config: object): config is {
388
408
  process: AOProcess;
@@ -1,6 +1,6 @@
1
1
  import Arweave from 'arweave';
2
2
  import { Logger } from '../common/index.js';
3
- import { AoANTRecord, AoANTRecordEntry } from '../types/ant.js';
3
+ import { AoANTRecord } from '../types/ant.js';
4
4
  import { AoClient, AoSigner, ContractSigner, WalletAddress } from '../types/index.js';
5
5
  export declare function spawnANT({ signer, module, luaCodeTxId, ao, scheduler, state, stateContractTxId, antRegistryId, logger, arweave, }: {
6
6
  signer: AoSigner;
@@ -31,8 +31,3 @@ export declare function evolveANT({ signer, processId, luaCodeTxId, ao, logger,
31
31
  }): Promise<string>;
32
32
  export declare function isAoSigner(value: unknown): value is AoSigner;
33
33
  export declare function createAoSigner(signer: ContractSigner): AoSigner;
34
- /**
35
- * @param records @type {AoANTRecordEntry[] | Record<string, AoANTRecord>} - the records returned by an ANT
36
- * @returns @type {AoANTRecordEntry[]} - the alphabetically sorted records
37
- */
38
- export declare function parseAntRecords(records: AoANTRecordEntry[] | Record<string, AoANTRecord>): AoANTRecordEntry[];
@@ -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 = "2.5.0-alpha.7";
16
+ export declare const version = "2.5.0-alpha.14";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ar.io/sdk",
3
- "version": "2.5.0-alpha.8",
3
+ "version": "2.5.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/ar-io/ar-io-sdk.git"