@loyal-labs/loyal-smart-accounts-core 0.1.1
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.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/internal.d.ts +1 -0
- package/dist/internal.js +1 -0
- package/dist/loyal.d.ts +1 -0
- package/dist/loyal.js +1 -0
- package/dist/src/accounts.d.ts +1 -0
- package/dist/src/accounts.js +1 -0
- package/dist/src/codecs.d.ts +6 -0
- package/dist/src/codecs.js +6 -0
- package/dist/src/core/codecs/index.d.ts +6 -0
- package/dist/src/core/codecs/index.js +6 -0
- package/dist/src/core/codecs/primitives.d.ts +7 -0
- package/dist/src/core/codecs/primitives.js +28 -0
- package/dist/src/core/errors/index.d.ts +29 -0
- package/dist/src/core/errors/index.js +124 -0
- package/dist/src/core/generated/index.d.ts +1 -0
- package/dist/src/core/generated/index.js +1 -0
- package/dist/src/core/pda/index.d.ts +44 -0
- package/dist/src/core/pda/index.js +80 -0
- package/dist/src/core/spec/features.d.ts +1 -0
- package/dist/src/core/spec/features.js +1 -0
- package/dist/src/core/spec/idl.d.ts +1 -0
- package/dist/src/core/spec/idl.js +1 -0
- package/dist/src/core/spec/index.d.ts +4 -0
- package/dist/src/core/spec/index.js +4 -0
- package/dist/src/core/spec/pda-registry.d.ts +1 -0
- package/dist/src/core/spec/pda-registry.js +1 -0
- package/dist/src/core/transport/index.d.ts +54 -0
- package/dist/src/core/transport/index.js +96 -0
- package/dist/src/errors.d.ts +1 -0
- package/dist/src/errors.js +1 -0
- package/dist/src/generated/accounts/Batch.d.ts +130 -0
- package/dist/src/generated/accounts/Batch.js +158 -0
- package/dist/src/generated/accounts/BatchTransaction.d.ts +105 -0
- package/dist/src/generated/accounts/BatchTransaction.js +130 -0
- package/dist/src/generated/accounts/LegacyTransaction.d.ts +122 -0
- package/dist/src/generated/accounts/LegacyTransaction.js +163 -0
- package/dist/src/generated/accounts/Policy.d.ts +139 -0
- package/dist/src/generated/accounts/Policy.js +208 -0
- package/dist/src/generated/accounts/ProgramConfig.d.ts +116 -0
- package/dist/src/generated/accounts/ProgramConfig.js +153 -0
- package/dist/src/generated/accounts/Proposal.d.ts +119 -0
- package/dist/src/generated/accounts/Proposal.js +157 -0
- package/dist/src/generated/accounts/Settings.d.ts +140 -0
- package/dist/src/generated/accounts/Settings.js +210 -0
- package/dist/src/generated/accounts/SettingsTransaction.d.ts +113 -0
- package/dist/src/generated/accounts/SettingsTransaction.js +151 -0
- package/dist/src/generated/accounts/SpendingLimit.d.ts +137 -0
- package/dist/src/generated/accounts/SpendingLimit.js +206 -0
- package/dist/src/generated/accounts/Transaction.d.ts +110 -0
- package/dist/src/generated/accounts/Transaction.js +145 -0
- package/dist/src/generated/accounts/TransactionBuffer.d.ts +113 -0
- package/dist/src/generated/accounts/TransactionBuffer.js +143 -0
- package/dist/src/generated/accounts/index.d.ts +35 -0
- package/dist/src/generated/accounts/index.js +35 -0
- package/dist/src/generated/errors/index.d.ts +1420 -0
- package/dist/src/generated/errors/index.js +2312 -0
- package/dist/src/generated/index.d.ts +19 -0
- package/dist/src/generated/index.js +19 -0
- package/dist/src/generated/instructions/activateProposal.d.ts +42 -0
- package/dist/src/generated/instructions/activateProposal.js +58 -0
- package/dist/src/generated/instructions/addSignerAsAuthority.d.ts +59 -0
- package/dist/src/generated/instructions/addSignerAsAuthority.js +78 -0
- package/dist/src/generated/instructions/addSpendingLimitAsAuthority.d.ts +58 -0
- package/dist/src/generated/instructions/addSpendingLimitAsAuthority.js +80 -0
- package/dist/src/generated/instructions/addTransactionToBatch.d.ts +60 -0
- package/dist/src/generated/instructions/addTransactionToBatch.js +85 -0
- package/dist/src/generated/instructions/approveProposal.d.ts +59 -0
- package/dist/src/generated/instructions/approveProposal.js +78 -0
- package/dist/src/generated/instructions/cancelProposal.d.ts +59 -0
- package/dist/src/generated/instructions/cancelProposal.js +78 -0
- package/dist/src/generated/instructions/changeThresholdAsAuthority.d.ts +59 -0
- package/dist/src/generated/instructions/changeThresholdAsAuthority.js +78 -0
- package/dist/src/generated/instructions/closeBatch.d.ts +49 -0
- package/dist/src/generated/instructions/closeBatch.js +78 -0
- package/dist/src/generated/instructions/closeBatchTransaction.d.ts +47 -0
- package/dist/src/generated/instructions/closeBatchTransaction.js +73 -0
- package/dist/src/generated/instructions/closeEmptyPolicyTransaction.d.ts +51 -0
- package/dist/src/generated/instructions/closeEmptyPolicyTransaction.js +83 -0
- package/dist/src/generated/instructions/closeSettingsTransaction.d.ts +49 -0
- package/dist/src/generated/instructions/closeSettingsTransaction.js +78 -0
- package/dist/src/generated/instructions/closeTransaction.d.ts +49 -0
- package/dist/src/generated/instructions/closeTransaction.js +78 -0
- package/dist/src/generated/instructions/closeTransactionBuffer.d.ts +42 -0
- package/dist/src/generated/instructions/closeTransactionBuffer.js +58 -0
- package/dist/src/generated/instructions/createBatch.d.ts +56 -0
- package/dist/src/generated/instructions/createBatch.js +75 -0
- package/dist/src/generated/instructions/createProposal.d.ts +58 -0
- package/dist/src/generated/instructions/createProposal.js +80 -0
- package/dist/src/generated/instructions/createSettingsTransaction.d.ts +58 -0
- package/dist/src/generated/instructions/createSettingsTransaction.js +80 -0
- package/dist/src/generated/instructions/createSmartAccount.d.ts +56 -0
- package/dist/src/generated/instructions/createSmartAccount.js +75 -0
- package/dist/src/generated/instructions/createTransaction.d.ts +58 -0
- package/dist/src/generated/instructions/createTransaction.js +80 -0
- package/dist/src/generated/instructions/createTransactionBuffer.d.ts +56 -0
- package/dist/src/generated/instructions/createTransactionBuffer.js +75 -0
- package/dist/src/generated/instructions/createTransactionFromBuffer.d.ts +63 -0
- package/dist/src/generated/instructions/createTransactionFromBuffer.js +90 -0
- package/dist/src/generated/instructions/executeBatchTransaction.d.ts +46 -0
- package/dist/src/generated/instructions/executeBatchTransaction.js +68 -0
- package/dist/src/generated/instructions/executeSettingsTransaction.d.ts +52 -0
- package/dist/src/generated/instructions/executeSettingsTransaction.js +81 -0
- package/dist/src/generated/instructions/executeSettingsTransactionSync.d.ts +57 -0
- package/dist/src/generated/instructions/executeSettingsTransactionSync.js +73 -0
- package/dist/src/generated/instructions/executeTransaction.d.ts +46 -0
- package/dist/src/generated/instructions/executeTransaction.js +68 -0
- package/dist/src/generated/instructions/executeTransactionSync.d.ts +51 -0
- package/dist/src/generated/instructions/executeTransactionSync.js +60 -0
- package/dist/src/generated/instructions/executeTransactionSyncV2.d.ts +51 -0
- package/dist/src/generated/instructions/executeTransactionSyncV2.js +60 -0
- package/dist/src/generated/instructions/extendTransactionBuffer.d.ts +53 -0
- package/dist/src/generated/instructions/extendTransactionBuffer.js +65 -0
- package/dist/src/generated/instructions/index.d.ts +39 -0
- package/dist/src/generated/instructions/index.js +39 -0
- package/dist/src/generated/instructions/initializeProgramConfig.d.ts +52 -0
- package/dist/src/generated/instructions/initializeProgramConfig.js +65 -0
- package/dist/src/generated/instructions/logEvent.d.ts +49 -0
- package/dist/src/generated/instructions/logEvent.js +55 -0
- package/dist/src/generated/instructions/rejectProposal.d.ts +59 -0
- package/dist/src/generated/instructions/rejectProposal.js +78 -0
- package/dist/src/generated/instructions/removeSignerAsAuthority.d.ts +59 -0
- package/dist/src/generated/instructions/removeSignerAsAuthority.js +78 -0
- package/dist/src/generated/instructions/removeSpendingLimitAsAuthority.d.ts +57 -0
- package/dist/src/generated/instructions/removeSpendingLimitAsAuthority.js +75 -0
- package/dist/src/generated/instructions/setArchivalAuthorityAsAuthority.d.ts +59 -0
- package/dist/src/generated/instructions/setArchivalAuthorityAsAuthority.js +78 -0
- package/dist/src/generated/instructions/setNewSettingsAuthorityAsAuthority.d.ts +59 -0
- package/dist/src/generated/instructions/setNewSettingsAuthorityAsAuthority.js +78 -0
- package/dist/src/generated/instructions/setProgramConfigAuthority.d.ts +51 -0
- package/dist/src/generated/instructions/setProgramConfigAuthority.js +60 -0
- package/dist/src/generated/instructions/setProgramConfigSmartAccountCreationFee.d.ts +51 -0
- package/dist/src/generated/instructions/setProgramConfigSmartAccountCreationFee.js +60 -0
- package/dist/src/generated/instructions/setProgramConfigTreasury.d.ts +51 -0
- package/dist/src/generated/instructions/setProgramConfigTreasury.js +60 -0
- package/dist/src/generated/instructions/setTimeLockAsAuthority.d.ts +59 -0
- package/dist/src/generated/instructions/setTimeLockAsAuthority.js +78 -0
- package/dist/src/generated/instructions/useSpendingLimit.d.ts +70 -0
- package/dist/src/generated/instructions/useSpendingLimit.js +108 -0
- package/dist/src/generated/types/AccountConstraint.d.ts +19 -0
- package/dist/src/generated/types/AccountConstraint.js +18 -0
- package/dist/src/generated/types/AccountConstraintType.d.ts +49 -0
- package/dist/src/generated/types/AccountConstraintType.js +25 -0
- package/dist/src/generated/types/AddSignerArgs.d.ts +17 -0
- package/dist/src/generated/types/AddSignerArgs.js +16 -0
- package/dist/src/generated/types/AddSpendingLimitArgs.d.ts +25 -0
- package/dist/src/generated/types/AddSpendingLimitArgs.js +24 -0
- package/dist/src/generated/types/AddTransactionToBatchArgs.d.ts +16 -0
- package/dist/src/generated/types/AddTransactionToBatchArgs.js +15 -0
- package/dist/src/generated/types/AllowedSettingsChange.d.ts +60 -0
- package/dist/src/generated/types/AllowedSettingsChange.js +35 -0
- package/dist/src/generated/types/ChangeThresholdArgs.d.ts +16 -0
- package/dist/src/generated/types/ChangeThresholdArgs.js +15 -0
- package/dist/src/generated/types/ConsensusAccountType.d.ts +20 -0
- package/dist/src/generated/types/ConsensusAccountType.js +21 -0
- package/dist/src/generated/types/CreateBatchArgs.d.ts +16 -0
- package/dist/src/generated/types/CreateBatchArgs.js +15 -0
- package/dist/src/generated/types/CreateProposalArgs.d.ts +16 -0
- package/dist/src/generated/types/CreateProposalArgs.js +15 -0
- package/dist/src/generated/types/CreateSettingsTransactionArgs.d.ts +17 -0
- package/dist/src/generated/types/CreateSettingsTransactionArgs.js +16 -0
- package/dist/src/generated/types/CreateSmartAccountArgs.d.ts +22 -0
- package/dist/src/generated/types/CreateSmartAccountArgs.js +21 -0
- package/dist/src/generated/types/CreateTransactionArgs.d.ts +49 -0
- package/dist/src/generated/types/CreateTransactionArgs.js +25 -0
- package/dist/src/generated/types/CreateTransactionBufferArgs.d.ts +19 -0
- package/dist/src/generated/types/CreateTransactionBufferArgs.js +18 -0
- package/dist/src/generated/types/DataConstraint.d.ts +19 -0
- package/dist/src/generated/types/DataConstraint.js +18 -0
- package/dist/src/generated/types/DataOperator.d.ts +24 -0
- package/dist/src/generated/types/DataOperator.js +25 -0
- package/dist/src/generated/types/DataValue.d.ts +71 -0
- package/dist/src/generated/types/DataValue.js +43 -0
- package/dist/src/generated/types/ExtendTransactionBufferArgs.d.ts +15 -0
- package/dist/src/generated/types/ExtendTransactionBufferArgs.js +12 -0
- package/dist/src/generated/types/Hook.d.ts +21 -0
- package/dist/src/generated/types/Hook.js +20 -0
- package/dist/src/generated/types/InitProgramConfigArgs.d.ts +18 -0
- package/dist/src/generated/types/InitProgramConfigArgs.js +17 -0
- package/dist/src/generated/types/InstructionConstraint.d.ts +20 -0
- package/dist/src/generated/types/InstructionConstraint.js +19 -0
- package/dist/src/generated/types/InternalFundTransferPayload.d.ts +20 -0
- package/dist/src/generated/types/InternalFundTransferPayload.js +19 -0
- package/dist/src/generated/types/InternalFundTransferPolicy.d.ts +18 -0
- package/dist/src/generated/types/InternalFundTransferPolicy.js +17 -0
- package/dist/src/generated/types/InternalFundTransferPolicyCreationPayload.d.ts +18 -0
- package/dist/src/generated/types/InternalFundTransferPolicyCreationPayload.js +17 -0
- package/dist/src/generated/types/LegacySyncTransactionArgs.d.ts +17 -0
- package/dist/src/generated/types/LegacySyncTransactionArgs.js +16 -0
- package/dist/src/generated/types/LimitedQuantityConstraints.d.ts +15 -0
- package/dist/src/generated/types/LimitedQuantityConstraints.js +12 -0
- package/dist/src/generated/types/LimitedSettingsAction.d.ts +61 -0
- package/dist/src/generated/types/LimitedSettingsAction.js +35 -0
- package/dist/src/generated/types/LimitedSpendingLimit.d.ts +20 -0
- package/dist/src/generated/types/LimitedSpendingLimit.js +19 -0
- package/dist/src/generated/types/LimitedTimeConstraints.d.ts +18 -0
- package/dist/src/generated/types/LimitedTimeConstraints.js +17 -0
- package/dist/src/generated/types/LogEventArgs.d.ts +17 -0
- package/dist/src/generated/types/LogEventArgs.js +16 -0
- package/dist/src/generated/types/LogEventArgsV2.d.ts +15 -0
- package/dist/src/generated/types/LogEventArgsV2.js +12 -0
- package/dist/src/generated/types/Payload.d.ts +49 -0
- package/dist/src/generated/types/Payload.js +25 -0
- package/dist/src/generated/types/Period.d.ts +22 -0
- package/dist/src/generated/types/Period.js +23 -0
- package/dist/src/generated/types/PeriodV2.d.ts +57 -0
- package/dist/src/generated/types/PeriodV2.js +26 -0
- package/dist/src/generated/types/Permissions.d.ts +15 -0
- package/dist/src/generated/types/Permissions.js +12 -0
- package/dist/src/generated/types/PolicyActionPayloadDetails.d.ts +16 -0
- package/dist/src/generated/types/PolicyActionPayloadDetails.js +13 -0
- package/dist/src/generated/types/PolicyCreationPayload.d.ts +63 -0
- package/dist/src/generated/types/PolicyCreationPayload.js +42 -0
- package/dist/src/generated/types/PolicyEventType.d.ts +22 -0
- package/dist/src/generated/types/PolicyEventType.js +23 -0
- package/dist/src/generated/types/PolicyExecutionContext.d.ts +20 -0
- package/dist/src/generated/types/PolicyExecutionContext.js +21 -0
- package/dist/src/generated/types/PolicyExpiration.d.ts +47 -0
- package/dist/src/generated/types/PolicyExpiration.js +28 -0
- package/dist/src/generated/types/PolicyExpirationArgs.d.ts +45 -0
- package/dist/src/generated/types/PolicyExpirationArgs.js +20 -0
- package/dist/src/generated/types/PolicyPayload.d.ts +63 -0
- package/dist/src/generated/types/PolicyPayload.js +37 -0
- package/dist/src/generated/types/PolicyState.d.ts +63 -0
- package/dist/src/generated/types/PolicyState.js +37 -0
- package/dist/src/generated/types/ProgramConfigSetAuthorityArgs.d.ts +16 -0
- package/dist/src/generated/types/ProgramConfigSetAuthorityArgs.js +13 -0
- package/dist/src/generated/types/ProgramConfigSetSmartAccountCreationFeeArgs.d.ts +15 -0
- package/dist/src/generated/types/ProgramConfigSetSmartAccountCreationFeeArgs.js +12 -0
- package/dist/src/generated/types/ProgramConfigSetTreasuryArgs.d.ts +16 -0
- package/dist/src/generated/types/ProgramConfigSetTreasuryArgs.js +13 -0
- package/dist/src/generated/types/ProgramInteractionPayload.d.ts +17 -0
- package/dist/src/generated/types/ProgramInteractionPayload.js +16 -0
- package/dist/src/generated/types/ProgramInteractionPolicy.d.ts +22 -0
- package/dist/src/generated/types/ProgramInteractionPolicy.js +21 -0
- package/dist/src/generated/types/ProgramInteractionPolicyCreationPayload.d.ts +22 -0
- package/dist/src/generated/types/ProgramInteractionPolicyCreationPayload.js +21 -0
- package/dist/src/generated/types/ProgramInteractionTransactionPayload.d.ts +49 -0
- package/dist/src/generated/types/ProgramInteractionTransactionPayload.js +25 -0
- package/dist/src/generated/types/ProposalEventType.d.ts +24 -0
- package/dist/src/generated/types/ProposalEventType.js +25 -0
- package/dist/src/generated/types/ProposalStatus.d.ts +75 -0
- package/dist/src/generated/types/ProposalStatus.js +45 -0
- package/dist/src/generated/types/QuantityConstraints.d.ts +17 -0
- package/dist/src/generated/types/QuantityConstraints.js +16 -0
- package/dist/src/generated/types/RemoveSignerArgs.d.ts +17 -0
- package/dist/src/generated/types/RemoveSignerArgs.js +16 -0
- package/dist/src/generated/types/RemoveSpendingLimitArgs.d.ts +15 -0
- package/dist/src/generated/types/RemoveSpendingLimitArgs.js +12 -0
- package/dist/src/generated/types/SetArchivalAuthorityArgs.d.ts +17 -0
- package/dist/src/generated/types/SetArchivalAuthorityArgs.js +16 -0
- package/dist/src/generated/types/SetNewSettingsAuthorityArgs.d.ts +17 -0
- package/dist/src/generated/types/SetNewSettingsAuthorityArgs.js +16 -0
- package/dist/src/generated/types/SetTimeLockArgs.d.ts +16 -0
- package/dist/src/generated/types/SetTimeLockArgs.js +15 -0
- package/dist/src/generated/types/SettingsAction.d.ts +118 -0
- package/dist/src/generated/types/SettingsAction.js +92 -0
- package/dist/src/generated/types/SettingsChangePayload.d.ts +17 -0
- package/dist/src/generated/types/SettingsChangePayload.js +16 -0
- package/dist/src/generated/types/SettingsChangePolicy.d.ts +16 -0
- package/dist/src/generated/types/SettingsChangePolicy.js +13 -0
- package/dist/src/generated/types/SettingsChangePolicyCreationPayload.d.ts +16 -0
- package/dist/src/generated/types/SettingsChangePolicyCreationPayload.js +13 -0
- package/dist/src/generated/types/SmartAccountCompiledInstruction.d.ts +17 -0
- package/dist/src/generated/types/SmartAccountCompiledInstruction.js +16 -0
- package/dist/src/generated/types/SmartAccountMessageAddressTableLookup.d.ts +18 -0
- package/dist/src/generated/types/SmartAccountMessageAddressTableLookup.js +17 -0
- package/dist/src/generated/types/SmartAccountSigner.d.ts +18 -0
- package/dist/src/generated/types/SmartAccountSigner.js +17 -0
- package/dist/src/generated/types/SmartAccountTransactionMessage.d.ts +23 -0
- package/dist/src/generated/types/SmartAccountTransactionMessage.js +25 -0
- package/dist/src/generated/types/SpendingLimitPayload.d.ts +18 -0
- package/dist/src/generated/types/SpendingLimitPayload.js +17 -0
- package/dist/src/generated/types/SpendingLimitPolicy.d.ts +19 -0
- package/dist/src/generated/types/SpendingLimitPolicy.js +18 -0
- package/dist/src/generated/types/SpendingLimitPolicyCreationPayload.d.ts +24 -0
- package/dist/src/generated/types/SpendingLimitPolicyCreationPayload.js +23 -0
- package/dist/src/generated/types/SpendingLimitV2.d.ts +22 -0
- package/dist/src/generated/types/SpendingLimitV2.js +21 -0
- package/dist/src/generated/types/SyncPayload.d.ts +48 -0
- package/dist/src/generated/types/SyncPayload.js +24 -0
- package/dist/src/generated/types/SyncSettingsTransactionArgs.d.ts +18 -0
- package/dist/src/generated/types/SyncSettingsTransactionArgs.js +17 -0
- package/dist/src/generated/types/SyncTransactionArgs.d.ts +18 -0
- package/dist/src/generated/types/SyncTransactionArgs.js +17 -0
- package/dist/src/generated/types/SyncTransactionPayloadDetails.d.ts +16 -0
- package/dist/src/generated/types/SyncTransactionPayloadDetails.js +15 -0
- package/dist/src/generated/types/SynchronousTransactionEventPayload.d.ts +50 -0
- package/dist/src/generated/types/SynchronousTransactionEventPayload.js +28 -0
- package/dist/src/generated/types/TimeConstraints.d.ts +19 -0
- package/dist/src/generated/types/TimeConstraints.js +18 -0
- package/dist/src/generated/types/TransactionEventType.d.ts +21 -0
- package/dist/src/generated/types/TransactionEventType.js +22 -0
- package/dist/src/generated/types/TransactionPayload.d.ts +18 -0
- package/dist/src/generated/types/TransactionPayload.js +17 -0
- package/dist/src/generated/types/TransactionPayloadDetails.d.ts +18 -0
- package/dist/src/generated/types/TransactionPayloadDetails.js +17 -0
- package/dist/src/generated/types/UsageState.d.ts +16 -0
- package/dist/src/generated/types/UsageState.js +15 -0
- package/dist/src/generated/types/UseSpendingLimitArgs.d.ts +17 -0
- package/dist/src/generated/types/UseSpendingLimitArgs.js +16 -0
- package/dist/src/generated/types/Vote.d.ts +21 -0
- package/dist/src/generated/types/Vote.js +22 -0
- package/dist/src/generated/types/VoteOnProposalArgs.d.ts +15 -0
- package/dist/src/generated/types/VoteOnProposalArgs.js +12 -0
- package/dist/src/generated/types/index.d.ts +83 -0
- package/dist/src/generated/types/index.js +83 -0
- package/dist/src/index.d.ts +15 -0
- package/dist/src/index.js +15 -0
- package/dist/src/internal/generated.d.ts +1 -0
- package/dist/src/internal/generated.js +1 -0
- package/dist/src/internal/index.d.ts +2 -0
- package/dist/src/internal/index.js +2 -0
- package/dist/src/internal/instructions/activateProposal.d.ts +7 -0
- package/dist/src/internal/instructions/activateProposal.js +14 -0
- package/dist/src/internal/instructions/addSignerAsAuthority.d.ts +10 -0
- package/dist/src/internal/instructions/addSignerAsAuthority.js +11 -0
- package/dist/src/internal/instructions/addSpendingLimitAsAuthority.d.ts +18 -0
- package/dist/src/internal/instructions/addSpendingLimitAsAuthority.js +27 -0
- package/dist/src/internal/instructions/addTransactionToBatch.d.ts +18 -0
- package/dist/src/internal/instructions/addTransactionToBatch.js +44 -0
- package/dist/src/internal/instructions/approveProposal.d.ts +8 -0
- package/dist/src/internal/instructions/approveProposal.js +10 -0
- package/dist/src/internal/instructions/cancelProposal.d.ts +8 -0
- package/dist/src/internal/instructions/cancelProposal.js +11 -0
- package/dist/src/internal/instructions/changeThresholdAsAuthority.d.ts +9 -0
- package/dist/src/internal/instructions/changeThresholdAsAuthority.js +14 -0
- package/dist/src/internal/instructions/closeBatch.d.ts +15 -0
- package/dist/src/internal/instructions/closeBatch.js +29 -0
- package/dist/src/internal/instructions/closeBatchTransaction.d.ts +15 -0
- package/dist/src/internal/instructions/closeBatchTransaction.js +34 -0
- package/dist/src/internal/instructions/closeEmptyPolicyTransaction.d.ts +8 -0
- package/dist/src/internal/instructions/closeEmptyPolicyTransaction.js +26 -0
- package/dist/src/internal/instructions/closeSettingsTransaction.d.ts +8 -0
- package/dist/src/internal/instructions/closeSettingsTransaction.js +22 -0
- package/dist/src/internal/instructions/closeTransaction.d.ts +8 -0
- package/dist/src/internal/instructions/closeTransaction.js +22 -0
- package/dist/src/internal/instructions/closeTransactionBuffer.d.ts +8 -0
- package/dist/src/internal/instructions/closeTransactionBuffer.js +15 -0
- package/dist/src/internal/instructions/createBatch.d.ts +12 -0
- package/dist/src/internal/instructions/createBatch.js +15 -0
- package/dist/src/internal/instructions/createPolicyTransaction.d.ts +11 -0
- package/dist/src/internal/instructions/createPolicyTransaction.js +21 -0
- package/dist/src/internal/instructions/createProposal.d.ts +11 -0
- package/dist/src/internal/instructions/createProposal.js +19 -0
- package/dist/src/internal/instructions/createSettingsTransaction.d.ts +14 -0
- package/dist/src/internal/instructions/createSettingsTransaction.js +17 -0
- package/dist/src/internal/instructions/createSmartAccount.d.ts +15 -0
- package/dist/src/internal/instructions/createSmartAccount.js +30 -0
- package/dist/src/internal/instructions/createTransaction.d.ts +16 -0
- package/dist/src/internal/instructions/createTransaction.js +39 -0
- package/dist/src/internal/instructions/createTransactionBuffer.d.ts +13 -0
- package/dist/src/internal/instructions/createTransactionBuffer.js +24 -0
- package/dist/src/internal/instructions/createTransactionFromBuffer.d.ts +13 -0
- package/dist/src/internal/instructions/createTransactionFromBuffer.js +39 -0
- package/dist/src/internal/instructions/executeBatchTransaction.d.ts +13 -0
- package/dist/src/internal/instructions/executeBatchTransaction.js +47 -0
- package/dist/src/internal/instructions/executePolicyPayloadSync.d.ts +15 -0
- package/dist/src/internal/instructions/executePolicyPayloadSync.js +18 -0
- package/dist/src/internal/instructions/executePolicyTransaction.d.ts +9 -0
- package/dist/src/internal/instructions/executePolicyTransaction.js +22 -0
- package/dist/src/internal/instructions/executeSettingsTransaction.d.ts +12 -0
- package/dist/src/internal/instructions/executeSettingsTransaction.js +37 -0
- package/dist/src/internal/instructions/executeSettingsTransactionSync.d.ts +11 -0
- package/dist/src/internal/instructions/executeSettingsTransactionSync.js +26 -0
- package/dist/src/internal/instructions/executeTransaction.d.ts +12 -0
- package/dist/src/internal/instructions/executeTransaction.js +49 -0
- package/dist/src/internal/instructions/executeTransactionSync.d.ts +14 -0
- package/dist/src/internal/instructions/executeTransactionSync.js +15 -0
- package/dist/src/internal/instructions/executeTransactionSyncV2.d.ts +14 -0
- package/dist/src/internal/instructions/executeTransactionSyncV2.js +18 -0
- package/dist/src/internal/instructions/extendTransactionBuffer.d.ts +9 -0
- package/dist/src/internal/instructions/extendTransactionBuffer.js +19 -0
- package/dist/src/internal/instructions/index.d.ts +42 -0
- package/dist/src/internal/instructions/index.js +42 -0
- package/dist/src/internal/instructions/initializeProgramConfig.d.ts +9 -0
- package/dist/src/internal/instructions/initializeProgramConfig.js +16 -0
- package/dist/src/internal/instructions/logEvent.d.ts +6 -0
- package/dist/src/internal/instructions/logEvent.js +10 -0
- package/dist/src/internal/instructions/rejectProposal.d.ts +8 -0
- package/dist/src/internal/instructions/rejectProposal.js +15 -0
- package/dist/src/internal/instructions/removeSignerAsAuthority.d.ts +8 -0
- package/dist/src/internal/instructions/removeSignerAsAuthority.js +10 -0
- package/dist/src/internal/instructions/removeSpendingLimitAsAuthority.d.ts +9 -0
- package/dist/src/internal/instructions/removeSpendingLimitAsAuthority.js +14 -0
- package/dist/src/internal/instructions/setArchivalAuthorityAsAuthority.d.ts +8 -0
- package/dist/src/internal/instructions/setArchivalAuthorityAsAuthority.js +15 -0
- package/dist/src/internal/instructions/setNewSettingsAuthorityAsAuthority.d.ts +8 -0
- package/dist/src/internal/instructions/setNewSettingsAuthorityAsAuthority.js +13 -0
- package/dist/src/internal/instructions/setProgramConfigAuthority.d.ts +6 -0
- package/dist/src/internal/instructions/setProgramConfigAuthority.js +13 -0
- package/dist/src/internal/instructions/setProgramConfigSmartAccountCreationFee.d.ts +7 -0
- package/dist/src/internal/instructions/setProgramConfigSmartAccountCreationFee.js +14 -0
- package/dist/src/internal/instructions/setProgramConfigTreasury.d.ts +6 -0
- package/dist/src/internal/instructions/setProgramConfigTreasury.js +13 -0
- package/dist/src/internal/instructions/setTimeLockAsAuthority.d.ts +8 -0
- package/dist/src/internal/instructions/setTimeLockAsAuthority.js +13 -0
- package/dist/src/internal/instructions/useSpendingLimit.d.ts +15 -0
- package/dist/src/internal/instructions/useSpendingLimit.js +24 -0
- package/dist/src/internal/pda.d.ts +1 -0
- package/dist/src/internal/pda.js +1 -0
- package/dist/src/internal/utils.d.ts +1 -0
- package/dist/src/internal/utils.js +1 -0
- package/dist/src/loyal.d.ts +18 -0
- package/dist/src/loyal.js +56 -0
- package/dist/src/pda.d.ts +1 -0
- package/dist/src/pda.js +1 -0
- package/dist/src/spec/features.d.ts +15 -0
- package/dist/src/spec/features.js +69 -0
- package/dist/src/spec/idl.d.ts +3 -0
- package/dist/src/spec/idl.js +75 -0
- package/dist/src/spec/index.d.ts +4 -0
- package/dist/src/spec/index.js +4 -0
- package/dist/src/spec/operation-registry.d.ts +385 -0
- package/dist/src/spec/operation-registry.js +390 -0
- package/dist/src/spec/pda-registry.d.ts +32 -0
- package/dist/src/spec/pda-registry.js +71 -0
- package/dist/src/transport.d.ts +1 -0
- package/dist/src/transport.js +1 -0
- package/dist/src/types.d.ts +69 -0
- package/dist/src/types.js +129 -0
- package/dist/src/utils/compileToSynchronousMessage.d.ts +9 -0
- package/dist/src/utils/compileToSynchronousMessage.js +87 -0
- package/dist/src/utils/compileToSynchronousMessageV2.d.ts +19 -0
- package/dist/src/utils/compileToSynchronousMessageV2.js +154 -0
- package/dist/src/utils/compileToWrappedMessageV0.d.ts +7 -0
- package/dist/src/utils/compileToWrappedMessageV0.js +30 -0
- package/dist/src/utils/compiled-keys.d.ts +31 -0
- package/dist/src/utils/compiled-keys.js +144 -0
- package/dist/src/utils.d.ts +61 -0
- package/dist/src/utils.js +217 -0
- package/package.json +71 -0
- package/upstream/manifest.json +14 -0
- package/upstream/normalized/squads_smart_account_program.json +6020 -0
- package/upstream/raw/squads_smart_account_program.json +6020 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SystemProgram } from "@solana/web3.js";
|
|
2
|
+
import { createCancelProposalInstruction, PROGRAM_ID } from "../generated";
|
|
3
|
+
import { getProposalPda } from "../pda";
|
|
4
|
+
export function cancelProposal({ settingsPda, transactionIndex, signer, memo, programId = PROGRAM_ID, }) {
|
|
5
|
+
const [proposalPda] = getProposalPda({
|
|
6
|
+
settingsPda,
|
|
7
|
+
transactionIndex,
|
|
8
|
+
programId,
|
|
9
|
+
});
|
|
10
|
+
return createCancelProposalInstruction({ consensusAccount: settingsPda, proposal: proposalPda, signer, systemProgram: SystemProgram.programId, program: programId }, { args: { memo: memo ?? null } }, programId);
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PublicKey } from "@solana/web3.js";
|
|
2
|
+
export declare function changeThresholdAsAuthority({ settingsPda, settingsAuthority, rentPayer, newThreshold, memo, programId, }: {
|
|
3
|
+
settingsPda: PublicKey;
|
|
4
|
+
settingsAuthority: PublicKey;
|
|
5
|
+
rentPayer: PublicKey;
|
|
6
|
+
newThreshold: number;
|
|
7
|
+
memo?: string;
|
|
8
|
+
programId?: PublicKey;
|
|
9
|
+
}): import("@solana/web3.js").TransactionInstruction;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createChangeThresholdAsAuthorityInstruction, PROGRAM_ID, } from "../generated";
|
|
2
|
+
export function changeThresholdAsAuthority({ settingsPda, settingsAuthority, rentPayer, newThreshold, memo, programId = PROGRAM_ID, }) {
|
|
3
|
+
return createChangeThresholdAsAuthorityInstruction({
|
|
4
|
+
settings: settingsPda,
|
|
5
|
+
settingsAuthority,
|
|
6
|
+
rentPayer,
|
|
7
|
+
program: programId,
|
|
8
|
+
}, {
|
|
9
|
+
args: {
|
|
10
|
+
newThreshold,
|
|
11
|
+
memo: memo ?? null,
|
|
12
|
+
},
|
|
13
|
+
}, programId);
|
|
14
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PublicKey } from "@solana/web3.js";
|
|
2
|
+
/**
|
|
3
|
+
* Closes Batch and the corresponding Proposal accounts for proposals in terminal states:
|
|
4
|
+
* `Executed`, `Rejected`, or `Cancelled` or stale proposals that aren't Approved.
|
|
5
|
+
*
|
|
6
|
+
* This instruction is only allowed to be executed when all `VaultBatchTransaction` accounts
|
|
7
|
+
* in the `batch` are already closed: `batch.size == 0`.
|
|
8
|
+
*/
|
|
9
|
+
export declare function closeBatch({ settingsPda, batchRentCollector, batchIndex, programId, proposalRentCollector, }: {
|
|
10
|
+
settingsPda: PublicKey;
|
|
11
|
+
batchRentCollector: PublicKey;
|
|
12
|
+
batchIndex: bigint;
|
|
13
|
+
programId?: PublicKey;
|
|
14
|
+
proposalRentCollector?: PublicKey;
|
|
15
|
+
}): import("@solana/web3.js").TransactionInstruction;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { createCloseBatchInstruction, PROGRAM_ID } from "../generated";
|
|
2
|
+
import { getProposalPda, getTransactionPda } from "../pda";
|
|
3
|
+
/**
|
|
4
|
+
* Closes Batch and the corresponding Proposal accounts for proposals in terminal states:
|
|
5
|
+
* `Executed`, `Rejected`, or `Cancelled` or stale proposals that aren't Approved.
|
|
6
|
+
*
|
|
7
|
+
* This instruction is only allowed to be executed when all `VaultBatchTransaction` accounts
|
|
8
|
+
* in the `batch` are already closed: `batch.size == 0`.
|
|
9
|
+
*/
|
|
10
|
+
export function closeBatch({ settingsPda, batchRentCollector, batchIndex, programId = PROGRAM_ID, proposalRentCollector = batchRentCollector, }) {
|
|
11
|
+
const [proposalPda] = getProposalPda({
|
|
12
|
+
settingsPda,
|
|
13
|
+
transactionIndex: batchIndex,
|
|
14
|
+
programId,
|
|
15
|
+
});
|
|
16
|
+
const [batchPda] = getTransactionPda({
|
|
17
|
+
settingsPda,
|
|
18
|
+
transactionIndex: batchIndex,
|
|
19
|
+
programId,
|
|
20
|
+
});
|
|
21
|
+
return createCloseBatchInstruction({
|
|
22
|
+
settings: settingsPda,
|
|
23
|
+
batchRentCollector,
|
|
24
|
+
proposalRentCollector,
|
|
25
|
+
proposal: proposalPda,
|
|
26
|
+
batch: batchPda,
|
|
27
|
+
program: programId,
|
|
28
|
+
}, programId);
|
|
29
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PublicKey } from "@solana/web3.js";
|
|
2
|
+
/**
|
|
3
|
+
* Closes a VaultBatchTransaction belonging to the Batch and Proposal defined by `batchIndex`.
|
|
4
|
+
* VaultBatchTransaction can be closed if either:
|
|
5
|
+
* - it's marked as executed within the batch;
|
|
6
|
+
* - the proposal is in a terminal state: `Executed`, `Rejected`, or `Cancelled`.
|
|
7
|
+
* - the proposal is stale and not `Approved`.
|
|
8
|
+
*/
|
|
9
|
+
export declare function closeBatchTransaction({ settingsPda, transactionRentCollector, batchIndex, transactionIndex, programId, }: {
|
|
10
|
+
settingsPda: PublicKey;
|
|
11
|
+
transactionRentCollector: PublicKey;
|
|
12
|
+
batchIndex: bigint;
|
|
13
|
+
transactionIndex: number;
|
|
14
|
+
programId?: PublicKey;
|
|
15
|
+
}): import("@solana/web3.js").TransactionInstruction;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { createCloseBatchTransactionInstruction, PROGRAM_ID, } from "../generated";
|
|
2
|
+
import { getBatchTransactionPda, getProposalPda, getTransactionPda, } from "../pda";
|
|
3
|
+
/**
|
|
4
|
+
* Closes a VaultBatchTransaction belonging to the Batch and Proposal defined by `batchIndex`.
|
|
5
|
+
* VaultBatchTransaction can be closed if either:
|
|
6
|
+
* - it's marked as executed within the batch;
|
|
7
|
+
* - the proposal is in a terminal state: `Executed`, `Rejected`, or `Cancelled`.
|
|
8
|
+
* - the proposal is stale and not `Approved`.
|
|
9
|
+
*/
|
|
10
|
+
export function closeBatchTransaction({ settingsPda, transactionRentCollector, batchIndex, transactionIndex, programId = PROGRAM_ID, }) {
|
|
11
|
+
const [proposalPda] = getProposalPda({
|
|
12
|
+
settingsPda,
|
|
13
|
+
transactionIndex: batchIndex,
|
|
14
|
+
programId,
|
|
15
|
+
});
|
|
16
|
+
const [batchPda] = getTransactionPda({
|
|
17
|
+
settingsPda,
|
|
18
|
+
transactionIndex: batchIndex,
|
|
19
|
+
programId,
|
|
20
|
+
});
|
|
21
|
+
const [batchTransactionPda] = getBatchTransactionPda({
|
|
22
|
+
settingsPda,
|
|
23
|
+
batchIndex,
|
|
24
|
+
transactionIndex,
|
|
25
|
+
programId,
|
|
26
|
+
});
|
|
27
|
+
return createCloseBatchTransactionInstruction({
|
|
28
|
+
settings: settingsPda,
|
|
29
|
+
transactionRentCollector,
|
|
30
|
+
proposal: proposalPda,
|
|
31
|
+
batch: batchPda,
|
|
32
|
+
transaction: batchTransactionPda,
|
|
33
|
+
}, programId);
|
|
34
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PublicKey } from "@solana/web3.js";
|
|
2
|
+
export declare function closeEmptyPolicyTransaction({ emptyPolicy, transactionRentCollector, transactionIndex, programId, }: {
|
|
3
|
+
emptyPolicy: PublicKey;
|
|
4
|
+
transactionRentCollector: PublicKey;
|
|
5
|
+
transactionIndex: bigint;
|
|
6
|
+
programId?: PublicKey;
|
|
7
|
+
proposalRentCollector?: PublicKey;
|
|
8
|
+
}): import("@solana/web3.js").TransactionInstruction;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { createCloseEmptyPolicyTransactionInstruction, PROGRAM_ID, } from "../generated";
|
|
2
|
+
import { getProgramConfigPda, getProposalPda, getTransactionPda } from "../pda";
|
|
3
|
+
export function closeEmptyPolicyTransaction({ emptyPolicy, transactionRentCollector, transactionIndex, programId = PROGRAM_ID, }) {
|
|
4
|
+
const [proposalPda] = getProposalPda({
|
|
5
|
+
settingsPda: emptyPolicy,
|
|
6
|
+
transactionIndex,
|
|
7
|
+
programId,
|
|
8
|
+
});
|
|
9
|
+
const [transactionPda] = getTransactionPda({
|
|
10
|
+
settingsPda: emptyPolicy,
|
|
11
|
+
transactionIndex: transactionIndex,
|
|
12
|
+
programId,
|
|
13
|
+
});
|
|
14
|
+
const [programConfigPda] = getProgramConfigPda({
|
|
15
|
+
programId,
|
|
16
|
+
});
|
|
17
|
+
return createCloseEmptyPolicyTransactionInstruction({
|
|
18
|
+
emptyPolicy,
|
|
19
|
+
proposal: proposalPda,
|
|
20
|
+
proposalRentCollector: transactionRentCollector,
|
|
21
|
+
transaction: transactionPda,
|
|
22
|
+
transactionRentCollector,
|
|
23
|
+
programConfig: programConfigPda,
|
|
24
|
+
program: programId,
|
|
25
|
+
}, programId);
|
|
26
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PublicKey } from "@solana/web3.js";
|
|
2
|
+
export declare function closeSettingsTransaction({ settingsPda, transactionRentCollector, transactionIndex, programId, proposalRentCollector, }: {
|
|
3
|
+
settingsPda: PublicKey;
|
|
4
|
+
transactionRentCollector: PublicKey;
|
|
5
|
+
transactionIndex: bigint;
|
|
6
|
+
programId?: PublicKey;
|
|
7
|
+
proposalRentCollector?: PublicKey;
|
|
8
|
+
}): import("@solana/web3.js").TransactionInstruction;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { createCloseSettingsTransactionInstruction, PROGRAM_ID, } from "../generated";
|
|
2
|
+
import { getProposalPda, getTransactionPda } from "../pda";
|
|
3
|
+
export function closeSettingsTransaction({ settingsPda, transactionRentCollector, transactionIndex, programId = PROGRAM_ID, proposalRentCollector = transactionRentCollector, }) {
|
|
4
|
+
const [proposalPda] = getProposalPda({
|
|
5
|
+
settingsPda,
|
|
6
|
+
transactionIndex,
|
|
7
|
+
programId,
|
|
8
|
+
});
|
|
9
|
+
const [transactionPda] = getTransactionPda({
|
|
10
|
+
settingsPda,
|
|
11
|
+
transactionIndex: transactionIndex,
|
|
12
|
+
programId,
|
|
13
|
+
});
|
|
14
|
+
return createCloseSettingsTransactionInstruction({
|
|
15
|
+
settings: settingsPda,
|
|
16
|
+
transactionRentCollector,
|
|
17
|
+
proposal: proposalPda,
|
|
18
|
+
proposalRentCollector,
|
|
19
|
+
transaction: transactionPda,
|
|
20
|
+
program: programId,
|
|
21
|
+
}, programId);
|
|
22
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PublicKey } from "@solana/web3.js";
|
|
2
|
+
export declare function closeTransaction({ settingsPda, transactionRentCollector, transactionIndex, programId, proposalRentCollector, }: {
|
|
3
|
+
settingsPda: PublicKey;
|
|
4
|
+
transactionRentCollector: PublicKey;
|
|
5
|
+
transactionIndex: bigint;
|
|
6
|
+
programId?: PublicKey;
|
|
7
|
+
proposalRentCollector?: PublicKey;
|
|
8
|
+
}): import("@solana/web3.js").TransactionInstruction;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { createCloseTransactionInstruction, PROGRAM_ID, } from "../generated";
|
|
2
|
+
import { getProposalPda, getTransactionPda } from "../pda";
|
|
3
|
+
export function closeTransaction({ settingsPda, transactionRentCollector, transactionIndex, programId = PROGRAM_ID, proposalRentCollector = transactionRentCollector, }) {
|
|
4
|
+
const [proposalPda] = getProposalPda({
|
|
5
|
+
settingsPda,
|
|
6
|
+
transactionIndex,
|
|
7
|
+
programId,
|
|
8
|
+
});
|
|
9
|
+
const [transactionPda] = getTransactionPda({
|
|
10
|
+
settingsPda,
|
|
11
|
+
transactionIndex: transactionIndex,
|
|
12
|
+
programId,
|
|
13
|
+
});
|
|
14
|
+
return createCloseTransactionInstruction({
|
|
15
|
+
consensusAccount: settingsPda,
|
|
16
|
+
proposal: proposalPda,
|
|
17
|
+
proposalRentCollector,
|
|
18
|
+
transaction: transactionPda,
|
|
19
|
+
transactionRentCollector,
|
|
20
|
+
program: programId,
|
|
21
|
+
}, programId);
|
|
22
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PublicKey } from "@solana/web3.js";
|
|
2
|
+
export declare function closeTransactionBuffer({ consensusPda, creator, bufferIndex, transactionBuffer, programId, }: {
|
|
3
|
+
consensusPda: PublicKey;
|
|
4
|
+
creator: PublicKey;
|
|
5
|
+
bufferIndex: number;
|
|
6
|
+
transactionBuffer?: PublicKey;
|
|
7
|
+
programId?: PublicKey;
|
|
8
|
+
}): import("@solana/web3.js").TransactionInstruction;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createCloseTransactionBufferInstruction, PROGRAM_ID, } from "../generated";
|
|
2
|
+
import { getTransactionBufferPda } from "../pda";
|
|
3
|
+
export function closeTransactionBuffer({ consensusPda, creator, bufferIndex, transactionBuffer, programId = PROGRAM_ID, }) {
|
|
4
|
+
const [derivedTransactionBuffer] = getTransactionBufferPda({
|
|
5
|
+
consensusPda,
|
|
6
|
+
creator,
|
|
7
|
+
bufferIndex,
|
|
8
|
+
programId,
|
|
9
|
+
});
|
|
10
|
+
return createCloseTransactionBufferInstruction({
|
|
11
|
+
consensusAccount: consensusPda,
|
|
12
|
+
transactionBuffer: transactionBuffer ?? derivedTransactionBuffer,
|
|
13
|
+
creator,
|
|
14
|
+
}, programId);
|
|
15
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PublicKey } from "@solana/web3.js";
|
|
2
|
+
export declare function createBatch({ settingsPda, creator, rentPayer, batchIndex, accountIndex, memo, programId, }: {
|
|
3
|
+
settingsPda: PublicKey;
|
|
4
|
+
/** Member of the multisig that is creating the batch. */
|
|
5
|
+
creator: PublicKey;
|
|
6
|
+
/** Payer for the batch account rent. If not provided, `creator` is used. */
|
|
7
|
+
rentPayer?: PublicKey;
|
|
8
|
+
batchIndex: bigint;
|
|
9
|
+
accountIndex: number;
|
|
10
|
+
memo?: string;
|
|
11
|
+
programId?: PublicKey;
|
|
12
|
+
}): import("@solana/web3.js").TransactionInstruction;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createCreateBatchInstruction, PROGRAM_ID } from "../generated";
|
|
2
|
+
import { getTransactionPda } from "../pda";
|
|
3
|
+
export function createBatch({ settingsPda, creator, rentPayer, batchIndex, accountIndex, memo, programId = PROGRAM_ID, }) {
|
|
4
|
+
const [batchPda] = getTransactionPda({
|
|
5
|
+
settingsPda,
|
|
6
|
+
transactionIndex: batchIndex,
|
|
7
|
+
programId,
|
|
8
|
+
});
|
|
9
|
+
return createCreateBatchInstruction({
|
|
10
|
+
settings: settingsPda,
|
|
11
|
+
creator,
|
|
12
|
+
rentPayer: rentPayer ?? creator,
|
|
13
|
+
batch: batchPda,
|
|
14
|
+
}, { args: { accountIndex, memo: memo ?? null } }, programId);
|
|
15
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PolicyPayload } from "../generated";
|
|
2
|
+
import { PublicKey } from "@solana/web3.js";
|
|
3
|
+
export declare function createPolicyTransaction({ policy, transactionIndex, creator, rentPayer, accountIndex, policyPayload, programId, }: {
|
|
4
|
+
policy: PublicKey;
|
|
5
|
+
transactionIndex: bigint;
|
|
6
|
+
creator: PublicKey;
|
|
7
|
+
rentPayer?: PublicKey;
|
|
8
|
+
accountIndex: number;
|
|
9
|
+
policyPayload: PolicyPayload;
|
|
10
|
+
programId?: PublicKey;
|
|
11
|
+
}): import("@solana/web3.js").TransactionInstruction;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { createCreateTransactionInstruction, PROGRAM_ID, } from "../generated";
|
|
2
|
+
import { getTransactionPda } from "../pda";
|
|
3
|
+
export function createPolicyTransaction({ policy, transactionIndex, creator, rentPayer, accountIndex, policyPayload, programId = PROGRAM_ID, }) {
|
|
4
|
+
const [transactionPda] = getTransactionPda({
|
|
5
|
+
settingsPda: policy,
|
|
6
|
+
transactionIndex,
|
|
7
|
+
programId,
|
|
8
|
+
});
|
|
9
|
+
return createCreateTransactionInstruction({
|
|
10
|
+
consensusAccount: policy,
|
|
11
|
+
transaction: transactionPda,
|
|
12
|
+
creator,
|
|
13
|
+
rentPayer: rentPayer ?? creator,
|
|
14
|
+
program: programId,
|
|
15
|
+
}, {
|
|
16
|
+
args: {
|
|
17
|
+
__kind: "PolicyPayload",
|
|
18
|
+
payload: policyPayload,
|
|
19
|
+
},
|
|
20
|
+
}, programId);
|
|
21
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PublicKey } from "@solana/web3.js";
|
|
2
|
+
export declare function createProposal({ settingsPda, creator, rentPayer, transactionIndex, isDraft, programId, }: {
|
|
3
|
+
settingsPda: PublicKey;
|
|
4
|
+
/** Member of the multisig that is creating the proposal. */
|
|
5
|
+
creator: PublicKey;
|
|
6
|
+
/** Payer for the proposal account rent. If not provided, `creator` is used. */
|
|
7
|
+
rentPayer?: PublicKey;
|
|
8
|
+
transactionIndex: bigint;
|
|
9
|
+
isDraft?: boolean;
|
|
10
|
+
programId?: PublicKey;
|
|
11
|
+
}): import("@solana/web3.js").TransactionInstruction;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { createCreateProposalInstruction, PROGRAM_ID } from "../generated";
|
|
2
|
+
import { getProposalPda } from "../pda";
|
|
3
|
+
export function createProposal({ settingsPda, creator, rentPayer, transactionIndex, isDraft = false, programId = PROGRAM_ID, }) {
|
|
4
|
+
const [proposalPda] = getProposalPda({
|
|
5
|
+
settingsPda,
|
|
6
|
+
transactionIndex,
|
|
7
|
+
programId,
|
|
8
|
+
});
|
|
9
|
+
if (transactionIndex > Number.MAX_SAFE_INTEGER) {
|
|
10
|
+
throw new Error("transactionIndex is too large");
|
|
11
|
+
}
|
|
12
|
+
return createCreateProposalInstruction({
|
|
13
|
+
creator,
|
|
14
|
+
rentPayer: rentPayer ?? creator,
|
|
15
|
+
consensusAccount: settingsPda,
|
|
16
|
+
proposal: proposalPda,
|
|
17
|
+
program: programId,
|
|
18
|
+
}, { args: { transactionIndex: Number(transactionIndex), draft: isDraft } }, programId);
|
|
19
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AccountMeta, PublicKey } from "@solana/web3.js";
|
|
2
|
+
import { SettingsAction } from "../generated";
|
|
3
|
+
export declare function createSettingsTransaction({ settingsPda, transactionIndex, creator, rentPayer, actions, memo, remainingAccounts, programId, }: {
|
|
4
|
+
settingsPda: PublicKey;
|
|
5
|
+
/** Member of the multisig that is creating the transaction. */
|
|
6
|
+
creator: PublicKey;
|
|
7
|
+
/** Payer for the transaction account rent. If not provided, `creator` is used. */
|
|
8
|
+
rentPayer?: PublicKey;
|
|
9
|
+
transactionIndex: bigint;
|
|
10
|
+
actions: SettingsAction[];
|
|
11
|
+
memo?: string;
|
|
12
|
+
remainingAccounts?: AccountMeta[];
|
|
13
|
+
programId?: PublicKey;
|
|
14
|
+
}): import("@solana/web3.js").TransactionInstruction;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { createCreateSettingsTransactionInstruction, PROGRAM_ID, } from "../generated";
|
|
2
|
+
import { getTransactionPda } from "../pda";
|
|
3
|
+
export function createSettingsTransaction({ settingsPda, transactionIndex, creator, rentPayer, actions, memo, remainingAccounts, programId = PROGRAM_ID, }) {
|
|
4
|
+
const [transactionPda] = getTransactionPda({
|
|
5
|
+
settingsPda,
|
|
6
|
+
transactionIndex: transactionIndex,
|
|
7
|
+
programId,
|
|
8
|
+
});
|
|
9
|
+
return createCreateSettingsTransactionInstruction({
|
|
10
|
+
settings: settingsPda,
|
|
11
|
+
transaction: transactionPda,
|
|
12
|
+
creator,
|
|
13
|
+
rentPayer: rentPayer ?? creator,
|
|
14
|
+
anchorRemainingAccounts: remainingAccounts,
|
|
15
|
+
program: programId,
|
|
16
|
+
}, { args: { actions, memo: memo ?? null } }, programId);
|
|
17
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AccountMeta, PublicKey, TransactionInstruction } from "@solana/web3.js";
|
|
2
|
+
import { SmartAccountSigner } from "../generated";
|
|
3
|
+
export declare function createSmartAccount({ treasury, creator, settings, settingsAuthority, threshold, signers, timeLock, rentCollector, memo, programId, remainingAccounts, }: {
|
|
4
|
+
treasury: PublicKey;
|
|
5
|
+
creator: PublicKey;
|
|
6
|
+
settings?: PublicKey;
|
|
7
|
+
settingsAuthority: PublicKey | null;
|
|
8
|
+
threshold: number;
|
|
9
|
+
signers: SmartAccountSigner[];
|
|
10
|
+
timeLock: number;
|
|
11
|
+
rentCollector: PublicKey | null;
|
|
12
|
+
memo?: string;
|
|
13
|
+
programId?: PublicKey;
|
|
14
|
+
remainingAccounts?: AccountMeta[];
|
|
15
|
+
}): TransactionInstruction;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { PublicKey, } from "@solana/web3.js";
|
|
2
|
+
import { createCreateSmartAccountInstruction, PROGRAM_ID, } from "../generated";
|
|
3
|
+
import { getProgramConfigPda } from "../pda";
|
|
4
|
+
export function createSmartAccount({ treasury, creator, settings, settingsAuthority, threshold, signers, timeLock, rentCollector, memo, programId = PROGRAM_ID, remainingAccounts, }) {
|
|
5
|
+
const programConfigPda = getProgramConfigPda({ programId })[0];
|
|
6
|
+
const settingsAccountMeta = {
|
|
7
|
+
pubkey: settings ?? PublicKey.default,
|
|
8
|
+
isSigner: false,
|
|
9
|
+
isWritable: true,
|
|
10
|
+
};
|
|
11
|
+
return createCreateSmartAccountInstruction({
|
|
12
|
+
programConfig: programConfigPda,
|
|
13
|
+
treasury,
|
|
14
|
+
creator,
|
|
15
|
+
program: programId,
|
|
16
|
+
anchorRemainingAccounts: [
|
|
17
|
+
settingsAccountMeta,
|
|
18
|
+
...(remainingAccounts ?? []),
|
|
19
|
+
],
|
|
20
|
+
}, {
|
|
21
|
+
args: {
|
|
22
|
+
settingsAuthority,
|
|
23
|
+
threshold,
|
|
24
|
+
signers,
|
|
25
|
+
timeLock,
|
|
26
|
+
rentCollector,
|
|
27
|
+
memo: memo ?? null,
|
|
28
|
+
},
|
|
29
|
+
}, programId);
|
|
30
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AddressLookupTableAccount, PublicKey, TransactionMessage } from "@solana/web3.js";
|
|
2
|
+
export declare function createTransaction({ settingsPda, transactionIndex, creator, rentPayer, accountIndex, ephemeralSigners, transactionMessage, addressLookupTableAccounts, memo, programId, }: {
|
|
3
|
+
settingsPda: PublicKey;
|
|
4
|
+
transactionIndex: bigint;
|
|
5
|
+
creator: PublicKey;
|
|
6
|
+
rentPayer?: PublicKey;
|
|
7
|
+
accountIndex: number;
|
|
8
|
+
/** Number of additional signing PDAs required by the transaction. */
|
|
9
|
+
ephemeralSigners: number;
|
|
10
|
+
/** Transaction message to wrap into a multisig transaction. */
|
|
11
|
+
transactionMessage: TransactionMessage;
|
|
12
|
+
/** `AddressLookupTableAccount`s referenced in `transaction_message`. */
|
|
13
|
+
addressLookupTableAccounts?: AddressLookupTableAccount[];
|
|
14
|
+
memo?: string;
|
|
15
|
+
programId?: PublicKey;
|
|
16
|
+
}): import("@solana/web3.js").TransactionInstruction;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { createCreateTransactionInstruction, PROGRAM_ID } from "../generated";
|
|
2
|
+
import { getTransactionPda, getSmartAccountPda } from "../pda";
|
|
3
|
+
import { transactionMessageToMultisigTransactionMessageBytes } from "../utils";
|
|
4
|
+
export function createTransaction({ settingsPda, transactionIndex, creator, rentPayer, accountIndex, ephemeralSigners, transactionMessage, addressLookupTableAccounts, memo, programId = PROGRAM_ID, }) {
|
|
5
|
+
const [smartAccountPda] = getSmartAccountPda({
|
|
6
|
+
settingsPda,
|
|
7
|
+
accountIndex,
|
|
8
|
+
programId,
|
|
9
|
+
});
|
|
10
|
+
const [transactionPda] = getTransactionPda({
|
|
11
|
+
settingsPda,
|
|
12
|
+
transactionIndex,
|
|
13
|
+
programId,
|
|
14
|
+
});
|
|
15
|
+
const { transactionMessageBytes, compiledMessage } = transactionMessageToMultisigTransactionMessageBytes({
|
|
16
|
+
message: transactionMessage,
|
|
17
|
+
addressLookupTableAccounts,
|
|
18
|
+
smartAccountPda,
|
|
19
|
+
});
|
|
20
|
+
return createCreateTransactionInstruction({
|
|
21
|
+
consensusAccount: settingsPda,
|
|
22
|
+
transaction: transactionPda,
|
|
23
|
+
creator,
|
|
24
|
+
rentPayer: rentPayer ?? creator,
|
|
25
|
+
program: programId,
|
|
26
|
+
}, {
|
|
27
|
+
args: {
|
|
28
|
+
__kind: "TransactionPayload",
|
|
29
|
+
fields: [
|
|
30
|
+
{
|
|
31
|
+
accountIndex,
|
|
32
|
+
ephemeralSigners,
|
|
33
|
+
transactionMessage: transactionMessageBytes,
|
|
34
|
+
memo: memo ?? null,
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
},
|
|
38
|
+
}, programId);
|
|
39
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PublicKey } from "@solana/web3.js";
|
|
2
|
+
export declare function createTransactionBuffer({ consensusPda, creator, rentPayer, bufferIndex, accountIndex, finalBufferHash, finalBufferSize, buffer, transactionBuffer, programId, }: {
|
|
3
|
+
consensusPda: PublicKey;
|
|
4
|
+
creator: PublicKey;
|
|
5
|
+
rentPayer?: PublicKey;
|
|
6
|
+
bufferIndex: number;
|
|
7
|
+
accountIndex: number;
|
|
8
|
+
finalBufferHash: number[] | Uint8Array;
|
|
9
|
+
finalBufferSize: number;
|
|
10
|
+
buffer: Uint8Array;
|
|
11
|
+
transactionBuffer?: PublicKey;
|
|
12
|
+
programId?: PublicKey;
|
|
13
|
+
}): import("@solana/web3.js").TransactionInstruction;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { createCreateTransactionBufferInstruction, PROGRAM_ID, } from "../generated";
|
|
2
|
+
import { getTransactionBufferPda } from "../pda";
|
|
3
|
+
export function createTransactionBuffer({ consensusPda, creator, rentPayer, bufferIndex, accountIndex, finalBufferHash, finalBufferSize, buffer, transactionBuffer, programId = PROGRAM_ID, }) {
|
|
4
|
+
const [derivedTransactionBuffer] = getTransactionBufferPda({
|
|
5
|
+
consensusPda,
|
|
6
|
+
creator,
|
|
7
|
+
bufferIndex,
|
|
8
|
+
programId,
|
|
9
|
+
});
|
|
10
|
+
return createCreateTransactionBufferInstruction({
|
|
11
|
+
consensusAccount: consensusPda,
|
|
12
|
+
transactionBuffer: transactionBuffer ?? derivedTransactionBuffer,
|
|
13
|
+
creator,
|
|
14
|
+
rentPayer: rentPayer ?? creator,
|
|
15
|
+
}, {
|
|
16
|
+
args: {
|
|
17
|
+
bufferIndex,
|
|
18
|
+
accountIndex,
|
|
19
|
+
finalBufferHash: Array.from(finalBufferHash),
|
|
20
|
+
finalBufferSize,
|
|
21
|
+
buffer,
|
|
22
|
+
},
|
|
23
|
+
}, programId);
|
|
24
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PublicKey } from "@solana/web3.js";
|
|
2
|
+
export declare function createTransactionFromBuffer({ consensusPda, creator, rentPayer, transactionIndex, bufferIndex, accountIndex, ephemeralSigners, transactionBuffer, memo, programId, }: {
|
|
3
|
+
consensusPda: PublicKey;
|
|
4
|
+
creator: PublicKey;
|
|
5
|
+
rentPayer?: PublicKey;
|
|
6
|
+
transactionIndex: bigint;
|
|
7
|
+
bufferIndex: number;
|
|
8
|
+
accountIndex: number;
|
|
9
|
+
ephemeralSigners: number;
|
|
10
|
+
transactionBuffer?: PublicKey;
|
|
11
|
+
memo?: string;
|
|
12
|
+
programId?: PublicKey;
|
|
13
|
+
}): import("@solana/web3.js").TransactionInstruction;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { SystemProgram } from "@solana/web3.js";
|
|
2
|
+
import { createCreateTransactionFromBufferInstruction, PROGRAM_ID, } from "../generated";
|
|
3
|
+
import { getTransactionBufferPda, getTransactionPda } from "../pda";
|
|
4
|
+
const EMPTY_TRANSACTION_MESSAGE = new Uint8Array(6).fill(0);
|
|
5
|
+
export function createTransactionFromBuffer({ consensusPda, creator, rentPayer, transactionIndex, bufferIndex, accountIndex, ephemeralSigners, transactionBuffer, memo, programId = PROGRAM_ID, }) {
|
|
6
|
+
const [transaction] = getTransactionPda({
|
|
7
|
+
settingsPda: consensusPda,
|
|
8
|
+
transactionIndex,
|
|
9
|
+
programId,
|
|
10
|
+
});
|
|
11
|
+
const [derivedTransactionBuffer] = getTransactionBufferPda({
|
|
12
|
+
consensusPda,
|
|
13
|
+
creator,
|
|
14
|
+
bufferIndex,
|
|
15
|
+
programId,
|
|
16
|
+
});
|
|
17
|
+
return createCreateTransactionFromBufferInstruction({
|
|
18
|
+
transactionCreateItemConsensusAccount: consensusPda,
|
|
19
|
+
transactionCreateItemTransaction: transaction,
|
|
20
|
+
transactionCreateItemCreator: creator,
|
|
21
|
+
transactionCreateItemRentPayer: rentPayer ?? creator,
|
|
22
|
+
transactionCreateItemSystemProgram: SystemProgram.programId,
|
|
23
|
+
transactionCreateItemProgram: programId,
|
|
24
|
+
transactionBuffer: transactionBuffer ?? derivedTransactionBuffer,
|
|
25
|
+
creator,
|
|
26
|
+
}, {
|
|
27
|
+
args: {
|
|
28
|
+
__kind: "TransactionPayload",
|
|
29
|
+
fields: [
|
|
30
|
+
{
|
|
31
|
+
accountIndex,
|
|
32
|
+
transactionMessage: EMPTY_TRANSACTION_MESSAGE,
|
|
33
|
+
ephemeralSigners,
|
|
34
|
+
memo: memo ?? null,
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
},
|
|
38
|
+
}, programId);
|
|
39
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AddressLookupTableAccount, Connection, PublicKey, TransactionInstruction } from "@solana/web3.js";
|
|
2
|
+
export declare function executeBatchTransaction({ connection, feePayer, settingsPda, signer, batchIndex, transactionIndex, programId, }: {
|
|
3
|
+
connection: Connection;
|
|
4
|
+
feePayer: PublicKey;
|
|
5
|
+
settingsPda: PublicKey;
|
|
6
|
+
signer: PublicKey;
|
|
7
|
+
batchIndex: bigint;
|
|
8
|
+
transactionIndex: number;
|
|
9
|
+
programId?: PublicKey;
|
|
10
|
+
}): Promise<{
|
|
11
|
+
instruction: TransactionInstruction;
|
|
12
|
+
lookupTableAccounts: AddressLookupTableAccount[];
|
|
13
|
+
}>;
|