@dfinity/nns 0.5.0 → 0.6.0-nightly-2022-07-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 +1 -1
- package/dist/candid/genesis_token.certified.idl.d.ts +2 -0
- package/dist/candid/genesis_token.certified.idl.js +2 -1
- package/dist/candid/genesis_token.d.ts +33 -0
- package/dist/candid/genesis_token.did +23 -22
- package/dist/candid/genesis_token.idl.d.ts +0 -8
- package/dist/candid/genesis_token.idl.js +2 -1
- package/dist/candid/governance.certified.idl.js +86 -33
- package/dist/candid/{governanceTypes.d.ts → governance.d.ts} +28 -1
- package/dist/candid/governance.did +26 -5
- package/dist/candid/governance.idl.d.ts +0 -3
- package/dist/candid/governance.idl.js +86 -33
- package/dist/candid/ledger.certified.idl.js +1 -1
- package/dist/candid/{ledgerTypes.d.ts → ledger.d.ts} +0 -5
- package/dist/candid/ledger.did +2 -2
- package/dist/candid/ledger.idl.d.ts +0 -3
- package/dist/candid/ledger.idl.js +1 -1
- package/dist/candid/sns_wasm.certified.idl.d.ts +2 -0
- package/dist/candid/sns_wasm.certified.idl.js +117 -0
- package/dist/candid/sns_wasm.d.ts +106 -0
- package/dist/candid/sns_wasm.did +76 -0
- package/dist/candid/sns_wasm.idl.d.ts +2 -0
- package/dist/candid/sns_wasm.idl.js +117 -0
- package/dist/cjs/index.cjs.js +32 -32
- package/dist/cjs/index.cjs.js.map +3 -3
- package/dist/esm/account_identifier.js +1 -1
- package/dist/esm/chunk-CKIW7YKS.js +2 -0
- package/dist/esm/chunk-CKIW7YKS.js.map +7 -0
- package/dist/esm/{chunk-S37GZOMR.js → chunk-FZGMZSQZ.js} +3 -3
- package/dist/esm/chunk-FZGMZSQZ.js.map +7 -0
- package/dist/esm/chunk-H6I2Z4SN.js +7 -0
- package/dist/esm/chunk-H6I2Z4SN.js.map +7 -0
- package/dist/esm/{chunk-FL7E4DL3.js → chunk-IPUXUCZB.js} +2 -2
- package/dist/esm/chunk-IPUXUCZB.js.map +7 -0
- package/dist/esm/chunk-JUIC5FZJ.js +2 -0
- package/dist/esm/chunk-JUIC5FZJ.js.map +7 -0
- package/dist/esm/chunk-MGC7CRB4.js +11 -0
- package/dist/esm/chunk-MGC7CRB4.js.map +7 -0
- package/dist/esm/chunk-NN3MUNHF.js +2 -0
- package/dist/esm/chunk-NN3MUNHF.js.map +7 -0
- package/dist/esm/chunk-NNJFBVJ3.js +831 -0
- package/dist/esm/{chunk-EDMSX7GK.js.map → chunk-NNJFBVJ3.js.map} +3 -3
- package/dist/esm/{chunk-MTPVFXPH.js → chunk-RHCXRQFK.js} +2 -2
- package/dist/esm/{chunk-MTPVFXPH.js.map → chunk-RHCXRQFK.js.map} +1 -1
- package/dist/esm/chunk-TLWRX3CX.js +9 -0
- package/dist/esm/chunk-TLWRX3CX.js.map +7 -0
- package/dist/esm/genesis_token.canister.js +2 -0
- package/dist/esm/{genesis_token.js.map → genesis_token.canister.js.map} +0 -0
- package/dist/esm/governance.canister.js +2 -0
- package/dist/esm/{governance.js.map → governance.canister.js.map} +0 -0
- package/dist/esm/icp.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/ledger.canister.js +2 -0
- package/dist/esm/{ledger.js.map → ledger.canister.js.map} +0 -0
- package/dist/esm/sns_wasm.canister.js +2 -0
- package/dist/esm/sns_wasm.canister.js.map +7 -0
- package/dist/proto/governance.proto +2 -0
- package/dist/proto/governance_pb.d.ts +7 -0
- package/dist/proto/governance_pb.js +57 -2
- package/dist/types/account_identifier.d.ts +3 -1
- package/dist/types/canisters/governance/request.converters.d.ts +4 -3
- package/dist/types/canisters/governance/request.proto.converters.d.ts +2 -2
- package/dist/types/canisters/governance/response.converters.d.ts +12 -5
- package/dist/types/canisters/governance/services.d.ts +1 -2
- package/dist/types/canisters/ledger/ledger.request.converts.d.ts +2 -2
- package/dist/types/constants/canister_ids.d.ts +1 -0
- package/dist/types/errors/governance.errors.d.ts +2 -2
- package/dist/types/errors/ledger.errors.d.ts +2 -2
- package/dist/types/genesis_token.canister.d.ts +11 -0
- package/dist/types/{governance.d.ts → governance.canister.d.ts} +11 -5
- package/dist/types/index.d.ts +8 -5
- package/dist/types/{ledger.d.ts → ledger.canister.d.ts} +4 -4
- package/dist/types/sns_wasm.canister.d.ts +11 -0
- package/dist/types/types/canister.options.d.ts +8 -0
- package/dist/types/types/governance.options.d.ts +5 -0
- package/dist/types/types/governance_converters.d.ts +22 -5
- package/dist/types/types/ledger.options.d.ts +15 -0
- package/dist/types/types/ledger_converters.d.ts +3 -3
- package/dist/types/types/sns_wasm.options.d.ts +3 -0
- package/dist/types/utils/account_identifier.utils.d.ts +2 -2
- package/dist/types/utils/actor.utils.d.ts +14 -0
- package/dist/types/utils/agent.utils.d.ts +1 -1
- package/dist/types/utils/did.utils.d.ts +1 -0
- package/dist/types/utils/proto.utils.d.ts +2 -2
- package/package.json +10 -36
- package/dist/esm/chunk-BDJ6FQPO.js +0 -2
- package/dist/esm/chunk-BDJ6FQPO.js.map +0 -7
- package/dist/esm/chunk-C2ZTAHQL.js +0 -3
- package/dist/esm/chunk-C2ZTAHQL.js.map +0 -7
- package/dist/esm/chunk-CVYDMRZA.js +0 -7
- package/dist/esm/chunk-CVYDMRZA.js.map +0 -7
- package/dist/esm/chunk-EDMSX7GK.js +0 -831
- package/dist/esm/chunk-FL7E4DL3.js.map +0 -7
- package/dist/esm/chunk-KXYKDST6.js +0 -17
- package/dist/esm/chunk-KXYKDST6.js.map +0 -7
- package/dist/esm/chunk-S37GZOMR.js.map +0 -7
- package/dist/esm/chunk-SOPGOKKH.js +0 -2
- package/dist/esm/chunk-SOPGOKKH.js.map +0 -7
- package/dist/esm/genesis_token.js +0 -2
- package/dist/esm/governance.js +0 -2
- package/dist/esm/ledger.js +0 -2
- package/dist/types/genesis_token.d.ts +0 -17
- package/dist/types/types/governance.d.ts +0 -10
- package/dist/types/types/ledger.d.ts +0 -18
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/* Do not edit. Compiled with ./scripts/compile-idl-js from packages/nns/candid/sns_wasm.did */
|
|
2
|
+
export const idlFactory = ({ IDL }) => {
|
|
3
|
+
const SnsWasmCanisterInitPayload = IDL.Record({
|
|
4
|
+
'sns_subnet_ids' : IDL.Vec(IDL.Principal),
|
|
5
|
+
});
|
|
6
|
+
const SnsWasm = IDL.Record({
|
|
7
|
+
'wasm' : IDL.Vec(IDL.Nat8),
|
|
8
|
+
'canister_type' : IDL.Int32,
|
|
9
|
+
});
|
|
10
|
+
const AddWasmRequest = IDL.Record({
|
|
11
|
+
'hash' : IDL.Vec(IDL.Nat8),
|
|
12
|
+
'wasm' : IDL.Opt(SnsWasm),
|
|
13
|
+
});
|
|
14
|
+
const SnsWasmError = IDL.Record({ 'message' : IDL.Text });
|
|
15
|
+
const Result = IDL.Variant({
|
|
16
|
+
'Error' : SnsWasmError,
|
|
17
|
+
'Hash' : IDL.Vec(IDL.Nat8),
|
|
18
|
+
});
|
|
19
|
+
const AddWasmResponse = IDL.Record({ 'result' : IDL.Opt(Result) });
|
|
20
|
+
const TreasuryDistribution = IDL.Record({ 'total_e8s' : IDL.Nat64 });
|
|
21
|
+
const NeuronDistribution = IDL.Record({
|
|
22
|
+
'controller' : IDL.Opt(IDL.Principal),
|
|
23
|
+
'stake_e8s' : IDL.Nat64,
|
|
24
|
+
});
|
|
25
|
+
const DeveloperDistribution = IDL.Record({
|
|
26
|
+
'developer_neurons' : IDL.Vec(NeuronDistribution),
|
|
27
|
+
});
|
|
28
|
+
const AirdropDistribution = IDL.Record({
|
|
29
|
+
'airdrop_neurons' : IDL.Vec(NeuronDistribution),
|
|
30
|
+
});
|
|
31
|
+
const SwapDistribution = IDL.Record({
|
|
32
|
+
'total_e8s' : IDL.Nat64,
|
|
33
|
+
'initial_swap_amount_e8s' : IDL.Nat64,
|
|
34
|
+
});
|
|
35
|
+
const FractionalDeveloperVotingPower = IDL.Record({
|
|
36
|
+
'treasury_distribution' : IDL.Opt(TreasuryDistribution),
|
|
37
|
+
'developer_distribution' : IDL.Opt(DeveloperDistribution),
|
|
38
|
+
'airdrop_distribution' : IDL.Opt(AirdropDistribution),
|
|
39
|
+
'swap_distribution' : IDL.Opt(SwapDistribution),
|
|
40
|
+
});
|
|
41
|
+
const InitialTokenDistribution = IDL.Variant({
|
|
42
|
+
'FractionalDeveloperVotingPower' : FractionalDeveloperVotingPower,
|
|
43
|
+
});
|
|
44
|
+
const SnsInitPayload = IDL.Record({
|
|
45
|
+
'min_participant_icp_e8s' : IDL.Opt(IDL.Nat64),
|
|
46
|
+
'fallback_controller_principal_ids' : IDL.Vec(IDL.Text),
|
|
47
|
+
'token_symbol' : IDL.Opt(IDL.Text),
|
|
48
|
+
'max_icp_e8s' : IDL.Opt(IDL.Nat64),
|
|
49
|
+
'neuron_minimum_stake_e8s' : IDL.Opt(IDL.Nat64),
|
|
50
|
+
'min_participants' : IDL.Opt(IDL.Nat32),
|
|
51
|
+
'transaction_fee_e8s' : IDL.Opt(IDL.Nat64),
|
|
52
|
+
'initial_token_distribution' : IDL.Opt(InitialTokenDistribution),
|
|
53
|
+
'token_name' : IDL.Opt(IDL.Text),
|
|
54
|
+
'max_participant_icp_e8s' : IDL.Opt(IDL.Nat64),
|
|
55
|
+
'proposal_reject_cost_e8s' : IDL.Opt(IDL.Nat64),
|
|
56
|
+
'min_icp_e8s' : IDL.Opt(IDL.Nat64),
|
|
57
|
+
});
|
|
58
|
+
const DeployNewSnsRequest = IDL.Record({
|
|
59
|
+
'sns_init_payload' : IDL.Opt(SnsInitPayload),
|
|
60
|
+
});
|
|
61
|
+
const SnsCanisterIds = IDL.Record({
|
|
62
|
+
'root' : IDL.Opt(IDL.Principal),
|
|
63
|
+
'swap' : IDL.Opt(IDL.Principal),
|
|
64
|
+
'ledger' : IDL.Opt(IDL.Principal),
|
|
65
|
+
'governance' : IDL.Opt(IDL.Principal),
|
|
66
|
+
});
|
|
67
|
+
const DeployNewSnsResponse = IDL.Record({
|
|
68
|
+
'subnet_id' : IDL.Opt(IDL.Principal),
|
|
69
|
+
'error' : IDL.Opt(SnsWasmError),
|
|
70
|
+
'canisters' : IDL.Opt(SnsCanisterIds),
|
|
71
|
+
});
|
|
72
|
+
const SnsVersion = IDL.Record({
|
|
73
|
+
'root_wasm_hash' : IDL.Vec(IDL.Nat8),
|
|
74
|
+
'swap_wasm_hash' : IDL.Vec(IDL.Nat8),
|
|
75
|
+
'ledger_wasm_hash' : IDL.Vec(IDL.Nat8),
|
|
76
|
+
'governance_wasm_hash' : IDL.Vec(IDL.Nat8),
|
|
77
|
+
});
|
|
78
|
+
const GetNextSnsVersionRequest = IDL.Record({
|
|
79
|
+
'current_version' : IDL.Opt(SnsVersion),
|
|
80
|
+
});
|
|
81
|
+
const GetNextSnsVersionResponse = IDL.Record({
|
|
82
|
+
'next_version' : IDL.Opt(SnsVersion),
|
|
83
|
+
});
|
|
84
|
+
const GetWasmRequest = IDL.Record({ 'hash' : IDL.Vec(IDL.Nat8) });
|
|
85
|
+
const GetWasmResponse = IDL.Record({ 'wasm' : IDL.Opt(SnsWasm) });
|
|
86
|
+
const DeployedSns = IDL.Record({
|
|
87
|
+
'root_canister_id' : IDL.Opt(IDL.Principal),
|
|
88
|
+
});
|
|
89
|
+
const ListDeployedSnsesResponse = IDL.Record({
|
|
90
|
+
'instances' : IDL.Vec(DeployedSns),
|
|
91
|
+
});
|
|
92
|
+
return IDL.Service({
|
|
93
|
+
'add_wasm' : IDL.Func([AddWasmRequest], [AddWasmResponse], []),
|
|
94
|
+
'deploy_new_sns' : IDL.Func(
|
|
95
|
+
[DeployNewSnsRequest],
|
|
96
|
+
[DeployNewSnsResponse],
|
|
97
|
+
[],
|
|
98
|
+
),
|
|
99
|
+
'get_next_sns_version' : IDL.Func(
|
|
100
|
+
[GetNextSnsVersionRequest],
|
|
101
|
+
[GetNextSnsVersionResponse],
|
|
102
|
+
['query'],
|
|
103
|
+
),
|
|
104
|
+
'get_wasm' : IDL.Func([GetWasmRequest], [GetWasmResponse], ['query']),
|
|
105
|
+
'list_deployed_snses' : IDL.Func(
|
|
106
|
+
[IDL.Record({})],
|
|
107
|
+
[ListDeployedSnsesResponse],
|
|
108
|
+
['query'],
|
|
109
|
+
),
|
|
110
|
+
});
|
|
111
|
+
};
|
|
112
|
+
export const init = ({ IDL }) => {
|
|
113
|
+
const SnsWasmCanisterInitPayload = IDL.Record({
|
|
114
|
+
'sns_subnet_ids' : IDL.Vec(IDL.Principal),
|
|
115
|
+
});
|
|
116
|
+
return [SnsWasmCanisterInitPayload];
|
|
117
|
+
};
|