-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
1,323 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
97 changes: 97 additions & 0 deletions
97
openrpc/src/anchor-platform/examples/platform_transaction.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
{ | ||
"platformTransactionResponse": { | ||
"name": "platformTransactionResponse", | ||
"value": { | ||
"id": "1c186184-09ee-486c-82a7-aa7a0ab1119d", | ||
"sep": "31", | ||
"kind": "receive", | ||
"status": "completed", | ||
"amount_expected": { | ||
"amount": "100", | ||
"asset": "iso4217:USD" | ||
}, | ||
"amount_in": { | ||
"amount": "100.0000", | ||
"asset": "iso4217:USD" | ||
}, | ||
"amount_out": { | ||
"amount": "98.0000000", | ||
"asset": "stellar:USDC:GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5" | ||
}, | ||
"fee_details": { | ||
"total": "2.0000", | ||
"asset": "iso4217:USD" | ||
}, | ||
"quote_id": "quote-id", | ||
"message": "Please don\u0027t forget to foo bar", | ||
"refunds": { | ||
"amount_refunded": { | ||
"amount": "90.0000", | ||
"asset": "iso4217:USD" | ||
}, | ||
"amount_fee": { | ||
"amount": "8.0000", | ||
"asset": "iso4217:USD" | ||
}, | ||
"payments": [ | ||
{ | ||
"id": "1111", | ||
"id_type": "stellar", | ||
"amount": { | ||
"amount": "50.0000", | ||
"asset": "iso4217:USD" | ||
}, | ||
"fee": { | ||
"amount": "4.0000", | ||
"asset": "iso4217:USD" | ||
} | ||
}, | ||
{ | ||
"id": "2222", | ||
"id_type": "stellar", | ||
"amount": { | ||
"amount": "40.0000", | ||
"asset": "iso4217:USD" | ||
}, | ||
"fee": { | ||
"amount": "4.0000", | ||
"asset": "iso4217:USD" | ||
} | ||
} | ||
] | ||
}, | ||
"stellar_transactions": [ | ||
{ | ||
"id": "stellar-tx-id", | ||
"memo": "my-memo", | ||
"memo_type": "text", | ||
"envelope": "here_comes_the_envelope", | ||
"payments": [ | ||
{ | ||
"id": "payment-id", | ||
"amount": { | ||
"amount": "100.0000", | ||
"asset": "iso4217:USD" | ||
}, | ||
"payment_type": "payment", | ||
"source_account": "GB4GJAV4Q7DPGU7WI3H5TMVKEYZJ4JFLFEF3O3TRJKDPXK7NAMRBXWFL", | ||
"destination_account": "GDIN5ZULIOT5YPBIXJXFGNH4TCNTDKIA4ZF6QQE3S2P5P44BHCQQJNDC" | ||
} | ||
] | ||
} | ||
], | ||
"external_transaction_id": "external-tx-id", | ||
"customers": { | ||
"sender": { | ||
"id": "sender-id" | ||
}, | ||
"receiver": { | ||
"id": "receiver-id" | ||
} | ||
}, | ||
"creator": { | ||
"id": "creator-id" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"name": "get_transaction", | ||
"summary": "Retrieve a transaction.", | ||
"description": "Retrieve a transaction by its ID.", | ||
"paramStructure": "by-name", | ||
"tags": [ | ||
{ "name": "SEP-6" }, | ||
{ "name": "SEP-24" }, | ||
{ "name": "SEP-31" } | ||
], | ||
"params": [ | ||
{ "$ref": "#/components/contentDescriptors/id" } | ||
], | ||
"result": { | ||
"name": "get_transactionResponse", | ||
"schema": { | ||
"$ref": "#/components/schemas/platform_transaction" | ||
} | ||
}, | ||
"examples": [ | ||
{ | ||
"name": "get_transactionExample", | ||
"description": "Example request to the `get_transaction` method.", | ||
"params": [ | ||
{ "$ref": "#/components/examples/id" } | ||
], | ||
"result": { | ||
"$ref": "#/components/examples/platformTransactionResponse" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"source_account": { | ||
"title": "source_account", | ||
"description":"The account being debited in the Stellar Network.", | ||
"type": "string" | ||
}, | ||
"destination_account": { | ||
"title": "destination_account", | ||
"description":"The account being credited in the Stellar Network.", | ||
"type": "string" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"stellar_id": { | ||
|
||
"description": "A object that identify end-user. \nFor a SEP-12 customer, the `id` field should be sufficient to fully identify the customer in the business' Backend. \nFor a SEP-31 Sending Anchor, the `account` and `memo` fields should be used. \nFor a SEP-6 or SEP-24 Anchor, the `account` and `memo` fields should be used.", | ||
"type": "object", | ||
"properties": { | ||
"id": { | ||
"type": "string", | ||
"description": "The `id` of the customer registered through SEP-12." | ||
}, | ||
"account": { | ||
"type": "string", | ||
"description": "Either the Stellar account or Muxed account address of the on-chain entity." | ||
}, | ||
"memo": { | ||
"type": "string", | ||
"description": "The memo value identifying a customer with a shared account, where the shared account is `account`." | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"memo": { | ||
"title": "memo", | ||
"type": "string" | ||
}, | ||
"memo_type": { | ||
"title": "memo_type", | ||
"description": "The memo type of the transaction in the Stellar network. Should be present if memo is not null.", | ||
"type": "string", | ||
"enum": ["id", "hash", "text"] | ||
} | ||
} |
105 changes: 105 additions & 0 deletions
105
openrpc/src/anchor-platform/schemas/platform_transaction.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
{ | ||
"platform_transaction": { | ||
"title": "Platform Transaction", | ||
"description": "A platform transaction object", | ||
"type": "object", | ||
"properties": { | ||
"id": { | ||
"$ref": "#/components/schemas/transaction_id" | ||
}, | ||
"sep": { | ||
"$ref": "#/components/schemas/sep" | ||
}, | ||
"kind": { | ||
"$ref": "#/components/schemas/kind" | ||
}, | ||
"status": { | ||
"$ref": "#/components/schemas/status" | ||
}, | ||
"amount_expected": { | ||
"$ref": "#/components/schemas/amount_expected" | ||
}, | ||
"amount_in": { | ||
"$ref": "#/components/schemas/amount_in" | ||
}, | ||
"amount_out": { | ||
"$ref": "#/components/schemas/amount_out" | ||
}, | ||
"fee_details": { | ||
"$ref": "#/components/schemas/fee_details" | ||
}, | ||
"quote_id": { | ||
"$ref": "#/components/schemas/quote_id" | ||
}, | ||
"started_at": { | ||
"$ref": "#/components/schemas/started_at" | ||
}, | ||
"updated_at": { | ||
"$ref": "#/components/schemas/updated_at" | ||
}, | ||
"completed_at": { | ||
"$ref": "#/components/schemas/completed_at" | ||
}, | ||
"transfer_received_at": { | ||
"$ref": "#/components/schemas/transfer_received_at" | ||
}, | ||
"message": { | ||
"description": "Human readable explanation of transaction status", | ||
"$ref": "#/components/schemas/message" | ||
}, | ||
"refunds": { | ||
"$ref": "#/components/schemas/refunds" | ||
}, | ||
"stellar_transactions": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/components/schemas/stellar_transaction" | ||
} | ||
}, | ||
"source_account": { | ||
"$ref": "#/components/schemas/source_account" | ||
}, | ||
"destination_account": { | ||
"$ref": "#/components/schemas/destination_account" | ||
}, | ||
"external_transaction_id": { | ||
"$ref": "#/components/schemas/transaction_id" | ||
}, | ||
"memo": { | ||
"$ref": "#/components/schemas/memo" | ||
}, | ||
"memo_type": { | ||
"$ref": "#/components/schemas/memo_type" | ||
}, | ||
"refund_memo": { | ||
"$ref": "#/components/schemas/memo" | ||
}, | ||
"refund_memo_type": { | ||
"$ref": "#/components/schemas/memo_type" | ||
}, | ||
"client_domain": { | ||
"description": "The domain of the client.", | ||
"type": "string" | ||
}, | ||
"client_name": { | ||
"description": "The domain of the client.", | ||
"type": "string" | ||
}, | ||
"customers": { | ||
"description": "The Identification info of the sending and receiving customers. If they were created through [SEP-12](https://stellar.org/protocol/sep-12),\n this object should contain the SEP-12 customer `id`. Otherwise, the `account` address of the customer.", | ||
"type": "object", | ||
"properties": { | ||
"sender": { | ||
"$ref": "#/components/schemas/stellar_id" | ||
}, | ||
"receiver": { | ||
"$ref": "#/components/schemas/stellar_id" | ||
} | ||
} | ||
}, | ||
"creator": { | ||
"$ref": "#/components/schemas/stellar_id" | ||
} | ||
} | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
openrpc/src/anchor-platform/schemas/stellar_transaction.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"stellar_transaction": { | ||
"title": "stellar_transaction", | ||
"type": "object", | ||
"properties": { | ||
"id": { "$ref": "#/components/schemas/StellarHash" }, | ||
"memo": {"$ref": "#/components/schemas/memo" }, | ||
"memo_type": {"$ref": "#/components/schemas/memo_type" }, | ||
"created_at": {"$ref": "#/components/schemas/created_at" }, | ||
"envelop" : { | ||
"description": "The transaction envelope, containing all the transaction information.", | ||
"type": "string" | ||
}, | ||
"payments": { | ||
"type": "array", | ||
"items": { | ||
"properties": { | ||
"id": { | ||
"description":" The ID of the payment in the Stellar Network.", | ||
"type": "string" | ||
}, | ||
"payment_type": { | ||
"description":" The ID of the payment in the Stellar Network.", | ||
"type": "string", | ||
"enum": [ | ||
"payment", | ||
"path_payment" | ||
], | ||
"default": "payment" | ||
}, | ||
"source_account": {"$ref": "#/components/schemas/source_account"}, | ||
"destination_account": { "$ref": "#/components/schemas/destination_account" }, | ||
"amount": { "$ref": "#/components/schemas/AmountObjectString" } | ||
}, | ||
"required": ["id", "payment_type", "source_account", "destination_account", "amount"] | ||
} | ||
} | ||
}, | ||
"required": ["id", "created_at", "envelope", "payments"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.