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
123 changes: 122 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,119 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [v3.0.4] - 2026-08-04

### Added

- Pusher channel authorization: the `AuthenticatePusherSocket(id)` mutation, plus the
`PusherSocketAuth` model and `PusherSocketAuthQueryBuilder`. Authorizes the current user to
subscribe to a private Pusher channel; this SDK still ships no event-subscription transport of its
own.
- `Transaction.FailedItemIndexes` — zero-based positions of batch items that failed to dispatch while
the extrinsic itself finalized (`CONTINUE_ON_ERROR` batches only).
- `freezeState` on `CreateTokenInput` and `CreateTokenEntryInput`, to create a token already frozen.
- `idempotencyPrefix` on the `SweepManagedWallet` mutation; each chunk is keyed as `{prefix}-{n}`.
- `CompatibleFuelTank.Address` (the tank account address) and `CompatibleFuelTank.AvailableBudget`
(the amount available to fund this transaction, expressed as ENJ).

### Changed

- **Breaking:** `GetCompatibleFuelTanks` no longer takes `pallet` and `method`. It now takes
`transactions: [TransactionInput]` and `batchMode: BatchTransactionModeEnum`, so compatibility is
evaluated against the encoded calls.
- **Breaking:** `infusion` on `CreateTokenInput` / `CreateTokenEntryInput` retyped from
`System.Numerics.BigInteger` to `string`, and `unitPrice` on `MintTokenInput` /
`MintTokenEntryInput` from `BigInteger?` to `string?`. Both now take decimal or integer ENJ
(e.g. `"1.5"`), converted to base units on-chain.
- **Breaking:** `FuelTankRuleSet.WhitelistedPallets` retyped from `ICollection<string>?` to
`ICollection<FuelTankWhitelistedPallet>?`.
- `CreateFuelTankInput.RuleSets` documentation corrected: at least one rule set is required, because
the chain rejects a tank with none.
- `Transaction.Error` documentation expanded: a non-null value means the requested work did not fully
happen, including when `state` is `FINALIZED` but wrapped batch items failed to dispatch.

### Removed

- **Breaking:** `CompatibleFuelTank.RemainingBudget`, `CompatibleFuelTank.MaxBudget`, and
`CompatibleFuelTank.ConsumedBudget`, superseded by `CompatibleFuelTank.AvailableBudget`.

## [v3.0.3] - 2026-07-13

### Added

- Fuel tanks are covered again after the v3.0.0 rewrite dropped them:
- Queries: `GetFuelTank`, `GetFuelTanks`, `GetFuelTankAccounts`, `GetCompatibleFuelTanks`.
- Inputs for creating, mutating, and removing tanks, rule sets, and accounts —
`CreateFuelTankInput`, `MutateFuelTankInput`, `RemoveFuelTankInput`, `CreateRuleSetInput`,
`RemoveRuleSetInput`, `AddAccountInput`, `AddAccountsInput`, `RemoveAccountInput`,
`RemoveAccountsInput`, `DispatchRuleInput`, `AccountRuleInput`, `FuelBudgetRuleInput`,
`RequireTokenInput`, `RuleSetEntryInput`, `UserAccountManagementInput`,
`ShouldMutateAccountExpirationInput`, and `ShouldMutateUserAccountManagementInput`.
- Models (and their query builders): `FuelTank`, `FuelTankRuleSet`, `FuelTankAccount`,
`FuelTankAccountRule`, `FuelTankPermittedExtrinsic`, `FuelTankUserAccountManagement`,
`FuelBudget`, `RequireToken`, `CompatibleFuelTank`, and `CompatibleFuelTankRuleSet`.
- Enums: `CoveragePolicy`, `FuelTankPermittedMethod`, and `FuelTankWhitelistedPallet`.
- Managed wallet sweeps: the `SweepManagedWallet` mutation and `ManagedWalletSweepStatus` query, with
the `SweepManagedWalletResult` and `ManagedWalletSweepStatus` models and
`ManagedWalletSweepStatusEnum`.
- Wallet linking: the `CreateLinkingCode` mutation and `GetLinkedWallet` query, with the
`LinkingCode` and `LinkedWallet` models.
- Collection approvals: `ApproveCollectionInput` and `UnapproveCollectionInput`.
- `MutateFreezeStateInput`, plus the `BatchTransactionModeEnum` and `ShouldMutateAction` enums.
- `Transaction.Error` — the on-chain failure reason, including partial batch failures.
- `Event.Data` (the raw event payload), `Extrinsic.Events`, and `TokenGroupToken.CollectionId`.

