@rialo/ts-cdk 0.1.8 → 0.1.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.
- package/dist/index.d.mts +31 -4
- package/dist/index.d.ts +31 -4
- package/dist/index.js +43 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +43 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -452,7 +452,7 @@ var DEFAULT_NUM_ACCOUNTS = 1;
|
|
|
452
452
|
var URL_MAINNET = "https://mainnet.rialo.io:4101";
|
|
453
453
|
var URL_TESTNET = "https://testnet.rialo.io:4101";
|
|
454
454
|
var URL_DEVNET = "https://devnet.rialo.io:4101";
|
|
455
|
-
var URL_LOCALNET = "http://localhost:
|
|
455
|
+
var URL_LOCALNET = "http://localhost:4104";
|
|
456
456
|
var RIALO_MAINNET_CHAIN = {
|
|
457
457
|
id: "rialo:mainnet",
|
|
458
458
|
name: "Mainnet",
|
|
@@ -6857,9 +6857,9 @@ var QueryRpcClient = class extends BaseRpcClient {
|
|
|
6857
6857
|
return null;
|
|
6858
6858
|
}
|
|
6859
6859
|
return {
|
|
6860
|
-
balance: BigInt(result.value.
|
|
6860
|
+
balance: BigInt(result.value.kelvin),
|
|
6861
6861
|
owner: PublicKey.fromString(result.value.owner),
|
|
6862
|
-
data: fromBase64(result.value.data),
|
|
6862
|
+
data: fromBase64(result.value.data[0]),
|
|
6863
6863
|
executable: result.value.executable,
|
|
6864
6864
|
rentEpoch: BigInt(result.value.rentEpoch)
|
|
6865
6865
|
};
|
|
@@ -6882,6 +6882,40 @@ var QueryRpcClient = class extends BaseRpcClient {
|
|
|
6882
6882
|
const result = await this.call("getBlockHeight", []);
|
|
6883
6883
|
return BigInt(result);
|
|
6884
6884
|
}
|
|
6885
|
+
/**
|
|
6886
|
+
* Retrieve transaction signatures for a given address.
|
|
6887
|
+
*
|
|
6888
|
+
* Returns transaction signatures with metadata associated with the specified
|
|
6889
|
+
* address, ordered by slot height (most recent first).
|
|
6890
|
+
*
|
|
6891
|
+
* @param address - The public key of the address to query
|
|
6892
|
+
* @param config - Optional configuration options for the query (limit, before, until)
|
|
6893
|
+
* @returns Response containing context and array of signature info with blockHeight and blockTime
|
|
6894
|
+
*
|
|
6895
|
+
* @example
|
|
6896
|
+
* ```typescript
|
|
6897
|
+
* const result = await client.getSignaturesForAddress(publicKey, { limit: 10 });
|
|
6898
|
+
* console.log(`Query slot: ${result.context.slot}`);
|
|
6899
|
+
* result.value.forEach(sig => {
|
|
6900
|
+
* console.log(`Transaction: ${sig.signature}, block: ${sig.blockHeight}`);
|
|
6901
|
+
* });
|
|
6902
|
+
* ```
|
|
6903
|
+
*/
|
|
6904
|
+
async getSignaturesForAddress(address, config) {
|
|
6905
|
+
const result = await this.call("getSignaturesForAddress", [{ address: address.toString(), config: config ?? {} }]);
|
|
6906
|
+
return {
|
|
6907
|
+
context: {
|
|
6908
|
+
slot: BigInt(result.context.slot),
|
|
6909
|
+
apiVersion: result.context.api_version
|
|
6910
|
+
},
|
|
6911
|
+
value: result.value.map((signature) => ({
|
|
6912
|
+
signature: signature.signature,
|
|
6913
|
+
blockHeight: BigInt(signature.blockHeight),
|
|
6914
|
+
blockTime: BigInt(signature.blockTime),
|
|
6915
|
+
err: signature.err
|
|
6916
|
+
}))
|
|
6917
|
+
};
|
|
6918
|
+
}
|
|
6885
6919
|
/**
|
|
6886
6920
|
* Retrieve detailed information about a confirmed transaction.
|
|
6887
6921
|
*
|
|
@@ -7263,6 +7297,12 @@ var RialoClient = class {
|
|
|
7263
7297
|
async getBlockHeight() {
|
|
7264
7298
|
return await this.queryClient.getBlockHeight();
|
|
7265
7299
|
}
|
|
7300
|
+
/**
|
|
7301
|
+
* Retrieves the signatures for an address.
|
|
7302
|
+
*/
|
|
7303
|
+
async getSignaturesForAddress(address, config) {
|
|
7304
|
+
return this.queryClient.getSignaturesForAddress(address, config);
|
|
7305
|
+
}
|
|
7266
7306
|
/**
|
|
7267
7307
|
* Retrieves detailed information about a transaction.
|
|
7268
7308
|
*
|