pub enum InvalidAccessKeyError {
AccessKeyNotFound {
account_id: AccountId,
public_key: PublicKey,
},
ReceiverMismatch {
ak_receiver: String,
tx_receiver: AccountId,
},
MethodNameMismatch {
method_name: String,
},
RequiresFullAccess,
NotEnoughAllowance {
account_id: AccountId,
allowance: String,
cost: String,
public_key: PublicKey,
},
DepositWithFunctionCall,
}
Expand description
InvalidAccessKeyError
JSON schema
{
"oneOf": [
{
"description": "The access key identified by the `public_key` doesn't exist for the account",
"type": "object",
"required": [
"AccessKeyNotFound"
],
"properties": {
"AccessKeyNotFound": {
"type": "object",
"required": [
"account_id",
"public_key"
],
"properties": {
"account_id": {
"$ref": "#/components/schemas/AccountId"
},
"public_key": {
"$ref": "#/components/schemas/PublicKey"
}
}
}
},
"additionalProperties": false
},
{
"description": "Transaction `receiver_id` doesn't match the access key receiver_id",
"type": "object",
"required": [
"ReceiverMismatch"
],
"properties": {
"ReceiverMismatch": {
"type": "object",
"required": [
"ak_receiver",
"tx_receiver"
],
"properties": {
"ak_receiver": {
"type": "string"
},
"tx_receiver": {
"$ref": "#/components/schemas/AccountId"
}
}
}
},
"additionalProperties": false
},
{
"description": "Transaction method name isn't allowed by the access key",
"type": "object",
"required": [
"MethodNameMismatch"
],
"properties": {
"MethodNameMismatch": {
"type": "object",
"required": [
"method_name"
],
"properties": {
"method_name": {
"type": "string"
}
}
}
},
"additionalProperties": false
},
{
"description": "Transaction requires a full permission access key.",
"type": "string",
"enum": [
"RequiresFullAccess"
]
},
{
"description": "Access Key does not have enough allowance to cover transaction cost",
"type": "object",
"required": [
"NotEnoughAllowance"
],
"properties": {
"NotEnoughAllowance": {
"type": "object",
"required": [
"account_id",
"allowance",
"cost",
"public_key"
],
"properties": {
"account_id": {
"$ref": "#/components/schemas/AccountId"
},
"allowance": {
"type": "string"
},
"cost": {
"type": "string"
},
"public_key": {
"$ref": "#/components/schemas/PublicKey"
}
}
}
},
"additionalProperties": false
},
{
"description": "Having a deposit with a function call action is not allowed with a function call access key.",
"type": "string",
"enum": [
"DepositWithFunctionCall"
]
}
]
}
Variants§
AccessKeyNotFound
The access key identified by the public_key
doesn’t exist for the account
ReceiverMismatch
Transaction receiver_id
doesn’t match the access key receiver_id
MethodNameMismatch
Transaction method name isn’t allowed by the access key
RequiresFullAccess
Transaction requires a full permission access key.
NotEnoughAllowance
Access Key does not have enough allowance to cover transaction cost
DepositWithFunctionCall
Having a deposit with a function call action is not allowed with a function call access key.
Trait Implementations§
Source§impl Clone for InvalidAccessKeyError
impl Clone for InvalidAccessKeyError
Source§fn clone(&self) -> InvalidAccessKeyError
fn clone(&self) -> InvalidAccessKeyError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for InvalidAccessKeyError
impl Debug for InvalidAccessKeyError
Source§impl<'de> Deserialize<'de> for InvalidAccessKeyError
impl<'de> Deserialize<'de> for InvalidAccessKeyError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&InvalidAccessKeyError> for InvalidAccessKeyError
impl From<&InvalidAccessKeyError> for InvalidAccessKeyError
Source§fn from(value: &InvalidAccessKeyError) -> Self
fn from(value: &InvalidAccessKeyError) -> Self
Converts to this type from the input type.
Source§impl From<InvalidAccessKeyError> for ActionErrorKind
impl From<InvalidAccessKeyError> for ActionErrorKind
Source§fn from(value: InvalidAccessKeyError) -> Self
fn from(value: InvalidAccessKeyError) -> Self
Converts to this type from the input type.
Source§impl From<InvalidAccessKeyError> for InvalidTxError
impl From<InvalidAccessKeyError> for InvalidTxError
Source§fn from(value: InvalidAccessKeyError) -> Self
fn from(value: InvalidAccessKeyError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for InvalidAccessKeyError
impl RefUnwindSafe for InvalidAccessKeyError
impl Send for InvalidAccessKeyError
impl Sync for InvalidAccessKeyError
impl Unpin for InvalidAccessKeyError
impl UnwindSafe for InvalidAccessKeyError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more