()
| 334 | ClientWithTransactionSending; |
| 335 | |
| 336 | export function systemProgram() { |
| 337 | return <T extends SystemPluginRequirements>(client: T): Omit<T, 'system'> & { system: SystemPlugin } => { |
| 338 | return extendClient(client, { |
| 339 | system: <SystemPlugin>{ |
| 340 | accounts: { nonce: addSelfFetchFunctions(client, getNonceCodec()) }, |
| 341 | instructions: { |
| 342 | createAccount: input => |
| 343 | addSelfPlanAndSendFunctions( |
| 344 | client, |
| 345 | getCreateAccountInstruction({ ...input, payer: input.payer ?? client.payer }), |
| 346 | ), |
| 347 | assign: input => addSelfPlanAndSendFunctions(client, getAssignInstruction(input)), |
| 348 | transferSol: input => addSelfPlanAndSendFunctions(client, getTransferSolInstruction(input)), |
| 349 | createAccountWithSeed: input => |
| 350 | addSelfPlanAndSendFunctions( |
| 351 | client, |
| 352 | getCreateAccountWithSeedInstruction({ ...input, payer: input.payer ?? client.payer }), |
| 353 | ), |
| 354 | advanceNonceAccount: input => |
| 355 | addSelfPlanAndSendFunctions(client, getAdvanceNonceAccountInstruction(input)), |
| 356 | withdrawNonceAccount: input => |
| 357 | addSelfPlanAndSendFunctions(client, getWithdrawNonceAccountInstruction(input)), |
| 358 | initializeNonceAccount: input => |
| 359 | addSelfPlanAndSendFunctions(client, getInitializeNonceAccountInstruction(input)), |
| 360 | authorizeNonceAccount: input => |
| 361 | addSelfPlanAndSendFunctions(client, getAuthorizeNonceAccountInstruction(input)), |
| 362 | allocate: input => addSelfPlanAndSendFunctions(client, getAllocateInstruction(input)), |
| 363 | allocateWithSeed: input => |
| 364 | addSelfPlanAndSendFunctions(client, getAllocateWithSeedInstruction(input)), |
| 365 | assignWithSeed: input => addSelfPlanAndSendFunctions(client, getAssignWithSeedInstruction(input)), |
| 366 | transferSolWithSeed: input => |
| 367 | addSelfPlanAndSendFunctions(client, getTransferSolWithSeedInstruction(input)), |
| 368 | upgradeNonceAccount: input => |
| 369 | addSelfPlanAndSendFunctions(client, getUpgradeNonceAccountInstruction(input)), |
| 370 | createAccountAllowPrefund: input => |
| 371 | addSelfPlanAndSendFunctions(client, getCreateAccountAllowPrefundInstruction(input)), |
| 372 | }, |
| 373 | }, |
| 374 | }); |
| 375 | }; |
| 376 | } |
| 377 | |
| 378 | type MakeOptional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>; |
no test coverage detected