smart-wallets-service-api
GraphQL API Reference
GraphQl endpoints for smart-wallets!
API Endpoints
# devel:
https://smart-wallets.devel.original.works/graphql
# staging:
https://smart-wallets.stage.original.works/graphql
# prod:
https://smart-wallets.original.works/graphqlQueries
getExecution
getExecutionDescription
🔒 JWT Token
Returns execution by messageId.
Response
Returns a StartExecutionResDto!
Arguments
messageId - String!
Example
Query
query GetExecution($messageId: String!) {
  getExecution(messageId: $messageId) {
    id
    deployedSmartWalletId
    networkName
    transactionHash
    messageId
    userId
    createdAt
    updatedAt
  }
}Variables
{"messageId": "xyz789"}Response
{
  "data": {
    "getExecution": {
      "id": 987.65,
      "deployedSmartWalletId": 123.45,
      "networkName": "ropsten",
      "transactionHash": "abc123",
      "messageId": "xyz789",
      "userId": "xyz789",
      "createdAt": "2007-12-03T10:15:30Z",
      "updatedAt": "2007-12-03T10:15:30Z"
    }
  }
}getExecutions
getExecutionsDescription
🔒 JWT Token
Returns all operations on the chain for the given user.
Response
Returns a StartExecutionListResDto!
Example
Query
query GetExecutions {
  getExecutions {
    list {
      id
      deployedSmartWalletId
      networkName
      transactionHash
      messageId
      userId
      createdAt
      updatedAt
    }
  }
}Response
{
  "data": {
    "getExecutions": {"list": [StartExecutionResDto]}
  }
}getOrCheckSmartWallet
getOrCheckSmartWalletDescription
🔒 JWT Token
Returns record of the smart wallet or false if does not exist.
Response
Returns a GetOrCheckSmartWalletDto!
Example
Query
query GetOrCheckSmartWallet {
  getOrCheckSmartWallet {
    smartWalletAddress
  }
}Response
{
  "data": {
    "getOrCheckSmartWallet": {
      "smartWalletAddress": "xyz789"
    }
  }
}getSmartWallet
getSmartWalletDescription
🔒 JWT Token
Returns record of the smart wallet.
Response
Returns a SmartWalletDto!
Example
Query
query GetSmartWallet {
  getSmartWallet {
    ownerUri
    walletAddress
    type
    deployedSmartWallets {
      id
      networkName
      smartWalletId
      messageId
      statusOnChain
      createdAt
      updatedAt
    }
    createdAt
    updatedAt
  }
}Response
{
  "data": {
    "getSmartWallet": {
      "ownerUri": "abc123",
      "walletAddress": "abc123",
      "type": "ENTERPRISE",
      "deployedSmartWallets": [DeployedSmartWalletDto],
      "createdAt": "2007-12-03T10:15:30Z",
      "updatedAt": "2007-12-03T10:15:30Z"
    }
  }
}getSmartWalletRecord
getSmartWalletRecordDescription
🔒 JWT Token
Returns record of the smart wallet.
Response
Returns a SmartWalletDto!
Arguments
ownerUri - String!
unique id for tenant
Example
Query
query GetSmartWalletRecord($ownerUri: String!) {
  getSmartWalletRecord(ownerUri: $ownerUri) {
    ownerUri
    walletAddress
    type
    deployedSmartWallets {
      id
      networkName
      smartWalletId
      messageId
      statusOnChain
      createdAt
      updatedAt
    }
    createdAt
    updatedAt
  }
}Variables
{"ownerUri": "xyz789"}Response
{
  "data": {
    "getSmartWalletRecord": {
      "ownerUri": "abc123",
      "walletAddress": "xyz789",
      "type": "ENTERPRISE",
      "deployedSmartWallets": [DeployedSmartWalletDto],
      "createdAt": "2007-12-03T10:15:30Z",
      "updatedAt": "2007-12-03T10:15:30Z"
    }
  }
}Mutations
createSmartWallet
createSmartWalletDescription
🔒 <b><u>JWT Token</u></b>
                Creates a smart wallet and returns its data.                This is not a chain operation.                </code></pre>          </div>        </div>      </div>      <div class="doc-row">        <div class="doc-copy">          <div class="operation-response doc-copy-section">            <h5>Response</h5>            <p> Returns a <a href="#definition-SmartWalletDto"><code>SmartWalletDto!</code></a>            </p>          </div>          <div class="operation-arguments doc-copy-section">            <h5>Arguments</h5>            <table>              <thead>                <tr>                  <th>Name</th>                  <th>Description</th>                </tr>              </thead>              <tbody>                <tr>                  <td>                    <span class="property-name"><code>ownerUri</code></span> - <span class="property-type"><a href="#definition-String"><code>String!</code></a></span>                  </td>                  <td> unique id for tenant </td>                </tr>              </tbody>            </table>          </div>        </div>        <div class="doc-examples">          <h4 class="example-heading">Example</h4>          <div class="example-section example-section-is-code operation-query-example">            <h5>Query</h5>            <pre><code class="hljs language-gql"><span class="hljs-symbol"><span class="hljs-keyword">mutation</span> CreateSmartWallet<span class="hljs-tag">(<span class="hljs-code">$ownerUri</span>:<span class="hljs-type"> String!</span>)</span> <span class="hljs-tag">{
createSmartWallet(ownerUri: $ownerUri) {
ownerUri
walletAddress
type
deployedSmartWallets {
id
networkName
smartWalletId
messageId
statusOnChain
createdAt
updatedAt
}
createdAt
updatedAt
}
}Variables
{"ownerUri": "xyz789"}Response
{
"data": {
"createSmartWallet": {
"ownerUri": "abc123",
"walletAddress": "xyz789",
"type": "ENTERPRISE",
"deployedSmartWallets": [DeployedSmartWalletDto],
"createdAt": "2007-12-03T10:15:30Z",
"updatedAt": "2007-12-03T10:15:30Z"
}
}
}deploySmartWallet
deploySmartWalletDescription
🔒 JWT Token
    Deploy a smart wallet and returns its data.
