@rialo/ts-cdk 0.1.8 → 0.1.9
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/dist/index.d.mts +31 -4
- package/dist/index.d.ts +31 -4
- package/dist/index.js +42 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +42 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1386,13 +1386,16 @@ interface GetSignaturesForAddressConfig {
|
|
|
1386
1386
|
* Get signatures for address response.
|
|
1387
1387
|
*/
|
|
1388
1388
|
interface GetSignaturesForAddressResponse {
|
|
1389
|
+
context: {
|
|
1390
|
+
slot: bigint;
|
|
1391
|
+
apiVersion: string;
|
|
1392
|
+
};
|
|
1389
1393
|
/** Array of signature information */
|
|
1390
|
-
|
|
1394
|
+
value: Array<{
|
|
1391
1395
|
signature: string;
|
|
1392
|
-
|
|
1396
|
+
blockHeight: bigint;
|
|
1397
|
+
blockTime: bigint;
|
|
1393
1398
|
err?: string;
|
|
1394
|
-
memo?: string;
|
|
1395
|
-
blockTime?: bigint;
|
|
1396
1399
|
}>;
|
|
1397
1400
|
}
|
|
1398
1401
|
/**
|
|
@@ -1530,6 +1533,10 @@ declare class RialoClient {
|
|
|
1530
1533
|
* Retrieves the current block height.
|
|
1531
1534
|
*/
|
|
1532
1535
|
getBlockHeight(): Promise<bigint>;
|
|
1536
|
+
/**
|
|
1537
|
+
* Retrieves the signatures for an address.
|
|
1538
|
+
*/
|
|
1539
|
+
getSignaturesForAddress(address: PublicKey, config?: GetSignaturesForAddressConfig): Promise<GetSignaturesForAddressResponse>;
|
|
1533
1540
|
/**
|
|
1534
1541
|
* Retrieves detailed information about a transaction.
|
|
1535
1542
|
*
|
|
@@ -1662,6 +1669,26 @@ declare class QueryRpcClient extends BaseRpcClient {
|
|
|
1662
1669
|
* ```
|
|
1663
1670
|
*/
|
|
1664
1671
|
getBlockHeight(): Promise<bigint>;
|
|
1672
|
+
/**
|
|
1673
|
+
* Retrieve transaction signatures for a given address.
|
|
1674
|
+
*
|
|
1675
|
+
* Returns transaction signatures with metadata associated with the specified
|
|
1676
|
+
* address, ordered by slot height (most recent first).
|
|
1677
|
+
*
|
|
1678
|
+
* @param address - The public key of the address to query
|
|
1679
|
+
* @param config - Optional configuration options for the query (limit, before, until)
|
|
1680
|
+
* @returns Response containing context and array of signature info with blockHeight and blockTime
|
|
1681
|
+
*
|
|
1682
|
+
* @example
|
|
1683
|
+
* ```typescript
|
|
1684
|
+
* const result = await client.getSignaturesForAddress(publicKey, { limit: 10 });
|
|
1685
|
+
* console.log(`Query slot: ${result.context.slot}`);
|
|
1686
|
+
* result.value.forEach(sig => {
|
|
1687
|
+
* console.log(`Transaction: ${sig.signature}, block: ${sig.blockHeight}`);
|
|
1688
|
+
* });
|
|
1689
|
+
* ```
|
|
1690
|
+
*/
|
|
1691
|
+
getSignaturesForAddress(address: PublicKey, config?: GetSignaturesForAddressConfig): Promise<GetSignaturesForAddressResponse>;
|
|
1665
1692
|
/**
|
|
1666
1693
|
* Retrieve detailed information about a confirmed transaction.
|
|
1667
1694
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -1386,13 +1386,16 @@ interface GetSignaturesForAddressConfig {
|
|
|
1386
1386
|
* Get signatures for address response.
|
|
1387
1387
|
*/
|
|
1388
1388
|
interface GetSignaturesForAddressResponse {
|
|
1389
|
+
context: {
|
|
1390
|
+
slot: bigint;
|
|
1391
|
+
apiVersion: string;
|
|
1392
|
+
};
|
|
1389
1393
|
/** Array of signature information */
|
|
1390
|
-
|
|
1394
|
+
value: Array<{
|
|
1391
1395
|
signature: string;
|
|
1392
|
-
|
|
1396
|
+
blockHeight: bigint;
|
|
1397
|
+
blockTime: bigint;
|
|
1393
1398
|
err?: string;
|
|
1394
|
-
memo?: string;
|
|
1395
|
-
blockTime?: bigint;
|
|
1396
1399
|
}>;
|
|
1397
1400
|
}
|
|
1398
1401
|
/**
|
|
@@ -1530,6 +1533,10 @@ declare class RialoClient {
|
|
|
1530
1533
|
* Retrieves the current block height.
|
|
1531
1534
|
*/
|
|
1532
1535
|
getBlockHeight(): Promise<bigint>;
|
|
1536
|
+
/**
|
|
1537
|
+
* Retrieves the signatures for an address.
|
|
1538
|
+
*/
|
|
1539
|
+
getSignaturesForAddress(address: PublicKey, config?: GetSignaturesForAddressConfig): Promise<GetSignaturesForAddressResponse>;
|
|
1533
1540
|
/**
|
|
1534
1541
|
* Retrieves detailed information about a transaction.
|
|
1535
1542
|
*
|
|
@@ -1662,6 +1669,26 @@ declare class QueryRpcClient extends BaseRpcClient {
|
|
|
1662
1669
|
* ```
|
|
1663
1670
|
*/
|
|
1664
1671
|
getBlockHeight(): Promise<bigint>;
|
|
1672
|
+
/**
|
|
1673
|
+
* Retrieve transaction signatures for a given address.
|
|
1674
|
+
*
|
|
1675
|
+
* Returns transaction signatures with metadata associated with the specified
|
|
1676
|
+
* address, ordered by slot height (most recent first).
|
|
1677
|
+
*
|
|
1678
|
+
* @param address - The public key of the address to query
|
|
1679
|
+
* @param config - Optional configuration options for the query (limit, before, until)
|
|
1680
|
+
* @returns Response containing context and array of signature info with blockHeight and blockTime
|
|
1681
|
+
*
|
|
1682
|
+
* @example
|
|
1683
|
+
* ```typescript
|
|
1684
|
+
* const result = await client.getSignaturesForAddress(publicKey, { limit: 10 });
|
|
1685
|
+
* console.log(`Query slot: ${result.context.slot}`);
|
|
1686
|
+
* result.value.forEach(sig => {
|
|
1687
|
+
* console.log(`Transaction: ${sig.signature}, block: ${sig.blockHeight}`);
|
|
1688
|
+
* });
|
|
1689
|
+
* ```
|
|
1690
|
+
*/
|
|
1691
|
+
getSignaturesForAddress(address: PublicKey, config?: GetSignaturesForAddressConfig): Promise<GetSignaturesForAddressResponse>;
|
|
1665
1692
|
/**
|
|
1666
1693
|
* Retrieve detailed information about a confirmed transaction.
|
|
1667
1694
|
*
|
package/dist/index.js
CHANGED
|
@@ -6859,9 +6859,9 @@ var QueryRpcClient = class extends BaseRpcClient {
|
|
|
6859
6859
|
return null;
|
|
6860
6860
|
}
|
|
6861
6861
|
return {
|
|
6862
|
-
balance: BigInt(result.value.
|
|
6862
|
+
balance: BigInt(result.value.kelvin),
|
|
6863
6863
|
owner: PublicKey.fromString(result.value.owner),
|
|
6864
|
-
data: fromBase64(result.value.data),
|
|
6864
|
+
data: fromBase64(result.value.data[0]),
|
|
6865
6865
|
executable: result.value.executable,
|
|
6866
6866
|
rentEpoch: BigInt(result.value.rentEpoch)
|
|
6867
6867
|
};
|
|
@@ -6884,6 +6884,40 @@ var QueryRpcClient = class extends BaseRpcClient {
|
|
|
6884
6884
|
const result = await this.call("getBlockHeight", []);
|
|
6885
6885
|
return BigInt(result);
|
|
6886
6886
|
}
|
|
6887
|
+
/**
|
|
6888
|
+
* Retrieve transaction signatures for a given address.
|
|
6889
|
+
*
|
|
6890
|
+
* Returns transaction signatures with metadata associated with the specified
|
|
6891
|
+
* address, ordered by slot height (most recent first).
|
|
6892
|
+
*
|
|
6893
|
+
* @param address - The public key of the address to query
|
|
6894
|
+
* @param config - Optional configuration options for the query (limit, before, until)
|
|
6895
|
+
* @returns Response containing context and array of signature info with blockHeight and blockTime
|
|
6896
|
+
*
|
|
6897
|
+
* @example
|
|
6898
|
+
* ```typescript
|
|
6899
|
+
* const result = await client.getSignaturesForAddress(publicKey, { limit: 10 });
|
|
6900
|
+
* console.log(`Query slot: ${result.context.slot}`);
|
|
6901
|
+
* result.value.forEach(sig => {
|
|
6902
|
+
* console.log(`Transaction: ${sig.signature}, block: ${sig.blockHeight}`);
|
|
6903
|
+
* });
|
|
6904
|
+
* ```
|
|
6905
|
+
*/
|
|
6906
|
+
async getSignaturesForAddress(address, config) {
|
|
6907
|
+
const result = await this.call("getSignaturesForAddress", [address.toString(), config ?? {}]);
|
|
6908
|
+
return {
|
|
6909
|
+
context: {
|
|
6910
|
+
slot: BigInt(result.context.slot),
|
|
6911
|
+
apiVersion: result.context.api_version
|
|
6912
|
+
},
|
|
6913
|
+
value: result.value.map((signature) => ({
|
|
6914
|
+
signature: signature.signature,
|
|
6915
|
+
blockHeight: BigInt(signature.blockHeight),
|
|
6916
|
+
blockTime: BigInt(signature.blockTime),
|
|
6917
|
+
err: signature.err
|
|
6918
|
+
}))
|
|
6919
|
+
};
|
|
6920
|
+
}
|
|
6887
6921
|
/**
|
|
6888
6922
|
* Retrieve detailed information about a confirmed transaction.
|
|
6889
6923
|
*
|
|
@@ -7265,6 +7299,12 @@ var RialoClient = class {
|
|
|
7265
7299
|
async getBlockHeight() {
|
|
7266
7300
|
return await this.queryClient.getBlockHeight();
|
|
7267
7301
|
}
|
|
7302
|
+
/**
|
|
7303
|
+
* Retrieves the signatures for an address.
|
|
7304
|
+
*/
|
|
7305
|
+
async getSignaturesForAddress(address, config) {
|
|
7306
|
+
return this.queryClient.getSignaturesForAddress(address, config);
|
|
7307
|
+
}
|
|
7268
7308
|
/**
|
|
7269
7309
|
* Retrieves detailed information about a transaction.
|
|
7270
7310
|
*
|