@pbgtoken/rwa-contract 1.0.0

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.
@@ -0,0 +1,203 @@
1
+ import type { IntLike } from "@helios-lang/codec-utils";
2
+ import type { Cast, CastConfig, UserFunc } from "@helios-lang/contract-utils";
3
+ import type { Address, AssetClass, MintingPolicyHash, PubKeyHash, ScriptHash, TxInput, TxOutputId } from "@helios-lang/ledger";
4
+ import type { UplcData, UplcProgram } from "@helios-lang/uplc";
5
+ export declare const tokenized_account: {
6
+ $name: "tokenized_account";
7
+ $purpose: "mixed";
8
+ $currentScriptIndex: 0;
9
+ $sourceCode: string;
10
+ $dependencies: readonly [];
11
+ $hashDependencies: never[];
12
+ $dependsOnOwnHash: boolean;
13
+ $Redeemer: (config: CastConfig) => Cast<{
14
+ Other: {
15
+ redeemer: UplcData;
16
+ };
17
+ } | {
18
+ Spending: {
19
+ redeemer: UplcData;
20
+ };
21
+ }, {
22
+ Other: {
23
+ redeemer: UplcData;
24
+ };
25
+ } | {
26
+ Spending: {
27
+ redeemer: UplcData;
28
+ };
29
+ }>;
30
+ $Datum: (config: CastConfig) => Cast<UplcData, UplcData>;
31
+ $types: {
32
+ State: (config: CastConfig) => Cast<{
33
+ current_supply: bigint;
34
+ supply_after_last_mint: bigint;
35
+ transfer_id_before_last_mint: number[];
36
+ type: string;
37
+ account: number[];
38
+ name: string;
39
+ description: string;
40
+ decimals: bigint;
41
+ ticker: string;
42
+ url: string;
43
+ logo: string;
44
+ }, {
45
+ current_supply: IntLike;
46
+ supply_after_last_mint: IntLike;
47
+ transfer_id_before_last_mint: number[];
48
+ type: string;
49
+ account: number[];
50
+ name: string;
51
+ description: string;
52
+ decimals: IntLike;
53
+ ticker: string;
54
+ url: string;
55
+ logo: string;
56
+ }>;
57
+ Cip68Extra: (config: CastConfig) => Cast<{
58
+ Unused: {};
59
+ }, {
60
+ Unused: {};
61
+ }>;
62
+ Metadata: (config: CastConfig) => Cast<{
63
+ Cip68: {
64
+ state: {
65
+ current_supply: bigint;
66
+ supply_after_last_mint: bigint;
67
+ transfer_id_before_last_mint: number[];
68
+ type: string;
69
+ account: number[];
70
+ name: string;
71
+ description: string;
72
+ decimals: bigint;
73
+ ticker: string;
74
+ url: string;
75
+ logo: string;
76
+ };
77
+ version: bigint;
78
+ extra: {
79
+ Unused: {};
80
+ };
81
+ };
82
+ }, {
83
+ Cip68: {
84
+ state: {
85
+ current_supply: IntLike;
86
+ supply_after_last_mint: IntLike;
87
+ transfer_id_before_last_mint: number[];
88
+ type: string;
89
+ account: number[];
90
+ name: string;
91
+ description: string;
92
+ decimals: IntLike;
93
+ ticker: string;
94
+ url: string;
95
+ logo: string;
96
+ };
97
+ version: IntLike;
98
+ extra: {
99
+ Unused: {};
100
+ };
101
+ };
102
+ }>;
103
+ Redeemer: (config: CastConfig) => Cast<{
104
+ total_reserves: number;
105
+ reserves_change: number;
106
+ latest_transfer_id: number[];
107
+ }, {
108
+ total_reserves: number;
109
+ reserves_change: number;
110
+ latest_transfer_id: number[];
111
+ }>;
112
+ };
113
+ $functions: {
114
+ "Metadata::state": (uplc: UplcProgram, config: CastConfig) => UserFunc<{
115
+ self: {
116
+ Cip68: {
117
+ state: {
118
+ current_supply: IntLike;
119
+ supply_after_last_mint: IntLike;
120
+ transfer_id_before_last_mint: number[];
121
+ type: string;
122
+ account: number[];
123
+ name: string;
124
+ description: string;
125
+ decimals: IntLike;
126
+ ticker: string;
127
+ url: string;
128
+ logo: string;
129
+ };
130
+ version: IntLike;
131
+ extra: {
132
+ Unused: {};
133
+ };
134
+ };
135
+ };
136
+ }, {
137
+ current_supply: bigint;
138
+ supply_after_last_mint: bigint;
139
+ transfer_id_before_last_mint: number[];
140
+ type: string;
141
+ account: number[];
142
+ name: string;
143
+ description: string;
144
+ decimals: bigint;
145
+ ticker: string;
146
+ url: string;
147
+ logo: string;
148
+ }>;
149
+ SEED_ID: (uplc: UplcProgram, config: CastConfig) => UserFunc<{}, TxOutputId>;
150
+ ORACLE_KEYS: (uplc: UplcProgram, config: CastConfig) => UserFunc<{}, PubKeyHash[]>;
151
+ INITIAL_PRICE: (uplc: UplcProgram, config: CastConfig) => UserFunc<{}, number>;
152
+ TYPE: (uplc: UplcProgram, config: CastConfig) => UserFunc<{}, string>;
153
+ ACCOUNT: (uplc: UplcProgram, config: CastConfig) => UserFunc<{}, number[]>;
154
+ TICKER: (uplc: UplcProgram, config: CastConfig) => UserFunc<{}, string>;
155
+ NAME: (uplc: UplcProgram, config: CastConfig) => UserFunc<{}, string>;
156
+ DESCRIPTION: (uplc: UplcProgram, config: CastConfig) => UserFunc<{}, string>;
157
+ DECIMALS: (uplc: UplcProgram, config: CastConfig) => UserFunc<{}, bigint>;
158
+ URL: (uplc: UplcProgram, config: CastConfig) => UserFunc<{}, string>;
159
+ LOGO: (uplc: UplcProgram, config: CastConfig) => UserFunc<{}, string>;
160
+ ticker_bytes: (uplc: UplcProgram, config: CastConfig) => UserFunc<{}, number[]>;
161
+ user_token_name: (uplc: UplcProgram, config: CastConfig) => UserFunc<{}, number[]>;
162
+ ref_token_name: (uplc: UplcProgram, config: CastConfig) => UserFunc<{}, number[]>;
163
+ own_hash: (uplc: UplcProgram, config: CastConfig) => UserFunc<{}, ScriptHash>;
164
+ own_mph: (uplc: UplcProgram, config: CastConfig) => UserFunc<{}, MintingPolicyHash>;
165
+ own_address: (uplc: UplcProgram, config: CastConfig) => UserFunc<{}, Address>;
166
+ ref_token_asset_class: (uplc: UplcProgram, config: CastConfig) => UserFunc<{}, AssetClass>;
167
+ user_token_asset_class: (uplc: UplcProgram, config: CastConfig) => UserFunc<{}, AssetClass>;
168
+ validate_initialization: (uplc: UplcProgram, config: CastConfig) => UserFunc<{
169
+ $scriptContext: UplcData;
170
+ }, void>;
171
+ signed_by_quorum: (uplc: UplcProgram, config: CastConfig) => UserFunc<{
172
+ $scriptContext: UplcData;
173
+ }, boolean>;
174
+ calc_token_price: (uplc: UplcProgram, config: CastConfig) => UserFunc<{
175
+ R: number;
176
+ Delta: number;
177
+ current_supply: IntLike;
178
+ supply_after_last_mint: IntLike;
179
+ }, number>;
180
+ validate_state_change: (uplc: UplcProgram, config: CastConfig) => UserFunc<{
181
+ $scriptContext: UplcData;
182
+ redeemer: {
183
+ total_reserves: number;
184
+ reserves_change: number;
185
+ latest_transfer_id: number[];
186
+ };
187
+ input: TxInput;
188
+ }, void>;
189
+ main: (uplc: UplcProgram, config: CastConfig) => UserFunc<{
190
+ $scriptContext: UplcData;
191
+ $datum?: UplcData;
192
+ args: {
193
+ Other: {
194
+ redeemer: UplcData;
195
+ };
196
+ } | {
197
+ Spending: {
198
+ redeemer: UplcData;
199
+ };
200
+ };
201
+ }, void>;
202
+ };
203
+ };
package/package.json ADDED
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "@pbgtoken/rwa-contract",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "main": "./dist/index.js",
6
+ "types": "./dist/index.d.ts",
7
+ "type": "module",
8
+ "license": "AGPL-version-3.0",
9
+ "private": false,
10
+ "engines": {
11
+ "node": ">= 14.0.0",
12
+ "npm": ">= 6.0.0"
13
+ },
14
+ "homepage": "https://pbg.io",
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "https://github.com/PBGToken/rwa-contract"
18
+ },
19
+ "bugs": "",
20
+ "keywords": [],
21
+ "author": {
22
+ "name": "Christian Schmitz",
23
+ "email": "cschmitz398@gmail.com",
24
+ "url": "https://github.com/christianschmitz"
25
+ },
26
+ "scripts": {
27
+ "build": "npm run build:validators && npm run build:types && npm run build:bundle",
28
+ "build:bundle": "node ./esbuild.js",
29
+ "build:types": "npx tsc --declaration --emitDeclarationOnly",
30
+ "build:validators": "npx hl2ts --out-dir ./src/validators"
31
+ },
32
+ "dependencies": {
33
+ "@helios-lang/codec-utils": "^0.3.4",
34
+ "@helios-lang/compiler": "^0.17.22",
35
+ "@helios-lang/contract-utils": "^0.3.17",
36
+ "@helios-lang/ledger": "^0.7.11",
37
+ "@helios-lang/tx-utils": "^0.6.13",
38
+ "@helios-lang/type-utils": "^0.3.0",
39
+ "esbuild": "^0.25.4",
40
+ "typescript": "^5.8.3"
41
+ }
42
+ }