Skip to content

Commit

Permalink
Update StarknetTypedData docs (SNIP-12) (#181)
Browse files Browse the repository at this point in the history
  • Loading branch information
DelevoXDG authored Apr 8, 2024
1 parent 00b7939 commit a26019a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Sources/Starknet/Data/TypedData/StarknetTypedData.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,17 @@ public enum StarknetTypedDataError: Error, Equatable {
case encodingError
}

/// Sign message for off-chain usage. Follows standard proposed [here](https://github.com/argentlabs/argent-x/discussions/14)
/// Sign message for off-chain usage. Follows standard proposed [here](https://github.com/starknet-io/SNIPs/blob/main/SNIPS/snip-12.md)
///
/// ```swift
/// let typedDataString = """
/// {
/// "types": {
/// "StarkNetDomain": [
/// {"name": "name", "type": "felt"},
/// {"name": "version", "type": "felt"},
/// {"name": "chainId", "type": "felt"},
/// {"name": "name", "type": "shortstring"},
/// {"name": "version", "type": "shortstring"},
/// {"name": "chainId", "type": "shortstring"},
/// {"name": "revision", "type": "shortstring"}
/// ],
/// "Person": [
/// {"name": "name", "type": "felt"},
Expand All @@ -49,7 +50,7 @@ public enum StarknetTypedDataError: Error, Equatable {
/// ],
/// },
/// "primaryType": "Mail",
/// "domain": {"name": "StarkNet Mail", "version": "1", "chainId": 1},
/// "domain": {"name": "StarkNet Mail", "version": "1", "chainId": "1", "revision": 1},
/// "message": {
/// "from": {
/// "name": "Cow",
Expand Down

0 comments on commit a26019a

Please sign in to comment.