@zcomb/programs-sdk 1.6.0 → 1.8.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 +132 -5
- package/dist/futarchy/client.js +80 -21
- package/dist/futarchy/instructions.d.ts +109 -1
- package/dist/futarchy/instructions.js +17 -3
- package/dist/generated/idls/futarchy.json +112 -0
- package/dist/generated/types/futarchy.d.ts +112 -0
- package/dist/generated/types/futarchy.js +1 -1
- package/package.json +1 -2
- package/src/amm/client.ts +0 -485
- package/src/amm/constants.ts +0 -31
- package/src/amm/index.ts +0 -5
- package/src/amm/instructions.ts +0 -139
- package/src/amm/types.ts +0 -62
- package/src/amm/utils.ts +0 -263
- package/src/futarchy/client.ts +0 -1032
- package/src/futarchy/constants.ts +0 -28
- package/src/futarchy/index.ts +0 -5
- package/src/futarchy/instructions.ts +0 -235
- package/src/futarchy/types.ts +0 -54
- package/src/futarchy/utils.ts +0 -108
- package/src/generated/idls/amm.json +0 -1252
- package/src/generated/idls/futarchy.json +0 -1763
- package/src/generated/idls/index.ts +0 -4
- package/src/generated/idls/svault.json +0 -2228
- package/src/generated/idls/vault.json +0 -1501
- package/src/generated/types/amm.ts +0 -1258
- package/src/generated/types/futarchy.ts +0 -1769
- package/src/generated/types/index.ts +0 -4
- package/src/generated/types/svault.ts +0 -2234
- package/src/generated/types/vault.ts +0 -1507
- package/src/index.ts +0 -163
- package/src/svault/client.ts +0 -401
- package/src/svault/constants.ts +0 -23
- package/src/svault/index.ts +0 -5
- package/src/svault/instructions.ts +0 -258
- package/src/svault/types.ts +0 -45
- package/src/svault/utils.ts +0 -145
- package/src/utils.ts +0 -41
- package/src/vault/client.ts +0 -333
- package/src/vault/constants.ts +0 -23
- package/src/vault/index.ts +0 -5
- package/src/vault/instructions.ts +0 -170
- package/src/vault/types.ts +0 -54
- package/src/vault/utils.ts +0 -70
|
@@ -82,7 +82,7 @@ export declare class FutarchyClient {
|
|
|
82
82
|
moderatorPda: PublicKey;
|
|
83
83
|
name: string;
|
|
84
84
|
}>;
|
|
85
|
-
addHistoricalProposal(admin: PublicKey, moderatorPda: PublicKey, numOptions: number, winningIdx: number, length: number, createdAt: BN | number, options?: TxOptions): Promise<{
|
|
85
|
+
addHistoricalProposal(admin: PublicKey, moderatorPda: PublicKey, numOptions: number, winningIdx: number, length: number, createdAt: BN | number, metadata: string, options?: TxOptions): Promise<{
|
|
86
86
|
builder: import("@coral-xyz/anchor/dist/cjs/program/namespace/methods").MethodsBuilder<Futarchy, {
|
|
87
87
|
name: "addHistoricalProposal";
|
|
88
88
|
discriminator: [125, 119, 66, 65, 159, 52, 65, 160];
|
|
@@ -135,6 +135,9 @@ export declare class FutarchyClient {
|
|
|
135
135
|
}, {
|
|
136
136
|
"name": "createdAt";
|
|
137
137
|
"type": "i64";
|
|
138
|
+
}, {
|
|
139
|
+
"name": "metadata";
|
|
140
|
+
"type": "string";
|
|
138
141
|
}];
|
|
139
142
|
returns: "u16";
|
|
140
143
|
} & {
|
|
@@ -689,22 +692,37 @@ export declare class FutarchyClient {
|
|
|
689
692
|
* @param creator - The user redeeming
|
|
690
693
|
* @param proposalPda - The proposal PDA
|
|
691
694
|
* @param altAddress - Optional ALT address (will be created if not provided for 3+ options)
|
|
692
|
-
* @returns Unsigned versioned transaction, ALT address,
|
|
695
|
+
* @returns Unsigned versioned transaction, ALT address, number of options, and blockhash info for confirmation
|
|
693
696
|
*/
|
|
694
697
|
redeemLiquidityVersioned(creator: PublicKey, proposalPda: PublicKey, altAddress?: PublicKey): Promise<{
|
|
695
698
|
versionedTx: VersionedTransaction;
|
|
696
699
|
altAddress: PublicKey;
|
|
697
700
|
numOptions: number;
|
|
701
|
+
blockhash: string;
|
|
702
|
+
lastValidBlockHeight: number;
|
|
698
703
|
}>;
|
|
699
704
|
/**
|
|
700
|
-
* Helper to send a signed versioned transaction.
|
|
705
|
+
* Helper to send a signed versioned transaction with robust confirmation handling.
|
|
706
|
+
* Uses blockhash-based confirmation to properly detect transaction expiration
|
|
707
|
+
* instead of relying on a fixed timeout.
|
|
708
|
+
*
|
|
709
|
+
* @param signedTx - The signed versioned transaction to send
|
|
710
|
+
* @param confirmationInfo - Optional blockhash info from when the transaction was built.
|
|
711
|
+
* If not provided, a fresh blockhash will be fetched (less accurate).
|
|
701
712
|
*/
|
|
702
|
-
sendVersionedTransaction(signedTx: VersionedTransaction
|
|
713
|
+
sendVersionedTransaction(signedTx: VersionedTransaction, confirmationInfo?: {
|
|
714
|
+
blockhash: string;
|
|
715
|
+
lastValidBlockHeight: number;
|
|
716
|
+
}): Promise<string>;
|
|
703
717
|
createProposalALT(creator: PublicKey, moderatorPda: PublicKey, numOptions?: number): Promise<{
|
|
704
718
|
altAddress: PublicKey;
|
|
705
719
|
}>;
|
|
706
720
|
fetchALT(altAddress: PublicKey): Promise<AddressLookupTableAccount>;
|
|
707
|
-
buildVersionedTx(payer: PublicKey, instructions: TransactionInstruction[], altAddress: PublicKey): Promise<
|
|
721
|
+
buildVersionedTx(payer: PublicKey, instructions: TransactionInstruction[], altAddress: PublicKey): Promise<{
|
|
722
|
+
versionedTx: VersionedTransaction;
|
|
723
|
+
blockhash: string;
|
|
724
|
+
lastValidBlockHeight: number;
|
|
725
|
+
}>;
|
|
708
726
|
buildVersionedTxWithALT(payer: PublicKey, instructions: TransactionInstruction[], alt: AddressLookupTableAccount, blockhash: string): VersionedTransaction;
|
|
709
727
|
deriveMintCreateKeyPDA(daoPda: PublicKey, name: string): [PublicKey, number];
|
|
710
728
|
private fetchSquadsProgramConfig;
|
|
@@ -1139,4 +1157,113 @@ export declare class FutarchyClient {
|
|
|
1139
1157
|
daoPda: PublicKey;
|
|
1140
1158
|
moderatorPda: PublicKey;
|
|
1141
1159
|
}>;
|
|
1160
|
+
addHistoricalParentDAO(admin: PublicKey, name: string, baseMint: PublicKey, quoteMint: PublicKey, treasuryMultisig: PublicKey, mintAuthMultisig: PublicKey, cosigner: PublicKey, pool: PublicKey, poolType: PoolType, proposalIdCounter: number, options?: TxOptions): Promise<{
|
|
1161
|
+
builder: import("@coral-xyz/anchor/dist/cjs/program/namespace/methods").MethodsBuilder<Futarchy, {
|
|
1162
|
+
name: "addHistoricalParentDao";
|
|
1163
|
+
discriminator: [144, 217, 245, 231, 194, 127, 156, 56];
|
|
1164
|
+
accounts: [{
|
|
1165
|
+
"name": "admin";
|
|
1166
|
+
"writable": true;
|
|
1167
|
+
"signer": true;
|
|
1168
|
+
}, {
|
|
1169
|
+
"name": "dao";
|
|
1170
|
+
"writable": true;
|
|
1171
|
+
"pda": {
|
|
1172
|
+
"seeds": [{
|
|
1173
|
+
"kind": "const";
|
|
1174
|
+
"value": [100, 97, 111];
|
|
1175
|
+
}, {
|
|
1176
|
+
"kind": "arg";
|
|
1177
|
+
"path": "name";
|
|
1178
|
+
}];
|
|
1179
|
+
};
|
|
1180
|
+
}, {
|
|
1181
|
+
"name": "moderator";
|
|
1182
|
+
"writable": true;
|
|
1183
|
+
"pda": {
|
|
1184
|
+
"seeds": [{
|
|
1185
|
+
"kind": "const";
|
|
1186
|
+
"value": [109, 111, 100, 101, 114, 97, 116, 111, 114];
|
|
1187
|
+
}, {
|
|
1188
|
+
"kind": "arg";
|
|
1189
|
+
"path": "name";
|
|
1190
|
+
}];
|
|
1191
|
+
};
|
|
1192
|
+
}, {
|
|
1193
|
+
"name": "treasuryMultisig";
|
|
1194
|
+
}, {
|
|
1195
|
+
"name": "mintAuthMultisig";
|
|
1196
|
+
}, {
|
|
1197
|
+
"name": "baseMint";
|
|
1198
|
+
}, {
|
|
1199
|
+
"name": "quoteMint";
|
|
1200
|
+
}, {
|
|
1201
|
+
"name": "systemProgram";
|
|
1202
|
+
"address": "11111111111111111111111111111111";
|
|
1203
|
+
}];
|
|
1204
|
+
args: [{
|
|
1205
|
+
"name": "name";
|
|
1206
|
+
"type": "string";
|
|
1207
|
+
}, {
|
|
1208
|
+
"name": "cosigner";
|
|
1209
|
+
"type": "pubkey";
|
|
1210
|
+
}, {
|
|
1211
|
+
"name": "pool";
|
|
1212
|
+
"type": "pubkey";
|
|
1213
|
+
}, {
|
|
1214
|
+
"name": "poolType";
|
|
1215
|
+
"type": {
|
|
1216
|
+
"defined": {
|
|
1217
|
+
"name": "poolType";
|
|
1218
|
+
};
|
|
1219
|
+
};
|
|
1220
|
+
}, {
|
|
1221
|
+
"name": "proposalIdCounter";
|
|
1222
|
+
"type": "u16";
|
|
1223
|
+
}];
|
|
1224
|
+
} & {
|
|
1225
|
+
name: "addHistoricalParentDao";
|
|
1226
|
+
}, {
|
|
1227
|
+
name: "admin";
|
|
1228
|
+
writable: true;
|
|
1229
|
+
signer: true;
|
|
1230
|
+
} | {
|
|
1231
|
+
name: "dao";
|
|
1232
|
+
writable: true;
|
|
1233
|
+
pda: {
|
|
1234
|
+
"seeds": [{
|
|
1235
|
+
"kind": "const";
|
|
1236
|
+
"value": [100, 97, 111];
|
|
1237
|
+
}, {
|
|
1238
|
+
"kind": "arg";
|
|
1239
|
+
"path": "name";
|
|
1240
|
+
}];
|
|
1241
|
+
};
|
|
1242
|
+
} | {
|
|
1243
|
+
name: "moderator";
|
|
1244
|
+
writable: true;
|
|
1245
|
+
pda: {
|
|
1246
|
+
"seeds": [{
|
|
1247
|
+
"kind": "const";
|
|
1248
|
+
"value": [109, 111, 100, 101, 114, 97, 116, 111, 114];
|
|
1249
|
+
}, {
|
|
1250
|
+
"kind": "arg";
|
|
1251
|
+
"path": "name";
|
|
1252
|
+
}];
|
|
1253
|
+
};
|
|
1254
|
+
} | {
|
|
1255
|
+
name: "treasuryMultisig";
|
|
1256
|
+
} | {
|
|
1257
|
+
name: "mintAuthMultisig";
|
|
1258
|
+
} | {
|
|
1259
|
+
name: "baseMint";
|
|
1260
|
+
} | {
|
|
1261
|
+
name: "quoteMint";
|
|
1262
|
+
} | {
|
|
1263
|
+
name: "systemProgram";
|
|
1264
|
+
address: "11111111111111111111111111111111";
|
|
1265
|
+
}>;
|
|
1266
|
+
daoPda: PublicKey;
|
|
1267
|
+
moderatorPda: PublicKey;
|
|
1268
|
+
}>;
|
|
1142
1269
|
}
|