Skip to content

Latest commit

 

History

History
58 lines (49 loc) · 6.41 KB

PolicyRule.md

File metadata and controls

58 lines (49 loc) · 6.41 KB

PolicyRule

Policy rule which is enforced on transactions

Properties

Name Type Description Notes
operator str (deprecated - replaced by "operators") Defines users who can initiate the type of transaction to which the rule applies. options are * "*" - All users are allowed * Specific User id
operators PolicyRuleOperators [optional]
transaction_type str Defines the type of transaction to which the rule applies. * TRANSFER - Default. Transfers funds from one account to another * CONTRACT_CALL - Calls a smart contract, mainly for DeFi operations. * APPROVE - Allows a smart contract to withdraw from a designated wallet. * MINT - Perform a mint operation (increase supply) on a supported token * BURN - Perform a burn operation (reduce supply) on a supported token * SUPPLY - Use for DeFi to lend assets * REDEEM - Use for DeFi to get lending back * STAKE - Allows you to allocate and lock certain assets for earning staking rewards. * RAW - An off-chain message with no predefined format, use it to sign any message with your private key. * TYPED_MESSAGE - An off-chain message type that follows a predefined format, used to sign specific messages that are not actual transactions. [optional]
designated_signer str (deprecated - replaced by "designatedSigners") Id representing the user who signs transactions that match a specific rule [optional]
designated_signers PolicyRuleDesignatedSigners [optional]
type str Policy rule type
action str Defines what occurs when a transaction meets the rule's criteria * ALLOW - The transaction goes through and can be signed without requiring additional approvals * BLOCK - The transaction is automatically blocked * 2-TIER - Only these users or user groups can approve If any of them reject the transaction before the required approval threshold is met, the transaction doesn't go through The list of entities are set is "authorizationGroups" field
asset str Defines the type of asset being transacted, options are * "*" - All assets * Specific asset
src_type PolicySrcOrDestType (deprecated - replaced by "src") source account type [optional]
src_sub_type PolicySrcOrDestSubType (deprecated - replaced by "src") source sub account type [optional]
src_id str (deprecated - replaced by "src") source account id [optional]
src PolicyRuleSrc [optional]
dst_type PolicySrcOrDestType (deprecated - replaced by "dst") destination account type [optional]
dst_sub_type PolicySrcOrDestSubType (deprecated - replaced by "dst") destination sub account type [optional]
dst_id str (deprecated - replaced by "dst") destination account id [optional]
dst PolicyRuleDst [optional]
dst_address_type str Defines whether the destination to which you are sending funds must be whitelisted, to allow one-time transfers to non-whitelisted external addresses, or both. By default, you can only transfer to an external address after it’s whitelisted. * WHITELISTED - Can only be sent to whitelisted addresses. * ONE_TIME - Can only be sent to non-whitelisted external addresses. * "*" - can be sent to whitelisted addresses or non-whitelisted external [optional]
amount_currency str * USD - Limits the amount of any asset users can transfer based on the USD equivalent of the asset. * EUR - Limits the amount of any asset users can transfer based on the EURO equivalent of the asset. * NATIVE - Limits the amount of an asset a user can transfer when using a specific asset.
amount_scope str * SINGLE_TX - limit applies to a single transaction * TIMEFRAME - limit applies to all transactions within the defined time period
amount PolicyRuleAmount
period_sec float Time period in seconds applied by the amountScope field to accumulate transferred amounts in transactions that match the rule, until the total exceeds the value you specify under Minimum. When the specified amount is reached within that period, whether by one or many transactions, further transactions in that period either fail or require more approvals.
authorizers List[str] (deprecated - replaced by "authorizationGroups") Allowed entities which can approves a transaction [optional]
authorizers_count float (deprecated - replaced by "authorizationGroups") Min amount of entities which are needed to approve a transaction [optional]
authorization_groups PolicyRuleAuthorizationGroups [optional]
amount_aggregation PolicyRuleAmountAggregation [optional]
raw_message_signing PolicyRuleRawMessageSigning [optional]
apply_for_approve bool Applying this rule over APPROVE type transactions (can only be enabled when rule's transaction type is TRANSFER) [optional]
apply_for_typed_message bool Applying this rule over TYPED_MESSAGE type transactions (can only be enabled when rule's transaction type is CONTRACT_CALL) [optional]
external_descriptor str A unique id identifying the rule [optional]

Example

from fireblocks.models.policy_rule import PolicyRule

# TODO update the JSON string below
json = "{}"
# create an instance of PolicyRule from a JSON string
policy_rule_instance = PolicyRule.from_json(json)
# print the JSON string representation of the object
print(PolicyRule.to_json())

# convert the object into a dict
policy_rule_dict = policy_rule_instance.to_dict()
# create an instance of PolicyRule from a dict
policy_rule_from_dict = PolicyRule.from_dict(policy_rule_dict)

[Back to Model list] [Back to API list] [Back to README]