@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,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was GENERATED using the solita package.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality.
|
|
4
|
+
*
|
|
5
|
+
* See: https://github.com/metaplex-foundation/solita
|
|
6
|
+
*/
|
|
7
|
+
import * as web3 from '@solana/web3.js';
|
|
8
|
+
import * as beet from '@metaplex-foundation/beet';
|
|
9
|
+
import * as beetSolana from '@metaplex-foundation/beet-solana';
|
|
10
|
+
/**
|
|
11
|
+
* Arguments used to create {@link Batch}
|
|
12
|
+
* @category Accounts
|
|
13
|
+
* @category generated
|
|
14
|
+
*/
|
|
15
|
+
export type BatchArgs = {
|
|
16
|
+
settings: web3.PublicKey;
|
|
17
|
+
creator: web3.PublicKey;
|
|
18
|
+
rentCollector: web3.PublicKey;
|
|
19
|
+
index: beet.bignum;
|
|
20
|
+
bump: number;
|
|
21
|
+
accountIndex: number;
|
|
22
|
+
accountBump: number;
|
|
23
|
+
size: number;
|
|
24
|
+
executedTransactionIndex: number;
|
|
25
|
+
};
|
|
26
|
+
export declare const batchDiscriminator: number[];
|
|
27
|
+
/**
|
|
28
|
+
* Holds the data for the {@link Batch} Account and provides de/serialization
|
|
29
|
+
* functionality for that data
|
|
30
|
+
*
|
|
31
|
+
* @category Accounts
|
|
32
|
+
* @category generated
|
|
33
|
+
*/
|
|
34
|
+
export declare class Batch implements BatchArgs {
|
|
35
|
+
readonly settings: web3.PublicKey;
|
|
36
|
+
readonly creator: web3.PublicKey;
|
|
37
|
+
readonly rentCollector: web3.PublicKey;
|
|
38
|
+
readonly index: beet.bignum;
|
|
39
|
+
readonly bump: number;
|
|
40
|
+
readonly accountIndex: number;
|
|
41
|
+
readonly accountBump: number;
|
|
42
|
+
readonly size: number;
|
|
43
|
+
readonly executedTransactionIndex: number;
|
|
44
|
+
private constructor();
|
|
45
|
+
/**
|
|
46
|
+
* Creates a {@link Batch} instance from the provided args.
|
|
47
|
+
*/
|
|
48
|
+
static fromArgs(args: BatchArgs): Batch;
|
|
49
|
+
/**
|
|
50
|
+
* Deserializes the {@link Batch} from the data of the provided {@link web3.AccountInfo}.
|
|
51
|
+
* @returns a tuple of the account data and the offset up to which the buffer was read to obtain it.
|
|
52
|
+
*/
|
|
53
|
+
static fromAccountInfo(accountInfo: web3.AccountInfo<Buffer>, offset?: number): [Batch, number];
|
|
54
|
+
/**
|
|
55
|
+
* Retrieves the account info from the provided address and deserializes
|
|
56
|
+
* the {@link Batch} from its data.
|
|
57
|
+
*
|
|
58
|
+
* @throws Error if no account info is found at the address or if deserialization fails
|
|
59
|
+
*/
|
|
60
|
+
static fromAccountAddress(connection: web3.Connection, address: web3.PublicKey, commitmentOrConfig?: web3.Commitment | web3.GetAccountInfoConfig): Promise<Batch>;
|
|
61
|
+
/**
|
|
62
|
+
* Provides a {@link web3.Connection.getProgramAccounts} config builder,
|
|
63
|
+
* to fetch accounts matching filters that can be specified via that builder.
|
|
64
|
+
*
|
|
65
|
+
* @param programId - the program that owns the accounts we are filtering
|
|
66
|
+
*/
|
|
67
|
+
static gpaBuilder(programId?: web3.PublicKey): beetSolana.GpaBuilder<{
|
|
68
|
+
accountDiscriminator: any;
|
|
69
|
+
settings: any;
|
|
70
|
+
creator: any;
|
|
71
|
+
rentCollector: any;
|
|
72
|
+
index: any;
|
|
73
|
+
bump: any;
|
|
74
|
+
accountIndex: any;
|
|
75
|
+
accountBump: any;
|
|
76
|
+
size: any;
|
|
77
|
+
executedTransactionIndex: any;
|
|
78
|
+
}>;
|
|
79
|
+
/**
|
|
80
|
+
* Deserializes the {@link Batch} from the provided data Buffer.
|
|
81
|
+
* @returns a tuple of the account data and the offset up to which the buffer was read to obtain it.
|
|
82
|
+
*/
|
|
83
|
+
static deserialize(buf: Buffer, offset?: number): [Batch, number];
|
|
84
|
+
/**
|
|
85
|
+
* Serializes the {@link Batch} into a Buffer.
|
|
86
|
+
* @returns a tuple of the created Buffer and the offset up to which the buffer was written to store it.
|
|
87
|
+
*/
|
|
88
|
+
serialize(): [Buffer, number];
|
|
89
|
+
/**
|
|
90
|
+
* Returns the byteSize of a {@link Buffer} holding the serialized data of
|
|
91
|
+
* {@link Batch}
|
|
92
|
+
*/
|
|
93
|
+
static get byteSize(): number;
|
|
94
|
+
/**
|
|
95
|
+
* Fetches the minimum balance needed to exempt an account holding
|
|
96
|
+
* {@link Batch} data from rent
|
|
97
|
+
*
|
|
98
|
+
* @param connection used to retrieve the rent exemption information
|
|
99
|
+
*/
|
|
100
|
+
static getMinimumBalanceForRentExemption(connection: web3.Connection, commitment?: web3.Commitment): Promise<number>;
|
|
101
|
+
/**
|
|
102
|
+
* Determines if the provided {@link Buffer} has the correct byte size to
|
|
103
|
+
* hold {@link Batch} data.
|
|
104
|
+
*/
|
|
105
|
+
static hasCorrectByteSize(buf: Buffer, offset?: number): boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Returns a readable version of {@link Batch} properties
|
|
108
|
+
* and can be used to convert to JSON and/or logging
|
|
109
|
+
*/
|
|
110
|
+
pretty(): {
|
|
111
|
+
settings: string;
|
|
112
|
+
creator: string;
|
|
113
|
+
rentCollector: string;
|
|
114
|
+
index: number | {
|
|
115
|
+
toNumber: () => number;
|
|
116
|
+
};
|
|
117
|
+
bump: number;
|
|
118
|
+
accountIndex: number;
|
|
119
|
+
accountBump: number;
|
|
120
|
+
size: number;
|
|
121
|
+
executedTransactionIndex: number;
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* @category Accounts
|
|
126
|
+
* @category generated
|
|
127
|
+
*/
|
|
128
|
+
export declare const batchBeet: beet.BeetStruct<Batch, BatchArgs & {
|
|
129
|
+
accountDiscriminator: number[];
|
|
130
|
+
}>;
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was GENERATED using the solita package.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality.
|
|
4
|
+
*
|
|
5
|
+
* See: https://github.com/metaplex-foundation/solita
|
|
6
|
+
*/
|
|
7
|
+
import * as web3 from '@solana/web3.js';
|
|
8
|
+
import * as beet from '@metaplex-foundation/beet';
|
|
9
|
+
import * as beetSolana from '@metaplex-foundation/beet-solana';
|
|
10
|
+
export const batchDiscriminator = [156, 194, 70, 44, 22, 88, 137, 44];
|
|
11
|
+
/**
|
|
12
|
+
* Holds the data for the {@link Batch} Account and provides de/serialization
|
|
13
|
+
* functionality for that data
|
|
14
|
+
*
|
|
15
|
+
* @category Accounts
|
|
16
|
+
* @category generated
|
|
17
|
+
*/
|
|
18
|
+
export class Batch {
|
|
19
|
+
settings;
|
|
20
|
+
creator;
|
|
21
|
+
rentCollector;
|
|
22
|
+
index;
|
|
23
|
+
bump;
|
|
24
|
+
accountIndex;
|
|
25
|
+
accountBump;
|
|
26
|
+
size;
|
|
27
|
+
executedTransactionIndex;
|
|
28
|
+
constructor(settings, creator, rentCollector, index, bump, accountIndex, accountBump, size, executedTransactionIndex) {
|
|
29
|
+
this.settings = settings;
|
|
30
|
+
this.creator = creator;
|
|
31
|
+
this.rentCollector = rentCollector;
|
|
32
|
+
this.index = index;
|
|
33
|
+
this.bump = bump;
|
|
34
|
+
this.accountIndex = accountIndex;
|
|
35
|
+
this.accountBump = accountBump;
|
|
36
|
+
this.size = size;
|
|
37
|
+
this.executedTransactionIndex = executedTransactionIndex;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Creates a {@link Batch} instance from the provided args.
|
|
41
|
+
*/
|
|
42
|
+
static fromArgs(args) {
|
|
43
|
+
return new Batch(args.settings, args.creator, args.rentCollector, args.index, args.bump, args.accountIndex, args.accountBump, args.size, args.executedTransactionIndex);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Deserializes the {@link Batch} from the data of the provided {@link web3.AccountInfo}.
|
|
47
|
+
* @returns a tuple of the account data and the offset up to which the buffer was read to obtain it.
|
|
48
|
+
*/
|
|
49
|
+
static fromAccountInfo(accountInfo, offset = 0) {
|
|
50
|
+
return Batch.deserialize(accountInfo.data, offset);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Retrieves the account info from the provided address and deserializes
|
|
54
|
+
* the {@link Batch} from its data.
|
|
55
|
+
*
|
|
56
|
+
* @throws Error if no account info is found at the address or if deserialization fails
|
|
57
|
+
*/
|
|
58
|
+
static async fromAccountAddress(connection, address, commitmentOrConfig) {
|
|
59
|
+
const accountInfo = await connection.getAccountInfo(address, commitmentOrConfig);
|
|
60
|
+
if (accountInfo == null) {
|
|
61
|
+
throw new Error(`Unable to find Batch account at ${address}`);
|
|
62
|
+
}
|
|
63
|
+
return Batch.fromAccountInfo(accountInfo, 0)[0];
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Provides a {@link web3.Connection.getProgramAccounts} config builder,
|
|
67
|
+
* to fetch accounts matching filters that can be specified via that builder.
|
|
68
|
+
*
|
|
69
|
+
* @param programId - the program that owns the accounts we are filtering
|
|
70
|
+
*/
|
|
71
|
+
static gpaBuilder(programId = new web3.PublicKey('SMRTzfY6DfH5ik3TKiyLFfXexV8uSG3d2UksSCYdunG')) {
|
|
72
|
+
return beetSolana.GpaBuilder.fromStruct(programId, batchBeet);
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Deserializes the {@link Batch} from the provided data Buffer.
|
|
76
|
+
* @returns a tuple of the account data and the offset up to which the buffer was read to obtain it.
|
|
77
|
+
*/
|
|
78
|
+
static deserialize(buf, offset = 0) {
|
|
79
|
+
return batchBeet.deserialize(buf, offset);
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Serializes the {@link Batch} into a Buffer.
|
|
83
|
+
* @returns a tuple of the created Buffer and the offset up to which the buffer was written to store it.
|
|
84
|
+
*/
|
|
85
|
+
serialize() {
|
|
86
|
+
return batchBeet.serialize({
|
|
87
|
+
accountDiscriminator: batchDiscriminator,
|
|
88
|
+
...this,
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Returns the byteSize of a {@link Buffer} holding the serialized data of
|
|
93
|
+
* {@link Batch}
|
|
94
|
+
*/
|
|
95
|
+
static get byteSize() {
|
|
96
|
+
return batchBeet.byteSize;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Fetches the minimum balance needed to exempt an account holding
|
|
100
|
+
* {@link Batch} data from rent
|
|
101
|
+
*
|
|
102
|
+
* @param connection used to retrieve the rent exemption information
|
|
103
|
+
*/
|
|
104
|
+
static async getMinimumBalanceForRentExemption(connection, commitment) {
|
|
105
|
+
return connection.getMinimumBalanceForRentExemption(Batch.byteSize, commitment);
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Determines if the provided {@link Buffer} has the correct byte size to
|
|
109
|
+
* hold {@link Batch} data.
|
|
110
|
+
*/
|
|
111
|
+
static hasCorrectByteSize(buf, offset = 0) {
|
|
112
|
+
return buf.byteLength - offset === Batch.byteSize;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Returns a readable version of {@link Batch} properties
|
|
116
|
+
* and can be used to convert to JSON and/or logging
|
|
117
|
+
*/
|
|
118
|
+
pretty() {
|
|
119
|
+
return {
|
|
120
|
+
settings: this.settings.toBase58(),
|
|
121
|
+
creator: this.creator.toBase58(),
|
|
122
|
+
rentCollector: this.rentCollector.toBase58(),
|
|
123
|
+
index: (() => {
|
|
124
|
+
const x = this.index;
|
|
125
|
+
if (typeof x.toNumber === 'function') {
|
|
126
|
+
try {
|
|
127
|
+
return x.toNumber();
|
|
128
|
+
}
|
|
129
|
+
catch (_) {
|
|
130
|
+
return x;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
return x;
|
|
134
|
+
})(),
|
|
135
|
+
bump: this.bump,
|
|
136
|
+
accountIndex: this.accountIndex,
|
|
137
|
+
accountBump: this.accountBump,
|
|
138
|
+
size: this.size,
|
|
139
|
+
executedTransactionIndex: this.executedTransactionIndex,
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* @category Accounts
|
|
145
|
+
* @category generated
|
|
146
|
+
*/
|
|
147
|
+
export const batchBeet = new beet.BeetStruct([
|
|
148
|
+
['accountDiscriminator', beet.uniformFixedSizeArray(beet.u8, 8)],
|
|
149
|
+
['settings', beetSolana.publicKey],
|
|
150
|
+
['creator', beetSolana.publicKey],
|
|
151
|
+
['rentCollector', beetSolana.publicKey],
|
|
152
|
+
['index', beet.u64],
|
|
153
|
+
['bump', beet.u8],
|
|
154
|
+
['accountIndex', beet.u8],
|
|
155
|
+
['accountBump', beet.u8],
|
|
156
|
+
['size', beet.u32],
|
|
157
|
+
['executedTransactionIndex', beet.u32],
|
|
158
|
+
], Batch.fromArgs, 'Batch');
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was GENERATED using the solita package.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality.
|
|
4
|
+
*
|
|
5
|
+
* See: https://github.com/metaplex-foundation/solita
|
|
6
|
+
*/
|
|
7
|
+
import * as web3 from '@solana/web3.js';
|
|
8
|
+
import * as beet from '@metaplex-foundation/beet';
|
|
9
|
+
import * as beetSolana from '@metaplex-foundation/beet-solana';
|
|
10
|
+
import { SmartAccountTransactionMessage } from '../types/SmartAccountTransactionMessage';
|
|
11
|
+
/**
|
|
12
|
+
* Arguments used to create {@link BatchTransaction}
|
|
13
|
+
* @category Accounts
|
|
14
|
+
* @category generated
|
|
15
|
+
*/
|
|
16
|
+
export type BatchTransactionArgs = {
|
|
17
|
+
bump: number;
|
|
18
|
+
rentCollector: web3.PublicKey;
|
|
19
|
+
ephemeralSignerBumps: Uint8Array;
|
|
20
|
+
message: SmartAccountTransactionMessage;
|
|
21
|
+
};
|
|
22
|
+
export declare const batchTransactionDiscriminator: number[];
|
|
23
|
+
/**
|
|
24
|
+
* Holds the data for the {@link BatchTransaction} Account and provides de/serialization
|
|
25
|
+
* functionality for that data
|
|
26
|
+
*
|
|
27
|
+
* @category Accounts
|
|
28
|
+
* @category generated
|
|
29
|
+
*/
|
|
30
|
+
export declare class BatchTransaction implements BatchTransactionArgs {
|
|
31
|
+
readonly bump: number;
|
|
32
|
+
readonly rentCollector: web3.PublicKey;
|
|
33
|
+
readonly ephemeralSignerBumps: Uint8Array;
|
|
34
|
+
readonly message: SmartAccountTransactionMessage;
|
|
35
|
+
private constructor();
|
|
36
|
+
/**
|
|
37
|
+
* Creates a {@link BatchTransaction} instance from the provided args.
|
|
38
|
+
*/
|
|
39
|
+
static fromArgs(args: BatchTransactionArgs): BatchTransaction;
|
|
40
|
+
/**
|
|
41
|
+
* Deserializes the {@link BatchTransaction} from the data of the provided {@link web3.AccountInfo}.
|
|
42
|
+
* @returns a tuple of the account data and the offset up to which the buffer was read to obtain it.
|
|
43
|
+
*/
|
|
44
|
+
static fromAccountInfo(accountInfo: web3.AccountInfo<Buffer>, offset?: number): [BatchTransaction, number];
|
|
45
|
+
/**
|
|
46
|
+
* Retrieves the account info from the provided address and deserializes
|
|
47
|
+
* the {@link BatchTransaction} from its data.
|
|
48
|
+
*
|
|
49
|
+
* @throws Error if no account info is found at the address or if deserialization fails
|
|
50
|
+
*/
|
|
51
|
+
static fromAccountAddress(connection: web3.Connection, address: web3.PublicKey, commitmentOrConfig?: web3.Commitment | web3.GetAccountInfoConfig): Promise<BatchTransaction>;
|
|
52
|
+
/**
|
|
53
|
+
* Provides a {@link web3.Connection.getProgramAccounts} config builder,
|
|
54
|
+
* to fetch accounts matching filters that can be specified via that builder.
|
|
55
|
+
*
|
|
56
|
+
* @param programId - the program that owns the accounts we are filtering
|
|
57
|
+
*/
|
|
58
|
+
static gpaBuilder(programId?: web3.PublicKey): beetSolana.GpaBuilder<BatchTransactionArgs & {
|
|
59
|
+
accountDiscriminator: number[];
|
|
60
|
+
}>;
|
|
61
|
+
/**
|
|
62
|
+
* Deserializes the {@link BatchTransaction} from the provided data Buffer.
|
|
63
|
+
* @returns a tuple of the account data and the offset up to which the buffer was read to obtain it.
|
|
64
|
+
*/
|
|
65
|
+
static deserialize(buf: Buffer, offset?: number): [BatchTransaction, number];
|
|
66
|
+
/**
|
|
67
|
+
* Serializes the {@link BatchTransaction} into a Buffer.
|
|
68
|
+
* @returns a tuple of the created Buffer and the offset up to which the buffer was written to store it.
|
|
69
|
+
*/
|
|
70
|
+
serialize(): [Buffer, number];
|
|
71
|
+
/**
|
|
72
|
+
* Returns the byteSize of a {@link Buffer} holding the serialized data of
|
|
73
|
+
* {@link BatchTransaction} for the provided args.
|
|
74
|
+
*
|
|
75
|
+
* @param args need to be provided since the byte size for this account
|
|
76
|
+
* depends on them
|
|
77
|
+
*/
|
|
78
|
+
static byteSize(args: BatchTransactionArgs): number;
|
|
79
|
+
/**
|
|
80
|
+
* Fetches the minimum balance needed to exempt an account holding
|
|
81
|
+
* {@link BatchTransaction} data from rent
|
|
82
|
+
*
|
|
83
|
+
* @param args need to be provided since the byte size for this account
|
|
84
|
+
* depends on them
|
|
85
|
+
* @param connection used to retrieve the rent exemption information
|
|
86
|
+
*/
|
|
87
|
+
static getMinimumBalanceForRentExemption(args: BatchTransactionArgs, connection: web3.Connection, commitment?: web3.Commitment): Promise<number>;
|
|
88
|
+
/**
|
|
89
|
+
* Returns a readable version of {@link BatchTransaction} properties
|
|
90
|
+
* and can be used to convert to JSON and/or logging
|
|
91
|
+
*/
|
|
92
|
+
pretty(): {
|
|
93
|
+
bump: number;
|
|
94
|
+
rentCollector: string;
|
|
95
|
+
ephemeralSignerBumps: Uint8Array<ArrayBufferLike>;
|
|
96
|
+
message: SmartAccountTransactionMessage;
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* @category Accounts
|
|
101
|
+
* @category generated
|
|
102
|
+
*/
|
|
103
|
+
export declare const batchTransactionBeet: beet.FixableBeetStruct<BatchTransaction, BatchTransactionArgs & {
|
|
104
|
+
accountDiscriminator: number[];
|
|
105
|
+
}>;
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was GENERATED using the solita package.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality.
|
|
4
|
+
*
|
|
5
|
+
* See: https://github.com/metaplex-foundation/solita
|
|
6
|
+
*/
|
|
7
|
+
import * as web3 from '@solana/web3.js';
|
|
8
|
+
import * as beet from '@metaplex-foundation/beet';
|
|
9
|
+
import * as beetSolana from '@metaplex-foundation/beet-solana';
|
|
10
|
+
import { smartAccountTransactionMessageBeet, } from '../types/SmartAccountTransactionMessage';
|
|
11
|
+
export const batchTransactionDiscriminator = [92, 20, 61, 146, 155, 62, 112, 72];
|
|
12
|
+
/**
|
|
13
|
+
* Holds the data for the {@link BatchTransaction} Account and provides de/serialization
|
|
14
|
+
* functionality for that data
|
|
15
|
+
*
|
|
16
|
+
* @category Accounts
|
|
17
|
+
* @category generated
|
|
18
|
+
*/
|
|
19
|
+
export class BatchTransaction {
|
|
20
|
+
bump;
|
|
21
|
+
rentCollector;
|
|
22
|
+
ephemeralSignerBumps;
|
|
23
|
+
message;
|
|
24
|
+
constructor(bump, rentCollector, ephemeralSignerBumps, message) {
|
|
25
|
+
this.bump = bump;
|
|
26
|
+
this.rentCollector = rentCollector;
|
|
27
|
+
this.ephemeralSignerBumps = ephemeralSignerBumps;
|
|
28
|
+
this.message = message;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Creates a {@link BatchTransaction} instance from the provided args.
|
|
32
|
+
*/
|
|
33
|
+
static fromArgs(args) {
|
|
34
|
+
return new BatchTransaction(args.bump, args.rentCollector, args.ephemeralSignerBumps, args.message);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Deserializes the {@link BatchTransaction} from the data of the provided {@link web3.AccountInfo}.
|
|
38
|
+
* @returns a tuple of the account data and the offset up to which the buffer was read to obtain it.
|
|
39
|
+
*/
|
|
40
|
+
static fromAccountInfo(accountInfo, offset = 0) {
|
|
41
|
+
return BatchTransaction.deserialize(accountInfo.data, offset);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Retrieves the account info from the provided address and deserializes
|
|
45
|
+
* the {@link BatchTransaction} from its data.
|
|
46
|
+
*
|
|
47
|
+
* @throws Error if no account info is found at the address or if deserialization fails
|
|
48
|
+
*/
|
|
49
|
+
static async fromAccountAddress(connection, address, commitmentOrConfig) {
|
|
50
|
+
const accountInfo = await connection.getAccountInfo(address, commitmentOrConfig);
|
|
51
|
+
if (accountInfo == null) {
|
|
52
|
+
throw new Error(`Unable to find BatchTransaction account at ${address}`);
|
|
53
|
+
}
|
|
54
|
+
return BatchTransaction.fromAccountInfo(accountInfo, 0)[0];
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Provides a {@link web3.Connection.getProgramAccounts} config builder,
|
|
58
|
+
* to fetch accounts matching filters that can be specified via that builder.
|
|
59
|
+
*
|
|
60
|
+
* @param programId - the program that owns the accounts we are filtering
|
|
61
|
+
*/
|
|
62
|
+
static gpaBuilder(programId = new web3.PublicKey('SMRTzfY6DfH5ik3TKiyLFfXexV8uSG3d2UksSCYdunG')) {
|
|
63
|
+
return beetSolana.GpaBuilder.fromStruct(programId, batchTransactionBeet);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Deserializes the {@link BatchTransaction} from the provided data Buffer.
|
|
67
|
+
* @returns a tuple of the account data and the offset up to which the buffer was read to obtain it.
|
|
68
|
+
*/
|
|
69
|
+
static deserialize(buf, offset = 0) {
|
|
70
|
+
return batchTransactionBeet.deserialize(buf, offset);
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Serializes the {@link BatchTransaction} into a Buffer.
|
|
74
|
+
* @returns a tuple of the created Buffer and the offset up to which the buffer was written to store it.
|
|
75
|
+
*/
|
|
76
|
+
serialize() {
|
|
77
|
+
return batchTransactionBeet.serialize({
|
|
78
|
+
accountDiscriminator: batchTransactionDiscriminator,
|
|
79
|
+
...this,
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Returns the byteSize of a {@link Buffer} holding the serialized data of
|
|
84
|
+
* {@link BatchTransaction} for the provided args.
|
|
85
|
+
*
|
|
86
|
+
* @param args need to be provided since the byte size for this account
|
|
87
|
+
* depends on them
|
|
88
|
+
*/
|
|
89
|
+
static byteSize(args) {
|
|
90
|
+
const instance = BatchTransaction.fromArgs(args);
|
|
91
|
+
return batchTransactionBeet.toFixedFromValue({
|
|
92
|
+
accountDiscriminator: batchTransactionDiscriminator,
|
|
93
|
+
...instance,
|
|
94
|
+
}).byteSize;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Fetches the minimum balance needed to exempt an account holding
|
|
98
|
+
* {@link BatchTransaction} data from rent
|
|
99
|
+
*
|
|
100
|
+
* @param args need to be provided since the byte size for this account
|
|
101
|
+
* depends on them
|
|
102
|
+
* @param connection used to retrieve the rent exemption information
|
|
103
|
+
*/
|
|
104
|
+
static async getMinimumBalanceForRentExemption(args, connection, commitment) {
|
|
105
|
+
return connection.getMinimumBalanceForRentExemption(BatchTransaction.byteSize(args), commitment);
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Returns a readable version of {@link BatchTransaction} properties
|
|
109
|
+
* and can be used to convert to JSON and/or logging
|
|
110
|
+
*/
|
|
111
|
+
pretty() {
|
|
112
|
+
return {
|
|
113
|
+
bump: this.bump,
|
|
114
|
+
rentCollector: this.rentCollector.toBase58(),
|
|
115
|
+
ephemeralSignerBumps: this.ephemeralSignerBumps,
|
|
116
|
+
message: this.message,
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* @category Accounts
|
|
122
|
+
* @category generated
|
|
123
|
+
*/
|
|
124
|
+
export const batchTransactionBeet = new beet.FixableBeetStruct([
|
|
125
|
+
['accountDiscriminator', beet.uniformFixedSizeArray(beet.u8, 8)],
|
|
126
|
+
['bump', beet.u8],
|
|
127
|
+
['rentCollector', beetSolana.publicKey],
|
|
128
|
+
['ephemeralSignerBumps', beet.bytes],
|
|
129
|
+
['message', smartAccountTransactionMessageBeet],
|
|
130
|
+
], BatchTransaction.fromArgs, 'BatchTransaction');
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was GENERATED using the solita package.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality.
|
|
4
|
+
*
|
|
5
|
+
* See: https://github.com/metaplex-foundation/solita
|
|
6
|
+
*/
|
|
7
|
+
import * as web3 from '@solana/web3.js';
|
|
8
|
+
import * as beet from '@metaplex-foundation/beet';
|
|
9
|
+
import * as beetSolana from '@metaplex-foundation/beet-solana';
|
|
10
|
+
import { SmartAccountTransactionMessage } from '../types/SmartAccountTransactionMessage';
|
|
11
|
+
/**
|
|
12
|
+
* Arguments used to create {@link LegacyTransaction}
|
|
13
|
+
* @category Accounts
|
|
14
|
+
* @category generated
|
|
15
|
+
*/
|
|
16
|
+
export type LegacyTransactionArgs = {
|
|
17
|
+
smartAccountSettings: web3.PublicKey;
|
|
18
|
+
creator: web3.PublicKey;
|
|
19
|
+
rentCollector: web3.PublicKey;
|
|
20
|
+
index: beet.bignum;
|
|
21
|
+
bump: number;
|
|
22
|
+
accountIndex: number;
|
|
23
|
+
accountBump: number;
|
|
24
|
+
ephemeralSignerBumps: Uint8Array;
|
|
25
|
+
message: SmartAccountTransactionMessage;
|
|
26
|
+
};
|
|
27
|
+
export declare const legacyTransactionDiscriminator: number[];
|
|
28
|
+
/**
|
|
29
|
+
* Holds the data for the {@link LegacyTransaction} Account and provides de/serialization
|
|
30
|
+
* functionality for that data
|
|
31
|
+
*
|
|
32
|
+
* @category Accounts
|
|
33
|
+
* @category generated
|
|
34
|
+
*/
|
|
35
|
+
export declare class LegacyTransaction implements LegacyTransactionArgs {
|
|
36
|
+
readonly smartAccountSettings: web3.PublicKey;
|
|
37
|
+
readonly creator: web3.PublicKey;
|
|
38
|
+
readonly rentCollector: web3.PublicKey;
|
|
39
|
+
readonly index: beet.bignum;
|
|
40
|
+
readonly bump: number;
|
|
41
|
+
readonly accountIndex: number;
|
|
42
|
+
readonly accountBump: number;
|
|
43
|
+
readonly ephemeralSignerBumps: Uint8Array;
|
|
44
|
+
readonly message: SmartAccountTransactionMessage;
|
|
45
|
+
private constructor();
|
|
46
|
+
/**
|
|
47
|
+
* Creates a {@link LegacyTransaction} instance from the provided args.
|
|
48
|
+
*/
|
|
49
|
+
static fromArgs(args: LegacyTransactionArgs): LegacyTransaction;
|
|
50
|
+
/**
|
|
51
|
+
* Deserializes the {@link LegacyTransaction} from the data of the provided {@link web3.AccountInfo}.
|
|
52
|
+
* @returns a tuple of the account data and the offset up to which the buffer was read to obtain it.
|
|
53
|
+
*/
|
|
54
|
+
static fromAccountInfo(accountInfo: web3.AccountInfo<Buffer>, offset?: number): [LegacyTransaction, number];
|
|
55
|
+
/**
|
|
56
|
+
* Retrieves the account info from the provided address and deserializes
|
|
57
|
+
* the {@link LegacyTransaction} from its data.
|
|
58
|
+
*
|
|
59
|
+
* @throws Error if no account info is found at the address or if deserialization fails
|
|
60
|
+
*/
|
|
61
|
+
static fromAccountAddress(connection: web3.Connection, address: web3.PublicKey, commitmentOrConfig?: web3.Commitment | web3.GetAccountInfoConfig): Promise<LegacyTransaction>;
|
|
62
|
+
/**
|
|
63
|
+
* Provides a {@link web3.Connection.getProgramAccounts} config builder,
|
|
64
|
+
* to fetch accounts matching filters that can be specified via that builder.
|
|
65
|
+
*
|
|
66
|
+
* @param programId - the program that owns the accounts we are filtering
|
|
67
|
+
*/
|
|
68
|
+
static gpaBuilder(programId?: web3.PublicKey): beetSolana.GpaBuilder<LegacyTransactionArgs & {
|
|
69
|
+
accountDiscriminator: number[];
|
|
70
|
+
}>;
|
|
71
|
+
/**
|
|
72
|
+
* Deserializes the {@link LegacyTransaction} from the provided data Buffer.
|
|
73
|
+
* @returns a tuple of the account data and the offset up to which the buffer was read to obtain it.
|
|
74
|
+
*/
|
|
75
|
+
static deserialize(buf: Buffer, offset?: number): [LegacyTransaction, number];
|
|
76
|
+
/**
|
|
77
|
+
* Serializes the {@link LegacyTransaction} into a Buffer.
|
|
78
|
+
* @returns a tuple of the created Buffer and the offset up to which the buffer was written to store it.
|
|
79
|
+
*/
|
|
80
|
+
serialize(): [Buffer, number];
|
|
81
|
+
/**
|
|
82
|
+
* Returns the byteSize of a {@link Buffer} holding the serialized data of
|
|
83
|
+
* {@link LegacyTransaction} for the provided args.
|
|
84
|
+
*
|
|
85
|
+
* @param args need to be provided since the byte size for this account
|
|
86
|
+
* depends on them
|
|
87
|
+
*/
|
|
88
|
+
static byteSize(args: LegacyTransactionArgs): number;
|
|
89
|
+
/**
|
|
90
|
+
* Fetches the minimum balance needed to exempt an account holding
|
|
91
|
+
* {@link LegacyTransaction} data from rent
|
|
92
|
+
*
|
|
93
|
+
* @param args need to be provided since the byte size for this account
|
|
94
|
+
* depends on them
|
|
95
|
+
* @param connection used to retrieve the rent exemption information
|
|
96
|
+
*/
|
|
97
|
+
static getMinimumBalanceForRentExemption(args: LegacyTransactionArgs, connection: web3.Connection, commitment?: web3.Commitment): Promise<number>;
|
|
98
|
+
/**
|
|
99
|
+
* Returns a readable version of {@link LegacyTransaction} properties
|
|
100
|
+
* and can be used to convert to JSON and/or logging
|
|
101
|
+
*/
|
|
102
|
+
pretty(): {
|
|
103
|
+
smartAccountSettings: string;
|
|
104
|
+
creator: string;
|
|
105
|
+
rentCollector: string;
|
|
106
|
+
index: number | {
|
|
107
|
+
toNumber: () => number;
|
|
108
|
+
};
|
|
109
|
+
bump: number;
|
|
110
|
+
accountIndex: number;
|
|
111
|
+
accountBump: number;
|
|
112
|
+
ephemeralSignerBumps: Uint8Array<ArrayBufferLike>;
|
|
113
|
+
message: SmartAccountTransactionMessage;
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* @category Accounts
|
|
118
|
+
* @category generated
|
|
119
|
+
*/
|
|
120
|
+
export declare const legacyTransactionBeet: beet.FixableBeetStruct<LegacyTransaction, LegacyTransactionArgs & {
|
|
121
|
+
accountDiscriminator: number[];
|
|
122
|
+
}>;
|