@virtuals-protocol/acp-node-v2 0.1.2 → 0.1.4
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/README.md +9 -20
- package/dist/acpAgent.d.ts +2 -2
- package/dist/acpAgent.d.ts.map +1 -1
- package/dist/acpAgent.js +6 -6
- package/dist/acpAgent.js.map +1 -1
- package/dist/clientFactory.d.ts +1 -2
- package/dist/clientFactory.d.ts.map +1 -1
- package/dist/clientFactory.js +1 -5
- package/dist/clientFactory.js.map +1 -1
- package/dist/core/agentAuth.d.ts +22 -0
- package/dist/core/agentAuth.d.ts.map +1 -0
- package/dist/core/agentAuth.js +27 -0
- package/dist/core/agentAuth.js.map +1 -0
- package/dist/core/approvalGate.d.ts +28 -0
- package/dist/core/approvalGate.d.ts.map +1 -0
- package/dist/core/approvalGate.js +63 -0
- package/dist/core/approvalGate.js.map +1 -0
- package/dist/core/chains.d.ts +1 -0
- package/dist/core/chains.d.ts.map +1 -1
- package/dist/core/chains.js +12 -1
- package/dist/core/chains.js.map +1 -1
- package/dist/core/constants.d.ts +6 -0
- package/dist/core/constants.d.ts.map +1 -1
- package/dist/core/constants.js +18 -0
- package/dist/core/constants.js.map +1 -1
- package/dist/core/solana/constants.d.ts +5 -0
- package/dist/core/solana/constants.d.ts.map +1 -0
- package/dist/core/solana/constants.js +5 -0
- package/dist/core/solana/constants.js.map +1 -0
- package/dist/core/solana/generated/acp/accounts/acpState.d.ts +60 -0
- package/dist/core/solana/generated/acp/accounts/acpState.d.ts.map +1 -0
- package/dist/core/solana/generated/acp/accounts/acpState.js +68 -0
- package/dist/core/solana/generated/acp/accounts/acpState.js.map +1 -0
- package/dist/core/solana/generated/acp/accounts/hookWhitelist.d.ts +37 -0
- package/dist/core/solana/generated/acp/accounts/hookWhitelist.d.ts.map +1 -0
- package/dist/core/solana/generated/acp/accounts/hookWhitelist.js +59 -0
- package/dist/core/solana/generated/acp/accounts/hookWhitelist.js.map +1 -0
- package/dist/core/solana/generated/acp/accounts/index.d.ts +11 -0
- package/dist/core/solana/generated/acp/accounts/index.d.ts.map +1 -0
- package/dist/core/solana/generated/acp/accounts/index.js +11 -0
- package/dist/core/solana/generated/acp/accounts/index.js.map +1 -0
- package/dist/core/solana/generated/acp/accounts/job.d.ts +89 -0
- package/dist/core/solana/generated/acp/accounts/job.d.ts.map +1 -0
- package/dist/core/solana/generated/acp/accounts/job.js +83 -0
- package/dist/core/solana/generated/acp/accounts/job.js.map +1 -0
- package/dist/core/solana/generated/acp/errors/agenticCommerceV3.d.ts +94 -0
- package/dist/core/solana/generated/acp/errors/agenticCommerceV3.d.ts.map +1 -0
- package/dist/core/solana/generated/acp/errors/agenticCommerceV3.js +135 -0
- package/dist/core/solana/generated/acp/errors/agenticCommerceV3.js.map +1 -0
- package/dist/core/solana/generated/acp/errors/index.d.ts +9 -0
- package/dist/core/solana/generated/acp/errors/index.d.ts.map +1 -0
- package/dist/core/solana/generated/acp/errors/index.js +9 -0
- package/dist/core/solana/generated/acp/errors/index.js.map +1 -0
- package/dist/core/solana/generated/acp/index.d.ts +14 -0
- package/dist/core/solana/generated/acp/index.d.ts.map +1 -0
- package/dist/core/solana/generated/acp/index.js +14 -0
- package/dist/core/solana/generated/acp/index.js.map +1 -0
- package/dist/core/solana/generated/acp/instructions/acceptAuthority.d.ts +47 -0
- package/dist/core/solana/generated/acp/instructions/acceptAuthority.d.ts.map +1 -0
- package/dist/core/solana/generated/acp/instructions/acceptAuthority.js +88 -0
- package/dist/core/solana/generated/acp/instructions/acceptAuthority.js.map +1 -0
- package/dist/core/solana/generated/acp/instructions/addHookWhitelist.d.ts +64 -0
- package/dist/core/solana/generated/acp/instructions/addHookWhitelist.d.ts.map +1 -0
- package/dist/core/solana/generated/acp/instructions/addHookWhitelist.js +140 -0
- package/dist/core/solana/generated/acp/instructions/addHookWhitelist.js.map +1 -0
- package/dist/core/solana/generated/acp/instructions/claimRefund.d.ts +74 -0
- package/dist/core/solana/generated/acp/instructions/claimRefund.d.ts.map +1 -0
- package/dist/core/solana/generated/acp/instructions/claimRefund.js +142 -0
- package/dist/core/solana/generated/acp/instructions/claimRefund.js.map +1 -0
- package/dist/core/solana/generated/acp/instructions/complete.d.ts +108 -0
- package/dist/core/solana/generated/acp/instructions/complete.d.ts.map +1 -0
- package/dist/core/solana/generated/acp/instructions/complete.js +190 -0
- package/dist/core/solana/generated/acp/instructions/complete.js.map +1 -0
- package/dist/core/solana/generated/acp/instructions/createJob.d.ts +83 -0
- package/dist/core/solana/generated/acp/instructions/createJob.d.ts.map +1 -0
- package/dist/core/solana/generated/acp/instructions/createJob.js +137 -0
- package/dist/core/solana/generated/acp/instructions/createJob.js.map +1 -0
- package/dist/core/solana/generated/acp/instructions/fund.d.ts +99 -0
- package/dist/core/solana/generated/acp/instructions/fund.d.ts.map +1 -0
- package/dist/core/solana/generated/acp/instructions/fund.js +126 -0
- package/dist/core/solana/generated/acp/instructions/fund.js.map +1 -0
- package/dist/core/solana/generated/acp/instructions/index.d.ts +23 -0
- package/dist/core/solana/generated/acp/instructions/index.d.ts.map +1 -0
- package/dist/core/solana/generated/acp/instructions/index.js +23 -0
- package/dist/core/solana/generated/acp/instructions/index.js.map +1 -0
- package/dist/core/solana/generated/acp/instructions/initialize.d.ts +76 -0
- package/dist/core/solana/generated/acp/instructions/initialize.d.ts.map +1 -0
- package/dist/core/solana/generated/acp/instructions/initialize.js +141 -0
- package/dist/core/solana/generated/acp/instructions/initialize.js.map +1 -0
- package/dist/core/solana/generated/acp/instructions/nominateAuthority.d.ts +52 -0
- package/dist/core/solana/generated/acp/instructions/nominateAuthority.d.ts.map +1 -0
- package/dist/core/solana/generated/acp/instructions/nominateAuthority.js +96 -0
- package/dist/core/solana/generated/acp/instructions/nominateAuthority.js.map +1 -0
- package/dist/core/solana/generated/acp/instructions/reject.d.ts +88 -0
- package/dist/core/solana/generated/acp/instructions/reject.d.ts.map +1 -0
- package/dist/core/solana/generated/acp/instructions/reject.js +168 -0
- package/dist/core/solana/generated/acp/instructions/reject.js.map +1 -0
- package/dist/core/solana/generated/acp/instructions/removeHookWhitelist.d.ts +56 -0
- package/dist/core/solana/generated/acp/instructions/removeHookWhitelist.d.ts.map +1 -0
- package/dist/core/solana/generated/acp/instructions/removeHookWhitelist.js +112 -0
- package/dist/core/solana/generated/acp/instructions/removeHookWhitelist.js.map +1 -0
- package/dist/core/solana/generated/acp/instructions/setBudget.d.ts +56 -0
- package/dist/core/solana/generated/acp/instructions/setBudget.d.ts.map +1 -0
- package/dist/core/solana/generated/acp/instructions/setBudget.js +90 -0
- package/dist/core/solana/generated/acp/instructions/setBudget.js.map +1 -0
- package/dist/core/solana/generated/acp/instructions/setEvaluatorFee.d.ts +52 -0
- package/dist/core/solana/generated/acp/instructions/setEvaluatorFee.d.ts.map +1 -0
- package/dist/core/solana/generated/acp/instructions/setEvaluatorFee.js +96 -0
- package/dist/core/solana/generated/acp/instructions/setEvaluatorFee.js.map +1 -0
- package/dist/core/solana/generated/acp/instructions/setPlatformFee.d.ts +56 -0
- package/dist/core/solana/generated/acp/instructions/setPlatformFee.d.ts.map +1 -0
- package/dist/core/solana/generated/acp/instructions/setPlatformFee.js +98 -0
- package/dist/core/solana/generated/acp/instructions/setPlatformFee.js.map +1 -0
- package/dist/core/solana/generated/acp/instructions/setProvider.d.ts +50 -0
- package/dist/core/solana/generated/acp/instructions/setProvider.d.ts.map +1 -0
- package/dist/core/solana/generated/acp/instructions/setProvider.js +85 -0
- package/dist/core/solana/generated/acp/instructions/setProvider.js.map +1 -0
- package/dist/core/solana/generated/acp/instructions/submit.d.ts +150 -0
- package/dist/core/solana/generated/acp/instructions/submit.d.ts.map +1 -0
- package/dist/core/solana/generated/acp/instructions/submit.js +214 -0
- package/dist/core/solana/generated/acp/instructions/submit.js.map +1 -0
- package/dist/core/solana/generated/acp/pdas/acpState.d.ts +12 -0
- package/dist/core/solana/generated/acp/pdas/acpState.d.ts.map +1 -0
- package/dist/core/solana/generated/acp/pdas/acpState.js +18 -0
- package/dist/core/solana/generated/acp/pdas/acpState.js.map +1 -0
- package/dist/core/solana/generated/acp/pdas/hookWhitelist.d.ts +15 -0
- package/dist/core/solana/generated/acp/pdas/hookWhitelist.d.ts.map +1 -0
- package/dist/core/solana/generated/acp/pdas/hookWhitelist.js +21 -0
- package/dist/core/solana/generated/acp/pdas/hookWhitelist.js.map +1 -0
- package/dist/core/solana/generated/acp/pdas/index.d.ts +10 -0
- package/dist/core/solana/generated/acp/pdas/index.d.ts.map +1 -0
- package/dist/core/solana/generated/acp/pdas/index.js +10 -0
- package/dist/core/solana/generated/acp/pdas/index.js.map +1 -0
- package/dist/core/solana/generated/acp/programs/agenticCommerceV3.d.ts +71 -0
- package/dist/core/solana/generated/acp/programs/agenticCommerceV3.d.ts.map +1 -0
- package/dist/core/solana/generated/acp/programs/agenticCommerceV3.js +209 -0
- package/dist/core/solana/generated/acp/programs/agenticCommerceV3.js.map +1 -0
- package/dist/core/solana/generated/acp/programs/index.d.ts +9 -0
- package/dist/core/solana/generated/acp/programs/index.d.ts.map +1 -0
- package/dist/core/solana/generated/acp/programs/index.js +9 -0
- package/dist/core/solana/generated/acp/programs/index.js.map +1 -0
- package/dist/core/solana/generated/acp/shared/index.d.ts +50 -0
- package/dist/core/solana/generated/acp/shared/index.d.ts.map +1 -0
- package/dist/core/solana/generated/acp/shared/index.js +87 -0
- package/dist/core/solana/generated/acp/shared/index.js.map +1 -0
- package/dist/core/solana/generated/acp/types/index.d.ts +9 -0
- package/dist/core/solana/generated/acp/types/index.d.ts.map +1 -0
- package/dist/core/solana/generated/acp/types/index.js +9 -0
- package/dist/core/solana/generated/acp/types/index.js.map +1 -0
- package/dist/core/solana/generated/acp/types/jobCreated.d.ts +11 -0
- package/dist/core/solana/generated/acp/types/jobCreated.d.ts.map +1 -0
- package/dist/core/solana/generated/acp/types/jobCreated.js +12 -0
- package/dist/core/solana/generated/acp/types/jobCreated.js.map +1 -0
- package/dist/core/solana/generated/acp/types/jobState.d.ts +27 -0
- package/dist/core/solana/generated/acp/types/jobState.d.ts.map +1 -0
- package/dist/core/solana/generated/acp/types/jobState.js +33 -0
- package/dist/core/solana/generated/acp/types/jobState.js.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/accounts/fundRequestIntentId.d.ts +35 -0
- package/dist/core/solana/generated/fund-transfer-hook/accounts/fundRequestIntentId.d.ts.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/accounts/fundRequestIntentId.js +64 -0
- package/dist/core/solana/generated/fund-transfer-hook/accounts/fundRequestIntentId.js.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/accounts/hookMetadata.d.ts +33 -0
- package/dist/core/solana/generated/fund-transfer-hook/accounts/hookMetadata.d.ts.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/accounts/hookMetadata.js +59 -0
- package/dist/core/solana/generated/fund-transfer-hook/accounts/hookMetadata.js.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/accounts/hookState.d.ts +38 -0
- package/dist/core/solana/generated/fund-transfer-hook/accounts/hookState.d.ts.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/accounts/hookState.js +62 -0
- package/dist/core/solana/generated/fund-transfer-hook/accounts/hookState.js.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/accounts/index.d.ts +13 -0
- package/dist/core/solana/generated/fund-transfer-hook/accounts/index.d.ts.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/accounts/index.js +13 -0
- package/dist/core/solana/generated/fund-transfer-hook/accounts/index.js.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/accounts/intent.d.ts +61 -0
- package/dist/core/solana/generated/fund-transfer-hook/accounts/intent.d.ts.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/accounts/intent.js +77 -0
- package/dist/core/solana/generated/fund-transfer-hook/accounts/intent.js.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/accounts/providerEscrowIntentId.d.ts +35 -0
- package/dist/core/solana/generated/fund-transfer-hook/accounts/providerEscrowIntentId.d.ts.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/accounts/providerEscrowIntentId.js +64 -0
- package/dist/core/solana/generated/fund-transfer-hook/accounts/providerEscrowIntentId.js.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/index.d.ts +12 -0
- package/dist/core/solana/generated/fund-transfer-hook/index.d.ts.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/index.js +12 -0
- package/dist/core/solana/generated/fund-transfer-hook/index.js.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/instructions/acceptAuthority.d.ts +47 -0
- package/dist/core/solana/generated/fund-transfer-hook/instructions/acceptAuthority.d.ts.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/instructions/acceptAuthority.js +88 -0
- package/dist/core/solana/generated/fund-transfer-hook/instructions/acceptAuthority.js.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/instructions/afterAction.d.ts +56 -0
- package/dist/core/solana/generated/fund-transfer-hook/instructions/afterAction.d.ts.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/instructions/afterAction.js +92 -0
- package/dist/core/solana/generated/fund-transfer-hook/instructions/afterAction.js.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/instructions/beforeAction.d.ts +52 -0
- package/dist/core/solana/generated/fund-transfer-hook/instructions/beforeAction.d.ts.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/instructions/beforeAction.js +90 -0
- package/dist/core/solana/generated/fund-transfer-hook/instructions/beforeAction.js.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/instructions/claimEscrowRefund.d.ts +86 -0
- package/dist/core/solana/generated/fund-transfer-hook/instructions/claimEscrowRefund.d.ts.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/instructions/claimEscrowRefund.js +169 -0
- package/dist/core/solana/generated/fund-transfer-hook/instructions/claimEscrowRefund.js.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/instructions/closeIntent.d.ts +114 -0
- package/dist/core/solana/generated/fund-transfer-hook/instructions/closeIntent.d.ts.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/instructions/closeIntent.js +120 -0
- package/dist/core/solana/generated/fund-transfer-hook/instructions/closeIntent.js.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/instructions/index.d.ts +15 -0
- package/dist/core/solana/generated/fund-transfer-hook/instructions/index.d.ts.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/instructions/index.js +15 -0
- package/dist/core/solana/generated/fund-transfer-hook/instructions/index.js.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/instructions/initialize.d.ts +67 -0
- package/dist/core/solana/generated/fund-transfer-hook/instructions/initialize.d.ts.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/instructions/initialize.js +138 -0
- package/dist/core/solana/generated/fund-transfer-hook/instructions/initialize.js.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/instructions/nominateAuthority.d.ts +52 -0
- package/dist/core/solana/generated/fund-transfer-hook/instructions/nominateAuthority.d.ts.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/instructions/nominateAuthority.js +96 -0
- package/dist/core/solana/generated/fund-transfer-hook/instructions/nominateAuthority.js.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/pdas/escrowAuthority.d.ts +15 -0
- package/dist/core/solana/generated/fund-transfer-hook/pdas/escrowAuthority.d.ts.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/pdas/escrowAuthority.js +22 -0
- package/dist/core/solana/generated/fund-transfer-hook/pdas/escrowAuthority.js.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/pdas/hookMetadata.d.ts +12 -0
- package/dist/core/solana/generated/fund-transfer-hook/pdas/hookMetadata.d.ts.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/pdas/hookMetadata.js +20 -0
- package/dist/core/solana/generated/fund-transfer-hook/pdas/hookMetadata.js.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/pdas/hookState.d.ts +12 -0
- package/dist/core/solana/generated/fund-transfer-hook/pdas/hookState.d.ts.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/pdas/hookState.js +18 -0
- package/dist/core/solana/generated/fund-transfer-hook/pdas/hookState.js.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/pdas/index.d.ts +13 -0
- package/dist/core/solana/generated/fund-transfer-hook/pdas/index.d.ts.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/pdas/index.js +13 -0
- package/dist/core/solana/generated/fund-transfer-hook/pdas/index.js.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/pdas/intent.d.ts +15 -0
- package/dist/core/solana/generated/fund-transfer-hook/pdas/intent.d.ts.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/pdas/intent.js +19 -0
- package/dist/core/solana/generated/fund-transfer-hook/pdas/intent.js.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/pdas/providerEscrowIntentId.d.ts +15 -0
- package/dist/core/solana/generated/fund-transfer-hook/pdas/providerEscrowIntentId.d.ts.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/pdas/providerEscrowIntentId.js +22 -0
- package/dist/core/solana/generated/fund-transfer-hook/pdas/providerEscrowIntentId.js.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/programs/fundTransferHook.d.ts +49 -0
- package/dist/core/solana/generated/fund-transfer-hook/programs/fundTransferHook.d.ts.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/programs/fundTransferHook.js +129 -0
- package/dist/core/solana/generated/fund-transfer-hook/programs/fundTransferHook.js.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/programs/index.d.ts +9 -0
- package/dist/core/solana/generated/fund-transfer-hook/programs/index.d.ts.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/programs/index.js +9 -0
- package/dist/core/solana/generated/fund-transfer-hook/programs/index.js.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/shared/index.d.ts +50 -0
- package/dist/core/solana/generated/fund-transfer-hook/shared/index.d.ts.map +1 -0
- package/dist/core/solana/generated/fund-transfer-hook/shared/index.js +87 -0
- package/dist/core/solana/generated/fund-transfer-hook/shared/index.js.map +1 -0
- package/dist/core/solana/wallet.d.ts +49 -0
- package/dist/core/solana/wallet.d.ts.map +1 -0
- package/dist/core/solana/wallet.js +119 -0
- package/dist/core/solana/wallet.js.map +1 -0
- package/dist/events/acpHttpClient.d.ts.map +1 -1
- package/dist/events/acpHttpClient.js +12 -3
- package/dist/events/acpHttpClient.js.map +1 -1
- package/dist/events/socketTransport.d.ts +18 -0
- package/dist/events/socketTransport.d.ts.map +1 -0
- package/dist/events/socketTransport.js +117 -0
- package/dist/events/socketTransport.js.map +1 -0
- package/dist/events/sseTransport.d.ts +9 -2
- package/dist/events/sseTransport.d.ts.map +1 -1
- package/dist/events/sseTransport.js +100 -40
- package/dist/events/sseTransport.js.map +1 -1
- package/dist/events/types.d.ts +3 -2
- package/dist/events/types.d.ts.map +1 -1
- package/dist/index.d.ts +7 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/dist/providers/evm/privyAlchemyEvmProviderAdapter.d.ts +12 -2
- package/dist/providers/evm/privyAlchemyEvmProviderAdapter.d.ts.map +1 -1
- package/dist/providers/evm/privyAlchemyEvmProviderAdapter.js +264 -60
- package/dist/providers/evm/privyAlchemyEvmProviderAdapter.js.map +1 -1
- package/dist/providers/evm/types.d.ts +24 -0
- package/dist/providers/evm/types.d.ts.map +1 -0
- package/dist/providers/evm/types.js +2 -0
- package/dist/providers/evm/types.js.map +1 -0
- package/dist/providers/providerAuthClient.d.ts +8 -2
- package/dist/providers/providerAuthClient.d.ts.map +1 -1
- package/dist/providers/providerAuthClient.js +3 -3
- package/dist/providers/providerAuthClient.js.map +1 -1
- package/dist/providers/solana/keypairSolanaProviderAdapter.d.ts +16 -0
- package/dist/providers/solana/keypairSolanaProviderAdapter.d.ts.map +1 -0
- package/dist/providers/solana/keypairSolanaProviderAdapter.js +68 -0
- package/dist/providers/solana/keypairSolanaProviderAdapter.js.map +1 -0
- package/dist/providers/solana/privySolanaProviderAdapter.d.ts +54 -0
- package/dist/providers/solana/privySolanaProviderAdapter.d.ts.map +1 -0
- package/dist/providers/solana/privySolanaProviderAdapter.js +357 -0
- package/dist/providers/solana/privySolanaProviderAdapter.js.map +1 -0
- package/dist/providers/solana/solanaProviderAdapter.d.ts +5 -1
- package/dist/providers/solana/solanaProviderAdapter.d.ts.map +1 -1
- package/dist/providers/solana/solanaProviderAdapter.js +17 -1
- package/dist/providers/solana/solanaProviderAdapter.js.map +1 -1
- package/dist/providers/types.d.ts +11 -6
- package/dist/providers/types.d.ts.map +1 -1
- package/dist/providers/types.js +1 -1
- package/dist/providers/types.js.map +1 -1
- package/package.json +3 -2
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
import { type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount, type WritableSignerAccount } from "@solana/kit";
|
|
9
|
+
import { FUND_TRANSFER_HOOK_PROGRAM_ADDRESS } from "../programs/index.js";
|
|
10
|
+
export declare const CLOSE_INTENT_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
|
|
11
|
+
export declare function getCloseIntentDiscriminatorBytes(): ReadonlyUint8Array;
|
|
12
|
+
export type CloseIntentInstruction<TProgram extends string = typeof FUND_TRANSFER_HOOK_PROGRAM_ADDRESS, TAccountActor extends string | AccountMeta<string> = string, TAccountIntent extends string | AccountMeta<string> = string, TAccountFundRequestMap extends string | AccountMeta<string> = string, TAccountSystemProgram extends string | AccountMeta<string> = "11111111111111111111111111111111", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
13
|
+
TAccountActor extends string ? WritableSignerAccount<TAccountActor> & AccountSignerMeta<TAccountActor> : TAccountActor,
|
|
14
|
+
TAccountIntent extends string ? WritableAccount<TAccountIntent> : TAccountIntent,
|
|
15
|
+
TAccountFundRequestMap extends string ? ReadonlyAccount<TAccountFundRequestMap> : TAccountFundRequestMap,
|
|
16
|
+
TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
|
|
17
|
+
...TRemainingAccounts
|
|
18
|
+
]>;
|
|
19
|
+
export type CloseIntentInstructionData = {
|
|
20
|
+
discriminator: ReadonlyUint8Array;
|
|
21
|
+
intentId: bigint;
|
|
22
|
+
};
|
|
23
|
+
export type CloseIntentInstructionDataArgs = {
|
|
24
|
+
intentId: number | bigint;
|
|
25
|
+
};
|
|
26
|
+
export declare function getCloseIntentInstructionDataEncoder(): FixedSizeEncoder<CloseIntentInstructionDataArgs>;
|
|
27
|
+
export declare function getCloseIntentInstructionDataDecoder(): FixedSizeDecoder<CloseIntentInstructionData>;
|
|
28
|
+
export declare function getCloseIntentInstructionDataCodec(): FixedSizeCodec<CloseIntentInstructionDataArgs, CloseIntentInstructionData>;
|
|
29
|
+
export type CloseIntentAsyncInput<TAccountActor extends string = string, TAccountIntent extends string = string, TAccountFundRequestMap extends string = string, TAccountSystemProgram extends string = string> = {
|
|
30
|
+
/**
|
|
31
|
+
* The original actor who paid for the intent (provider for fund requests).
|
|
32
|
+
* Receives the reclaimed rent lamports.
|
|
33
|
+
*/
|
|
34
|
+
actor: TransactionSigner<TAccountActor>;
|
|
35
|
+
/** The intent PDA to close. Must be unsigned and non-escrow (F-35). */
|
|
36
|
+
intent?: Address<TAccountIntent>;
|
|
37
|
+
/**
|
|
38
|
+
* F-75 (closes auditor Finding 30): the per-job FundRequestIntentId map.
|
|
39
|
+
* **Required** -- the constraint `!intent.is_escrow` above narrows this
|
|
40
|
+
* instruction to fund-request intents, all of which are created in
|
|
41
|
+
* `post_set_budget` alongside an entry in this map. The handler checks
|
|
42
|
+
* that the intent being closed is NOT the one currently referenced by
|
|
43
|
+
* the map -- closing the active intent would break the subsequent `fund`
|
|
44
|
+
* call by leaving a dangling pointer. PDA seeds are bound to
|
|
45
|
+
* `intent.job_id` so the caller cannot substitute a different job's
|
|
46
|
+
* map to bypass the guard. Making this Required (not Optional) closes
|
|
47
|
+
* the bypass where a malicious provider could simply omit the account
|
|
48
|
+
* to skip the check.
|
|
49
|
+
*/
|
|
50
|
+
fundRequestMap: Address<TAccountFundRequestMap>;
|
|
51
|
+
systemProgram?: Address<TAccountSystemProgram>;
|
|
52
|
+
intentId: CloseIntentInstructionDataArgs["intentId"];
|
|
53
|
+
};
|
|
54
|
+
export declare function getCloseIntentInstructionAsync<TAccountActor extends string, TAccountIntent extends string, TAccountFundRequestMap extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof FUND_TRANSFER_HOOK_PROGRAM_ADDRESS>(input: CloseIntentAsyncInput<TAccountActor, TAccountIntent, TAccountFundRequestMap, TAccountSystemProgram>, config?: {
|
|
55
|
+
programAddress?: TProgramAddress;
|
|
56
|
+
}): Promise<CloseIntentInstruction<TProgramAddress, TAccountActor, TAccountIntent, TAccountFundRequestMap, TAccountSystemProgram>>;
|
|
57
|
+
export type CloseIntentInput<TAccountActor extends string = string, TAccountIntent extends string = string, TAccountFundRequestMap extends string = string, TAccountSystemProgram extends string = string> = {
|
|
58
|
+
/**
|
|
59
|
+
* The original actor who paid for the intent (provider for fund requests).
|
|
60
|
+
* Receives the reclaimed rent lamports.
|
|
61
|
+
*/
|
|
62
|
+
actor: TransactionSigner<TAccountActor>;
|
|
63
|
+
/** The intent PDA to close. Must be unsigned and non-escrow (F-35). */
|
|
64
|
+
intent: Address<TAccountIntent>;
|
|
65
|
+
/**
|
|
66
|
+
* F-75 (closes auditor Finding 30): the per-job FundRequestIntentId map.
|
|
67
|
+
* **Required** -- the constraint `!intent.is_escrow` above narrows this
|
|
68
|
+
* instruction to fund-request intents, all of which are created in
|
|
69
|
+
* `post_set_budget` alongside an entry in this map. The handler checks
|
|
70
|
+
* that the intent being closed is NOT the one currently referenced by
|
|
71
|
+
* the map -- closing the active intent would break the subsequent `fund`
|
|
72
|
+
* call by leaving a dangling pointer. PDA seeds are bound to
|
|
73
|
+
* `intent.job_id` so the caller cannot substitute a different job's
|
|
74
|
+
* map to bypass the guard. Making this Required (not Optional) closes
|
|
75
|
+
* the bypass where a malicious provider could simply omit the account
|
|
76
|
+
* to skip the check.
|
|
77
|
+
*/
|
|
78
|
+
fundRequestMap: Address<TAccountFundRequestMap>;
|
|
79
|
+
systemProgram?: Address<TAccountSystemProgram>;
|
|
80
|
+
intentId: CloseIntentInstructionDataArgs["intentId"];
|
|
81
|
+
};
|
|
82
|
+
export declare function getCloseIntentInstruction<TAccountActor extends string, TAccountIntent extends string, TAccountFundRequestMap extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof FUND_TRANSFER_HOOK_PROGRAM_ADDRESS>(input: CloseIntentInput<TAccountActor, TAccountIntent, TAccountFundRequestMap, TAccountSystemProgram>, config?: {
|
|
83
|
+
programAddress?: TProgramAddress;
|
|
84
|
+
}): CloseIntentInstruction<TProgramAddress, TAccountActor, TAccountIntent, TAccountFundRequestMap, TAccountSystemProgram>;
|
|
85
|
+
export type ParsedCloseIntentInstruction<TProgram extends string = typeof FUND_TRANSFER_HOOK_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
86
|
+
programAddress: Address<TProgram>;
|
|
87
|
+
accounts: {
|
|
88
|
+
/**
|
|
89
|
+
* The original actor who paid for the intent (provider for fund requests).
|
|
90
|
+
* Receives the reclaimed rent lamports.
|
|
91
|
+
*/
|
|
92
|
+
actor: TAccountMetas[0];
|
|
93
|
+
/** The intent PDA to close. Must be unsigned and non-escrow (F-35). */
|
|
94
|
+
intent: TAccountMetas[1];
|
|
95
|
+
/**
|
|
96
|
+
* F-75 (closes auditor Finding 30): the per-job FundRequestIntentId map.
|
|
97
|
+
* **Required** -- the constraint `!intent.is_escrow` above narrows this
|
|
98
|
+
* instruction to fund-request intents, all of which are created in
|
|
99
|
+
* `post_set_budget` alongside an entry in this map. The handler checks
|
|
100
|
+
* that the intent being closed is NOT the one currently referenced by
|
|
101
|
+
* the map -- closing the active intent would break the subsequent `fund`
|
|
102
|
+
* call by leaving a dangling pointer. PDA seeds are bound to
|
|
103
|
+
* `intent.job_id` so the caller cannot substitute a different job's
|
|
104
|
+
* map to bypass the guard. Making this Required (not Optional) closes
|
|
105
|
+
* the bypass where a malicious provider could simply omit the account
|
|
106
|
+
* to skip the check.
|
|
107
|
+
*/
|
|
108
|
+
fundRequestMap: TAccountMetas[2];
|
|
109
|
+
systemProgram: TAccountMetas[3];
|
|
110
|
+
};
|
|
111
|
+
data: CloseIntentInstructionData;
|
|
112
|
+
};
|
|
113
|
+
export declare function parseCloseIntentInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedCloseIntentInstruction<TProgram, TAccountMetas>;
|
|
114
|
+
//# sourceMappingURL=closeIntent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"closeIntent.d.ts","sourceRoot":"","sources":["../../../../../../src/core/solana/generated/fund-transfer-hook/instructions/closeIntent.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAWL,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,OAAO,EACZ,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK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AAC,CAAC,CAAC,CAAC;QACzB;;;;;;;;;;;;WAYG;QACH,cAAc,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QACjC,aAAa,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;KACjC,CAAC;IACF,IAAI,EAAE,0BAA0B,CAAC;CAClC,CAAC;AAEF,wBAAgB,2BAA2B,CACzC,QAAQ,SAAS,MAAM,EACvB,aAAa,SAAS,SAAS,WAAW,EAAE,EAE5C,WAAW,EAAE,WAAW,CAAC,QAAQ,CAAC,GAChC,uBAAuB,CAAC,aAAa,CAAC,GACtC,mBAAmB,CAAC,kBAAkB,CAAC,GACxC,4BAA4B,CAAC,QAAQ,EAAE,aAAa,CAAC,CAqBvD"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
import { combineCodec, fixDecoderSize, fixEncoderSize, getBytesDecoder, getBytesEncoder, getStructDecoder, getStructEncoder, getU64Decoder, getU64Encoder, transformEncoder, } from "@solana/kit";
|
|
9
|
+
import { findIntentPda } from "../pdas/index.js";
|
|
10
|
+
import { FUND_TRANSFER_HOOK_PROGRAM_ADDRESS } from "../programs/index.js";
|
|
11
|
+
import { expectSome, getAccountMetaFactory, } from "../shared/index.js";
|
|
12
|
+
export const CLOSE_INTENT_DISCRIMINATOR = new Uint8Array([
|
|
13
|
+
112, 245, 154, 249, 57, 126, 54, 122,
|
|
14
|
+
]);
|
|
15
|
+
export function getCloseIntentDiscriminatorBytes() {
|
|
16
|
+
return fixEncoderSize(getBytesEncoder(), 8).encode(CLOSE_INTENT_DISCRIMINATOR);
|
|
17
|
+
}
|
|
18
|
+
export function getCloseIntentInstructionDataEncoder() {
|
|
19
|
+
return transformEncoder(getStructEncoder([
|
|
20
|
+
["discriminator", fixEncoderSize(getBytesEncoder(), 8)],
|
|
21
|
+
["intentId", getU64Encoder()],
|
|
22
|
+
]), (value) => ({ ...value, discriminator: CLOSE_INTENT_DISCRIMINATOR }));
|
|
23
|
+
}
|
|
24
|
+
export function getCloseIntentInstructionDataDecoder() {
|
|
25
|
+
return getStructDecoder([
|
|
26
|
+
["discriminator", fixDecoderSize(getBytesDecoder(), 8)],
|
|
27
|
+
["intentId", getU64Decoder()],
|
|
28
|
+
]);
|
|
29
|
+
}
|
|
30
|
+
export function getCloseIntentInstructionDataCodec() {
|
|
31
|
+
return combineCodec(getCloseIntentInstructionDataEncoder(), getCloseIntentInstructionDataDecoder());
|
|
32
|
+
}
|
|
33
|
+
export async function getCloseIntentInstructionAsync(input, config) {
|
|
34
|
+
// Program address.
|
|
35
|
+
const programAddress = config?.programAddress ?? FUND_TRANSFER_HOOK_PROGRAM_ADDRESS;
|
|
36
|
+
// Original accounts.
|
|
37
|
+
const originalAccounts = {
|
|
38
|
+
actor: { value: input.actor ?? null, isWritable: true },
|
|
39
|
+
intent: { value: input.intent ?? null, isWritable: true },
|
|
40
|
+
fundRequestMap: { value: input.fundRequestMap ?? null, isWritable: false },
|
|
41
|
+
systemProgram: { value: input.systemProgram ?? null, isWritable: false },
|
|
42
|
+
};
|
|
43
|
+
const accounts = originalAccounts;
|
|
44
|
+
// Original args.
|
|
45
|
+
const args = { ...input };
|
|
46
|
+
// Resolve default values.
|
|
47
|
+
if (!accounts.intent.value) {
|
|
48
|
+
accounts.intent.value = await findIntentPda({
|
|
49
|
+
intentId: expectSome(args.intentId),
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
if (!accounts.systemProgram.value) {
|
|
53
|
+
accounts.systemProgram.value =
|
|
54
|
+
"11111111111111111111111111111111";
|
|
55
|
+
}
|
|
56
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
57
|
+
return Object.freeze({
|
|
58
|
+
accounts: [
|
|
59
|
+
getAccountMeta(accounts.actor),
|
|
60
|
+
getAccountMeta(accounts.intent),
|
|
61
|
+
getAccountMeta(accounts.fundRequestMap),
|
|
62
|
+
getAccountMeta(accounts.systemProgram),
|
|
63
|
+
],
|
|
64
|
+
data: getCloseIntentInstructionDataEncoder().encode(args),
|
|
65
|
+
programAddress,
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
export function getCloseIntentInstruction(input, config) {
|
|
69
|
+
// Program address.
|
|
70
|
+
const programAddress = config?.programAddress ?? FUND_TRANSFER_HOOK_PROGRAM_ADDRESS;
|
|
71
|
+
// Original accounts.
|
|
72
|
+
const originalAccounts = {
|
|
73
|
+
actor: { value: input.actor ?? null, isWritable: true },
|
|
74
|
+
intent: { value: input.intent ?? null, isWritable: true },
|
|
75
|
+
fundRequestMap: { value: input.fundRequestMap ?? null, isWritable: false },
|
|
76
|
+
systemProgram: { value: input.systemProgram ?? null, isWritable: false },
|
|
77
|
+
};
|
|
78
|
+
const accounts = originalAccounts;
|
|
79
|
+
// Original args.
|
|
80
|
+
const args = { ...input };
|
|
81
|
+
// Resolve default values.
|
|
82
|
+
if (!accounts.systemProgram.value) {
|
|
83
|
+
accounts.systemProgram.value =
|
|
84
|
+
"11111111111111111111111111111111";
|
|
85
|
+
}
|
|
86
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
87
|
+
return Object.freeze({
|
|
88
|
+
accounts: [
|
|
89
|
+
getAccountMeta(accounts.actor),
|
|
90
|
+
getAccountMeta(accounts.intent),
|
|
91
|
+
getAccountMeta(accounts.fundRequestMap),
|
|
92
|
+
getAccountMeta(accounts.systemProgram),
|
|
93
|
+
],
|
|
94
|
+
data: getCloseIntentInstructionDataEncoder().encode(args),
|
|
95
|
+
programAddress,
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
export function parseCloseIntentInstruction(instruction) {
|
|
99
|
+
if (instruction.accounts.length < 4) {
|
|
100
|
+
// TODO: Coded error.
|
|
101
|
+
throw new Error("Not enough accounts");
|
|
102
|
+
}
|
|
103
|
+
let accountIndex = 0;
|
|
104
|
+
const getNextAccount = () => {
|
|
105
|
+
const accountMeta = instruction.accounts[accountIndex];
|
|
106
|
+
accountIndex += 1;
|
|
107
|
+
return accountMeta;
|
|
108
|
+
};
|
|
109
|
+
return {
|
|
110
|
+
programAddress: instruction.programAddress,
|
|
111
|
+
accounts: {
|
|
112
|
+
actor: getNextAccount(),
|
|
113
|
+
intent: getNextAccount(),
|
|
114
|
+
fundRequestMap: getNextAccount(),
|
|
115
|
+
systemProgram: getNextAccount(),
|
|
116
|
+
},
|
|
117
|
+
data: getCloseIntentInstructionDataDecoder().decode(instruction.data),
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=closeIntent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"closeIntent.js","sourceRoot":"","sources":["../../../../../../src/core/solana/generated/fund-transfer-hook/instructions/closeIntent.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,YAAY,EACZ,cAAc,EACd,cAAc,EACd,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,gBAAgB,GAejB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,kCAAkC,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EACL,UAAU,EACV,qBAAqB,GAEtB,MAAM,oBAAoB,CAAC;AAE5B,MAAM,CAAC,MAAM,0BAA0B,GAAG,IAAI,UAAU,CAAC;IACvD,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG;CACrC,CAAC,CAAC;AAEH,MAAM,UAAU,gCAAgC;IAC9C,OAAO,cAAc,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,C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E,YAAY,IAAI,CAAC,CAAC;QAClB,OAAO,WAAW,CAAC;IACrB,CAAC,CAAC;IACF,OAAO;QACL,cAAc,EAAE,WAAW,CAAC,cAAc;QAC1C,QAAQ,EAAE;YACR,KAAK,EAAE,cAAc,EAAE;YACvB,MAAM,EAAE,cAAc,EAAE;YACxB,cAAc,EAAE,cAAc,EAAE;YAChC,aAAa,EAAE,cAAc,EAAE;SAChC;QACD,IAAI,EAAE,oCAAoC,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC;KACtE,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
export * from "./acceptAuthority.js";
|
|
9
|
+
export * from "./afterAction.js";
|
|
10
|
+
export * from "./beforeAction.js";
|
|
11
|
+
export * from "./claimEscrowRefund.js";
|
|
12
|
+
export * from "./closeIntent.js";
|
|
13
|
+
export * from "./initialize.js";
|
|
14
|
+
export * from "./nominateAuthority.js";
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/core/solana/generated/fund-transfer-hook/instructions/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
export * from "./acceptAuthority.js";
|
|
9
|
+
export * from "./afterAction.js";
|
|
10
|
+
export * from "./beforeAction.js";
|
|
11
|
+
export * from "./claimEscrowRefund.js";
|
|
12
|
+
export * from "./closeIntent.js";
|
|
13
|
+
export * from "./initialize.js";
|
|
14
|
+
export * from "./nominateAuthority.js";
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/core/solana/generated/fund-transfer-hook/instructions/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
import { type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount, type WritableSignerAccount } from "@solana/kit";
|
|
9
|
+
import { FUND_TRANSFER_HOOK_PROGRAM_ADDRESS } from "../programs/index.js";
|
|
10
|
+
export declare const INITIALIZE_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
|
|
11
|
+
export declare function getInitializeDiscriminatorBytes(): ReadonlyUint8Array;
|
|
12
|
+
export type InitializeInstruction<TProgram extends string = typeof FUND_TRANSFER_HOOK_PROGRAM_ADDRESS, TAccountAuthority extends string | AccountMeta<string> = string, TAccountHookState extends string | AccountMeta<string> = string, TAccountHookMetadata extends string | AccountMeta<string> = string, TAccountProgramData extends string | AccountMeta<string> = string, TAccountSystemProgram extends string | AccountMeta<string> = "11111111111111111111111111111111", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
13
|
+
TAccountAuthority extends string ? WritableSignerAccount<TAccountAuthority> & AccountSignerMeta<TAccountAuthority> : TAccountAuthority,
|
|
14
|
+
TAccountHookState extends string ? WritableAccount<TAccountHookState> : TAccountHookState,
|
|
15
|
+
TAccountHookMetadata extends string ? WritableAccount<TAccountHookMetadata> : TAccountHookMetadata,
|
|
16
|
+
TAccountProgramData extends string ? ReadonlyAccount<TAccountProgramData> : TAccountProgramData,
|
|
17
|
+
TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
|
|
18
|
+
...TRemainingAccounts
|
|
19
|
+
]>;
|
|
20
|
+
export type InitializeInstructionData = {
|
|
21
|
+
discriminator: ReadonlyUint8Array;
|
|
22
|
+
acpProgram: Address;
|
|
23
|
+
};
|
|
24
|
+
export type InitializeInstructionDataArgs = {
|
|
25
|
+
acpProgram: Address;
|
|
26
|
+
};
|
|
27
|
+
export declare function getInitializeInstructionDataEncoder(): FixedSizeEncoder<InitializeInstructionDataArgs>;
|
|
28
|
+
export declare function getInitializeInstructionDataDecoder(): FixedSizeDecoder<InitializeInstructionData>;
|
|
29
|
+
export declare function getInitializeInstructionDataCodec(): FixedSizeCodec<InitializeInstructionDataArgs, InitializeInstructionData>;
|
|
30
|
+
export type InitializeAsyncInput<TAccountAuthority extends string = string, TAccountHookState extends string = string, TAccountHookMetadata extends string = string, TAccountProgramData extends string = string, TAccountSystemProgram extends string = string> = {
|
|
31
|
+
authority: TransactionSigner<TAccountAuthority>;
|
|
32
|
+
hookState?: Address<TAccountHookState>;
|
|
33
|
+
/** Self-declared metadata read by multi-hook-router for completeness checks. */
|
|
34
|
+
hookMetadata?: Address<TAccountHookMetadata>;
|
|
35
|
+
programData?: Address<TAccountProgramData>;
|
|
36
|
+
systemProgram?: Address<TAccountSystemProgram>;
|
|
37
|
+
acpProgram: InitializeInstructionDataArgs["acpProgram"];
|
|
38
|
+
};
|
|
39
|
+
export declare function getInitializeInstructionAsync<TAccountAuthority extends string, TAccountHookState extends string, TAccountHookMetadata extends string, TAccountProgramData extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof FUND_TRANSFER_HOOK_PROGRAM_ADDRESS>(input: InitializeAsyncInput<TAccountAuthority, TAccountHookState, TAccountHookMetadata, TAccountProgramData, TAccountSystemProgram>, config?: {
|
|
40
|
+
programAddress?: TProgramAddress;
|
|
41
|
+
}): Promise<InitializeInstruction<TProgramAddress, TAccountAuthority, TAccountHookState, TAccountHookMetadata, TAccountProgramData, TAccountSystemProgram>>;
|
|
42
|
+
export type InitializeInput<TAccountAuthority extends string = string, TAccountHookState extends string = string, TAccountHookMetadata extends string = string, TAccountProgramData extends string = string, TAccountSystemProgram extends string = string> = {
|
|
43
|
+
authority: TransactionSigner<TAccountAuthority>;
|
|
44
|
+
hookState: Address<TAccountHookState>;
|
|
45
|
+
/** Self-declared metadata read by multi-hook-router for completeness checks. */
|
|
46
|
+
hookMetadata: Address<TAccountHookMetadata>;
|
|
47
|
+
programData: Address<TAccountProgramData>;
|
|
48
|
+
systemProgram?: Address<TAccountSystemProgram>;
|
|
49
|
+
acpProgram: InitializeInstructionDataArgs["acpProgram"];
|
|
50
|
+
};
|
|
51
|
+
export declare function getInitializeInstruction<TAccountAuthority extends string, TAccountHookState extends string, TAccountHookMetadata extends string, TAccountProgramData extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof FUND_TRANSFER_HOOK_PROGRAM_ADDRESS>(input: InitializeInput<TAccountAuthority, TAccountHookState, TAccountHookMetadata, TAccountProgramData, TAccountSystemProgram>, config?: {
|
|
52
|
+
programAddress?: TProgramAddress;
|
|
53
|
+
}): InitializeInstruction<TProgramAddress, TAccountAuthority, TAccountHookState, TAccountHookMetadata, TAccountProgramData, TAccountSystemProgram>;
|
|
54
|
+
export type ParsedInitializeInstruction<TProgram extends string = typeof FUND_TRANSFER_HOOK_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
55
|
+
programAddress: Address<TProgram>;
|
|
56
|
+
accounts: {
|
|
57
|
+
authority: TAccountMetas[0];
|
|
58
|
+
hookState: TAccountMetas[1];
|
|
59
|
+
/** Self-declared metadata read by multi-hook-router for completeness checks. */
|
|
60
|
+
hookMetadata: TAccountMetas[2];
|
|
61
|
+
programData: TAccountMetas[3];
|
|
62
|
+
systemProgram: TAccountMetas[4];
|
|
63
|
+
};
|
|
64
|
+
data: InitializeInstructionData;
|
|
65
|
+
};
|
|
66
|
+
export declare function parseInitializeInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedInitializeInstruction<TProgram, TAccountMetas>;
|
|
67
|
+
//# sourceMappingURL=initialize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initialize.d.ts","sourceRoot":"","sources":["../../../../../../src/core/solana/generated/fund-transfer-hook/instructions/initialize.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAYL,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,OAAO,EACZ,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB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CACtB,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,qBAAqB,CACtB,CAgDA;AAED,MAAM,MAAM,2BAA2B,CACrC,QAAQ,SAAS,MAAM,GAAG,OAAO,kCAAkC,EACnE,aAAa,SAAS,SAAS,WAAW,EAAE,GAAG,SAAS,WAAW,EAAE,IACnE;IACF,cAAc,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IAClC,QAAQ,EAAE;QACR,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QAC5B,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QAC5B,gFAAgF;QAChF,YAAY,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QAC/B,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QAC9B,aAAa,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;KACjC,CAAC;IACF,IAAI,EAAE,yBAAyB,CAAC;CACjC,CAAC;AAEF,wBAAgB,0BAA0B,CACxC,QAAQ,SAAS,MAAM,EACvB,aAAa,SAAS,SAAS,WAAW,EAAE,EAE5C,WAAW,EAAE,WAAW,CAAC,QAAQ,CAAC,GAChC,uBAAuB,CAAC,aAAa,CAAC,GACtC,mBAAmB,CAAC,kBAAkB,CAAC,GACxC,2BAA2B,CAAC,QAAQ,EAAE,aAAa,CAAC,CAsBtD"}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
import { combineCodec, fixDecoderSize, fixEncoderSize, getAddressDecoder, getAddressEncoder, getBytesDecoder, getBytesEncoder, getProgramDerivedAddress, getStructDecoder, getStructEncoder, transformEncoder, } from "@solana/kit";
|
|
9
|
+
import { findHookMetadataPda, findHookStatePda } from "../pdas/index.js";
|
|
10
|
+
import { FUND_TRANSFER_HOOK_PROGRAM_ADDRESS } from "../programs/index.js";
|
|
11
|
+
import { getAccountMetaFactory } from "../shared/index.js";
|
|
12
|
+
export const INITIALIZE_DISCRIMINATOR = new Uint8Array([
|
|
13
|
+
175, 175, 109, 31, 13, 152, 155, 237,
|
|
14
|
+
]);
|
|
15
|
+
export function getInitializeDiscriminatorBytes() {
|
|
16
|
+
return fixEncoderSize(getBytesEncoder(), 8).encode(INITIALIZE_DISCRIMINATOR);
|
|
17
|
+
}
|
|
18
|
+
export function getInitializeInstructionDataEncoder() {
|
|
19
|
+
return transformEncoder(getStructEncoder([
|
|
20
|
+
["discriminator", fixEncoderSize(getBytesEncoder(), 8)],
|
|
21
|
+
["acpProgram", getAddressEncoder()],
|
|
22
|
+
]), (value) => ({ ...value, discriminator: INITIALIZE_DISCRIMINATOR }));
|
|
23
|
+
}
|
|
24
|
+
export function getInitializeInstructionDataDecoder() {
|
|
25
|
+
return getStructDecoder([
|
|
26
|
+
["discriminator", fixDecoderSize(getBytesDecoder(), 8)],
|
|
27
|
+
["acpProgram", getAddressDecoder()],
|
|
28
|
+
]);
|
|
29
|
+
}
|
|
30
|
+
export function getInitializeInstructionDataCodec() {
|
|
31
|
+
return combineCodec(getInitializeInstructionDataEncoder(), getInitializeInstructionDataDecoder());
|
|
32
|
+
}
|
|
33
|
+
export async function getInitializeInstructionAsync(input, config) {
|
|
34
|
+
// Program address.
|
|
35
|
+
const programAddress = config?.programAddress ?? FUND_TRANSFER_HOOK_PROGRAM_ADDRESS;
|
|
36
|
+
// Original accounts.
|
|
37
|
+
const originalAccounts = {
|
|
38
|
+
authority: { value: input.authority ?? null, isWritable: true },
|
|
39
|
+
hookState: { value: input.hookState ?? null, isWritable: true },
|
|
40
|
+
hookMetadata: { value: input.hookMetadata ?? null, isWritable: true },
|
|
41
|
+
programData: { value: input.programData ?? null, isWritable: false },
|
|
42
|
+
systemProgram: { value: input.systemProgram ?? null, isWritable: false },
|
|
43
|
+
};
|
|
44
|
+
const accounts = originalAccounts;
|
|
45
|
+
// Original args.
|
|
46
|
+
const args = { ...input };
|
|
47
|
+
// Resolve default values.
|
|
48
|
+
if (!accounts.hookState.value) {
|
|
49
|
+
accounts.hookState.value = await findHookStatePda();
|
|
50
|
+
}
|
|
51
|
+
if (!accounts.hookMetadata.value) {
|
|
52
|
+
accounts.hookMetadata.value = await findHookMetadataPda();
|
|
53
|
+
}
|
|
54
|
+
if (!accounts.programData.value) {
|
|
55
|
+
accounts.programData.value = await getProgramDerivedAddress({
|
|
56
|
+
programAddress: "BPFLoaderUpgradeab1e11111111111111111111111",
|
|
57
|
+
seeds: [
|
|
58
|
+
getBytesEncoder().encode(new Uint8Array([
|
|
59
|
+
93, 144, 158, 139, 132, 150, 174, 88, 0, 246, 229, 102, 47, 253,
|
|
60
|
+
176, 138, 100, 251, 8, 215, 89, 98, 14, 105, 223, 127, 162, 247, 57,
|
|
61
|
+
124, 169, 202,
|
|
62
|
+
])),
|
|
63
|
+
],
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
if (!accounts.systemProgram.value) {
|
|
67
|
+
accounts.systemProgram.value =
|
|
68
|
+
"11111111111111111111111111111111";
|
|
69
|
+
}
|
|
70
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
71
|
+
return Object.freeze({
|
|
72
|
+
accounts: [
|
|
73
|
+
getAccountMeta(accounts.authority),
|
|
74
|
+
getAccountMeta(accounts.hookState),
|
|
75
|
+
getAccountMeta(accounts.hookMetadata),
|
|
76
|
+
getAccountMeta(accounts.programData),
|
|
77
|
+
getAccountMeta(accounts.systemProgram),
|
|
78
|
+
],
|
|
79
|
+
data: getInitializeInstructionDataEncoder().encode(args),
|
|
80
|
+
programAddress,
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
export function getInitializeInstruction(input, config) {
|
|
84
|
+
// Program address.
|
|
85
|
+
const programAddress = config?.programAddress ?? FUND_TRANSFER_HOOK_PROGRAM_ADDRESS;
|
|
86
|
+
// Original accounts.
|
|
87
|
+
const originalAccounts = {
|
|
88
|
+
authority: { value: input.authority ?? null, isWritable: true },
|
|
89
|
+
hookState: { value: input.hookState ?? null, isWritable: true },
|
|
90
|
+
hookMetadata: { value: input.hookMetadata ?? null, isWritable: true },
|
|
91
|
+
programData: { value: input.programData ?? null, isWritable: false },
|
|
92
|
+
systemProgram: { value: input.systemProgram ?? null, isWritable: false },
|
|
93
|
+
};
|
|
94
|
+
const accounts = originalAccounts;
|
|
95
|
+
// Original args.
|
|
96
|
+
const args = { ...input };
|
|
97
|
+
// Resolve default values.
|
|
98
|
+
if (!accounts.systemProgram.value) {
|
|
99
|
+
accounts.systemProgram.value =
|
|
100
|
+
"11111111111111111111111111111111";
|
|
101
|
+
}
|
|
102
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
103
|
+
return Object.freeze({
|
|
104
|
+
accounts: [
|
|
105
|
+
getAccountMeta(accounts.authority),
|
|
106
|
+
getAccountMeta(accounts.hookState),
|
|
107
|
+
getAccountMeta(accounts.hookMetadata),
|
|
108
|
+
getAccountMeta(accounts.programData),
|
|
109
|
+
getAccountMeta(accounts.systemProgram),
|
|
110
|
+
],
|
|
111
|
+
data: getInitializeInstructionDataEncoder().encode(args),
|
|
112
|
+
programAddress,
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
export function parseInitializeInstruction(instruction) {
|
|
116
|
+
if (instruction.accounts.length < 5) {
|
|
117
|
+
// TODO: Coded error.
|
|
118
|
+
throw new Error("Not enough accounts");
|
|
119
|
+
}
|
|
120
|
+
let accountIndex = 0;
|
|
121
|
+
const getNextAccount = () => {
|
|
122
|
+
const accountMeta = instruction.accounts[accountIndex];
|
|
123
|
+
accountIndex += 1;
|
|
124
|
+
return accountMeta;
|
|
125
|
+
};
|
|
126
|
+
return {
|
|
127
|
+
programAddress: instruction.programAddress,
|
|
128
|
+
accounts: {
|
|
129
|
+
authority: getNextAccount(),
|
|
130
|
+
hookState: getNextAccount(),
|
|
131
|
+
hookMetadata: getNextAccount(),
|
|
132
|
+
programData: getNextAccount(),
|
|
133
|
+
systemProgram: getNextAccount(),
|
|
134
|
+
},
|
|
135
|
+
data: getInitializeInstructionDataDecoder().decode(instruction.data),
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
//# sourceMappingURL=initialize.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initialize.js","sourceRoot":"","sources":["../../../../../../src/core/solana/generated/fund-transfer-hook/instructions/initialize.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,YAAY,EACZ,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,wBAAwB,EACxB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,GAejB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzE,OAAO,EAAE,kCAAkC,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAwB,MAAM,oBAAoB,CAAC;AAEjF,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,UAAU,CAAC;IACrD,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;CACrC,CAAC,CAAC;AAEH,MAAM,UAAU,+BAA+B;IAC7C,OAAO,cAAc,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,wBAAwB,CAAC,CAAC;AAC/E,CAAC;AA0CD,MAAM,UAAU,mCAAmC;IACjD,OAAO,gBAAgB,CACrB,gBAAgB,CAAC;QACf,CAAC,eAAe,EAAE,cAAc,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,CAAC;QACvD,CAAC,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
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
import { type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlySignerAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount } from "@solana/kit";
|
|
9
|
+
import { FUND_TRANSFER_HOOK_PROGRAM_ADDRESS } from "../programs/index.js";
|
|
10
|
+
export declare const NOMINATE_AUTHORITY_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
|
|
11
|
+
export declare function getNominateAuthorityDiscriminatorBytes(): ReadonlyUint8Array;
|
|
12
|
+
export type NominateAuthorityInstruction<TProgram extends string = typeof FUND_TRANSFER_HOOK_PROGRAM_ADDRESS, TAccountAuthority extends string | AccountMeta<string> = string, TAccountHookState extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
13
|
+
TAccountAuthority extends string ? ReadonlySignerAccount<TAccountAuthority> & AccountSignerMeta<TAccountAuthority> : TAccountAuthority,
|
|
14
|
+
TAccountHookState extends string ? WritableAccount<TAccountHookState> : TAccountHookState,
|
|
15
|
+
...TRemainingAccounts
|
|
16
|
+
]>;
|
|
17
|
+
export type NominateAuthorityInstructionData = {
|
|
18
|
+
discriminator: ReadonlyUint8Array;
|
|
19
|
+
newAuthority: Address;
|
|
20
|
+
};
|
|
21
|
+
export type NominateAuthorityInstructionDataArgs = {
|
|
22
|
+
newAuthority: Address;
|
|
23
|
+
};
|
|
24
|
+
export declare function getNominateAuthorityInstructionDataEncoder(): FixedSizeEncoder<NominateAuthorityInstructionDataArgs>;
|
|
25
|
+
export declare function getNominateAuthorityInstructionDataDecoder(): FixedSizeDecoder<NominateAuthorityInstructionData>;
|
|
26
|
+
export declare function getNominateAuthorityInstructionDataCodec(): FixedSizeCodec<NominateAuthorityInstructionDataArgs, NominateAuthorityInstructionData>;
|
|
27
|
+
export type NominateAuthorityAsyncInput<TAccountAuthority extends string = string, TAccountHookState extends string = string> = {
|
|
28
|
+
authority: TransactionSigner<TAccountAuthority>;
|
|
29
|
+
hookState?: Address<TAccountHookState>;
|
|
30
|
+
newAuthority: NominateAuthorityInstructionDataArgs["newAuthority"];
|
|
31
|
+
};
|
|
32
|
+
export declare function getNominateAuthorityInstructionAsync<TAccountAuthority extends string, TAccountHookState extends string, TProgramAddress extends Address = typeof FUND_TRANSFER_HOOK_PROGRAM_ADDRESS>(input: NominateAuthorityAsyncInput<TAccountAuthority, TAccountHookState>, config?: {
|
|
33
|
+
programAddress?: TProgramAddress;
|
|
34
|
+
}): Promise<NominateAuthorityInstruction<TProgramAddress, TAccountAuthority, TAccountHookState>>;
|
|
35
|
+
export type NominateAuthorityInput<TAccountAuthority extends string = string, TAccountHookState extends string = string> = {
|
|
36
|
+
authority: TransactionSigner<TAccountAuthority>;
|
|
37
|
+
hookState: Address<TAccountHookState>;
|
|
38
|
+
newAuthority: NominateAuthorityInstructionDataArgs["newAuthority"];
|
|
39
|
+
};
|
|
40
|
+
export declare function getNominateAuthorityInstruction<TAccountAuthority extends string, TAccountHookState extends string, TProgramAddress extends Address = typeof FUND_TRANSFER_HOOK_PROGRAM_ADDRESS>(input: NominateAuthorityInput<TAccountAuthority, TAccountHookState>, config?: {
|
|
41
|
+
programAddress?: TProgramAddress;
|
|
42
|
+
}): NominateAuthorityInstruction<TProgramAddress, TAccountAuthority, TAccountHookState>;
|
|
43
|
+
export type ParsedNominateAuthorityInstruction<TProgram extends string = typeof FUND_TRANSFER_HOOK_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
44
|
+
programAddress: Address<TProgram>;
|
|
45
|
+
accounts: {
|
|
46
|
+
authority: TAccountMetas[0];
|
|
47
|
+
hookState: TAccountMetas[1];
|
|
48
|
+
};
|
|
49
|
+
data: NominateAuthorityInstructionData;
|
|
50
|
+
};
|
|
51
|
+
export declare function parseNominateAuthorityInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedNominateAuthorityInstruction<TProgram, TAccountMetas>;
|
|
52
|
+
//# sourceMappingURL=nominateAuthority.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nominateAuthority.d.ts","sourceRoot":"","sources":["../../../../../../src/core/solana/generated/fund-transfer-hook/instructions/nominateAuthority.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAWL,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,OAAO,EACZ,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACrB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,kCAAkC,EAAE,MAAM,sBAAsB,CAAC;AAG1E,eAAO,MAAM,gCAAgC,yBAE3C,CAAC;AAEH,wBAAgB,sCAAsC,uBAIrD;AAED,MAAM,MAAM,4BAA4B,CACtC,QAAQ,SAAS,MAAM,GAAG,OAAO,kCAAkC,EACnE,iBAAiB,SAAS,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,GAAG,MAAM,EAC/D,iBAAiB,SAAS,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,GAAG,MAAM,EAC/D,kBAAkB,SAAS,SAAS,WAAW,CAAC,MAAM,CAAC,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