### Changed

- **Breaking:** ENJ and `BigDecimal` scalars now map to `string` instead of
`System.Numerics.BigInteger` throughout the generated client — including `Account.Balance`,
`Listing.Price`, `Listing.MinTakeValue`, `Listing.HighestPrice`, `Token.Infusion`,
`PoolBalance.Stash` / `Reward` / `Active`, `AccountPool.Bonded`, `NominationPool.Capacity`,
`CreateListingInput.Price`, `PlaceBidInput.Price`, `NominationPoolsBondInput.Amount`, and
`AnswerCounterOfferInput.CounterPrice`. Values are decimal ENJ (e.g. `"1.5"`) and round-trip
without precision loss.
- **Breaking:** `Transaction.ExtrinsicHash` (`string?`) replaced by `Transaction.Extrinsic`
(`Extrinsic?`), resolved from the indexer.
- **Breaking:** `Block.Validator` retyped from `Account?` to `string?` — the validator public key.
- `Event.Name` documentation clarified: it is the human-readable pallet and method name.

### Removed

- **Breaking:** `Block.Events`. Events are now reached through `Extrinsic.Events`.
- **Breaking:** Unity support and the UPM distribution were dropped from this repository —
`unity-template/`, `scripts/assemble-upm.sh`, the `upm` CI job, and the README's Unity install
instructions. The SDK is distributed as a NuGet package only.

## [v3.0.2] - 2026-06-17

### Changed

- Release artifacts are no longer attached to GitHub Releases. The NuGet package is the distribution
channel, and releases are created and published manually so they stay compatible with GitHub's
immutable releases.

## [v3.0.1] - 2026-06-16

### Added

- `AccountToken` model and `AccountTokenQueryBuilder`, pairing a token with the holding account's
balance for it.
- `PlatformClient.DefaultBaseAddress` (`https://platform.enjin.io/graphql`). The `baseAddress`
constructor parameter is now optional and falls back to it instead of throwing
`ArgumentNullException`.

### Changed

- **Breaking:** `Account.Tokens` retyped from `ICollection<Token>?` to `ICollection<AccountToken>?`,
so each entry carries the account's balance alongside the token.
- Default `User-Agent` changed from `Enjin.Platform.Sdk/{version}` to
`Enjin-Platform-CSharp-SDK/{version}`.
- The UPM package is now published to the dedicated
[`enjin/platform-unity-sdk`](https://github.com/enjin/platform-unity-sdk) repository, installed by
git URL, instead of parallel `upm/v<version>` tags on this repository.
- `Collection.Accounts` and `Token.Accounts` documentation now states the effective per-page limit:
up to 100 when fetched via `GetCollection` / `GetToken`, up to 10 via the bulk queries.

## [v3.0.0] - 2026-05-25

### Added
Expand Down Expand Up @@ -54,7 +167,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Public beta release.

[Unreleased]: https://github.com/enjin/platform-csharp-sdk/compare/v3.0.0...HEAD
[Unreleased]: https://github.com/enjin/platform-csharp-sdk/compare/v3.0.4...HEAD

[v3.0.4]: https://github.com/enjin/platform-csharp-sdk/compare/v3.0.3...v3.0.4

[v3.0.3]: https://github.com/enjin/platform-csharp-sdk/compare/v3.0.2...v3.0.3

[v3.0.2]: https://github.com/enjin/platform-csharp-sdk/compare/v3.0.1...v3.0.2

[v3.0.1]: https://github.com/enjin/platform-csharp-sdk/compare/v3.0.0...v3.0.1

[v3.0.0]: https://github.com/enjin/platform-csharp-sdk/compare/v1.0.0-beta.1...v3.0.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<IsPackable>false</IsPackable>

<Version>3.0.3</Version>
<Version>3.0.4</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Description>Open source SDK for connecting to and interacting with the Enjin Platform.</Description>
<Company>Enjin Pte. Ltd.</Company>
<Copyright>Enjin Pte. Ltd.</Copyright>
<Version>3.0.3</Version>
<Version>3.0.4</Version>
<TargetFramework>netstandard2.1</TargetFramework>
<LangVersion>12</LangVersion>
<RootNamespace>Enjin.Platform.Sdk</RootNamespace>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public static class GraphQlTypes
public const string PendingCollection = "PendingCollection";
public const string PoolBalance = "PoolBalance";
public const string PoolMember = "PoolMember";
public const string PusherSocketAuth = "PusherSocketAuth";
public const string Query = "Query";
public const string RequireToken = "RequireToken";
public const string RoyaltyBeneficiary = "RoyaltyBeneficiary";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public QueryBuilderParameter<UserAccountManagementInput?>? UserAccountManagement
}

/// <summary>
/// Rule sets to create with the tank, each paired with its numeric id. Omit for an empty tank.
/// Rule sets to create with the tank, each paired with its numeric id. At least one rule set is required — the chain rejects a tank with no rule sets.
/// </summary>
#if !GRAPHQL_GENERATOR_DISABLE_NEWTONSOFT_JSON
[JsonConverter(typeof(QueryBuilderParameterConverter<ICollection<RuleSetEntryInput>?>))]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public partial class CreateTokenEntryInput : IGraphQlInputObject
private InputPropertyInfo _listingForbidden;
private InputPropertyInfo _cap;
private InputPropertyInfo _behavior;
private InputPropertyInfo _freezeState;
private InputPropertyInfo _attributes;
private InputPropertyInfo _infusion;
private InputPropertyInfo _anyoneCanInfuse;
Expand Down Expand Up @@ -100,6 +101,18 @@ public QueryBuilderParameter<TokenBehaviorInput?>? Behavior
set => _behavior = new() { Name = "behavior", Value = value };
}

/// <summary>
/// The initial freeze state of the token. Omit to create the token unfrozen and freezable later.
/// </summary>
#if !GRAPHQL_GENERATOR_DISABLE_NEWTONSOFT_JSON
[JsonConverter(typeof(QueryBuilderParameterConverter<FreezeState?>))]
#endif
public QueryBuilderParameter<FreezeState?>? FreezeState
{
get => (QueryBuilderParameter<FreezeState?>?)_freezeState.Value;
set => _freezeState = new() { Name = "freezeState", Value = value };
}

/// <summary>
/// Key-value attributes to attach to the token on-chain.
/// </summary>
Expand All @@ -113,14 +126,14 @@ public QueryBuilderParameter<ICollection<AttributeInput>?>? Attributes
}

/// <summary>
/// Amount of currency infused into the token at creation.
/// Amount of ENJ infused into the token at creation, expressed as a decimal or integer ENJ (e.g. "1.5"); converted to base units on-chain.
/// </summary>
#if !GRAPHQL_GENERATOR_DISABLE_NEWTONSOFT_JSON
[JsonConverter(typeof(QueryBuilderParameterConverter<global::System.Numerics.BigInteger>))]
[JsonConverter(typeof(QueryBuilderParameterConverter<string>))]
#endif
public QueryBuilderParameter<global::System.Numerics.BigInteger>? Infusion
public QueryBuilderParameter<string>? Infusion
{
get => (QueryBuilderParameter<global::System.Numerics.BigInteger>?)_infusion.Value;
get => (QueryBuilderParameter<string>?)_infusion.Value;
set => _infusion = new() { Name = "infusion", Value = value };
}

