@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,390 @@
|
|
|
1
|
+
import { EXTRA_FEATURE_ACTIONS, FEATURE_INSTRUCTION_COVERAGE, } from "./features.js";
|
|
2
|
+
const featureInstructionCoverage = FEATURE_INSTRUCTION_COVERAGE;
|
|
3
|
+
const extraFeatureActions = EXTRA_FEATURE_ACTIONS;
|
|
4
|
+
export const OPERATION_REGISTRY = {
|
|
5
|
+
initializeProgramConfig: {
|
|
6
|
+
feature: "programConfig",
|
|
7
|
+
instruction: "initializeProgramConfig",
|
|
8
|
+
exportName: "initialize",
|
|
9
|
+
phase: "offline",
|
|
10
|
+
payerRole: "feePayer",
|
|
11
|
+
signerRoles: ["feePayer", "initializer"],
|
|
12
|
+
},
|
|
13
|
+
setProgramConfigAuthority: {
|
|
14
|
+
feature: "programConfig",
|
|
15
|
+
instruction: "setProgramConfigAuthority",
|
|
16
|
+
exportName: "setAuthority",
|
|
17
|
+
phase: "offline",
|
|
18
|
+
payerRole: "feePayer",
|
|
19
|
+
signerRoles: ["feePayer", "authority"],
|
|
20
|
+
},
|
|
21
|
+
setProgramConfigSmartAccountCreationFee: {
|
|
22
|
+
feature: "programConfig",
|
|
23
|
+
instruction: "setProgramConfigSmartAccountCreationFee",
|
|
24
|
+
exportName: "setSmartAccountCreationFee",
|
|
25
|
+
phase: "offline",
|
|
26
|
+
payerRole: "feePayer",
|
|
27
|
+
signerRoles: ["feePayer", "authority"],
|
|
28
|
+
},
|
|
29
|
+
setProgramConfigTreasury: {
|
|
30
|
+
feature: "programConfig",
|
|
31
|
+
instruction: "setProgramConfigTreasury",
|
|
32
|
+
exportName: "setTreasury",
|
|
33
|
+
phase: "offline",
|
|
34
|
+
payerRole: "feePayer",
|
|
35
|
+
signerRoles: ["feePayer", "authority"],
|
|
36
|
+
},
|
|
37
|
+
createSmartAccount: {
|
|
38
|
+
feature: "smartAccounts",
|
|
39
|
+
instruction: "createSmartAccount",
|
|
40
|
+
exportName: "create",
|
|
41
|
+
phase: "offline",
|
|
42
|
+
payerRole: "creator",
|
|
43
|
+
signerRoles: ["creator"],
|
|
44
|
+
},
|
|
45
|
+
addSignerAsAuthority: {
|
|
46
|
+
feature: "smartAccounts",
|
|
47
|
+
instruction: "addSignerAsAuthority",
|
|
48
|
+
exportName: "addSigner",
|
|
49
|
+
phase: "offline",
|
|
50
|
+
payerRole: "feePayer",
|
|
51
|
+
signerRoles: ["feePayer", "rentPayer"],
|
|
52
|
+
},
|
|
53
|
+
removeSignerAsAuthority: {
|
|
54
|
+
feature: "smartAccounts",
|
|
55
|
+
instruction: "removeSignerAsAuthority",
|
|
56
|
+
exportName: "removeSigner",
|
|
57
|
+
phase: "offline",
|
|
58
|
+
payerRole: "feePayer",
|
|
59
|
+
signerRoles: ["feePayer"],
|
|
60
|
+
},
|
|
61
|
+
setTimeLockAsAuthority: {
|
|
62
|
+
feature: "smartAccounts",
|
|
63
|
+
instruction: "setTimeLockAsAuthority",
|
|
64
|
+
exportName: "setTimeLock",
|
|
65
|
+
phase: "offline",
|
|
66
|
+
payerRole: "feePayer",
|
|
67
|
+
signerRoles: ["feePayer"],
|
|
68
|
+
},
|
|
69
|
+
changeThresholdAsAuthority: {
|
|
70
|
+
feature: "smartAccounts",
|
|
71
|
+
instruction: "changeThresholdAsAuthority",
|
|
72
|
+
exportName: "changeThreshold",
|
|
73
|
+
phase: "offline",
|
|
74
|
+
payerRole: "settingsAuthority",
|
|
75
|
+
signerRoles: ["settingsAuthority", "rentPayer"],
|
|
76
|
+
},
|
|
77
|
+
setNewSettingsAuthorityAsAuthority: {
|
|
78
|
+
feature: "smartAccounts",
|
|
79
|
+
instruction: "setNewSettingsAuthorityAsAuthority",
|
|
80
|
+
exportName: "setNewSettingsAuthority",
|
|
81
|
+
phase: "offline",
|
|
82
|
+
payerRole: "feePayer",
|
|
83
|
+
signerRoles: ["feePayer"],
|
|
84
|
+
},
|
|
85
|
+
setArchivalAuthorityAsAuthority: {
|
|
86
|
+
feature: "smartAccounts",
|
|
87
|
+
instruction: "setArchivalAuthorityAsAuthority",
|
|
88
|
+
exportName: "setArchivalAuthority",
|
|
89
|
+
phase: "offline",
|
|
90
|
+
payerRole: "feePayer",
|
|
91
|
+
signerRoles: ["feePayer"],
|
|
92
|
+
},
|
|
93
|
+
createSettingsTransaction: {
|
|
94
|
+
feature: "smartAccounts",
|
|
95
|
+
instruction: "createSettingsTransaction",
|
|
96
|
+
exportName: "createSettingsTransaction",
|
|
97
|
+
phase: "offline",
|
|
98
|
+
payerRole: "feePayer",
|
|
99
|
+
signerRoles: ["feePayer"],
|
|
100
|
+
},
|
|
101
|
+
closeSettingsTransaction: {
|
|
102
|
+
feature: "smartAccounts",
|
|
103
|
+
instruction: "closeSettingsTransaction",
|
|
104
|
+
exportName: "closeSettingsTransaction",
|
|
105
|
+
phase: "offline",
|
|
106
|
+
payerRole: "feePayer",
|
|
107
|
+
signerRoles: ["feePayer"],
|
|
108
|
+
},
|
|
109
|
+
createProposal: {
|
|
110
|
+
feature: "proposals",
|
|
111
|
+
instruction: "createProposal",
|
|
112
|
+
exportName: "create",
|
|
113
|
+
phase: "offline",
|
|
114
|
+
payerRole: "feePayer",
|
|
115
|
+
signerRoles: ["feePayer", "creator", "rentPayer"],
|
|
116
|
+
signerFallbacks: {
|
|
117
|
+
rentPayer: "creator",
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
activateProposal: {
|
|
121
|
+
feature: "proposals",
|
|
122
|
+
instruction: "activateProposal",
|
|
123
|
+
exportName: "activate",
|
|
124
|
+
phase: "offline",
|
|
125
|
+
payerRole: "feePayer",
|
|
126
|
+
signerRoles: ["feePayer", "signer"],
|
|
127
|
+
},
|
|
128
|
+
approveProposal: {
|
|
129
|
+
feature: "proposals",
|
|
130
|
+
instruction: "approveProposal",
|
|
131
|
+
exportName: "approve",
|
|
132
|
+
phase: "offline",
|
|
133
|
+
payerRole: "feePayer",
|
|
134
|
+
signerRoles: ["feePayer", "signer"],
|
|
135
|
+
},
|
|
136
|
+
rejectProposal: {
|
|
137
|
+
feature: "proposals",
|
|
138
|
+
instruction: "rejectProposal",
|
|
139
|
+
exportName: "reject",
|
|
140
|
+
phase: "offline",
|
|
141
|
+
payerRole: "feePayer",
|
|
142
|
+
signerRoles: ["feePayer", "signer"],
|
|
143
|
+
},
|
|
144
|
+
cancelProposal: {
|
|
145
|
+
feature: "proposals",
|
|
146
|
+
instruction: "cancelProposal",
|
|
147
|
+
exportName: "cancel",
|
|
148
|
+
phase: "offline",
|
|
149
|
+
payerRole: "feePayer",
|
|
150
|
+
signerRoles: ["feePayer", "signer"],
|
|
151
|
+
},
|
|
152
|
+
createTransaction: {
|
|
153
|
+
feature: "transactions",
|
|
154
|
+
instruction: "createTransaction",
|
|
155
|
+
exportName: "create",
|
|
156
|
+
phase: "offline",
|
|
157
|
+
payerRole: "feePayer",
|
|
158
|
+
signerRoles: ["feePayer"],
|
|
159
|
+
},
|
|
160
|
+
createTransactionBuffer: {
|
|
161
|
+
feature: "transactions",
|
|
162
|
+
instruction: "createTransactionBuffer",
|
|
163
|
+
exportName: "createBuffer",
|
|
164
|
+
phase: "offline",
|
|
165
|
+
payerRole: "feePayer",
|
|
166
|
+
signerRoles: ["feePayer", "creator", "rentPayer"],
|
|
167
|
+
signerFallbacks: {
|
|
168
|
+
rentPayer: "creator",
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
closeTransactionBuffer: {
|
|
172
|
+
feature: "transactions",
|
|
173
|
+
instruction: "closeTransactionBuffer",
|
|
174
|
+
exportName: "closeBuffer",
|
|
175
|
+
phase: "offline",
|
|
176
|
+
payerRole: "feePayer",
|
|
177
|
+
signerRoles: ["feePayer", "creator"],
|
|
178
|
+
},
|
|
179
|
+
extendTransactionBuffer: {
|
|
180
|
+
feature: "transactions",
|
|
181
|
+
instruction: "extendTransactionBuffer",
|
|
182
|
+
exportName: "extendBuffer",
|
|
183
|
+
phase: "offline",
|
|
184
|
+
payerRole: "feePayer",
|
|
185
|
+
signerRoles: ["feePayer", "creator"],
|
|
186
|
+
},
|
|
187
|
+
createTransactionFromBuffer: {
|
|
188
|
+
feature: "transactions",
|
|
189
|
+
instruction: "createTransactionFromBuffer",
|
|
190
|
+
exportName: "createFromBuffer",
|
|
191
|
+
phase: "offline",
|
|
192
|
+
payerRole: "feePayer",
|
|
193
|
+
signerRoles: ["feePayer", "creator", "rentPayer"],
|
|
194
|
+
signerFallbacks: {
|
|
195
|
+
rentPayer: "creator",
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
closeTransaction: {
|
|
199
|
+
feature: "transactions",
|
|
200
|
+
instruction: "closeTransaction",
|
|
201
|
+
exportName: "close",
|
|
202
|
+
phase: "offline",
|
|
203
|
+
payerRole: "feePayer",
|
|
204
|
+
signerRoles: ["feePayer"],
|
|
205
|
+
},
|
|
206
|
+
logEvent: {
|
|
207
|
+
feature: "transactions",
|
|
208
|
+
instruction: "logEvent",
|
|
209
|
+
exportName: "logEvent",
|
|
210
|
+
phase: "offline",
|
|
211
|
+
payerRole: "feePayer",
|
|
212
|
+
signerRoles: ["feePayer", "logAuthority"],
|
|
213
|
+
},
|
|
214
|
+
createBatch: {
|
|
215
|
+
feature: "batches",
|
|
216
|
+
instruction: "createBatch",
|
|
217
|
+
exportName: "create",
|
|
218
|
+
phase: "offline",
|
|
219
|
+
payerRole: "feePayer",
|
|
220
|
+
signerRoles: ["feePayer", "creator", "rentPayer"],
|
|
221
|
+
signerFallbacks: {
|
|
222
|
+
rentPayer: "creator",
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
addTransactionToBatch: {
|
|
226
|
+
feature: "batches",
|
|
227
|
+
instruction: "addTransactionToBatch",
|
|
228
|
+
exportName: "addTransaction",
|
|
229
|
+
phase: "offline",
|
|
230
|
+
payerRole: "feePayer",
|
|
231
|
+
signerRoles: ["feePayer", "signer", "rentPayer"],
|
|
232
|
+
signerFallbacks: {
|
|
233
|
+
rentPayer: "signer",
|
|
234
|
+
},
|
|
235
|
+
exposeInstruction: false,
|
|
236
|
+
requiresLookupTables: true,
|
|
237
|
+
},
|
|
238
|
+
closeBatchTransaction: {
|
|
239
|
+
feature: "batches",
|
|
240
|
+
instruction: "closeBatchTransaction",
|
|
241
|
+
exportName: "closeTransaction",
|
|
242
|
+
phase: "offline",
|
|
243
|
+
payerRole: "feePayer",
|
|
244
|
+
signerRoles: ["feePayer"],
|
|
245
|
+
},
|
|
246
|
+
closeBatch: {
|
|
247
|
+
feature: "batches",
|
|
248
|
+
instruction: "closeBatch",
|
|
249
|
+
exportName: "close",
|
|
250
|
+
phase: "offline",
|
|
251
|
+
payerRole: "feePayer",
|
|
252
|
+
signerRoles: ["feePayer"],
|
|
253
|
+
},
|
|
254
|
+
createPolicyTransaction: {
|
|
255
|
+
feature: "policies",
|
|
256
|
+
instruction: "createPolicyTransaction",
|
|
257
|
+
exportName: "createTransaction",
|
|
258
|
+
phase: "offline",
|
|
259
|
+
payerRole: "feePayer",
|
|
260
|
+
signerRoles: ["feePayer"],
|
|
261
|
+
},
|
|
262
|
+
closeEmptyPolicyTransaction: {
|
|
263
|
+
feature: "policies",
|
|
264
|
+
instruction: "closeEmptyPolicyTransaction",
|
|
265
|
+
exportName: "closeEmptyTransaction",
|
|
266
|
+
phase: "offline",
|
|
267
|
+
payerRole: "feePayer",
|
|
268
|
+
signerRoles: ["feePayer"],
|
|
269
|
+
},
|
|
270
|
+
addSpendingLimitAsAuthority: {
|
|
271
|
+
feature: "spendingLimits",
|
|
272
|
+
instruction: "addSpendingLimitAsAuthority",
|
|
273
|
+
exportName: "add",
|
|
274
|
+
phase: "offline",
|
|
275
|
+
payerRole: "feePayer",
|
|
276
|
+
signerRoles: ["feePayer", "settingsAuthority", "rentPayer"],
|
|
277
|
+
},
|
|
278
|
+
removeSpendingLimitAsAuthority: {
|
|
279
|
+
feature: "spendingLimits",
|
|
280
|
+
instruction: "removeSpendingLimitAsAuthority",
|
|
281
|
+
exportName: "remove",
|
|
282
|
+
phase: "offline",
|
|
283
|
+
payerRole: "feePayer",
|
|
284
|
+
signerRoles: ["feePayer"],
|
|
285
|
+
},
|
|
286
|
+
useSpendingLimit: {
|
|
287
|
+
feature: "spendingLimits",
|
|
288
|
+
instruction: "useSpendingLimit",
|
|
289
|
+
exportName: "use",
|
|
290
|
+
phase: "offline",
|
|
291
|
+
payerRole: "feePayer",
|
|
292
|
+
signerRoles: ["feePayer", "signer"],
|
|
293
|
+
},
|
|
294
|
+
executeSettingsTransaction: {
|
|
295
|
+
feature: "execution",
|
|
296
|
+
instruction: "executeSettingsTransaction",
|
|
297
|
+
exportName: "executeSettingsTransaction",
|
|
298
|
+
phase: "offline",
|
|
299
|
+
payerRole: "feePayer",
|
|
300
|
+
signerRoles: ["feePayer", "signer", "rentPayer"],
|
|
301
|
+
requiresConfirmation: true,
|
|
302
|
+
},
|
|
303
|
+
executeTransaction: {
|
|
304
|
+
feature: "execution",
|
|
305
|
+
instruction: "executeTransaction",
|
|
306
|
+
exportName: "executeTransaction",
|
|
307
|
+
phase: "online",
|
|
308
|
+
payerRole: "feePayer",
|
|
309
|
+
signerRoles: ["feePayer"],
|
|
310
|
+
requiresConnection: true,
|
|
311
|
+
requiresLookupTables: true,
|
|
312
|
+
requiresConfirmation: true,
|
|
313
|
+
},
|
|
314
|
+
executeBatchTransaction: {
|
|
315
|
+
feature: "execution",
|
|
316
|
+
instruction: "executeBatchTransaction",
|
|
317
|
+
exportName: "executeBatchTransaction",
|
|
318
|
+
phase: "online",
|
|
319
|
+
payerRole: "feePayer",
|
|
320
|
+
signerRoles: ["feePayer", "signer"],
|
|
321
|
+
requiresConnection: true,
|
|
322
|
+
requiresLookupTables: true,
|
|
323
|
+
requiresConfirmation: true,
|
|
324
|
+
},
|
|
325
|
+
executeTransactionSync: {
|
|
326
|
+
feature: "execution",
|
|
327
|
+
instruction: "executeTransactionSync",
|
|
328
|
+
exportName: "executeTransactionSync",
|
|
329
|
+
phase: "offline",
|
|
330
|
+
payerRole: "feePayer",
|
|
331
|
+
signerRoles: ["feePayer", "signers"],
|
|
332
|
+
},
|
|
333
|
+
executeTransactionSyncV2: {
|
|
334
|
+
feature: "execution",
|
|
335
|
+
instruction: "executeTransactionSyncV2",
|
|
336
|
+
exportName: "executeTransactionSyncV2",
|
|
337
|
+
phase: "offline",
|
|
338
|
+
payerRole: "feePayer",
|
|
339
|
+
signerRoles: ["feePayer"],
|
|
340
|
+
},
|
|
341
|
+
executeSettingsTransactionSync: {
|
|
342
|
+
feature: "execution",
|
|
343
|
+
instruction: "executeSettingsTransactionSync",
|
|
344
|
+
exportName: "executeSettingsTransactionSync",
|
|
345
|
+
phase: "offline",
|
|
346
|
+
payerRole: "feePayer",
|
|
347
|
+
signerRoles: ["feePayer", "signers"],
|
|
348
|
+
},
|
|
349
|
+
executePolicyTransaction: {
|
|
350
|
+
feature: "execution",
|
|
351
|
+
instruction: "executePolicyTransaction",
|
|
352
|
+
exportName: "executePolicyTransaction",
|
|
353
|
+
phase: "offline",
|
|
354
|
+
payerRole: "feePayer",
|
|
355
|
+
signerRoles: ["feePayer"],
|
|
356
|
+
},
|
|
357
|
+
executePolicyPayloadSync: {
|
|
358
|
+
feature: "execution",
|
|
359
|
+
instruction: "executePolicyPayloadSync",
|
|
360
|
+
exportName: "executePolicyPayloadSync",
|
|
361
|
+
phase: "offline",
|
|
362
|
+
payerRole: "feePayer",
|
|
363
|
+
signerRoles: ["feePayer"],
|
|
364
|
+
},
|
|
365
|
+
};
|
|
366
|
+
export const OPERATION_NAMES = Object.keys(OPERATION_REGISTRY);
|
|
367
|
+
export const FEATURE_EXPORTS_FROM_REGISTRY = Object.fromEntries(Object.entries(OPERATION_REGISTRY).map(([operation, metadata]) => [
|
|
368
|
+
operation,
|
|
369
|
+
metadata.exportName,
|
|
370
|
+
]));
|
|
371
|
+
export function getOperationsForFeature(feature) {
|
|
372
|
+
return OPERATION_NAMES.filter((operation) => OPERATION_REGISTRY[operation].feature === feature);
|
|
373
|
+
}
|
|
374
|
+
export function findOperationCoverageIssues() {
|
|
375
|
+
const missingMappings = [
|
|
376
|
+
...Object.values(featureInstructionCoverage).flat(),
|
|
377
|
+
...Object.values(extraFeatureActions).flat(),
|
|
378
|
+
].filter((instruction) => !OPERATION_NAMES.includes(instruction));
|
|
379
|
+
const duplicateExports = Object.values(OPERATION_REGISTRY).reduce((accumulator, metadata) => {
|
|
380
|
+
const key = `${metadata.feature}:${metadata.exportName}`;
|
|
381
|
+
accumulator[key] = (accumulator[key] ?? 0) + 1;
|
|
382
|
+
return accumulator;
|
|
383
|
+
}, {});
|
|
384
|
+
return {
|
|
385
|
+
missingMappings,
|
|
386
|
+
duplicateExports: Object.entries(duplicateExports)
|
|
387
|
+
.filter(([, count]) => count > 1)
|
|
388
|
+
.map(([key]) => key),
|
|
389
|
+
};
|
|
390
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export declare const PDA_REGISTRY: {
|
|
2
|
+
readonly programConfig: {
|
|
3
|
+
readonly seeds: readonly ["smart_account", "program_config"];
|
|
4
|
+
};
|
|
5
|
+
readonly settings: {
|
|
6
|
+
readonly seeds: readonly ["smart_account", "settings", "accountIndex:u128"];
|
|
7
|
+
};
|
|
8
|
+
readonly smartAccount: {
|
|
9
|
+
readonly seeds: readonly ["smart_account", "settingsPda:pubkey", "smart_account", "accountIndex:u8"];
|
|
10
|
+
};
|
|
11
|
+
readonly transaction: {
|
|
12
|
+
readonly seeds: readonly ["smart_account", "settingsPda:pubkey", "transaction", "transactionIndex:u64"];
|
|
13
|
+
};
|
|
14
|
+
readonly proposal: {
|
|
15
|
+
readonly seeds: readonly ["smart_account", "settingsPda:pubkey", "transaction", "transactionIndex:u64", "proposal"];
|
|
16
|
+
};
|
|
17
|
+
readonly batchTransaction: {
|
|
18
|
+
readonly seeds: readonly ["smart_account", "settingsPda:pubkey", "transaction", "batchIndex:u64", "batch_transaction", "transactionIndex:u32"];
|
|
19
|
+
};
|
|
20
|
+
readonly ephemeralSigner: {
|
|
21
|
+
readonly seeds: readonly ["smart_account", "transactionPda:pubkey", "ephemeral_signer", "ephemeralSignerIndex:u8"];
|
|
22
|
+
};
|
|
23
|
+
readonly spendingLimit: {
|
|
24
|
+
readonly seeds: readonly ["smart_account", "settingsPda:pubkey", "spending_limit", "seed:pubkey"];
|
|
25
|
+
};
|
|
26
|
+
readonly transactionBuffer: {
|
|
27
|
+
readonly seeds: readonly ["smart_account", "consensusPda:pubkey", "transaction_buffer", "creator:pubkey", "bufferIndex:u8"];
|
|
28
|
+
};
|
|
29
|
+
readonly policy: {
|
|
30
|
+
readonly seeds: readonly ["smart_account", "policy", "settingsPda:pubkey", "policySeed:u64"];
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
export const PDA_REGISTRY = {
|
|
2
|
+
programConfig: {
|
|
3
|
+
seeds: ["smart_account", "program_config"],
|
|
4
|
+
},
|
|
5
|
+
settings: {
|
|
6
|
+
seeds: ["smart_account", "settings", "accountIndex:u128"],
|
|
7
|
+
},
|
|
8
|
+
smartAccount: {
|
|
9
|
+
seeds: [
|
|
10
|
+
"smart_account",
|
|
11
|
+
"settingsPda:pubkey",
|
|
12
|
+
"smart_account",
|
|
13
|
+
"accountIndex:u8",
|
|
14
|
+
],
|
|
15
|
+
},
|
|
16
|
+
transaction: {
|
|
17
|
+
seeds: [
|
|
18
|
+
"smart_account",
|
|
19
|
+
"settingsPda:pubkey",
|
|
20
|
+
"transaction",
|
|
21
|
+
"transactionIndex:u64",
|
|
22
|
+
],
|
|
23
|
+
},
|
|
24
|
+
proposal: {
|
|
25
|
+
seeds: [
|
|
26
|
+
"smart_account",
|
|
27
|
+
"settingsPda:pubkey",
|
|
28
|
+
"transaction",
|
|
29
|
+
"transactionIndex:u64",
|
|
30
|
+
"proposal",
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
batchTransaction: {
|
|
34
|
+
seeds: [
|
|
35
|
+
"smart_account",
|
|
36
|
+
"settingsPda:pubkey",
|
|
37
|
+
"transaction",
|
|
38
|
+
"batchIndex:u64",
|
|
39
|
+
"batch_transaction",
|
|
40
|
+
"transactionIndex:u32",
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
ephemeralSigner: {
|
|
44
|
+
seeds: [
|
|
45
|
+
"smart_account",
|
|
46
|
+
"transactionPda:pubkey",
|
|
47
|
+
"ephemeral_signer",
|
|
48
|
+
"ephemeralSignerIndex:u8",
|
|
49
|
+
],
|
|
50
|
+
},
|
|
51
|
+
spendingLimit: {
|
|
52
|
+
seeds: [
|
|
53
|
+
"smart_account",
|
|
54
|
+
"settingsPda:pubkey",
|
|
55
|
+
"spending_limit",
|
|
56
|
+
"seed:pubkey",
|
|
57
|
+
],
|
|
58
|
+
},
|
|
59
|
+
transactionBuffer: {
|
|
60
|
+
seeds: [
|
|
61
|
+
"smart_account",
|
|
62
|
+
"consensusPda:pubkey",
|
|
63
|
+
"transaction_buffer",
|
|
64
|
+
"creator:pubkey",
|
|
65
|
+
"bufferIndex:u8",
|
|
66
|
+
],
|
|
67
|
+
},
|
|
68
|
+
policy: {
|
|
69
|
+
seeds: ["smart_account", "policy", "settingsPda:pubkey", "policySeed:u64"],
|
|
70
|
+
},
|
|
71
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./core/transport/index.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./core/transport/index.js";
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import * as beet from "@metaplex-foundation/beet";
|
|
2
|
+
import { PublicKey } from "@solana/web3.js";
|
|
3
|
+
import type { Permissions as IPermissions } from "./generated";
|
|
4
|
+
export { isProposalStatusActive, isProposalStatusApproved, isProposalStatusRejected, isProposalStatusCancelled, isProposalStatusExecuted, isSettingsActionAddSigner, isSettingsActionRemoveSigner, isSettingsActionChangeThreshold, isSettingsActionAddSpendingLimit, isSettingsActionRemoveSpendingLimit, isSettingsActionSetTimeLock, } from "./generated";
|
|
5
|
+
export type { Period, SettingsAction, SettingsActionRecord, SmartAccountSigner, } from "./generated";
|
|
6
|
+
export declare const Permission: {
|
|
7
|
+
readonly Initiate: 1;
|
|
8
|
+
readonly Vote: 2;
|
|
9
|
+
readonly Execute: 4;
|
|
10
|
+
};
|
|
11
|
+
export type Permission = typeof Permission[keyof typeof Permission];
|
|
12
|
+
export declare class Permissions implements IPermissions {
|
|
13
|
+
readonly mask: number;
|
|
14
|
+
private constructor();
|
|
15
|
+
static fromPermissions(permissions: Permission[]): Permissions;
|
|
16
|
+
static all(): Permissions;
|
|
17
|
+
static has(permissions: IPermissions, permission: Permission): boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* De/Serializes a small array with configurable length prefix and a specific number of elements of type {@link T}
|
|
21
|
+
* which do not all have the same size.
|
|
22
|
+
*
|
|
23
|
+
* @template T type of elements held in the array
|
|
24
|
+
*
|
|
25
|
+
* @param lengthBeet the De/Serializer for the array length prefix
|
|
26
|
+
* @param elements the De/Serializers for the element types
|
|
27
|
+
* @param elementsByteSize size of all elements in the array combined
|
|
28
|
+
*
|
|
29
|
+
* The implementation is minor modification of `fixedSizeArray` where the length is encoded as `lengthBeet.byteSize` bytes:
|
|
30
|
+
* https://github.dev/metaplex-foundation/beet/blob/e053b7b5b0c46ce7f6906ecd38be9fd85d6e5254/beet/src/beets/collections.ts#L84
|
|
31
|
+
*/
|
|
32
|
+
export declare function fixedSizeSmallArray<T, V = Partial<T>>(lengthBeet: beet.FixedSizeBeet<number>, elements: beet.FixedSizeBeet<T, V>[], elementsByteSize: number): beet.FixedSizeBeet<T[], V[]>;
|
|
33
|
+
/**
|
|
34
|
+
* Wraps a small array De/Serializer with configurable length prefix and elements of type {@link T}
|
|
35
|
+
* which do not all have the same size.
|
|
36
|
+
*
|
|
37
|
+
* @template T type of elements held in the array
|
|
38
|
+
*
|
|
39
|
+
* @param lengthBeet the De/Serializer for the array length prefix
|
|
40
|
+
* @param element the De/Serializer for the element types
|
|
41
|
+
*
|
|
42
|
+
* The implementation is minor modification of `array` where the length is encoded as `lengthBeet.byteSize` bytes:
|
|
43
|
+
* https://github.dev/metaplex-foundation/beet/blob/e053b7b5b0c46ce7f6906ecd38be9fd85d6e5254/beet/src/beets/collections.ts#L137
|
|
44
|
+
*/
|
|
45
|
+
export declare function smallArray<T, V = Partial<T>>(lengthBeet: beet.FixedSizeBeet<number>, element: beet.Beet<T, V>): beet.FixableBeet<T[], V[]>;
|
|
46
|
+
export type CompiledMsInstruction = {
|
|
47
|
+
programIdIndex: number;
|
|
48
|
+
accountIndexes: number[];
|
|
49
|
+
data: number[];
|
|
50
|
+
};
|
|
51
|
+
export declare const compiledMsInstructionBeet: beet.FixableBeetArgsStruct<CompiledMsInstruction>;
|
|
52
|
+
export type MessageAddressTableLookup = {
|
|
53
|
+
/** Address lookup table account key */
|
|
54
|
+
accountKey: PublicKey;
|
|
55
|
+
/** List of indexes used to load writable account addresses */
|
|
56
|
+
writableIndexes: number[];
|
|
57
|
+
/** List of indexes used to load readonly account addresses */
|
|
58
|
+
readonlyIndexes: number[];
|
|
59
|
+
};
|
|
60
|
+
export declare const messageAddressTableLookupBeet: beet.FixableBeetArgsStruct<MessageAddressTableLookup>;
|
|
61
|
+
export type TransactionMessage = {
|
|
62
|
+
numSigners: number;
|
|
63
|
+
numWritableSigners: number;
|
|
64
|
+
numWritableNonSigners: number;
|
|
65
|
+
accountKeys: PublicKey[];
|
|
66
|
+
instructions: CompiledMsInstruction[];
|
|
67
|
+
addressTableLookups: MessageAddressTableLookup[];
|
|
68
|
+
};
|
|
69
|
+
export declare const transactionMessageBeet: beet.FixableBeetArgsStruct<TransactionMessage>;
|