Skip to content

Overview

Methods

MethodDescriptionStandard
eth_accountsReturns an array of all connected Account addresses.EIP-1474
eth_requestAccountsRequests access to Account addresses.
eth_sendTransactionBroadcasts a transaction to the network.EIP-1474
eth_signTypedData_v4Signs EIP-712 typed data.EIP-712
personal_signSigns an EIP-191 personal message.EIP-191
wallet_connectRequests to connect account(s) with optional capabilities.ERC-7846
wallet_disconnectDisconnects the Application from Porto.ERC-7846
wallet_getCapabilitiesGets supported capabilities of Porto..ERC-5792
wallet_getCallsStatusGets the status of a call bundle.ERC-5792
wallet_prepareCallsPrepares a call bundle.ERC-7836
wallet_sendCallsBroadcast a bundle of calls to the network.ERC-5792
wallet_sendPreparedCallsExecutes a signed and prepared call bundle.ERC-7836
experimental_createAccountCreates an account.Experimental
experimental_grantPermissionsGrants permissions for an Application to perform actions on behalf of the account.Experimental
experimental_permissionsReturns the active permissions for an account.Experimental
experimental_revokePermissionsRevokes a permission.Experimental

ERC-5792 Capabilities

Porto implements the following ERC-5792 capabilities to define extended behavior:

atomicBatch

The Porto Account supports atomic batch calls. This means that multiple calls will be executed in a single transaction upon using wallet_sendCalls.

createAccount

Porto supports programmatic account creation.

Creation via experimental_createAccount

Accounts may be created via the experimental_createAccount JSON-RPC method.

Example:

{ method: 'experimental_createAccount' }

Creation via wallet_connect

Accounts may be created upon connection with the createAccount capability on the wallet_connect JSON-RPC method.

Example:

{
  method: 'wallet_connect',
  params: [{
    capabilities: {
      createAccount: true
      // OR
      createAccount: { label: "My Example Account" }
    }
  }]
}

permissions

Porto supports account permission management.

Granting permissions via experimental_grantPermissions

Permissions may be granted via the experimental_grantPermissions JSON-RPC method.

Example:

{
  method: 'experimental_grantPermissions',
  params: [{ 
    expiry: 1727078400,
    permissions: {
      calls: [{
        signature: 'mint()',
        to: '0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbe',
      }],
    },
  }]
}

Granting permissions via wallet_connect

Permissions may be granted upon connection with the grantPermissions capability on the wallet_connect JSON-RPC method.

Example:

{
  method: 'wallet_connect',
  params: [{ 
    capabilities: { 
      grantPermissions: {
        expiry: 1727078400,
        permissions: {
          calls: [{ signature: 'subscribe()' }],
          spend: [{
            limit: '0x5f5e100', // 100 USDC
            period: 'day',
            token: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', // USDC
          }]
        }
      }
    } 
  }]
}

If a permission is granted upon connection, the wallet_connect JSON-RPC method will return the permission on the capabilities.permissions parameter of the response.

Example:

{
  accounts: [{
    address: '0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbe',
    capabilities: {
      permissions: [{ 
        expiry: 1727078400,
        key: {
          publicKey: '0x...', 
          type: 'p256' 
        },
        permissions: {
          calls: [{
            signature: 'subscribe()',
          }],
          spend: [{
            limit: '0x5f5e100', // 100 USDC
            period: 'day',
            token: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', // USDC
          }]
        }
      }]
    }
  }],
}