Expand Down Expand Up @@ -156,6 +169,7 @@ IEnumerable<InputPropertyInfo> IGraphQlInputObject.GetPropertyValues()
if (_listingForbidden.Name != null) yield return _listingForbidden;
if (_cap.Name != null) yield return _cap;
if (_behavior.Name != null) yield return _behavior;
if (_freezeState.Name != null) yield return _freezeState;
if (_attributes.Name != null) yield return _attributes;
if (_infusion.Name != null) yield return _infusion;
if (_anyoneCanInfuse.Name != null) yield return _anyoneCanInfuse;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public partial class CreateTokenInput : IGraphQlInputObject
private InputPropertyInfo _listingForbidden;
private InputPropertyInfo _cap;
private InputPropertyInfo _behavior;
private InputPropertyInfo _freezeState;
private InputPropertyInfo _attributes;
private InputPropertyInfo _infusion;
private InputPropertyInfo _anyoneCanInfuse;
Expand Down Expand Up @@ -113,6 +114,18 @@ public QueryBuilderParameter<TokenBehaviorInput?>? Behavior
set => _behavior = new() { Name = "behavior", Value = value };
}

/// <summary>
/// The initial freeze state of the token. Omit to create the token unfrozen and freezable later.
/// </summary>
#if !GRAPHQL_GENERATOR_DISABLE_NEWTONSOFT_JSON
[JsonConverter(typeof(QueryBuilderParameterConverter<FreezeState?>))]
#endif
public QueryBuilderParameter<FreezeState?>? FreezeState
{
get => (QueryBuilderParameter<FreezeState?>?)_freezeState.Value;
set => _freezeState = new() { Name = "freezeState", Value = value };
}

/// <summary>
/// Key-value attributes to attach to the token on-chain.
/// </summary>
Expand All @@ -126,14 +139,14 @@ public QueryBuilderParameter<ICollection<AttributeInput>?>? Attributes
}

/// <summary>
/// Amount of currency infused into the token at creation.
/// Amount of ENJ infused into the token at creation, expressed as a decimal or integer ENJ (e.g. "1.5"); converted to base units on-chain.
/// </summary>
#if !GRAPHQL_GENERATOR_DISABLE_NEWTONSOFT_JSON
[JsonConverter(typeof(QueryBuilderParameterConverter<global::System.Numerics.BigInteger>))]
[JsonConverter(typeof(QueryBuilderParameterConverter<string>))]
#endif
public QueryBuilderParameter<global::System.Numerics.BigInteger>? Infusion
public QueryBuilderParameter<string>? Infusion
{
get => (QueryBuilderParameter<global::System.Numerics.BigInteger>?)_infusion.Value;
get => (QueryBuilderParameter<string>?)_infusion.Value;
set => _infusion = new() { Name = "infusion", Value = value };
}

Expand Down Expand Up @@ -170,6 +183,7 @@ IEnumerable<InputPropertyInfo> IGraphQlInputObject.GetPropertyValues()
if (_listingForbidden.Name != null) yield return _listingForbidden;
if (_cap.Name != null) yield return _cap;
if (_behavior.Name != null) yield return _behavior;
if (_freezeState.Name != null) yield return _freezeState;
if (_attributes.Name != null) yield return _attributes;
if (_infusion.Name != null) yield return _infusion;
if (_anyoneCanInfuse.Name != null) yield return _anyoneCanInfuse;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ public QueryBuilderParameter<string?>? Recipient
}

/// <summary>
/// The unit price for the minted tokens. Omit to keep the existing unit price.
/// The unit price for the minted tokens, expressed as a decimal or integer ENJ (e.g. "1.5"); converted to base units on-chain. Omit to keep the existing unit price.
/// </summary>
#if !GRAPHQL_GENERATOR_DISABLE_NEWTONSOFT_JSON
[JsonConverter(typeof(QueryBuilderParameterConverter<global::System.Numerics.BigInteger?>))]
[JsonConverter(typeof(QueryBuilderParameterConverter<string?>))]
#endif
public QueryBuilderParameter<global::System.Numerics.BigInteger?>? UnitPrice
public QueryBuilderParameter<string?>? UnitPrice
{
get => (QueryBuilderParameter<global::System.Numerics.BigInteger?>?)_unitPrice.Value;
get => (QueryBuilderParameter<string?>?)_unitPrice.Value;
set => _unitPrice = new() { Name = "unitPrice", Value = value };
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ public QueryBuilderParameter<string?>? Recipient
}

