GraphQL API Reference
GraphQl endpoints for smart-wallets!
API Endpoints
Copy # devel:
https://smart-wallets.devel.original.works/graphql
# staging:
https://smart-wallets.stage.original.works/graphql
# prod:
https://smart-wallets.original.works/graphql
Queries
getExecution
Description
🔒 JWT Token
Returns execution by messageId.
Response
Returns a StartExecutionResDto!
Arguments
Example
Query
Copy query GetExecution ($messageId: String ! ) {
getExecution(messageId: $messageId) {
id
deployedSmartWalletId
networkName
transactionHash
messageId
userId
createdAt
updatedAt
}
}
Variables
Copy { "messageId" : "abc123" }
Response
Copy {
"data" : {
"getExecution" : {
"id" : 987.65 ,
"deployedSmartWalletId" : 987.65 ,
"networkName" : "ropsten" ,
"transactionHash" : "abc123" ,
"messageId" : "abc123" ,
"userId" : "xyz789" ,
"createdAt" : "2007-12-03T10:15:30Z" ,
"updatedAt" : "2007-12-03T10:15:30Z"
}
}
}
Queries
getExecutions
Description
🔒 JWT Token
Returns all operations on the chain for the given user.
Response
Returns a StartExecutionListResDto!
Example
Query
Copy query GetExecutions {
getExecutions {
list {
id
deployedSmartWalletId
networkName
transactionHash
messageId
userId
createdAt
updatedAt
}
}
}
Response
Copy {
"data" : {
"getExecutions" : { "list" : [StartExecutionResDto]}
}
}
Queries
getSmartWallet
Description
🔒 JWT Token
Returns record of the smart wallet.
Response
Returns a SmartWalletDto!
Example
Query
Copy query GetSmartWallet {
getSmartWallet {
ownerUri
walletAddress
type
deployedSmartWallets {
id
networkName
smartWalletId
messageId
statusOnChain
createdAt
updatedAt
}
createdAt
updatedAt
}
}
Response
Copy {
"data" : {
"getSmartWallet" : {
"ownerUri" : "abc123" ,
"walletAddress" : "xyz789" ,
"type" : "ENTERPRISE" ,
"deployedSmartWallets" : [DeployedSmartWalletDto] ,
"createdAt" : "2007-12-03T10:15:30Z" ,
"updatedAt" : "2007-12-03T10:15:30Z"
}
}
}
Queries
getSmartWalletRecord
Description
🔒 JWT Token
Returns record of the smart wallet.
Response
Returns a SmartWalletDto!
Arguments
Example
Query
Copy query GetSmartWalletRecord ($ownerUri: String ! ) {
getSmartWalletRecord(ownerUri: $ownerUri) {
ownerUri
walletAddress
type
deployedSmartWallets {
id
networkName
smartWalletId
messageId
statusOnChain
createdAt
updatedAt
}
createdAt
updatedAt
}
}
Variables
Copy { "ownerUri" : "xyz789" }
Response
Copy {
"data" : {
"getSmartWalletRecord" : {
"ownerUri" : "abc123" ,
"walletAddress" : "abc123" ,
"type" : "ENTERPRISE" ,
"deployedSmartWallets" : [DeployedSmartWalletDto] ,
"createdAt" : "2007-12-03T10:15:30Z" ,
"updatedAt" : "2007-12-03T10:15:30Z"
}
}
}
Mutations
createSmartWallet
Description
Copy 🔒 <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> <html> <head></head> <body><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
Copy { "ownerUri" : "xyz789" }
Response
Copy {
"data" : {
"createSmartWallet" : {
"ownerUri" : "xyz789" ,
"walletAddress" : "xyz789" ,
"type" : "ENTERPRISE" ,
"deployedSmartWallets" : [DeployedSmartWalletDto] ,
"createdAt" : "2007-12-03T10:15:30Z" ,
"updatedAt" : "2007-12-03T10:15:30Z"
}
}
}
Mutations
deploySmartWallet
Description
JWT Token
Copy 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> <html> <head></head> <body><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
Copy {
"networkName" : "abc123" ,
"ownerUri" : "abc123"
}
Response
Copy {
"data" : {
"deploySmartWallet" : {
"id" : 123.45 ,
"networkName" : "ropsten" ,
"smartWalletId" : 987.65 ,
"messageId" : "xyz789" ,
"statusOnChain" : "transaction_started" ,
"createdAt" : "2007-12-03T10:15:30Z" ,
"updatedAt" : "2007-12-03T10:15:30Z"
}
}
}
Mutations
startExecution
Description
JWT Token
Starts transactions on the chain.
Response
Returns a String!
Arguments
Example
Query
Copy mutation StartExecution ($startExecutionArgs: StartExecutionReqDto ! ) {
startExecution(startExecutionArgs: $startExecutionArgs)
}
Variables
Copy { "startExecutionArgs" : StartExecutionReqDto}
Response
Copy { "data" : { "startExecution" : "xyz789" }}
Types
Boolean
Description
The Boolean
scalar type represents true
or false
.
Types
DateTime
Description
A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.
Example
Copy "2007-12-03T10:15:30Z"
Types
DeployedSmartWalletDto
Description
Smart wallet object
Fields
Field Name Description Unique identifier for the object.
Name of the blockchain network
Unique identifier for the smart wallet object.
A unique value. It is used to identify messages in events.
Name of the blockchain network
Time at which the object was created.
Time at which the object was last updated.
Example
Copy {
"id" : 987.65 ,
"networkName" : "ropsten" ,
"smartWalletId" : 987.65 ,
"messageId" : "xyz789" ,
"statusOnChain" : "transaction_started" ,
"createdAt" : "2007-12-03T10:15:30Z" ,
"updatedAt" : "2007-12-03T10:15:30Z"
}
Types
DeployedSmartWalletStatus
Values
Example
Copy "transaction_started"
Types
Float
Description
The Float
scalar type represents signed double-precision fractional values as specified by IEEE 754 .
Example
Types
NetworkName
Values
Example
Types
SmartWalletDto
Description
Smart wallet object
Fields
Field Name Description Unique identifier for the enterprise.
Time at which the object was created.
Time at which the object was last updated.
Example
Copy {
"ownerUri" : "xyz789" ,
"walletAddress" : "xyz789" ,
"type" : "ENTERPRISE" ,
"deployedSmartWallets" : [DeployedSmartWalletDto] ,
"createdAt" : "2007-12-03T10:15:30Z" ,
"updatedAt" : "2007-12-03T10:15:30Z"
}
Types
SmartWalletType
Values
Example
Types
StartExecutionListResDto
Description
List of started executions on the chain for the given user
Fields
Field Name Description List of started executions on the chain for the given user
Example
Copy { "list" : [StartExecutionResDto]}
Types
StartExecutionReqDto
Description
Argument required for trigger transaction on the chain
Fields
Input Field Description Receiver's Ethereum address
Unique identifier for the network.
A unique value generated by the client. It is used to identify messages in events.
Encoded data of transaction to be executed.
Example
Copy {
"to" : "abc123" ,
"value" : "xyz789" ,
"chainId" : 123.45 ,
"messageId" : "abc123" ,
"data" : "abc123"
}
Types
StartExecutionResDto
Description
Object of initiated chain transaction.
Fields
Field Name Description Unique identifier for the object.
deployedSmartWalletId
- Float!
Unique identifier for the deployment of the smart wallet.
Name of the blockchain network
Hash of a transaction if execution has been submitted to the blockchain
A unique value generated by the client. It is used to identify messages in events.
Unique identifier for the user. The value comes from the auth0 token.
Time at which the object was created.
Time at which the object was last updated.
Example
Copy {
"id" : 987.65 ,
"deployedSmartWalletId" : 123.45 ,
"networkName" : "ropsten" ,
"transactionHash" : "xyz789" ,
"messageId" : "abc123" ,
"userId" : "abc123" ,
"createdAt" : "2007-12-03T10:15:30Z" ,
"updatedAt" : "2007-12-03T10:15:30Z"
}
Types
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
Documentation by Anvil SpectaQL
Last updated 3 months ago