Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 52 additions & 4 deletions schema.gql
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,16 @@ type GetPaymentsType {
payments: [PaymentType!]!
}

input GetTapOffersInput {
ambossAssetId: String!
limit: Int
minAmount: String
offset: Int
sortBy: TapOfferSortBy
sortDir: TapOfferSortDir
transactionType: TapTransactionType!
}

type Hops {
channel: String!
channel_capacity: Float!
Expand Down Expand Up @@ -466,6 +476,7 @@ type Mutation {
removeTwofaSecret(token: String!): Boolean!
sendTapAsset(tapAddrs: [String!]!): Boolean!
sendToAddress(address: String!, fee: Float, sendAll: Boolean, target: Float, tokens: Float): ChainAddressSend!
setupTradePartner(input: SetupTradePartnerInput!): SetupTradePartnerResult!
syncTapUniverse(host: String!): TapSyncResult!
team: TeamMutations!
toggleConfig(field: ConfigFields!): Boolean!
Expand Down Expand Up @@ -723,7 +734,7 @@ type Query {
getChainTransactions: [ChainTransaction!]!
getChannel(id: String!): SingleChannel!
getChannelReport: ChannelReport!
getChannels(active: Boolean): [Channel!]!
getChannels(active: Boolean, partner_public_key: String): [Channel!]!
getClosedChannels: [ClosedChannel!]!
getConfigState: ConfigState!
getFeeHealth: ChannelsFeeHealth!
Expand All @@ -743,10 +754,11 @@ type Query {
getPayments(token: String): GetPaymentsType!
getPeers: [Peer!]!
getPendingChannels: [PendingChannel!]!
getTapAssetChannelBalances(peerPubkey: String): [TapAssetChannelBalance!]!
getTapAssets: TapAssetList!
getTapBalances(groupBy: TapBalanceGroupBy = GROUP_KEY): TapBalances!
getTapFederationServers: TapFederationServerList!
getTapOffers(assetId: String!, limit: Int, minAmount: String, offset: Int, sortBy: TapOfferSortBy, sortDir: TapOfferSortDir, transactionType: TapTransactionType!): TapTradeOfferList!
getTapOffers(input: GetTapOffersInput!): TapTradeOfferList!
getTapSupportedAssets: TapSupportedAssetList!
getTapTransfers: TapTransferList!
getTapUniverseAssets: TapUniverseAssetList!
Expand Down Expand Up @@ -784,6 +796,30 @@ type ServerAccount {
type: String!
}

input SetupTradePartnerInput {
ambossAssetId: String!
assetAmount: String!
assetRate: String!
magmaOfferId: String!
satsAmount: String
swapNodePubkey: String!
swapNodeSockets: [String!]
tapdAssetId: String
tapdGroupKey: String
transactionType: TapTransactionType!
}

type SetupTradePartnerResult {
magmaOrderAmountAsset: String
magmaOrderAmountSats: String
magmaOrderFeeSats: String
magmaOrderId: String
magmaOrderStatus: String
outboundChannelOutputIndex: Int
outboundChannelTxid: String
success: Boolean!
}

type SingleChannel {
capacity: Float!
id: String!
Expand Down Expand Up @@ -824,6 +860,16 @@ type TapAssetBalanceEntry {
names: [String!]
}

type TapAssetChannelBalance {
assetId: String!
capacity: String!
channelPoint: String!
groupKey: String
localBalance: String!
partnerPublicKey: String!
remoteBalance: String!
}

type TapAssetGenesis {
assetId: String!
assetType: TapAssetType!
Expand Down Expand Up @@ -941,12 +987,13 @@ type TapSyncResult {
type TapTradeOffer {
available: TapTradeOfferAmount!
id: String!
magmaOfferId: String!
node: TapTradeOfferNode!
rate: TapTradeOfferAmount!
}

type TapTradeOfferAmount {
displayAmount: String
displayAmount: String!
fullAmount: String!
}

Expand All @@ -957,7 +1004,8 @@ type TapTradeOfferList {

type TapTradeOfferNode {
alias: String
pubkey: String!
pubkey: String
sockets: [String!]!
}

enum TapTransactionType {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions src/client/src/graphql/mutations/setupTradePartner.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { gql } from '@apollo/client';

export const SETUP_TRADE_PARTNER = gql`
mutation SetupTradePartner($input: SetupTradePartnerInput!) {
setupTradePartner(input: $input) {
success
magmaOrderId
magmaOrderStatus
magmaOrderAmountSats
magmaOrderAmountAsset
magmaOrderFeeSats
outboundChannelTxid
outboundChannelOutputIndex
}
}
`;

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading