-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnft_certificate.yaml
101 lines (101 loc) · 2.43 KB
/
nft_certificate.yaml
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
cidl: "0.8"
info:
name: nft_certificate
title: Solana NFT Certificate
version: 0.0.1
license:
name: Unlicense
identifier: Unlicense
types:
CertificateMetadata:
summary: A Solana NFT Certificate program for issuing, transferring, and burning NFT certificates.
solana:
seeds:
- name: "certificate"
- name: mint
type: sol:pubkey
fields:
- name: course_name
type: string
solana:
attributes: [ cap:16]
- name: student_name
type: string
solana:
attributes: [cap:16]
- name: course_description
type: string
solana:
attributes: [cap:255]
- name: certificate_image_url
type: rs:option<string>
solana:
attributes: [ cap:96 ]
- name: mint
type: sol:pubkey
- name: assoc_account
type: rs:option<sol:pubkey>
methods:
- name: issue_certificate
uses:
- csl_spl_token.initialize_mint2
- csl_spl_assoc_token.create
- csl_spl_token.mint_to
- csl_spl_token.set_authority
inputs:
- name: mint
type: csl_spl_token.Mint
solana:
attributes: [ init ]
- name: certificate
type: CertificateMetadata
solana:
attributes: [ init ]
seeds:
mint: mint
- name: course_name
type: string
- name: student_name
type: string
- name: certificate_image_url
type: string
- name: course_description
type: string
- name: claim_certificate
uses:
- csl_spl_assoc_token.create
- csl_spl_token.transfer_checked
inputs:
- name: claim
type: csl_spl_token.Mint
- name: certificate
type: CertificateMetadata
solana:
attributes: [mut]
seeds:
mint: claim
- name: transfer_certificate
uses:
- csl_spl_assoc_token.create
- csl_spl_token.transfer_checked
inputs:
- name: mint
type: csl_spl_token.Mint
- name: certificate
type: CertificateMetadata
solana:
attributes: [ mut ]
seeds:
mint: mint
- name: burn_certificate
uses:
- csl_spl_token.burn
inputs:
- name: mint
type: csl_spl_token.Mint
- name: certificate
type: CertificateMetadata
solana:
attributes: [ mut ]
seeds:
mint: mint