Commit 771a003
## Summary
- Add two new implicit attributes to the ICRC-3 certified message map
produced by `prepare_icrc3_attributes`:
- `implicit:origin` — the origin of the relying party app (UTF-8 blob),
enabling verifiers to confirm which app the attributes were issued for
- `implicit:issued_at_timestamp_ns` — the canister time at the moment of
issuance as a UTF-8 decimal string of nanoseconds since Unix epoch,
enabling verifiers to check freshness
- These join the existing `implicit:nonce` field, bringing the total
implicit fields to three
- The timestamp is passed as a parameter to
`Anchor::prepare_icrc3_attributes` (sourced from `ic_cdk::api::time()`
in the handler) to keep the method testable
## Test plan
- [x] Unit tests pass (4 prepare_icrc3 error path tests updated with new
parameters)
- [x] Integration test
`should_certify_icrc3_attributes_mixed_omit_scope` updated to assert on
all 5 map entries (email, name, nonce, origin, timestamp) and verify the
signature
- [x] `cargo check --tests` passes
< [Previous PR](dfinity#3730)
|
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 8d71a1d commit 771a003
3 files changed
Lines changed: 62 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
| 264 | + | |
| 265 | + | |
264 | 266 | | |
265 | 267 | | |
266 | 268 | | |
| |||
339 | 341 | | |
340 | 342 | | |
341 | 343 | | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
342 | 349 | | |
343 | 350 | | |
344 | 351 | | |
| |||
1611 | 1618 | | |
1612 | 1619 | | |
1613 | 1620 | | |
| 1621 | + | |
| 1622 | + | |
1614 | 1623 | | |
1615 | 1624 | | |
1616 | 1625 | | |
| |||
1646 | 1655 | | |
1647 | 1656 | | |
1648 | 1657 | | |
| 1658 | + | |
| 1659 | + | |
1649 | 1660 | | |
1650 | 1661 | | |
1651 | 1662 | | |
| |||
1677 | 1688 | | |
1678 | 1689 | | |
1679 | 1690 | | |
| 1691 | + | |
| 1692 | + | |
1680 | 1693 | | |
1681 | 1694 | | |
1682 | 1695 | | |
| |||
1705 | 1718 | | |
1706 | 1719 | | |
1707 | 1720 | | |
| 1721 | + | |
| 1722 | + | |
1708 | 1723 | | |
1709 | 1724 | | |
1710 | 1725 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1345 | 1345 | | |
1346 | 1346 | | |
1347 | 1347 | | |
1348 | | - | |
1349 | | - | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
1350 | 1351 | | |
1351 | 1352 | | |
1352 | 1353 | | |
1353 | | - | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
1354 | 1362 | | |
1355 | 1363 | | |
1356 | 1364 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
658 | 658 | | |
659 | 659 | | |
660 | 660 | | |
| 661 | + | |
| 662 | + | |
661 | 663 | | |
662 | 664 | | |
663 | 665 | | |
664 | 666 | | |
665 | 667 | | |
| 668 | + | |
| 669 | + | |
666 | 670 | | |
667 | 671 | | |
668 | 672 | | |
669 | 673 | | |
670 | 674 | | |
671 | | - | |
| 675 | + | |
672 | 676 | | |
673 | 677 | | |
674 | 678 | | |
| |||
692 | 696 | | |
693 | 697 | | |
694 | 698 | | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
695 | 730 | | |
696 | 731 | | |
697 | 732 | | |
| |||
0 commit comments