-
Notifications
You must be signed in to change notification settings - Fork 90
/
Copy pathschema.graphql
1343 lines (1168 loc) · 38.7 KB
/
schema.graphql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
type Query {
"Fetch an asset"
asset(id: String!): Asset
"Fetch a page of assets."
assets(
"Paginating forwards: the cursor before the the requested page."
after: String
"Paginating backwards: the cursor after the the requested page."
before: String
"Paginating forwards: The first **n** elements from the page."
first: Int
"Paginating backwards: The last **n** elements from the page."
last: Int
"Ascending or descending order of creation."
sortOrder: SortOrder
): AssetsConnection!
"Fetch a peer"
peer(id: String!): Peer
"Fetch a page of peers."
peers(
"Paginating forwards: the cursor before the the requested page."
after: String
"Paginating backwards: the cursor after the the requested page."
before: String
"Paginating forwards: The first **n** elements from the page."
first: Int
"Paginating backwards: The last **n** elements from the page."
last: Int
"Ascending or descending order of creation."
sortOrder: SortOrder
): PeersConnection!
"Fetch a wallet address."
walletAddress(id: String!): WalletAddress
"Fetch a page of wallet addresses."
walletAddresses(
"Paginating forwards: the cursor before the the requested page."
after: String
"Paginating backwards: the cursor after the the requested page."
before: String
"Paginating forwards: The first **n** elements from the page."
first: Int
"Paginating backwards: The last **n** elements from the page."
last: Int
"Ascending or descending order of creation."
sortOrder: SortOrder
): WalletAddressesConnection!
"Fetch an Open Payments quote"
quote(id: String!): Quote
"Fetch an Open Payments outgoing payment"
outgoingPayment(id: String!): OutgoingPayment
"Fetch a page of outgoing payments by receiver"
outgoingPayments(
"Paginating forwards: the cursor before the requested page."
after: String
"Paginating backwards: the cursor after the the requested page."
before: String
"Paginating forwards: The first **n** elements from the page."
first: Int
"Paginating backwards: The last **n** elements from the page."
last: Int
"Ascending or descending order of creation."
sortOrder: SortOrder
"Filter outgoing payments based on specific criteria."
filter: OutgoingPaymentFilter
): OutgoingPaymentConnection!
"Fetch an Open Payments incoming payment"
incomingPayment(id: String!): IncomingPayment
"Fetch a page of webhook events"
webhookEvents(
"Paginating forwards: the cursor before the the requested page."
after: String
"Paginating backwards: the cursor after the the requested page."
before: String
"Paginating forwards: The first **n** elements from the page."
first: Int
"Paginating backwards: The last **n** elements from the page."
last: Int
"Ascending or descending order of creation."
sortOrder: SortOrder
"Filter webhook events based on specific criteria."
filter: WebhookEventFilter
): WebhookEventsConnection!
"Fetch a page of combined payments"
payments(
"Paginating forwards: the cursor before the the requested page."
after: String
"Paginating backwards: the cursor after the the requested page."
before: String
"Paginating forwards: The first **n** elements from the page."
first: Int
"Paginating backwards: The last **n** elements from the page."
last: Int
"Ascending or descending order of creation."
sortOrder: SortOrder
"Filter payment events based on specific criteria."
filter: PaymentFilter
): PaymentConnection!
"Fetch a page of accounting transfers"
accountingTransfers(
"Account id."
id: String!
"Limit the number of results returned. If no limit is provided, the default limit of 100_000 is set for TigerBeetle."
limit: Int
): AccountingTransferConnection!
"Get an local or remote Open Payments Incoming Payment. The receiver has a wallet address on either this or another Open Payments resource server."
receiver(id: String!): Receiver
}
type Mutation {
"Create an asset"
createAsset(input: CreateAssetInput!): AssetMutationResponse!
"Update an asset"
updateAsset(input: UpdateAssetInput!): AssetMutationResponse!
"Delete an asset"
deleteAsset(input: DeleteAssetInput!): DeleteAssetMutationResponse!
"Deposit asset liquidity"
depositAssetLiquidity(
input: DepositAssetLiquidityInput!
): LiquidityMutationResponse
"Withdraw asset liquidity"
createAssetLiquidityWithdrawal(
input: CreateAssetLiquidityWithdrawalInput!
): LiquidityMutationResponse
"Create a peer"
createPeer(input: CreatePeerInput!): CreatePeerMutationResponse!
"Create a peer using a URL"
createOrUpdatePeerByUrl(
input: CreateOrUpdatePeerByUrlInput!
): CreateOrUpdatePeerByUrlMutationResponse!
"Update a peer"
updatePeer(input: UpdatePeerInput!): UpdatePeerMutationResponse!
"Delete a peer"
deletePeer(input: DeletePeerInput!): DeletePeerMutationResponse!
"Deposit peer liquidity"
depositPeerLiquidity(
input: DepositPeerLiquidityInput!
): LiquidityMutationResponse
"Withdraw peer liquidity"
createPeerLiquidityWithdrawal(
input: CreatePeerLiquidityWithdrawalInput!
): LiquidityMutationResponse
"Post liquidity withdrawal. Withdrawals are two-phase commits and are committed via this mutation."
postLiquidityWithdrawal(
input: PostLiquidityWithdrawalInput!
): LiquidityMutationResponse
"Void liquidity withdrawal. Withdrawals are two-phase commits and are rolled back via this mutation."
voidLiquidityWithdrawal(
input: VoidLiquidityWithdrawalInput!
): LiquidityMutationResponse
"Create a wallet address"
createWalletAddress(
input: CreateWalletAddressInput!
): CreateWalletAddressMutationResponse!
"Update a wallet address"
updateWalletAddress(
input: UpdateWalletAddressInput!
): UpdateWalletAddressMutationResponse!
"Add a public key to a wallet address that is used to verify Open Payments requests."
createWalletAddressKey(
input: CreateWalletAddressKeyInput!
): CreateWalletAddressKeyMutationResponse
"Revoke a public key associated with a wallet address. Open Payment requests using this key for request signatures will be denied going forward."
revokeWalletAddressKey(
input: RevokeWalletAddressKeyInput!
): RevokeWalletAddressKeyMutationResponse
"Create an internal Open Payments Incoming Payment. The receiver has a wallet address on this Rafiki instance."
createIncomingPayment(
input: CreateIncomingPaymentInput!
): IncomingPaymentResponse!
"Create an internal or external Open Payments Incoming Payment. The receiver has a wallet address on either this or another Open Payments resource server."
createReceiver(input: CreateReceiverInput!): CreateReceiverResponse!
"Create an Open Payments Quote"
createQuote(input: CreateQuoteInput!): QuoteResponse!
"Create an Open Payments Outgoing Payment"
createOutgoingPayment(
input: CreateOutgoingPaymentInput!
): OutgoingPaymentResponse!
"Cancel Outgoing Payment"
cancelOutgoingPayment(
input: CancelOutgoingPaymentInput!
): OutgoingPaymentResponse!
"Create an Open Payments Outgoing Payment from an incoming payment"
createOutgoingPaymentFromIncomingPayment(
input: CreateOutgoingPaymentFromIncomingPaymentInput!
): OutgoingPaymentResponse!
"Deposit webhook event liquidity"
depositEventLiquidity(
input: DepositEventLiquidityInput!
): LiquidityMutationResponse
@deprecated(reason: "Use `depositOutgoingPaymentLiquidity`")
"Withdraw webhook event liquidity"
withdrawEventLiquidity(
input: WithdrawEventLiquidityInput!
): LiquidityMutationResponse
@deprecated(
reason: "Use `createOutgoingPaymentWithdrawal, createIncomingPaymentWithdrawal, or createWalletAddressWithdrawal`"
)
"Withdraw incoming payment liquidity"
createIncomingPaymentWithdrawal(
input: CreateIncomingPaymentWithdrawalInput!
): LiquidityMutationResponse
"Withdraw outgoing payment liquidity"
createOutgoingPaymentWithdrawal(
input: CreateOutgoingPaymentWithdrawalInput!
): LiquidityMutationResponse
"Deposit outgoing payment liquidity"
depositOutgoingPaymentLiquidity(
input: DepositOutgoingPaymentLiquidityInput!
): LiquidityMutationResponse
"Withdraw liquidity from a wallet address received via Web Monetization."
createWalletAddressWithdrawal(
input: CreateWalletAddressWithdrawalInput!
): WalletAddressWithdrawalMutationResponse
"If automatic withdrawal of funds received via Web Monetization by the wallet address are disabled, this mutation can be used to trigger up to n withdrawal events."
triggerWalletAddressEvents(
input: TriggerWalletAddressEventsInput!
): TriggerWalletAddressEventsMutationResponse!
"Set the fee on an asset"
setFee(input: SetFeeInput!): SetFeeResponse!
"Approves the incoming payment if the incoming payment is in the PENDING state"
approveIncomingPayment(
input: ApproveIncomingPaymentInput!
): ApproveIncomingPaymentResponse!
"Cancel the incoming payment if the incoming payment is in the PENDING state"
cancelIncomingPayment(
input: CancelIncomingPaymentInput!
): CancelIncomingPaymentResponse!
}
type PageInfo {
"Paginating forwards: the cursor to continue."
endCursor: String
"Paginating forwards: Are there more pages?"
hasNextPage: Boolean!
"Paginating backwards: Are there more pages?"
hasPreviousPage: Boolean!
"Paginating backwards: the cursor to continue."
startCursor: String
}
type AssetsConnection {
pageInfo: PageInfo!
edges: [AssetEdge!]!
}
type AssetEdge {
node: Asset!
cursor: String!
}
input ApproveIncomingPaymentInput {
"Unique identifier of the incoming payment to be approved. Note: Incoming Payment must be PENDING."
id: ID!
}
input CancelIncomingPaymentInput {
"Unique identifier of the incoming payment to be cancelled. Note: Incoming Payment must be PENDING."
id: ID!
}
input CreateAssetInput {
"[ISO 4217 currency code](https://en.wikipedia.org/wiki/ISO_4217), e.g. `USD`"
code: String!
"Difference in orders of magnitude between the standard unit of an asset and a corresponding fractional unit"
scale: UInt8!
"Minimum amount of liquidity that can be withdrawn from the asset"
withdrawalThreshold: UInt64
"Account Servicing Entity will be notified via a webhook event if liquidity falls below this value"
liquidityThreshold: UInt64
"Unique key to ensure duplicate or retried requests are processed only once. See [idempotence](https://en.wikipedia.org/wiki/Idempotence)"
idempotencyKey: String
}
input UpdateAssetInput {
"Asset id"
id: String!
"New minimum amount of liquidity that can be withdrawn from the asset"
withdrawalThreshold: UInt64
"Account Servicing Entity will be notified via a webhook event if liquidity falls below this new value"
liquidityThreshold: UInt64
"Unique key to ensure duplicate or retried requests are processed only once. See [idempotence](https://en.wikipedia.org/wiki/Idempotence)"
idempotencyKey: String
}
input DeleteAssetInput {
"Asset id"
id: ID!
"Unique key to ensure duplicate or retried requests are processed only once. See [idempotence](https://en.wikipedia.org/wiki/Idempotence)"
idempotencyKey: String
}
type PeersConnection {
pageInfo: PageInfo!
edges: [PeerEdge!]!
}
type PeerEdge {
node: Peer!
cursor: String!
}
input CreatePeerInput {
"Maximum packet amount that the peer accepts"
maxPacketAmount: UInt64
"Peering connection details"
http: HttpInput!
"Asset id of peering relationship"
assetId: String!
"Peer's ILP address"
staticIlpAddress: String!
"Peer's internal name"
name: String
"Account Servicing Entity will be notified via a webhook event if peer liquidity falls below this value"
liquidityThreshold: UInt64
"Initial amount of liquidity to deposit for peer"
initialLiquidity: UInt64
"Unique key to ensure duplicate or retried requests are processed only once. See [idempotence](https://en.wikipedia.org/wiki/Idempotence)"
idempotencyKey: String
}
input CreateOrUpdatePeerByUrlInput {
"Maximum packet amount that the peer accepts"
maxPacketAmount: UInt64
"Asset id of peering relationship"
assetId: String!
"Peer's URL address at which the peer accepts auto-peering requests"
peerUrl: String!
"Peer's internal name for overriding auto-peer's default naming"
name: String
"Account Servicing Entity will be notified via a webhook event if peer liquidity falls below this value"
liquidityThreshold: UInt64
"Amount of liquidity to deposit for peer"
liquidityToDeposit: UInt64
"Unique key to ensure duplicate or retried requests are processed only once. See [idempotence](https://en.wikipedia.org/wiki/Idempotence)"
idempotencyKey: String
}
input UpdatePeerInput {
"Peer id"
id: String!
"New maximum packet amount that the peer accepts"
maxPacketAmount: UInt64
"New peering connection details"
http: HttpInput
"Peer's new ILP address"
staticIlpAddress: String
"Peer's new public name"
name: String
"Account Servicing Entity will be notified via a webhook event if peer liquidity falls below this new value"
liquidityThreshold: UInt64
"Unique key to ensure duplicate or retried requests are processed only once. See [idempotence](https://en.wikipedia.org/wiki/Idempotence)"
idempotencyKey: String
}
input HttpInput {
"Incoming connection details"
incoming: HttpIncomingInput
"Outgoing connection details"
outgoing: HttpOutgoingInput!
}
input HttpIncomingInput {
"Array of auth tokens accepted by this Rafiki instance"
authTokens: [String!]!
}
input HttpOutgoingInput {
"Auth token to present at the peering Rafiki instance"
authToken: String!
"Peer's connection endpoint"
endpoint: String!
}
input DepositPeerLiquidityInput {
"The id of the peer to deposit liquidity."
peerId: String!
"Amount of liquidity to deposit."
amount: UInt64!
"The id of the transfer."
id: String!
"Unique key to ensure duplicate or retried requests are processed only once. See [idempotence](https://en.wikipedia.org/wiki/Idempotence)"
idempotencyKey: String!
}
input DepositAssetLiquidityInput {
"The id of the asset to deposit liquidity."
assetId: String!
"Amount of liquidity to deposit."
amount: UInt64!
"The id of the transfer."
id: String!
"Unique key to ensure duplicate or retried requests are processed only once. See [idempotence](https://en.wikipedia.org/wiki/Idempotence)"
idempotencyKey: String!
}
input CreatePeerLiquidityWithdrawalInput {
"The id of the peer to create the withdrawal for."
peerId: String!
"Amount of withdrawal."
amount: UInt64!
"The id of the withdrawal."
id: String!
"Unique key to ensure duplicate or retried requests are processed only once. See [idempotence](https://en.wikipedia.org/wiki/Idempotence)"
idempotencyKey: String!
"This is the interval in seconds after a pending transfer's created at which it may be posted or voided. Zero denotes a no timeout single-phase posted transfer."
timeoutSeconds: UInt64!
}
input CreateAssetLiquidityWithdrawalInput {
"The id of the asset to create the withdrawal for."
assetId: String!
"Amount of withdrawal."
amount: UInt64!
"The id of the withdrawal."
id: String!
"Unique key to ensure duplicate or retried requests are processed only once. See [idempotence](https://en.wikipedia.org/wiki/Idempotence)"
idempotencyKey: String!
"This is the interval in seconds after a pending transfer's created at which it may be posted or voided. Zero denotes a no timeout single-phase posted transfer."
timeoutSeconds: UInt64!
}
input PostLiquidityWithdrawalInput {
"The id of the liquidity withdrawal to post."
withdrawalId: String!
"Unique key to ensure duplicate or retried requests are processed only once. See [idempotence](https://en.wikipedia.org/wiki/Idempotence)"
idempotencyKey: String!
}
input VoidLiquidityWithdrawalInput {
"The id of the liquidity withdrawal to void."
withdrawalId: String!
"Unique key to ensure duplicate or retried requests are processed only once. See [idempotence](https://en.wikipedia.org/wiki/Idempotence)"
idempotencyKey: String!
}
input DepositOutgoingPaymentLiquidityInput {
"The id of the outgoing payment to deposit into."
outgoingPaymentId: String!
"Unique key to ensure duplicate or retried requests are processed only once. See [idempotence](https://en.wikipedia.org/wiki/Idempotence)"
idempotencyKey: String!
}
input CreateIncomingPaymentWithdrawalInput {
"The id of the incoming payment to withdraw from."
incomingPaymentId: String!
"Unique key to ensure duplicate or retried requests are processed only once. See [idempotence](https://en.wikipedia.org/wiki/Idempotence)"
idempotencyKey: String!
"This is the interval in seconds after a pending transfer's created at which it may be posted or voided. Zero denotes a no timeout single-phase posted transfer."
timeoutSeconds: UInt64!
}
input CreateOutgoingPaymentWithdrawalInput {
"The id of the outgoing payment to withdraw from."
outgoingPaymentId: String!
"Unique key to ensure duplicate or retried requests are processed only once. See [idempotence](https://en.wikipedia.org/wiki/Idempotence)"
idempotencyKey: String!
"This is the interval in seconds after a pending transfer's created at which it may be posted or voided. Zero denotes a no timeout single-phase posted transfer."
timeoutSeconds: UInt64!
}
input DepositEventLiquidityInput {
"The id of the event to deposit into."
eventId: String!
"Unique key to ensure duplicate or retried requests are processed only once. See [idempotence](https://en.wikipedia.org/wiki/Idempotence)"
idempotencyKey: String!
}
input WithdrawEventLiquidityInput {
"The id of the event to withdraw from."
eventId: String!
"Unique key to ensure duplicate or retried requests are processed only once. See [idempotence](https://en.wikipedia.org/wiki/Idempotence)"
idempotencyKey: String!
}
input CreateWalletAddressWithdrawalInput {
"The id of the Open Payments wallet address to create the withdrawal for."
walletAddressId: String!
"The id of the withdrawal."
id: String!
"Unique key to ensure duplicate or retried requests are processed only once. See [idempotence](https://en.wikipedia.org/wiki/Idempotence)"
idempotencyKey: String!
"This is the interval in seconds after a pending transfer's created at which it may be posted or voided. Zero denotes a no timeout single-phase posted transfer."
timeoutSeconds: UInt64!
}
input JwkInput {
"Key id"
kid: String!
"Base64 url-encoded public key."
x: String!
"Cryptographic algorithm family used with the key. The only allowed value is `EdDSA`."
alg: Alg!
"Key type. The only allowed value is `OKP`."
kty: Kty!
"Curve that the key pair is derived from. The only allowed value is `Ed25519`."
crv: Crv!
}
input CreateWalletAddressKeyInput {
walletAddressId: String!
"Public key"
jwk: JwkInput!
"Unique key to ensure duplicate or retried requests are processed only once. See [idempotence](https://en.wikipedia.org/wiki/Idempotence)"
idempotencyKey: String
}
input RevokeWalletAddressKeyInput {
"Internal id of key"
id: String!
"Unique key to ensure duplicate or retried requests are processed only once. See [idempotence](https://en.wikipedia.org/wiki/Idempotence)"
idempotencyKey: String
}
type Asset implements Model {
"Asset id"
id: ID!
"[ISO 4217 currency code](https://en.wikipedia.org/wiki/ISO_4217), e.g. `USD`"
code: String!
"Difference in orders of magnitude between the standard unit of an asset and a corresponding fractional unit"
scale: UInt8!
"Available liquidity"
liquidity: UInt64
"Minimum amount of liquidity that can be withdrawn from the asset"
withdrawalThreshold: UInt64
"Account Servicing Entity will be notified via a webhook event if liquidity falls below this value"
liquidityThreshold: UInt64
"The receiving fee structure for the asset"
receivingFee: Fee
"The sending fee structure for the asset"
sendingFee: Fee
"Fetch a page of asset fees"
fees(
"Paginating forwards: the cursor before the the requested page."
after: String
"Paginating backwards: the cursor after the the requested page."
before: String
"Paginating forwards: The first **n** elements from the page."
first: Int
"Paginating backwards: The last **n** elements from the page."
last: Int
"Ascending or descending order of creation."
sortOrder: SortOrder
): FeesConnection
"Date-time of creation"
createdAt: String!
}
enum SortOrder {
"Choose ascending order for results."
ASC
"Choose descending order for results."
DESC
}
enum LiquidityError {
AlreadyPosted
AlreadyVoided
AmountZero
InsufficientBalance
InvalidId
TransferExists
UnknownAsset
UnknownIncomingPayment
UnknownPayment
UnknownWalletAddress
UnknownPeer
UnknownTransfer
}
type Peer implements Model {
"Peer id"
id: ID!
"Maximum packet amount that the peer accepts"
maxPacketAmount: UInt64
"Peering connection details"
http: Http!
"Incoming tokens"
incomingTokens: [String!]!
"Asset of peering relationship"
asset: Asset!
"Peer's ILP address"
staticIlpAddress: String!
"Peer's public name"
name: String
"Account Servicing Entity will be notified via a webhook event if peer liquidity falls below this value"
liquidityThreshold: UInt64
"Available liquidity"
liquidity: UInt64
"Date-time of creation"
createdAt: String!
}
input DeletePeerInput {
# Id of the peer
id: ID!
"Unique key to ensure duplicate or retried requests are processed only once. See [idempotence](https://en.wikipedia.org/wiki/Idempotence)"
idempotencyKey: String
}
type Http {
"Outgoing connection details"
outgoing: HttpOutgoing!
}
type HttpOutgoing {
"Auth token to present at the peering Rafiki instance"
authToken: String!
"Peer's connection endpoint"
endpoint: String!
}
type WalletAddressesConnection {
pageInfo: PageInfo!
edges: [WalletAddressEdge!]!
}
type WalletAddressEdge {
node: WalletAddress!
cursor: String!
}
type WalletAddress implements Model {
"Wallet address id"
id: ID!
"Asset of the wallet address"
asset: Asset!
"Available liquidity"
liquidity: UInt64
"Wallet Address URL"
url: String!
"Public name associated with the wallet address"
publicName: String
"List of incoming payments received by this wallet address"
incomingPayments(
"Paginating forwards: the cursor before the the requested page."
after: String
"Paginating backwards: the cursor after the the requested page."
before: String
"Paginating forwards: The first **n** elements from the page."
first: Int
"Paginating backwards: The last **n** elements from the page."
last: Int
"Ascending or descending order of creation."
sortOrder: SortOrder
): IncomingPaymentConnection
"List of quotes created at this wallet address"
quotes(
"Paginating forwards: the cursor before the the requested page."
after: String
"Paginating backwards: the cursor after the the requested page."
before: String
"Paginating forwards: The first **n** elements from the page."
first: Int
"Paginating backwards: The last **n** elements from the page."
last: Int
"Ascending or descending order of creation."
sortOrder: SortOrder
): QuoteConnection
"List of outgoing payments sent from this wallet address"
outgoingPayments(
"Paginating forwards: the cursor before the the requested page."
after: String
"Paginating backwards: the cursor after the the requested page."
before: String
"Paginating forwards: The first **n** elements from the page."
first: Int
"Paginating backwards: The last **n** elements from the page."
last: Int
"Ascending or descending order of creation."
sortOrder: SortOrder
): OutgoingPaymentConnection
"Date-time of creation"
createdAt: String!
"Status of the wallet address"
status: WalletAddressStatus!
"List of keys associated with this wallet address"
walletAddressKeys(
"Paginating forwards: the cursor before the the requested page."
after: String
"Paginating backwards: the cursor after the the requested page."
before: String
"Paginating forwards: The first **n** elements from the page."
first: Int
"Paginating backwards: The last **n** elements from the page."
last: Int
"Ascending or descending order of creation."
sortOrder: SortOrder
): WalletAddressKeyConnection
"List additional properties associated with this wallet address."
additionalProperties: [AdditionalProperty]
}
type AdditionalProperty {
key: String!
value: String!
visibleInOpenPayments: Boolean!
}
type WalletAddressKeyConnection {
pageInfo: PageInfo!
edges: [WalletAddressKeyEdge!]!
}
type WalletAddressKeyEdge {
node: WalletAddressKey!
cursor: String!
}
enum WalletAddressStatus {
"Status after deactivating"
INACTIVE
"Default status"
ACTIVE
}
type IncomingPaymentConnection {
pageInfo: PageInfo!
edges: [IncomingPaymentEdge!]!
}
type IncomingPaymentEdge {
node: IncomingPayment!
cursor: String!
}
interface BasePayment {
id: ID!
walletAddressId: ID!
metadata: JSONObject
createdAt: String!
client: String
}
type IncomingPayment implements BasePayment & Model {
"Incoming Payment id"
id: ID!
"Id of the wallet address under which this incoming payment was created."
walletAddressId: ID!
"Information about the wallet address of the Open Payments client that created the incoming payment."
client: String
"Available liquidity"
liquidity: UInt64
"Incoming payment state"
state: IncomingPaymentState!
"Date-time of expiry. After this time, the incoming payment will not accept further payments made to it."
expiresAt: String!
"The maximum amount that should be paid into the wallet address under this incoming payment."
incomingAmount: Amount
"The total amount that has been paid into the wallet address under this incoming payment."
receivedAmount: Amount!
"Additional metadata associated with the incoming payment."
metadata: JSONObject
"Date-time of creation"
createdAt: String!
}
type Receiver {
"Incoming payment URL"
id: String!
"Wallet address URL under which the incoming payment was created"
walletAddressUrl: String!
"Describes whether the incoming payment has completed receiving funds."
completed: Boolean!
"The maximum amount that should be paid into the wallet address under this incoming payment."
incomingAmount: Amount
"The total amount that has been paid into the wallet address under this incoming payment."
receivedAmount: Amount!
"Date-time of expiry. After this time, the incoming payment will accept further payments made to it."
expiresAt: String
"Additional metadata associated with the incoming payment."
metadata: JSONObject
"Date-time of creation"
createdAt: String!
"Date-time of last update"
updatedAt: String!
}
enum IncomingPaymentState {
"The payment has a state of PENDING when it is initially created."
PENDING
"As soon as payment has started (funds have cleared into the account) the state moves to PROCESSING"
PROCESSING
"The payment is either auto-completed once the received amount equals the expected `incomingAmount`, or it is completed manually via an API call."
COMPLETED
"If the payment expires before it is completed then the state will move to EXPIRED and no further payments will be accepted."
EXPIRED
}
type Amount {
value: UInt64!
"[ISO 4217 currency code](https://en.wikipedia.org/wiki/ISO_4217), e.g. `USD`"
assetCode: String!
"Difference in orders of magnitude between the standard unit of an asset and a corresponding fractional unit"
assetScale: UInt8!
}
type OutgoingPaymentConnection {
pageInfo: PageInfo!
edges: [OutgoingPaymentEdge!]!
}
type OutgoingPaymentEdge {
node: OutgoingPayment!
cursor: String!
}
input OutgoingPaymentFilter {
receiver: FilterString
walletAddressId: FilterString
state: FilterString
}
type OutgoingPayment implements BasePayment & Model {
"Outgoing payment id"
id: ID!
"Id of the wallet address under which this outgoing payment was created"
walletAddressId: ID!
"Information about the wallet address of the Open Payments client that created the outgoing payment."
client: String
"Available liquidity"
liquidity: UInt64
"Outgoing payment state"
state: OutgoingPaymentState!
error: String
stateAttempts: Int!
"Amount to send (fixed send)"
debitAmount: Amount!
"Amount to receive (fixed receive)"
receiveAmount: Amount!
"Wallet address URL of the receiver"
receiver: String!
"Additional metadata associated with the outgoing payment."
metadata: JSONObject
"Quote for this outgoing payment"
quote: Quote
"Amount already sent"
sentAmount: Amount!
"Date-time of creation"
createdAt: String!
"Id of the Grant under which this outgoing payment was created"
grantId: String
}
enum OutgoingPaymentState {
"Will transition to SENDING once payment funds are reserved"
FUNDING
"Paying, will transition to COMPLETED on success"
SENDING
"Successful completion"
COMPLETED
"Payment failed"
FAILED
"Payment cancelled"
CANCELLED
}
type PaymentConnection {
pageInfo: PageInfo!
edges: [PaymentEdge!]!
}
type PaymentEdge {
node: Payment!
cursor: String!
}
type Payment implements BasePayment & Model {
"Payment id"
id: ID!
"Type of payment"
type: PaymentType!
"Id of the wallet address under which this payment was created"
walletAddressId: ID!
"Information about the wallet address of the Open Payments client that created the payment."
client: String
"Either the IncomingPaymentState or OutgoingPaymentState according to type"
state: String!
"Available liquidity"
liquidity: UInt64
"Additional metadata associated with the payment."
metadata: JSONObject
"Date-time of creation"
createdAt: String!
}
enum PaymentType {
INCOMING
OUTGOING
}
input PaymentFilter {
type: FilterString
walletAddressId: FilterString
}
type AccountingTransferConnection {
debits: [AccountingTransfer!]!
credits: [AccountingTransfer!]!
}
type AccountingTransfer implements Model {
"Payment id"
id: ID!
"Debit account id"
debitAccountId: ID!
"Credit account id"
creditAccountId: ID!
"Amount sent (fixed send)"
amount: UInt64!
"Type of accounting transfer"
transferType: TransferType!
"Identifier that partitions the sets of accounts that can transact with each other."
ledger: UInt8!
"Date-time of creation"
createdAt: String!
}
enum TransferType {
"Deposit transfer type."
DEPOSIT
"Withdrawal transfer type."
WITHDRAWAL
"Transfer type."
TRANSFER
}
type QuoteConnection {
pageInfo: PageInfo!
edges: [QuoteEdge!]!
}
type QuoteEdge {
node: Quote!
cursor: String!
}
type Quote {
"Quote id"
id: ID!
"Id of the wallet address under which this quote was created"
walletAddressId: ID!
"Wallet address URL of the receiver"
receiver: String!
"Amount to send (fixed send)"