@temple-digital-group/temple-canton-js 2.0.2 → 2.0.3-beta.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 (38) hide show
  1. package/README.md +457 -457
  2. package/index.js +15 -15
  3. package/package.json +50 -49
  4. package/src/api/config.d.ts +20 -20
  5. package/src/api/index.ts +322 -322
  6. package/src/api/tokenStore.ts +30 -30
  7. package/src/api/types.ts +196 -196
  8. package/src/auth0/index.d.ts +1 -1
  9. package/src/auth0/index.js +50 -50
  10. package/src/canton/deposits.ts +563 -563
  11. package/src/canton/helpers.ts +266 -266
  12. package/src/canton/index.d.ts +41 -41
  13. package/src/canton/index.js +3301 -3472
  14. package/src/canton/instrumentCatalog.d.ts +7 -7
  15. package/src/canton/instrumentCatalog.js +283 -283
  16. package/src/canton/request_schemas/cancel_orders_amulet.json +77 -77
  17. package/src/canton/request_schemas/cancel_orders_utility.json +68 -68
  18. package/src/canton/request_schemas/create_order_proposal_amulet.json +94 -94
  19. package/src/canton/request_schemas/create_order_proposal_utility.json +121 -121
  20. package/src/canton/request_schemas/create_utility_credential.json +31 -31
  21. package/src/canton/request_schemas/execute_transfer_factory.json +43 -43
  22. package/src/canton/request_schemas/get_allocation_factory.json +21 -21
  23. package/src/canton/request_schemas/get_amulet_holdings.json +21 -21
  24. package/src/canton/request_schemas/get_instrument_configurations.json +21 -21
  25. package/src/canton/request_schemas/get_locked_amulet_holdings.json +21 -21
  26. package/src/canton/request_schemas/get_order_proposals.json +21 -21
  27. package/src/canton/request_schemas/get_orders.json +21 -21
  28. package/src/canton/request_schemas/get_sender_credentials.json +22 -22
  29. package/src/canton/request_schemas/get_transfer_factory.json +28 -28
  30. package/src/canton/request_schemas/get_utility_holdings.json +21 -21
  31. package/src/canton/request_schemas/unlock_amulet.json +38 -38
  32. package/src/canton/walletAdapter.d.ts +7 -7
  33. package/src/canton/walletAdapter.js +112 -112
  34. package/src/canton/withdrawals.ts +511 -511
  35. package/src/config/index.d.ts +63 -63
  36. package/src/config/index.js +188 -188
  37. package/src/websocket/index.ts +341 -341
  38. package/src/websocket/ws.d.ts +24 -24
