@dfinity/sns 0.0.1

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.
Files changed (74) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +5 -0
  3. package/dist/candid/ledger.certified.idl.d.ts +2 -0
  4. package/dist/candid/ledger.certified.idl.js +97 -0
  5. package/dist/candid/ledger.d.ts +106 -0
  6. package/dist/candid/ledger.did +250 -0
  7. package/dist/candid/ledger.idl.d.ts +2 -0
  8. package/dist/candid/ledger.idl.js +109 -0
  9. package/dist/candid/sns_governance.certified.idl.d.ts +2 -0
  10. package/dist/candid/sns_governance.certified.idl.js +596 -0
  11. package/dist/candid/sns_governance.d.ts +366 -0
  12. package/dist/candid/sns_governance.did +303 -0
  13. package/dist/candid/sns_governance.idl.d.ts +2 -0
  14. package/dist/candid/sns_governance.idl.js +600 -0
  15. package/dist/candid/sns_root.certified.idl.d.ts +2 -0
  16. package/dist/candid/sns_root.certified.idl.js +34 -0
  17. package/dist/candid/sns_root.d.ts +28 -0
  18. package/dist/candid/sns_root.did +26 -0
  19. package/dist/candid/sns_root.idl.d.ts +2 -0
  20. package/dist/candid/sns_root.idl.js +34 -0
  21. package/dist/candid/sns_swap.certified.idl.d.ts +2 -0
  22. package/dist/candid/sns_swap.certified.idl.js +110 -0
  23. package/dist/candid/sns_swap.d.ts +81 -0
  24. package/dist/candid/sns_swap.did +61 -0
  25. package/dist/candid/sns_swap.idl.d.ts +2 -0
  26. package/dist/candid/sns_swap.idl.js +110 -0
  27. package/dist/cjs/index.cjs.js +853 -0
  28. package/dist/cjs/index.cjs.js.map +7 -0
  29. package/dist/esm/chunk-7F6PCBCJ.js +2 -0
  30. package/dist/esm/chunk-7F6PCBCJ.js.map +7 -0
  31. package/dist/esm/chunk-A576P2ZR.js +2 -0
  32. package/dist/esm/chunk-A576P2ZR.js.map +7 -0
  33. package/dist/esm/chunk-LXL5LYD3.js +2 -0
  34. package/dist/esm/chunk-LXL5LYD3.js.map +7 -0
  35. package/dist/esm/chunk-RB6XGLR7.js +2 -0
  36. package/dist/esm/chunk-RB6XGLR7.js.map +7 -0
  37. package/dist/esm/chunk-VMVMYL6O.js +840 -0
  38. package/dist/esm/chunk-VMVMYL6O.js.map +7 -0
  39. package/dist/esm/chunk-WPRZTZWQ.js +2 -0
  40. package/dist/esm/chunk-WPRZTZWQ.js.map +7 -0
  41. package/dist/esm/chunk-YKP66JDM.js +2 -0
  42. package/dist/esm/chunk-YKP66JDM.js.map +7 -0
  43. package/dist/esm/chunk-YL4WAPXH.js +2 -0
  44. package/dist/esm/chunk-YL4WAPXH.js.map +7 -0
  45. package/dist/esm/governance.canister.js +2 -0
  46. package/dist/esm/governance.canister.js.map +7 -0
  47. package/dist/esm/index.js +2 -0
  48. package/dist/esm/index.js.map +7 -0
  49. package/dist/esm/ledger.canister.js +2 -0
  50. package/dist/esm/ledger.canister.js.map +7 -0
  51. package/dist/esm/root.canister.js +2 -0
  52. package/dist/esm/root.canister.js.map +7 -0
  53. package/dist/esm/sns.js +2 -0
  54. package/dist/esm/sns.js.map +7 -0
  55. package/dist/esm/sns.wrapper.js +2 -0
  56. package/dist/esm/sns.wrapper.js.map +7 -0
  57. package/dist/index.cjs.js +1 -0
  58. package/dist/index.js +1 -0
  59. package/dist/types/constants/governance.constants.d.ts +6 -0
  60. package/dist/types/governance.canister.d.ts +13 -0
  61. package/dist/types/index.d.ts +10 -0
  62. package/dist/types/ledger.canister.d.ts +6 -0
  63. package/dist/types/root.canister.d.ts +22 -0
  64. package/dist/types/services/canister.d.ts +10 -0
  65. package/dist/types/sns.d.ts +21 -0
  66. package/dist/types/sns.wrapper.d.ts +43 -0
  67. package/dist/types/types/canister.options.d.ts +8 -0
  68. package/dist/types/types/governance.params.d.ts +14 -0
  69. package/dist/types/types/query.params.d.ts +7 -0
  70. package/dist/types/utils/actor.utils.d.ts +14 -0
  71. package/dist/types/utils/agent.utils.d.ts +5 -0
  72. package/dist/types/utils/asserts.utils.d.ts +3 -0
  73. package/dist/types/utils/did.utils.d.ts +1 -0
  74. package/package.json +40 -0
