@arcblock/nft 1.17.2 → 1.17.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcblock/nft",
|
|
3
3
|
"description": "Utility to create standard asset on forge powered blockchain",
|
|
4
|
-
"version": "1.17.
|
|
4
|
+
"version": "1.17.5",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "wangshijun",
|
|
7
7
|
"email": "shijun@arcblock.io",
|
|
@@ -18,16 +18,15 @@
|
|
|
18
18
|
"access": "public"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@arcblock/did-util": "1.17.
|
|
22
|
-
"@arcblock/vc": "1.17.
|
|
23
|
-
"@ocap/client": "1.17.
|
|
24
|
-
"@ocap/util": "1.17.
|
|
25
|
-
"@ocap/wallet": "1.17.
|
|
21
|
+
"@arcblock/did-util": "1.17.5",
|
|
22
|
+
"@arcblock/vc": "1.17.5",
|
|
23
|
+
"@ocap/client": "1.17.5",
|
|
24
|
+
"@ocap/util": "1.17.5",
|
|
25
|
+
"@ocap/wallet": "1.17.5",
|
|
26
26
|
"debug": "^4.3.3",
|
|
27
27
|
"json-stable-stringify": "^1.0.1",
|
|
28
28
|
"lodash": "^4.17.21",
|
|
29
|
-
"pako": "^1.0.11"
|
|
30
|
-
"url-join": "^4.0.1"
|
|
29
|
+
"pako": "^1.0.11"
|
|
31
30
|
},
|
|
32
31
|
"devDependencies": {
|
|
33
32
|
"jest": "^27.3.1",
|
|
@@ -71,5 +70,5 @@
|
|
|
71
70
|
"test": "jest --forceExit --detectOpenHandles",
|
|
72
71
|
"coverage": "yarn test -- --coverage"
|
|
73
72
|
},
|
|
74
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "5cacbffd2801318debfe38e5313c63dbdf013eec"
|
|
75
74
|
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
const joinUrl = require('url-join');
|
|
2
|
-
|
|
3
|
-
module.exports = (serviceUrl = 'https://registry.arcblock.io') => ({
|
|
4
|
-
type: 'vc',
|
|
5
|
-
value: {
|
|
6
|
-
'@context': 'https://schema.arcblock.io/v0.1/context.jsonld',
|
|
7
|
-
id: '{{input.id}}',
|
|
8
|
-
tag: ['{{data.did}}'],
|
|
9
|
-
type: ['VerifiableCredential', 'PurchaseCredential', 'NFTCertificate', 'BlockletPurchaseCredential'],
|
|
10
|
-
issuer: {
|
|
11
|
-
id: '{{ctx.issuer.id}}',
|
|
12
|
-
pk: '{{ctx.issuer.pk}}',
|
|
13
|
-
name: '{{ctx.issuer.name}}',
|
|
14
|
-
},
|
|
15
|
-
issuanceDate: '{{input.issuanceDate}}', // does not expire
|
|
16
|
-
credentialSubject: {
|
|
17
|
-
id: '{{ctx.owner}}',
|
|
18
|
-
purchased: {
|
|
19
|
-
blocklet: {
|
|
20
|
-
id: '{{data.did}}',
|
|
21
|
-
url: '{{{data.url}}}',
|
|
22
|
-
name: '{{data.name}}',
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
display: {
|
|
26
|
-
type: 'url',
|
|
27
|
-
content: joinUrl(serviceUrl, '/api/nft/display'), // accept asset-did in query param
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
credentialStatus: {
|
|
31
|
-
id: joinUrl(serviceUrl, '/api/nft/status'),
|
|
32
|
-
type: 'NFTStatusList2021',
|
|
33
|
-
scope: 'public',
|
|
34
|
-
},
|
|
35
|
-
proof: {
|
|
36
|
-
type: '{{input.proofType}}',
|
|
37
|
-
created: '{{input.issuanceDate}}',
|
|
38
|
-
proofPurpose: 'assertionMethod',
|
|
39
|
-
jws: '{{input.signature}}',
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
});
|
package/lib/templates/index.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
const nodePurchase = require('./node-purchase');
|
|
2
|
-
const nodeOwner = require('./node-owner');
|
|
3
|
-
const blockletPurchase = require('./blocklet-purchase');
|
|
4
|
-
|
|
5
|
-
module.exports = {
|
|
6
|
-
getNodePurchaseTemplate: nodePurchase,
|
|
7
|
-
getNodeOwnerTemplate: nodeOwner,
|
|
8
|
-
getBlockletPurchaseTemplate: blockletPurchase,
|
|
9
|
-
};
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
const joinUrl = require('url-join');
|
|
2
|
-
|
|
3
|
-
module.exports = (serviceUrl = 'https://launcher.arcblock.io') => ({
|
|
4
|
-
type: 'vc',
|
|
5
|
-
value: {
|
|
6
|
-
'@context': 'https://schema.arcblock.io/v0.1/context.jsonld',
|
|
7
|
-
id: '{{input.id}}',
|
|
8
|
-
tag: ['{{input.nodeId}}'],
|
|
9
|
-
type: ['VerifiableCredential', 'OwnershipCredential', 'NFTCertificate', 'NodeOwnershipCredential'],
|
|
10
|
-
issuer: {
|
|
11
|
-
id: '{{ctx.issuer.id}}',
|
|
12
|
-
pk: '{{ctx.issuer.pk}}',
|
|
13
|
-
name: '{{ctx.issuer.name}}',
|
|
14
|
-
},
|
|
15
|
-
issuanceDate: '{{input.issuanceDate}}',
|
|
16
|
-
expirationDate: '{{input.expirationDate}}',
|
|
17
|
-
credentialSubject: {
|
|
18
|
-
id: '{{ctx.owner}}',
|
|
19
|
-
isOwnerOf: {
|
|
20
|
-
abtnode: {
|
|
21
|
-
id: '{{input.nodeId}}',
|
|
22
|
-
provider: '{{input.nodeProvider}}',
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
display: {
|
|
26
|
-
type: 'url',
|
|
27
|
-
content: joinUrl(serviceUrl, '/api/nft/display'), // accept asset-did in query param
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
evidence: [
|
|
31
|
-
{
|
|
32
|
-
id: '{{input.purchaseId}}',
|
|
33
|
-
type: ['NodePurchaseCredential'],
|
|
34
|
-
verifier: '{{input.purchaseIssuerId}}',
|
|
35
|
-
evidenceDocument: 'NodePurchaseCredential',
|
|
36
|
-
subjectPresence: 'Digital',
|
|
37
|
-
documentPresence: 'Digital',
|
|
38
|
-
},
|
|
39
|
-
],
|
|
40
|
-
credentialStatus: {
|
|
41
|
-
id: joinUrl(serviceUrl, '/api/nft/status'),
|
|
42
|
-
type: 'NFTStatusList2021',
|
|
43
|
-
scope: 'public',
|
|
44
|
-
},
|
|
45
|
-
refreshService: {
|
|
46
|
-
id: joinUrl(serviceUrl, '/api/nft/refresh/{{input.id}}'),
|
|
47
|
-
type: 'NodeOwnershipRefreshService2021',
|
|
48
|
-
},
|
|
49
|
-
proof: {
|
|
50
|
-
type: '{{input.proofType}}',
|
|
51
|
-
created: '{{input.issuanceDate}}',
|
|
52
|
-
proofPurpose: 'assertionMethod',
|
|
53
|
-
jws: '{{input.signature}}',
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
});
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
const joinUrl = require('url-join');
|
|
2
|
-
|
|
3
|
-
module.exports = (serviceUrl = 'https://launcher.arcblock.io') => ({
|
|
4
|
-
type: 'vc',
|
|
5
|
-
value: {
|
|
6
|
-
'@context': 'https://schema.arcblock.io/v0.1/context.jsonld',
|
|
7
|
-
id: '{{input.id}}',
|
|
8
|
-
type: ['VerifiableCredential', 'PurchaseCredential', 'NFTTicket', 'NodePurchaseCredential'],
|
|
9
|
-
issuer: {
|
|
10
|
-
id: '{{ctx.issuer.id}}',
|
|
11
|
-
pk: '{{ctx.issuer.pk}}',
|
|
12
|
-
name: '{{ctx.issuer.name}}',
|
|
13
|
-
},
|
|
14
|
-
issuanceDate: '{{input.issuanceDate}}',
|
|
15
|
-
credentialSubject: {
|
|
16
|
-
id: '{{ctx.owner}}',
|
|
17
|
-
purchased: {
|
|
18
|
-
abtnode: {
|
|
19
|
-
type: '{{data.type}}',
|
|
20
|
-
period: '{{data.period}}',
|
|
21
|
-
name: '{{input.name}}',
|
|
22
|
-
description: '{{input.description}}',
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
display: {
|
|
26
|
-
type: 'url',
|
|
27
|
-
content: joinUrl(serviceUrl, '/api/nft/display'), // accept asset-did in query param
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
credentialStatus: {
|
|
31
|
-
id: joinUrl(serviceUrl, '/api/nft/status'),
|
|
32
|
-
type: 'NFTStatusList2021',
|
|
33
|
-
scope: 'public',
|
|
34
|
-
},
|
|
35
|
-
proof: {
|
|
36
|
-
type: '{{input.proofType}}',
|
|
37
|
-
created: '{{input.issuanceDate}}',
|
|
38
|
-
proofPurpose: 'assertionMethod',
|
|
39
|
-
jws: '{{input.signature}}',
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
});
|