@lukso/lsp8-contracts 0.16.2 → 0.16.3
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/README.md +48 -1
- package/dist/abi.cjs +6432 -0
- package/dist/abi.d.cts +9539 -0
- package/dist/abi.d.mts +9539 -0
- package/dist/abi.d.ts +9539 -0
- package/dist/abi.mjs +6418 -0
- package/package.json +32 -24
- package/artifacts/ILSP8IdentifiableDigitalAsset.json +0 -490
- package/artifacts/LSP8Burnable.json +0 -943
- package/artifacts/LSP8BurnableInitAbstract.json +0 -951
- package/artifacts/LSP8CappedSupply.json +0 -948
- package/artifacts/LSP8CappedSupplyInitAbstract.json +0 -956
- package/artifacts/LSP8Enumerable.json +0 -944
- package/artifacts/LSP8EnumerableInitAbstract.json +0 -952
- package/artifacts/LSP8IdentifiableDigitalAsset.json +0 -925
- package/artifacts/LSP8IdentifiableDigitalAssetInitAbstract.json +0 -933
- package/artifacts/LSP8Mintable.json +0 -995
- package/artifacts/LSP8MintableInit.json +0 -1015
- package/artifacts/LSP8Votes.json +0 -1230
- package/artifacts/LSP8VotesInitAbstract.json +0 -1222
- package/types/index.ts +0 -11842
- /package/dist/{index.cjs → constants.cjs} +0 -0
- /package/dist/{index.d.cts → constants.d.cts} +0 -0
- /package/dist/{index.d.mts → constants.d.mts} +0 -0
- /package/dist/{index.d.ts → constants.d.ts} +0 -0
- /package/dist/{index.mjs → constants.mjs} +0 -0
package/README.md
CHANGED
@@ -10,7 +10,9 @@ npm install @lukso/lsp8-contracts
|
|
10
10
|
|
11
11
|
## Available Constants & Types
|
12
12
|
|
13
|
-
The `@lukso/lsp8-contracts` npm package contains useful constants such as interface IDs or ERC725Y data keys related to the LSP8 Standard. You can import and access them as follows
|
13
|
+
The `@lukso/lsp8-contracts` npm package contains useful constants such as interface IDs or ERC725Y data keys related to the LSP8 Standard. You can import and access them as follows.
|
14
|
+
|
15
|
+
In Javascript.
|
14
16
|
|
15
17
|
```js
|
16
18
|
import {
|
@@ -21,3 +23,48 @@ import {
|
|
21
23
|
LSP8_TOKEN_ID_FORMAT,
|
22
24
|
} from "@lukso/lsp8-contracts";
|
23
25
|
```
|
26
|
+
|
27
|
+
In Solidity.
|
28
|
+
|
29
|
+
<!-- prettier-ignore -->
|
30
|
+
```solidity
|
31
|
+
import {
|
32
|
+
_INTERFACEID_LSP8,
|
33
|
+
_INTERFACEID_LSP8_V0_12_0,
|
34
|
+
_INTERFACEID_LSP8_V0_14_0,
|
35
|
+
_LSP8_TOKENID_FORMAT_KEY,
|
36
|
+
_LSP8_TOKEN_METADATA_BASE_URI,
|
37
|
+
_LSP8_REFERENCE_CONTRACT,
|
38
|
+
_TYPEID_LSP8_TOKENSSENDER,
|
39
|
+
_TYPEID_LSP8_TOKENSRECIPIENT,
|
40
|
+
_TYPEID_LSP8_TOKENOPERATOR,
|
41
|
+
_LSP8_TOKENID_FORMAT_NUMBER,
|
42
|
+
_LSP8_TOKENID_FORMAT_STRING,
|
43
|
+
_LSP8_TOKENID_FORMAT_ADDRESS,
|
44
|
+
_LSP8_TOKENID_FORMAT_UNIQUE_ID,
|
45
|
+
_LSP8_TOKENID_FORMAT_HASH,
|
46
|
+
_LSP8_TOKENID_FORMAT_MIXED_DEFAULT_NUMBER,
|
47
|
+
_LSP8_TOKENID_FORMAT_MIXED_DEFAULT_STRING,
|
48
|
+
_LSP8_TOKENID_FORMAT_MIXED_DEFAULT_ADDRESS,
|
49
|
+
_LSP8_TOKENID_FORMAT_MIXED_DEFAULT_UNIQUE_ID,
|
50
|
+
_LSP8_TOKENID_FORMAT_MIXED_DEFAULT_HASH
|
51
|
+
} from "@lukso/lsp8-contracts/contracts/LSP8Constants.sol";
|
52
|
+
```
|
53
|
+
|
54
|
+
## Typescript types
|
55
|
+
|
56
|
+
You can also import the [type-safe ABI](https://abitype.dev/) from the `/abi` path.
|
57
|
+
|
58
|
+
```ts
|
59
|
+
import {
|
60
|
+
// standard version
|
61
|
+
lsp8IdentifiableDigitalAssetAbi,
|
62
|
+
lsp8CappedSupplyAbi,
|
63
|
+
lsp8MintableAbi,
|
64
|
+
lsp8VotesAbi
|
65
|
+
// proxy version
|
66
|
+
lsp8CappedSupplyInitAbstractAbi,
|
67
|
+
lsp8IdentifiableDigitalAssetInitAbstractAbi,
|
68
|
+
lsp8MintableInitAbi,
|
69
|
+
} from '@lukso/lsp8-contracts/abi';
|
70
|
+
```
|