@coinbase/cdp-sdk 1.44.1 → 1.46.0
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/CHANGELOG.md +28 -2
- package/README.md +164 -43
- package/_cjs/accounts/evm/eip6492.js +49 -0
- package/_cjs/accounts/evm/eip6492.js.map +1 -0
- package/_cjs/accounts/evm/toEvmDelegatedAccount.js +27 -0
- package/_cjs/accounts/evm/toEvmDelegatedAccount.js.map +1 -0
- package/_cjs/accounts/evm/toEvmServerAccount.js +127 -55
- package/_cjs/accounts/evm/toEvmServerAccount.js.map +1 -1
- package/_cjs/accounts/evm/toEvmSmartAccount.js +115 -45
- package/_cjs/accounts/evm/toEvmSmartAccount.js.map +1 -1
- package/_cjs/accounts/evm/toNetworkScopedEvmSmartAccount.js +31 -0
- package/_cjs/accounts/evm/toNetworkScopedEvmSmartAccount.js.map +1 -1
- package/_cjs/accounts/solana/toSolanaAccount.js +49 -19
- package/_cjs/accounts/solana/toSolanaAccount.js.map +1 -1
- package/_cjs/actions/evm/waitForEvmEip7702DelegationStatus.js +37 -0
- package/_cjs/actions/evm/waitForEvmEip7702DelegationStatus.js.map +1 -0
- package/_cjs/actions/solana/transfer.js.map +1 -1
- package/_cjs/actions/solana/utils.js +9 -9
- package/_cjs/actions/solana/utils.js.map +1 -1
- package/_cjs/analytics.js +10 -228
- package/_cjs/analytics.js.map +1 -1
- package/_cjs/auth/utils/http.js +1 -0
- package/_cjs/auth/utils/http.js.map +1 -1
- package/_cjs/client/cdp.js +4 -7
- package/_cjs/client/cdp.js.map +1 -1
- package/_cjs/client/end-user/endUser.js +385 -4
- package/_cjs/client/end-user/endUser.js.map +1 -1
- package/_cjs/client/end-user/toEndUserAccount.js +201 -23
- package/_cjs/client/end-user/toEndUserAccount.js.map +1 -1
- package/_cjs/client/evm/evm.js +482 -227
- package/_cjs/client/evm/evm.js.map +1 -1
- package/_cjs/client/policies/policies.js +41 -11
- package/_cjs/client/policies/policies.js.map +1 -1
- package/_cjs/client/solana/solana.js +215 -118
- package/_cjs/client/solana/solana.js.map +1 -1
- package/_cjs/index.js +3 -1
- package/_cjs/index.js.map +1 -1
- package/_cjs/openapi-client/cdpApiClient.js +32 -0
- package/_cjs/openapi-client/cdpApiClient.js.map +1 -1
- package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +178 -9
- package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
- package/_cjs/openapi-client/generated/embedded-wallets-core-functionality/embedded-wallets-core-functionality.js +261 -0
- package/_cjs/openapi-client/generated/embedded-wallets-core-functionality/embedded-wallets-core-functionality.js.map +1 -0
- package/_cjs/openapi-client/generated/end-user-accounts/end-user-accounts.js.map +1 -1
- package/_cjs/openapi-client/generated/evm-accounts/evm-accounts.js +30 -1
- package/_cjs/openapi-client/generated/evm-accounts/evm-accounts.js.map +1 -1
- package/_cjs/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js +2 -2
- package/_cjs/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js.map +1 -1
- package/_cjs/openapi-client/generated/evm-swaps/evm-swaps.js.map +1 -1
- package/_cjs/openapi-client/generated/evm-token-balances/evm-token-balances.js.map +1 -1
- package/_cjs/openapi-client/generated/faucets/faucets.js +6 -5
- package/_cjs/openapi-client/generated/faucets/faucets.js.map +1 -1
- package/_cjs/openapi-client/generated/onchain-data/onchain-data.js.map +1 -1
- package/_cjs/openapi-client/generated/onramp/onramp.js +15 -1
- package/_cjs/openapi-client/generated/onramp/onramp.js.map +1 -1
- package/_cjs/openapi-client/generated/policy-engine/policy-engine.js.map +1 -1
- package/_cjs/openapi-client/generated/solana-accounts/solana-accounts.js.map +1 -1
- package/_cjs/openapi-client/generated/solana-token-balances/solana-token-balances.js.map +1 -1
- package/_cjs/openapi-client/generated/sql-api/sql-api.js +75 -0
- package/_cjs/openapi-client/generated/sql-api/sql-api.js.map +1 -0
- package/_cjs/openapi-client/generated/webhooks/webhooks.js.map +1 -1
- package/_cjs/openapi-client/generated/x402-facilitator/x402-facilitator.js.map +1 -1
- package/_cjs/openapi-client/index.js +4 -1
- package/_cjs/openapi-client/index.js.map +1 -1
- package/_cjs/policies/evmSchema.js +127 -1
- package/_cjs/policies/evmSchema.js.map +1 -1
- package/_cjs/policies/solanaSchema.js +102 -1
- package/_cjs/policies/solanaSchema.js.map +1 -1
- package/_cjs/policies/types.js +7 -0
- package/_cjs/policies/types.js.map +1 -1
- package/_cjs/utils/export.js +6 -5
- package/_cjs/utils/export.js.map +1 -1
- package/_cjs/version.js +1 -1
- package/_esm/accounts/evm/eip6492.js +46 -0
- package/_esm/accounts/evm/eip6492.js.map +1 -0
- package/_esm/accounts/evm/toEvmDelegatedAccount.js +24 -0
- package/_esm/accounts/evm/toEvmDelegatedAccount.js.map +1 -0
- package/_esm/accounts/evm/toEvmServerAccount.js +127 -55
- package/_esm/accounts/evm/toEvmServerAccount.js.map +1 -1
- package/_esm/accounts/evm/toEvmSmartAccount.js +115 -45
- package/_esm/accounts/evm/toEvmSmartAccount.js.map +1 -1
- package/_esm/accounts/evm/toNetworkScopedEvmSmartAccount.js +31 -0
- package/_esm/accounts/evm/toNetworkScopedEvmSmartAccount.js.map +1 -1
- package/_esm/accounts/solana/toSolanaAccount.js +49 -19
- package/_esm/accounts/solana/toSolanaAccount.js.map +1 -1
- package/_esm/actions/evm/waitForEvmEip7702DelegationStatus.js +34 -0
- package/_esm/actions/evm/waitForEvmEip7702DelegationStatus.js.map +1 -0
- package/_esm/actions/solana/transfer.js.map +1 -1
- package/_esm/actions/solana/utils.js +9 -9
- package/_esm/actions/solana/utils.js.map +1 -1
- package/_esm/analytics.js +9 -227
- package/_esm/analytics.js.map +1 -1
- package/_esm/auth/utils/http.js +1 -0
- package/_esm/auth/utils/http.js.map +1 -1
- package/_esm/client/cdp.js +4 -7
- package/_esm/client/cdp.js.map +1 -1
- package/_esm/client/end-user/endUser.js +385 -4
- package/_esm/client/end-user/endUser.js.map +1 -1
- package/_esm/client/end-user/toEndUserAccount.js +201 -23
- package/_esm/client/end-user/toEndUserAccount.js.map +1 -1
- package/_esm/client/evm/evm.js +482 -227
- package/_esm/client/evm/evm.js.map +1 -1
- package/_esm/client/policies/policies.js +41 -11
- package/_esm/client/policies/policies.js.map +1 -1
- package/_esm/client/solana/solana.js +215 -118
- package/_esm/client/solana/solana.js.map +1 -1
- package/_esm/index.js +1 -0
- package/_esm/index.js.map +1 -1
- package/_esm/openapi-client/cdpApiClient.js +32 -0
- package/_esm/openapi-client/cdpApiClient.js.map +1 -1
- package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +175 -7
- package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
- package/_esm/openapi-client/generated/embedded-wallets-core-functionality/embedded-wallets-core-functionality.js +243 -0
- package/_esm/openapi-client/generated/embedded-wallets-core-functionality/embedded-wallets-core-functionality.js.map +1 -0
- package/_esm/openapi-client/generated/end-user-accounts/end-user-accounts.js.map +1 -1
- package/_esm/openapi-client/generated/evm-accounts/evm-accounts.js +27 -0
- package/_esm/openapi-client/generated/evm-accounts/evm-accounts.js.map +1 -1
- package/_esm/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js +2 -2
- package/_esm/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js.map +1 -1
- package/_esm/openapi-client/generated/evm-swaps/evm-swaps.js.map +1 -1
- package/_esm/openapi-client/generated/evm-token-balances/evm-token-balances.js.map +1 -1
- package/_esm/openapi-client/generated/faucets/faucets.js +6 -5
- package/_esm/openapi-client/generated/faucets/faucets.js.map +1 -1
- package/_esm/openapi-client/generated/onchain-data/onchain-data.js.map +1 -1
- package/_esm/openapi-client/generated/onramp/onramp.js +13 -0
- package/_esm/openapi-client/generated/onramp/onramp.js.map +1 -1
- package/_esm/openapi-client/generated/policy-engine/policy-engine.js.map +1 -1
- package/_esm/openapi-client/generated/solana-accounts/solana-accounts.js.map +1 -1
- package/_esm/openapi-client/generated/solana-token-balances/solana-token-balances.js.map +1 -1
- package/_esm/openapi-client/generated/sql-api/sql-api.js +70 -0
- package/_esm/openapi-client/generated/sql-api/sql-api.js.map +1 -0
- package/_esm/openapi-client/generated/webhooks/webhooks.js.map +1 -1
- package/_esm/openapi-client/generated/x402-facilitator/x402-facilitator.js.map +1 -1
- package/_esm/openapi-client/index.js +4 -1
- package/_esm/openapi-client/index.js.map +1 -1
- package/_esm/policies/evmSchema.js +126 -0
- package/_esm/policies/evmSchema.js.map +1 -1
- package/_esm/policies/solanaSchema.js +101 -0
- package/_esm/policies/solanaSchema.js.map +1 -1
- package/_esm/policies/types.js +9 -2
- package/_esm/policies/types.js.map +1 -1
- package/_esm/utils/export.js +6 -5
- package/_esm/utils/export.js.map +1 -1
- package/_esm/version.js +1 -1
- package/_types/accounts/evm/eip6492.d.ts +17 -0
- package/_types/accounts/evm/eip6492.d.ts.map +1 -0
- package/_types/accounts/evm/toEvmDelegatedAccount.d.ts +13 -0
- package/_types/accounts/evm/toEvmDelegatedAccount.d.ts.map +1 -0
- package/_types/accounts/evm/toEvmServerAccount.d.ts.map +1 -1
- package/_types/accounts/evm/toEvmSmartAccount.d.ts.map +1 -1
- package/_types/accounts/evm/toNetworkScopedEvmSmartAccount.d.ts +4 -4
- package/_types/accounts/evm/toNetworkScopedEvmSmartAccount.d.ts.map +1 -1
- package/_types/accounts/evm/types.d.ts +3 -2
- package/_types/accounts/evm/types.d.ts.map +1 -1
- package/_types/accounts/solana/toSolanaAccount.d.ts.map +1 -1
- package/_types/actions/evm/waitForEvmEip7702DelegationStatus.d.ts +32 -0
- package/_types/actions/evm/waitForEvmEip7702DelegationStatus.d.ts.map +1 -0
- package/_types/actions/solana/transfer.d.ts +3 -4
- package/_types/actions/solana/transfer.d.ts.map +1 -1
- package/_types/actions/solana/types.d.ts +79 -29
- package/_types/actions/solana/types.d.ts.map +1 -1
- package/_types/actions/solana/utils.d.ts +10 -9
- package/_types/actions/solana/utils.d.ts.map +1 -1
- package/_types/analytics.d.ts +5 -38
- package/_types/analytics.d.ts.map +1 -1
- package/_types/auth/utils/http.d.ts.map +1 -1
- package/_types/client/cdp.d.ts +4 -0
- package/_types/client/cdp.d.ts.map +1 -1
- package/_types/client/end-user/endUser.d.ts +272 -1
- package/_types/client/end-user/endUser.d.ts.map +1 -1
- package/_types/client/end-user/endUser.types.d.ts +491 -1
- package/_types/client/end-user/endUser.types.d.ts.map +1 -1
- package/_types/client/end-user/toEndUserAccount.d.ts +4 -1
- package/_types/client/end-user/toEndUserAccount.d.ts.map +1 -1
- package/_types/client/evm/evm.d.ts +54 -1
- package/_types/client/evm/evm.d.ts.map +1 -1
- package/_types/client/evm/evm.types.d.ts +29 -2
- package/_types/client/evm/evm.types.d.ts.map +1 -1
- package/_types/client/policies/policies.d.ts.map +1 -1
- package/_types/client/solana/solana.d.ts +38 -12
- package/_types/client/solana/solana.d.ts.map +1 -1
- package/_types/index.d.ts +3 -1
- package/_types/index.d.ts.map +1 -1
- package/_types/openapi-client/cdpApiClient.d.ts.map +1 -1
- package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts +884 -90
- package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts.map +1 -1
- package/_types/openapi-client/generated/embedded-wallets-core-functionality/embedded-wallets-core-functionality.d.ts +163 -0
- package/_types/openapi-client/generated/embedded-wallets-core-functionality/embedded-wallets-core-functionality.d.ts.map +1 -0
- package/_types/openapi-client/generated/end-user-accounts/end-user-accounts.d.ts +9 -9
- package/_types/openapi-client/generated/end-user-accounts/end-user-accounts.d.ts.map +1 -1
- package/_types/openapi-client/generated/evm-accounts/evm-accounts.d.ts +35 -15
- package/_types/openapi-client/generated/evm-accounts/evm-accounts.d.ts.map +1 -1
- package/_types/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.d.ts +14 -14
- package/_types/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.d.ts.map +1 -1
- package/_types/openapi-client/generated/evm-swaps/evm-swaps.d.ts +3 -3
- package/_types/openapi-client/generated/evm-swaps/evm-swaps.d.ts.map +1 -1
- package/_types/openapi-client/generated/evm-token-balances/evm-token-balances.d.ts +2 -2
- package/_types/openapi-client/generated/evm-token-balances/evm-token-balances.d.ts.map +1 -1
- package/_types/openapi-client/generated/faucets/faucets.d.ts +9 -8
- package/_types/openapi-client/generated/faucets/faucets.d.ts.map +1 -1
- package/_types/openapi-client/generated/onchain-data/onchain-data.d.ts +3 -3
- package/_types/openapi-client/generated/onchain-data/onchain-data.d.ts.map +1 -1
- package/_types/openapi-client/generated/onramp/onramp.d.ts +12 -5
- package/_types/openapi-client/generated/onramp/onramp.d.ts.map +1 -1
- package/_types/openapi-client/generated/policy-engine/policy-engine.d.ts +6 -6
- package/_types/openapi-client/generated/policy-engine/policy-engine.d.ts.map +1 -1
- package/_types/openapi-client/generated/solana-accounts/solana-accounts.d.ts +12 -12
- package/_types/openapi-client/generated/solana-accounts/solana-accounts.d.ts.map +1 -1
- package/_types/openapi-client/generated/solana-token-balances/solana-token-balances.d.ts +2 -2
- package/_types/openapi-client/generated/solana-token-balances/solana-token-balances.d.ts.map +1 -1
- package/_types/openapi-client/generated/sql-api/sql-api.d.ts +73 -0
- package/_types/openapi-client/generated/sql-api/sql-api.d.ts.map +1 -0
- package/_types/openapi-client/generated/webhooks/webhooks.d.ts +6 -6
- package/_types/openapi-client/generated/webhooks/webhooks.d.ts.map +1 -1
- package/_types/openapi-client/generated/x402-facilitator/x402-facilitator.d.ts +4 -4
- package/_types/openapi-client/generated/x402-facilitator/x402-facilitator.d.ts.map +1 -1
- package/_types/openapi-client/index.d.ts +23 -3
- package/_types/openapi-client/index.d.ts.map +1 -1
- package/_types/policies/evmSchema.d.ts +3128 -1064
- package/_types/policies/evmSchema.d.ts.map +1 -1
- package/_types/policies/solanaSchema.d.ts +1411 -47
- package/_types/policies/solanaSchema.d.ts.map +1 -1
- package/_types/policies/types.d.ts +8427 -2942
- package/_types/policies/types.d.ts.map +1 -1
- package/_types/types/contract.d.ts.map +1 -1
- package/_types/utils/export.d.ts +1 -1
- package/_types/utils/export.d.ts.map +1 -1
- package/_types/version.d.ts +1 -1
- package/accounts/evm/eip6492.ts +60 -0
- package/accounts/evm/toEvmDelegatedAccount.ts +26 -0
- package/accounts/evm/toEvmServerAccount.ts +115 -67
- package/accounts/evm/toEvmSmartAccount.ts +114 -57
- package/accounts/evm/toNetworkScopedEvmSmartAccount.ts +44 -5
- package/accounts/evm/types.ts +8 -3
- package/accounts/solana/toSolanaAccount.ts +44 -24
- package/actions/evm/waitForEvmEip7702DelegationStatus.ts +57 -0
- package/actions/solana/transfer.ts +3 -3
- package/actions/solana/types.ts +79 -29
- package/actions/solana/utils.ts +13 -11
- package/analytics.ts +8 -294
- package/auth/utils/http.ts +1 -0
- package/client/cdp.ts +6 -8
- package/client/end-user/endUser.ts +513 -4
- package/client/end-user/endUser.types.ts +598 -0
- package/client/end-user/toEndUserAccount.ts +330 -26
- package/client/evm/evm.ts +517 -282
- package/client/evm/evm.types.ts +45 -2
- package/client/policies/policies.ts +41 -16
- package/client/solana/solana.ts +233 -153
- package/index.ts +36 -1
- package/openapi-client/cdpApiClient.ts +34 -0
- package/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.ts +1155 -172
- package/openapi-client/generated/embedded-wallets-core-functionality/embedded-wallets-core-functionality.ts +455 -0
- package/openapi-client/generated/end-user-accounts/end-user-accounts.ts +12 -9
- package/openapi-client/generated/evm-accounts/evm-accounts.ts +66 -14
- package/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.ts +16 -16
- package/openapi-client/generated/evm-swaps/evm-swaps.ts +3 -3
- package/openapi-client/generated/evm-token-balances/evm-token-balances.ts +2 -2
- package/openapi-client/generated/faucets/faucets.ts +9 -8
- package/openapi-client/generated/onchain-data/onchain-data.ts +3 -3
- package/openapi-client/generated/onramp/onramp.ts +28 -4
- package/openapi-client/generated/policy-engine/policy-engine.ts +12 -6
- package/openapi-client/generated/solana-accounts/solana-accounts.ts +12 -12
- package/openapi-client/generated/solana-token-balances/solana-token-balances.ts +2 -2
- package/openapi-client/generated/sql-api/sql-api.ts +92 -0
- package/openapi-client/generated/webhooks/webhooks.ts +6 -6
- package/openapi-client/generated/x402-facilitator/x402-facilitator.ts +6 -4
- package/openapi-client/index.ts +4 -1
- package/package.json +7 -8
- package/policies/evmSchema.ts +164 -0
- package/policies/solanaSchema.ts +130 -0
- package/policies/types.ts +14 -0
- package/types/contract.ts +2 -4
- package/utils/export.ts +6 -5
- package/version.ts +1 -1
- package/_cjs/openapi-client/generated/sql-api-alpha/sql-api-alpha.js +0 -55
- package/_cjs/openapi-client/generated/sql-api-alpha/sql-api-alpha.js.map +0 -1
- package/_esm/openapi-client/generated/sql-api-alpha/sql-api-alpha.js +0 -50
- package/_esm/openapi-client/generated/sql-api-alpha/sql-api-alpha.js.map +0 -1
- package/_types/openapi-client/generated/sql-api-alpha/sql-api-alpha.d.ts +0 -53
- package/_types/openapi-client/generated/sql-api-alpha/sql-api-alpha.d.ts.map +0 -1
- package/openapi-client/generated/sql-api-alpha/sql-api-alpha.ts +0 -72
|
@@ -1088,20 +1088,1406 @@ export declare const SendSolTransactionCriteriaSchema: z.ZodArray<z.ZodDiscrimin
|
|
|
1088
1088
|
* Can contain up to 10 individual criterion objects for Solana addresses, SOL values, SPL addresses, SPL values, mint addresses, Solana data, program IDs, and network restrictions.
|
|
1089
1089
|
*/
|
|
1090
1090
|
export type SendSolTransactionCriteria = z.infer<typeof SendSolTransactionCriteriaSchema>;
|
|
1091
|
+
/**
|
|
1092
|
+
* Schema for criteria used in SignEndUserSolTransaction operations
|
|
1093
|
+
*/
|
|
1094
|
+
export declare const SignEndUserSolTransactionCriteriaSchema: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
1095
|
+
/** The type of criterion, must be "solAddress" for Solana address-based rules. */
|
|
1096
|
+
type: z.ZodLiteral<"solAddress">;
|
|
1097
|
+
/**
|
|
1098
|
+
* Array of Solana addresses to compare against.
|
|
1099
|
+
* Each address must be a valid Base58-encoded Solana address (32-44 characters).
|
|
1100
|
+
*/
|
|
1101
|
+
addresses: z.ZodArray<z.ZodString, "many">;
|
|
1102
|
+
/**
|
|
1103
|
+
* The operator to use for evaluating transaction addresses.
|
|
1104
|
+
* "in" checks if an address is in the provided list.
|
|
1105
|
+
* "not in" checks if an address is not in the provided list.
|
|
1106
|
+
*/
|
|
1107
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
1108
|
+
}, "strip", z.ZodTypeAny, {
|
|
1109
|
+
type: "solAddress";
|
|
1110
|
+
operator: "in" | "not in";
|
|
1111
|
+
addresses: string[];
|
|
1112
|
+
}, {
|
|
1113
|
+
type: "solAddress";
|
|
1114
|
+
operator: "in" | "not in";
|
|
1115
|
+
addresses: string[];
|
|
1116
|
+
}>, z.ZodObject<{
|
|
1117
|
+
/** The type of criterion, must be "solValue" for SOL value-based rules. */
|
|
1118
|
+
type: z.ZodLiteral<"solValue">;
|
|
1119
|
+
/**
|
|
1120
|
+
* The SOL value amount in lamports to compare against, as a string.
|
|
1121
|
+
* Must contain only digits.
|
|
1122
|
+
*/
|
|
1123
|
+
solValue: z.ZodString;
|
|
1124
|
+
/** The comparison operator to use for evaluating transaction SOL values against the threshold. */
|
|
1125
|
+
operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
|
|
1126
|
+
}, "strip", z.ZodTypeAny, {
|
|
1127
|
+
solValue: string;
|
|
1128
|
+
type: "solValue";
|
|
1129
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1130
|
+
}, {
|
|
1131
|
+
solValue: string;
|
|
1132
|
+
type: "solValue";
|
|
1133
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1134
|
+
}>, z.ZodObject<{
|
|
1135
|
+
/** The type of criterion, must be "splAddress" for SPL address-based rules. */
|
|
1136
|
+
type: z.ZodLiteral<"splAddress">;
|
|
1137
|
+
/**
|
|
1138
|
+
* Array of Solana addresses to compare against for SPL token transfer recipients.
|
|
1139
|
+
* Each address must be a valid Base58-encoded Solana address (32-44 characters).
|
|
1140
|
+
*/
|
|
1141
|
+
addresses: z.ZodArray<z.ZodString, "many">;
|
|
1142
|
+
/**
|
|
1143
|
+
* The operator to use for evaluating SPL token transfer recipient addresses.
|
|
1144
|
+
* "in" checks if an address is in the provided list.
|
|
1145
|
+
* "not in" checks if an address is not in the provided list.
|
|
1146
|
+
*/
|
|
1147
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
1148
|
+
}, "strip", z.ZodTypeAny, {
|
|
1149
|
+
type: "splAddress";
|
|
1150
|
+
operator: "in" | "not in";
|
|
1151
|
+
addresses: string[];
|
|
1152
|
+
}, {
|
|
1153
|
+
type: "splAddress";
|
|
1154
|
+
operator: "in" | "not in";
|
|
1155
|
+
addresses: string[];
|
|
1156
|
+
}>, z.ZodObject<{
|
|
1157
|
+
/** The type of criterion, must be "splValue" for SPL token value-based rules. */
|
|
1158
|
+
type: z.ZodLiteral<"splValue">;
|
|
1159
|
+
/**
|
|
1160
|
+
* The SPL token value amount to compare against, as a string.
|
|
1161
|
+
* Must contain only digits.
|
|
1162
|
+
*/
|
|
1163
|
+
splValue: z.ZodString;
|
|
1164
|
+
/** The comparison operator to use for evaluating SPL token values against the threshold. */
|
|
1165
|
+
operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
|
|
1166
|
+
}, "strip", z.ZodTypeAny, {
|
|
1167
|
+
splValue: string;
|
|
1168
|
+
type: "splValue";
|
|
1169
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1170
|
+
}, {
|
|
1171
|
+
splValue: string;
|
|
1172
|
+
type: "splValue";
|
|
1173
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1174
|
+
}>, z.ZodObject<{
|
|
1175
|
+
/** The type of criterion, must be "mintAddress" for token mint address-based rules. */
|
|
1176
|
+
type: z.ZodLiteral<"mintAddress">;
|
|
1177
|
+
/**
|
|
1178
|
+
* Array of Solana addresses to compare against for token mint addresses.
|
|
1179
|
+
* Each address must be a valid Base58-encoded Solana address (32-44 characters).
|
|
1180
|
+
*/
|
|
1181
|
+
addresses: z.ZodArray<z.ZodString, "many">;
|
|
1182
|
+
/**
|
|
1183
|
+
* The operator to use for evaluating token mint addresses.
|
|
1184
|
+
* "in" checks if an address is in the provided list.
|
|
1185
|
+
* "not in" checks if an address is not in the provided list.
|
|
1186
|
+
*/
|
|
1187
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
1188
|
+
}, "strip", z.ZodTypeAny, {
|
|
1189
|
+
type: "mintAddress";
|
|
1190
|
+
operator: "in" | "not in";
|
|
1191
|
+
addresses: string[];
|
|
1192
|
+
}, {
|
|
1193
|
+
type: "mintAddress";
|
|
1194
|
+
operator: "in" | "not in";
|
|
1195
|
+
addresses: string[];
|
|
1196
|
+
}>, z.ZodObject<{
|
|
1197
|
+
/** The type of criterion, must be "solData" for Solana data-based rules. */
|
|
1198
|
+
type: z.ZodLiteral<"solData">;
|
|
1199
|
+
/**
|
|
1200
|
+
* List of IDL specifications. Can contain known program names (strings) or custom IDL objects.
|
|
1201
|
+
*/
|
|
1202
|
+
idls: z.ZodArray<z.ZodUnion<[z.ZodEnum<["SystemProgram", "TokenProgram", "AssociatedTokenProgram"]>, z.ZodObject<{
|
|
1203
|
+
/** The program address */
|
|
1204
|
+
address: z.ZodString;
|
|
1205
|
+
/** Array of instruction specifications */
|
|
1206
|
+
instructions: z.ZodArray<z.ZodAny, "many">;
|
|
1207
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1208
|
+
/** The program address */
|
|
1209
|
+
address: z.ZodString;
|
|
1210
|
+
/** Array of instruction specifications */
|
|
1211
|
+
instructions: z.ZodArray<z.ZodAny, "many">;
|
|
1212
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1213
|
+
/** The program address */
|
|
1214
|
+
address: z.ZodString;
|
|
1215
|
+
/** Array of instruction specifications */
|
|
1216
|
+
instructions: z.ZodArray<z.ZodAny, "many">;
|
|
1217
|
+
}, z.ZodTypeAny, "passthrough">>]>, "many">;
|
|
1218
|
+
/**
|
|
1219
|
+
* A list of conditions to apply against the transaction instruction.
|
|
1220
|
+
* Only one condition must evaluate to true for this criterion to be met.
|
|
1221
|
+
*/
|
|
1222
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
1223
|
+
/** The instruction name */
|
|
1224
|
+
instruction: z.ZodString;
|
|
1225
|
+
/** Parameter conditions for the instruction */
|
|
1226
|
+
params: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
1227
|
+
/** The parameter name */
|
|
1228
|
+
name: z.ZodString;
|
|
1229
|
+
/** The operator to use for the comparison */
|
|
1230
|
+
operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
|
|
1231
|
+
/** The value to compare against */
|
|
1232
|
+
value: z.ZodString;
|
|
1233
|
+
}, "strip", z.ZodTypeAny, {
|
|
1234
|
+
value: string;
|
|
1235
|
+
name: string;
|
|
1236
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1237
|
+
}, {
|
|
1238
|
+
value: string;
|
|
1239
|
+
name: string;
|
|
1240
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1241
|
+
}>, z.ZodObject<{
|
|
1242
|
+
/** The parameter name */
|
|
1243
|
+
name: z.ZodString;
|
|
1244
|
+
/** The operator to use for the comparison */
|
|
1245
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
1246
|
+
/** The values to compare against */
|
|
1247
|
+
values: z.ZodArray<z.ZodString, "many">;
|
|
1248
|
+
}, "strip", z.ZodTypeAny, {
|
|
1249
|
+
values: string[];
|
|
1250
|
+
name: string;
|
|
1251
|
+
operator: "in" | "not in";
|
|
1252
|
+
}, {
|
|
1253
|
+
values: string[];
|
|
1254
|
+
name: string;
|
|
1255
|
+
operator: "in" | "not in";
|
|
1256
|
+
}>]>, "many">>;
|
|
1257
|
+
}, "strip", z.ZodTypeAny, {
|
|
1258
|
+
instruction: string;
|
|
1259
|
+
params?: ({
|
|
1260
|
+
value: string;
|
|
1261
|
+
name: string;
|
|
1262
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1263
|
+
} | {
|
|
1264
|
+
values: string[];
|
|
1265
|
+
name: string;
|
|
1266
|
+
operator: "in" | "not in";
|
|
1267
|
+
})[] | undefined;
|
|
1268
|
+
}, {
|
|
1269
|
+
instruction: string;
|
|
1270
|
+
params?: ({
|
|
1271
|
+
value: string;
|
|
1272
|
+
name: string;
|
|
1273
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1274
|
+
} | {
|
|
1275
|
+
values: string[];
|
|
1276
|
+
name: string;
|
|
1277
|
+
operator: "in" | "not in";
|
|
1278
|
+
})[] | undefined;
|
|
1279
|
+
}>, "many">;
|
|
1280
|
+
}, "strip", z.ZodTypeAny, {
|
|
1281
|
+
type: "solData";
|
|
1282
|
+
conditions: {
|
|
1283
|
+
instruction: string;
|
|
1284
|
+
params?: ({
|
|
1285
|
+
value: string;
|
|
1286
|
+
name: string;
|
|
1287
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1288
|
+
} | {
|
|
1289
|
+
values: string[];
|
|
1290
|
+
name: string;
|
|
1291
|
+
operator: "in" | "not in";
|
|
1292
|
+
})[] | undefined;
|
|
1293
|
+
}[];
|
|
1294
|
+
idls: ("SystemProgram" | "TokenProgram" | "AssociatedTokenProgram" | z.objectOutputType<{
|
|
1295
|
+
/** The program address */
|
|
1296
|
+
address: z.ZodString;
|
|
1297
|
+
/** Array of instruction specifications */
|
|
1298
|
+
instructions: z.ZodArray<z.ZodAny, "many">;
|
|
1299
|
+
}, z.ZodTypeAny, "passthrough">)[];
|
|
1300
|
+
}, {
|
|
1301
|
+
type: "solData";
|
|
1302
|
+
conditions: {
|
|
1303
|
+
instruction: string;
|
|
1304
|
+
params?: ({
|
|
1305
|
+
value: string;
|
|
1306
|
+
name: string;
|
|
1307
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1308
|
+
} | {
|
|
1309
|
+
values: string[];
|
|
1310
|
+
name: string;
|
|
1311
|
+
operator: "in" | "not in";
|
|
1312
|
+
})[] | undefined;
|
|
1313
|
+
}[];
|
|
1314
|
+
idls: ("SystemProgram" | "TokenProgram" | "AssociatedTokenProgram" | z.objectInputType<{
|
|
1315
|
+
/** The program address */
|
|
1316
|
+
address: z.ZodString;
|
|
1317
|
+
/** Array of instruction specifications */
|
|
1318
|
+
instructions: z.ZodArray<z.ZodAny, "many">;
|
|
1319
|
+
}, z.ZodTypeAny, "passthrough">)[];
|
|
1320
|
+
}>, z.ZodObject<{
|
|
1321
|
+
/** The type of criterion, must be "programId" for program ID-based rules. */
|
|
1322
|
+
type: z.ZodLiteral<"programId">;
|
|
1323
|
+
/**
|
|
1324
|
+
* Array of Solana program IDs to compare against.
|
|
1325
|
+
* Each program ID must be a valid Base58-encoded Solana address (32-44 characters).
|
|
1326
|
+
*/
|
|
1327
|
+
programIds: z.ZodArray<z.ZodString, "many">;
|
|
1328
|
+
/**
|
|
1329
|
+
* The operator to use for evaluating transaction program IDs.
|
|
1330
|
+
* "in" checks if a program ID is in the provided list.
|
|
1331
|
+
* "not in" checks if a program ID is not in the provided list.
|
|
1332
|
+
*/
|
|
1333
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
1334
|
+
}, "strip", z.ZodTypeAny, {
|
|
1335
|
+
type: "programId";
|
|
1336
|
+
operator: "in" | "not in";
|
|
1337
|
+
programIds: string[];
|
|
1338
|
+
}, {
|
|
1339
|
+
type: "programId";
|
|
1340
|
+
operator: "in" | "not in";
|
|
1341
|
+
programIds: string[];
|
|
1342
|
+
}>]>, "many">;
|
|
1343
|
+
/**
|
|
1344
|
+
* Type representing a set of criteria for the signEndUserSolTransaction operation.
|
|
1345
|
+
*/
|
|
1346
|
+
export type SignEndUserSolTransactionCriteria = z.infer<typeof SignEndUserSolTransactionCriteriaSchema>;
|
|
1347
|
+
/**
|
|
1348
|
+
* Schema for criteria used in SendEndUserSolTransaction operations
|
|
1349
|
+
*/
|
|
1350
|
+
export declare const SendEndUserSolTransactionCriteriaSchema: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
1351
|
+
/** The type of criterion, must be "solAddress" for Solana address-based rules. */
|
|
1352
|
+
type: z.ZodLiteral<"solAddress">;
|
|
1353
|
+
/**
|
|
1354
|
+
* Array of Solana addresses to compare against.
|
|
1355
|
+
* Each address must be a valid Base58-encoded Solana address (32-44 characters).
|
|
1356
|
+
*/
|
|
1357
|
+
addresses: z.ZodArray<z.ZodString, "many">;
|
|
1358
|
+
/**
|
|
1359
|
+
* The operator to use for evaluating transaction addresses.
|
|
1360
|
+
* "in" checks if an address is in the provided list.
|
|
1361
|
+
* "not in" checks if an address is not in the provided list.
|
|
1362
|
+
*/
|
|
1363
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
1364
|
+
}, "strip", z.ZodTypeAny, {
|
|
1365
|
+
type: "solAddress";
|
|
1366
|
+
operator: "in" | "not in";
|
|
1367
|
+
addresses: string[];
|
|
1368
|
+
}, {
|
|
1369
|
+
type: "solAddress";
|
|
1370
|
+
operator: "in" | "not in";
|
|
1371
|
+
addresses: string[];
|
|
1372
|
+
}>, z.ZodObject<{
|
|
1373
|
+
/** The type of criterion, must be "solValue" for SOL value-based rules. */
|
|
1374
|
+
type: z.ZodLiteral<"solValue">;
|
|
1375
|
+
/**
|
|
1376
|
+
* The SOL value amount in lamports to compare against, as a string.
|
|
1377
|
+
* Must contain only digits.
|
|
1378
|
+
*/
|
|
1379
|
+
solValue: z.ZodString;
|
|
1380
|
+
/** The comparison operator to use for evaluating transaction SOL values against the threshold. */
|
|
1381
|
+
operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
|
|
1382
|
+
}, "strip", z.ZodTypeAny, {
|
|
1383
|
+
solValue: string;
|
|
1384
|
+
type: "solValue";
|
|
1385
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1386
|
+
}, {
|
|
1387
|
+
solValue: string;
|
|
1388
|
+
type: "solValue";
|
|
1389
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1390
|
+
}>, z.ZodObject<{
|
|
1391
|
+
/** The type of criterion, must be "splAddress" for SPL address-based rules. */
|
|
1392
|
+
type: z.ZodLiteral<"splAddress">;
|
|
1393
|
+
/**
|
|
1394
|
+
* Array of Solana addresses to compare against for SPL token transfer recipients.
|
|
1395
|
+
* Each address must be a valid Base58-encoded Solana address (32-44 characters).
|
|
1396
|
+
*/
|
|
1397
|
+
addresses: z.ZodArray<z.ZodString, "many">;
|
|
1398
|
+
/**
|
|
1399
|
+
* The operator to use for evaluating SPL token transfer recipient addresses.
|
|
1400
|
+
* "in" checks if an address is in the provided list.
|
|
1401
|
+
* "not in" checks if an address is not in the provided list.
|
|
1402
|
+
*/
|
|
1403
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
1404
|
+
}, "strip", z.ZodTypeAny, {
|
|
1405
|
+
type: "splAddress";
|
|
1406
|
+
operator: "in" | "not in";
|
|
1407
|
+
addresses: string[];
|
|
1408
|
+
}, {
|
|
1409
|
+
type: "splAddress";
|
|
1410
|
+
operator: "in" | "not in";
|
|
1411
|
+
addresses: string[];
|
|
1412
|
+
}>, z.ZodObject<{
|
|
1413
|
+
/** The type of criterion, must be "splValue" for SPL token value-based rules. */
|
|
1414
|
+
type: z.ZodLiteral<"splValue">;
|
|
1415
|
+
/**
|
|
1416
|
+
* The SPL token value amount to compare against, as a string.
|
|
1417
|
+
* Must contain only digits.
|
|
1418
|
+
*/
|
|
1419
|
+
splValue: z.ZodString;
|
|
1420
|
+
/** The comparison operator to use for evaluating SPL token values against the threshold. */
|
|
1421
|
+
operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
|
|
1422
|
+
}, "strip", z.ZodTypeAny, {
|
|
1423
|
+
splValue: string;
|
|
1424
|
+
type: "splValue";
|
|
1425
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1426
|
+
}, {
|
|
1427
|
+
splValue: string;
|
|
1428
|
+
type: "splValue";
|
|
1429
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1430
|
+
}>, z.ZodObject<{
|
|
1431
|
+
/** The type of criterion, must be "mintAddress" for token mint address-based rules. */
|
|
1432
|
+
type: z.ZodLiteral<"mintAddress">;
|
|
1433
|
+
/**
|
|
1434
|
+
* Array of Solana addresses to compare against for token mint addresses.
|
|
1435
|
+
* Each address must be a valid Base58-encoded Solana address (32-44 characters).
|
|
1436
|
+
*/
|
|
1437
|
+
addresses: z.ZodArray<z.ZodString, "many">;
|
|
1438
|
+
/**
|
|
1439
|
+
* The operator to use for evaluating token mint addresses.
|
|
1440
|
+
* "in" checks if an address is in the provided list.
|
|
1441
|
+
* "not in" checks if an address is not in the provided list.
|
|
1442
|
+
*/
|
|
1443
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
1444
|
+
}, "strip", z.ZodTypeAny, {
|
|
1445
|
+
type: "mintAddress";
|
|
1446
|
+
operator: "in" | "not in";
|
|
1447
|
+
addresses: string[];
|
|
1448
|
+
}, {
|
|
1449
|
+
type: "mintAddress";
|
|
1450
|
+
operator: "in" | "not in";
|
|
1451
|
+
addresses: string[];
|
|
1452
|
+
}>, z.ZodObject<{
|
|
1453
|
+
/** The type of criterion, must be "solData" for Solana data-based rules. */
|
|
1454
|
+
type: z.ZodLiteral<"solData">;
|
|
1455
|
+
/**
|
|
1456
|
+
* List of IDL specifications. Can contain known program names (strings) or custom IDL objects.
|
|
1457
|
+
*/
|
|
1458
|
+
idls: z.ZodArray<z.ZodUnion<[z.ZodEnum<["SystemProgram", "TokenProgram", "AssociatedTokenProgram"]>, z.ZodObject<{
|
|
1459
|
+
/** The program address */
|
|
1460
|
+
address: z.ZodString;
|
|
1461
|
+
/** Array of instruction specifications */
|
|
1462
|
+
instructions: z.ZodArray<z.ZodAny, "many">;
|
|
1463
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1464
|
+
/** The program address */
|
|
1465
|
+
address: z.ZodString;
|
|
1466
|
+
/** Array of instruction specifications */
|
|
1467
|
+
instructions: z.ZodArray<z.ZodAny, "many">;
|
|
1468
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1469
|
+
/** The program address */
|
|
1470
|
+
address: z.ZodString;
|
|
1471
|
+
/** Array of instruction specifications */
|
|
1472
|
+
instructions: z.ZodArray<z.ZodAny, "many">;
|
|
1473
|
+
}, z.ZodTypeAny, "passthrough">>]>, "many">;
|
|
1474
|
+
/**
|
|
1475
|
+
* A list of conditions to apply against the transaction instruction.
|
|
1476
|
+
* Only one condition must evaluate to true for this criterion to be met.
|
|
1477
|
+
*/
|
|
1478
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
1479
|
+
/** The instruction name */
|
|
1480
|
+
instruction: z.ZodString;
|
|
1481
|
+
/** Parameter conditions for the instruction */
|
|
1482
|
+
params: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
1483
|
+
/** The parameter name */
|
|
1484
|
+
name: z.ZodString;
|
|
1485
|
+
/** The operator to use for the comparison */
|
|
1486
|
+
operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
|
|
1487
|
+
/** The value to compare against */
|
|
1488
|
+
value: z.ZodString;
|
|
1489
|
+
}, "strip", z.ZodTypeAny, {
|
|
1490
|
+
value: string;
|
|
1491
|
+
name: string;
|
|
1492
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1493
|
+
}, {
|
|
1494
|
+
value: string;
|
|
1495
|
+
name: string;
|
|
1496
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1497
|
+
}>, z.ZodObject<{
|
|
1498
|
+
/** The parameter name */
|
|
1499
|
+
name: z.ZodString;
|
|
1500
|
+
/** The operator to use for the comparison */
|
|
1501
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
1502
|
+
/** The values to compare against */
|
|
1503
|
+
values: z.ZodArray<z.ZodString, "many">;
|
|
1504
|
+
}, "strip", z.ZodTypeAny, {
|
|
1505
|
+
values: string[];
|
|
1506
|
+
name: string;
|
|
1507
|
+
operator: "in" | "not in";
|
|
1508
|
+
}, {
|
|
1509
|
+
values: string[];
|
|
1510
|
+
name: string;
|
|
1511
|
+
operator: "in" | "not in";
|
|
1512
|
+
}>]>, "many">>;
|
|
1513
|
+
}, "strip", z.ZodTypeAny, {
|
|
1514
|
+
instruction: string;
|
|
1515
|
+
params?: ({
|
|
1516
|
+
value: string;
|
|
1517
|
+
name: string;
|
|
1518
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1519
|
+
} | {
|
|
1520
|
+
values: string[];
|
|
1521
|
+
name: string;
|
|
1522
|
+
operator: "in" | "not in";
|
|
1523
|
+
})[] | undefined;
|
|
1524
|
+
}, {
|
|
1525
|
+
instruction: string;
|
|
1526
|
+
params?: ({
|
|
1527
|
+
value: string;
|
|
1528
|
+
name: string;
|
|
1529
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1530
|
+
} | {
|
|
1531
|
+
values: string[];
|
|
1532
|
+
name: string;
|
|
1533
|
+
operator: "in" | "not in";
|
|
1534
|
+
})[] | undefined;
|
|
1535
|
+
}>, "many">;
|
|
1536
|
+
}, "strip", z.ZodTypeAny, {
|
|
1537
|
+
type: "solData";
|
|
1538
|
+
conditions: {
|
|
1539
|
+
instruction: string;
|
|
1540
|
+
params?: ({
|
|
1541
|
+
value: string;
|
|
1542
|
+
name: string;
|
|
1543
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1544
|
+
} | {
|
|
1545
|
+
values: string[];
|
|
1546
|
+
name: string;
|
|
1547
|
+
operator: "in" | "not in";
|
|
1548
|
+
})[] | undefined;
|
|
1549
|
+
}[];
|
|
1550
|
+
idls: ("SystemProgram" | "TokenProgram" | "AssociatedTokenProgram" | z.objectOutputType<{
|
|
1551
|
+
/** The program address */
|
|
1552
|
+
address: z.ZodString;
|
|
1553
|
+
/** Array of instruction specifications */
|
|
1554
|
+
instructions: z.ZodArray<z.ZodAny, "many">;
|
|
1555
|
+
}, z.ZodTypeAny, "passthrough">)[];
|
|
1556
|
+
}, {
|
|
1557
|
+
type: "solData";
|
|
1558
|
+
conditions: {
|
|
1559
|
+
instruction: string;
|
|
1560
|
+
params?: ({
|
|
1561
|
+
value: string;
|
|
1562
|
+
name: string;
|
|
1563
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1564
|
+
} | {
|
|
1565
|
+
values: string[];
|
|
1566
|
+
name: string;
|
|
1567
|
+
operator: "in" | "not in";
|
|
1568
|
+
})[] | undefined;
|
|
1569
|
+
}[];
|
|
1570
|
+
idls: ("SystemProgram" | "TokenProgram" | "AssociatedTokenProgram" | z.objectInputType<{
|
|
1571
|
+
/** The program address */
|
|
1572
|
+
address: z.ZodString;
|
|
1573
|
+
/** Array of instruction specifications */
|
|
1574
|
+
instructions: z.ZodArray<z.ZodAny, "many">;
|
|
1575
|
+
}, z.ZodTypeAny, "passthrough">)[];
|
|
1576
|
+
}>, z.ZodObject<{
|
|
1577
|
+
/** The type of criterion, must be "programId" for program ID-based rules. */
|
|
1578
|
+
type: z.ZodLiteral<"programId">;
|
|
1579
|
+
/**
|
|
1580
|
+
* Array of Solana program IDs to compare against.
|
|
1581
|
+
* Each program ID must be a valid Base58-encoded Solana address (32-44 characters).
|
|
1582
|
+
*/
|
|
1583
|
+
programIds: z.ZodArray<z.ZodString, "many">;
|
|
1584
|
+
/**
|
|
1585
|
+
* The operator to use for evaluating transaction program IDs.
|
|
1586
|
+
* "in" checks if a program ID is in the provided list.
|
|
1587
|
+
* "not in" checks if a program ID is not in the provided list.
|
|
1588
|
+
*/
|
|
1589
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
1590
|
+
}, "strip", z.ZodTypeAny, {
|
|
1591
|
+
type: "programId";
|
|
1592
|
+
operator: "in" | "not in";
|
|
1593
|
+
programIds: string[];
|
|
1594
|
+
}, {
|
|
1595
|
+
type: "programId";
|
|
1596
|
+
operator: "in" | "not in";
|
|
1597
|
+
programIds: string[];
|
|
1598
|
+
}>, z.ZodObject<{
|
|
1599
|
+
/** The type of criterion, must be "solNetwork" for network-based rules. */
|
|
1600
|
+
type: z.ZodLiteral<"solNetwork">;
|
|
1601
|
+
/**
|
|
1602
|
+
* Array of Solana networks to compare against.
|
|
1603
|
+
*/
|
|
1604
|
+
networks: z.ZodArray<z.ZodEnum<["solana-devnet", "solana"]>, "many">;
|
|
1605
|
+
/**
|
|
1606
|
+
* The operator to use for evaluating transaction network.
|
|
1607
|
+
* "in" checks if the network is in the provided list.
|
|
1608
|
+
* "not in" checks if the network is not in the provided list.
|
|
1609
|
+
*/
|
|
1610
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
1611
|
+
}, "strip", z.ZodTypeAny, {
|
|
1612
|
+
type: "solNetwork";
|
|
1613
|
+
operator: "in" | "not in";
|
|
1614
|
+
networks: ("solana-devnet" | "solana")[];
|
|
1615
|
+
}, {
|
|
1616
|
+
type: "solNetwork";
|
|
1617
|
+
operator: "in" | "not in";
|
|
1618
|
+
networks: ("solana-devnet" | "solana")[];
|
|
1619
|
+
}>]>, "many">;
|
|
1620
|
+
/**
|
|
1621
|
+
* Type representing a set of criteria for the sendEndUserSolTransaction operation.
|
|
1622
|
+
*/
|
|
1623
|
+
export type SendEndUserSolTransactionCriteria = z.infer<typeof SendEndUserSolTransactionCriteriaSchema>;
|
|
1624
|
+
/**
|
|
1625
|
+
* Schema for criteria used in SignEndUserSolMessage operations
|
|
1626
|
+
*/
|
|
1627
|
+
export declare const SignEndUserSolMessageCriteriaSchema: z.ZodArray<z.ZodObject<{
|
|
1628
|
+
/** The type of criterion, must be "solMessage" for message-based rules. */
|
|
1629
|
+
type: z.ZodLiteral<"solMessage">;
|
|
1630
|
+
/**
|
|
1631
|
+
* A regular expression pattern to match against the message.
|
|
1632
|
+
*/
|
|
1633
|
+
match: z.ZodString;
|
|
1634
|
+
}, "strip", z.ZodTypeAny, {
|
|
1635
|
+
match: string;
|
|
1636
|
+
type: "solMessage";
|
|
1637
|
+
}, {
|
|
1638
|
+
match: string;
|
|
1639
|
+
type: "solMessage";
|
|
1640
|
+
}>, "many">;
|
|
1641
|
+
/**
|
|
1642
|
+
* Type representing a set of criteria for the signEndUserSolMessage operation.
|
|
1643
|
+
*/
|
|
1644
|
+
export type SignEndUserSolMessageCriteria = z.infer<typeof SignEndUserSolMessageCriteriaSchema>;
|
|
1091
1645
|
/**
|
|
1092
1646
|
* Enum for Solana Operation types
|
|
1093
1647
|
*/
|
|
1094
|
-
export declare const SolOperationEnum: z.ZodEnum<["signSolTransaction", "sendSolTransaction", "signSolMessage"]>;
|
|
1648
|
+
export declare const SolOperationEnum: z.ZodEnum<["signSolTransaction", "sendSolTransaction", "signSolMessage"]>;
|
|
1649
|
+
/**
|
|
1650
|
+
* Type representing the operations that can be governed by a policy.
|
|
1651
|
+
* Defines what Solana operations the policy applies to.
|
|
1652
|
+
*/
|
|
1653
|
+
export type SolOperation = z.infer<typeof SolOperationEnum>;
|
|
1654
|
+
/**
|
|
1655
|
+
* Type representing a 'signSolTransaction' policy rule that can accept or reject specific operations
|
|
1656
|
+
* based on a set of criteria.
|
|
1657
|
+
*/
|
|
1658
|
+
export declare const SignSolTransactionRuleSchema: z.ZodObject<{
|
|
1659
|
+
/**
|
|
1660
|
+
* Determines whether matching the rule will cause a request to be rejected or accepted.
|
|
1661
|
+
* "accept" will allow the transaction, "reject" will block it.
|
|
1662
|
+
*/
|
|
1663
|
+
action: z.ZodEnum<["reject", "accept"]>;
|
|
1664
|
+
/**
|
|
1665
|
+
* The operation to which this rule applies.
|
|
1666
|
+
* Must be "signSolTransaction".
|
|
1667
|
+
*/
|
|
1668
|
+
operation: z.ZodLiteral<"signSolTransaction">;
|
|
1669
|
+
/**
|
|
1670
|
+
* The set of criteria that must be matched for this rule to apply.
|
|
1671
|
+
* Must be compatible with the specified operation type.
|
|
1672
|
+
*/
|
|
1673
|
+
criteria: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
1674
|
+
/** The type of criterion, must be "solAddress" for Solana address-based rules. */
|
|
1675
|
+
type: z.ZodLiteral<"solAddress">;
|
|
1676
|
+
/**
|
|
1677
|
+
* Array of Solana addresses to compare against.
|
|
1678
|
+
* Each address must be a valid Base58-encoded Solana address (32-44 characters).
|
|
1679
|
+
*/
|
|
1680
|
+
addresses: z.ZodArray<z.ZodString, "many">;
|
|
1681
|
+
/**
|
|
1682
|
+
* The operator to use for evaluating transaction addresses.
|
|
1683
|
+
* "in" checks if an address is in the provided list.
|
|
1684
|
+
* "not in" checks if an address is not in the provided list.
|
|
1685
|
+
*/
|
|
1686
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
1687
|
+
}, "strip", z.ZodTypeAny, {
|
|
1688
|
+
type: "solAddress";
|
|
1689
|
+
operator: "in" | "not in";
|
|
1690
|
+
addresses: string[];
|
|
1691
|
+
}, {
|
|
1692
|
+
type: "solAddress";
|
|
1693
|
+
operator: "in" | "not in";
|
|
1694
|
+
addresses: string[];
|
|
1695
|
+
}>, z.ZodObject<{
|
|
1696
|
+
/** The type of criterion, must be "solValue" for SOL value-based rules. */
|
|
1697
|
+
type: z.ZodLiteral<"solValue">;
|
|
1698
|
+
/**
|
|
1699
|
+
* The SOL value amount in lamports to compare against, as a string.
|
|
1700
|
+
* Must contain only digits.
|
|
1701
|
+
*/
|
|
1702
|
+
solValue: z.ZodString;
|
|
1703
|
+
/** The comparison operator to use for evaluating transaction SOL values against the threshold. */
|
|
1704
|
+
operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
|
|
1705
|
+
}, "strip", z.ZodTypeAny, {
|
|
1706
|
+
solValue: string;
|
|
1707
|
+
type: "solValue";
|
|
1708
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1709
|
+
}, {
|
|
1710
|
+
solValue: string;
|
|
1711
|
+
type: "solValue";
|
|
1712
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1713
|
+
}>, z.ZodObject<{
|
|
1714
|
+
/** The type of criterion, must be "splAddress" for SPL address-based rules. */
|
|
1715
|
+
type: z.ZodLiteral<"splAddress">;
|
|
1716
|
+
/**
|
|
1717
|
+
* Array of Solana addresses to compare against for SPL token transfer recipients.
|
|
1718
|
+
* Each address must be a valid Base58-encoded Solana address (32-44 characters).
|
|
1719
|
+
*/
|
|
1720
|
+
addresses: z.ZodArray<z.ZodString, "many">;
|
|
1721
|
+
/**
|
|
1722
|
+
* The operator to use for evaluating SPL token transfer recipient addresses.
|
|
1723
|
+
* "in" checks if an address is in the provided list.
|
|
1724
|
+
* "not in" checks if an address is not in the provided list.
|
|
1725
|
+
*/
|
|
1726
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
1727
|
+
}, "strip", z.ZodTypeAny, {
|
|
1728
|
+
type: "splAddress";
|
|
1729
|
+
operator: "in" | "not in";
|
|
1730
|
+
addresses: string[];
|
|
1731
|
+
}, {
|
|
1732
|
+
type: "splAddress";
|
|
1733
|
+
operator: "in" | "not in";
|
|
1734
|
+
addresses: string[];
|
|
1735
|
+
}>, z.ZodObject<{
|
|
1736
|
+
/** The type of criterion, must be "splValue" for SPL token value-based rules. */
|
|
1737
|
+
type: z.ZodLiteral<"splValue">;
|
|
1738
|
+
/**
|
|
1739
|
+
* The SPL token value amount to compare against, as a string.
|
|
1740
|
+
* Must contain only digits.
|
|
1741
|
+
*/
|
|
1742
|
+
splValue: z.ZodString;
|
|
1743
|
+
/** The comparison operator to use for evaluating SPL token values against the threshold. */
|
|
1744
|
+
operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
|
|
1745
|
+
}, "strip", z.ZodTypeAny, {
|
|
1746
|
+
splValue: string;
|
|
1747
|
+
type: "splValue";
|
|
1748
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1749
|
+
}, {
|
|
1750
|
+
splValue: string;
|
|
1751
|
+
type: "splValue";
|
|
1752
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1753
|
+
}>, z.ZodObject<{
|
|
1754
|
+
/** The type of criterion, must be "mintAddress" for token mint address-based rules. */
|
|
1755
|
+
type: z.ZodLiteral<"mintAddress">;
|
|
1756
|
+
/**
|
|
1757
|
+
* Array of Solana addresses to compare against for token mint addresses.
|
|
1758
|
+
* Each address must be a valid Base58-encoded Solana address (32-44 characters).
|
|
1759
|
+
*/
|
|
1760
|
+
addresses: z.ZodArray<z.ZodString, "many">;
|
|
1761
|
+
/**
|
|
1762
|
+
* The operator to use for evaluating token mint addresses.
|
|
1763
|
+
* "in" checks if an address is in the provided list.
|
|
1764
|
+
* "not in" checks if an address is not in the provided list.
|
|
1765
|
+
*/
|
|
1766
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
1767
|
+
}, "strip", z.ZodTypeAny, {
|
|
1768
|
+
type: "mintAddress";
|
|
1769
|
+
operator: "in" | "not in";
|
|
1770
|
+
addresses: string[];
|
|
1771
|
+
}, {
|
|
1772
|
+
type: "mintAddress";
|
|
1773
|
+
operator: "in" | "not in";
|
|
1774
|
+
addresses: string[];
|
|
1775
|
+
}>, z.ZodObject<{
|
|
1776
|
+
/** The type of criterion, must be "solData" for Solana data-based rules. */
|
|
1777
|
+
type: z.ZodLiteral<"solData">;
|
|
1778
|
+
/**
|
|
1779
|
+
* List of IDL specifications. Can contain known program names (strings) or custom IDL objects.
|
|
1780
|
+
*/
|
|
1781
|
+
idls: z.ZodArray<z.ZodUnion<[z.ZodEnum<["SystemProgram", "TokenProgram", "AssociatedTokenProgram"]>, z.ZodObject<{
|
|
1782
|
+
/** The program address */
|
|
1783
|
+
address: z.ZodString;
|
|
1784
|
+
/** Array of instruction specifications */
|
|
1785
|
+
instructions: z.ZodArray<z.ZodAny, "many">;
|
|
1786
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1787
|
+
/** The program address */
|
|
1788
|
+
address: z.ZodString;
|
|
1789
|
+
/** Array of instruction specifications */
|
|
1790
|
+
instructions: z.ZodArray<z.ZodAny, "many">;
|
|
1791
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1792
|
+
/** The program address */
|
|
1793
|
+
address: z.ZodString;
|
|
1794
|
+
/** Array of instruction specifications */
|
|
1795
|
+
instructions: z.ZodArray<z.ZodAny, "many">;
|
|
1796
|
+
}, z.ZodTypeAny, "passthrough">>]>, "many">;
|
|
1797
|
+
/**
|
|
1798
|
+
* A list of conditions to apply against the transaction instruction.
|
|
1799
|
+
* Only one condition must evaluate to true for this criterion to be met.
|
|
1800
|
+
*/
|
|
1801
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
1802
|
+
/** The instruction name */
|
|
1803
|
+
instruction: z.ZodString;
|
|
1804
|
+
/** Parameter conditions for the instruction */
|
|
1805
|
+
params: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
1806
|
+
/** The parameter name */
|
|
1807
|
+
name: z.ZodString;
|
|
1808
|
+
/** The operator to use for the comparison */
|
|
1809
|
+
operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
|
|
1810
|
+
/** The value to compare against */
|
|
1811
|
+
value: z.ZodString;
|
|
1812
|
+
}, "strip", z.ZodTypeAny, {
|
|
1813
|
+
value: string;
|
|
1814
|
+
name: string;
|
|
1815
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1816
|
+
}, {
|
|
1817
|
+
value: string;
|
|
1818
|
+
name: string;
|
|
1819
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1820
|
+
}>, z.ZodObject<{
|
|
1821
|
+
/** The parameter name */
|
|
1822
|
+
name: z.ZodString;
|
|
1823
|
+
/** The operator to use for the comparison */
|
|
1824
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
1825
|
+
/** The values to compare against */
|
|
1826
|
+
values: z.ZodArray<z.ZodString, "many">;
|
|
1827
|
+
}, "strip", z.ZodTypeAny, {
|
|
1828
|
+
values: string[];
|
|
1829
|
+
name: string;
|
|
1830
|
+
operator: "in" | "not in";
|
|
1831
|
+
}, {
|
|
1832
|
+
values: string[];
|
|
1833
|
+
name: string;
|
|
1834
|
+
operator: "in" | "not in";
|
|
1835
|
+
}>]>, "many">>;
|
|
1836
|
+
}, "strip", z.ZodTypeAny, {
|
|
1837
|
+
instruction: string;
|
|
1838
|
+
params?: ({
|
|
1839
|
+
value: string;
|
|
1840
|
+
name: string;
|
|
1841
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1842
|
+
} | {
|
|
1843
|
+
values: string[];
|
|
1844
|
+
name: string;
|
|
1845
|
+
operator: "in" | "not in";
|
|
1846
|
+
})[] | undefined;
|
|
1847
|
+
}, {
|
|
1848
|
+
instruction: string;
|
|
1849
|
+
params?: ({
|
|
1850
|
+
value: string;
|
|
1851
|
+
name: string;
|
|
1852
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1853
|
+
} | {
|
|
1854
|
+
values: string[];
|
|
1855
|
+
name: string;
|
|
1856
|
+
operator: "in" | "not in";
|
|
1857
|
+
})[] | undefined;
|
|
1858
|
+
}>, "many">;
|
|
1859
|
+
}, "strip", z.ZodTypeAny, {
|
|
1860
|
+
type: "solData";
|
|
1861
|
+
conditions: {
|
|
1862
|
+
instruction: string;
|
|
1863
|
+
params?: ({
|
|
1864
|
+
value: string;
|
|
1865
|
+
name: string;
|
|
1866
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1867
|
+
} | {
|
|
1868
|
+
values: string[];
|
|
1869
|
+
name: string;
|
|
1870
|
+
operator: "in" | "not in";
|
|
1871
|
+
})[] | undefined;
|
|
1872
|
+
}[];
|
|
1873
|
+
idls: ("SystemProgram" | "TokenProgram" | "AssociatedTokenProgram" | z.objectOutputType<{
|
|
1874
|
+
/** The program address */
|
|
1875
|
+
address: z.ZodString;
|
|
1876
|
+
/** Array of instruction specifications */
|
|
1877
|
+
instructions: z.ZodArray<z.ZodAny, "many">;
|
|
1878
|
+
}, z.ZodTypeAny, "passthrough">)[];
|
|
1879
|
+
}, {
|
|
1880
|
+
type: "solData";
|
|
1881
|
+
conditions: {
|
|
1882
|
+
instruction: string;
|
|
1883
|
+
params?: ({
|
|
1884
|
+
value: string;
|
|
1885
|
+
name: string;
|
|
1886
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1887
|
+
} | {
|
|
1888
|
+
values: string[];
|
|
1889
|
+
name: string;
|
|
1890
|
+
operator: "in" | "not in";
|
|
1891
|
+
})[] | undefined;
|
|
1892
|
+
}[];
|
|
1893
|
+
idls: ("SystemProgram" | "TokenProgram" | "AssociatedTokenProgram" | z.objectInputType<{
|
|
1894
|
+
/** The program address */
|
|
1895
|
+
address: z.ZodString;
|
|
1896
|
+
/** Array of instruction specifications */
|
|
1897
|
+
instructions: z.ZodArray<z.ZodAny, "many">;
|
|
1898
|
+
}, z.ZodTypeAny, "passthrough">)[];
|
|
1899
|
+
}>, z.ZodObject<{
|
|
1900
|
+
/** The type of criterion, must be "programId" for program ID-based rules. */
|
|
1901
|
+
type: z.ZodLiteral<"programId">;
|
|
1902
|
+
/**
|
|
1903
|
+
* Array of Solana program IDs to compare against.
|
|
1904
|
+
* Each program ID must be a valid Base58-encoded Solana address (32-44 characters).
|
|
1905
|
+
*/
|
|
1906
|
+
programIds: z.ZodArray<z.ZodString, "many">;
|
|
1907
|
+
/**
|
|
1908
|
+
* The operator to use for evaluating transaction program IDs.
|
|
1909
|
+
* "in" checks if a program ID is in the provided list.
|
|
1910
|
+
* "not in" checks if a program ID is not in the provided list.
|
|
1911
|
+
*/
|
|
1912
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
1913
|
+
}, "strip", z.ZodTypeAny, {
|
|
1914
|
+
type: "programId";
|
|
1915
|
+
operator: "in" | "not in";
|
|
1916
|
+
programIds: string[];
|
|
1917
|
+
}, {
|
|
1918
|
+
type: "programId";
|
|
1919
|
+
operator: "in" | "not in";
|
|
1920
|
+
programIds: string[];
|
|
1921
|
+
}>]>, "many">;
|
|
1922
|
+
}, "strip", z.ZodTypeAny, {
|
|
1923
|
+
action: "reject" | "accept";
|
|
1924
|
+
operation: "signSolTransaction";
|
|
1925
|
+
criteria: ({
|
|
1926
|
+
type: "solAddress";
|
|
1927
|
+
operator: "in" | "not in";
|
|
1928
|
+
addresses: string[];
|
|
1929
|
+
} | {
|
|
1930
|
+
solValue: string;
|
|
1931
|
+
type: "solValue";
|
|
1932
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1933
|
+
} | {
|
|
1934
|
+
type: "splAddress";
|
|
1935
|
+
operator: "in" | "not in";
|
|
1936
|
+
addresses: string[];
|
|
1937
|
+
} | {
|
|
1938
|
+
splValue: string;
|
|
1939
|
+
type: "splValue";
|
|
1940
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1941
|
+
} | {
|
|
1942
|
+
type: "mintAddress";
|
|
1943
|
+
operator: "in" | "not in";
|
|
1944
|
+
addresses: string[];
|
|
1945
|
+
} | {
|
|
1946
|
+
type: "solData";
|
|
1947
|
+
conditions: {
|
|
1948
|
+
instruction: string;
|
|
1949
|
+
params?: ({
|
|
1950
|
+
value: string;
|
|
1951
|
+
name: string;
|
|
1952
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1953
|
+
} | {
|
|
1954
|
+
values: string[];
|
|
1955
|
+
name: string;
|
|
1956
|
+
operator: "in" | "not in";
|
|
1957
|
+
})[] | undefined;
|
|
1958
|
+
}[];
|
|
1959
|
+
idls: ("SystemProgram" | "TokenProgram" | "AssociatedTokenProgram" | z.objectOutputType<{
|
|
1960
|
+
/** The program address */
|
|
1961
|
+
address: z.ZodString;
|
|
1962
|
+
/** Array of instruction specifications */
|
|
1963
|
+
instructions: z.ZodArray<z.ZodAny, "many">;
|
|
1964
|
+
}, z.ZodTypeAny, "passthrough">)[];
|
|
1965
|
+
} | {
|
|
1966
|
+
type: "programId";
|
|
1967
|
+
operator: "in" | "not in";
|
|
1968
|
+
programIds: string[];
|
|
1969
|
+
})[];
|
|
1970
|
+
}, {
|
|
1971
|
+
action: "reject" | "accept";
|
|
1972
|
+
operation: "signSolTransaction";
|
|
1973
|
+
criteria: ({
|
|
1974
|
+
type: "solAddress";
|
|
1975
|
+
operator: "in" | "not in";
|
|
1976
|
+
addresses: string[];
|
|
1977
|
+
} | {
|
|
1978
|
+
solValue: string;
|
|
1979
|
+
type: "solValue";
|
|
1980
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1981
|
+
} | {
|
|
1982
|
+
type: "splAddress";
|
|
1983
|
+
operator: "in" | "not in";
|
|
1984
|
+
addresses: string[];
|
|
1985
|
+
} | {
|
|
1986
|
+
splValue: string;
|
|
1987
|
+
type: "splValue";
|
|
1988
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1989
|
+
} | {
|
|
1990
|
+
type: "mintAddress";
|
|
1991
|
+
operator: "in" | "not in";
|
|
1992
|
+
addresses: string[];
|
|
1993
|
+
} | {
|
|
1994
|
+
type: "solData";
|
|
1995
|
+
conditions: {
|
|
1996
|
+
instruction: string;
|
|
1997
|
+
params?: ({
|
|
1998
|
+
value: string;
|
|
1999
|
+
name: string;
|
|
2000
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
2001
|
+
} | {
|
|
2002
|
+
values: string[];
|
|
2003
|
+
name: string;
|
|
2004
|
+
operator: "in" | "not in";
|
|
2005
|
+
})[] | undefined;
|
|
2006
|
+
}[];
|
|
2007
|
+
idls: ("SystemProgram" | "TokenProgram" | "AssociatedTokenProgram" | z.objectInputType<{
|
|
2008
|
+
/** The program address */
|
|
2009
|
+
address: z.ZodString;
|
|
2010
|
+
/** Array of instruction specifications */
|
|
2011
|
+
instructions: z.ZodArray<z.ZodAny, "many">;
|
|
2012
|
+
}, z.ZodTypeAny, "passthrough">)[];
|
|
2013
|
+
} | {
|
|
2014
|
+
type: "programId";
|
|
2015
|
+
operator: "in" | "not in";
|
|
2016
|
+
programIds: string[];
|
|
2017
|
+
})[];
|
|
2018
|
+
}>;
|
|
2019
|
+
export type SignSolTransactionRule = z.infer<typeof SignSolTransactionRuleSchema>;
|
|
2020
|
+
/**
|
|
2021
|
+
* Type representing a 'sendSolTransaction' policy rule that can accept or reject specific operations
|
|
2022
|
+
* based on a set of criteria.
|
|
2023
|
+
*/
|
|
2024
|
+
export declare const SendSolTransactionRuleSchema: z.ZodObject<{
|
|
2025
|
+
/**
|
|
2026
|
+
* Determines whether matching the rule will cause a request to be rejected or accepted.
|
|
2027
|
+
* "accept" will allow the transaction, "reject" will block it.
|
|
2028
|
+
*/
|
|
2029
|
+
action: z.ZodEnum<["reject", "accept"]>;
|
|
2030
|
+
/**
|
|
2031
|
+
* The operation to which this rule applies.
|
|
2032
|
+
* Must be "sendSolTransaction".
|
|
2033
|
+
*/
|
|
2034
|
+
operation: z.ZodLiteral<"sendSolTransaction">;
|
|
2035
|
+
/**
|
|
2036
|
+
* The set of criteria that must be matched for this rule to apply.
|
|
2037
|
+
* Must be compatible with the specified operation type.
|
|
2038
|
+
*/
|
|
2039
|
+
criteria: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
2040
|
+
/** The type of criterion, must be "solAddress" for Solana address-based rules. */
|
|
2041
|
+
type: z.ZodLiteral<"solAddress">;
|
|
2042
|
+
/**
|
|
2043
|
+
* Array of Solana addresses to compare against.
|
|
2044
|
+
* Each address must be a valid Base58-encoded Solana address (32-44 characters).
|
|
2045
|
+
*/
|
|
2046
|
+
addresses: z.ZodArray<z.ZodString, "many">;
|
|
2047
|
+
/**
|
|
2048
|
+
* The operator to use for evaluating transaction addresses.
|
|
2049
|
+
* "in" checks if an address is in the provided list.
|
|
2050
|
+
* "not in" checks if an address is not in the provided list.
|
|
2051
|
+
*/
|
|
2052
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
2053
|
+
}, "strip", z.ZodTypeAny, {
|
|
2054
|
+
type: "solAddress";
|
|
2055
|
+
operator: "in" | "not in";
|
|
2056
|
+
addresses: string[];
|
|
2057
|
+
}, {
|
|
2058
|
+
type: "solAddress";
|
|
2059
|
+
operator: "in" | "not in";
|
|
2060
|
+
addresses: string[];
|
|
2061
|
+
}>, z.ZodObject<{
|
|
2062
|
+
/** The type of criterion, must be "solValue" for SOL value-based rules. */
|
|
2063
|
+
type: z.ZodLiteral<"solValue">;
|
|
2064
|
+
/**
|
|
2065
|
+
* The SOL value amount in lamports to compare against, as a string.
|
|
2066
|
+
* Must contain only digits.
|
|
2067
|
+
*/
|
|
2068
|
+
solValue: z.ZodString;
|
|
2069
|
+
/** The comparison operator to use for evaluating transaction SOL values against the threshold. */
|
|
2070
|
+
operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
|
|
2071
|
+
}, "strip", z.ZodTypeAny, {
|
|
2072
|
+
solValue: string;
|
|
2073
|
+
type: "solValue";
|
|
2074
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
2075
|
+
}, {
|
|
2076
|
+
solValue: string;
|
|
2077
|
+
type: "solValue";
|
|
2078
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
2079
|
+
}>, z.ZodObject<{
|
|
2080
|
+
/** The type of criterion, must be "splAddress" for SPL address-based rules. */
|
|
2081
|
+
type: z.ZodLiteral<"splAddress">;
|
|
2082
|
+
/**
|
|
2083
|
+
* Array of Solana addresses to compare against for SPL token transfer recipients.
|
|
2084
|
+
* Each address must be a valid Base58-encoded Solana address (32-44 characters).
|
|
2085
|
+
*/
|
|
2086
|
+
addresses: z.ZodArray<z.ZodString, "many">;
|
|
2087
|
+
/**
|
|
2088
|
+
* The operator to use for evaluating SPL token transfer recipient addresses.
|
|
2089
|
+
* "in" checks if an address is in the provided list.
|
|
2090
|
+
* "not in" checks if an address is not in the provided list.
|
|
2091
|
+
*/
|
|
2092
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
2093
|
+
}, "strip", z.ZodTypeAny, {
|
|
2094
|
+
type: "splAddress";
|
|
2095
|
+
operator: "in" | "not in";
|
|
2096
|
+
addresses: string[];
|
|
2097
|
+
}, {
|
|
2098
|
+
type: "splAddress";
|
|
2099
|
+
operator: "in" | "not in";
|
|
2100
|
+
addresses: string[];
|
|
2101
|
+
}>, z.ZodObject<{
|
|
2102
|
+
/** The type of criterion, must be "splValue" for SPL token value-based rules. */
|
|
2103
|
+
type: z.ZodLiteral<"splValue">;
|
|
2104
|
+
/**
|
|
2105
|
+
* The SPL token value amount to compare against, as a string.
|
|
2106
|
+
* Must contain only digits.
|
|
2107
|
+
*/
|
|
2108
|
+
splValue: z.ZodString;
|
|
2109
|
+
/** The comparison operator to use for evaluating SPL token values against the threshold. */
|
|
2110
|
+
operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
|
|
2111
|
+
}, "strip", z.ZodTypeAny, {
|
|
2112
|
+
splValue: string;
|
|
2113
|
+
type: "splValue";
|
|
2114
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
2115
|
+
}, {
|
|
2116
|
+
splValue: string;
|
|
2117
|
+
type: "splValue";
|
|
2118
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
2119
|
+
}>, z.ZodObject<{
|
|
2120
|
+
/** The type of criterion, must be "mintAddress" for token mint address-based rules. */
|
|
2121
|
+
type: z.ZodLiteral<"mintAddress">;
|
|
2122
|
+
/**
|
|
2123
|
+
* Array of Solana addresses to compare against for token mint addresses.
|
|
2124
|
+
* Each address must be a valid Base58-encoded Solana address (32-44 characters).
|
|
2125
|
+
*/
|
|
2126
|
+
addresses: z.ZodArray<z.ZodString, "many">;
|
|
2127
|
+
/**
|
|
2128
|
+
* The operator to use for evaluating token mint addresses.
|
|
2129
|
+
* "in" checks if an address is in the provided list.
|
|
2130
|
+
* "not in" checks if an address is not in the provided list.
|
|
2131
|
+
*/
|
|
2132
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
2133
|
+
}, "strip", z.ZodTypeAny, {
|
|
2134
|
+
type: "mintAddress";
|
|
2135
|
+
operator: "in" | "not in";
|
|
2136
|
+
addresses: string[];
|
|
2137
|
+
}, {
|
|
2138
|
+
type: "mintAddress";
|
|
2139
|
+
operator: "in" | "not in";
|
|
2140
|
+
addresses: string[];
|
|
2141
|
+
}>, z.ZodObject<{
|
|
2142
|
+
/** The type of criterion, must be "solData" for Solana data-based rules. */
|
|
2143
|
+
type: z.ZodLiteral<"solData">;
|
|
2144
|
+
/**
|
|
2145
|
+
* List of IDL specifications. Can contain known program names (strings) or custom IDL objects.
|
|
2146
|
+
*/
|
|
2147
|
+
idls: z.ZodArray<z.ZodUnion<[z.ZodEnum<["SystemProgram", "TokenProgram", "AssociatedTokenProgram"]>, z.ZodObject<{
|
|
2148
|
+
/** The program address */
|
|
2149
|
+
address: z.ZodString;
|
|
2150
|
+
/** Array of instruction specifications */
|
|
2151
|
+
instructions: z.ZodArray<z.ZodAny, "many">;
|
|
2152
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
2153
|
+
/** The program address */
|
|
2154
|
+
address: z.ZodString;
|
|
2155
|
+
/** Array of instruction specifications */
|
|
2156
|
+
instructions: z.ZodArray<z.ZodAny, "many">;
|
|
2157
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
2158
|
+
/** The program address */
|
|
2159
|
+
address: z.ZodString;
|
|
2160
|
+
/** Array of instruction specifications */
|
|
2161
|
+
instructions: z.ZodArray<z.ZodAny, "many">;
|
|
2162
|
+
}, z.ZodTypeAny, "passthrough">>]>, "many">;
|
|
2163
|
+
/**
|
|
2164
|
+
* A list of conditions to apply against the transaction instruction.
|
|
2165
|
+
* Only one condition must evaluate to true for this criterion to be met.
|
|
2166
|
+
*/
|
|
2167
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
2168
|
+
/** The instruction name */
|
|
2169
|
+
instruction: z.ZodString;
|
|
2170
|
+
/** Parameter conditions for the instruction */
|
|
2171
|
+
params: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
2172
|
+
/** The parameter name */
|
|
2173
|
+
name: z.ZodString;
|
|
2174
|
+
/** The operator to use for the comparison */
|
|
2175
|
+
operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
|
|
2176
|
+
/** The value to compare against */
|
|
2177
|
+
value: z.ZodString;
|
|
2178
|
+
}, "strip", z.ZodTypeAny, {
|
|
2179
|
+
value: string;
|
|
2180
|
+
name: string;
|
|
2181
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
2182
|
+
}, {
|
|
2183
|
+
value: string;
|
|
2184
|
+
name: string;
|
|
2185
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
2186
|
+
}>, z.ZodObject<{
|
|
2187
|
+
/** The parameter name */
|
|
2188
|
+
name: z.ZodString;
|
|
2189
|
+
/** The operator to use for the comparison */
|
|
2190
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
2191
|
+
/** The values to compare against */
|
|
2192
|
+
values: z.ZodArray<z.ZodString, "many">;
|
|
2193
|
+
}, "strip", z.ZodTypeAny, {
|
|
2194
|
+
values: string[];
|
|
2195
|
+
name: string;
|
|
2196
|
+
operator: "in" | "not in";
|
|
2197
|
+
}, {
|
|
2198
|
+
values: string[];
|
|
2199
|
+
name: string;
|
|
2200
|
+
operator: "in" | "not in";
|
|
2201
|
+
}>]>, "many">>;
|
|
2202
|
+
}, "strip", z.ZodTypeAny, {
|
|
2203
|
+
instruction: string;
|
|
2204
|
+
params?: ({
|
|
2205
|
+
value: string;
|
|
2206
|
+
name: string;
|
|
2207
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
2208
|
+
} | {
|
|
2209
|
+
values: string[];
|
|
2210
|
+
name: string;
|
|
2211
|
+
operator: "in" | "not in";
|
|
2212
|
+
})[] | undefined;
|
|
2213
|
+
}, {
|
|
2214
|
+
instruction: string;
|
|
2215
|
+
params?: ({
|
|
2216
|
+
value: string;
|
|
2217
|
+
name: string;
|
|
2218
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
2219
|
+
} | {
|
|
2220
|
+
values: string[];
|
|
2221
|
+
name: string;
|
|
2222
|
+
operator: "in" | "not in";
|
|
2223
|
+
})[] | undefined;
|
|
2224
|
+
}>, "many">;
|
|
2225
|
+
}, "strip", z.ZodTypeAny, {
|
|
2226
|
+
type: "solData";
|
|
2227
|
+
conditions: {
|
|
2228
|
+
instruction: string;
|
|
2229
|
+
params?: ({
|
|
2230
|
+
value: string;
|
|
2231
|
+
name: string;
|
|
2232
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
2233
|
+
} | {
|
|
2234
|
+
values: string[];
|
|
2235
|
+
name: string;
|
|
2236
|
+
operator: "in" | "not in";
|
|
2237
|
+
})[] | undefined;
|
|
2238
|
+
}[];
|
|
2239
|
+
idls: ("SystemProgram" | "TokenProgram" | "AssociatedTokenProgram" | z.objectOutputType<{
|
|
2240
|
+
/** The program address */
|
|
2241
|
+
address: z.ZodString;
|
|
2242
|
+
/** Array of instruction specifications */
|
|
2243
|
+
instructions: z.ZodArray<z.ZodAny, "many">;
|
|
2244
|
+
}, z.ZodTypeAny, "passthrough">)[];
|
|
2245
|
+
}, {
|
|
2246
|
+
type: "solData";
|
|
2247
|
+
conditions: {
|
|
2248
|
+
instruction: string;
|
|
2249
|
+
params?: ({
|
|
2250
|
+
value: string;
|
|
2251
|
+
name: string;
|
|
2252
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
2253
|
+
} | {
|
|
2254
|
+
values: string[];
|
|
2255
|
+
name: string;
|
|
2256
|
+
operator: "in" | "not in";
|
|
2257
|
+
})[] | undefined;
|
|
2258
|
+
}[];
|
|
2259
|
+
idls: ("SystemProgram" | "TokenProgram" | "AssociatedTokenProgram" | z.objectInputType<{
|
|
2260
|
+
/** The program address */
|
|
2261
|
+
address: z.ZodString;
|
|
2262
|
+
/** Array of instruction specifications */
|
|
2263
|
+
instructions: z.ZodArray<z.ZodAny, "many">;
|
|
2264
|
+
}, z.ZodTypeAny, "passthrough">)[];
|
|
2265
|
+
}>, z.ZodObject<{
|
|
2266
|
+
/** The type of criterion, must be "programId" for program ID-based rules. */
|
|
2267
|
+
type: z.ZodLiteral<"programId">;
|
|
2268
|
+
/**
|
|
2269
|
+
* Array of Solana program IDs to compare against.
|
|
2270
|
+
* Each program ID must be a valid Base58-encoded Solana address (32-44 characters).
|
|
2271
|
+
*/
|
|
2272
|
+
programIds: z.ZodArray<z.ZodString, "many">;
|
|
2273
|
+
/**
|
|
2274
|
+
* The operator to use for evaluating transaction program IDs.
|
|
2275
|
+
* "in" checks if a program ID is in the provided list.
|
|
2276
|
+
* "not in" checks if a program ID is not in the provided list.
|
|
2277
|
+
*/
|
|
2278
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
2279
|
+
}, "strip", z.ZodTypeAny, {
|
|
2280
|
+
type: "programId";
|
|
2281
|
+
operator: "in" | "not in";
|
|
2282
|
+
programIds: string[];
|
|
2283
|
+
}, {
|
|
2284
|
+
type: "programId";
|
|
2285
|
+
operator: "in" | "not in";
|
|
2286
|
+
programIds: string[];
|
|
2287
|
+
}>, z.ZodObject<{
|
|
2288
|
+
/** The type of criterion, must be "solNetwork" for network-based rules. */
|
|
2289
|
+
type: z.ZodLiteral<"solNetwork">;
|
|
2290
|
+
/**
|
|
2291
|
+
* Array of Solana networks to compare against.
|
|
2292
|
+
*/
|
|
2293
|
+
networks: z.ZodArray<z.ZodEnum<["solana-devnet", "solana"]>, "many">;
|
|
2294
|
+
/**
|
|
2295
|
+
* The operator to use for evaluating transaction network.
|
|
2296
|
+
* "in" checks if the network is in the provided list.
|
|
2297
|
+
* "not in" checks if the network is not in the provided list.
|
|
2298
|
+
*/
|
|
2299
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
2300
|
+
}, "strip", z.ZodTypeAny, {
|
|
2301
|
+
type: "solNetwork";
|
|
2302
|
+
operator: "in" | "not in";
|
|
2303
|
+
networks: ("solana-devnet" | "solana")[];
|
|
2304
|
+
}, {
|
|
2305
|
+
type: "solNetwork";
|
|
2306
|
+
operator: "in" | "not in";
|
|
2307
|
+
networks: ("solana-devnet" | "solana")[];
|
|
2308
|
+
}>]>, "many">;
|
|
2309
|
+
}, "strip", z.ZodTypeAny, {
|
|
2310
|
+
action: "reject" | "accept";
|
|
2311
|
+
operation: "sendSolTransaction";
|
|
2312
|
+
criteria: ({
|
|
2313
|
+
type: "solAddress";
|
|
2314
|
+
operator: "in" | "not in";
|
|
2315
|
+
addresses: string[];
|
|
2316
|
+
} | {
|
|
2317
|
+
solValue: string;
|
|
2318
|
+
type: "solValue";
|
|
2319
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
2320
|
+
} | {
|
|
2321
|
+
type: "splAddress";
|
|
2322
|
+
operator: "in" | "not in";
|
|
2323
|
+
addresses: string[];
|
|
2324
|
+
} | {
|
|
2325
|
+
splValue: string;
|
|
2326
|
+
type: "splValue";
|
|
2327
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
2328
|
+
} | {
|
|
2329
|
+
type: "mintAddress";
|
|
2330
|
+
operator: "in" | "not in";
|
|
2331
|
+
addresses: string[];
|
|
2332
|
+
} | {
|
|
2333
|
+
type: "solData";
|
|
2334
|
+
conditions: {
|
|
2335
|
+
instruction: string;
|
|
2336
|
+
params?: ({
|
|
2337
|
+
value: string;
|
|
2338
|
+
name: string;
|
|
2339
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
2340
|
+
} | {
|
|
2341
|
+
values: string[];
|
|
2342
|
+
name: string;
|
|
2343
|
+
operator: "in" | "not in";
|
|
2344
|
+
})[] | undefined;
|
|
2345
|
+
}[];
|
|
2346
|
+
idls: ("SystemProgram" | "TokenProgram" | "AssociatedTokenProgram" | z.objectOutputType<{
|
|
2347
|
+
/** The program address */
|
|
2348
|
+
address: z.ZodString;
|
|
2349
|
+
/** Array of instruction specifications */
|
|
2350
|
+
instructions: z.ZodArray<z.ZodAny, "many">;
|
|
2351
|
+
}, z.ZodTypeAny, "passthrough">)[];
|
|
2352
|
+
} | {
|
|
2353
|
+
type: "programId";
|
|
2354
|
+
operator: "in" | "not in";
|
|
2355
|
+
programIds: string[];
|
|
2356
|
+
} | {
|
|
2357
|
+
type: "solNetwork";
|
|
2358
|
+
operator: "in" | "not in";
|
|
2359
|
+
networks: ("solana-devnet" | "solana")[];
|
|
2360
|
+
})[];
|
|
2361
|
+
}, {
|
|
2362
|
+
action: "reject" | "accept";
|
|
2363
|
+
operation: "sendSolTransaction";
|
|
2364
|
+
criteria: ({
|
|
2365
|
+
type: "solAddress";
|
|
2366
|
+
operator: "in" | "not in";
|
|
2367
|
+
addresses: string[];
|
|
2368
|
+
} | {
|
|
2369
|
+
solValue: string;
|
|
2370
|
+
type: "solValue";
|
|
2371
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
2372
|
+
} | {
|
|
2373
|
+
type: "splAddress";
|
|
2374
|
+
operator: "in" | "not in";
|
|
2375
|
+
addresses: string[];
|
|
2376
|
+
} | {
|
|
2377
|
+
splValue: string;
|
|
2378
|
+
type: "splValue";
|
|
2379
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
2380
|
+
} | {
|
|
2381
|
+
type: "mintAddress";
|
|
2382
|
+
operator: "in" | "not in";
|
|
2383
|
+
addresses: string[];
|
|
2384
|
+
} | {
|
|
2385
|
+
type: "solData";
|
|
2386
|
+
conditions: {
|
|
2387
|
+
instruction: string;
|
|
2388
|
+
params?: ({
|
|
2389
|
+
value: string;
|
|
2390
|
+
name: string;
|
|
2391
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
2392
|
+
} | {
|
|
2393
|
+
values: string[];
|
|
2394
|
+
name: string;
|
|
2395
|
+
operator: "in" | "not in";
|
|
2396
|
+
})[] | undefined;
|
|
2397
|
+
}[];
|
|
2398
|
+
idls: ("SystemProgram" | "TokenProgram" | "AssociatedTokenProgram" | z.objectInputType<{
|
|
2399
|
+
/** The program address */
|
|
2400
|
+
address: z.ZodString;
|
|
2401
|
+
/** Array of instruction specifications */
|
|
2402
|
+
instructions: z.ZodArray<z.ZodAny, "many">;
|
|
2403
|
+
}, z.ZodTypeAny, "passthrough">)[];
|
|
2404
|
+
} | {
|
|
2405
|
+
type: "programId";
|
|
2406
|
+
operator: "in" | "not in";
|
|
2407
|
+
programIds: string[];
|
|
2408
|
+
} | {
|
|
2409
|
+
type: "solNetwork";
|
|
2410
|
+
operator: "in" | "not in";
|
|
2411
|
+
networks: ("solana-devnet" | "solana")[];
|
|
2412
|
+
})[];
|
|
2413
|
+
}>;
|
|
2414
|
+
export type SendSolTransactionRule = z.infer<typeof SendSolTransactionRuleSchema>;
|
|
2415
|
+
/**
|
|
2416
|
+
* Schema for criteria used in SignSolMessage operations
|
|
2417
|
+
*/
|
|
2418
|
+
export declare const SignSolMessageCriteriaSchema: z.ZodArray<z.ZodObject<{
|
|
2419
|
+
/** The type of criterion, must be "solMessage" for message-based rules. */
|
|
2420
|
+
type: z.ZodLiteral<"solMessage">;
|
|
2421
|
+
/**
|
|
2422
|
+
* A regular expression pattern to match against the message.
|
|
2423
|
+
*/
|
|
2424
|
+
match: z.ZodString;
|
|
2425
|
+
}, "strip", z.ZodTypeAny, {
|
|
2426
|
+
match: string;
|
|
2427
|
+
type: "solMessage";
|
|
2428
|
+
}, {
|
|
2429
|
+
match: string;
|
|
2430
|
+
type: "solMessage";
|
|
2431
|
+
}>, "many">;
|
|
1095
2432
|
/**
|
|
1096
|
-
* Type representing
|
|
1097
|
-
*
|
|
2433
|
+
* Type representing a set of criteria for the signSolMessage operation.
|
|
2434
|
+
* Can contain up to 10 individual criterion objects for Solana message matching.
|
|
1098
2435
|
*/
|
|
1099
|
-
export type
|
|
2436
|
+
export type SignSolMessageCriteria = z.infer<typeof SignSolMessageCriteriaSchema>;
|
|
1100
2437
|
/**
|
|
1101
|
-
* Type representing a '
|
|
2438
|
+
* Type representing a 'signSolMessage' policy rule that can accept or reject specific operations
|
|
1102
2439
|
* based on a set of criteria.
|
|
1103
2440
|
*/
|
|
1104
|
-
export declare const
|
|
2441
|
+
export declare const SignSolMessageRuleSchema: z.ZodObject<{
|
|
2442
|
+
/**
|
|
2443
|
+
* Determines whether matching the rule will cause a request to be rejected or accepted.
|
|
2444
|
+
* "accept" will allow the message signing, "reject" will block it.
|
|
2445
|
+
*/
|
|
2446
|
+
action: z.ZodEnum<["reject", "accept"]>;
|
|
2447
|
+
/**
|
|
2448
|
+
* The operation to which this rule applies.
|
|
2449
|
+
* Must be "signSolMessage".
|
|
2450
|
+
*/
|
|
2451
|
+
operation: z.ZodLiteral<"signSolMessage">;
|
|
2452
|
+
/**
|
|
2453
|
+
* The set of criteria that must be matched for this rule to apply.
|
|
2454
|
+
* Must be compatible with the specified operation type.
|
|
2455
|
+
*/
|
|
2456
|
+
criteria: z.ZodArray<z.ZodObject<{
|
|
2457
|
+
/** The type of criterion, must be "solMessage" for message-based rules. */
|
|
2458
|
+
type: z.ZodLiteral<"solMessage">;
|
|
2459
|
+
/**
|
|
2460
|
+
* A regular expression pattern to match against the message.
|
|
2461
|
+
*/
|
|
2462
|
+
match: z.ZodString;
|
|
2463
|
+
}, "strip", z.ZodTypeAny, {
|
|
2464
|
+
match: string;
|
|
2465
|
+
type: "solMessage";
|
|
2466
|
+
}, {
|
|
2467
|
+
match: string;
|
|
2468
|
+
type: "solMessage";
|
|
2469
|
+
}>, "many">;
|
|
2470
|
+
}, "strip", z.ZodTypeAny, {
|
|
2471
|
+
action: "reject" | "accept";
|
|
2472
|
+
operation: "signSolMessage";
|
|
2473
|
+
criteria: {
|
|
2474
|
+
match: string;
|
|
2475
|
+
type: "solMessage";
|
|
2476
|
+
}[];
|
|
2477
|
+
}, {
|
|
2478
|
+
action: "reject" | "accept";
|
|
2479
|
+
operation: "signSolMessage";
|
|
2480
|
+
criteria: {
|
|
2481
|
+
match: string;
|
|
2482
|
+
type: "solMessage";
|
|
2483
|
+
}[];
|
|
2484
|
+
}>;
|
|
2485
|
+
export type SignSolMessageRule = z.infer<typeof SignSolMessageRuleSchema>;
|
|
2486
|
+
/**
|
|
2487
|
+
* Type representing a 'signEndUserSolTransaction' policy rule that can accept or reject specific operations
|
|
2488
|
+
* based on a set of criteria.
|
|
2489
|
+
*/
|
|
2490
|
+
export declare const SignEndUserSolTransactionRuleSchema: z.ZodObject<{
|
|
1105
2491
|
/**
|
|
1106
2492
|
* Determines whether matching the rule will cause a request to be rejected or accepted.
|
|
1107
2493
|
* "accept" will allow the transaction, "reject" will block it.
|
|
@@ -1109,9 +2495,9 @@ export declare const SignSolTransactionRuleSchema: z.ZodObject<{
|
|
|
1109
2495
|
action: z.ZodEnum<["reject", "accept"]>;
|
|
1110
2496
|
/**
|
|
1111
2497
|
* The operation to which this rule applies.
|
|
1112
|
-
* Must be "
|
|
2498
|
+
* Must be "signEndUserSolTransaction".
|
|
1113
2499
|
*/
|
|
1114
|
-
operation: z.ZodLiteral<"
|
|
2500
|
+
operation: z.ZodLiteral<"signEndUserSolTransaction">;
|
|
1115
2501
|
/**
|
|
1116
2502
|
* The set of criteria that must be matched for this rule to apply.
|
|
1117
2503
|
* Must be compatible with the specified operation type.
|
|
@@ -1367,7 +2753,7 @@ export declare const SignSolTransactionRuleSchema: z.ZodObject<{
|
|
|
1367
2753
|
}>]>, "many">;
|
|
1368
2754
|
}, "strip", z.ZodTypeAny, {
|
|
1369
2755
|
action: "reject" | "accept";
|
|
1370
|
-
operation: "
|
|
2756
|
+
operation: "signEndUserSolTransaction";
|
|
1371
2757
|
criteria: ({
|
|
1372
2758
|
type: "solAddress";
|
|
1373
2759
|
operator: "in" | "not in";
|
|
@@ -1415,7 +2801,7 @@ export declare const SignSolTransactionRuleSchema: z.ZodObject<{
|
|
|
1415
2801
|
})[];
|
|
1416
2802
|
}, {
|
|
1417
2803
|
action: "reject" | "accept";
|
|
1418
|
-
operation: "
|
|
2804
|
+
operation: "signEndUserSolTransaction";
|
|
1419
2805
|
criteria: ({
|
|
1420
2806
|
type: "solAddress";
|
|
1421
2807
|
operator: "in" | "not in";
|
|
@@ -1462,12 +2848,12 @@ export declare const SignSolTransactionRuleSchema: z.ZodObject<{
|
|
|
1462
2848
|
programIds: string[];
|
|
1463
2849
|
})[];
|
|
1464
2850
|
}>;
|
|
1465
|
-
export type
|
|
2851
|
+
export type SignEndUserSolTransactionRule = z.infer<typeof SignEndUserSolTransactionRuleSchema>;
|
|
1466
2852
|
/**
|
|
1467
|
-
* Type representing a '
|
|
2853
|
+
* Type representing a 'sendEndUserSolTransaction' policy rule that can accept or reject specific operations
|
|
1468
2854
|
* based on a set of criteria.
|
|
1469
2855
|
*/
|
|
1470
|
-
export declare const
|
|
2856
|
+
export declare const SendEndUserSolTransactionRuleSchema: z.ZodObject<{
|
|
1471
2857
|
/**
|
|
1472
2858
|
* Determines whether matching the rule will cause a request to be rejected or accepted.
|
|
1473
2859
|
* "accept" will allow the transaction, "reject" will block it.
|
|
@@ -1475,9 +2861,9 @@ export declare const SendSolTransactionRuleSchema: z.ZodObject<{
|
|
|
1475
2861
|
action: z.ZodEnum<["reject", "accept"]>;
|
|
1476
2862
|
/**
|
|
1477
2863
|
* The operation to which this rule applies.
|
|
1478
|
-
* Must be "
|
|
2864
|
+
* Must be "sendEndUserSolTransaction".
|
|
1479
2865
|
*/
|
|
1480
|
-
operation: z.ZodLiteral<"
|
|
2866
|
+
operation: z.ZodLiteral<"sendEndUserSolTransaction">;
|
|
1481
2867
|
/**
|
|
1482
2868
|
* The set of criteria that must be matched for this rule to apply.
|
|
1483
2869
|
* Must be compatible with the specified operation type.
|
|
@@ -1754,7 +3140,7 @@ export declare const SendSolTransactionRuleSchema: z.ZodObject<{
|
|
|
1754
3140
|
}>]>, "many">;
|
|
1755
3141
|
}, "strip", z.ZodTypeAny, {
|
|
1756
3142
|
action: "reject" | "accept";
|
|
1757
|
-
operation: "
|
|
3143
|
+
operation: "sendEndUserSolTransaction";
|
|
1758
3144
|
criteria: ({
|
|
1759
3145
|
type: "solAddress";
|
|
1760
3146
|
operator: "in" | "not in";
|
|
@@ -1806,7 +3192,7 @@ export declare const SendSolTransactionRuleSchema: z.ZodObject<{
|
|
|
1806
3192
|
})[];
|
|
1807
3193
|
}, {
|
|
1808
3194
|
action: "reject" | "accept";
|
|
1809
|
-
operation: "
|
|
3195
|
+
operation: "sendEndUserSolTransaction";
|
|
1810
3196
|
criteria: ({
|
|
1811
3197
|
type: "solAddress";
|
|
1812
3198
|
operator: "in" | "not in";
|
|
@@ -1857,34 +3243,12 @@ export declare const SendSolTransactionRuleSchema: z.ZodObject<{
|
|
|
1857
3243
|
networks: ("solana-devnet" | "solana")[];
|
|
1858
3244
|
})[];
|
|
1859
3245
|
}>;
|
|
1860
|
-
export type
|
|
1861
|
-
/**
|
|
1862
|
-
* Schema for criteria used in SignSolMessage operations
|
|
1863
|
-
*/
|
|
1864
|
-
export declare const SignSolMessageCriteriaSchema: z.ZodArray<z.ZodObject<{
|
|
1865
|
-
/** The type of criterion, must be "solMessage" for message-based rules. */
|
|
1866
|
-
type: z.ZodLiteral<"solMessage">;
|
|
1867
|
-
/**
|
|
1868
|
-
* A regular expression pattern to match against the message.
|
|
1869
|
-
*/
|
|
1870
|
-
match: z.ZodString;
|
|
1871
|
-
}, "strip", z.ZodTypeAny, {
|
|
1872
|
-
match: string;
|
|
1873
|
-
type: "solMessage";
|
|
1874
|
-
}, {
|
|
1875
|
-
match: string;
|
|
1876
|
-
type: "solMessage";
|
|
1877
|
-
}>, "many">;
|
|
1878
|
-
/**
|
|
1879
|
-
* Type representing a set of criteria for the signSolMessage operation.
|
|
1880
|
-
* Can contain up to 10 individual criterion objects for Solana message matching.
|
|
1881
|
-
*/
|
|
1882
|
-
export type SignSolMessageCriteria = z.infer<typeof SignSolMessageCriteriaSchema>;
|
|
3246
|
+
export type SendEndUserSolTransactionRule = z.infer<typeof SendEndUserSolTransactionRuleSchema>;
|
|
1883
3247
|
/**
|
|
1884
|
-
* Type representing a '
|
|
3248
|
+
* Type representing a 'signEndUserSolMessage' policy rule that can accept or reject specific operations
|
|
1885
3249
|
* based on a set of criteria.
|
|
1886
3250
|
*/
|
|
1887
|
-
export declare const
|
|
3251
|
+
export declare const SignEndUserSolMessageRuleSchema: z.ZodObject<{
|
|
1888
3252
|
/**
|
|
1889
3253
|
* Determines whether matching the rule will cause a request to be rejected or accepted.
|
|
1890
3254
|
* "accept" will allow the message signing, "reject" will block it.
|
|
@@ -1892,9 +3256,9 @@ export declare const SignSolMessageRuleSchema: z.ZodObject<{
|
|
|
1892
3256
|
action: z.ZodEnum<["reject", "accept"]>;
|
|
1893
3257
|
/**
|
|
1894
3258
|
* The operation to which this rule applies.
|
|
1895
|
-
* Must be "
|
|
3259
|
+
* Must be "signEndUserSolMessage".
|
|
1896
3260
|
*/
|
|
1897
|
-
operation: z.ZodLiteral<"
|
|
3261
|
+
operation: z.ZodLiteral<"signEndUserSolMessage">;
|
|
1898
3262
|
/**
|
|
1899
3263
|
* The set of criteria that must be matched for this rule to apply.
|
|
1900
3264
|
* Must be compatible with the specified operation type.
|
|
@@ -1915,18 +3279,18 @@ export declare const SignSolMessageRuleSchema: z.ZodObject<{
|
|
|
1915
3279
|
}>, "many">;
|
|
1916
3280
|
}, "strip", z.ZodTypeAny, {
|
|
1917
3281
|
action: "reject" | "accept";
|
|
1918
|
-
operation: "
|
|
3282
|
+
operation: "signEndUserSolMessage";
|
|
1919
3283
|
criteria: {
|
|
1920
3284
|
match: string;
|
|
1921
3285
|
type: "solMessage";
|
|
1922
3286
|
}[];
|
|
1923
3287
|
}, {
|
|
1924
3288
|
action: "reject" | "accept";
|
|
1925
|
-
operation: "
|
|
3289
|
+
operation: "signEndUserSolMessage";
|
|
1926
3290
|
criteria: {
|
|
1927
3291
|
match: string;
|
|
1928
3292
|
type: "solMessage";
|
|
1929
3293
|
}[];
|
|
1930
3294
|
}>;
|
|
1931
|
-
export type
|
|
3295
|
+
export type SignEndUserSolMessageRule = z.infer<typeof SignEndUserSolMessageRuleSchema>;
|
|
1932
3296
|
//# sourceMappingURL=solanaSchema.d.ts.map
|