@aephia/atlas-kit 0.6.0-next.2 → 0.6.0-next.21
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/README.md +5 -2
- package/dist/cargo/actions/deposit.d.ts +1 -9
- package/dist/cargo/actions/deposit.d.ts.map +1 -1
- package/dist/cargo/actions/deposit.js +54 -42
- package/dist/cargo/actions/deposit.js.map +1 -1
- package/dist/cargo/actions/index.d.ts +1 -0
- package/dist/cargo/actions/index.d.ts.map +1 -1
- package/dist/cargo/actions/index.js +1 -0
- package/dist/cargo/actions/index.js.map +1 -1
- package/dist/cargo/actions/wallet-context.d.ts +14 -0
- package/dist/cargo/actions/wallet-context.d.ts.map +1 -0
- package/dist/cargo/actions/wallet-context.js +12 -0
- package/dist/cargo/actions/wallet-context.js.map +1 -0
- package/dist/cargo/actions/wallet-token.d.ts +1 -1
- package/dist/cargo/actions/wallet-token.d.ts.map +1 -1
- package/dist/cargo/actions/wallet-token.js +1 -9
- package/dist/cargo/actions/wallet-token.js.map +1 -1
- package/dist/cargo/actions/withdrawal.d.ts +46 -0
- package/dist/cargo/actions/withdrawal.d.ts.map +1 -0
- package/dist/cargo/actions/withdrawal.js +269 -0
- package/dist/cargo/actions/withdrawal.js.map +1 -0
- package/dist/client/errors.d.ts +4 -0
- package/dist/client/errors.d.ts.map +1 -1
- package/dist/client/errors.js +31 -1
- package/dist/client/errors.js.map +1 -1
- package/dist/client/index.d.ts +1 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +1 -0
- package/dist/client/index.js.map +1 -1
- package/dist/client/rpc-subscription-provider.d.ts +35 -0
- package/dist/client/rpc-subscription-provider.d.ts.map +1 -0
- package/dist/client/rpc-subscription-provider.js +190 -0
- package/dist/client/rpc-subscription-provider.js.map +1 -0
- package/dist/factions/actions/index.d.ts +36 -0
- package/dist/factions/actions/index.d.ts.map +1 -0
- package/dist/factions/actions/index.js +136 -0
- package/dist/factions/actions/index.js.map +1 -0
- package/dist/factions/index.d.ts +1 -0
- package/dist/factions/index.d.ts.map +1 -1
- package/dist/factions/index.js +1 -0
- package/dist/factions/index.js.map +1 -1
- package/dist/factions/profile-faction.d.ts +46 -0
- package/dist/factions/profile-faction.d.ts.map +1 -0
- package/dist/factions/profile-faction.js +51 -0
- package/dist/factions/profile-faction.js.map +1 -0
- package/dist/fleets/actions/index.d.ts +1 -0
- package/dist/fleets/actions/index.d.ts.map +1 -1
- package/dist/fleets/actions/index.js +1 -0
- package/dist/fleets/actions/index.js.map +1 -1
- package/dist/fleets/actions/ship-import.d.ts +48 -0
- package/dist/fleets/actions/ship-import.d.ts.map +1 -0
- package/dist/fleets/actions/ship-import.js +309 -0
- package/dist/fleets/actions/ship-import.js.map +1 -0
- package/dist/identity/actions/create-profile.d.ts +56 -0
- package/dist/identity/actions/create-profile.d.ts.map +1 -0
- package/dist/identity/actions/create-profile.js +139 -0
- package/dist/identity/actions/create-profile.js.map +1 -0
- package/dist/identity/actions/index.d.ts +38 -0
- package/dist/identity/actions/index.d.ts.map +1 -0
- package/dist/identity/actions/index.js +109 -0
- package/dist/identity/actions/index.js.map +1 -0
- package/dist/identity/index.d.ts +15 -0
- package/dist/identity/index.d.ts.map +1 -1
- package/dist/identity/index.js +15 -0
- package/dist/identity/index.js.map +1 -1
- package/dist/identity/permissions.d.ts +124 -0
- package/dist/identity/permissions.d.ts.map +1 -0
- package/dist/identity/permissions.js +171 -0
- package/dist/identity/permissions.js.map +1 -0
- package/dist/internal/c4/cargo-bytes-config.d.ts +7 -0
- package/dist/internal/c4/cargo-bytes-config.d.ts.map +1 -0
- package/dist/internal/c4/cargo-bytes-config.js +19 -0
- package/dist/internal/c4/cargo-bytes-config.js.map +1 -0
- package/dist/internal/c4/character-registration.d.ts +9 -0
- package/dist/internal/c4/character-registration.d.ts.map +1 -0
- package/dist/internal/c4/character-registration.js +21 -0
- package/dist/internal/c4/character-registration.js.map +1 -0
- package/dist/internal/c4/faction-enrollment.d.ts +6 -0
- package/dist/internal/c4/faction-enrollment.d.ts.map +1 -0
- package/dist/internal/c4/faction-enrollment.js +8 -0
- package/dist/internal/c4/faction-enrollment.js.map +1 -0
- package/dist/internal/c4/game.d.ts +16 -2
- package/dist/internal/c4/game.d.ts.map +1 -1
- package/dist/internal/c4/game.js +38 -4
- package/dist/internal/c4/game.js.map +1 -1
- package/dist/internal/c4/identity.d.ts +2 -7
- package/dist/internal/c4/identity.d.ts.map +1 -1
- package/dist/internal/c4/identity.js +2 -23
- package/dist/internal/c4/identity.js.map +1 -1
- package/dist/internal/c4/legacy-cargo-config.d.ts +21 -0
- package/dist/internal/c4/legacy-cargo-config.d.ts.map +1 -0
- package/dist/internal/c4/legacy-cargo-config.js +27 -0
- package/dist/internal/c4/legacy-cargo-config.js.map +1 -0
- package/dist/internal/c4/profile-creation.d.ts +17 -0
- package/dist/internal/c4/profile-creation.d.ts.map +1 -0
- package/dist/internal/c4/profile-creation.js +36 -0
- package/dist/internal/c4/profile-creation.js.map +1 -0
- package/dist/internal/c4/profile-faction.d.ts.map +1 -1
- package/dist/internal/c4/profile-faction.js +2 -0
- package/dist/internal/c4/profile-faction.js.map +1 -1
- package/dist/internal/c4/profile-permissions.d.ts +14 -0
- package/dist/internal/c4/profile-permissions.d.ts.map +1 -0
- package/dist/internal/c4/profile-permissions.js +80 -0
- package/dist/internal/c4/profile-permissions.js.map +1 -0
- package/dist/internal/c4/wallet-cargo-cache.d.ts +3 -0
- package/dist/internal/c4/wallet-cargo-cache.d.ts.map +1 -0
- package/dist/internal/c4/wallet-cargo-cache.js +24 -0
- package/dist/internal/c4/wallet-cargo-cache.js.map +1 -0
- package/dist/internal/planning/account-state.d.ts +4 -0
- package/dist/internal/planning/account-state.d.ts.map +1 -0
- package/dist/internal/planning/account-state.js +11 -0
- package/dist/internal/planning/account-state.js.map +1 -0
- package/dist/internal/planning/authorization-adapter.d.ts +21 -0
- package/dist/internal/planning/authorization-adapter.d.ts.map +1 -1
- package/dist/internal/planning/authorization-adapter.js +67 -0
- package/dist/internal/planning/authorization-adapter.js.map +1 -1
- package/dist/internal/planning/faction-enrollment.d.ts +12 -0
- package/dist/internal/planning/faction-enrollment.d.ts.map +1 -0
- package/dist/internal/planning/faction-enrollment.js +67 -0
- package/dist/internal/planning/faction-enrollment.js.map +1 -0
- package/dist/internal/planning/ship-token.d.ts +10 -0
- package/dist/internal/planning/ship-token.d.ts.map +1 -0
- package/dist/internal/planning/ship-token.js +47 -0
- package/dist/internal/planning/ship-token.js.map +1 -0
- package/dist/internal/planning/token-mint.d.ts +4 -0
- package/dist/internal/planning/token-mint.d.ts.map +1 -0
- package/dist/internal/planning/token-mint.js +15 -0
- package/dist/internal/planning/token-mint.js.map +1 -0
- package/dist/mining/actions/index.d.ts +84 -0
- package/dist/mining/actions/index.d.ts.map +1 -0
- package/dist/mining/actions/index.js +292 -0
- package/dist/mining/actions/index.js.map +1 -0
- package/dist/planning/execution.d.ts.map +1 -1
- package/dist/planning/execution.js +113 -9
- package/dist/planning/execution.js.map +1 -1
- package/dist/planning/index.d.ts +210 -5
- package/dist/planning/index.d.ts.map +1 -1
- package/dist/planning/index.js +271 -36
- package/dist/planning/index.js.map +1 -1
- package/dist/registry/cargo.d.ts +18 -2
- package/dist/registry/cargo.d.ts.map +1 -1
- package/dist/registry/cargo.js +48 -7
- package/dist/registry/cargo.js.map +1 -1
- package/dist/registry/onboarding.d.ts +6 -0
- package/dist/registry/onboarding.d.ts.map +1 -0
- package/dist/registry/onboarding.js +24 -0
- package/dist/registry/onboarding.js.map +1 -0
- package/dist/registry/ships.d.ts +10 -0
- package/dist/registry/ships.d.ts.map +1 -0
- package/dist/registry/ships.js +35 -0
- package/dist/registry/ships.js.map +1 -0
- package/package.json +13 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"onboarding.js","sourceRoot":"","sources":["../../src/registry/onboarding.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEjE,uFAAuF;AACvF,MAAM,CAAC,KAAK,UAAU,qCAAqC,CACzD,GAAgB;IAEhB,MAAM,IAAI,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC;IACrC,MAAM,CAAC,OAAO,CAAC,GAAG,MAAM,sBAAsB,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAC5D,IAAI,CAAC,OAAO;QACV,MAAM,IAAI,YAAY,CACpB,4BAA4B,EAC5B,uBAAuB,IAAI,sFAAsF,EACjH,EAAE,OAAO,EAAE,IAAI,EAAE,CAClB,CAAC;IACJ,oCAAoC,CAAC,OAAO,CAAC,CAAC;IAC9C,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,kHAAkH;AAClH,MAAM,UAAU,oCAAoC,CAClD,OAAmB;IAEnB,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC;IAC7B,IAAI,OAAO,CAAC,UAAU;QACpB,MAAM,IAAI,YAAY,CACpB,4BAA4B,EAC5B,uBAAuB,IAAI,8FAA8F,EACzH,EAAE,OAAO,EAAE,IAAI,EAAE,CAClB,CAAC;IACJ,6EAA6E;IAC7E,6EAA6E;IAC7E,uEAAuE;IACvE,yBAAyB,CAAC,OAAO,CAAC,CAAC;AACrC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { RawAccount, SageContext } from '../client/contracts.js';
|
|
2
|
+
/** Resolves one explicit ship configuration from a fresh, registry-owned Game read. */
|
|
3
|
+
export declare function readFreshGameShipConfiguration(context: SageContext, shipId: number): Promise<Readonly<{
|
|
4
|
+
rawAccount: RawAccount;
|
|
5
|
+
ship: import("@staratlas/dev-sage").Ship;
|
|
6
|
+
configHash: string;
|
|
7
|
+
}>>;
|
|
8
|
+
/** Decodes one fresh Game once and hashes each requested ship; missing IDs have no hash. */
|
|
9
|
+
export declare function hashGameShipConfigurations(account: RawAccount, shipIds: readonly number[]): Promise<ReadonlyMap<number, string>>;
|
|
10
|
+
//# sourceMappingURL=ships.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ships.d.ts","sourceRoot":"","sources":["../../src/registry/ships.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAkBtE,uFAAuF;AACvF,wBAAsB,8BAA8B,CAClD,OAAO,EAAE,WAAW,EACpB,MAAM,EAAE,MAAM;;;;IA0Bf;AAED,4FAA4F;AAC5F,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,UAAU,EACnB,OAAO,EAAE,SAAS,MAAM,EAAE,GACzB,OAAO,CAAC,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAQtC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { InvalidActionInputError } from '../client/errors.js';
|
|
2
|
+
import { readContextRawAccounts } from '../client/reconciliation.js';
|
|
3
|
+
import { decodeGameShipConfigurations, encodeGameShipConfiguration, } from '../internal/c4/game.js';
|
|
4
|
+
import { requireGameAddress } from '../internal/game-context.js';
|
|
5
|
+
import { hashAccountState } from '../internal/planning/account-state.js';
|
|
6
|
+
/** Hashes the complete pinned Ship encoding, including its ID, mint and requirements. */
|
|
7
|
+
function hashShip(account, ship) {
|
|
8
|
+
return hashAccountState(account.owner, encodeGameShipConfiguration(ship));
|
|
9
|
+
}
|
|
10
|
+
/** Resolves one explicit ship configuration from a fresh, registry-owned Game read. */
|
|
11
|
+
export async function readFreshGameShipConfiguration(context, shipId) {
|
|
12
|
+
const game = requireGameAddress(context);
|
|
13
|
+
const [rawAccount] = await readContextRawAccounts(context, [game]);
|
|
14
|
+
if (!rawAccount)
|
|
15
|
+
throw new InvalidActionInputError('game', game, 'an existing Game in the configured deployment', 'Refresh the configured Game before importing a ship.');
|
|
16
|
+
const ship = decodeGameShipConfigurations(rawAccount).find((row) => row.id === shipId);
|
|
17
|
+
if (!ship)
|
|
18
|
+
throw new InvalidActionInputError('shipId', shipId, 'a ship configuration ID defined in this Game', 'Select a ship configuration from this deployment before importing.');
|
|
19
|
+
return Object.freeze({
|
|
20
|
+
rawAccount,
|
|
21
|
+
ship,
|
|
22
|
+
configHash: await hashShip(rawAccount, ship),
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
/** Decodes one fresh Game once and hashes each requested ship; missing IDs have no hash. */
|
|
26
|
+
export async function hashGameShipConfigurations(account, shipIds) {
|
|
27
|
+
const ships = decodeGameShipConfigurations(account);
|
|
28
|
+
const selected = new Set(shipIds);
|
|
29
|
+
const hashes = new Map();
|
|
30
|
+
for (const ship of ships)
|
|
31
|
+
if (selected.has(ship.id))
|
|
32
|
+
hashes.set(ship.id, await hashShip(account, ship));
|
|
33
|
+
return hashes;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=ships.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ships.js","sourceRoot":"","sources":["../../src/registry/ships.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EACL,4BAA4B,EAC5B,2BAA2B,GAC5B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAEzE,yFAAyF;AACzF,SAAS,QAAQ,CACf,OAAmB,EACnB,IAA6D;IAE7D,OAAO,gBAAgB,CAAC,OAAO,CAAC,KAAK,EAAE,2BAA2B,CAAC,IAAI,CAAC,CAAC,CAAC;AAC5E,CAAC;AAED,uFAAuF;AACvF,MA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package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aephia/atlas-kit",
|
|
3
|
-
"version": "0.6.0-next.
|
|
3
|
+
"version": "0.6.0-next.21",
|
|
4
4
|
"description": "Community-maintained non-custodial TypeScript SDK for Star Atlas SAGE C4.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Aephia contributors",
|
|
@@ -80,6 +80,10 @@
|
|
|
80
80
|
"types": "./dist/factions/index.d.ts",
|
|
81
81
|
"import": "./dist/factions/index.js"
|
|
82
82
|
},
|
|
83
|
+
"./factions/actions": {
|
|
84
|
+
"types": "./dist/factions/actions/index.d.ts",
|
|
85
|
+
"import": "./dist/factions/actions/index.js"
|
|
86
|
+
},
|
|
83
87
|
"./fleets": {
|
|
84
88
|
"types": "./dist/fleets/index.d.ts",
|
|
85
89
|
"import": "./dist/fleets/index.js"
|
|
@@ -92,6 +96,10 @@
|
|
|
92
96
|
"types": "./dist/identity/index.d.ts",
|
|
93
97
|
"import": "./dist/identity/index.js"
|
|
94
98
|
},
|
|
99
|
+
"./identity/actions": {
|
|
100
|
+
"types": "./dist/identity/actions/index.d.ts",
|
|
101
|
+
"import": "./dist/identity/actions/index.js"
|
|
102
|
+
},
|
|
95
103
|
"./loyalty": {
|
|
96
104
|
"types": "./dist/loyalty/index.d.ts",
|
|
97
105
|
"import": "./dist/loyalty/index.js"
|
|
@@ -112,6 +120,10 @@
|
|
|
112
120
|
"types": "./dist/mining/index.d.ts",
|
|
113
121
|
"import": "./dist/mining/index.js"
|
|
114
122
|
},
|
|
123
|
+
"./mining/actions": {
|
|
124
|
+
"types": "./dist/mining/actions/index.d.ts",
|
|
125
|
+
"import": "./dist/mining/actions/index.js"
|
|
126
|
+
},
|
|
115
127
|
"./planning": {
|
|
116
128
|
"types": "./dist/planning/index.d.ts",
|
|
117
129
|
"import": "./dist/planning/index.js"
|