{"openapi":"3.0.3","info":{"title":"Relayr API","version":"1.0.0"},"servers":[{"url":"http://127.0.0.1:8080","description":"Local development server"},{"url":"https://relayr-api-staging.up.railway.app","description":"Production server"}],"paths":{"/v1/whoami":{"get":{"tags":["User"],"summary":"Get current user","operationId":"get_v1-whoami-fa8652413f5a4bfba6c89b7dd347646e","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhoamiResponse"}}}}},"deprecated":false,"security":[{}]}},"/v1/chains":{"get":{"tags":["Chain"],"summary":"Get supported chains","operationId":"get_v1-chains-fc406b1a561b821e0fa2710e2eda45dd","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportedChainsResponse"}}}}},"deprecated":false}},"/v1/organization":{"post":{"tags":["Organization"],"summary":"New organization","description":"Create a new organization and a new app for the organization.","operationId":"post_v1-organization-494df474e1fed612d409aef52b48e16a","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewOrganizationRequest"}}},"required":true},"responses":{"200":{"description":""}},"deprecated":false,"security":[{}]}},"/v1/organization/{org_id}/app":{"post":{"tags":["Organization"],"summary":"New app","operationId":"post_v1-organization-d00de7dee7e3cb0c9288afa02ff3d677","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"title":"Uuid","type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewOrganizationRequest"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"title":"Organization","type":"object","required":["apps","created_at","id","name"],"properties":{"apps":{"type":"array","items":{"$ref":"#/components/schemas/App"}},"created_at":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}}}}}},"deprecated":false,"security":[{}]}},"/v1/app/{app_uuid}/live-bundles":{"get":{"tags":["App"],"summary":"Get live bundles for app","operationId":"get_v1-app-afdcdf57ad122b5c4bc9ecdca75092d8","parameters":[{"name":"app_uuid","in":"path","required":true,"schema":{"title":"Uuid","type":"string","format":"uuid"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BundleResponse"}}}}}},"deprecated":false,"security":[{}]}},"/v1/app/{app_uuid}/bundles":{"get":{"tags":["App"],"summary":"Get bundles for an app","operationId":"get_v1-app-f9d726354d2d0097f3ec9e58af10465c","parameters":[{"name":"app_uuid","in":"path","required":true,"schema":{"title":"Uuid","type":"string","format":"uuid"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BundleResponse"}}}}}},"deprecated":false,"security":[{}]}},"/v1/bundle/{bundle_uuid}":{"get":{"tags":["Bundle"],"summary":"Get status","operationId":"get_v1-bundle-3b69872314bd4085887df82d746effac","parameters":[{"name":"bundle_uuid","in":"path","required":true,"schema":{"title":"Uuid","type":"string","format":"uuid"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BundleResponse"}}}}},"deprecated":false}},"/v1/bundle/prepaid":{"post":{"tags":["Bundle"],"summary":"New prepaid bundle","operationId":"post_v1-bundle-prepaid-95d09ae7c2a109e7529e34be4509ca1b","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateNewEstimateRequest"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"title":"NewPaymentBundleResponse_for_Array_of_PrepaidPayment","type":"object","required":["bundle_uuid","payment_info","per_tx","tx_uuids"],"properties":{"bundle_uuid":{"description":"The payment id.","type":"string","format":"uuid"},"payment_info":{"description":"Information about the payment.","type":"array","items":{"$ref":"#/components/schemas/PrepaidPayment"}},"per_tx":{"description":"The cost of each transaction in the bundle.","type":"array","items":{"$ref":"#/components/schemas/TransactionCost"}},"tx_uuids":{"description":"The ids of the transactions in this bundle.","type":"array","items":{"type":"string","format":"uuid"}}}}}}},"403":{"description":"Forbidden"},"406":{"description":"Not Acceptable"},"500":{"description":"Internal Server Error"}},"deprecated":false,"security":[{}]}}},"components":{"schemas":{"Address":{"type":"string"},"App":{"type":"object","required":["created_at","id","name"],"properties":{"created_at":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"Asset":{"oneOf":[{"title":"Valueble","type":"object","required":["asset","type"],"properties":{"asset":{"$ref":"#/components/schemas/ValuebleAsset"},"type":{"type":"string","enum":["Valueble"]}}},{"title":"Testnet","type":"object","required":["asset","type"],"properties":{"asset":{"$ref":"#/components/schemas/TestnetAsset"},"type":{"type":"string","enum":["Testnet"]}}},{"title":"type","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["Devnet"]}}}]},"BundleResponse":{"title":"BundleResponse","type":"object","required":["bundle_uuid","created_at","payment","payment_received","transactions"],"properties":{"bundle_uuid":{"description":"The bundle uuid.","type":"string","format":"uuid"},"created_at":{"description":"The time the bundle was created.","type":"string","format":"date-time"},"expires_at":{"description":"The time the bundle will expire.","type":"string","format":"date-time","nullable":true},"payment":{"description":"The payment method and the details regarding the payment.","allOf":[{"$ref":"#/components/schemas/PaymentMethod"}]},"payment_received":{"description":"If the payment has been completed or not.","type":"boolean"},"transactions":{"description":"The transactions in the bundle.","type":"array","items":{"$ref":"#/components/schemas/TransactionStatus"}}}},"Bytes":{"type":"string"},"CallRequest":{"type":"object","required":["chain","target"],"properties":{"chain":{"description":"The chain id the call will be send to.","type":"integer","format":"uint64","minimum":0.0},"data":{"description":"The data that will be send to the target.","allOf":[{"$ref":"#/components/schemas/Bytes"}],"nullable":true},"gas_limit":{"description":"The maximum amount of gas that can be used in this call. This is as specified by the user. If its none then its up to us to determine the correct value for it.","allOf":[{"$ref":"#/components/schemas/U256"}],"nullable":true},"target":{"description":"The receiving address of the call.","allOf":[{"$ref":"#/components/schemas/Address"}]},"value":{"description":"The value that will be send along side the call.","allOf":[{"$ref":"#/components/schemas/U256"}],"nullable":true},"virtual_nonce":{"description":"A virtual nonce that can be used to order the transactions within a bundle.","type":"integer","format":"uint64","minimum":0.0,"nullable":true}}},"CallState":{"oneOf":[{"title":"state","type":"object","required":["state"],"properties":{"state":{"type":"string","enum":["Invalid"]}}},{"title":"state","type":"object","required":["state"],"properties":{"state":{"type":"string","enum":["Pending"]}}},{"title":"Mempool","type":"object","required":["data","state"],"properties":{"data":{"type":"object"},"state":{"type":"string","enum":["Mempool"]}}},{"title":"Cancel","type":"object","required":["data","state"],"properties":{"data":{"type":"object"},"state":{"type":"string","enum":["Cancel"]}}},{"title":"Resend","type":"object","required":["data","state"],"properties":{"data":{"type":"object"},"state":{"type":"string","enum":["Resend"]}}},{"title":"Included","type":"object","required":["data","state"],"properties":{"data":{"type":"object","required":["block"],"properties":{"block":{"description":"The block number in which the transaction was included.","type":"integer","format":"uint64","minimum":0.0}}},"state":{"type":"string","enum":["Included"]}}},{"title":"Cancelled","type":"object","required":["data","state"],"properties":{"data":{"type":"object"},"state":{"type":"string","enum":["Cancelled"]}}},{"title":"Success","type":"object","required":["data","state"],"properties":{"data":{"type":"object"},"state":{"type":"string","enum":["Success"]}}},{"title":"Reverted","type":"object","required":["data","state"],"properties":{"data":{"type":"object"},"state":{"type":"string","enum":["Reverted"]}}}]},"ChainInformationResponse":{"type":"object","required":["block_explorer_url","chain_id","chain_type","logo","name","native_asset","slug"],"properties":{"block_explorer_url":{"type":"string"},"chain_id":{"type":"integer","format":"uint64","minimum":0.0},"chain_type":{"$ref":"#/components/schemas/ChainType"},"logo":{"type":"string"},"name":{"type":"string"},"native_asset":{"$ref":"#/components/schemas/Asset"},"slug":{"$ref":"#/components/schemas/NamedChain"}}},"ChainType":{"type":"string","enum":["Mainnet","Testnet","Devnet"]},"CreateNewEstimateRequest":{"title":"CreateNewEstimateRequest","type":"object","required":["transactions"],"properties":{"app_id":{"type":"string","format":"uuid","nullable":true},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/CallRequest"}},"virtual_nonce_mode":{"default":"Disabled","allOf":[{"$ref":"#/components/schemas/VirtualNonceMode"}]}}},"NamedChain":{"type":"string"},"NewOrganizationRequest":{"title":"NewOrganizationRequest","type":"object","required":["app_name","organization_name"],"properties":{"app_name":{"type":"string"},"organization_name":{"type":"string"}}},"NewPaymentBundleResponse_for_Array_of_PrepaidPayment":{"title":"NewPaymentBundleResponse_for_Array_of_PrepaidPayment","type":"object","required":["bundle_uuid","payment_info","per_tx","tx_uuids"],"properties":{"bundle_uuid":{"description":"The payment id.","type":"string","format":"uuid"},"payment_info":{"description":"Information about the payment.","type":"array","items":{"$ref":"#/components/schemas/PrepaidPayment"}},"per_tx":{"description":"The cost of each transaction in the bundle.","type":"array","items":{"$ref":"#/components/schemas/TransactionCost"}},"tx_uuids":{"description":"The ids of the transactions in this bundle.","type":"array","items":{"type":"string","format":"uuid"}}}},"Organization":{"title":"Organization","type":"object","required":["apps","created_at","id","name"],"properties":{"apps":{"type":"array","items":{"$ref":"#/components/schemas/App"}},"created_at":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"PaymentMethod":{"oneOf":[{"title":"None","type":"string","enum":["None"]},{"title":"Prepaid","type":"object","required":["Prepaid"],"properties":{"Prepaid":{"type":"array","items":{"$ref":"#/components/schemas/PrepaidPayment"}}},"additionalProperties":false}]},"PrepaidPayment":{"type":"object","required":["amount","calldata","chain","payment_deadline","target","token"],"properties":{"amount":{"description":"The amount to send of the token.","allOf":[{"$ref":"#/components/schemas/U256"}]},"calldata":{"description":"The calldata to use.","allOf":[{"$ref":"#/components/schemas/Bytes"}]},"chain":{"description":"The chain id to perform the payment on.","type":"integer","format":"uint64","minimum":0.0},"payment_deadline":{"description":"The deadline after which the payment is no longer valid.","type":"string","format":"date-time"},"target":{"description":"The address to call with the calldata.","allOf":[{"$ref":"#/components/schemas/Address"}]},"token":{"description":"The token that is used for the payment.","allOf":[{"$ref":"#/components/schemas/Address"}]}}},"SupportedChainsResponse":{"title":"SupportedChainsResponse","type":"object","additionalProperties":{"$ref":"#/components/schemas/ChainInformationResponse"}},"TestnetAsset":{"type":"string","enum":["Ether","POL","BNB","AVAX","GLMR","MNT"]},"TransactionCost":{"type":"object","required":["gas_cost","priced_in","value"],"properties":{"gas_cost":{"type":"integer","format":"uint128","minimum":0.0},"priced_in":{"$ref":"#/components/schemas/Asset"},"value":{"type":"integer","format":"uint128","minimum":0.0}}},"TransactionStatus":{"type":"object","required":["request","status","tx_uuid"],"properties":{"request":{"$ref":"#/components/schemas/CallRequest"},"status":{"$ref":"#/components/schemas/CallState"},"tx_uuid":{"type":"string","format":"uuid"}}},"U256":{"type":"string"},"ValuebleAsset":{"type":"string","enum":["Ether","POL","BNB","AVAX","GLMR","MNT"]},"VirtualNonceMode":{"type":"string","enum":["Disabled","ChainIndependent","MultiChain"]},"WhoamiResponse":{"title":"WhoamiResponse","type":"object","required":["address","organizations"],"properties":{"address":{"$ref":"#/components/schemas/Address"},"organizations":{"type":"array","items":{"$ref":"#/components/schemas/Organization"}}}}}},"tags":[{"name":"User","description":"Routes regarding to the user and their account."},{"name":"Bundle","description":"The core routes, these routes are able to create bundles of transactions and allow you to fetch the executement/payment status of bundles."},{"name":"App","description":"Routes for creating and managing apps on the platform."},{"name":"Organization","description":"Routes for creating and managing organizations on the platform."}]}