@@ -0,0 +1,109 @@
1
+ /* Do not edit. Compiled with ./scripts/compile-idl-js from packages/sns/candid/ledger.did */
2
+ export const idlFactory = ({ IDL }) => {
3
+ const AccountIdentifier = IDL.Vec(IDL.Nat8);
4
+ const AccountBalanceArgs = IDL.Record({ 'account' : AccountIdentifier });
5
+ const Tokens = IDL.Record({ 'e8s' : IDL.Nat64 });
6
+ const Archive = IDL.Record({ 'canister_id' : IDL.Principal });
7
+ const Archives = IDL.Record({ 'archives' : IDL.Vec(Archive) });
8
+ const BlockIndex = IDL.Nat64;
9
+ const GetBlocksArgs = IDL.Record({
10
+ 'start' : BlockIndex,
11
+ 'length' : IDL.Nat64,
12
+ });
13
+ const Memo = IDL.Nat64;
14
+ const Operation = IDL.Variant({
15
+ 'Burn' : IDL.Record({ 'from' : AccountIdentifier, 'amount' : Tokens }),
16
+ 'Mint' : IDL.Record({ 'to' : AccountIdentifier, 'amount' : Tokens }),
17
+ 'Transfer' : IDL.Record({
18
+ 'to' : AccountIdentifier,
19
+ 'fee' : Tokens,
20
+ 'from' : AccountIdentifier,
21
+ 'amount' : Tokens,
22
+ }),
23
+ });
24
+ const TimeStamp = IDL.Record({ 'timestamp_nanos' : IDL.Nat64 });
25
+ const Transaction = IDL.Record({
26
+ 'memo' : Memo,
27
+ 'operation' : IDL.Opt(Operation),
28
+ 'created_at_time' : TimeStamp,
29
+ });
30
+ const Block = IDL.Record({
31
+ 'transaction' : Transaction,
32
+ 'timestamp' : TimeStamp,
33
+ 'parent_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
34
+ });
35
+ const BlockRange = IDL.Record({ 'blocks' : IDL.Vec(Block) });
36
+ const QueryArchiveError = IDL.Variant({
37
+ 'BadFirstBlockIndex' : IDL.Record({
38
+ 'requested_index' : BlockIndex,
39
+ 'first_valid_index' : BlockIndex,
40
+ }),
41
+ 'Other' : IDL.Record({
42
+ 'error_message' : IDL.Text,
43
+ 'error_code' : IDL.Nat64,
44
+ }),
45
+ });
46
+ const QueryArchiveResult = IDL.Variant({
47
+ 'Ok' : BlockRange,
48
+ 'Err' : QueryArchiveError,
49
+ });
50
+ const QueryArchiveFn = IDL.Func(
51
+ [GetBlocksArgs],
52
+ [QueryArchiveResult],
53
+ ['query'],
54
+ );
55
+ const QueryBlocksResponse = IDL.Record({
56
+ 'certificate' : IDL.Opt(IDL.Vec(IDL.Nat8)),
57
+ 'blocks' : IDL.Vec(Block),
58
+ 'chain_length' : IDL.Nat64,
59
+ 'first_block_index' : BlockIndex,
60
+ 'archived_blocks' : IDL.Vec(
61
+ IDL.Record({
62
+ 'callback' : QueryArchiveFn,
63
+ 'start' : BlockIndex,
64
+ 'length' : IDL.Nat64,
65
+ })
66
+ ),
67
+ });
68
+ const SubAccount = IDL.Vec(IDL.Nat8);
69
+ const TransferArgs = IDL.Record({
70
+ 'to' : AccountIdentifier,
71
+ 'fee' : Tokens,
72
+ 'memo' : Memo,
73
+ 'from_subaccount' : IDL.Opt(SubAccount),
74
+ 'created_at_time' : IDL.Opt(TimeStamp),
75
+ 'amount' : Tokens,
76
+ });
77
+ const TransferError = IDL.Variant({
78
+ 'TxTooOld' : IDL.Record({ 'allowed_window_nanos' : IDL.Nat64 }),
79
+ 'BadFee' : IDL.Record({ 'expected_fee' : Tokens }),
80
+ 'TxDuplicate' : IDL.Record({ 'duplicate_of' : BlockIndex }),
81
+ 'TxCreatedInFuture' : IDL.Null,
82
+ 'InsufficientFunds' : IDL.Record({ 'balance' : Tokens }),
83
+ });
84
+ const TransferResult = IDL.Variant({
85
+ 'Ok' : BlockIndex,
86
+ 'Err' : TransferError,
87
+ });
88
+ const TransferFeeArg = IDL.Record({});
89
+ const TransferFee = IDL.Record({ 'transfer_fee' : Tokens });
90
+ return IDL.Service({
91
+ 'account_balance' : IDL.Func([AccountBalanceArgs], [Tokens], ['query']),
92
+ 'archives' : IDL.Func([], [Archives], ['query']),
93
+ 'decimals' : IDL.Func(
94
+ [],
95
+ [IDL.Record({ 'decimals' : IDL.Nat32 })],
96
+ ['query'],
97
+ ),
98
+ 'name' : IDL.Func([], [IDL.Record({ 'name' : IDL.Text })], ['query']),
99
+ 'query_blocks' : IDL.Func(
100
+ [GetBlocksArgs],
101
+ [QueryBlocksResponse],
102
+ ['query'],
103
+ ),
104
+ 'symbol' : IDL.Func([], [IDL.Record({ 'symbol' : IDL.Text })], ['query']),
105
+ 'transfer' : IDL.Func([TransferArgs], [TransferResult], []),
106
+ 'transfer_fee' : IDL.Func([TransferFeeArg], [TransferFee], ['query']),
107
+ });
108
+ };
109
+ export const init = ({ IDL }) => { return []; };
@@ -0,0 +1,2 @@
1
+ import type { IDL } from "@dfinity/candid";
2
+ export const idlFactory: IDL.InterfaceFactory;