@rialo/ts-cdk 0.3.0-alpha.1 → 0.4.0-alpha.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.
- package/dist/index.d.mts +143 -11
- package/dist/index.d.ts +143 -11
- package/dist/index.js +380 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +364 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1503,7 +1503,7 @@ interface ValidatorInfoRequest {
|
|
|
1503
1503
|
stateSyncAddress: string;
|
|
1504
1504
|
/** Validator hostname. */
|
|
1505
1505
|
hostname: string;
|
|
1506
|
-
/**
|
|
1506
|
+
/** Identity public key. */
|
|
1507
1507
|
authorityKey: string;
|
|
1508
1508
|
/** Protocol public key. */
|
|
1509
1509
|
protocolKey: string;
|
|
@@ -1614,6 +1614,8 @@ interface StakeAccountInfo {
|
|
|
1614
1614
|
adminAuthority: string;
|
|
1615
1615
|
/** Withdraw authority (cold wallet, base58). */
|
|
1616
1616
|
withdrawAuthority: string;
|
|
1617
|
+
/** Optional account that receives rewards instead of compounding (base58). */
|
|
1618
|
+
rewardReceiver?: string;
|
|
1617
1619
|
}
|
|
1618
1620
|
/**
|
|
1619
1621
|
* Request parameters for getValidatorAccounts.
|
|
@@ -1630,16 +1632,16 @@ interface ValidatorAccountInfo {
|
|
|
1630
1632
|
commission: bigint;
|
|
1631
1633
|
/** Public key of the validator info account (base58). */
|
|
1632
1634
|
pubkey: string;
|
|
1633
|
-
/**
|
|
1634
|
-
|
|
1635
|
-
/**
|
|
1636
|
-
|
|
1637
|
-
/**
|
|
1638
|
-
|
|
1639
|
-
/**
|
|
1640
|
-
stakeCurrent?: bigint;
|
|
1641
|
-
/** Network address for communicating with the validator. */
|
|
1635
|
+
/** Signing key / initial withdrawal key (base58). */
|
|
1636
|
+
signingKey: string;
|
|
1637
|
+
/** Commission withdrawal key (base58). */
|
|
1638
|
+
withdrawalKey: string;
|
|
1639
|
+
/** Aggregate delegated stake for this validator. */
|
|
1640
|
+
stake: bigint;
|
|
1641
|
+
/** Network address for consensus communication. */
|
|
1642
1642
|
address: string;
|
|
1643
|
+
/** Network address for state synchronization. */
|
|
1644
|
+
stateSyncAddress: string;
|
|
1643
1645
|
}
|
|
1644
1646
|
/**
|
|
1645
1647
|
* SPL Token account balance information.
|
|
@@ -4503,4 +4505,134 @@ declare function getMainnetUrl(): string;
|
|
|
4503
4505
|
*/
|
|
4504
4506
|
declare function getLocalnetUrl(): string;
|
|
4505
4507
|
|
|
4506
|
-
|
|
4508
|
+
/** RISC-V loader program ID (PolkaVM bytecode). */
|
|
4509
|
+
declare const RISCV_LOADER_PROGRAM_ID = "RiscVLoader11111111111111111111111111111111";
|
|
4510
|
+
/** LoaderV4 program ID (eBPF programs). */
|
|
4511
|
+
declare const LOADER_V4_PROGRAM_ID = "LoaderV411111111111111111111111111111111111";
|
|
4512
|
+
/** Default chunk size for writing program data (bytes). */
|
|
4513
|
+
declare const DEFAULT_CHUNK_SIZE = 3700;
|
|
4514
|
+
/** Default max retries when polling for confirmation. */
|
|
4515
|
+
declare const DEFAULT_MAX_RETRIES = 350;
|
|
4516
|
+
/** Default base delay between retries (ms). */
|
|
4517
|
+
declare const DEFAULT_RETRY_BASE_DELAY_MS = 50;
|
|
4518
|
+
/** Default max delay between retries (ms). */
|
|
4519
|
+
declare const DEFAULT_RETRY_MAX_DELAY_MS = 1000;
|
|
4520
|
+
/** Number of chunks to confirm per batch. */
|
|
4521
|
+
declare const DEFAULT_CONFIRMATION_BATCH_SIZE = 25;
|
|
4522
|
+
/** Safety factor for rent-exempt balance calculation. */
|
|
4523
|
+
declare const BUFFER_BALANCE_FACTOR = 1.2;
|
|
4524
|
+
/** Byte offset where program data begins in a loader account (size of LoaderState header). */
|
|
4525
|
+
declare const PROGRAM_DATA_OFFSET = 48;
|
|
4526
|
+
|
|
4527
|
+
interface DeploymentConfig {
|
|
4528
|
+
chunkSize?: number;
|
|
4529
|
+
maxRetries?: number;
|
|
4530
|
+
retryBaseDelayMs?: number;
|
|
4531
|
+
retryMaxDelayMs?: number;
|
|
4532
|
+
confirmationBatchSize?: number;
|
|
4533
|
+
}
|
|
4534
|
+
interface ProgramDeploymentOptions {
|
|
4535
|
+
programData: Uint8Array;
|
|
4536
|
+
programKeypair: Keypair;
|
|
4537
|
+
config?: DeploymentConfig;
|
|
4538
|
+
}
|
|
4539
|
+
/**
|
|
4540
|
+
* Deploys PolkaVM programs to Rialo chains.
|
|
4541
|
+
*
|
|
4542
|
+
* Matches the Rust CDK's ProgramDeployment behavior:
|
|
4543
|
+
* 1. Create/prepare program account
|
|
4544
|
+
* 2. Write bytecode in chunks with batched confirmation
|
|
4545
|
+
* 3. Deploy (make executable)
|
|
4546
|
+
*/
|
|
4547
|
+
declare class ProgramDeployment {
|
|
4548
|
+
private readonly programData;
|
|
4549
|
+
private readonly programKeypair;
|
|
4550
|
+
private readonly chunkSize;
|
|
4551
|
+
private readonly maxRetries;
|
|
4552
|
+
private readonly retryBaseDelayMs;
|
|
4553
|
+
private readonly retryMaxDelayMs;
|
|
4554
|
+
private readonly confirmationBatchSize;
|
|
4555
|
+
constructor(options: ProgramDeploymentOptions);
|
|
4556
|
+
/**
|
|
4557
|
+
* Deploy the program to the blockchain.
|
|
4558
|
+
*
|
|
4559
|
+
* @param client - RPC client
|
|
4560
|
+
* @param payerKeypair - Keypair that pays for transactions and becomes the program authority
|
|
4561
|
+
* @returns The program's public key (derived from programKeypair)
|
|
4562
|
+
*/
|
|
4563
|
+
deploy(client: RialoClient, payerKeypair: Keypair): Promise<PublicKey>;
|
|
4564
|
+
private splitIntoChunks;
|
|
4565
|
+
private sendAndConfirm;
|
|
4566
|
+
private confirmBatch;
|
|
4567
|
+
private toDeploymentError;
|
|
4568
|
+
private waitForBufferReady;
|
|
4569
|
+
}
|
|
4570
|
+
|
|
4571
|
+
/**
|
|
4572
|
+
* Error codes for program deployment operations.
|
|
4573
|
+
*/
|
|
4574
|
+
declare enum DeploymentErrorCode {
|
|
4575
|
+
EMPTY_PROGRAM_DATA = "EMPTY_PROGRAM_DATA",
|
|
4576
|
+
INVALID_CHUNK_SIZE = "INVALID_CHUNK_SIZE",
|
|
4577
|
+
OWNER_MISMATCH = "OWNER_MISMATCH",
|
|
4578
|
+
TRANSACTION_FAILED = "TRANSACTION_FAILED",
|
|
4579
|
+
TRANSACTION_TIMEOUT = "TRANSACTION_TIMEOUT",
|
|
4580
|
+
RPC_ERROR = "RPC_ERROR",
|
|
4581
|
+
BUFFER_NOT_READY = "BUFFER_NOT_READY"
|
|
4582
|
+
}
|
|
4583
|
+
/**
|
|
4584
|
+
* Error class for program deployment operations with structured error information.
|
|
4585
|
+
*/
|
|
4586
|
+
declare class DeploymentError extends Error {
|
|
4587
|
+
readonly code: DeploymentErrorCode;
|
|
4588
|
+
readonly details?: Record<string, unknown> | undefined;
|
|
4589
|
+
constructor(code: DeploymentErrorCode, message: string, details?: Record<string, unknown> | undefined);
|
|
4590
|
+
static emptyProgramData(): DeploymentError;
|
|
4591
|
+
static invalidChunkSize(chunkSize: number): DeploymentError;
|
|
4592
|
+
static ownerMismatch(owner: string): DeploymentError;
|
|
4593
|
+
static transactionFailed(err: string, details?: Record<string, unknown>): DeploymentError;
|
|
4594
|
+
static transactionTimeout(message: string, details?: Record<string, unknown>): DeploymentError;
|
|
4595
|
+
static rpcError(message: string, details?: Record<string, unknown>): DeploymentError;
|
|
4596
|
+
static bufferNotReady(maxRetries: number): DeploymentError;
|
|
4597
|
+
toJSON(): {
|
|
4598
|
+
code: DeploymentErrorCode;
|
|
4599
|
+
message: string;
|
|
4600
|
+
details?: Record<string, unknown>;
|
|
4601
|
+
};
|
|
4602
|
+
}
|
|
4603
|
+
|
|
4604
|
+
/**
|
|
4605
|
+
* RISC-V loader instruction variant indices.
|
|
4606
|
+
* Must match `RiscVLoaderInstruction` enum order in Rust (bincode u32 encoding).
|
|
4607
|
+
*/
|
|
4608
|
+
declare enum RiscVLoaderInstruction {
|
|
4609
|
+
Write = 0,
|
|
4610
|
+
Copy = 1,
|
|
4611
|
+
SetProgramLength = 2,
|
|
4612
|
+
Deploy = 3,
|
|
4613
|
+
Retract = 4,
|
|
4614
|
+
TransferAuthority = 5,
|
|
4615
|
+
Finalize = 6
|
|
4616
|
+
}
|
|
4617
|
+
/**
|
|
4618
|
+
* Create a Write instruction to write bytecode into an undeployed program account.
|
|
4619
|
+
* Accounts: [program (writable), authority (signer)]
|
|
4620
|
+
*/
|
|
4621
|
+
declare function writeInstruction(programAddress: PublicKey, authority: PublicKey, offset: number, bytes: Uint8Array): Instruction;
|
|
4622
|
+
/**
|
|
4623
|
+
* Create a SetProgramLength instruction to resize a program account.
|
|
4624
|
+
* Accounts: [program (writable), authority (signer), recipient (writable)]
|
|
4625
|
+
*/
|
|
4626
|
+
declare function setProgramLengthInstruction(programAddress: PublicKey, authority: PublicKey, newSize: number, recipientAddress: PublicKey): Instruction;
|
|
4627
|
+
/**
|
|
4628
|
+
* Create a Deploy instruction to make a program executable.
|
|
4629
|
+
* Accounts: [program (writable), authority (signer)]
|
|
4630
|
+
*/
|
|
4631
|
+
declare function deployInstruction(programAddress: PublicKey, authority: PublicKey): Instruction;
|
|
4632
|
+
/**
|
|
4633
|
+
* Create a Retract instruction to undo deployment (enters maintenance mode).
|
|
4634
|
+
* Accounts: [program (writable), authority (signer)]
|
|
4635
|
+
*/
|
|
4636
|
+
declare function retractInstruction(programAddress: PublicKey, authority: PublicKey): Instruction;
|
|
4637
|
+
|
|
4638
|
+
export { type AccountFilter, type AccountFilterParam, type AccountInfo, type AccountMeta, AccountMetaTable, type AllAccountsEntry, BASE_DERIVATION_PATH, BUFFER_BALANCE_FACTOR, BaseRpcClient, BincodeReader, type BincodeSchema, BincodeWriter, type BlockInfo, type Bump, CHACHA20_POLY1305_TAG_LENGTH, type ChainDefinition, type ClusterNodeInfo, type CompiledInstruction, type ConfigHashPrefix, type ConfirmTransactionOptions, type ConfirmedTransaction, type ConnectedNode, CryptoError, CryptoErrorCode, DEFAULT_CHUNK_SIZE, DEFAULT_CONFIRMATION_BATCH_SIZE, DEFAULT_MAX_RETRIES, DEFAULT_NUM_ACCOUNTS, DEFAULT_RETRY_BASE_DELAY_MS, DEFAULT_RETRY_MAX_DELAY_MS, type DeploymentConfig, DeploymentError, DeploymentErrorCode, ED25519_PUBLIC_KEY_LENGTH, type EnumVariant, type EpochConsensusConfigRequest, type EpochInfo, type EventData, type FeeResponse, type GetAccountsByOwnerConfig, type GetAllAccountsConfig, type GetBlockConfig, type GetSignaturesForAddressConfig, type GetTransactionsConfig, type GetValidatorAccountsRequest, type GetWorkflowLineageRequest, type GetWorkflowLineageResponse, HPKE_ENC_LENGTH, HPKE_OVERHEAD_LENGTH, HpkeError, HpkeErrorCode, HttpTransport, type HttpTransportConfig, type IdentifierString, type InferSchema, type Instruction, type IsBlockhashValidResponse, KELVIN_PER_RLO, type Kelvin, Keypair, KeypairSigner, LOADER_V4_PROGRAM_ID, Message, type MessageHeader, Mnemonic, type MnemonicStrength, type OptionalAccountInfo, type OwnerAccount, type PDA, PROGRAM_DATA_OFFSET, PUBLIC_KEY_LENGTH, type PaginationInfo, ProgramDeployment, type ProgramDeploymentOptions, PublicKey, QueryRpcClient, RIALO_DEVNET_CHAIN, RIALO_LOCALNET_CHAIN, RIALO_MAINNET_CHAIN, RIALO_TESTNET_CHAIN, RISCV_LOADER_PROGRAM_ID, type RexDuty, type RexInfoAndDuties, RexValue, RexValueVariant, RialoClient, type RialoClientConfig, RialoError, RialoErrorType, type RialoNetwork, RiscVLoaderInstruction, RpcError, RpcErrorCode, type RpcErrorDetails$1 as RpcErrorDetails, SECRET_KEY_LENGTH, SECRET_SHARING_HPKE_INFO, SIGNATURE_LENGTH, SYSTEM_PROGRAM_ID, Schema, type SecretSharingPubkey, type Seed, type SendAndConfirmOptions, type SendTransactionOptions, Signature$1 as Signature, type SignatureInfo, type SignatureStatus, type Signer, type StakeAccountInfo, type StakeState, type StructField, type SubmitEpochChangeRequest, type SubmitEpochChangeResponse, type Subscription, type SubscriptionAccountMeta, type SubscriptionInstruction, type SubscriptionKind, SystemInstruction, type TimestampRange, type TokenBalance, Transaction, TransactionBuilder, type TransactionData, TransactionError, TransactionErrorCode, type TransactionInfo, type TransactionMessage, type TransactionNodeData, type TransactionResponse, TransactionRpcClient, type TransactionStatusMetadata, type TransactionWithMeta, type TriggerInfo, type TriggeredTransaction, type TruncationReason, URL_DEVNET, URL_LOCALNET, URL_MAINNET, URL_TESTNET, USER_SECRET_AAD, type ValidatorAccountInfo, type ValidatorHealth, type ValidatorInfoRequest, type WorkflowLineage, type WorkflowNode, X25519_PUBLIC_KEY_LENGTH, allocateInstruction, assignInstruction, calculateBackoff, concatBytes, createAccount, createBorshInstruction, createRialoClient, deployInstruction, deserialize, deserializeBorsh, deserializeCompactU16, deserializeStrict, encodeBorshData, encryptForRex, fromBase64, getCiphertextLength, getDefaultRialoClientConfig, getDevnetUrl, getLocalnetUrl, getMainnetUrl, getTestnetUrl, hpkeEncrypt, isOnCurve, isValidCiphertextLength, retractInstruction, seedToBytes, serialize, serializeBorsh, serializeCompactU16, setProgramLengthInstruction, sleep, toBase64, transferInstruction, writeCompactU16, writeInstruction };
|
package/dist/index.d.ts
CHANGED
|
@@ -1503,7 +1503,7 @@ interface ValidatorInfoRequest {
|
|
|
1503
1503
|
stateSyncAddress: string;
|
|
1504
1504
|
/** Validator hostname. */
|
|
1505
1505
|
hostname: string;
|
|
1506
|
-
/**
|
|
1506
|
+
/** Identity public key. */
|
|
1507
1507
|
authorityKey: string;
|
|
1508
1508
|
/** Protocol public key. */
|
|
1509
1509
|
protocolKey: string;
|
|
@@ -1614,6 +1614,8 @@ interface StakeAccountInfo {
|
|
|
1614
1614
|
adminAuthority: string;
|
|
1615
1615
|
/** Withdraw authority (cold wallet, base58). */
|
|
1616
1616
|
withdrawAuthority: string;
|
|
1617
|
+
/** Optional account that receives rewards instead of compounding (base58). */
|
|
1618
|
+
rewardReceiver?: string;
|
|
1617
1619
|
}
|
|
1618
1620
|
/**
|
|
1619
1621
|
* Request parameters for getValidatorAccounts.
|
|
@@ -1630,16 +1632,16 @@ interface ValidatorAccountInfo {
|
|
|
1630
1632
|
commission: bigint;
|
|
1631
1633
|
/** Public key of the validator info account (base58). */
|
|
1632
1634
|
pubkey: string;
|
|
1633
|
-
/**
|
|
1634
|
-
|
|
1635
|
-
/**
|
|
1636
|
-
|
|
1637
|
-
/**
|
|
1638
|
-
|
|
1639
|
-
/**
|
|
1640
|
-
stakeCurrent?: bigint;
|
|
1641
|
-
/** Network address for communicating with the validator. */
|
|
1635
|
+
/** Signing key / initial withdrawal key (base58). */
|
|
1636
|
+
signingKey: string;
|
|
1637
|
+
/** Commission withdrawal key (base58). */
|
|
1638
|
+
withdrawalKey: string;
|
|
1639
|
+
/** Aggregate delegated stake for this validator. */
|
|
1640
|
+
stake: bigint;
|
|
1641
|
+
/** Network address for consensus communication. */
|
|
1642
1642
|
address: string;
|
|
1643
|
+
/** Network address for state synchronization. */
|
|
1644
|
+
stateSyncAddress: string;
|
|
1643
1645
|
}
|
|
1644
1646
|
/**
|
|
1645
1647
|
* SPL Token account balance information.
|
|
@@ -4503,4 +4505,134 @@ declare function getMainnetUrl(): string;
|
|
|
4503
4505
|
*/
|
|
4504
4506
|
declare function getLocalnetUrl(): string;
|
|
4505
4507
|
|
|
4506
|
-
|
|
4508
|
+
/** RISC-V loader program ID (PolkaVM bytecode). */
|
|
4509
|
+
declare const RISCV_LOADER_PROGRAM_ID = "RiscVLoader11111111111111111111111111111111";
|
|
4510
|
+
/** LoaderV4 program ID (eBPF programs). */
|
|
4511
|
+
declare const LOADER_V4_PROGRAM_ID = "LoaderV411111111111111111111111111111111111";
|
|
4512
|
+
/** Default chunk size for writing program data (bytes). */
|
|
4513
|
+
declare const DEFAULT_CHUNK_SIZE = 3700;
|
|
4514
|
+
/** Default max retries when polling for confirmation. */
|
|
4515
|
+
declare const DEFAULT_MAX_RETRIES = 350;
|
|
4516
|
+
/** Default base delay between retries (ms). */
|
|
4517
|
+
declare const DEFAULT_RETRY_BASE_DELAY_MS = 50;
|
|
4518
|
+
/** Default max delay between retries (ms). */
|
|
4519
|
+
declare const DEFAULT_RETRY_MAX_DELAY_MS = 1000;
|
|
4520
|
+
/** Number of chunks to confirm per batch. */
|
|
4521
|
+
declare const DEFAULT_CONFIRMATION_BATCH_SIZE = 25;
|
|
4522
|
+
/** Safety factor for rent-exempt balance calculation. */
|
|
4523
|
+
declare const BUFFER_BALANCE_FACTOR = 1.2;
|
|
4524
|
+
/** Byte offset where program data begins in a loader account (size of LoaderState header). */
|
|
4525
|
+
declare const PROGRAM_DATA_OFFSET = 48;
|
|
4526
|
+
|
|
4527
|
+
interface DeploymentConfig {
|
|
4528
|
+
chunkSize?: number;
|
|
4529
|
+
maxRetries?: number;
|
|
4530
|
+
retryBaseDelayMs?: number;
|
|
4531
|
+
retryMaxDelayMs?: number;
|
|
4532
|
+
confirmationBatchSize?: number;
|
|
4533
|
+
}
|
|
4534
|
+
interface ProgramDeploymentOptions {
|
|
4535
|
+
programData: Uint8Array;
|
|
4536
|
+
programKeypair: Keypair;
|
|
4537
|
+
config?: DeploymentConfig;
|
|
4538
|
+
}
|
|
4539
|
+
/**
|
|
4540
|
+
* Deploys PolkaVM programs to Rialo chains.
|
|
4541
|
+
*
|
|
4542
|
+
* Matches the Rust CDK's ProgramDeployment behavior:
|
|
4543
|
+
* 1. Create/prepare program account
|
|
4544
|
+
* 2. Write bytecode in chunks with batched confirmation
|
|
4545
|
+
* 3. Deploy (make executable)
|
|
4546
|
+
*/
|
|
4547
|
+
declare class ProgramDeployment {
|
|
4548
|
+
private readonly programData;
|
|
4549
|
+
private readonly programKeypair;
|
|
4550
|
+
private readonly chunkSize;
|
|
4551
|
+
private readonly maxRetries;
|
|
4552
|
+
private readonly retryBaseDelayMs;
|
|
4553
|
+
private readonly retryMaxDelayMs;
|
|
4554
|
+
private readonly confirmationBatchSize;
|
|
4555
|
+
constructor(options: ProgramDeploymentOptions);
|
|
4556
|
+
/**
|
|
4557
|
+
* Deploy the program to the blockchain.
|
|
4558
|
+
*
|
|
4559
|
+
* @param client - RPC client
|
|
4560
|
+
* @param payerKeypair - Keypair that pays for transactions and becomes the program authority
|
|
4561
|
+
* @returns The program's public key (derived from programKeypair)
|
|
4562
|
+
*/
|
|
4563
|
+
deploy(client: RialoClient, payerKeypair: Keypair): Promise<PublicKey>;
|
|
4564
|
+
private splitIntoChunks;
|
|
4565
|
+
private sendAndConfirm;
|
|
4566
|
+
private confirmBatch;
|
|
4567
|
+
private toDeploymentError;
|
|
4568
|
+
private waitForBufferReady;
|
|
4569
|
+
}
|
|
4570
|
+
|
|
4571
|
+
/**
|
|
4572
|
+
* Error codes for program deployment operations.
|
|
4573
|
+
*/
|
|
4574
|
+
declare enum DeploymentErrorCode {
|
|
4575
|
+
EMPTY_PROGRAM_DATA = "EMPTY_PROGRAM_DATA",
|
|
4576
|
+
INVALID_CHUNK_SIZE = "INVALID_CHUNK_SIZE",
|
|
4577
|
+
OWNER_MISMATCH = "OWNER_MISMATCH",
|
|
4578
|
+
TRANSACTION_FAILED = "TRANSACTION_FAILED",
|
|
4579
|
+
TRANSACTION_TIMEOUT = "TRANSACTION_TIMEOUT",
|
|
4580
|
+
RPC_ERROR = "RPC_ERROR",
|
|
4581
|
+
BUFFER_NOT_READY = "BUFFER_NOT_READY"
|
|
4582
|
+
}
|
|
4583
|
+
/**
|
|
4584
|
+
* Error class for program deployment operations with structured error information.
|
|
4585
|
+
*/
|
|
4586
|
+
declare class DeploymentError extends Error {
|
|
4587
|
+
readonly code: DeploymentErrorCode;
|
|
4588
|
+
readonly details?: Record<string, unknown> | undefined;
|
|
4589
|
+
constructor(code: DeploymentErrorCode, message: string, details?: Record<string, unknown> | undefined);
|
|
4590
|
+
static emptyProgramData(): DeploymentError;
|
|
4591
|
+
static invalidChunkSize(chunkSize: number): DeploymentError;
|
|
4592
|
+
static ownerMismatch(owner: string): DeploymentError;
|
|
4593
|
+
static transactionFailed(err: string, details?: Record<string, unknown>): DeploymentError;
|
|
4594
|
+
static transactionTimeout(message: string, details?: Record<string, unknown>): DeploymentError;
|
|
4595
|
+
static rpcError(message: string, details?: Record<string, unknown>): DeploymentError;
|
|
4596
|
+
static bufferNotReady(maxRetries: number): DeploymentError;
|
|
4597
|
+
toJSON(): {
|
|
4598
|
+
code: DeploymentErrorCode;
|
|
4599
|
+
message: string;
|
|
4600
|
+
details?: Record<string, unknown>;
|
|
4601
|
+
};
|
|
4602
|
+
}
|
|
4603
|
+
|
|
4604
|
+
/**
|
|
4605
|
+
* RISC-V loader instruction variant indices.
|
|
4606
|
+
* Must match `RiscVLoaderInstruction` enum order in Rust (bincode u32 encoding).
|
|
4607
|
+
*/
|
|
4608
|
+
declare enum RiscVLoaderInstruction {
|
|
4609
|
+
Write = 0,
|
|
4610
|
+
Copy = 1,
|
|
4611
|
+
SetProgramLength = 2,
|
|
4612
|
+
Deploy = 3,
|
|
4613
|
+
Retract = 4,
|
|
4614
|
+
TransferAuthority = 5,
|
|
4615
|
+
Finalize = 6
|
|
4616
|
+
}
|
|
4617
|
+
/**
|
|
4618
|
+
* Create a Write instruction to write bytecode into an undeployed program account.
|
|
4619
|
+
* Accounts: [program (writable), authority (signer)]
|
|
4620
|
+
*/
|
|
4621
|
+
declare function writeInstruction(programAddress: PublicKey, authority: PublicKey, offset: number, bytes: Uint8Array): Instruction;
|
|
4622
|
+
/**
|
|
4623
|
+
* Create a SetProgramLength instruction to resize a program account.
|
|
4624
|
+
* Accounts: [program (writable), authority (signer), recipient (writable)]
|
|
4625
|
+
*/
|
|
4626
|
+
declare function setProgramLengthInstruction(programAddress: PublicKey, authority: PublicKey, newSize: number, recipientAddress: PublicKey): Instruction;
|
|
4627
|
+
/**
|
|
4628
|
+
* Create a Deploy instruction to make a program executable.
|
|
4629
|
+
* Accounts: [program (writable), authority (signer)]
|
|
4630
|
+
*/
|
|
4631
|
+
declare function deployInstruction(programAddress: PublicKey, authority: PublicKey): Instruction;
|
|
4632
|
+
/**
|
|
4633
|
+
* Create a Retract instruction to undo deployment (enters maintenance mode).
|
|
4634
|
+
* Accounts: [program (writable), authority (signer)]
|
|
4635
|
+
*/
|
|
4636
|
+
declare function retractInstruction(programAddress: PublicKey, authority: PublicKey): Instruction;
|
|
4637
|
+
|
|
4638
|
+
export { type AccountFilter, type AccountFilterParam, type AccountInfo, type AccountMeta, AccountMetaTable, type AllAccountsEntry, BASE_DERIVATION_PATH, BUFFER_BALANCE_FACTOR, BaseRpcClient, BincodeReader, type BincodeSchema, BincodeWriter, type BlockInfo, type Bump, CHACHA20_POLY1305_TAG_LENGTH, type ChainDefinition, type ClusterNodeInfo, type CompiledInstruction, type ConfigHashPrefix, type ConfirmTransactionOptions, type ConfirmedTransaction, type ConnectedNode, CryptoError, CryptoErrorCode, DEFAULT_CHUNK_SIZE, DEFAULT_CONFIRMATION_BATCH_SIZE, DEFAULT_MAX_RETRIES, DEFAULT_NUM_ACCOUNTS, DEFAULT_RETRY_BASE_DELAY_MS, DEFAULT_RETRY_MAX_DELAY_MS, type DeploymentConfig, DeploymentError, DeploymentErrorCode, ED25519_PUBLIC_KEY_LENGTH, type EnumVariant, type EpochConsensusConfigRequest, type EpochInfo, type EventData, type FeeResponse, type GetAccountsByOwnerConfig, type GetAllAccountsConfig, type GetBlockConfig, type GetSignaturesForAddressConfig, type GetTransactionsConfig, type GetValidatorAccountsRequest, type GetWorkflowLineageRequest, type GetWorkflowLineageResponse, HPKE_ENC_LENGTH, HPKE_OVERHEAD_LENGTH, HpkeError, HpkeErrorCode, HttpTransport, type HttpTransportConfig, type IdentifierString, type InferSchema, type Instruction, type IsBlockhashValidResponse, KELVIN_PER_RLO, type Kelvin, Keypair, KeypairSigner, LOADER_V4_PROGRAM_ID, Message, type MessageHeader, Mnemonic, type MnemonicStrength, type OptionalAccountInfo, type OwnerAccount, type PDA, PROGRAM_DATA_OFFSET, PUBLIC_KEY_LENGTH, type PaginationInfo, ProgramDeployment, type ProgramDeploymentOptions, PublicKey, QueryRpcClient, RIALO_DEVNET_CHAIN, RIALO_LOCALNET_CHAIN, RIALO_MAINNET_CHAIN, RIALO_TESTNET_CHAIN, RISCV_LOADER_PROGRAM_ID, type RexDuty, type RexInfoAndDuties, RexValue, RexValueVariant, RialoClient, type RialoClientConfig, RialoError, RialoErrorType, type RialoNetwork, RiscVLoaderInstruction, RpcError, RpcErrorCode, type RpcErrorDetails$1 as RpcErrorDetails, SECRET_KEY_LENGTH, SECRET_SHARING_HPKE_INFO, SIGNATURE_LENGTH, SYSTEM_PROGRAM_ID, Schema, type SecretSharingPubkey, type Seed, type SendAndConfirmOptions, type SendTransactionOptions, Signature$1 as Signature, type SignatureInfo, type SignatureStatus, type Signer, type StakeAccountInfo, type StakeState, type StructField, type SubmitEpochChangeRequest, type SubmitEpochChangeResponse, type Subscription, type SubscriptionAccountMeta, type SubscriptionInstruction, type SubscriptionKind, SystemInstruction, type TimestampRange, type TokenBalance, Transaction, TransactionBuilder, type TransactionData, TransactionError, TransactionErrorCode, type TransactionInfo, type TransactionMessage, type TransactionNodeData, type TransactionResponse, TransactionRpcClient, type TransactionStatusMetadata, type TransactionWithMeta, type TriggerInfo, type TriggeredTransaction, type TruncationReason, URL_DEVNET, URL_LOCALNET, URL_MAINNET, URL_TESTNET, USER_SECRET_AAD, type ValidatorAccountInfo, type ValidatorHealth, type ValidatorInfoRequest, type WorkflowLineage, type WorkflowNode, X25519_PUBLIC_KEY_LENGTH, allocateInstruction, assignInstruction, calculateBackoff, concatBytes, createAccount, createBorshInstruction, createRialoClient, deployInstruction, deserialize, deserializeBorsh, deserializeCompactU16, deserializeStrict, encodeBorshData, encryptForRex, fromBase64, getCiphertextLength, getDefaultRialoClientConfig, getDevnetUrl, getLocalnetUrl, getMainnetUrl, getTestnetUrl, hpkeEncrypt, isOnCurve, isValidCiphertextLength, retractInstruction, seedToBytes, serialize, serializeBorsh, serializeCompactU16, setProgramLengthInstruction, sleep, toBase64, transferInstruction, writeCompactU16, writeInstruction };
|