@virtuals-protocol/acp-node-v2 0.1.3 → 0.1.5
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/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/constants.d.ts +4 -0
- package/dist/core/constants.d.ts.map +1 -1
- package/dist/core/constants.js +13 -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/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/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/providers/evm/privyAlchemyEvmProviderAdapter.js +1 -1
- package/dist/providers/evm/privyAlchemyEvmProviderAdapter.js.map +1 -1
- package/dist/providers/providerAuthClient.d.ts +8 -2
- package/dist/providers/providerAuthClient.d.ts.map +1 -1
- package/dist/providers/providerAuthClient.js +6 -12
- 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,190 @@
|
|
|
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 { addDecoderSizePrefix, addEncoderSizePrefix, combineCodec, fixDecoderSize, fixEncoderSize, getBytesDecoder, getBytesEncoder, getStructDecoder, getStructEncoder, getU32Decoder, getU32Encoder, transformEncoder, } from "@solana/kit";
|
|
9
|
+
import { findAcpStatePda } from "../pdas/index.js";
|
|
10
|
+
import { AGENTIC_COMMERCE_V3_PROGRAM_ADDRESS } from "../programs/index.js";
|
|
11
|
+
import { getAccountMetaFactory } from "../shared/index.js";
|
|
12
|
+
export const COMPLETE_DISCRIMINATOR = new Uint8Array([
|
|
13
|
+
0, 77, 224, 147, 136, 25, 88, 76,
|
|
14
|
+
]);
|
|
15
|
+
export function getCompleteDiscriminatorBytes() {
|
|
16
|
+
return fixEncoderSize(getBytesEncoder(), 8).encode(COMPLETE_DISCRIMINATOR);
|
|
17
|
+
}
|
|
18
|
+
export function getCompleteInstructionDataEncoder() {
|
|
19
|
+
return transformEncoder(getStructEncoder([
|
|
20
|
+
["discriminator", fixEncoderSize(getBytesEncoder(), 8)],
|
|
21
|
+
["reason", fixEncoderSize(getBytesEncoder(), 32)],
|
|
22
|
+
["optParams", addEncoderSizePrefix(getBytesEncoder(), getU32Encoder())],
|
|
23
|
+
]), (value) => ({ ...value, discriminator: COMPLETE_DISCRIMINATOR }));
|
|
24
|
+
}
|
|
25
|
+
export function getCompleteInstructionDataDecoder() {
|
|
26
|
+
return getStructDecoder([
|
|
27
|
+
["discriminator", fixDecoderSize(getBytesDecoder(), 8)],
|
|
28
|
+
["reason", fixDecoderSize(getBytesDecoder(), 32)],
|
|
29
|
+
["optParams", addDecoderSizePrefix(getBytesDecoder(), getU32Decoder())],
|
|
30
|
+
]);
|
|
31
|
+
}
|
|
32
|
+
export function getCompleteInstructionDataCodec() {
|
|
33
|
+
return combineCodec(getCompleteInstructionDataEncoder(), getCompleteInstructionDataDecoder());
|
|
34
|
+
}
|
|
35
|
+
export async function getCompleteInstructionAsync(input, config) {
|
|
36
|
+
// Program address.
|
|
37
|
+
const programAddress = config?.programAddress ?? AGENTIC_COMMERCE_V3_PROGRAM_ADDRESS;
|
|
38
|
+
// Original accounts.
|
|
39
|
+
const originalAccounts = {
|
|
40
|
+
evaluator: { value: input.evaluator ?? null, isWritable: false },
|
|
41
|
+
acpState: { value: input.acpState ?? null, isWritable: false },
|
|
42
|
+
job: { value: input.job ?? null, isWritable: true },
|
|
43
|
+
vault: { value: input.vault ?? null, isWritable: true },
|
|
44
|
+
vaultAuthority: { value: input.vaultAuthority ?? null, isWritable: false },
|
|
45
|
+
providerTokenAccount: {
|
|
46
|
+
value: input.providerTokenAccount ?? null,
|
|
47
|
+
isWritable: true,
|
|
48
|
+
},
|
|
49
|
+
treasuryTokenAccount: {
|
|
50
|
+
value: input.treasuryTokenAccount ?? null,
|
|
51
|
+
isWritable: true,
|
|
52
|
+
},
|
|
53
|
+
evaluatorTokenAccount: {
|
|
54
|
+
value: input.evaluatorTokenAccount ?? null,
|
|
55
|
+
isWritable: true,
|
|
56
|
+
},
|
|
57
|
+
platformTreasury: {
|
|
58
|
+
value: input.platformTreasury ?? null,
|
|
59
|
+
isWritable: true,
|
|
60
|
+
},
|
|
61
|
+
tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },
|
|
62
|
+
hookProgram: { value: input.hookProgram ?? null, isWritable: false },
|
|
63
|
+
hookWhitelist: { value: input.hookWhitelist ?? null, isWritable: false },
|
|
64
|
+
};
|
|
65
|
+
const accounts = originalAccounts;
|
|
66
|
+
// Original args.
|
|
67
|
+
const args = { ...input };
|
|
68
|
+
// Resolve default values.
|
|
69
|
+
if (!accounts.acpState.value) {
|
|
70
|
+
accounts.acpState.value = await findAcpStatePda();
|
|
71
|
+
}
|
|
72
|
+
if (!accounts.tokenProgram.value) {
|
|
73
|
+
accounts.tokenProgram.value =
|
|
74
|
+
"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
|
|
75
|
+
}
|
|
76
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
77
|
+
return Object.freeze({
|
|
78
|
+
accounts: [
|
|
79
|
+
getAccountMeta(accounts.evaluator),
|
|
80
|
+
getAccountMeta(accounts.acpState),
|
|
81
|
+
getAccountMeta(accounts.job),
|
|
82
|
+
getAccountMeta(accounts.vault),
|
|
83
|
+
getAccountMeta(accounts.vaultAuthority),
|
|
84
|
+
getAccountMeta(accounts.providerTokenAccount),
|
|
85
|
+
getAccountMeta(accounts.treasuryTokenAccount),
|
|
86
|
+
getAccountMeta(accounts.evaluatorTokenAccount),
|
|
87
|
+
getAccountMeta(accounts.platformTreasury),
|
|
88
|
+
getAccountMeta(accounts.tokenProgram),
|
|
89
|
+
getAccountMeta(accounts.hookProgram),
|
|
90
|
+
getAccountMeta(accounts.hookWhitelist),
|
|
91
|
+
],
|
|
92
|
+
data: getCompleteInstructionDataEncoder().encode(args),
|
|
93
|
+
programAddress,
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
export function getCompleteInstruction(input, config) {
|
|
97
|
+
// Program address.
|
|
98
|
+
const programAddress = config?.programAddress ?? AGENTIC_COMMERCE_V3_PROGRAM_ADDRESS;
|
|
99
|
+
// Original accounts.
|
|
100
|
+
const originalAccounts = {
|
|
101
|
+
evaluator: { value: input.evaluator ?? null, isWritable: false },
|
|
102
|
+
acpState: { value: input.acpState ?? null, isWritable: false },
|
|
103
|
+
job: { value: input.job ?? null, isWritable: true },
|
|
104
|
+
vault: { value: input.vault ?? null, isWritable: true },
|
|
105
|
+
vaultAuthority: { value: input.vaultAuthority ?? null, isWritable: false },
|
|
106
|
+
providerTokenAccount: {
|
|
107
|
+
value: input.providerTokenAccount ?? null,
|
|
108
|
+
isWritable: true,
|
|
109
|
+
},
|
|
110
|
+
treasuryTokenAccount: {
|
|
111
|
+
value: input.treasuryTokenAccount ?? null,
|
|
112
|
+
isWritable: true,
|
|
113
|
+
},
|
|
114
|
+
evaluatorTokenAccount: {
|
|
115
|
+
value: input.evaluatorTokenAccount ?? null,
|
|
116
|
+
isWritable: true,
|
|
117
|
+
},
|
|
118
|
+
platformTreasury: {
|
|
119
|
+
value: input.platformTreasury ?? null,
|
|
120
|
+
isWritable: true,
|
|
121
|
+
},
|
|
122
|
+
tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },
|
|
123
|
+
hookProgram: { value: input.hookProgram ?? null, isWritable: false },
|
|
124
|
+
hookWhitelist: { value: input.hookWhitelist ?? null, isWritable: false },
|
|
125
|
+
};
|
|
126
|
+
const accounts = originalAccounts;
|
|
127
|
+
// Original args.
|
|
128
|
+
const args = { ...input };
|
|
129
|
+
// Resolve default values.
|
|
130
|
+
if (!accounts.tokenProgram.value) {
|
|
131
|
+
accounts.tokenProgram.value =
|
|
132
|
+
"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
|
|
133
|
+
}
|
|
134
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
135
|
+
return Object.freeze({
|
|
136
|
+
accounts: [
|
|
137
|
+
getAccountMeta(accounts.evaluator),
|
|
138
|
+
getAccountMeta(accounts.acpState),
|
|
139
|
+
getAccountMeta(accounts.job),
|
|
140
|
+
getAccountMeta(accounts.vault),
|
|
141
|
+
getAccountMeta(accounts.vaultAuthority),
|
|
142
|
+
getAccountMeta(accounts.providerTokenAccount),
|
|
143
|
+
getAccountMeta(accounts.treasuryTokenAccount),
|
|
144
|
+
getAccountMeta(accounts.evaluatorTokenAccount),
|
|
145
|
+
getAccountMeta(accounts.platformTreasury),
|
|
146
|
+
getAccountMeta(accounts.tokenProgram),
|
|
147
|
+
getAccountMeta(accounts.hookProgram),
|
|
148
|
+
getAccountMeta(accounts.hookWhitelist),
|
|
149
|
+
],
|
|
150
|
+
data: getCompleteInstructionDataEncoder().encode(args),
|
|
151
|
+
programAddress,
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
export function parseCompleteInstruction(instruction) {
|
|
155
|
+
if (instruction.accounts.length < 12) {
|
|
156
|
+
// TODO: Coded error.
|
|
157
|
+
throw new Error("Not enough accounts");
|
|
158
|
+
}
|
|
159
|
+
let accountIndex = 0;
|
|
160
|
+
const getNextAccount = () => {
|
|
161
|
+
const accountMeta = instruction.accounts[accountIndex];
|
|
162
|
+
accountIndex += 1;
|
|
163
|
+
return accountMeta;
|
|
164
|
+
};
|
|
165
|
+
const getNextOptionalAccount = () => {
|
|
166
|
+
const accountMeta = getNextAccount();
|
|
167
|
+
return accountMeta.address === AGENTIC_COMMERCE_V3_PROGRAM_ADDRESS
|
|
168
|
+
? undefined
|
|
169
|
+
: accountMeta;
|
|
170
|
+
};
|
|
171
|
+
return {
|
|
172
|
+
programAddress: instruction.programAddress,
|
|
173
|
+
accounts: {
|
|
174
|
+
evaluator: getNextAccount(),
|
|
175
|
+
acpState: getNextAccount(),
|
|
176
|
+
job: getNextAccount(),
|
|
177
|
+
vault: getNextOptionalAccount(),
|
|
178
|
+
vaultAuthority: getNextOptionalAccount(),
|
|
179
|
+
providerTokenAccount: getNextOptionalAccount(),
|
|
180
|
+
treasuryTokenAccount: getNextOptionalAccount(),
|
|
181
|
+
evaluatorTokenAccount: getNextOptionalAccount(),
|
|
182
|
+
platformTreasury: getNextOptionalAccount(),
|
|
183
|
+
tokenProgram: getNextOptionalAccount(),
|
|
184
|
+
hookProgram: getNextOptionalAccount(),
|
|
185
|
+
hookWhitelist: getNextOptionalAccount(),
|
|
186
|
+
},
|
|
187
|
+
data: getCompleteInstructionDataDecoder().decode(instruction.data),
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
//# sourceMappingURL=complete.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"complete.js","sourceRoot":"","sources":["../../../../../../src/core/solana/generated/acp/instructions/complete.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,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,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,mCAAmC,EAAE,MAAM,sBAAsB,CAAC;AAC3E,OAA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T 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 Codec, type Decoder, type Encoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type Option, type OptionOrNullable, type ReadonlyAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount, type WritableSignerAccount } from "@solana/kit";
|
|
9
|
+
import { AGENTIC_COMMERCE_V3_PROGRAM_ADDRESS } from "../programs/index.js";
|
|
10
|
+
export declare const CREATE_JOB_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
|
|
11
|
+
export declare function getCreateJobDiscriminatorBytes(): ReadonlyUint8Array;
|
|
12
|
+
export type CreateJobInstruction<TProgram extends string = typeof AGENTIC_COMMERCE_V3_PROGRAM_ADDRESS, TAccountClient extends string | AccountMeta<string> = string, TAccountAcpState extends string | AccountMeta<string> = string, TAccountJob extends string | AccountMeta<string> = string, TAccountHookWhitelist extends string | AccountMeta<string> = string, TAccountSystemProgram extends string | AccountMeta<string> = "11111111111111111111111111111111", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
13
|
+
TAccountClient extends string ? WritableSignerAccount<TAccountClient> & AccountSignerMeta<TAccountClient> : TAccountClient,
|
|
14
|
+
TAccountAcpState extends string ? WritableAccount<TAccountAcpState> : TAccountAcpState,
|
|
15
|
+
TAccountJob extends string ? WritableAccount<TAccountJob> : TAccountJob,
|
|
16
|
+
TAccountHookWhitelist extends string ? ReadonlyAccount<TAccountHookWhitelist> : TAccountHookWhitelist,
|
|
17
|
+
TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
|
|
18
|
+
...TRemainingAccounts
|
|
19
|
+
]>;
|
|
20
|
+
export type CreateJobInstructionData = {
|
|
21
|
+
discriminator: ReadonlyUint8Array;
|
|
22
|
+
provider: Address;
|
|
23
|
+
evaluator: Address;
|
|
24
|
+
description: string;
|
|
25
|
+
expiredAt: bigint;
|
|
26
|
+
hookAddress: Option<Address>;
|
|
27
|
+
};
|
|
28
|
+
export type CreateJobInstructionDataArgs = {
|
|
29
|
+
provider: Address;
|
|
30
|
+
evaluator: Address;
|
|
31
|
+
description: string;
|
|
32
|
+
expiredAt: number | bigint;
|
|
33
|
+
hookAddress: OptionOrNullable<Address>;
|
|
34
|
+
};
|
|
35
|
+
export declare function getCreateJobInstructionDataEncoder(): Encoder<CreateJobInstructionDataArgs>;
|
|
36
|
+
export declare function getCreateJobInstructionDataDecoder(): Decoder<CreateJobInstructionData>;
|
|
37
|
+
export declare function getCreateJobInstructionDataCodec(): Codec<CreateJobInstructionDataArgs, CreateJobInstructionData>;
|
|
38
|
+
export type CreateJobAsyncInput<TAccountClient extends string = string, TAccountAcpState extends string = string, TAccountJob extends string = string, TAccountHookWhitelist extends string = string, TAccountSystemProgram extends string = string> = {
|
|
39
|
+
client: TransactionSigner<TAccountClient>;
|
|
40
|
+
acpState?: Address<TAccountAcpState>;
|
|
41
|
+
job: Address<TAccountJob>;
|
|
42
|
+
/** Optional: must be provided if hook_address is Some */
|
|
43
|
+
hookWhitelist?: Address<TAccountHookWhitelist>;
|
|
44
|
+
systemProgram?: Address<TAccountSystemProgram>;
|
|
45
|
+
provider: CreateJobInstructionDataArgs["provider"];
|
|
46
|
+
evaluator: CreateJobInstructionDataArgs["evaluator"];
|
|
47
|
+
description: CreateJobInstructionDataArgs["description"];
|
|
48
|
+
expiredAt: CreateJobInstructionDataArgs["expiredAt"];
|
|
49
|
+
hookAddress: CreateJobInstructionDataArgs["hookAddress"];
|
|
50
|
+
};
|
|
51
|
+
export declare function getCreateJobInstructionAsync<TAccountClient extends string, TAccountAcpState extends string, TAccountJob extends string, TAccountHookWhitelist extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof AGENTIC_COMMERCE_V3_PROGRAM_ADDRESS>(input: CreateJobAsyncInput<TAccountClient, TAccountAcpState, TAccountJob, TAccountHookWhitelist, TAccountSystemProgram>, config?: {
|
|
52
|
+
programAddress?: TProgramAddress;
|
|
53
|
+
}): Promise<CreateJobInstruction<TProgramAddress, TAccountClient, TAccountAcpState, TAccountJob, TAccountHookWhitelist, TAccountSystemProgram>>;
|
|
54
|
+
export type CreateJobInput<TAccountClient extends string = string, TAccountAcpState extends string = string, TAccountJob extends string = string, TAccountHookWhitelist extends string = string, TAccountSystemProgram extends string = string> = {
|
|
55
|
+
client: TransactionSigner<TAccountClient>;
|
|
56
|
+
acpState: Address<TAccountAcpState>;
|
|
57
|
+
job: Address<TAccountJob>;
|
|
58
|
+
/** Optional: must be provided if hook_address is Some */
|
|
59
|
+
hookWhitelist?: Address<TAccountHookWhitelist>;
|
|
60
|
+
systemProgram?: Address<TAccountSystemProgram>;
|
|
61
|
+
provider: CreateJobInstructionDataArgs["provider"];
|
|
62
|
+
evaluator: CreateJobInstructionDataArgs["evaluator"];
|
|
63
|
+
description: CreateJobInstructionDataArgs["description"];
|
|
64
|
+
expiredAt: CreateJobInstructionDataArgs["expiredAt"];
|
|
65
|
+
hookAddress: CreateJobInstructionDataArgs["hookAddress"];
|
|
66
|
+
};
|
|
67
|
+
export declare function getCreateJobInstruction<TAccountClient extends string, TAccountAcpState extends string, TAccountJob extends string, TAccountHookWhitelist extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof AGENTIC_COMMERCE_V3_PROGRAM_ADDRESS>(input: CreateJobInput<TAccountClient, TAccountAcpState, TAccountJob, TAccountHookWhitelist, TAccountSystemProgram>, config?: {
|
|
68
|
+
programAddress?: TProgramAddress;
|
|
69
|
+
}): CreateJobInstruction<TProgramAddress, TAccountClient, TAccountAcpState, TAccountJob, TAccountHookWhitelist, TAccountSystemProgram>;
|
|
70
|
+
export type ParsedCreateJobInstruction<TProgram extends string = typeof AGENTIC_COMMERCE_V3_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
71
|
+
programAddress: Address<TProgram>;
|
|
72
|
+
accounts: {
|
|
73
|
+
client: TAccountMetas[0];
|
|
74
|
+
acpState: TAccountMetas[1];
|
|
75
|
+
job: TAccountMetas[2];
|
|
76
|
+
/** Optional: must be provided if hook_address is Some */
|
|
77
|
+
hookWhitelist?: TAccountMetas[3] | undefined;
|
|
78
|
+
systemProgram: TAccountMetas[4];
|
|
79
|
+
};
|
|
80
|
+
data: CreateJobInstructionData;
|
|
81
|
+
};
|
|
82
|
+
export declare function parseCreateJobInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedCreateJobInstruction<TProgram, TAccountMetas>;
|
|
83
|
+
//# sourceMappingURL=createJob.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createJob.d.ts","sourceRoot":"","sources":["../../../../../../src/core/solana/generated/acp/instructions/createJob.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAqBL,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,MAAM,EACX,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC3B,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,mCAAmC,EAAE,MAAM,sBAAsB,CAAC;AAG3E,eAAO,MAAM,wBAAwB,yBAEnC,CAAC;AAEH,wBAAgB,8BAA8B,uBAE7C;AAED,MAAM,MAAM,oBAAoB,CAC9B,QAAQ,SAAS,MAAM,GAAG,OAAO,mCA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|
|
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 { addDecoderSizePrefix, addEncoderSizePrefix, combineCodec, fixDecoderSize, fixEncoderSize, getAddressDecoder, getAddressEncoder, getBytesDecoder, getBytesEncoder, getI64Decoder, getI64Encoder, getOptionDecoder, getOptionEncoder, getStructDecoder, getStructEncoder, getU32Decoder, getU32Encoder, getUtf8Decoder, getUtf8Encoder, transformEncoder, } from "@solana/kit";
|
|
9
|
+
import { findAcpStatePda } from "../pdas/index.js";
|
|
10
|
+
import { AGENTIC_COMMERCE_V3_PROGRAM_ADDRESS } from "../programs/index.js";
|
|
11
|
+
import { getAccountMetaFactory } from "../shared/index.js";
|
|
12
|
+
export const CREATE_JOB_DISCRIMINATOR = new Uint8Array([
|
|
13
|
+
178, 130, 217, 110, 100, 27, 82, 119,
|
|
14
|
+
]);
|
|
15
|
+
export function getCreateJobDiscriminatorBytes() {
|
|
16
|
+
return fixEncoderSize(getBytesEncoder(), 8).encode(CREATE_JOB_DISCRIMINATOR);
|
|
17
|
+
}
|
|
18
|
+
export function getCreateJobInstructionDataEncoder() {
|
|
19
|
+
return transformEncoder(getStructEncoder([
|
|
20
|
+
["discriminator", fixEncoderSize(getBytesEncoder(), 8)],
|
|
21
|
+
["provider", getAddressEncoder()],
|
|
22
|
+
["evaluator", getAddressEncoder()],
|
|
23
|
+
["description", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],
|
|
24
|
+
["expiredAt", getI64Encoder()],
|
|
25
|
+
["hookAddress", getOptionEncoder(getAddressEncoder())],
|
|
26
|
+
]), (value) => ({ ...value, discriminator: CREATE_JOB_DISCRIMINATOR }));
|
|
27
|
+
}
|
|
28
|
+
export function getCreateJobInstructionDataDecoder() {
|
|
29
|
+
return getStructDecoder([
|
|
30
|
+
["discriminator", fixDecoderSize(getBytesDecoder(), 8)],
|
|
31
|
+
["provider", getAddressDecoder()],
|
|
32
|
+
["evaluator", getAddressDecoder()],
|
|
33
|
+
["description", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],
|
|
34
|
+
["expiredAt", getI64Decoder()],
|
|
35
|
+
["hookAddress", getOptionDecoder(getAddressDecoder())],
|
|
36
|
+
]);
|
|
37
|
+
}
|
|
38
|
+
export function getCreateJobInstructionDataCodec() {
|
|
39
|
+
return combineCodec(getCreateJobInstructionDataEncoder(), getCreateJobInstructionDataDecoder());
|
|
40
|
+
}
|
|
41
|
+
export async function getCreateJobInstructionAsync(input, config) {
|
|
42
|
+
// Program address.
|
|
43
|
+
const programAddress = config?.programAddress ?? AGENTIC_COMMERCE_V3_PROGRAM_ADDRESS;
|
|
44
|
+
// Original accounts.
|
|
45
|
+
const originalAccounts = {
|
|
46
|
+
client: { value: input.client ?? null, isWritable: true },
|
|
47
|
+
acpState: { value: input.acpState ?? null, isWritable: true },
|
|
48
|
+
job: { value: input.job ?? null, isWritable: true },
|
|
49
|
+
hookWhitelist: { value: input.hookWhitelist ?? null, isWritable: false },
|
|
50
|
+
systemProgram: { value: input.systemProgram ?? null, isWritable: false },
|
|
51
|
+
};
|
|
52
|
+
const accounts = originalAccounts;
|
|
53
|
+
// Original args.
|
|
54
|
+
const args = { ...input };
|
|
55
|
+
// Resolve default values.
|
|
56
|
+
if (!accounts.acpState.value) {
|
|
57
|
+
accounts.acpState.value = await findAcpStatePda();
|
|
58
|
+
}
|
|
59
|
+
if (!accounts.systemProgram.value) {
|
|
60
|
+
accounts.systemProgram.value =
|
|
61
|
+
"11111111111111111111111111111111";
|
|
62
|
+
}
|
|
63
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
64
|
+
return Object.freeze({
|
|
65
|
+
accounts: [
|
|
66
|
+
getAccountMeta(accounts.client),
|
|
67
|
+
getAccountMeta(accounts.acpState),
|
|
68
|
+
getAccountMeta(accounts.job),
|
|
69
|
+
getAccountMeta(accounts.hookWhitelist),
|
|
70
|
+
getAccountMeta(accounts.systemProgram),
|
|
71
|
+
],
|
|
72
|
+
data: getCreateJobInstructionDataEncoder().encode(args),
|
|
73
|
+
programAddress,
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
export function getCreateJobInstruction(input, config) {
|
|
77
|
+
// Program address.
|
|
78
|
+
const programAddress = config?.programAddress ?? AGENTIC_COMMERCE_V3_PROGRAM_ADDRESS;
|
|
79
|
+
// Original accounts.
|
|
80
|
+
const originalAccounts = {
|
|
81
|
+
client: { value: input.client ?? null, isWritable: true },
|
|
82
|
+
acpState: { value: input.acpState ?? null, isWritable: true },
|
|
83
|
+
job: { value: input.job ?? null, isWritable: true },
|
|
84
|
+
hookWhitelist: { value: input.hookWhitelist ?? null, isWritable: false },
|
|
85
|
+
systemProgram: { value: input.systemProgram ?? null, isWritable: false },
|
|
86
|
+
};
|
|
87
|
+
const accounts = originalAccounts;
|
|
88
|
+
// Original args.
|
|
89
|
+
const args = { ...input };
|
|
90
|
+
// Resolve default values.
|
|
91
|
+
if (!accounts.systemProgram.value) {
|
|
92
|
+
accounts.systemProgram.value =
|
|
93
|
+
"11111111111111111111111111111111";
|
|
94
|
+
}
|
|
95
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
96
|
+
return Object.freeze({
|
|
97
|
+
accounts: [
|
|
98
|
+
getAccountMeta(accounts.client),
|
|
99
|
+
getAccountMeta(accounts.acpState),
|
|
100
|
+
getAccountMeta(accounts.job),
|
|
101
|
+
getAccountMeta(accounts.hookWhitelist),
|
|
102
|
+
getAccountMeta(accounts.systemProgram),
|
|
103
|
+
],
|
|
104
|
+
data: getCreateJobInstructionDataEncoder().encode(args),
|
|
105
|
+
programAddress,
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
export function parseCreateJobInstruction(instruction) {
|
|
109
|
+
if (instruction.accounts.length < 5) {
|
|
110
|
+
// TODO: Coded error.
|
|
111
|
+
throw new Error("Not enough accounts");
|
|
112
|
+
}
|
|
113
|
+
let accountIndex = 0;
|
|
114
|
+
const getNextAccount = () => {
|
|
115
|
+
const accountMeta = instruction.accounts[accountIndex];
|
|
116
|
+
accountIndex += 1;
|
|
117
|
+
return accountMeta;
|
|
118
|
+
};
|
|
119
|
+
const getNextOptionalAccount = () => {
|
|
120
|
+
const accountMeta = getNextAccount();
|
|
121
|
+
return accountMeta.address === AGENTIC_COMMERCE_V3_PROGRAM_ADDRESS
|
|
122
|
+
? undefined
|
|
123
|
+
: accountMeta;
|
|
124
|
+
};
|
|
125
|
+
return {
|
|
126
|
+
programAddress: instruction.programAddress,
|
|
127
|
+
accounts: {
|
|
128
|
+
client: getNextAccount(),
|
|
129
|
+
acpState: getNextAccount(),
|
|
130
|
+
job: getNextAccount(),
|
|
131
|
+
hookWhitelist: getNextOptionalAccount(),
|
|
132
|
+
systemProgram: getNextAccount(),
|
|
133
|
+
},
|
|
134
|
+
data: getCreateJobInstructionDataDecoder().decode(instruction.data),
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
//# sourceMappingURL=createJob.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createJob.js","sourceRoot":"","sources":["../../../../../../src/core/solana/generated/acp/instructions/createJob.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,YAAY,EACZ,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,cAAc,EACd,cAAc,EACd,gBAAgB,GAiBjB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,mCAAmC,E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AAC,SAAS;YACX,CAAC,CAAC,WAAW,CAAC;IAClB,CAAC,CAAC;IACF,OAAO;QACL,cAAc,EAAE,WAAW,CAAC,cAAc;QAC1C,QAAQ,EAAE;YACR,MAAM,EAAE,cAAc,EAAE;YACxB,QAAQ,EAAE,cAAc,EAAE;YAC1B,GAAG,EAAE,cAAc,EAAE;YACrB,aAAa,EAAE,sBAAsB,EAAE;YACvC,aAAa,EAAE,cAAc,EAAE;SAChC;QACD,IAAI,EAAE,kCAAkC,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC;KACpE,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
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 Codec, type Decoder, type Encoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount, type WritableSignerAccount } from "@solana/kit";
|
|
9
|
+
import { AGENTIC_COMMERCE_V3_PROGRAM_ADDRESS } from "../programs/index.js";
|
|
10
|
+
export declare const FUND_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
|
|
11
|
+
export declare function getFundDiscriminatorBytes(): ReadonlyUint8Array;
|
|
12
|
+
export type FundInstruction<TProgram extends string = typeof AGENTIC_COMMERCE_V3_PROGRAM_ADDRESS, TAccountClient extends string | AccountMeta<string> = string, TAccountJob extends string | AccountMeta<string> = string, TAccountClientTokenAccount extends string | AccountMeta<string> = string, TAccountVault extends string | AccountMeta<string> = string, TAccountVaultAuthority extends string | AccountMeta<string> = string, TAccountMint extends string | AccountMeta<string> = string, TAccountTokenProgram extends string | AccountMeta<string> = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", TAccountSystemProgram extends string | AccountMeta<string> = "11111111111111111111111111111111", TAccountHookProgram extends string | AccountMeta<string> = string, TAccountHookWhitelist extends string | AccountMeta<string> = string, TAccountHookDelegate extends string | AccountMeta<string> = string, TAccountDelegateWhitelist extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
13
|
+
TAccountClient extends string ? WritableSignerAccount<TAccountClient> & AccountSignerMeta<TAccountClient> : TAccountClient,
|
|
14
|
+
TAccountJob extends string ? WritableAccount<TAccountJob> : TAccountJob,
|
|
15
|
+
TAccountClientTokenAccount extends string ? WritableAccount<TAccountClientTokenAccount> : TAccountClientTokenAccount,
|
|
16
|
+
TAccountVault extends string ? WritableAccount<TAccountVault> : TAccountVault,
|
|
17
|
+
TAccountVaultAuthority extends string ? ReadonlyAccount<TAccountVaultAuthority> : TAccountVaultAuthority,
|
|
18
|
+
TAccountMint extends string ? ReadonlyAccount<TAccountMint> : TAccountMint,
|
|
19
|
+
TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram,
|
|
20
|
+
TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
|
|
21
|
+
TAccountHookProgram extends string ? ReadonlyAccount<TAccountHookProgram> : TAccountHookProgram,
|
|
22
|
+
TAccountHookWhitelist extends string ? ReadonlyAccount<TAccountHookWhitelist> : TAccountHookWhitelist,
|
|
23
|
+
TAccountHookDelegate extends string ? ReadonlyAccount<TAccountHookDelegate> : TAccountHookDelegate,
|
|
24
|
+
TAccountDelegateWhitelist extends string ? ReadonlyAccount<TAccountDelegateWhitelist> : TAccountDelegateWhitelist,
|
|
25
|
+
...TRemainingAccounts
|
|
26
|
+
]>;
|
|
27
|
+
export type FundInstructionData = {
|
|
28
|
+
discriminator: ReadonlyUint8Array;
|
|
29
|
+
expectedBudget: bigint;
|
|
30
|
+
optParams: ReadonlyUint8Array;
|
|
31
|
+
};
|
|
32
|
+
export type FundInstructionDataArgs = {
|
|
33
|
+
expectedBudget: number | bigint;
|
|
34
|
+
optParams: ReadonlyUint8Array;
|
|
35
|
+
};
|
|
36
|
+
export declare function getFundInstructionDataEncoder(): Encoder<FundInstructionDataArgs>;
|
|
37
|
+
export declare function getFundInstructionDataDecoder(): Decoder<FundInstructionData>;
|
|
38
|
+
export declare function getFundInstructionDataCodec(): Codec<FundInstructionDataArgs, FundInstructionData>;
|
|
39
|
+
export type FundInput<TAccountClient extends string = string, TAccountJob extends string = string, TAccountClientTokenAccount extends string = string, TAccountVault extends string = string, TAccountVaultAuthority extends string = string, TAccountMint extends string = string, TAccountTokenProgram extends string = string, TAccountSystemProgram extends string = string, TAccountHookProgram extends string = string, TAccountHookWhitelist extends string = string, TAccountHookDelegate extends string = string, TAccountDelegateWhitelist extends string = string> = {
|
|
40
|
+
client: TransactionSigner<TAccountClient>;
|
|
41
|
+
job: Address<TAccountJob>;
|
|
42
|
+
/** Optional: required when budget > 0 */
|
|
43
|
+
clientTokenAccount?: Address<TAccountClientTokenAccount>;
|
|
44
|
+
/** Optional: required when budget > 0 (init vault for escrow) */
|
|
45
|
+
vault?: Address<TAccountVault>;
|
|
46
|
+
vaultAuthority?: Address<TAccountVaultAuthority>;
|
|
47
|
+
mint?: Address<TAccountMint>;
|
|
48
|
+
tokenProgram?: Address<TAccountTokenProgram>;
|
|
49
|
+
systemProgram?: Address<TAccountSystemProgram>;
|
|
50
|
+
hookProgram?: Address<TAccountHookProgram>;
|
|
51
|
+
hookWhitelist?: Address<TAccountHookWhitelist>;
|
|
52
|
+
/**
|
|
53
|
+
* or by a whitelisted sub-hook program (multi-hook router). Required when hook is
|
|
54
|
+
* present and budget > 0. The ACP program approves this PDA as delegate on
|
|
55
|
+
* client_token_account for budget_amount (F-25 fix).
|
|
56
|
+
*/
|
|
57
|
+
hookDelegate?: Address<TAccountHookDelegate>;
|
|
58
|
+
/**
|
|
59
|
+
* using MultiHookRouter -- the delegate is owned by a sub-hook, not the router.
|
|
60
|
+
* Validated as ["hook_whitelist", delegate_owner] inside approve_hook_delegate.
|
|
61
|
+
*/
|
|
62
|
+
delegateWhitelist?: Address<TAccountDelegateWhitelist>;
|
|
63
|
+
expectedBudget: FundInstructionDataArgs["expectedBudget"];
|
|
64
|
+
optParams: FundInstructionDataArgs["optParams"];
|
|
65
|
+
};
|
|
66
|
+
export declare function getFundInstruction<TAccountClient extends string, TAccountJob extends string, TAccountClientTokenAccount extends string, TAccountVault extends string, TAccountVaultAuthority extends string, TAccountMint extends string, TAccountTokenProgram extends string, TAccountSystemProgram extends string, TAccountHookProgram extends string, TAccountHookWhitelist extends string, TAccountHookDelegate extends string, TAccountDelegateWhitelist extends string, TProgramAddress extends Address = typeof AGENTIC_COMMERCE_V3_PROGRAM_ADDRESS>(input: FundInput<TAccountClient, TAccountJob, TAccountClientTokenAccount, TAccountVault, TAccountVaultAuthority, TAccountMint, TAccountTokenProgram, TAccountSystemProgram, TAccountHookProgram, TAccountHookWhitelist, TAccountHookDelegate, TAccountDelegateWhitelist>, config?: {
|
|
67
|
+
programAddress?: TProgramAddress;
|
|
68
|
+
}): FundInstruction<TProgramAddress, TAccountClient, TAccountJob, TAccountClientTokenAccount, TAccountVault, TAccountVaultAuthority, TAccountMint, TAccountTokenProgram, TAccountSystemProgram, TAccountHookProgram, TAccountHookWhitelist, TAccountHookDelegate, TAccountDelegateWhitelist>;
|
|
69
|
+
export type ParsedFundInstruction<TProgram extends string = typeof AGENTIC_COMMERCE_V3_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
70
|
+
programAddress: Address<TProgram>;
|
|
71
|
+
accounts: {
|
|
72
|
+
client: TAccountMetas[0];
|
|
73
|
+
job: TAccountMetas[1];
|
|
74
|
+
/** Optional: required when budget > 0 */
|
|
75
|
+
clientTokenAccount?: TAccountMetas[2] | undefined;
|
|
76
|
+
/** Optional: required when budget > 0 (init vault for escrow) */
|
|
77
|
+
vault?: TAccountMetas[3] | undefined;
|
|
78
|
+
vaultAuthority?: TAccountMetas[4] | undefined;
|
|
79
|
+
mint?: TAccountMetas[5] | undefined;
|
|
80
|
+
tokenProgram?: TAccountMetas[6] | undefined;
|
|
81
|
+
systemProgram: TAccountMetas[7];
|
|
82
|
+
hookProgram?: TAccountMetas[8] | undefined;
|
|
83
|
+
hookWhitelist?: TAccountMetas[9] | undefined;
|
|
84
|
+
/**
|
|
85
|
+
* or by a whitelisted sub-hook program (multi-hook router). Required when hook is
|
|
86
|
+
* present and budget > 0. The ACP program approves this PDA as delegate on
|
|
87
|
+
* client_token_account for budget_amount (F-25 fix).
|
|
88
|
+
*/
|
|
89
|
+
hookDelegate?: TAccountMetas[10] | undefined;
|
|
90
|
+
/**
|
|
91
|
+
* using MultiHookRouter -- the delegate is owned by a sub-hook, not the router.
|
|
92
|
+
* Validated as ["hook_whitelist", delegate_owner] inside approve_hook_delegate.
|
|
93
|
+
*/
|
|
94
|
+
delegateWhitelist?: TAccountMetas[11] | undefined;
|
|
95
|
+
};
|
|
96
|
+
data: FundInstructionData;
|
|
97
|
+
};
|
|
98
|
+
export declare function parseFundInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedFundInstruction<TProgram, TAccountMetas>;
|
|
99
|
+
//# sourceMappingURL=fund.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fund.d.ts","sourceRoot":"","sources":["../../../../../../src/core/solana/generated/acp/instructions/fund.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAeL,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK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