/// <summary>
/// The unit price for the minted tokens. Omit to keep the existing unit price.
/// The unit price for the minted tokens, expressed as a decimal or integer ENJ (e.g. "1.5"); converted to base units on-chain. Omit to keep the existing unit price.
/// </summary>
#if !GRAPHQL_GENERATOR_DISABLE_NEWTONSOFT_JSON
[JsonConverter(typeof(QueryBuilderParameterConverter<global::System.Numerics.BigInteger?>))]
[JsonConverter(typeof(QueryBuilderParameterConverter<string?>))]
#endif
public QueryBuilderParameter<global::System.Numerics.BigInteger?>? UnitPrice
public QueryBuilderParameter<string?>? UnitPrice
{
get => (QueryBuilderParameter<global::System.Numerics.BigInteger?>?)_unitPrice.Value;
get => (QueryBuilderParameter<string?>?)_unitPrice.Value;
set => _unitPrice = new() { Name = "unitPrice", Value = value };
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
namespace Enjin.Platform.Sdk;

/// <summary>
/// A fuel tank that is compatible with a given account, pallet, and method.
/// A fuel tank that is compatible with a transaction call.
/// </summary>
public partial class CompatibleFuelTank
{
Expand All @@ -26,6 +26,10 @@ public partial class CompatibleFuelTank
/// </summary>
public string? Name { get; set; }
/// <summary>
/// The fuel tank account address.
/// </summary>
public string? Address { get; set; }
/// <summary>
/// Whether the tank covers the storage deposit in addition to fees.
/// </summary>
public bool? ProvidesDeposit { get; set; }
Expand All @@ -38,20 +42,12 @@ public partial class CompatibleFuelTank
/// </summary>
public CompatibleFuelTankRuleSet? RuleSet { get; set; }
/// <summary>
/// Remaining per-user fuel budget expressed as ENJ, or null if no budget rule applies.
/// </summary>
public string? RemainingBudget { get; set; }
/// <summary>
/// Maximum per-user fuel budget expressed as ENJ, or null if no budget rule applies.
/// </summary>
public string? MaxBudget { get; set; }
/// <summary>
/// Amount of per-user fuel budget already consumed, expressed as ENJ, or null if no budget rule applies.
/// </summary>
public string? ConsumedBudget { get; set; }
/// <summary>
/// Free balance of the tank account, expressed as ENJ.
/// </summary>
public string? TankBalance { get; set; }
/// <summary>
/// The amount available to fund this transaction, expressed as ENJ.
/// </summary>
public string AvailableBudget { get; set; }
}

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace Enjin.Platform.Sdk;
public partial class Event
{
/// <summary>
/// The event ID.
/// The event ID (blockNumber-eventIndex).
/// </summary>
public string? Id { get; set; }
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ public partial class FuelTankRuleSet
/// </summary>
public ICollection<global::System.Numerics.BigInteger?>? WhitelistedCollections { get; set; }
/// <summary>
/// Only calls targeting these pallet names are permitted.
/// Only calls targeting these pallets are permitted.
/// </summary>
public ICollection<string>? WhitelistedPallets { get; set; }
public ICollection<FuelTankWhitelistedPallet>? WhitelistedPallets { get; set; }
/// <summary>
/// Maximum fuel that any single transaction under this rule set may burn, expressed as ENJ.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ namespace Enjin.Platform.Sdk;

public partial class Mutation
{
/// <summary>
/// Authorizes the current user to subscribe to a private Pusher channel.
/// </summary>
public PusherSocketAuth? AuthenticatePusherSocket { get; set; }
/// <summary>
/// Create and encode a transaction on the Enjin blockchain.
/// </summary>
Expand Down
Loading
Loading