@@ -1,78 +1,78 @@
1
- {
2
- "commands": [
3
- {
4
- "ExerciseCommand": {
5
- "templateId": "{{orchestrator_template_id}}",
6
- "contractId": "{{orchestrator_cid}}",
7
- "choice": "CancelOrderBatch",
8
- "choiceArgument": {
9
- "cancellables": "{{orders_cids}}",
10
- "context": {
11
- "transferFactoryCid": "{{transfer_factory_cid}}",
12
- "allocationFactoryCid": "{{allocation_factory_cid}}",
13
- "expectedAdmin": "{{dso}}",
14
- "transferLegId": "{{transfer_leg_id}}",
15
- "settlementRefId": "{{settlement_ref_id}}",
16
- "extraArgs": {
17
- "context": {
18
- "values": {
19
- "{{amulet_rules_context_key}}": {
20
- "tag": "AV_ContractId",
21
- "value": "{{transfer_rules_cid}}"
22
- },
23
- "{{featured_app_right_context_key}}": {
24
- "tag": "AV_ContractId",
25
- "value": "{{featured_app_right_cid}}"
26
- },
27
- "{{open_round_context_key}}": {
28
- "tag": "AV_ContractId",
29
- "value": "{{open_mining_round_cid}}"
30
- },
31
- "{{expire_lock_key}}": {
32
- "tag": "AV_Bool",
33
- "value": true
34
- }
35
- }
36
- },
37
- "meta": {
38
- "values": {}
39
- }
40
- }
41
- }
42
- }
43
- }
44
- }
45
- ],
46
- "commandId": "{{randomUUID}}",
47
- "userId": "{{user_id}}",
48
- "applicationId": "temple",
49
- "actAs": [
50
- "{{temple}}"
51
- ],
52
- "disclosedContracts": [
53
- {
54
- "templateId": "{{amulet_rules_template_id}}",
55
- "contractId": "{{transfer_rules_cid}}",
56
- "createdEventBlob": "{{transfer_rules_disclosure}}",
57
- "synchronizerId": "{{transfer_rules_synchronizer}}"
58
- },
59
- {
60
- "templateId": "{{open_mining_round_template_id}}",
61
- "contractId": "{{open_mining_round_cid}}",
62
- "createdEventBlob": "{{open_mining_round_disclosure}}",
63
- "synchronizerId": "{{open_mining_round_synchronizer}}"
64
- },
65
- {
66
- "templateId": "{{locked_amulet_template_id}}",
67
- "contractId": "{{locked_amulet_cid}}",
68
- "createdEventBlob": "{{locked_amulet_disclosure}}",
69
- "synchronizerId": "{{locked_amulet_synchronizer}}"
70
- },
71
- {
72
- "templateId": "{{external_amulet_rules_template_id}}",
73
- "contractId": "{{external_amulet_rules_cid}}",
74
- "createdEventBlob": "{{external_amulet_rules_disclosure}}",
75
- "synchronizerId": "{{external_amulet_rules_synchronizer}}"
76
- }
77
- ]
1
+ {
2
+ "commands": [
3
+ {
4
+ "ExerciseCommand": {
5
+ "templateId": "{{orchestrator_template_id}}",
6
+ "contractId": "{{orchestrator_cid}}",
7
+ "choice": "CancelOrderBatch",
8
+ "choiceArgument": {
9
+ "cancellables": "{{orders_cids}}",
10
+ "context": {
11
+ "transferFactoryCid": "{{transfer_factory_cid}}",
12
+ "allocationFactoryCid": "{{allocation_factory_cid}}",
13
+ "expectedAdmin": "{{dso}}",
14
+ "transferLegId": "{{transfer_leg_id}}",
15
+ "settlementRefId": "{{settlement_ref_id}}",
16
+ "extraArgs": {
17
+ "context": {
18
+ "values": {
19
+ "{{amulet_rules_context_key}}": {
20
+ "tag": "AV_ContractId",
21
+ "value": "{{transfer_rules_cid}}"
22
+ },
23
+ "{{featured_app_right_context_key}}": {
24
+ "tag": "AV_ContractId",
25
+ "value": "{{featured_app_right_cid}}"
26
+ },
27
+ "{{open_round_context_key}}": {
28
+ "tag": "AV_ContractId",
29
+ "value": "{{open_mining_round_cid}}"
30
+ },
31
+ "{{expire_lock_key}}": {
32
+ "tag": "AV_Bool",
33
+ "value": true
34
+ }
35
+ }
36
+ },
37
+ "meta": {
38
+ "values": {}
39
+ }
40
+ }
41
+ }
42
+ }
43
+ }
44
+ }
45
+ ],
46
+ "commandId": "{{randomUUID}}",
47
+ "userId": "{{user_id}}",
48
+ "applicationId": "temple",
49
+ "actAs": [
50
+ "{{temple}}"
51
+ ],
52
+ "disclosedContracts": [
53
+ {
54
+ "templateId": "{{amulet_rules_template_id}}",
55
+ "contractId": "{{transfer_rules_cid}}",
56
+ "createdEventBlob": "{{transfer_rules_disclosure}}",
57
+ "synchronizerId": "{{transfer_rules_synchronizer}}"
58
+ },
59
+ {
60
+ "templateId": "{{open_mining_round_template_id}}",
61
+ "contractId": "{{open_mining_round_cid}}",
62
+ "createdEventBlob": "{{open_mining_round_disclosure}}",
63
+ "synchronizerId": "{{open_mining_round_synchronizer}}"
64
+ },
65
+ {
66
+ "templateId": "{{locked_amulet_template_id}}",
67
+ "contractId": "{{locked_amulet_cid}}",
68
+ "createdEventBlob": "{{locked_amulet_disclosure}}",
69
+ "synchronizerId": "{{locked_amulet_synchronizer}}"
70
+ },
71
+ {
72
+ "templateId": "{{external_amulet_rules_template_id}}",
73
+ "contractId": "{{external_amulet_rules_cid}}",
74
+ "createdEventBlob": "{{external_amulet_rules_disclosure}}",
75
+ "synchronizerId": "{{external_amulet_rules_synchronizer}}"
76
+ }
77
+ ]
78
78
  }
@@ -1,69 +1,69 @@
1
- {
2
- "commands": [
3
- {
4
- "ExerciseCommand": {
5
- "templateId": "{{orchestrator_template_id}}",
6
- "contractId": "{{orchestrator_cid}}",
7
- "choice": "CancelOrderBatch",
8
- "choiceArgument": {
9
- "cancellables": "{{orders_cids}}",
10
- "context": {
11
- "transferFactoryCid": "{{transfer_factory_cid}}",
12
- "allocationFactoryCid": "{{allocation_factory_cid}}",
13
- "expectedAdmin": "{{registrar}}",
14
- "transferLegId": "{{transfer_leg_id}}",
15
- "settlementRefId": "{{settlement_ref_id}}",
16
- "extraArgs": {
17
- "context": {
18
- "values": {
19
- "{{instrument_configuration_key}}": {
20
- "tag": "AV_ContractId",
21
- "value": "{{instrument_configuration_cid}}"
22
- },
23
- "{{sender_credentials_key}}": {
24
- "tag": "AV_List",
25
- "value": [
26
- {
27
- "tag": "AV_ContractId",
28
- "value": "{{sender_credentials_cid}}"
29
- }
30
- ]
31
- }
32
- }
33
- },
34
- "meta": {
35
- "values": {}
36
- }
37
- }
38
- }
39
- }
40
- }
41
- }
42
- ],
43
- "commandId": "{{randomUUID}}",
44
- "userId": "{{userId}}",
45
- "applicationId": "temple",
46
- "actAs": [
47
- "{{temple}}"
48
- ],
49
- "disclosedContracts": [
50
- {
51
- "templateId": "{{utility_app_registry_app_package_id}}:Utility.Registry.App.V0.Service.AllocationFactory:AllocationFactory",
52
- "contractId": "{{allocation_factory_cid}}",
53
- "createdEventBlob": "{{allocation_factory_disclosure}}",
54
- "synchronizerId": "{{allocation_factory_synchronizer}}"
55
- },
56
- {
57
- "templateId": "{{utility_app_registry_package_id}}:Utility.Registry.V0.Configuration.Instrument:InstrumentConfiguration",
58
- "contractId": "{{instrument_configuration_cid}}",
59
- "createdEventBlob": "{{instrument_configuration_disclosure}}",
60
- "synchronizerId": "{{instrument_configuration_synchronizer}}"
61
- },
62
- {
63
- "templateId": "{{utility_app_credential_package_id}}:Utility.Credential.V0.Credential:Credential",
64
- "contractId": "{{sender_credentials_cid}}",
65
- "createdEventBlob": "{{sender_credentials_disclosure}}",
66
- "synchronizerId": "{{sender_credentials_synchronizer}}"
67
- }
68
- ]
1
+ {
2
+ "commands": [
3
+ {
4
+ "ExerciseCommand": {
5
+ "templateId": "{{orchestrator_template_id}}",
6
+ "contractId": "{{orchestrator_cid}}",
7
+ "choice": "CancelOrderBatch",
8
+ "choiceArgument": {
9
+ "cancellables": "{{orders_cids}}",
10
+ "context": {
11
+ "transferFactoryCid": "{{transfer_factory_cid}}",
12
+ "allocationFactoryCid": "{{allocation_factory_cid}}",
13
+ "expectedAdmin": "{{registrar}}",
14
+ "transferLegId": "{{transfer_leg_id}}",
15
+ "settlementRefId": "{{settlement_ref_id}}",
16
+ "extraArgs": {
17
+ "context": {
18
+ "values": {
19
+ "{{instrument_configuration_key}}": {
20
+ "tag": "AV_ContractId",
21
+ "value": "{{instrument_configuration_cid}}"
22
+ },
23
+ "{{sender_credentials_key}}": {
24
+ "tag": "AV_List",
25
+ "value": [
26
+ {
27
+ "tag": "AV_ContractId",
28
+ "value": "{{sender_credentials_cid}}"
29
+ }
30
+ ]
31
+ }
32
+ }
33
+ },
34
+ "meta": {
35
+ "values": {}
36
+ }
37
+ }
38
+ }
39
+ }
40
+ }
41
+ }
42
+ ],
43
+ "commandId": "{{randomUUID}}",
44
+ "userId": "{{userId}}",
45
+ "applicationId": "temple",
46
+ "actAs": [
47
+ "{{temple}}"
48
+ ],
49
+ "disclosedContracts": [
50
+ {
51
+ "templateId": "{{utility_app_registry_app_package_id}}:Utility.Registry.App.V0.Service.AllocationFactory:AllocationFactory",
52
+ "contractId": "{{allocation_factory_cid}}",
53
+ "createdEventBlob": "{{allocation_factory_disclosure}}",
54
+ "synchronizerId": "{{allocation_factory_synchronizer}}"
55
+ },
56
+ {
57
+ "templateId": "{{utility_app_registry_package_id}}:Utility.Registry.V0.Configuration.Instrument:InstrumentConfiguration",
58
+ "contractId": "{{instrument_configuration_cid}}",
59
+ "createdEventBlob": "{{instrument_configuration_disclosure}}",
60
+ "synchronizerId": "{{instrument_configuration_synchronizer}}"
61
+ },
62
+ {
63
+ "templateId": "{{utility_app_credential_package_id}}:Utility.Credential.V0.Credential:Credential",
64
+ "contractId": "{{sender_credentials_cid}}",
65
+ "createdEventBlob": "{{sender_credentials_disclosure}}",
66
+ "synchronizerId": "{{sender_credentials_synchronizer}}"
67
+ }
68
+ ]
69
69
  }
@@ -1,95 +1,95 @@
1
- {
2
- "commands": [
3
- {
4
- "ExerciseCommand": {
5
- "templateId": "{{orchestrator_template_id}}",
6
- "contractId": "{{orchestrator_cid}}",
7
- "choice": "RequestOrderCreation",
8
- "choiceArgument": {
9
- "maker": "{{maker}}",
10
- "holdingCid": "{{holding_cid}}",
11
- "price": "{{price}}",
12
- "quantity": "{{quantity}}",
13
- "side": "{{side}}",
14
- "orderType": "{{order_type}}",
15
- "tradedAssetId": "{{baseAsset}}",
16
- "quotedAssetId": "{{quoteAsset}}",
17
- "holdingContext": {
18
- "transferFactoryCid": "{{transfer_factory_cid}}",
19
- "allocationFactoryCid": "{{allocation_factory_cid}}",
20
- "expectedAdmin": "{{dso}}",
21
- "transferLegId": "{{transfer_leg_id}}",
22
- "settlementRefId": "{{settlement_ref_id}}",
23
- "extraArgs": {
24
- "context": {
25
- "values": {
26
- "{{amulet_rules_context_key}}": {
27
- "tag": "AV_ContractId",
28
- "value": "{{transfer_rules_cid}}"
29
- },
30
- "{{featured_app_right_context_key}}": {
31
- "tag": "AV_ContractId",
32
- "value": "{{featured_app_right_cid}}"
33
- },
34
- "{{open_round_context_key}}": {
35
- "tag": "AV_ContractId",
36
- "value": "{{open_mining_round_cid}}"
37
- },
38
- "{{expire_lock_key}}": {
39
- "tag": "AV_Bool",
40
- "value": true
41
- }
42
- }
43
- },
44
- "meta": {
45
- "values": {}
46
- }
47
- }
48
- },
49
- "expiresAt": "{{expires_at}}"
50
- }
51
- }
52
- }
53
- ],
54
- "commandId": "{{randomUUID}}",
55
- "userId": "{{user_id}}",
56
- "applicationId": "temple",
57
- "actAs": [
58
- "{{maker}}"
59
- ],
60
- "observers": [
61
- "{{temple}}"
62
- ],
63
- "disclosedContracts": [
64
- {
65
- "templateId": "{{orchestrator_template_id}}",
66
- "contractId": "{{orchestrator_cid}}",
67
- "createdEventBlob": "{{orchestrator_disclosure}}",
68
- "synchronizerId": "{{orchestrator_synchronizer}}"
69
- },
70
- {
71
- "templateId": "{{amulet_rules_template_id}}",
72
- "contractId": "{{transfer_rules_cid}}",
73
- "createdEventBlob": "{{transfer_rules_disclosure}}",
74
- "synchronizerId": "{{transfer_rules_synchronizer}}"
75
- },
76
- {
77
- "templateId": "{{open_mining_round_template_id}}",
78
- "contractId": "{{open_mining_round_cid}}",
79
- "createdEventBlob": "{{open_mining_round_disclosure}}",
80
- "synchronizerId": "{{open_mining_round_synchronizer}}"
81
- },
82
- {
83
- "templateId": "{{featured_app_right_template_id}}",
84
- "contractId": "{{featured_app_right_cid}}",
85
- "createdEventBlob": "{{featured_app_right_disclosure}}",
86
- "synchronizerId": "{{featured_app_right_synchronizer}}"
87
- },
88
- {
89
- "templateId": "{{external_amulet_rules_template_id}}",
90
- "contractId": "{{external_amulet_rules_cid}}",
91
- "createdEventBlob": "{{external_amulet_rules_disclosure}}",
92
- "synchronizerId": "{{external_amulet_rules_synchronizer}}"
93
- }
94
- ]
1
+ {
2
+ "commands": [
3
+ {
4
+ "ExerciseCommand": {
5
+ "templateId": "{{orchestrator_template_id}}",
6
+ "contractId": "{{orchestrator_cid}}",
7
+ "choice": "RequestOrderCreation",
8
+ "choiceArgument": {
9
+ "maker": "{{maker}}",
10
+ "holdingCid": "{{holding_cid}}",
11
+ "price": "{{price}}",
12
+ "quantity": "{{quantity}}",
13
+ "side": "{{side}}",
14
+ "orderType": "{{order_type}}",
15
+ "tradedAssetId": "{{baseAsset}}",
16
+ "quotedAssetId": "{{quoteAsset}}",
17
+ "holdingContext": {
18
+ "transferFactoryCid": "{{transfer_factory_cid}}",
19
+ "allocationFactoryCid": "{{allocation_factory_cid}}",
20
+ "expectedAdmin": "{{dso}}",
21
+ "transferLegId": "{{transfer_leg_id}}",
22
+ "settlementRefId": "{{settlement_ref_id}}",
23
+ "extraArgs": {
24
+ "context": {
25
+ "values": {
26
+ "{{amulet_rules_context_key}}": {
27
+ "tag": "AV_ContractId",
28
+ "value": "{{transfer_rules_cid}}"
29
+ },
30
+ "{{featured_app_right_context_key}}": {
31
+ "tag": "AV_ContractId",
32
+ "value": "{{featured_app_right_cid}}"
33
+ },
34
+ "{{open_round_context_key}}": {
35
+ "tag": "AV_ContractId",
36
+ "value": "{{open_mining_round_cid}}"
37
+ },
38
+ "{{expire_lock_key}}": {
39
+ "tag": "AV_Bool",
40
+ "value": true
41
+ }
42
+ }
43
+ },
44
+ "meta": {
45
+ "values": {}
46
+ }
47
+ }
48
+ },
49
+ "expiresAt": "{{expires_at}}"
50
+ }
51
+ }
52
+ }
53
+ ],
54
+ "commandId": "{{randomUUID}}",
55
+ "userId": "{{user_id}}",
56
+ "applicationId": "temple",
57
+ "actAs": [
58
+ "{{maker}}"
59
+ ],
60
+ "observers": [
61
+ "{{temple}}"
62
+ ],
63
+ "disclosedContracts": [
64
+ {
65
+ "templateId": "{{orchestrator_template_id}}",
66
+ "contractId": "{{orchestrator_cid}}",
67
+ "createdEventBlob": "{{orchestrator_disclosure}}",
68
+ "synchronizerId": "{{orchestrator_synchronizer}}"
69
+ },
70
+ {
71
+ "templateId": "{{amulet_rules_template_id}}",
72
+ "contractId": "{{transfer_rules_cid}}",
73
+ "createdEventBlob": "{{transfer_rules_disclosure}}",
74
+ "synchronizerId": "{{transfer_rules_synchronizer}}"
75
+ },
76
+ {
77
+ "templateId": "{{open_mining_round_template_id}}",
78
+ "contractId": "{{open_mining_round_cid}}",
79
+ "createdEventBlob": "{{open_mining_round_disclosure}}",
80
+ "synchronizerId": "{{open_mining_round_synchronizer}}"
81
+ },
82
+ {
83
+ "templateId": "{{featured_app_right_template_id}}",
84
+ "contractId": "{{featured_app_right_cid}}",
85
+ "createdEventBlob": "{{featured_app_right_disclosure}}",
86
+ "synchronizerId": "{{featured_app_right_synchronizer}}"
87
+ },
88
+ {
89
+ "templateId": "{{external_amulet_rules_template_id}}",
90
+ "contractId": "{{external_amulet_rules_cid}}",
91
+ "createdEventBlob": "{{external_amulet_rules_disclosure}}",
92
+ "synchronizerId": "{{external_amulet_rules_synchronizer}}"
93
+ }
94
+ ]
95
95
  }