pyre-world-kit 2.0.0 → 2.0.1
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/dist/pyre_world.json +23 -1
- package/dist/registry.js +4 -0
- package/dist/types.d.ts +4 -0
- package/package.json +1 -1
- package/src/pyre_world.json +23 -1
- package/src/registry.ts +4 -0
- package/src/types.ts +4 -0
package/dist/pyre_world.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"address": "2oai1EaDnFcSNskyVwSbGkUEddxxfUSsSVRokE31gRfv",
|
|
3
3
|
"metadata": {
|
|
4
4
|
"name": "pyre_world",
|
|
5
|
-
"version": "0.1
|
|
5
|
+
"version": "1.0.1",
|
|
6
6
|
"spec": "0.1.0",
|
|
7
7
|
"description": "pyre.world agent registry"
|
|
8
8
|
},
|
|
@@ -588,6 +588,20 @@
|
|
|
588
588
|
"PDA bump"
|
|
589
589
|
],
|
|
590
590
|
"type": "u8"
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
"name": "total_sol_spent",
|
|
594
|
+
"docs": [
|
|
595
|
+
"Cumulative SOL spent on joins/buys/infiltrates (lamports)"
|
|
596
|
+
],
|
|
597
|
+
"type": "u64"
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
"name": "total_sol_received",
|
|
601
|
+
"docs": [
|
|
602
|
+
"Cumulative SOL received from defects/sells (lamports)"
|
|
603
|
+
],
|
|
604
|
+
"type": "u64"
|
|
591
605
|
}
|
|
592
606
|
]
|
|
593
607
|
}
|
|
@@ -698,6 +712,14 @@
|
|
|
698
712
|
{
|
|
699
713
|
"name": "personality_summary",
|
|
700
714
|
"type": "string"
|
|
715
|
+
},
|
|
716
|
+
{
|
|
717
|
+
"name": "total_sol_spent",
|
|
718
|
+
"type": "u64"
|
|
719
|
+
},
|
|
720
|
+
{
|
|
721
|
+
"name": "total_sol_received",
|
|
722
|
+
"type": "u64"
|
|
701
723
|
}
|
|
702
724
|
]
|
|
703
725
|
}
|
package/dist/registry.js
CHANGED
|
@@ -84,6 +84,8 @@ async function getRegistryProfile(connection, creator) {
|
|
|
84
84
|
tithes: account.tithes.toNumber(),
|
|
85
85
|
created_at: account.createdAt.toNumber(),
|
|
86
86
|
bump: account.bump,
|
|
87
|
+
total_sol_spent: account.totalSolSpent?.toNumber() ?? 0,
|
|
88
|
+
total_sol_received: account.totalSolReceived?.toNumber() ?? 0,
|
|
87
89
|
};
|
|
88
90
|
}
|
|
89
91
|
catch {
|
|
@@ -154,6 +156,8 @@ async function buildCheckpointTransaction(connection, params) {
|
|
|
154
156
|
razes: new anchor_1.BN(params.razes),
|
|
155
157
|
tithes: new anchor_1.BN(params.tithes),
|
|
156
158
|
personalitySummary: params.personality_summary,
|
|
159
|
+
totalSolSpent: new anchor_1.BN(params.total_sol_spent),
|
|
160
|
+
totalSolReceived: new anchor_1.BN(params.total_sol_received),
|
|
157
161
|
};
|
|
158
162
|
const tx = new web3_js_1.Transaction();
|
|
159
163
|
const ix = await program.methods.checkpoint(args)
|
package/dist/types.d.ts
CHANGED
|
@@ -413,6 +413,8 @@ export interface RegistryProfile {
|
|
|
413
413
|
tithes: number;
|
|
414
414
|
created_at: number;
|
|
415
415
|
bump: number;
|
|
416
|
+
total_sol_spent: number;
|
|
417
|
+
total_sol_received: number;
|
|
416
418
|
}
|
|
417
419
|
/** On-chain wallet link from pyre_world registry */
|
|
418
420
|
export interface RegistryWalletLink {
|
|
@@ -441,6 +443,8 @@ export interface CheckpointParams {
|
|
|
441
443
|
razes: number;
|
|
442
444
|
tithes: number;
|
|
443
445
|
personality_summary: string;
|
|
446
|
+
total_sol_spent: number;
|
|
447
|
+
total_sol_received: number;
|
|
444
448
|
}
|
|
445
449
|
/** Params for registering a new agent */
|
|
446
450
|
export interface RegisterAgentParams {
|
package/package.json
CHANGED
package/src/pyre_world.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"address": "2oai1EaDnFcSNskyVwSbGkUEddxxfUSsSVRokE31gRfv",
|
|
3
3
|
"metadata": {
|
|
4
4
|
"name": "pyre_world",
|
|
5
|
-
"version": "0.1
|
|
5
|
+
"version": "1.0.1",
|
|
6
6
|
"spec": "0.1.0",
|
|
7
7
|
"description": "pyre.world agent registry"
|
|
8
8
|
},
|
|
@@ -588,6 +588,20 @@
|
|
|
588
588
|
"PDA bump"
|
|
589
589
|
],
|
|
590
590
|
"type": "u8"
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
"name": "total_sol_spent",
|
|
594
|
+
"docs": [
|
|
595
|
+
"Cumulative SOL spent on joins/buys/infiltrates (lamports)"
|
|
596
|
+
],
|
|
597
|
+
"type": "u64"
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
"name": "total_sol_received",
|
|
601
|
+
"docs": [
|
|
602
|
+
"Cumulative SOL received from defects/sells (lamports)"
|
|
603
|
+
],
|
|
604
|
+
"type": "u64"
|
|
591
605
|
}
|
|
592
606
|
]
|
|
593
607
|
}
|
|
@@ -698,6 +712,14 @@
|
|
|
698
712
|
{
|
|
699
713
|
"name": "personality_summary",
|
|
700
714
|
"type": "string"
|
|
715
|
+
},
|
|
716
|
+
{
|
|
717
|
+
"name": "total_sol_spent",
|
|
718
|
+
"type": "u64"
|
|
719
|
+
},
|
|
720
|
+
{
|
|
721
|
+
"name": "total_sol_received",
|
|
722
|
+
"type": "u64"
|
|
701
723
|
}
|
|
702
724
|
]
|
|
703
725
|
}
|
package/src/registry.ts
CHANGED
|
@@ -113,6 +113,8 @@ export async function getRegistryProfile(
|
|
|
113
113
|
tithes: account.tithes.toNumber(),
|
|
114
114
|
created_at: account.createdAt.toNumber(),
|
|
115
115
|
bump: account.bump,
|
|
116
|
+
total_sol_spent: account.totalSolSpent?.toNumber() ?? 0,
|
|
117
|
+
total_sol_received: account.totalSolReceived?.toNumber() ?? 0,
|
|
116
118
|
};
|
|
117
119
|
} catch {
|
|
118
120
|
return null;
|
|
@@ -199,6 +201,8 @@ export async function buildCheckpointTransaction(
|
|
|
199
201
|
razes: new BN(params.razes),
|
|
200
202
|
tithes: new BN(params.tithes),
|
|
201
203
|
personalitySummary: params.personality_summary,
|
|
204
|
+
totalSolSpent: new BN(params.total_sol_spent),
|
|
205
|
+
totalSolReceived: new BN(params.total_sol_received),
|
|
202
206
|
};
|
|
203
207
|
|
|
204
208
|
const tx = new Transaction();
|
package/src/types.ts
CHANGED
|
@@ -497,6 +497,8 @@ export interface RegistryProfile {
|
|
|
497
497
|
tithes: number;
|
|
498
498
|
created_at: number;
|
|
499
499
|
bump: number;
|
|
500
|
+
total_sol_spent: number;
|
|
501
|
+
total_sol_received: number;
|
|
500
502
|
}
|
|
501
503
|
|
|
502
504
|
/** On-chain wallet link from pyre_world registry */
|
|
@@ -527,6 +529,8 @@ export interface CheckpointParams {
|
|
|
527
529
|
razes: number;
|
|
528
530
|
tithes: number;
|
|
529
531
|
personality_summary: string;
|
|
532
|
+
total_sol_spent: number;
|
|
533
|
+
total_sol_received: number;
|
|
530
534
|
}
|
|
531
535
|
|
|
532
536
|
/** Params for registering a new agent */
|