This is a chain operation.
Use only for wallets with status transactionFailed
                </code></pre>          </div>        </div>      </div>      <div class="doc-row">        <div class="doc-copy">          <div class="operation-response doc-copy-section">            <h5>Response</h5>            <p> Returns a <a href="#definition-DeployedSmartWalletDto"><code>DeployedSmartWalletDto!</code></a>            </p>          </div>          <div class="operation-arguments doc-copy-section">            <h5>Arguments</h5>            <table>              <thead>                <tr>                  <th>Name</th>                  <th>Description</th>                </tr>              </thead>              <tbody>                <tr>                  <td>                    <span class="property-name"><code>networkName</code></span> - <span class="property-type"><a href="#definition-String"><code>String!</code></a></span>                  </td>                  <td> Name of the blockchain network </td>                </tr>                <tr>                  <td>                    <span class="property-name"><code>ownerUri</code></span> - <span class="property-type"><a href="#definition-String"><code>String!</code></a></span>                  </td>                  <td> unique id for tenant </td>                </tr>              </tbody>            </table>          </div>        </div>        <div class="doc-examples">          <h4 class="example-heading">Example</h4>          <div class="example-section example-section-is-code operation-query-example">            <h5>Query</h5>            <pre><code class="hljs language-gql"><span class="hljs-symbol"><span class="hljs-keyword">mutation</span> DeploySmartWallet<span class="hljs-tag">(
$networkName: String!,
$ownerUri: String!
) {
deploySmartWallet(
networkName: $networkName,
ownerUri: $ownerUri
) {
id
networkName
smartWalletId
messageId
statusOnChain
createdAt
updatedAt
}
}Variables
{
"networkName": "abc123",
"ownerUri": "xyz789"
}Response
{
"data": {
"deploySmartWallet": {
"id": 987.65,
"networkName": "ropsten",
"smartWalletId": 123.45,
"messageId": "xyz789",
"statusOnChain": "transaction_started",
"createdAt": "2007-12-03T10:15:30Z",
"updatedAt": "2007-12-03T10:15:30Z"
}
}
}startExecution
startExecutionDescription
🔒 JWT Token
Starts transactions on the chain.
Response
Returns a String!
Arguments
startExecutionArgs - StartExecutionReqDto!
Example
Query
mutation StartExecution($startExecutionArgs: StartExecutionReqDto!) {
startExecution(startExecutionArgs: $startExecutionArgs)
}Variables
{"startExecutionArgs": StartExecutionReqDto}Response
{"data": {"startExecution": "xyz789"}}Types
Boolean
Description
The Boolean scalar type represents true or false.
Example
trueDateTime
Description
A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.
Example
"2007-12-03T10:15:30Z"DeployedSmartWalletDto
Description
Smart wallet object
Fields
id - Float!
Unique identifier for the object.
networkName - NetworkName!
Name of the blockchain network
smartWalletId - Float!
Unique identifier for the smart wallet object.
messageId - String!
A unique value. It is used to identify messages in events.
statusOnChain - DeployedSmartWalletStatus!
Name of the blockchain network
createdAt - DateTime!
Time at which the object was created.
updatedAt - DateTime!
Time at which the object was last updated.
Example
{
"id": 123.45,
"networkName": "ropsten",
"smartWalletId": 123.45,
"messageId": "xyz789",
"statusOnChain": "transaction_started",
"createdAt": "2007-12-03T10:15:30Z",
"updatedAt": "2007-12-03T10:15:30Z"
}DeployedSmartWalletStatus
Values
transaction_started
transaction_failed
transaction_successful
Example
"transaction_started"Float
Description
The Float scalar type represents signed double-precision fractional values as specified by IEEE 754.
Example
987.65GetOrCheckSmartWalletDto
Description
smart wallet address
Fields
smartWalletAddress - String
Example
{"smartWalletAddress": "abc123"}NetworkName
Values
ropsten
kovan
ownet
mainnet
binance
bnbtest
sepolia
local
test
polygon
goerli
mumbai
ethereum
shibuya
amoy
base
baseSepolia
Example
"ropsten"SmartWalletDto
Description
Smart wallet object
Fields
ownerUri - String!
Unique identifier for the enterprise.
walletAddress - String!
Ethereum wallet address.
type - SmartWalletType!
Type of the smart wallet
deployedSmartWallets - [DeployedSmartWalletDto!]
createdAt - DateTime!
Time at which the object was created.
updatedAt - DateTime!
Time at which the object was last updated.
Example
{
"ownerUri": "xyz789",
"walletAddress": "abc123",
"type": "ENTERPRISE",
"deployedSmartWallets": [DeployedSmartWalletDto],
"createdAt": "2007-12-03T10:15:30Z",
"updatedAt": "2007-12-03T10:15:30Z"
}SmartWalletType
Values
ENTERPRISE
RETAIL
Example
"ENTERPRISE"StartExecutionListResDto
Description
List of started executions on the chain for the given user
Fields
list - [StartExecutionResDto!]!
List of started executions on the chain for the given user
Example
{"list": [StartExecutionResDto]}StartExecutionReqDto
Description
Argument required for trigger transaction on the chain
Fields
Example
{
"to": "abc123",
"value": "xyz789",
"chainId": 123.45,
"messageId": "xyz789",
"data": "xyz789"
}StartExecutionResDto
Description
Object of initiated chain transaction.
Fields
id - Float!
Unique identifier for the object.
deployedSmartWalletId - Float!
Unique identifier for the deployment of the smart wallet.
networkName - NetworkName!
Name of the blockchain network
transactionHash - String
Hash of a transaction if execution has been submitted to the blockchain
messageId - String!
A unique value generated by the client. It is used to identify messages in events.
userId - String!
Unique identifier for the user. The value comes from the auth0 token.
createdAt - DateTime!
Time at which the object was created.
updatedAt - DateTime!
Time at which the object was last updated.
Example
{
"id": 123.45,
"deployedSmartWalletId": 987.65,
"networkName": "ropsten",
"transactionHash": "xyz789",
"messageId": "xyz789",
"userId": "xyz789",
"createdAt": "2007-12-03T10:15:30Z",
"updatedAt": "2007-12-03T10:15:30Z"
}String
Description
The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
Example
"abc123"Last updated
Was this helpful?