Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions config/repo-version-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"tokenStandard": "npm latest dist-tag for @canton-network/core-token-standard.",
"walletSdk": "npm latest dist-tag for @canton-network/wallet-sdk.",
"dappSdk": "npm latest dist-tag for @canton-network/dapp-sdk.",
"walletGateway": "Latest stable @canton-network/wallet-gateway-remote GitHub release from hyperledger-labs/splice-wallet-kernel.",
"walletGateway": "Latest stable @canton-network/wallet-gateway-remote GitHub release from canton-network/wallet.",
"pqs": "Read org.opencontainers.image.version from the public Artifact Registry Scribe component image europe-docker.pkg.dev/da-images/public/components/scribe:3.5. If the floating release-line tag resolves to a prerelease, retain the previous stable dashboard value.",
"minProtocolVersion": "Manual/fallback until a public live source is identified.",
"darVersions": "Latest stable package rows for splice-amulet, splice-wallet, and splice-dso-governance from the observed Splice release-line daml/dars.lock."
Expand Down Expand Up @@ -303,7 +303,7 @@
}
},
"walletGateway": {
"url": "https://github.com/hyperledger-labs/splice-wallet-kernel/releases?q=wallet-gateway-remote",
"url": "https://github.com/canton-network/wallet/releases?q=wallet-gateway-remote",
"versionMapping": {
"mainnet": {
"branch": "",
Expand Down
11 changes: 11 additions & 0 deletions config/x2mdx/daml-script/source-artifacts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"source": "Published Daml Script docs JSON from local SDK artifacts",
"publish_version": "3.5.1",
"sdk_source": "dpm",
"versions": [
"3.4.9",
"3.4.10",
"3.4.11",
"3.5.1"
]
}
4 changes: 2 additions & 2 deletions config/x2mdx/wallet-gateway-openrpc/source-artifacts.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"source": "splice-wallet-kernel Wallet Gateway OpenRPC specs from wallet-gateway-remote releases",
"release_repo": "hyperledger-labs/splice-wallet-kernel",
"remote": "https://github.com/hyperledger-labs/splice-wallet-kernel.git",
"release_repo": "canton-network/wallet",
"remote": "https://github.com/canton-network/wallet.git",
"tag_prefix": "@canton-network/wallet-gateway-remote@",
"min_version": "0.24.0",
"publish_version": "1.6.0",
Expand Down
157 changes: 64 additions & 93 deletions docs-main/appdev/reference/daml-script/daml-script-internal.mdx

Large diffs are not rendered by default.

1,132 changes: 448 additions & 684 deletions docs-main/appdev/reference/daml-script/daml-script.mdx

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ never reading that value has no effect, and so on.

Methods:

- `get : m s`
- `get` : `m` `s`
Fetch the current value of the state variable.
- `put : s -> m ()`
- `put` : `s` -> `m` ()
Set the value of the state variable.
- `modify : (s -> s) -> m ()`
- `modify` : (`s` -> `s`) -> `m` ()
Modify the state variable with the given function.
- `modify : Action m => (s -> s) -> m ()`
- `modify` : [`Action`](/appdev/reference/daml-standard-library/prelude#class-da-internal-prelude-action-68790) `m` => (`s` -> `s`) -> `m` ()

Instances:

- `instance ActionState s (State s)`
- instance [`ActionState`](#class-da-action-state-class-actionstate-80467) `s` ([`State`](/appdev/reference/daml-standard-library/da-action-state#type-da-action-state-type-state-76783) `s`)
Original file line number Diff line number Diff line change
Expand Up @@ -60,47 +60,42 @@ Constructors:

<span id="constr-da-action-state-type-state-26"></span>
- `State`
| Field | Type | Description |
| :---- | :--- | :---------- |
| runState | s -> (a, s) | |

<ResponseField name="runState" type="s -&gt; (a, s)" />

Instances:

- `instance ActionState s (State s)`
- `instance Action (State s)`
- `instance Applicative (State s)`
- `instance GetField runState (State s a) (s -> (a, s))`
- `instance SetField runState (State s a) (s -> (a, s))`
- `instance Functor (State s)`
- instance [`ActionState`](/appdev/reference/daml-standard-library/da-action-state-class#class-da-action-state-class-actionstate-80467) `s` ([`State`](#type-da-action-state-type-state-76783) `s`)
- instance [`Action`](/appdev/reference/daml-standard-library/prelude#class-da-internal-prelude-action-68790) ([`State`](#type-da-action-state-type-state-76783) `s`)
- instance [`Applicative`](/appdev/reference/daml-standard-library/prelude#class-da-internal-prelude-applicative-9257) ([`State`](#type-da-action-state-type-state-76783) `s`)
- instance [`GetField`](/appdev/reference/daml-standard-library/da-record#class-da-internal-record-getfield-53979) `runState` ([`State`](#type-da-action-state-type-state-76783) `s` `a`) (`s` -> (`a`, `s`))
- instance [`SetField`](/appdev/reference/daml-standard-library/da-record#class-da-internal-record-setfield-4311) `runState` ([`State`](#type-da-action-state-type-state-76783) `s` `a`) (`s` -> (`a`, `s`))
- instance [`Functor`](/appdev/reference/daml-standard-library/prelude#class-ghc-base-functor-31205) ([`State`](#type-da-action-state-type-state-76783) `s`)

## Functions

<span id="function-da-action-state-evalstate-95640"></span>

### `evalState`

```daml
evalState : State s a -> s -> a
```
`evalState` : [`State`](#type-da-action-state-type-state-76783) `s` `a` -> `s` -> `a`

Special case of `runState` that does not return the final state.

<span id="function-da-action-state-execstate-48251"></span>

### `execState`

```daml
execState : State s a -> s -> s
```
`execState` : [`State`](#type-da-action-state-type-state-76783) `s` `a` -> `s` -> `s`

Special case of `runState` that does only retun the final state.

## Orphan Typeclass Instances

- `instance Functor (State s)`
- instance [`Functor`](/appdev/reference/daml-standard-library/prelude#class-ghc-base-functor-31205) ([`State`](#type-da-action-state-type-state-76783) `s`)

- `instance Applicative (State s)`
- instance [`Applicative`](/appdev/reference/daml-standard-library/prelude#class-da-internal-prelude-applicative-9257) ([`State`](#type-da-action-state-type-state-76783) `s`)

- `instance Action (State s)`
- instance [`Action`](/appdev/reference/daml-standard-library/prelude#class-da-internal-prelude-action-68790) ([`State`](#type-da-action-state-type-state-76783) `s`)

- `instance ActionState s (State s)`
- instance [`ActionState`](/appdev/reference/daml-standard-library/da-action-state-class#class-da-action-state-class-actionstate-80467) `s` ([`State`](#type-da-action-state-type-state-76783) `s`)
44 changes: 11 additions & 33 deletions docs-main/appdev/reference/daml-standard-library/da-action.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ Deprecated since: `-`

### `when`

```daml
when : Applicative f => Bool -> f () -> f ()
```
`when` : [`Applicative`](/appdev/reference/daml-standard-library/prelude#class-da-internal-prelude-applicative-9257) `f` => [`Bool`](/appdev/reference/daml-standard-library/prelude#type-ghc-types-bool-66265) -> `f` () -> `f` ()

Conditional execution of `Action` expressions. For example,
```
Expand All @@ -50,9 +48,7 @@ is not evaluated at all.

### `unless`

```daml
unless : Applicative f => Bool -> f () -> f ()
```
`unless` : [`Applicative`](/appdev/reference/daml-standard-library/prelude#class-da-internal-prelude-applicative-9257) `f` => [`Bool`](/appdev/reference/daml-standard-library/prelude#type-ghc-types-bool-66265) -> `f` () -> `f` ()

The reverse of `when`.

Expand All @@ -64,9 +60,7 @@ is not evaluated at all.

### `foldrA`

```daml
foldrA : Action m => (a -> b -> m b) -> b -> [a] -> m b
```
`foldrA` : [`Action`](/appdev/reference/daml-standard-library/prelude#class-da-internal-prelude-action-68790) `m` => (`a` -> `b` -> `m` `b`) -> `b` -> [`a`] -> `m` `b`

The `foldrA` is analogous to `foldr`, except that its result is
encapsulated in an action. Note that `foldrA` works from right-to-left
Expand All @@ -76,9 +70,7 @@ over the list arguments.

### `foldr1A`

```daml
foldr1A : Action m => (a -> a -> m a) -> [a] -> m a
```
`foldr1A` : [`Action`](/appdev/reference/daml-standard-library/prelude#class-da-internal-prelude-action-68790) `m` => (`a` -> `a` -> `m` `a`) -> [`a`] -> `m` `a`

`foldr1A` is like `foldrA` but raises an error when presented
with an empty list argument.
Expand All @@ -87,9 +79,7 @@ with an empty list argument.

### `foldlA`

```daml
foldlA : Action m => (b -> a -> m b) -> b -> [a] -> m b
```
`foldlA` : [`Action`](/appdev/reference/daml-standard-library/prelude#class-da-internal-prelude-action-68790) `m` => (`b` -> `a` -> `m` `b`) -> `b` -> [`a`] -> `m` `b`

`foldlA` is analogous to `foldl`, except that its result is
encapsulated in an action. Note that `foldlA` works from
Expand All @@ -99,9 +89,7 @@ left-to-right over the list arguments.

### `foldl1A`

```daml
foldl1A : Action m => (a -> a -> m a) -> [a] -> m a
```
`foldl1A` : [`Action`](/appdev/reference/daml-standard-library/prelude#class-da-internal-prelude-action-68790) `m` => (`a` -> `a` -> `m` `a`) -> [`a`] -> `m` `a`

The `foldl1A` is like `foldlA` but raises an errors when
presented with an empty list argument.
Expand All @@ -110,9 +98,7 @@ presented with an empty list argument.

### `filterA`

```daml
filterA : Applicative m => (a -> m Bool) -> [a] -> m [a]
```
`filterA` : [`Applicative`](/appdev/reference/daml-standard-library/prelude#class-da-internal-prelude-applicative-9257) `m` => (`a` -> `m` [`Bool`](/appdev/reference/daml-standard-library/prelude#type-ghc-types-bool-66265)) -> [`a`] -> `m` [`a`]

Filters the list using the applicative function: keeps only the elements where the predicate holds.
Example: given a collection of Iou contract IDs one can find only the GBPs.
Expand All @@ -125,9 +111,7 @@ filterA (fmap (\iou -> iou.currency == "GBP") . fetch) iouCids

### `replicateA`

```daml
replicateA : Applicative m => Int -> m a -> m [a]
```
`replicateA` : [`Applicative`](/appdev/reference/daml-standard-library/prelude#class-da-internal-prelude-applicative-9257) `m` => [`Int`](/appdev/reference/daml-standard-library/prelude#type-ghc-types-int-37261) -> `m` `a` -> `m` [`a`]

`replicateA n act` performs the action `n` times, gathering the
results.
Expand All @@ -136,29 +120,23 @@ results.

### `replicateA_`

```daml
replicateA_ : Applicative m => Int -> m a -> m ()
```
`replicateA_` : [`Applicative`](/appdev/reference/daml-standard-library/prelude#class-da-internal-prelude-applicative-9257) `m` => [`Int`](/appdev/reference/daml-standard-library/prelude#type-ghc-types-int-37261) -> `m` `a` -> `m` ()

Like `replicateA`, but discards the result.

<span id="function-da-action-gteqgt-60955"></span>

### `>=>`

```daml
>=> : Action m => (a -> m b) -> (b -> m c) -> a -> m c
```
`>=>` : [`Action`](/appdev/reference/daml-standard-library/prelude#class-da-internal-prelude-action-68790) `m` => (`a` -> `m` `b`) -> (`b` -> `m` `c`) -> `a` -> `m` `c`

Left-to-right composition of Kleisli arrows.

<span id="function-da-action-lteqlt-31871"></span>

### `<=<`

```daml
<=< : Action m => (b -> m c) -> (a -> m b) -> a -> m c
```
`<=<` : [`Action`](/appdev/reference/daml-standard-library/prelude#class-da-internal-prelude-action-68790) `m` => (`b` -> `m` `c`) -> (`a` -> `m` `b`) -> `a` -> `m` `c`

Right-to-left composition of Kleisli arrows. @('>=>')@, with the arguments
flipped.
32 changes: 8 additions & 24 deletions docs-main/appdev/reference/daml-standard-library/da-assert.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ Deprecated since: `-`

### `assertEq`

```daml
assertEq : (CanAssert m, Show a, Eq a) => a -> a -> m ()
```
`assertEq` : ([`CanAssert`](/appdev/reference/daml-standard-library/prelude#class-da-internal-assert-canassert-67323) `m`, [`Show`](/appdev/reference/daml-standard-library/prelude#class-ghc-show-show-65360) `a`, [`Eq`](/appdev/reference/daml-standard-library/prelude#class-ghc-classes-eq-22713) `a`) => `a` -> `a` -> `m` ()

Check two values for equality. If they're not equal,
fail with a message.
Expand All @@ -40,19 +38,15 @@ fail with a message.

### `===`

```daml
=== : (CanAssert m, Show a, Eq a) => a -> a -> m ()
```
`===` : ([`CanAssert`](/appdev/reference/daml-standard-library/prelude#class-da-internal-assert-canassert-67323) `m`, [`Show`](/appdev/reference/daml-standard-library/prelude#class-ghc-show-show-65360) `a`, [`Eq`](/appdev/reference/daml-standard-library/prelude#class-ghc-classes-eq-22713) `a`) => `a` -> `a` -> `m` ()

Infix version of `assertEq`.

<span id="function-da-assert-assertnoteq-28771"></span>

### `assertNotEq`

```daml
assertNotEq : (CanAssert m, Show a, Eq a) => a -> a -> m ()
```
`assertNotEq` : ([`CanAssert`](/appdev/reference/daml-standard-library/prelude#class-da-internal-assert-canassert-67323) `m`, [`Show`](/appdev/reference/daml-standard-library/prelude#class-ghc-show-show-65360) `a`, [`Eq`](/appdev/reference/daml-standard-library/prelude#class-ghc-classes-eq-22713) `a`) => `a` -> `a` -> `m` ()

Check two values for inequality. If they're equal,
fail with a message.
Expand All @@ -61,19 +55,15 @@ fail with a message.

### `=/=`

```daml
=/= : (CanAssert m, Show a, Eq a) => a -> a -> m ()
```
`=/=` : ([`CanAssert`](/appdev/reference/daml-standard-library/prelude#class-da-internal-assert-canassert-67323) `m`, [`Show`](/appdev/reference/daml-standard-library/prelude#class-ghc-show-show-65360) `a`, [`Eq`](/appdev/reference/daml-standard-library/prelude#class-ghc-classes-eq-22713) `a`) => `a` -> `a` -> `m` ()

Infix version of `assertNotEq`.

<span id="function-da-assert-assertaftermsg-14090"></span>

### `assertAfterMsg`

```daml
assertAfterMsg : (CanAssert m, HasTime m) => Text -> Time -> m ()
```
`assertAfterMsg` : ([`CanAssert`](/appdev/reference/daml-standard-library/prelude#class-da-internal-assert-canassert-67323) `m`, [`HasTime`](/appdev/reference/daml-standard-library/prelude#class-da-internal-lf-hastime-96546) `m`) => [`Text`](/appdev/reference/daml-standard-library/prelude#type-ghc-types-text-51952) -> [`Time`](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-time-63886) -> `m` ()

Check whether the given time is in the future. If it's not,
abort with a message.
Expand All @@ -82,9 +72,7 @@ abort with a message.

### `assertBeforeMsg`

```daml
assertBeforeMsg : (CanAssert m, HasTime m) => Text -> Time -> m ()
```
`assertBeforeMsg` : ([`CanAssert`](/appdev/reference/daml-standard-library/prelude#class-da-internal-assert-canassert-67323) `m`, [`HasTime`](/appdev/reference/daml-standard-library/prelude#class-da-internal-lf-hastime-96546) `m`) => [`Text`](/appdev/reference/daml-standard-library/prelude#type-ghc-types-text-51952) -> [`Time`](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-time-63886) -> `m` ()

Check whether the given time is in the past. If it's not,
abort with a message.
Expand All @@ -93,9 +81,7 @@ abort with a message.

### `assertWithinDeadline`

```daml
assertWithinDeadline : Text -> Time -> Update ()
```
`assertWithinDeadline` : [`Text`](/appdev/reference/daml-standard-library/prelude#type-ghc-types-text-51952) -> [`Time`](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-time-63886) -> [`Update`](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-update-68072) ()

Check whether the ledger time of the transaction is strictly before the given deadline.
If it's not, abort with a message.
Expand All @@ -104,9 +90,7 @@ If it's not, abort with a message.

### `assertDeadlineExceeded`

```daml
assertDeadlineExceeded : Text -> Time -> Update ()
```
`assertDeadlineExceeded` : [`Text`](/appdev/reference/daml-standard-library/prelude#type-ghc-types-text-51952) -> [`Time`](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-time-63886) -> [`Update`](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-update-68072) ()

Check whether the ledger time of the transaction is at or after the given deadline.
If it's not, abort with a message.
20 changes: 10 additions & 10 deletions docs-main/appdev/reference/daml-standard-library/da-bifunctor.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ second (f . g) ≡ second f . second g

Methods:

- `bimap : (a -> b) -> (c -> d) -> p a c -> p b d`
- `bimap` : (`a` -> `b`) -> (`c` -> `d`) -> `p` `a` `c` -> `p` `b` `d`
Map over both arguments at the same time.

```daml-force
Expand All @@ -94,7 +94,7 @@ Methods:
>>> bimap not (+1) (Right 3)
Right 4
```
- `first : (a -> b) -> p a c -> p b c`
- `first` : (`a` -> `b`) -> `p` `a` `c` -> `p` `b` `c`
Map covariantly over the first argument.

```daml-force
Expand All @@ -110,7 +110,7 @@ Methods:
>>> first not (Left True : Either Bool Int)
Left False
```
- `second : (b -> c) -> p a b -> p a c`
- `second` : (`b` -> `c`) -> `p` `a` `b` -> `p` `a` `c`
Map covariantly over the second argument.

```daml-force
Expand All @@ -129,10 +129,10 @@ Methods:

Instances:

- `instance Bifunctor Either`
- `instance Bifunctor ()`
- `instance Bifunctor x1`
- `instance Bifunctor (x1, x2)`
- `instance Bifunctor (x1, x2, x3)`
- `instance Bifunctor (x1, x2, x3, x4)`
- `instance Bifunctor (x1, x2, x3, x4, x5)`
- instance [`Bifunctor`](#class-da-bifunctor-bifunctor-68312) [`Either`](/appdev/reference/daml-standard-library/prelude#type-da-types-either-56020)
- instance [`Bifunctor`](#class-da-bifunctor-bifunctor-68312) ()
- instance [`Bifunctor`](#class-da-bifunctor-bifunctor-68312) `x1`
- instance [`Bifunctor`](#class-da-bifunctor-bifunctor-68312) (`x1`, `x2`)
- instance [`Bifunctor`](#class-da-bifunctor-bifunctor-68312) (`x1`, `x2`, `x3`)
- instance [`Bifunctor`](#class-da-bifunctor-bifunctor-68312) (`x1`, `x2`, `x3`, `x4`)
- instance [`Bifunctor`](#class-da-bifunctor-bifunctor-68312) (`x1`, `x2`, `x3`, `x4`, `x5`)
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ Deprecated since: `-`

### `lookupNByKey`

```daml
lookupNByKey : HasLookupNByKey t k => Int -> k -> Update [(ContractId t, t)]
```
`lookupNByKey` : [`HasLookupNByKey`](/appdev/reference/daml-standard-library/prelude#class-da-internal-template-functions-haslookupnbykey-35508) `t` `k` => [`Int`](/appdev/reference/daml-standard-library/prelude#type-ghc-types-int-37261) -> `k` -> [`Update`](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-update-68072) [([`ContractId`](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-contractid-95282) `t`, `t`)]

Look up up to n contracts associated with the passed key. Contracts created
within a transaction are returned first (in recency order), then disclosed
Expand All @@ -47,9 +45,7 @@ must call `lookupNByKey @Account 3 k.

### `lookupAllByKey`

```daml
lookupAllByKey : HasLookupNByKey t k => k -> Update [(ContractId t, t)]
```
`lookupAllByKey` : [`HasLookupNByKey`](/appdev/reference/daml-standard-library/prelude#class-da-internal-template-functions-haslookupnbykey-35508) `t` `k` => `k` -> [`Update`](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-update-68072) [([`ContractId`](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-contractid-95282) `t`, `t`)]

Shorthand for `lookupNByKey` with n larger than the amount of contracts that
can exist for a key (1000000), therefore returning all contracts
Loading