@zcomb/programs-sdk 1.5.1 → 1.7.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/futarchy/client.d.ts +19 -4
- package/dist/futarchy/client.js +68 -19
- package/dist/generated/idls/index.d.ts +1 -0
- package/dist/generated/idls/index.js +4 -2
- package/dist/generated/idls/svault.json +2228 -0
- package/dist/generated/types/index.d.ts +1 -0
- package/dist/generated/types/index.js +1 -1
- package/dist/generated/types/svault.d.ts +2234 -0
- package/dist/generated/types/svault.js +3 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +28 -3
- package/dist/svault/client.d.ts +1231 -0
- package/dist/svault/client.js +190 -0
- package/dist/svault/constants.d.ts +7 -0
- package/dist/svault/constants.js +20 -0
- package/dist/svault/index.d.ts +5 -0
- package/dist/svault/index.js +22 -0
- package/dist/svault/instructions.d.ts +1204 -0
- package/dist/svault/instructions.js +172 -0
- package/dist/svault/types.d.ts +46 -0
- package/dist/svault/types.js +7 -0
- package/dist/svault/utils.d.ts +32 -0
- package/dist/svault/utils.js +86 -0
- package/package.json +1 -1
- package/src/futarchy/client.ts +87 -19
- package/src/generated/idls/index.ts +1 -0
- package/src/generated/idls/svault.json +2228 -0
- package/src/generated/types/index.ts +1 -0
- package/src/generated/types/svault.ts +2234 -0
- package/src/index.ts +43 -1
- package/src/svault/client.ts +401 -0
- package/src/svault/constants.ts +23 -0
- package/src/svault/index.ts +5 -0
- package/src/svault/instructions.ts +258 -0
- package/src/svault/types.ts +45 -0
- package/src/svault/utils.ts +145 -0
|
@@ -689,22 +689,37 @@ export declare class FutarchyClient {
|
|
|
689
689
|
* @param creator - The user redeeming
|
|
690
690
|
* @param proposalPda - The proposal PDA
|
|
691
691
|
* @param altAddress - Optional ALT address (will be created if not provided for 3+ options)
|
|
692
|
-
* @returns Unsigned versioned transaction, ALT address,
|
|
692
|
+
* @returns Unsigned versioned transaction, ALT address, number of options, and blockhash info for confirmation
|
|
693
693
|
*/
|
|
694
694
|
redeemLiquidityVersioned(creator: PublicKey, proposalPda: PublicKey, altAddress?: PublicKey): Promise<{
|
|
695
695
|
versionedTx: VersionedTransaction;
|
|
696
696
|
altAddress: PublicKey;
|
|
697
697
|
numOptions: number;
|
|
698
|
+
blockhash: string;
|
|
699
|
+
lastValidBlockHeight: number;
|
|
698
700
|
}>;
|
|
699
701
|
/**
|
|
700
|
-
* Helper to send a signed versioned transaction.
|
|
702
|
+
* Helper to send a signed versioned transaction with robust confirmation handling.
|
|
703
|
+
* Uses blockhash-based confirmation to properly detect transaction expiration
|
|
704
|
+
* instead of relying on a fixed timeout.
|
|
705
|
+
*
|
|
706
|
+
* @param signedTx - The signed versioned transaction to send
|
|
707
|
+
* @param confirmationInfo - Optional blockhash info from when the transaction was built.
|
|
708
|
+
* If not provided, a fresh blockhash will be fetched (less accurate).
|
|
701
709
|
*/
|
|
702
|
-
sendVersionedTransaction(signedTx: VersionedTransaction
|
|
710
|
+
sendVersionedTransaction(signedTx: VersionedTransaction, confirmationInfo?: {
|
|
711
|
+
blockhash: string;
|
|
712
|
+
lastValidBlockHeight: number;
|
|
713
|
+
}): Promise<string>;
|
|
703
714
|
createProposalALT(creator: PublicKey, moderatorPda: PublicKey, numOptions?: number): Promise<{
|
|
704
715
|
altAddress: PublicKey;
|
|
705
716
|
}>;
|
|
706
717
|
fetchALT(altAddress: PublicKey): Promise<AddressLookupTableAccount>;
|
|
707
|
-
buildVersionedTx(payer: PublicKey, instructions: TransactionInstruction[], altAddress: PublicKey): Promise<
|
|
718
|
+
buildVersionedTx(payer: PublicKey, instructions: TransactionInstruction[], altAddress: PublicKey): Promise<{
|
|
719
|
+
versionedTx: VersionedTransaction;
|
|
720
|
+
blockhash: string;
|
|
721
|
+
lastValidBlockHeight: number;
|
|
722
|
+
}>;
|
|
708
723
|
buildVersionedTxWithALT(payer: PublicKey, instructions: TransactionInstruction[], alt: AddressLookupTableAccount, blockhash: string): VersionedTransaction;
|
|
709
724
|
deriveMintCreateKeyPDA(daoPda: PublicKey, name: string): [PublicKey, number];
|
|
710
725
|
private fetchSquadsProgramConfig;
|