Payment
Paymentãã©ã³ã¶ã¯ã·ã§ã³ã¯ãã¢ã«ãŠã³ãéã§ã®äŸ¡å€ã®ç§»åãè¡šçŸãããã®ã§ã(ééãããã¹ã«ãã£ãŠã¯ãéå¯åçã«çºçããè¿œå çãªäŸ¡å€äº€æã䌎ãããšããããŸã)ããã®ãã©ã³ã¶ã¯ã·ã§ã³ã¿ã€ãã¯ããã€ãã®æ¯æãã®çš®é¡ã«äœ¿çšããããšãã§ã§ããŸãã
Paymentã¯ãã¢ã«ãŠã³ããäœæããå¯äžã®æ段ã§ããããŸãã
Paymentã®JSONã®äŸ
{ "TransactionType" : "Payment", "Account" : "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", "Destination" : "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX", "DeliverMax" : { "currency" : "USD", "value" : "1", "issuer" : "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn" }, "Fee": "12", "Flags": 2147483648, "Sequence": 2, }
Payment ãã£ãŒã«ã
å ±éãã£ãŒã«ãã«å ããŠãPaymentãã©ã³ã¶ã¯ã·ã§ã³ã¯ä»¥äžã®ãã£ãŒã«ãã䜿çšããŸãã
ãã£ãŒã«ã | JSONã®å | å éšã®å | 説æ |
---|---|---|---|
Amount | éè²šé¡ | Amount | DeliverMax ã®ãšã€ãªã¢ã¹ |
DeliverMax | Currency Amount | Amount | API v2: ééããé貚é¡ãXRP以å€ã®éé¡ã®å Žåãå ¥ãåãã£ãŒã«ãã®ååã§ã¯ãã¢ã«ãã¡ãããã®å°æåã®ã¿äœ¿çšããŠãã ãããtfPartialPaymentãã©ã°ãèšå®ãããŠããå Žåã¯ããã®éé¡ã äžé ãšããéé¡ãééããŸãã |
DeliverMin | éè²šé¡ | Amount | ïŒçç¥å¯ïŒ ãã®ãã©ã³ã¶ã¯ã·ã§ã³ã§ééãããå®å é貚ã§ã®æå°éé¡ãPartial Paymentsã®å Žåã®ã¿æå¹ã«ãªããŸããXRP以å€ã®éé¡ã®å Žåãå ¥ãåãã£ãŒã«ãã®ååã§ã¯ãã¢ã«ãã¡ãããã®å°æåã®ã¿äœ¿çšããŠãã ããã |
Destination | æåå | AccountID | æ¯æããååãã¢ã«ãŠã³ãã®äžæã¢ãã¬ã¹ã |
DestinationTag | æ°å€ | UInt32 | ïŒçç¥å¯ïŒ å®å ïŒæ¯æå ãšãªãããã¹ãã£ã³ã°ãããŠããåå人ïŒãžã®æ¯æãçç±ãæ確ã«ããããã®ä»»æã®ã¿ã°ã |
InvoiceID | æåå | Hash256 | ïŒçç¥å¯ïŒ ãã®æ¯æãã®å ·äœçãªçç±ãŸãã¯èå¥åãè¡šçŸããä»»æã®256ãããããã·ã¥ã |
Paths | ãã¹é åã®é å | PathSet | ïŒçç¥å¯ãèªåå ¥åå¯èœïŒãã®ãã©ã³ã¶ã¯ã·ã§ã³ã«äœ¿çšãããæ¯æããã¹ã®é åãXRPéã®ãã©ã³ã¶ã¯ã·ã§ã³ã§ã¯çç¥ããå¿ èŠããããŸãã |
SendMax | éè²šé¡ | Amount | ïŒçç¥å¯ïŒ ééææ°æãçºæ¿ã¬ãŒããã¹ãªãããŒãžãå«ãããã®ãã©ã³ã¶ã¯ã·ã§ã³ã«é¢ããŠæ¯æãå é貚ã§ã®è² æ ã蚱容ããäžéé¡ããã©ã³ã¶ã¯ã·ã§ã³ã®éä¿¡ã³ã¹ããšããŠããŒã³ãããXRPã¯å«ããªãã§ãã ãããXRP以å€ã®éé¡ã®å Žåãå ¥ãåãã£ãŒã«ãã®ååã§ã¯ãã¢ã«ãã¡ãããã®å°æåã®ã¿äœ¿çšããŠãã ãããã¯ãã¹ã«ã¬ã³ã·ãŒæ¯æããŸãã¯è€æ°ã®ããŒã¯ã³ã䌎ãæ¯æãã«ã€ããŠã¯ããã®ãã£ãŒã«ããå ¥åããå¿ èŠããããŸããXRPéã®æ¯æãã§ã¯çç¥ããå¿ èŠããããŸãã |
Paymentã®çš®é¡
Paymentãã©ã³ã¶ã¯ã·ã§ã³ã¿ã€ãã¯ãããã€ãã®ç°ãªãã¿ã€ãã®æœè±¡çãªã¢ã¯ã·ã§ã³ãè¡šçŸããããšãã§ããæ±çšããŒã«ã§ããäžã®è¡šã§èª¬æããããã«ããã©ã³ã¶ã¯ã·ã§ã³ã®ãã£ãŒã«ãã«åºã¥ããŠãã©ã³ã¶ã¯ã·ã§ã³ã¿ã€ããèå¥ããããšãã§ããŸãã
Paymentã®çš®é¡ | Amount | SendMax | Paths | Address = Destination ? | 説æ |
---|---|---|---|---|---|
XRPå士ã®çŽæ¥æ¯æã | String (XRP) | çç¥ | çç¥ | ããã | ã¢ã«ãŠã³ãéã§ãžçŽæ¥XRPãééããŸããåžžã«æ£ç¢ºãªéé¡ãéä¿¡ããŸããåºæ¬çãªååŒã³ã¹ã以å€ã®ææ°æã¯é©çšãããŸããã |
çºè¡é貚ã®äœæã»åé | Object | Object (ä»»æ) | ä»»æ | ããã | XRP Ledgerã«è¿œè·¡ãããŠããXRP以å€ã®é貚ãè³ç£ã®éãå¢æžãããŸããééææ°æãšåçµã¯ãçŽæ¥ééã»æéããéã«ã¯é©çšãããŸããã |
ã¯ãã¹ã«ã¬ã³ã·ãŒïŒé貚éïŒæ±ºæž | Object (non-XRP) / String (XRP) | Object (non-XRP) / String (XRP) | éåžžã¯å¿ é | ããã | çºè¡ãããé貚ãä¿æè
ããå¥ã®ä¿æè
ã«éä¿¡ããŸããAmount ãšSendMax ã®äž¡æ¹ãXRPã«ããããšã¯ã§ããŸããããããã®æ¯æãã¯ãçºè¡è
ãä»ããŠãªãããªã³ã°ãããã©ã³ã¶ã¯ã·ã§ã³ããã¹ã»ãããæå®ããå Žåãè€æ°ã®ä»²ä»è
ãä»ããŠããé·ããã¹ãåãããšãã§ããŸãããã©ã³ã¶ã¯ã·ã§ã³åœ¢åŒã«ã¯ãçºè¡è
ãèšå®ããééææ°æ ãé©çšãããŸãããããã®ãã©ã³ã¶ã¯ã·ã§ã³ã¯ãç°ãªãé貚éããå Žåã«ãã£ãŠã¯åãé貚ã³ãŒãã§ç°ãªãçºè¡è
ã®é貚éãæ¥ç¶ããããã«ãåæ£åååŒæã®ãªãã¡ãŒãå©çšããŸãã |
Partial payment | Object (non-XRP) / String (XRP) | Object (non-XRP) / String (XRP) | éåžžã¯å¿ é | ããã | ä»»æã®é貚ãç¹å®ã®éé¡ãŸã§éããŸããtfPartialPayment ãã©ã°ã䜿çšããŸãããã©ã³ã¶ã¯ã·ã§ã³ãæåããããã®æå°å€ãæå®ãã DeliverMin å€ãå«ããããšãã§ããŸãããã©ã³ã¶ã¯ã·ã§ã³ã DeliverMin ãæå®ããªãå Žåãä»»æã®æ£ã®å€ ãæå®ããŠæåãããããšãã§ããã |
é貚å€æ | Object (non-XRP) / String (XRP) | Object (non-XRP) / String (XRP) | å¿ é | ã¯ã | åæ£åååŒæã®ãªãã¡ãŒãæ¶è²»ããŠãããé貚ãå¥ã®é貚ã«äº€æããè£å®ååŒã®æ©äŒãåŸãããšãåºæ¥ãŸããAmount ãš SendMax ã®äž¡æ¹ã XRP ã«ããããšã¯ã§ããŸãããData API ã¯ããã®ã¿ã€ãã®ååŒã "payment" ã§ã¯ãªãã"exchange" ãšããŠè¿œè·¡ããŠããŸãã |
SendMaxããã³Amountã§äœ¿çšããç¹æ®ãªissuerã®å€
ã»ãšãã©ã®å ŽåãXRP以å€ã®é貚é¡ã®issuer
ãã£ãŒã«ãã¯ãéèæ©é¢ã®çºè¡ã¢ãã¬ã¹ã瀺ããŠããŸãããã ããæ¯æããèšè¿°ããã«ããã£ãŠãæ¯æãã®Amount
ãã£ãŒã«ããšSendMax
ãã£ãŒã«ãã«ããissuer
ãã£ãŒã«ãã«ã€ããŠã¯ãç¹æ®ãªã«ãŒã«ãååšããŸãã
- 2ã€ã®ã¢ãã¬ã¹éã§ãåäžã®é貚ã«é¢ããŠååšããæ®é«ã¯åžžã«1ã€ã§ããã€ãŸããéé¡ã®
issuer
ãã£ãŒã«ããå®éã«è¡šããŠããã®ã¯ãã€ã·ã¥ã¢ã³ã¹ãäœæããã¢ãã¬ã¹ã§ã¯ãªããã€ã·ã¥ã¢ã³ã¹ãæéããçžææ¹ã§ããããšããããŸãã - å®å
Amount
ãã£ãŒã«ãã®issuer
ãã£ãŒã«ããDestination
ã¢ãã¬ã¹ãšäžèŽããŠããå Žåããå®å ãåãå ¥ããããããã€ã·ã¥ã¢ãŒããæå³ããç¹æ®ãªã±ãŒã¹ãšããŠåãæ±ãããŸããããã«ã¯ãä»ã®ãã©ã¹ãã©ã€ã³ã§ä¿æãããŠããå®å ã«ãã£ãŠäœæãããã€ã·ã¥ã¢ã³ã¹ã«å ããå®å ãåœè©²ã¢ãã¬ã¹ãŸã§ãã©ã¹ãã©ã€ã³ã延é·ããŠãããã¹ãŠã®ã¢ãã¬ã¹ãå«ãŸããŸãã SendMax
ãã£ãŒã«ãã®issuer
ãã£ãŒã«ããéä¿¡å ã¢ã«ãŠã³ãã®ã¢ãã¬ã¹ãšäžèŽããŠããå Žåããéä¿¡å ã䜿çšã§ããããããã€ã·ã¥ã¢ãŒããæå³ããç¹æ®ãªã±ãŒã¹ãšããŠåãæ±ãããŸããããã«ã¯ãä»ã®ã¢ã«ãŠã³ããéä¿¡å ã¢ã«ãŠã³ããŸã§å»¶é·ããŠãããã©ã¹ãã©ã€ã³ã§æ°ããã€ã·ã¥ã¢ã³ã¹ãäœæããããšãéä¿¡å ã¢ã«ãŠã³ããä¿æããŠããã€ã·ã¥ã¢ã³ã¹ãä»ã®ã€ã·ã¥ã¢ãŒããéä¿¡ããããšãå«ãŸããŸãã
ã¢ã«ãŠã³ãã®äœæ
Paymentåã®ãã©ã³ã¶ã¯ã·ã§ã³ã§ã¯ãè³éäŸçµŠã®ãªãã¢ãã¬ã¹ã«å¯ŸããŠååãªXRPãééããããšã§ãXRP Ledgerã«æ°èŠã®ã¢ã«ãŠã³ããäœæã§ããŸããè³éäŸçµŠã®ãªãã¢ãã¬ã¹ã«å¯Ÿãããã®ä»ã®ãã©ã³ã¶ã¯ã·ã§ã³ã¯ãåžžã«å€±æããŸãã
詳现ã¯ãã¢ã«ãŠã³ããã芧ãã ããã
ãã¹
Paths
ãã£ãŒã«ããååšããå ŽåãPathãã£ãŒã«ãã«ã¯ã ãã¹ã»ãã ïŒãã¹é
åã®é
åïŒãèšè¿°ãããŠããªããã°ãªããŸãããåã
ã®ãã¹ã¯ãããŸããŸãªä»²ä»ã¢ã«ãŠã³ãããªãŒããŒããã¯ãçµç±ããŠãéä¿¡è
ããåä¿¡è
ãžãšäŸ¡å€ã1ã€ã®æ¹åãžæµããããšãè¡šããŸããåäžã®ãã©ã³ã¶ã¯ã·ã§ã³ã§ãè€æ°ã®ãã¹ã䜿çšããå¯èœæ§ããããŸããäŸãã°ããã©ã³ã¶ã¯ã·ã§ã³ã§è€æ°ã®ãªãŒããŒããã¯ãAMMã䜿çšããŠãæãæå©ãªã¬ãŒãã§é貚ã亀æããå Žåã§ãã
以äžã®å Žåãå«ããçŽæ¥ã®æ¯æãã§ã¯Paths
ãã£ãŒã«ããçç¥ããå¿
èŠããããŸãã
- XRPéã®ééã
- éä¿¡è ãšåä¿¡è ãæ¥ç¶ãããã©ã¹ãã©ã€ã³äžã§ã®çŽæ¥ééã
Paths
ãã£ãŒã«ããæå®ãããšããµãŒãã¯ãæäŸãããã»ãããš ããã©ã«ããã¹ ã®äžããã䜿çšãããã¹ïŒæå®ãããã¢ã«ãŠã³ãã«æ¥ç¶ããäžã§ãæãçŽè¡ãšãªãçµè·¯ïŒããã©ã³ã¶ã¯ã·ã§ã³åŠçæã«å€å¥ããŸãããã®ããã«æ±ºå®ãããå€å¥ã¯ãã³ã¹ããæå°åããããšãããã®ã§ãããå®ç§ã§ããããšã¯ä¿èšŒãããŸããã
Paths
ãã£ãŒã«ããã空ã®é
åãšããããã¡ã³ããŒããã¹ãŠç©ºã®é
åãããããªé
åãšãããããããšã¯ã§ããŸããã
詳现ã¯ãPathsãã芧ãã ããã
Paymentã®ãã©ã°
Paymentåã®ãã©ã³ã¶ã¯ã·ã§ã³ã«ã€ããŠã¯ãFlags
ãã£ãŒã«ãã§ä»¥äžã®å€ãè¿œå ã§ãµããŒããããŸãã
ãã©ã°ã®åå | 16é²å€ | 10é²å€ | 説æ |
---|---|---|---|
tfNoRippleDirect | 0x00010000 | 65536 | ããã©ã«ããã¹ã䜿çšãããPaths ãã£ãŒã«ãã«å«ãŸããŠãããã¹ã®ã¿äœ¿çšããŸããããã«ãããã©ã³ã¶ã¯ã·ã§ã³ã¯åŒ·å¶çã«è£å®æ©äŒã掻çšããããšã«ãªããŸããã»ãšãã©ã®ã¯ã©ã€ã¢ã³ãã§ã¯ãããã¯å¿
èŠãããŸããã |
tfPartialPayment | 0x00020000 | 131072 | SendMax ãè¶
ããŠããªãã®ã«æå®ãããAmount ãééã§ããªãå Žåãå³åº§ã«å€±æãšããã®ã§ã¯ãªããååãããé¡ãæžé¡ããŸãã詳现ã¯ãPartial Paymentsãã芧ãã ããã |
tfLimitQuality | 0x00040000 | 262144 | ãã¹ãŠã®å€æã§ãå
¥åãšåºåãšã®æ¯çãAmount ãšSendMax ãšã®æ¯çãšåäžã§ããããããã«æå©ãšãªããã¹ã®ã¿ãæ¡çšããŸãã詳现ã¯ãã¯ãªãªãã£ã®å¶éãã芧ãã ããã |
Partial Payments
Partial Paymentsãå©çšãããšãååãããéé¡ãæžé¡ããããšã«ãã£ãŠãæ¯æããæåãããããšãã§ããŸããPartial Paymentsãæçšãªã®ã¯ãè¿œå çãªã³ã¹ããçºçãããã«æ¯æããè¿éããå Žåã§ãããã®äžæ¹ã§ãæåãããã©ã³ã¶ã¯ã·ã§ã³ã®Amount
ãã£ãŒã«ãã«ãééãããéé¡ãåžžã«æ£ããèšè¿°ãããŠããããšãåæãšããŠããç°å¢ã«ãããŠãæªçšããããããããããŸãã
Partial Paymentsãšã¯ãtfPartialPaymentãã©ã°ãæå¹ã«ãªã£ãŠããPaymentãã©ã³ã¶ã¯ã·ã§ã³ã§ããPartial Paymentsã¯ãSendMax
å€ãè¶
ããéé¡ãééããããšãªããDeliverMin
ãã£ãŒã«ã以äžã®æ£ã®éé¡ïŒDeliverMin
ãæå®ãããŠããªãå Žåãä»»æã®æ£ã®éé¡ïŒãééããå Žåã«æåããŸãã
æ¯æãã®ã¡ã¿ããŒã¿ã«ããdelivered_amount
ãã£ãŒã«ãã¯ãå®å
ã¢ã«ãŠã³ããå®éã«åãåãé貚ã®éé¡ã瀺ããŠããŸãã
詳现ã¯ãPartial Paymentsã®å šæãã芧ãã ããã
ã¯ãªãªãã£ã®å¶é
XRP Ledgerã§ã¯ãããé貚ã§ã®å
¥éé¡ãšå¥ã®é貚ã§ã®åºéé¡ã®æ¯çãšããŠãé貚ååŒã®ãã¯ãªãªãã£ããå®çŸ©ããŸããäŸãã°ã2ç±³ãã«ãšåŒãæãã«1ã€ã®ãªã¹ãã³ããåãåãå Žåããã®äº€æã®ãã¯ãªãªãã£ãã¯0.5
ã§ãã
tfLimitQualityãã©ã°ã䜿çšãããšãå®è¡ããå€æã®ã¯ãªãªãã£ã«ã€ããŠäžéãèšå®ã§ããŸãããã®ã¯ãªãªãã£ã®å¶éã¯ãå®å
ã®Amount
ãSendMax
ã®éé¡ïŒé貚ã«ãããããéé¡ã®ã¿ïŒã§é€ç®ããããšã«ãã£ãŠå®çŸ©ããŸããèšå®ããå Žåãæ¯æãåŠçãšã³ãžã³ã¯ãã¯ãªãªãã£ã®å¶éãããã¯ãªãªãã£ïŒçºæ¿ã¬ãŒãïŒãäœãïŒæ°å€ãå°ããïŒãã¹ã®äœ¿çšãåé¿ããŸãã
tfLimitQualityãã©ã°ã¯ãããèªäœããã©ã³ã¶ã¯ã·ã§ã³ãæåããç¶æ³ãæžå°ããããã®ã«ãªããŸããå
·äœçã«ã¯ã奜ãŸãããªãå€æãæ¯æãã®äžéšã§äœ¿çšãããŠããå Žåãæ¯æãã«ãããå€æã®å¹³åçãªã¯ãªãªãã£ãå
šäœãšããŠã¯ãªãªãã£ã®å¶éãšåäžãããã以äžã§ãã£ãŠããæ¯æããæåŠãããŸããæ¯æãããã®åœ¢ã§æåŠãããå Žåããã©ã³ã¶ã¯ã·ã§ã³ã®çµæã¯tecPATH_DRY
ã§ãã
次ã®äŸãèããŠã¿ãŸãã100人æ°å
ïŒAmount
= 100人æ°å
ïŒãæ倧20ç±³ãã«ïŒSendMax
= 20ç±³ãã«ïŒãšåŒãæãã«çžææ¹ã«ééããããšããå Žåãã¯ãªãªãã£ã®å¶éã¯5
ã§ãããããã¬ãŒããŒã15ç±³ãã«ãšåŒãæãã«95人æ°å
ããªãã¡ãŒããŠãããã®ã®ïŒç±³ãã«ãããçŽ6.3
人æ°å
ã®æ¯çïŒãåžå Žã®æ¬¡åã®ãªãã¡ãŒã2ãã«ã«å¯ŸããŠ5人æ°å
ã§ãããšããŸãïŒç±³ãã«ããã2.5
人æ°å
ã®æ¯çïŒãäž¡æ¹ã®ãªãã¡ãŒãåè«ŸããŠçžææ¹ã«100人æ°å
ãééããå Žåãéä¿¡å
ãè² æ
ããã³ã¹ãã¯17ç±³ãã«ã§ãããå¹³åã®ã¯ãªãªãã£ã¯çŽ5.9
ã§ãã
tfLimitQualityãã©ã°ãèšå®ãããŠããªãå Žåã17ç±³ãã«ãšããã³ã¹ãã¯æå®ãããSendMax
ã«åãŸã£ãŠããããããã®ãã©ã³ã¶ã¯ã·ã§ã³ã¯æåããŸããäžæ¹ãtfLimitQualityãã©ã°ãæå¹ã«ãªã£ãŠããå Žåã¯å€±æããŸãã2çªç®ã®ãªãã¡ãŒãåè«Ÿããããã®ãã¹ã®ã¯ãªãªãã£ã¯2.5
ã§ããã5
ãšããã¯ãªãªãã£ã®å¶éãããäœãããã§ãã
tfLimitQualityãã©ã°ãæãæçšãšãªãã®ã¯ãPartial Paymentsãšçµã¿åãããå Žåã§ããtfPartialPaymentãštfLimitQualityã®äž¡æ¹ããã©ã³ã¶ã¯ã·ã§ã³ã«å¯ŸããŠèšå®ãããŠããå Žåããã©ã³ã¶ã¯ã·ã§ã³ã§ã¯ãã¯ãªãªãã£ã®å¶éãããäœãå€æã䜿çšããããšãªããééå¯èœãªæ倧éã®å®å
Amount
ãééãããŸãã
95人æ°å
/15ç±³ãã«ã®ãªãã¡ãŒãš5人æ°å
/2ç±³ãã«ã®ãªãã¡ãŒãããäžã®äŸã§ããã©ã³ã¶ã¯ã·ã§ã³ã«é¢ããŠtfPartialPaymentãštfLimitQualityã®äž¡æ¹ãæå¹ã«ãªã£ãŠããå Žåãç¶æ³ã¯ç°ãªããŸãã20ç±³ãã«ã®SendMax
ããã³100人æ°å
ã®å®å
Amount
ãç¶æããå Žåããã¯ãªãªãã£ã®å¶éã¯5
ã§ãããã ããå®è¡ããããšããã®ã¯Partial Paymentsã§ãããããå®å
ã«å¯Ÿããééã®å
šé¡ãäžåºŠã§ééã§ããªãå Žåããã©ã³ã¶ã¯ã·ã§ã³ã倱æãšããã®ã§ã¯ãªããééå¯èœãªæ倧éã®éé¡ãééãããŸããã€ãŸãããã©ã³ã¶ã¯ã·ã§ã³ã§ã¯ãã¯ãªãªãã£ãçŽ6.3
ã§ãã95人æ°å
/15ç±³ãã«ã®ãªãã¡ãŒã¯åãå
¥ããŸããã5人æ°å
/2ç±³ãã«ã®ãªãã¡ãŒã¯ã¯ãªãªãã£ã2.5
ã§ãããã¯ãªãªãã£ã®å¶éã®5
ããäœããããæåŠããŸããæçµçã«ããã©ã³ã¶ã¯ã·ã§ã³ã§ééãããã®ã¯æºé¡ã®100人æ°å
ã§ã¯ãªã95人æ°å
ã«ãªããŸãããäžå©ãªçºæ¿ã¬ãŒãã§è³éã浪費ããããšãé¿ããããŸãã