Skip to content

Commit 9ee068a

Browse files
committed
v2 folder, revert changes to spec
1 parent 9e3dde2 commit 9ee068a

File tree

3 files changed

+898
-88
lines changed

3 files changed

+898
-88
lines changed

specification.md

+14-88
Original file line numberDiff line numberDiff line change
@@ -56,88 +56,20 @@ On a successful request, the response will contain the following headers.
5656
#### Response Body Example
5757
```
5858
{
59-
time: new Date("2018-01-12T22:04:54.364Z"),
60-
expires: new Date("2018-01-12T22:19:54.364Z"),
61-
memo:
62-
"Payment request for BitPay invoice TmyrxFvAi4DjFNy3c7EjVm for merchant Robs Fake Business",
63-
paymentUrl: "https://localhost:5555/i/TmyrxFvAi4DjFNy3c7EjVm",
64-
paymentId: "TmyrxFvAi4DjFNy3c7EjVm",
65-
paymentOptions: [
66-
{
67-
network: "mainnet",
68-
chain: "BTC",
69-
instructions: [
70-
{
71-
requiredFeePerByte: 1000,
72-
outputs: [
73-
{
74-
amount: 39300,
75-
address: "mthVG9kuRTJQtXieJVDSrrvWyM7QDZ3rcV"
76-
}
77-
]
78-
}
79-
]
80-
},
81-
{
82-
chain: "BCH",
83-
network: "mainnet",
84-
instructions: [
85-
{
86-
requiredFeePerByte: 1000,
87-
outputs: [
88-
{
89-
amount: 39300,
90-
address: "mthVG9kuRTJQtXieJVDSrrvWyM7QDZ3rcV"
91-
}
92-
]
93-
}
94-
]
95-
},
96-
{
97-
chain: "ETH",
98-
network: "mainnet",
99-
instructions: [
100-
{
101-
gasPrice: "0x09184e72a000",
102-
gasLimit: "0x2710",
103-
to: "0xd8fD14fB0E0848Cb931c1E54a73486c4B968BE3D",
104-
value: "0x64",
105-
chainId: 1,
106-
data:
107-
"0x000000000000000000000000000000000000000000000000000000000000000000000000"
108-
}
109-
]
110-
},
59+
"network": "test",
60+
"currency": "BTC",
61+
"requiredFeePerByte": 200,
62+
"outputs": [
11163
{
112-
chain: "ETH",
113-
network: "mainnet",
114-
tokenInformation: {
115-
currency: "GUSD",
116-
type: "ERC20",
117-
address: "0x2E05e01f8A9dF371FCdD8342D3834a57267a0cD1"
118-
},
119-
instructions: [
120-
{
121-
gasPrice: "0x09184e72a000",
122-
gasLimit: "0x5958",
123-
to: "0x2E05e01f8A9dF371FCdD8342D3834a57267a0cD1",
124-
value: "0x00",
125-
chainId: 1,
126-
data:
127-
"0x095ea7b3000000000000000000000000d8fd14fb0e0848cb931c1e54a73486c4b968be3d0000000000000000000000000000000000000000000000000000000000000064"
128-
},
129-
{
130-
gasPrice: "0x09184e72a000",
131-
gasLimit: "0x5958",
132-
to: "0x2E05e01f8A9dF371FCdD8342D3834a57267a0cD1",
133-
value: "0x00",
134-
chainId: 1,
135-
data:
136-
"0xa9059cbb0000000000000000000000002e05e01f8a9df371fcdd8342d3834a57267a0cd10000000000000000000000000000000000000000000000000000000000000064"
137-
}
138-
]
64+
"amount": 39300,
65+
"address": "mthVG9kuRTJQtXieJVDSrrvWyM7QDZ3rcV"
13966
}
140-
]
67+
],
68+
"time": "2018-01-12T22:04:54.364Z",
69+
"expires": "2018-01-12T22:19:54.364Z",
70+
"memo": "Payment request for BitPay invoice TmyrxFvAi4DjFNy3c7EjVm for merchant Robs Fake Business",
71+
"paymentUrl": "https://test.bitpay.com/i/TmyrxFvAi4DjFNy3c7EjVm",
72+
"paymentId": "TmyrxFvAi4DjFNy3c7EjVm"
14173
}
14274
```
14375

@@ -151,21 +83,17 @@ A POST request should be made to the payment protocol url with a `Content-Type`
15183

15284
```
15385
{
154-
"chain": "<chain 3 letter code>",
15586
"currency": "<currency 3 letter code>",
156-
"unsignedTransactions": "<array of unsigned transactions in hexedecimal string format>",
87+
"unsignedTransaction": "<unsigned transaction in hexedecimal string format>",
15788
"weightedSize": <signed transaction weighted size in bytes>
15889
}
15990
```
16091

16192
#### Example Request Body
16293
```
16394
{
164-
"chain": "BTC",
16595
"currency": "BTC",
166-
"unsignedTransactions": [
167-
"0200000001919572700aef4a9b66ac2389ea8e8899b1c2c0b3ffe03c12c2d28e7a2574d3540100000000feffffff02c80f5f91000000001976a9140cd9a12aa54ad7b098988c67692a62196c1dbdc988ac98470200000000001976a9140f8cf402ad6478377750d572089d1e1a3ca099a788ac00000000"
168-
],
96+
"unsignedTransaction": "0200000001919572700aef4a9b66ac2389ea8e8899b1c2c0b3ffe03c12c2d28e7a2574d3540100000000feffffff02c80f5f91000000001976a9140cd9a12aa54ad7b098988c67692a62196c1dbdc988ac98470200000000001976a9140f8cf402ad6478377750d572089d1e1a3ca099a788ac00000000"
16997
"weightedSize": 225
17098
}
17199
```
@@ -202,7 +130,6 @@ A POST request should be made to the payment protocol url with a `Content-Type`
202130

203131
```
204132
{
205-
"chain": "<chain 3 letter code>",
206133
"currency": "<currency 3 letter code>",
207134
"transactions": [
208135
"<transaction in hexedecimal string format>"
@@ -213,7 +140,6 @@ A POST request should be made to the payment protocol url with a `Content-Type`
213140
#### Example Request Body
214141
```
215142
{
216-
"chain": "BTC",
217143
"currency": "BTC",
218144
"transactions": [
219145
"02000000011f0f762184cbc8e94b307fab6f805168724f123a23cd48aac4a9bac8768cfd67000000004847304402205079b96def679f04de9698dd8b9f58dff3e4a13c075f5939c6edfbb8698c8cc802203eac5a3d6410a9f94a86828a4e207f8083fe0bf1c77a74a0cb7add49100d427001ffffffff0284990000000000001976a9149097a519e42061e4977b07b69735ed842b755c0088ac08cd042a010000001976a914cf4b90bca14deab1315c125b8b74b7d31eea97b288ac00000000"

0 commit comments

Comments
 (0)